@webority/ui-elements 0.13.5 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,18 @@
1
1
  //#region src/elementBase.js
2
2
  var e = typeof HTMLElement > "u" ? class {} : HTMLElement, t = {
3
- success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
4
- error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>",
5
- warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
6
- info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
7
- delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
8
- }, n = Object.keys(t), r = class extends e {
3
+ delete: "data:image/webp;base64,UklGRh4RAABXRUJQVlA4WAoAAAAQAAAAFwEAFwEAQUxQSGwFAAABkFXbbh1JgiAIhmAIZjBhEDOIGcQMqhgkDKoZCEIgCIIh6KO7Xokt6WtWREwAjBxDykvdNjqYWZ42ZqLHVpecIpgbY67b0eSEjR51SmginJYHy+mPR53QMnHZWC7MjyVZJC7UpIONlmgJzFuTjvI2owlwIekwzUF5uJB0m+agNlxIOk8zaizdmwywbUlZuJAMk2fUU1ibDJW3oKNEMuAt6SeRDJpm3SSSgfOsl0QyeJ51kkgUSFEfgUSJW9AFrqLIW1DE0kSVPGshkqiTgwbwJipdcXiJRan8b2x4E8VuYWCJRbWcRoU3Ue86pnCIgjkMaGmi4lZGgzdR8w2HElgUzWEgUxNVt2kYq6h7HQNuovAbDiAcovIjdC+wKJ1D52ITtXPs2txE8W3u2CLKL91aRf1rp1Yx4NqlVUy4dmgVI67dWcWMa2dWMeTalUVMWToyizHnbsRmjRY7EVjM2UIXAotBOXQADzHpgde7iVG3y61i1vVikxh2ulRolmnhQshiWsbr3MS4t8ssYt5ykdDs08I1WAx84BVWMfHtAkmMnE4X2EqMZ9vFzLeTTWLodCpkSzGeaRVT304UxNjxPGwtOk0Wc5eTBLZXw3PcxOD1FEFMHs6w24xOEMXo6XtkNfpaFrOnb7Hd6EtZDJ++w5ajr2QxffoG2Y6+kMT46XO79ehjQcwfPrXbr34I2X4NP5PFActn2APoI0lcMH1i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ill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>" }, r = [
9
+ "success",
10
+ "error",
11
+ "warning",
12
+ "info",
13
+ "delete",
14
+ "primary"
15
+ ], i = class extends e {
9
16
  static get observedAttributes() {
10
17
  return ["tone", "size"];
11
18
  }
@@ -16,48 +23,53 @@ var e = typeof HTMLElement > "u" ? class {} : HTMLElement, t = {
16
23
  this.isConnected && this.render();
17
24
  }
18
25
  render() {
19
- let e = this.getAttribute("tone"), n = Number.parseInt(this.getAttribute("size"), 10) || 72, r = t[e] || t.info;
20
- this.innerHTML = `<svg width="${n}" height="${n}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${r}</svg>`;
26
+ let e = this.getAttribute("tone"), r = Number.parseInt(this.getAttribute("size"), 10) || 72, i = n[e];
27
+ if (i) {
28
+ this.innerHTML = `<svg width="${r}" height="${r}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${i}</svg>`;
29
+ return;
30
+ }
31
+ let a = t[e] || t.info;
32
+ this.innerHTML = `<img src="${a}" width="${r}" height="${r}" alt="" aria-hidden="true" draggable="false" />`;
21
33
  }
22
- }, i = 4, a = 300, o = 400;
23
- function s(e, t, n = {}) {
34
+ }, a = 4, o = 300, s = 400;
35
+ function c(e, t, n = {}) {
24
36
  if (!e || !t) return;
25
- let r = e.getBoundingClientRect(), s = n.clampHeight ? t.scrollTop : 0;
37
+ let r = e.getBoundingClientRect(), i = n.clampHeight ? t.scrollTop : 0;
26
38
  n.clampHeight && (t.style.maxHeight = "");
27
- let c = t.offsetHeight, l = window.innerHeight - r.bottom, u = l < c + i && r.top > l;
28
- if (t.classList.toggle("drop-up", u), t.style.position = "fixed", t.style.top = u ? `${Math.max(i, r.top - c - i)}px` : `${r.bottom + i}px`, n.clampHeight) {
29
- let e = u ? r.top - i * 2 : window.innerHeight - r.bottom - i * 2;
30
- e < c && (t.style.maxHeight = `${Math.max(e, 0)}px`), t.scrollTop = s;
31
- }
32
- n.matchWidth && (r.width >= a ? (t.style.minWidth = `${r.width}px`, t.style.width = `${r.width}px`, t.style.maxWidth = `${r.width}px`) : (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${Math.min(o, window.innerWidth - i * 2)}px`));
33
- let d = t.offsetWidth, f = Math.min(r.left, window.innerWidth - d - i);
34
- t.style.left = `${Math.max(i, f)}px`;
39
+ let c = t.offsetHeight, l = window.innerHeight - r.bottom, u = l < c + a && r.top > l;
40
+ if (t.classList.toggle("drop-up", u), t.style.position = "fixed", t.style.top = u ? `${Math.max(a, r.top - c - a)}px` : `${r.bottom + a}px`, n.clampHeight) {
41
+ let e = u ? r.top - a * 2 : window.innerHeight - r.bottom - a * 2;
42
+ e < c && (t.style.maxHeight = `${Math.max(e, 0)}px`), t.scrollTop = i;
43
+ }
44
+ n.matchWidth && (r.width >= o ? (t.style.minWidth = `${r.width}px`, t.style.width = `${r.width}px`, t.style.maxWidth = `${r.width}px`) : (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${Math.min(s, window.innerWidth - a * 2)}px`));
45
+ let d = t.offsetWidth, f = Math.min(r.left, window.innerWidth - d - a);
46
+ t.style.left = `${Math.max(a, f)}px`;
35
47
  }
36
- function c(e, t) {
37
- l(e), e._reanchor = t, e._reanchorScroll = (n) => {
48
+ function l(e, t) {
49
+ u(e), e._reanchor = t, e._reanchorScroll = (n) => {
38
50
  n.target instanceof Node && typeof e.contains == "function" && e.contains(n.target) || t();
39
51
  }, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchorScroll, !0);
40
52
  }
41
- function l(e) {
53
+ function u(e) {
42
54
  e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchorScroll, !0), e._reanchor = null, e._reanchorScroll = null);
43
55
  }
44
56
  //#endregion
45
57
  //#region src/formMirror.js
46
- var u = "data-wui-mirror";
47
- function d(e, t) {
48
- let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${u}]`);
58
+ var d = "data-wui-mirror";
59
+ function f(e, t) {
60
+ let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${d}]`);
49
61
  if (!n) {
50
62
  r?.remove();
51
63
  return;
52
64
  }
53
- r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(u, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
65
+ r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(d, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
54
66
  for (let t of [...r.attributes]) t.name.startsWith("data-val") && !e.hasAttribute(t.name) && r.removeAttribute(t.name);
55
67
  for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
56
68
  r.disabled = e.hasAttribute("disabled");
57
69
  }
58
70
  //#endregion
59
71
  //#region src/iconGlyphs.g.js
60
- var f = {
72
+ var p = {
61
73
  activity: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
62
74
  alarm: "<path d=\"M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
63
75
  "alert-circle": "<path d=\"M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M12 16.2v.1\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
@@ -206,14 +218,14 @@ var f = {
206
218
  "zoom-in": "<path d=\"M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
207
219
  "zoom-out": "<path d=\"M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>"
208
220
  };
209
- Object.keys(f);
210
- function p(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
211
- let i = f[e];
221
+ Object.keys(p);
222
+ function m(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
223
+ let i = p[e];
212
224
  return i ? `<svg class="${n ? `wui-icon ${n}` : "wui-icon"}" data-icon="${e}" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em${r ? `;${r}` : ""}">${i}</svg>` : "";
213
225
  }
214
226
  //#endregion
215
227
  //#region src/listboxKeyNav.js
216
- function m(e) {
228
+ function h(e) {
217
229
  let { getVisibleOptions: t, getActive: n, setActive: r, onEnter: i, onEscape: a, onTypeahead: o, typeaheadMs: s = 500 } = e, c = "", l = null, u = () => {
218
230
  clearTimeout(l), l = null, c = "";
219
231
  };
@@ -244,15 +256,18 @@ function m(e) {
244
256
  }
245
257
  //#endregion
246
258
  //#region src/optionLabel.js
247
- var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), _ = (e) => {
259
+ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), v = (e) => {
248
260
  if (!e) return "";
249
261
  let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
250
- return t ? p(t) : "";
251
- }, v = (e) => {
262
+ return t ? m(t) : "";
263
+ }, y = (e) => `wui-flag wui-flag-${e}`, b = (e) => {
264
+ let t = String(e ?? "").toLowerCase();
265
+ return /^[a-z]{2}$/.test(t) ? `<span class="${y(t)}" aria-hidden="true"></span>` : "";
266
+ }, x = (e) => {
252
267
  if (e == null) return "";
253
- let t = e[h] ? String(e.label ?? "") : g(e.label), n = _(e.icon);
268
+ let t = e[g] ? String(e.label ?? "") : _(e.label), n = b(e.flag) + v(e.icon);
254
269
  return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
255
- }, y = class extends e {
270
+ }, S = class extends e {
256
271
  static formAssociated = !0;
257
272
  _accessibleName() {
258
273
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
@@ -311,14 +326,14 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
311
326
  return this._value;
312
327
  }
313
328
  set value(e) {
314
- this._value = e == null ? "" : String(e), d(this, this._value);
329
+ this._value = e == null ? "" : String(e), f(this, this._value);
315
330
  let t = this._readOptions().find((e) => String(e.value) === this._value);
316
- this._label = t ? x(t.label) : "", this._syncInput(), this._renderOptions("");
331
+ this._label = t ? w(t.label) : "", this._syncInput(), this._renderOptions("");
317
332
  }
318
333
  set options(e) {
319
334
  this._optionsProp = Array.isArray(e) ? e : [];
320
335
  let t = this._readOptions().find((e) => String(e.value) === this._value);
321
- t && (this._label = x(t.label)), this._renderOptions(), this._syncInput();
336
+ t && (this._label = w(t.label)), this._renderOptions(), this._syncInput();
322
337
  }
323
338
  get options() {
324
339
  return this._readOptions();
@@ -337,7 +352,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
337
352
  }
338
353
  _matchesKnownOption(e) {
339
354
  let t = e.toLowerCase();
340
- return this._readOptions().some((e) => x(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
355
+ return this._readOptions().some((e) => w(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
341
356
  }
342
357
  get _minChars() {
343
358
  return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
@@ -355,7 +370,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
355
370
  value: e.getAttribute("value") ?? e.textContent.trim(),
356
371
  label: e.innerHTML,
357
372
  icon: e.getAttribute("icon") || void 0,
358
- [h]: !0,
373
+ [g]: !0,
359
374
  selected: e.hasAttribute("selected")
360
375
  })));
361
376
  }
@@ -369,17 +384,17 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
369
384
  let r = `${this.id}-listbox`;
370
385
  this._listboxId = r, this.innerHTML = `
371
386
  <div class="search-select${n}">
372
- <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${b(r)}" aria-label="${b(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}>
373
- <input class="search-select-input search-select-ac-input" placeholder="${b(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
387
+ <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${C(r)}" aria-label="${C(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}>
388
+ <input class="search-select-input search-select-ac-input" placeholder="${C(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
374
389
  <span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
375
- <button type="button" class="search-select-clear" aria-label="Clear" hidden>${p("x")}</button>
390
+ <button type="button" class="search-select-clear" aria-label="Clear" hidden>${m("x")}</button>
376
391
  </div>
377
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${b(r)}" tabindex="-1" hidden>
392
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${C(r)}" tabindex="-1" hidden>
378
393
  <div class="search-select-options"></div>
379
394
  <div class="search-select-empty" hidden>No matches</div>
380
395
  <div class="search-select-hint" hidden>Type to search…</div>
381
396
  </div>
382
- </div>`, this._rendered = !0, d(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
397
+ </div>`, this._rendered = !0, f(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
383
398
  }
384
399
  _refs() {
385
400
  return {
@@ -408,7 +423,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
408
423
  let t = this._refs();
409
424
  if (!t.optionsWrap) return;
410
425
  let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
411
- !this._remote && r && (i = i.filter((e) => x(e.label).toLowerCase().includes(r)));
426
+ !this._remote && r && (i = i.filter((e) => w(e.label).toLowerCase().includes(r)));
412
427
  let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
413
428
  value: a,
414
429
  custom: !0
@@ -416,11 +431,11 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
416
431
  t.optionsWrap.innerHTML = o.map((e, t) => {
417
432
  let n = `${s}-opt-${t}`;
418
433
  if (e.custom) {
419
- let t = `Add “${g(e.value)}”`;
420
- return `<button type="button" role="option" id="${b(n)}" class="search-select-option search-select-option-custom" data-value="${b(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
434
+ let t = `Add “${_(e.value)}”`;
435
+ return `<button type="button" role="option" id="${C(n)}" class="search-select-option search-select-option-custom" data-value="${C(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
421
436
  }
422
437
  let r = String(e.value) === String(this._value);
423
- return `<button type="button" role="option" id="${b(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${b(e.value)}" aria-selected="${r}">${v(e)}</button>`;
438
+ return `<button type="button" role="option" id="${C(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${C(e.value)}" aria-selected="${r}">${x(e)}</button>`;
424
439
  }).join(""), this._active = -1, t.control?.removeAttribute("aria-activedescendant");
425
440
  let c = r.length < this._minChars;
426
441
  t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c), this._reanchor?.();
@@ -429,7 +444,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
429
444
  this._teardown();
430
445
  let e = this._refs();
431
446
  if (!e.control || !e.input) return;
432
- let t = () => s(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
447
+ let t = () => c(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
433
448
  let r = n();
434
449
  this._active = t;
435
450
  for (let e of this._optionEls()) e.classList.remove("is-active");
@@ -438,18 +453,18 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
438
453
  e.menu.hidden = !1, e.control.setAttribute("aria-expanded", "true"), e.control.classList.add("open"), t(), this._renderOptions();
439
454
  }, o = () => {
440
455
  e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "", this._syncInput();
441
- }, l = (t) => {
456
+ }, s = (t) => {
442
457
  let n = t.dataset.custom === "true";
443
- this._value = t.dataset.value, this._label = n ? t.dataset.value : x(t.innerHTML), d(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
458
+ this._value = t.dataset.value, this._label = n ? t.dataset.value : w(t.innerHTML), f(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
444
459
  bubbles: !0,
445
460
  detail: { isCustom: n }
446
461
  })), o(), e.input.focus();
447
462
  }, u = (t) => {
448
- this._value = t, this._label = t, d(this, t), e.input.value = t, this.dispatchEvent(new CustomEvent("change", {
463
+ this._value = t, this._label = t, f(this, t), e.input.value = t, this.dispatchEvent(new CustomEvent("change", {
449
464
  bubbles: !0,
450
465
  detail: { isCustom: !0 }
451
466
  })), o();
452
- }, f = () => {
467
+ }, d = () => {
453
468
  let t = e.input.value;
454
469
  if (e.clear && (e.clear.hidden = !t), i() || a(), this._remote) {
455
470
  if (this._renderOptions(t), clearTimeout(this._timer), t.trim().length < this._minChars) {
@@ -463,12 +478,12 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
463
478
  }, this._timer = setTimeout(() => this._fireSearch(t, e), this._debounceMs);
464
479
  } else this._renderOptions(t);
465
480
  };
466
- this._navHandler = m({
481
+ this._navHandler = h({
467
482
  getVisibleOptions: n,
468
483
  getActive: () => this._active,
469
484
  setActive: (e) => r(e),
470
485
  onEnter: (t, n) => {
471
- if (n[this._active]) l(n[this._active]);
486
+ if (n[this._active]) s(n[this._active]);
472
487
  else if (this._allowCustom) {
473
488
  let t = e.input.value.trim();
474
489
  t && !this._matchesKnownOption(t) && u(t);
@@ -492,22 +507,22 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
492
507
  else if (e.key.length === 1 && (e.ctrlKey || e.metaKey || e.altKey || !i() || e.target?.tagName === "INPUT" || e.target?.tagName === "TEXTAREA") && (!i() || e.target?.tagName === "INPUT" || e.target?.tagName === "TEXTAREA")) return;
493
508
  this._navHandler.handler(e);
494
509
  };
495
- e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", f), e.input.addEventListener("keydown", p), e.menu.addEventListener("keydown", p), e.input.addEventListener("blur", (t) => {
510
+ e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", d), e.input.addEventListener("keydown", p), e.menu.addEventListener("keydown", p), e.input.addEventListener("blur", (t) => {
496
511
  if (!this._allowCustom || t.relatedTarget && this.contains(t.relatedTarget)) return;
497
512
  let n = e.input.value.trim();
498
513
  !n || n === this._label || this._matchesKnownOption(n) || u(n);
499
514
  }), e.optionsWrap.addEventListener("click", (e) => {
500
515
  let t = e.target.closest(".search-select-option");
501
- t && l(t);
516
+ t && s(t);
502
517
  }), e.optionsWrap.addEventListener("mousemove", (e) => {
503
518
  let t = e.target.closest(".search-select-option");
504
519
  t && r(this._optionEls().indexOf(t));
505
520
  }), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
506
- this._value = "", this._label = "", d(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
521
+ this._value = "", this._label = "", f(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
507
522
  }), this._bindGlobal = () => {
508
523
  this._teardown(), this._onDocClick = (e) => {
509
524
  i() && !this.contains(e.target) && o();
510
- }, document.addEventListener("click", this._onDocClick), c(this, () => {
525
+ }, document.addEventListener("click", this._onDocClick), l(this, () => {
511
526
  i() && t();
512
527
  });
513
528
  }, this._bindGlobal();
@@ -522,12 +537,159 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
522
537
  }));
523
538
  }
524
539
  _teardown() {
525
- this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), l(this), clearTimeout(this._timer), this._navHandler?.teardown();
540
+ this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), u(this), clearTimeout(this._timer), this._navHandler?.teardown();
541
+ }
542
+ disconnectedCallback() {
543
+ this._teardown();
544
+ }
545
+ }, C = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), w = (e) => String(e ?? "").replace(/<[^>]*>/g, "");
546
+ //#endregion
547
+ //#region src/textMatch.js
548
+ function T(e, t) {
549
+ let n = String(e ?? ""), r = String(t ?? "").trim();
550
+ if (!r || !n) return [{
551
+ text: n,
552
+ match: !1
553
+ }];
554
+ let i = n.toLowerCase(), a = r.toLowerCase();
555
+ if (i.length !== n.length) return [{
556
+ text: n,
557
+ match: !1
558
+ }];
559
+ let o = [], s = 0, c = i.indexOf(a, s);
560
+ for (; c !== -1;) c > s && o.push({
561
+ text: n.slice(s, c),
562
+ match: !1
563
+ }), o.push({
564
+ text: n.slice(c, c + a.length),
565
+ match: !0
566
+ }), s = c + a.length, c = i.indexOf(a, s);
567
+ return s < n.length && o.push({
568
+ text: n.slice(s),
569
+ match: !1
570
+ }), o;
571
+ }
572
+ //#endregion
573
+ //#region src/WuiCommandPalette.js
574
+ var E = "[role=\"option\"]", D = "No results", ee = class extends e {
575
+ static get observedAttributes() {
576
+ return [
577
+ "filter",
578
+ "highlight",
579
+ "empty-text"
580
+ ];
581
+ }
582
+ constructor() {
583
+ super(), this._activeId = null, this._lastQuery = null, this._onKeyDown = (e) => this._handleKeyDown(e), this._onClick = (e) => {
584
+ let t = this._optionFrom(e.target);
585
+ t && this._select(t);
586
+ }, this._onMouseDown = (e) => {
587
+ this._optionFrom(e.target) && e.preventDefault();
588
+ }, this._onMouseMove = (e) => {
589
+ let t = this._optionFrom(e.target);
590
+ t && t.id !== this._activeId && this._setActive(t, !1);
591
+ }, this._onInput = (e) => {
592
+ !this.hasAttribute("filter") || e.target !== this._input() || (this._applyFilter(), this.refresh());
593
+ };
594
+ }
595
+ connectedCallback() {
596
+ this._teardown(), this.addEventListener("keydown", this._onKeyDown), this.addEventListener("click", this._onClick), this.addEventListener("mousedown", this._onMouseDown), this.addEventListener("mousemove", this._onMouseMove), this.addEventListener("input", this._onInput), this.hasAttribute("filter") && this._applyFilter(), this.refresh();
526
597
  }
527
598
  disconnectedCallback() {
528
599
  this._teardown();
529
600
  }
530
- }, b = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), x = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), S = {
601
+ attributeChangedCallback() {
602
+ this.isConnected && (this.hasAttribute("filter") && this._applyFilter(), this.refresh());
603
+ }
604
+ get filter() {
605
+ return this.hasAttribute("filter");
606
+ }
607
+ set filter(e) {
608
+ this.toggleAttribute("filter", !!e);
609
+ }
610
+ get highlight() {
611
+ return this.getAttribute("highlight") !== "false";
612
+ }
613
+ set highlight(e) {
614
+ this.setAttribute("highlight", e ? "true" : "false");
615
+ }
616
+ get emptyText() {
617
+ return this.getAttribute("empty-text") ?? D;
618
+ }
619
+ set emptyText(e) {
620
+ this.setAttribute("empty-text", String(e ?? ""));
621
+ }
622
+ refresh() {
623
+ let e = this._input(), t = e ? e.value : "", n = t !== this._lastQuery;
624
+ this._lastQuery = t;
625
+ let r = this._visibleOptions(), i = n ? null : r.find((e) => e.id === this._activeId);
626
+ this._setActive(i ?? r[0] ?? null, n);
627
+ }
628
+ _input() {
629
+ return this.querySelector("[role=\"combobox\"]");
630
+ }
631
+ _optionFrom(e) {
632
+ let t = e?.closest?.(E);
633
+ return t && this.contains(t) && !this._isHidden(t) ? t : null;
634
+ }
635
+ _isHidden(e) {
636
+ return e.hidden || !!e.closest("[role=\"group\"]")?.hidden;
637
+ }
638
+ _visibleOptions() {
639
+ return [...this.querySelectorAll(E)].filter((e) => !this._isHidden(e));
640
+ }
641
+ _setActive(e, t) {
642
+ this._activeId = e ? e.id : null;
643
+ for (let t of this.querySelectorAll(E)) t.setAttribute("aria-selected", t === e ? "true" : "false");
644
+ let n = this._input();
645
+ n && (e ? n.setAttribute("aria-activedescendant", e.id) : n.removeAttribute("aria-activedescendant")), e && t && e.scrollIntoView({ block: "nearest" });
646
+ }
647
+ _move(e) {
648
+ let t = this._visibleOptions();
649
+ if (!t.length) return;
650
+ let n = t.findIndex((e) => e.id === this._activeId), r = n < 0 ? e > 0 ? 0 : t.length - 1 : (n + e + t.length) % t.length;
651
+ this._setActive(t[r], !0);
652
+ }
653
+ _handleKeyDown(e) {
654
+ if (e.target === this._input()) {
655
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), this._move(e.key === "ArrowDown" ? 1 : -1);
656
+ else if (e.key === "Enter" && !e.isComposing) {
657
+ let t = this._visibleOptions().find((e) => e.id === this._activeId);
658
+ if (!t) return;
659
+ e.preventDefault(), this._select(t);
660
+ }
661
+ }
662
+ }
663
+ _select(e) {
664
+ this.dispatchEvent(new CustomEvent("wui-command-palette:select", {
665
+ bubbles: !0,
666
+ cancelable: !0,
667
+ detail: {
668
+ key: e.dataset.key ?? null,
669
+ groupKey: e.dataset.groupKey ?? null,
670
+ id: e.id
671
+ }
672
+ })) && e.dataset.href && this._navigate(e.dataset.href);
673
+ }
674
+ _navigate(e) {
675
+ window.location.assign(e);
676
+ }
677
+ _applyFilter() {
678
+ let e = this._input(), t = (e ? e.value : "").trim(), n = t.toLowerCase(), r = this.highlight, i = 0;
679
+ for (let e of this.querySelectorAll(E)) {
680
+ let a = e.querySelector(".wui-cmd-item-label"), o = e.dataset.label ?? a?.textContent ?? "", s = !n || o.toLowerCase().includes(n);
681
+ e.hidden = !s, s && i++, a && (a.innerHTML = T(o, r ? t : "").map((e) => e.match ? `<mark class="wui-cmd-mark">${_(e.text)}</mark>` : _(e.text)).join(""));
682
+ }
683
+ for (let e of this.querySelectorAll("[role=\"group\"]")) e.hidden = ![...e.querySelectorAll(E)].some((e) => !e.hidden);
684
+ let a = this.querySelector("[role=\"listbox\"]");
685
+ a && (a.hidden = i === 0);
686
+ let o = this.querySelector(".wui-cmd-empty");
687
+ o && (o.textContent = n && i === 0 ? this.emptyText : "");
688
+ }
689
+ _teardown() {
690
+ this.removeEventListener("keydown", this._onKeyDown), this.removeEventListener("click", this._onClick), this.removeEventListener("mousedown", this._onMouseDown), this.removeEventListener("mousemove", this._onMouseMove), this.removeEventListener("input", this._onInput);
691
+ }
692
+ }, te = {
531
693
  "--color-primary": "#4F46E5",
532
694
  "--color-primary-hover": "#4338CA",
533
695
  "--color-text": "#071437",
@@ -537,21 +699,21 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
537
699
  "--wui-radius-lg": "14px",
538
700
  "--wui-shadow-overlay-lg": "0 24px 60px -16px rgba(7, 20, 55, 0.28)",
539
701
  "--wui-z-fixed": "1030"
540
- }, C = (e) => `var(${e}, ${S[e]})`, ee = `
702
+ }, O = (e) => `var(${e}, ${te[e]})`, ne = `
541
703
  :host {
542
704
  all: initial;
543
705
  position: fixed;
544
706
  bottom: 20px;
545
707
  left: 20px;
546
708
  right: auto;
547
- z-index: ${C("--wui-z-fixed")};
709
+ z-index: ${O("--wui-z-fixed")};
548
710
  display: block;
549
711
  width: 420px;
550
712
  max-width: calc(100vw - 40px);
551
713
  font-family: inherit;
552
714
  font-size: 16px;
553
715
  line-height: 1.5;
554
- color: ${C("--color-text")};
716
+ color: ${O("--color-text")};
555
717
  }
556
718
  :host([position="bottom-right"]) {
557
719
  right: 20px;
@@ -569,10 +731,10 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
569
731
 
570
732
  .wui-consent-banner-panel {
571
733
  padding: 20px;
572
- background: ${C("--color-surface")};
573
- border: 1px solid ${C("--color-border")};
574
- border-radius: ${C("--wui-radius-lg")};
575
- box-shadow: ${C("--wui-shadow-overlay-lg")};
734
+ background: ${O("--color-surface")};
735
+ border: 1px solid ${O("--color-border")};
736
+ border-radius: ${O("--wui-radius-lg")};
737
+ box-shadow: ${O("--wui-shadow-overlay-lg")};
576
738
  text-align: start;
577
739
  pointer-events: auto;
578
740
  }
@@ -581,16 +743,16 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
581
743
  font-size: 18px;
582
744
  font-weight: 600;
583
745
  line-height: 1.3;
584
- color: ${C("--color-text")};
746
+ color: ${O("--color-text")};
585
747
  }
586
748
  .wui-consent-banner-description {
587
749
  margin: 0 0 16px;
588
750
  font-size: 14px;
589
751
  line-height: 1.5;
590
- color: ${C("--color-text-muted")};
752
+ color: ${O("--color-text-muted")};
591
753
  }
592
754
  .wui-consent-banner-policy {
593
- color: ${C("--color-primary")};
755
+ color: ${O("--color-primary")};
594
756
  font-weight: 500;
595
757
  }
596
758
 
@@ -601,15 +763,15 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
601
763
  margin: 0 0 16px;
602
764
  padding: 12px 0;
603
765
  overflow-y: auto;
604
- border-top: 1px solid ${C("--color-border")};
605
- border-bottom: 1px solid ${C("--color-border")};
766
+ border-top: 1px solid ${O("--color-border")};
767
+ border-bottom: 1px solid ${O("--color-border")};
606
768
  }
607
769
  .wui-consent-banner-category-description {
608
770
  margin: 2px 0 0;
609
771
  padding-inline-start: 2.5em;
610
772
  font-size: 12px;
611
773
  line-height: 1.4;
612
- color: ${C("--color-text-muted")};
774
+ color: ${O("--color-text-muted")};
613
775
  }
614
776
 
615
777
  .form-check {
@@ -627,20 +789,20 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
627
789
  margin: 0;
628
790
  border: 1px solid rgba(0, 0, 0, 0.25);
629
791
  border-radius: 2em;
630
- background: ${C("--color-surface")} radial-gradient(circle, rgba(0, 0, 0, 0.25) 0.35em, transparent 0.4em) left / 1em 1em no-repeat;
792
+ background: ${O("--color-surface")} radial-gradient(circle, rgba(0, 0, 0, 0.25) 0.35em, transparent 0.4em) left / 1em 1em no-repeat;
631
793
  cursor: pointer;
632
794
  transition: background-position 0.15s ease-in-out;
633
795
  }
634
796
  .form-check-input:checked {
635
- border-color: ${C("--color-primary")};
636
- background: ${C("--color-primary")} radial-gradient(circle, #fff 0.35em, transparent 0.4em) right / 1em 1em no-repeat;
797
+ border-color: ${O("--color-primary")};
798
+ background: ${O("--color-primary")} radial-gradient(circle, #fff 0.35em, transparent 0.4em) right / 1em 1em no-repeat;
637
799
  }
638
800
  .form-check-input:disabled {
639
801
  opacity: 0.5;
640
802
  cursor: default;
641
803
  }
642
804
  .form-check-input:focus-visible {
643
- outline: 2px solid ${C("--color-primary")};
805
+ outline: 2px solid ${O("--color-primary")};
644
806
  outline-offset: 2px;
645
807
  }
646
808
  .form-check-label {
@@ -669,33 +831,33 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
669
831
  cursor: pointer;
670
832
  }
671
833
  .btn:focus-visible {
672
- outline: 2px solid ${C("--color-primary")};
834
+ outline: 2px solid ${O("--color-primary")};
673
835
  outline-offset: 2px;
674
836
  }
675
837
  .btn-primary {
676
- background: ${C("--color-primary")};
677
- border-color: ${C("--color-primary")};
838
+ background: ${O("--color-primary")};
839
+ border-color: ${O("--color-primary")};
678
840
  color: #fff;
679
841
  }
680
842
  .btn-primary:hover {
681
- background: ${C("--color-primary-hover")};
682
- border-color: ${C("--color-primary-hover")};
843
+ background: ${O("--color-primary-hover")};
844
+ border-color: ${O("--color-primary-hover")};
683
845
  }
684
846
  .btn-outline-secondary {
685
- border-color: ${C("--color-text-muted")};
686
- color: ${C("--color-text-muted")};
847
+ border-color: ${O("--color-text-muted")};
848
+ color: ${O("--color-text-muted")};
687
849
  }
688
850
  .btn-outline-secondary:hover {
689
- background: ${C("--color-text-muted")};
851
+ background: ${O("--color-text-muted")};
690
852
  color: #fff;
691
853
  }
692
854
  .btn-link {
693
855
  font-weight: 400;
694
- color: ${C("--color-primary")};
856
+ color: ${O("--color-primary")};
695
857
  text-decoration: underline;
696
858
  }
697
859
  .btn-link:hover {
698
- color: ${C("--color-primary-hover")};
860
+ color: ${O("--color-primary-hover")};
699
861
  }
700
862
  .wui-consent-banner-settings-toggle {
701
863
  margin-inline-end: auto;
@@ -715,7 +877,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
715
877
  max-width: none;
716
878
  }
717
879
  }
718
- `, w = "wui-consent-save", T = "[data-consent-settings]", E = {
880
+ `, re = "wui-consent-save", ie = "[data-consent-settings]", k = {
719
881
  heading: "Cookies on this site",
720
882
  description: "We use cookies to understand how the site is used and to measure our campaigns. You can change your choice at any time.",
721
883
  policyLabel: "Cookie policy",
@@ -731,11 +893,11 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
731
893
  rejectLabel: "Reject all",
732
894
  acceptLabel: "Accept all",
733
895
  saveLabel: "Save preferences"
734
- }, te = [
896
+ }, ae = [
735
897
  "analytics",
736
898
  "functional",
737
899
  "marketing"
738
- ], ne = 0, re = class extends e {
900
+ ], oe = 0, se = class extends e {
739
901
  static get observedAttributes() {
740
902
  return [
741
903
  "heading",
@@ -748,12 +910,12 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
748
910
  ];
749
911
  }
750
912
  constructor() {
751
- super(), ne += 1, this._uid = `wui-consent-${ne}`, this._preferences = {
913
+ super(), oe += 1, this._uid = `wui-consent-${oe}`, this._preferences = {
752
914
  analytics: !1,
753
915
  functional: !1,
754
916
  marketing: !1
755
917
  }, this._settings = !1, this._onDocumentClick = (e) => {
756
- e.target instanceof Element && e.target.closest(T) && (e.preventDefault(), this.open({
918
+ e.target instanceof Element && e.target.closest(ie) && (e.preventDefault(), this.open({
757
919
  settings: !0,
758
920
  focus: !0
759
921
  }));
@@ -772,13 +934,13 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
772
934
  this.toggleAttribute("standalone", e === !0 || e === "" || e === "true");
773
935
  }
774
936
  get heading() {
775
- return this.getAttribute("heading") || E.heading;
937
+ return this.getAttribute("heading") || k.heading;
776
938
  }
777
939
  set heading(e) {
778
940
  this.setAttribute("heading", String(e ?? ""));
779
941
  }
780
942
  get description() {
781
- return this.getAttribute("description") || E.description;
943
+ return this.getAttribute("description") || k.description;
782
944
  }
783
945
  set description(e) {
784
946
  this.setAttribute("description", String(e ?? ""));
@@ -790,25 +952,25 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
790
952
  this.setAttribute("policy-href", String(e ?? ""));
791
953
  }
792
954
  get policyLabel() {
793
- return this.getAttribute("policy-label") || E.policyLabel;
955
+ return this.getAttribute("policy-label") || k.policyLabel;
794
956
  }
795
957
  set policyLabel(e) {
796
958
  this.setAttribute("policy-label", String(e ?? ""));
797
959
  }
798
960
  get analyticsDescription() {
799
- return this.getAttribute("analytics-description") || E.analyticsDescription;
961
+ return this.getAttribute("analytics-description") || k.analyticsDescription;
800
962
  }
801
963
  set analyticsDescription(e) {
802
964
  this.setAttribute("analytics-description", String(e ?? ""));
803
965
  }
804
966
  get functionalDescription() {
805
- return this.getAttribute("functional-description") || E.functionalDescription;
967
+ return this.getAttribute("functional-description") || k.functionalDescription;
806
968
  }
807
969
  set functionalDescription(e) {
808
970
  this.setAttribute("functional-description", String(e ?? ""));
809
971
  }
810
972
  get marketingDescription() {
811
- return this.getAttribute("marketing-description") || E.marketingDescription;
973
+ return this.getAttribute("marketing-description") || k.marketingDescription;
812
974
  }
813
975
  set marketingDescription(e) {
814
976
  this.setAttribute("marketing-description", String(e ?? ""));
@@ -836,22 +998,22 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
836
998
  this._rendered && this.render();
837
999
  }
838
1000
  render() {
839
- let e = this.isOpen, t = this._uid, n = this.policyHref ? ` <a class="wui-consent-banner-policy" href="${ie(this.policyHref)}">${O(this.policyLabel)}</a>` : "", r = this._root();
840
- r.innerHTML = `${r === this ? "" : `<style>${ee}</style>`}
1001
+ let e = this.isOpen, t = this._uid, n = this.policyHref ? ` <a class="wui-consent-banner-policy" href="${ce(this.policyHref)}">${j(this.policyLabel)}</a>` : "", r = this._root();
1002
+ r.innerHTML = `${r === this ? "" : `<style>${ne}</style>`}
841
1003
  <div class="wui-consent-banner-panel" role="dialog" aria-labelledby="${t}-heading" aria-describedby="${t}-description" hidden>
842
- <h2 class="wui-consent-banner-heading" id="${t}-heading">${O(this.heading)}</h2>
843
- <p class="wui-consent-banner-description" id="${t}-description">${O(this.description)}${n}</p>
1004
+ <h2 class="wui-consent-banner-heading" id="${t}-heading">${j(this.heading)}</h2>
1005
+ <p class="wui-consent-banner-description" id="${t}-description">${j(this.description)}${n}</p>
844
1006
  <div class="wui-consent-banner-settings" hidden>
845
- ${D(t, "essential", E.essentialLabel, E.essentialDescription, !0)}
846
- ${D(t, "analytics", E.analyticsLabel, this.analyticsDescription, !1)}
847
- ${D(t, "functional", E.functionalLabel, this.functionalDescription, !1)}
848
- ${D(t, "marketing", E.marketingLabel, this.marketingDescription, !1)}
1007
+ ${A(t, "essential", k.essentialLabel, k.essentialDescription, !0)}
1008
+ ${A(t, "analytics", k.analyticsLabel, this.analyticsDescription, !1)}
1009
+ ${A(t, "functional", k.functionalLabel, this.functionalDescription, !1)}
1010
+ ${A(t, "marketing", k.marketingLabel, this.marketingDescription, !1)}
849
1011
  </div>
850
1012
  <div class="wui-consent-banner-actions">
851
- <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${E.settingsLabel}</button>
852
- <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${E.rejectLabel}</button>
853
- <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${E.acceptLabel}</button>
854
- <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${E.saveLabel}</button>
1013
+ <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${k.settingsLabel}</button>
1014
+ <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${k.rejectLabel}</button>
1015
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${k.acceptLabel}</button>
1016
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${k.saveLabel}</button>
855
1017
  </div>
856
1018
  </div>`, this._rendered = !0, this._wire(), this._applyPreferences(), this._showSettings(this._settings), e && (this._panel().hidden = !1);
857
1019
  }
@@ -881,7 +1043,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
881
1043
  })), e.querySelector(".wui-consent-banner-save")?.addEventListener("click", () => this._save(this._switchValues())), e.querySelector(".wui-consent-banner-settings-toggle")?.addEventListener("click", () => this._showSettings(!this._settings));
882
1044
  }
883
1045
  _save(e) {
884
- this._preferences = { ...e }, this.dispatchEvent(new CustomEvent(w, {
1046
+ this._preferences = { ...e }, this.dispatchEvent(new CustomEvent(re, {
885
1047
  bubbles: !0,
886
1048
  composed: !0,
887
1049
  detail: { ...e }
@@ -889,11 +1051,11 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
889
1051
  }
890
1052
  _switchValues() {
891
1053
  let e = {};
892
- for (let t of te) e[t] = this._root().querySelector(`input[data-category="${t}"]`)?.checked === !0;
1054
+ for (let t of ae) e[t] = this._root().querySelector(`input[data-category="${t}"]`)?.checked === !0;
893
1055
  return e;
894
1056
  }
895
1057
  _applyPreferences() {
896
- for (let e of te) {
1058
+ for (let e of ae) {
897
1059
  let t = this._root().querySelector(`input[data-category="${e}"]`);
898
1060
  t && (t.checked = this._preferences[e]);
899
1061
  }
@@ -911,1190 +1073,17 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
911
1073
  }
912
1074
  }
913
1075
  };
914
- function D(e, t, n, r, i) {
1076
+ function A(e, t, n, r, i) {
915
1077
  let a = `${e}-${t}`;
916
1078
  return `<div class="wui-consent-banner-category">
917
1079
  <div class="form-check form-switch">
918
1080
  <input class="form-check-input" type="checkbox" role="switch" id="${a}" data-category="${t}"${i ? " checked disabled" : ""} />
919
- <label class="form-check-label" for="${a}">${O(n)}</label>
1081
+ <label class="form-check-label" for="${a}">${j(n)}</label>
920
1082
  </div>
921
- <p class="wui-consent-banner-category-description">${O(r)}</p>
1083
+ <p class="wui-consent-banner-category-description">${j(r)}</p>
922
1084
  </div>`;
923
1085
  }
924
- var O = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ie = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), k = [
925
- "January",
926
- "February",
927
- "March",
928
- "April",
929
- "May",
930
- "June",
931
- "July",
932
- "August",
933
- "September",
934
- "October",
935
- "November",
936
- "December"
937
- ], A = [
938
- "Su",
939
- "Mo",
940
- "Tu",
941
- "We",
942
- "Th",
943
- "Fr",
944
- "Sa"
945
- ], ae = (e) => String(e).padStart(2, "0"), j = (e, t, n) => `${e}-${ae(t + 1)}-${ae(n)}`, M = (e) => {
946
- let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
947
- return t ? {
948
- y: +t[1],
949
- m: t[2] - 1,
950
- d: +t[3]
951
- } : null;
952
- }, N = (e) => {
953
- let t = M(e);
954
- return t ? `${ae(t.d)} ${k[t.m].slice(0, 3)} ${t.y}` : "";
955
- }, P = (e, t) => new Date(e, t + 1, 0).getDate(), F = (e, t) => {
956
- for (; t < 0;) t += 12, --e;
957
- for (; t > 11;) t -= 12, e += 1;
958
- return {
959
- y: e,
960
- m: t
961
- };
962
- }, oe = class extends e {
963
- static formAssociated = !0;
964
- static get observedAttributes() {
965
- return [
966
- "value",
967
- "min",
968
- "max",
969
- "placeholder",
970
- "disabled",
971
- "first-day",
972
- "size",
973
- "aria-label",
974
- "aria-describedby",
975
- "aria-invalid"
976
- ];
977
- }
978
- constructor() {
979
- super();
980
- try {
981
- this._internals = this.attachInternals();
982
- } catch {
983
- this._internals = null;
984
- }
985
- this._value = "";
986
- let e = new Date(2e3, 0, 1);
987
- this._viewY = e.getFullYear(), this._viewM = e.getMonth(), this._mode = "days", this._focus = null, this._slide = "";
988
- }
989
- connectedCallback() {
990
- if (!this._rendered) {
991
- this.render();
992
- return;
993
- }
994
- this._bindGlobal?.();
995
- }
996
- attributeChangedCallback(e, t, n) {
997
- if (e === "aria-invalid") {
998
- this._syncInvalid();
999
- return;
1000
- }
1001
- this._rendered && (e === "value" ? (this._value = n || "", this._syncFormValue(), this._syncTrigger()) : e === "first-day" ? this.querySelector(".datepicker-pop")?.hidden || this._renderView() : this.render());
1002
- }
1003
- _syncInvalid() {
1004
- let e = this.querySelector(".datepicker-trigger");
1005
- e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
1006
- }
1007
- formResetCallback() {
1008
- this.value = this._defaultValue || "";
1009
- }
1010
- get value() {
1011
- return this._value;
1012
- }
1013
- set value(e) {
1014
- this._value = e || "", d(this, this._value), this._syncTrigger();
1015
- }
1016
- _firstDay() {
1017
- let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
1018
- return Number.isInteger(e) && e >= 0 && e <= 6 ? e : 0;
1019
- }
1020
- render() {
1021
- this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
1022
- let e = this.getAttribute("placeholder") || "Enter Date", t = M(this._value);
1023
- t && (this._viewY = t.y, this._viewM = t.m);
1024
- let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "", i = this.getAttribute("aria-label"), a = this.getAttribute("aria-describedby");
1025
- this.innerHTML = `
1026
- <div class="datepicker">
1027
- <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${g(i)}"` : ""}${a ? ` aria-describedby="${g(a)}"` : ""}>
1028
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? N(this._value) : g(e)}</span>
1029
- ${p("calendar-dots")}
1030
- </button>
1031
- <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
1032
- </div>`, this._rendered = !0, d(this, this._value), this._wire();
1033
- }
1034
- _syncFormValue() {
1035
- d(this, this._value);
1036
- }
1037
- _syncTrigger() {
1038
- let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
1039
- if (!t) return;
1040
- let n = M(this._value);
1041
- t.textContent = n ? N(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
1042
- }
1043
- _limits() {
1044
- let e = M(this.getAttribute("min")), t = M(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
1045
- return {
1046
- dayDisabled: (e, t, i) => {
1047
- let a = new Date(e, t, i).getTime();
1048
- return a < n || a > r;
1049
- },
1050
- monthDisabled: (e, t) => {
1051
- let i = new Date(e, t, 1).getTime();
1052
- return new Date(e, t, P(e, t)).getTime() < n || i > r;
1053
- },
1054
- yearDisabled: (e) => {
1055
- let t = new Date(e, 0, 1).getTime();
1056
- return new Date(e, 11, 31).getTime() < n || t > r;
1057
- }
1058
- };
1059
- }
1060
- _renderView() {
1061
- let e = this.querySelector(".datepicker-pop");
1062
- e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
1063
- }
1064
- _daysHtml() {
1065
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = P(this._viewY, this._viewM), r = M(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
1066
- y: this._viewY,
1067
- m: this._viewM,
1068
- d: 1
1069
- }, s = (e, t, n, s) => {
1070
- let c = j(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
1071
- return `<button type="button" class="${[
1072
- "datepicker-day",
1073
- s ? "is-outside" : "",
1074
- u ? "is-today" : "",
1075
- l ? "is-selected" : ""
1076
- ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
1077
- }, c = "", l = F(this._viewY, this._viewM - 1), u = P(l.y, l.m);
1078
- for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
1079
- for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
1080
- let d = F(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
1081
- for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
1082
- let m = A.map((t, n) => A[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
1083
- return `
1084
- <div class="datepicker-head">
1085
- <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${p("chevron-left")}</button>
1086
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${k[this._viewM]} ${this._viewY}</button>
1087
- <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${p("chevron-right")}</button>
1088
- </div>
1089
- <div class="datepicker-weekdays">${m}</div>
1090
- <div class="datepicker-grid${this._slide ? ` ${this._slide}` : ""}" role="grid">${c}</div>
1091
- <div class="datepicker-foot">
1092
- <button type="button" class="datepicker-link" data-today>Today</button>
1093
- <button type="button" class="datepicker-link" data-clear>Clear</button>
1094
- </div>`;
1095
- }
1096
- _monthsHtml() {
1097
- let e = M(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
1098
- for (let i = 0; i < 12; i++) {
1099
- let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
1100
- "datepicker-cell",
1101
- o ? "is-today" : "",
1102
- a ? "is-selected" : ""
1103
- ].filter(Boolean).join(" ");
1104
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${k[i].slice(0, 3)}</button>`;
1105
- }
1106
- return `
1107
- <div class="datepicker-head">
1108
- <button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${p("chevron-left")}</button>
1109
- <button type="button" class="datepicker-month" data-view="years" aria-label="Choose year">${this._viewY}</button>
1110
- <button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${p("chevron-right")}</button>
1111
- </div>
1112
- <div class="datepicker-cells">${r}</div>`;
1113
- }
1114
- _yearsHtml() {
1115
- let e = M(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
1116
- for (let a = 0; a < 12; a++) {
1117
- let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
1118
- "datepicker-cell",
1119
- c ? "is-today" : "",
1120
- s ? "is-selected" : ""
1121
- ].filter(Boolean).join(" ");
1122
- i += `<button type="button" class="${u}" data-year="${o}"${l ? " disabled" : ""}>${o}</button>`;
1123
- }
1124
- return `
1125
- <div class="datepicker-head">
1126
- <button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${p("chevron-left")}</button>
1127
- <span class="datepicker-month">${r + 1} – ${r + 10}</span>
1128
- <button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${p("chevron-right")}</button>
1129
- </div>
1130
- <div class="datepicker-cells">${i}</div>`;
1131
- }
1132
- _focusActive() {
1133
- let e = this.querySelector(".datepicker-pop"), t = e?.querySelector("[tabindex=\"0\"]") || e?.querySelector(".is-selected") || e?.querySelector(".datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)");
1134
- t && e.contains(document.activeElement) && t.focus();
1135
- }
1136
- _position(e, t) {
1137
- s(e, t, { clampHeight: !0 });
1138
- }
1139
- _setFocus(e, t, n, r) {
1140
- let { y: i, m: a } = F(e, t);
1141
- this._focus = {
1142
- y: i,
1143
- m: a,
1144
- d: n
1145
- };
1146
- let o = i !== this._viewY || a !== this._viewM;
1147
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${j(i, a, n)}"]`)?.focus();
1148
- }
1149
- _onKey(e) {
1150
- if (this._mode !== "days") {
1151
- e.key === "Escape" && this._close();
1152
- return;
1153
- }
1154
- let t = this._focus || M(this._value) || {
1155
- y: this._viewY,
1156
- m: this._viewM,
1157
- d: 1
1158
- }, n = (n, r) => {
1159
- e.preventDefault();
1160
- let i = new Date(t.y, t.m, t.d + n);
1161
- this._setFocus(i.getFullYear(), i.getMonth(), i.getDate(), r);
1162
- };
1163
- switch (e.key) {
1164
- case "ArrowLeft": return n(-1, "slide-prev");
1165
- case "ArrowRight": return n(1, "slide-next");
1166
- case "ArrowUp": return n(-7, "slide-prev");
1167
- case "ArrowDown": return n(7, "slide-next");
1168
- case "Home": return n(-((new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7), "slide-prev");
1169
- case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
1170
- case "PageUp": {
1171
- e.preventDefault();
1172
- let n = F(t.y, t.m - (e.shiftKey ? 12 : 1));
1173
- return this._setFocus(n.y, n.m, Math.min(t.d, P(n.y, n.m)), "slide-prev");
1174
- }
1175
- case "PageDown": {
1176
- e.preventDefault();
1177
- let n = F(t.y, t.m + (e.shiftKey ? 12 : 1));
1178
- return this._setFocus(n.y, n.m, Math.min(t.d, P(n.y, n.m)), "slide-next");
1179
- }
1180
- case "Enter":
1181
- case " ":
1182
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = j(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
1183
- return;
1184
- case "Escape": return this._close();
1185
- default:
1186
- }
1187
- }
1188
- _wire() {
1189
- this._teardown();
1190
- let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop"), n = this.querySelector(".datepicker");
1191
- if (!e || !t) return;
1192
- let r = () => !t.hidden;
1193
- this._open = () => {
1194
- let r = /* @__PURE__ */ new Date(), i = M(this._value);
1195
- (i || !this._viewNavigated) && (this._viewY = r.getFullYear(), this._viewM = r.getMonth()), this._mode = "days";
1196
- let a = r.getFullYear() === this._viewY && r.getMonth() === this._viewM, o = i && i.y === this._viewY && i.m === this._viewM;
1197
- this._focus = o ? i : {
1198
- y: this._viewY,
1199
- m: this._viewM,
1200
- d: a ? r.getDate() : 1
1201
- }, this._renderView(), t.hidden = !1, n?.classList.add("open"), this._position(e, t), e.setAttribute("aria-expanded", "true"), t.querySelector("[tabindex=\"0\"]")?.focus();
1202
- }, this._close = () => {
1203
- t.hidden = !0, n?.classList.remove("open"), e.setAttribute("aria-expanded", "false"), e.focus();
1204
- }, e.addEventListener("click", () => r() ? this._close() : this._open()), t.addEventListener("click", (e) => {
1205
- this._popClick = !0;
1206
- let t = e.target.closest("[data-nav]");
1207
- if (t) {
1208
- this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
1209
- let e = F(this._viewY, this._viewM + Number(t.dataset.nav));
1210
- this._viewY = e.y, this._viewM = e.m, this._focus = {
1211
- y: e.y,
1212
- m: e.m,
1213
- d: 1
1214
- }, this._renderView(), this._slide = "";
1215
- return;
1216
- }
1217
- let n = e.target.closest("[data-nav-year]");
1218
- if (n) {
1219
- this._viewY += Number(n.dataset.navYear), this._renderView();
1220
- return;
1221
- }
1222
- let r = e.target.closest("[data-nav-decade]");
1223
- if (r) {
1224
- this._viewY += Number(r.dataset.navDecade) * 10, this._renderView();
1225
- return;
1226
- }
1227
- let i = e.target.closest("[data-view]");
1228
- if (i) {
1229
- this._mode = i.dataset.view, this._renderView();
1230
- return;
1231
- }
1232
- let a = e.target.closest("[data-month]");
1233
- if (a && !a.disabled) {
1234
- this._viewNavigated = !0, this._viewM = Number(a.dataset.month), this._mode = "days", this._focus = {
1235
- y: this._viewY,
1236
- m: this._viewM,
1237
- d: 1
1238
- }, this._renderView();
1239
- return;
1240
- }
1241
- let o = e.target.closest("[data-year]");
1242
- if (o && !o.disabled) {
1243
- this._viewNavigated = !0, this._viewY = Number(o.dataset.year), this._mode = "months", this._renderView();
1244
- return;
1245
- }
1246
- if (e.target.closest("[data-today]")) {
1247
- let e = /* @__PURE__ */ new Date();
1248
- this.value = j(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
1249
- return;
1250
- }
1251
- if (e.target.closest("[data-clear]")) {
1252
- this.value = "", this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
1253
- return;
1254
- }
1255
- let s = e.target.closest(".datepicker-day[data-iso]");
1256
- s && !s.disabled && (this.value = s.dataset.iso, this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
1257
- }), this._onKeyBound = (e) => {
1258
- r() && this._onKey(e);
1259
- }, t.addEventListener("keydown", this._onKeyBound), this._bindGlobal = () => {
1260
- this._teardown(), this._onDocClick = (e) => {
1261
- let t = this._popClick;
1262
- this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
1263
- }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
1264
- r() && e.key === "Escape" && this._close();
1265
- }, document.addEventListener("keydown", this._onDocKey), c(this, () => {
1266
- r() && this._position(e, t);
1267
- });
1268
- }, this._bindGlobal(), this._syncFormValue();
1269
- }
1270
- _teardown() {
1271
- this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), l(this);
1272
- }
1273
- disconnectedCallback() {
1274
- this._teardown();
1275
- }
1276
- }, se = class extends e {
1277
- static formAssociated = !0;
1278
- static get observedAttributes() {
1279
- return [
1280
- "start",
1281
- "end",
1282
- "min",
1283
- "max",
1284
- "placeholder",
1285
- "disabled",
1286
- "first-day",
1287
- "size",
1288
- "aria-label",
1289
- "aria-describedby",
1290
- "name",
1291
- "start-name",
1292
- "end-name",
1293
- "aria-invalid"
1294
- ];
1295
- }
1296
- constructor() {
1297
- super();
1298
- try {
1299
- this._internals = this.attachInternals();
1300
- } catch {
1301
- this._internals = null;
1302
- }
1303
- this._start = "", this._end = "", this._hover = "";
1304
- let e = new Date(2e3, 0, 1);
1305
- this._viewY = e.getFullYear(), this._viewM = e.getMonth();
1306
- }
1307
- connectedCallback() {
1308
- if (!this._rendered) {
1309
- this.render();
1310
- return;
1311
- }
1312
- this._bindGlobal?.();
1313
- }
1314
- attributeChangedCallback(e, t, n) {
1315
- if (e === "aria-invalid") {
1316
- this._syncInvalid();
1317
- return;
1318
- }
1319
- this._rendered && (e === "start" || e === "end" ? (this._start = this.getAttribute("start") || "", this._end = this.getAttribute("end") || "", this._syncTrigger(), this._syncMirrors()) : this.render());
1320
- }
1321
- _syncInvalid() {
1322
- let e = this.querySelector(".daterange-trigger");
1323
- e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
1324
- }
1325
- get value() {
1326
- return {
1327
- start: this._start,
1328
- end: this._end
1329
- };
1330
- }
1331
- set value(e) {
1332
- this._start = e?.start || "", this._end = e?.end || "", this._syncTrigger(), this._syncMirrors();
1333
- }
1334
- _firstDay() {
1335
- let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
1336
- return Number.isInteger(e) && e >= 0 && e <= 6 ? e : 0;
1337
- }
1338
- _label() {
1339
- let e = this.getAttribute("placeholder") || "Start – End";
1340
- return !this._start && !this._end ? {
1341
- text: e,
1342
- empty: !0
1343
- } : {
1344
- text: `${N(this._start) || "Start"} – ${N(this._end) || "End"}`,
1345
- empty: !1
1346
- };
1347
- }
1348
- render() {
1349
- this._defaultStart === void 0 && (this._defaultStart = this.getAttribute("start") || "", this._defaultEnd = this.getAttribute("end") || "", this._start = this._defaultStart || this._start, this._end = this._defaultEnd || this._end);
1350
- let e = M(this._start);
1351
- e && (this._viewY = e.y, this._viewM = e.m);
1352
- let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label(), a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
1353
- this.innerHTML = `
1354
- <div class="daterange">
1355
- <button type="button" class="input daterange-trigger${n}${i ? "" : " has-value"}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${g(a)}"` : ""}${o ? ` aria-describedby="${g(o)}"` : ""}>
1356
- <span data-range-label class="${i ? "search-select-placeholder" : ""}">${g(r)}</span>
1357
- ${p("calendar")}
1358
- </button>
1359
- <div class="daterange-pop" role="dialog" aria-modal="false" hidden></div>
1360
- </div>`, this._rendered = !0, this._syncMirrors(), this._wire();
1361
- }
1362
- formResetCallback() {
1363
- this.value = {
1364
- start: this._defaultStart || "",
1365
- end: this._defaultEnd || ""
1366
- };
1367
- }
1368
- _syncTrigger() {
1369
- let e = this.querySelector(".daterange-trigger"), t = this.querySelector("[data-range-label]");
1370
- if (!t) return;
1371
- let { text: n, empty: r } = this._label();
1372
- t.textContent = n, t.classList.toggle("search-select-placeholder", r), e?.classList.toggle("has-value", !r);
1373
- }
1374
- _syncMirrors() {
1375
- let e = this.getAttribute("start-name") || this.getAttribute("name"), t = this.getAttribute("end-name");
1376
- this._mirror("start", e, this._start), this._mirror("end", t, this._end);
1377
- }
1378
- _mirror(e, t, n) {
1379
- if (!t) return;
1380
- let r = this.querySelector(`input[type="hidden"][data-range-mirror="${e}"]`);
1381
- r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "", r.disabled = this.hasAttribute("disabled");
1382
- }
1383
- _limits() {
1384
- let e = M(this.getAttribute("min")), t = M(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
1385
- return (e, t, i) => {
1386
- let a = new Date(e, t, i).getTime();
1387
- return a < n || a > r;
1388
- };
1389
- }
1390
- _monthHtml(e, t) {
1391
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = P(e, t), a = this._limits(), o = A.map((e, t) => A[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
1392
- let i = j(e, t, n), o = a(e, t, n);
1393
- return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
1394
- }, c = "", l = F(e, t - 1), u = P(l.y, l.m);
1395
- for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
1396
- for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
1397
- let d = F(e, t + 1), f = (7 - (r + i) % 7) % 7;
1398
- for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
1399
- return `
1400
- <div class="daterange-cal">
1401
- <div class="datepicker-month-label">${k[t]} ${e}</div>
1402
- <div class="datepicker-weekdays">${o}</div>
1403
- <div class="datepicker-grid" role="grid">${c}</div>
1404
- </div>`;
1405
- }
1406
- _renderView() {
1407
- let e = this.querySelector(".daterange-pop");
1408
- if (!e) return;
1409
- let t = F(this._viewY, this._viewM + 1);
1410
- e.innerHTML = `
1411
- <div class="daterange-head">
1412
- <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${p("chevron-left")}</button>
1413
- <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${p("chevron-right")}</button>
1414
- </div>
1415
- <div class="daterange-cals">
1416
- ${this._monthHtml(this._viewY, this._viewM)}
1417
- ${this._monthHtml(t.y, t.m)}
1418
- </div>
1419
- <div class="datepicker-foot">
1420
- <span class="daterange-hint" data-range-hint></span>
1421
- <button type="button" class="datepicker-link" data-clear>Clear</button>
1422
- </div>`, this._paint();
1423
- }
1424
- _paint() {
1425
- let e = this.querySelector(".daterange-pop");
1426
- if (!e) return;
1427
- let t = this._start ? new Date(this._start).getTime() : null, n = this._end;
1428
- t && !this._end && this._hover && new Date(this._hover).getTime() >= t && (n = this._hover);
1429
- let r = n ? new Date(n).getTime() : null;
1430
- for (let n of e.querySelectorAll(".datepicker-day[data-iso]")) {
1431
- let e = new Date(n.dataset.iso).getTime(), i = t != null && e === t, a = r != null && e === r, o = t != null && r != null && e > t && e < r;
1432
- n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
1433
- }
1434
- let i = e.querySelector("[data-range-hint]");
1435
- i && (i.textContent = this._start ? this._end ? `${N(this._start)} – ${N(this._end)}` : "Pick an end date" : "Pick a start date");
1436
- }
1437
- _position(e, t) {
1438
- s(e, t, { clampHeight: !0 });
1439
- }
1440
- _pick(e) {
1441
- if (!this._start || this._start && this._end) {
1442
- this._start = e, this._end = "", this._hover = "", this._syncTrigger(), this._syncMirrors(), this._paint();
1443
- return;
1444
- }
1445
- if (new Date(e).getTime() < new Date(this._start).getTime()) {
1446
- this._start = e, this._syncTrigger(), this._syncMirrors(), this._paint(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1447
- return;
1448
- }
1449
- this._end = e, this._syncTrigger(), this._syncMirrors(), this._paint(), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
1450
- }
1451
- _wire() {
1452
- this._teardown();
1453
- let e = this.querySelector(".daterange-trigger"), t = this.querySelector(".daterange-pop"), n = this.querySelector(".daterange");
1454
- if (!e || !t) return;
1455
- let r = () => !t.hidden;
1456
- this._open = () => {
1457
- let r = M(this._start);
1458
- if (r) this._viewY = r.y, this._viewM = r.m;
1459
- else {
1460
- let e = /* @__PURE__ */ new Date();
1461
- this._viewY = e.getFullYear(), this._viewM = e.getMonth();
1462
- }
1463
- this._renderView(), t.hidden = !1, n?.classList.add("open"), this._position(e, t), e.setAttribute("aria-expanded", "true");
1464
- }, this._close = () => {
1465
- t.hidden = !0, this._hover = "", n?.classList.remove("open"), e.setAttribute("aria-expanded", "false");
1466
- }, e.addEventListener("click", () => r() ? this._close() : this._open()), t.addEventListener("click", (e) => {
1467
- this._popClick = !0;
1468
- let t = e.target.closest("[data-nav]");
1469
- if (t) {
1470
- let e = F(this._viewY, this._viewM + Number(t.dataset.nav));
1471
- this._viewY = e.y, this._viewM = e.m, this._renderView();
1472
- return;
1473
- }
1474
- if (e.target.closest("[data-clear]")) {
1475
- this._start = "", this._end = "", this._hover = "", this._syncTrigger(), this._syncMirrors(), this._renderView(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1476
- return;
1477
- }
1478
- let n = e.target.closest(".datepicker-day[data-iso]");
1479
- n && !n.disabled && this._pick(n.dataset.iso);
1480
- }), t.addEventListener("mouseover", (e) => {
1481
- let t = e.target.closest(".datepicker-day[data-iso]");
1482
- t && this._start && !this._end && (this._hover = t.dataset.iso, this._paint());
1483
- }), this._bindGlobal = () => {
1484
- this._teardown(), this._onDocClick = (e) => {
1485
- let t = this._popClick;
1486
- this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
1487
- }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
1488
- r() && e.key === "Escape" && this._close();
1489
- }, document.addEventListener("keydown", this._onDocKey), c(this, () => {
1490
- r() && this._position(e, t);
1491
- });
1492
- }, this._bindGlobal(), this._syncMirrors();
1493
- }
1494
- _teardown() {
1495
- this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), l(this);
1496
- }
1497
- disconnectedCallback() {
1498
- this._teardown();
1499
- }
1500
- }, ce = class extends e {
1501
- static get observedAttributes() {
1502
- return [
1503
- "static",
1504
- "max-scale",
1505
- "radius"
1506
- ];
1507
- }
1508
- constructor() {
1509
- super(), this._pointerMoveListener = null, this._pointerLeaveListener = null, this._frame = 0, this._pointerX = 0;
1510
- }
1511
- connectedCallback() {
1512
- this._wire();
1513
- }
1514
- disconnectedCallback() {
1515
- this._teardown();
1516
- }
1517
- attributeChangedCallback(e, t, n) {
1518
- e === "static" && this.isConnected && this._wire();
1519
- }
1520
- _maxScale() {
1521
- return le(this.getAttribute("max-scale"), 1.6);
1522
- }
1523
- _radius() {
1524
- return le(this.getAttribute("radius"), 100);
1525
- }
1526
- _magnifyEnabled() {
1527
- return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
1528
- }
1529
- _applyMagnification() {
1530
- this._frame = 0;
1531
- let e = this._maxScale(), t = this._radius();
1532
- for (let n of this.querySelectorAll(".dock-item")) {
1533
- let r = n.getBoundingClientRect(), i = Math.abs(this._pointerX - (r.left + r.width / 2)), a = Math.max(0, 1 - i / t), o = 1 + (e - 1) * a;
1534
- n.style.setProperty("--wui-dock-mag", o.toFixed(3));
1535
- }
1536
- }
1537
- _resetMagnification() {
1538
- this._frame &&= (cancelAnimationFrame(this._frame), 0);
1539
- for (let e of this.querySelectorAll(".dock-item")) e.style.removeProperty("--wui-dock-mag");
1540
- }
1541
- _wire() {
1542
- this._teardown(), this._magnifyEnabled() && (this._pointerMoveListener = (e) => {
1543
- this._pointerX = e.clientX, this._frame ||= requestAnimationFrame(() => this._applyMagnification());
1544
- }, this._pointerLeaveListener = () => this._resetMagnification(), this.addEventListener("pointermove", this._pointerMoveListener), this.addEventListener("pointerleave", this._pointerLeaveListener));
1545
- }
1546
- _teardown() {
1547
- this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
1548
- }
1549
- }, le = (e, t) => {
1550
- let n = Number.parseFloat(e);
1551
- return Number.isFinite(n) ? n : t;
1552
- }, ue = {
1553
- enter: "Enter",
1554
- comma: ",",
1555
- space: " ",
1556
- tab: "Tab"
1557
- }, de = {
1558
- enter: "\n",
1559
- comma: ",",
1560
- space: " ",
1561
- tab: " "
1562
- }, fe = (e) => ue[e], pe = (e) => de[e];
1563
- function me(e, t) {
1564
- let n = [String(e ?? "")];
1565
- for (let e of t) n = n.flatMap((t) => t.split(e));
1566
- return n.map((e) => e.trim()).filter(Boolean);
1567
- }
1568
- var I = (e, t) => t.some((t) => String(e ?? "").includes(t)), he = class extends e {
1569
- static formAssociated = !0;
1570
- _accessibleName() {
1571
- return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
1572
- }
1573
- static get observedAttributes() {
1574
- return [
1575
- "placeholder",
1576
- "search-placeholder",
1577
- "searchable",
1578
- "disabled",
1579
- "icon",
1580
- "size",
1581
- "collapse-chips",
1582
- "aria-label",
1583
- "aria-invalid",
1584
- "allow-custom",
1585
- "custom-pattern",
1586
- "custom-invalid-message"
1587
- ];
1588
- }
1589
- constructor() {
1590
- super(), this._values = [], this._optionsProp = null, this._active = -1, this._typeahead = "", this._typeaheadTimer = null, this._customError = "";
1591
- try {
1592
- this._internals = this.attachInternals();
1593
- } catch {
1594
- this._internals = null;
1595
- }
1596
- }
1597
- connectedCallback() {
1598
- if (!this._rendered) {
1599
- if (!this._valuesInit && !this._optionsProp && !this._values.length) {
1600
- let e = this.getAttribute("value");
1601
- if (e != null && e !== "") this._values = e.split(",").map((e) => e.trim()).filter(Boolean);
1602
- else {
1603
- let e = [...this.querySelectorAll(":scope > wui-option[selected]")].map((e) => e.getAttribute("value") ?? e.textContent.trim());
1604
- e.length && (this._values = e.map(String));
1605
- }
1606
- }
1607
- this._valuesInit = !0, this._defaultCaptured ||= (this._defaultValues = this._values.slice(), !0), this.render();
1608
- return;
1609
- }
1610
- this._bindGlobal?.();
1611
- }
1612
- formResetCallback() {
1613
- this.values = (this._defaultValues || []).slice();
1614
- let e = this.querySelector("[data-input]");
1615
- e && (e.value = ""), this._setCustomError("");
1616
- }
1617
- attributeChangedCallback(e) {
1618
- if (e === "aria-invalid") {
1619
- this._syncInvalid();
1620
- return;
1621
- }
1622
- e === "custom-pattern" || e === "custom-invalid-message" || this._rendered && this.render();
1623
- }
1624
- _syncInvalid() {
1625
- let e = this.querySelector(".search-select-control");
1626
- e && (this.hasAttribute("aria-invalid") || this._customError ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
1627
- }
1628
- get values() {
1629
- return this._values.slice();
1630
- }
1631
- set values(e) {
1632
- this._values = Array.isArray(e) ? e.map(String) : [], d(this, this._values.join(",")), this._rendered && (this._renderControl(), this._renderOptions(this._query()));
1633
- }
1634
- set options(e) {
1635
- if (this._optionsProp = Array.isArray(e) ? e : null, this._rendered && this._allowCustom) {
1636
- this._renderControl(), this._renderOptions(this._query());
1637
- return;
1638
- }
1639
- this.isConnected && this.render();
1640
- }
1641
- get options() {
1642
- return this._readOptions();
1643
- }
1644
- get validateCustom() {
1645
- return this._validateCustom ?? null;
1646
- }
1647
- set validateCustom(e) {
1648
- this._validateCustom = typeof e == "function" ? e : null;
1649
- }
1650
- get _allowCustom() {
1651
- return this.hasAttribute("allow-custom");
1652
- }
1653
- _query() {
1654
- let e = this.querySelector(this._allowCustom ? "[data-input]" : ".search-select-input");
1655
- return e ? e.value : "";
1656
- }
1657
- _snapshotDeclared() {
1658
- if (this._declared) return;
1659
- let e = [...this.querySelectorAll(":scope > wui-option")];
1660
- e.length && (this._declared = e.map((e) => {
1661
- let t = {
1662
- value: e.getAttribute("value") ?? e.textContent.trim(),
1663
- label: e.innerHTML,
1664
- icon: e.getAttribute("icon") || void 0,
1665
- [h]: !0,
1666
- selected: e.hasAttribute("selected")
1667
- };
1668
- for (let [n, r] of ge) {
1669
- let i = e.getAttribute(n);
1670
- i && (t[r] = i);
1671
- }
1672
- return e.hasAttribute("disabled") && (t.disabled = !0), t;
1673
- }));
1674
- }
1675
- _readOptions() {
1676
- return this._optionsProp ? this._optionsProp : (this._snapshotDeclared(), this._declared || []);
1677
- }
1678
- _labelFor(e) {
1679
- let t = this._readOptions().find((t) => String(t.value) === String(e));
1680
- return t ? t.label : e;
1681
- }
1682
- _labelHtmlFor(e) {
1683
- let t = this._readOptions().find((t) => String(t.value) === String(e));
1684
- return t ? v(t) : g(e);
1685
- }
1686
- render() {
1687
- this._snapshotDeclared();
1688
- let e = this._allowCustom, t = this.hasAttribute("searchable") && !e, n = this.getAttribute("search-placeholder") || "Search…", r = this.getAttribute("icon"), i = this.getAttribute("size"), a = i === "sm" ? " search-select-sm" : i === "lg" ? " search-select-lg" : "";
1689
- d(this, this._values.join(",")), this.id ||= `wui-multiselect-${Math.random().toString(36).slice(2, 9)}`;
1690
- let o = `${this.id}-listbox`;
1691
- this._listboxId = o;
1692
- let s = this.hasAttribute("disabled");
1693
- if (e) {
1694
- let e = `${this.id}-custom-error`;
1695
- this.innerHTML = `
1696
- <div class="search-select${a}">
1697
- <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : ""}>
1698
- ${r ? p(r, { className: "search-select-icon" }) : ""}
1699
- <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${z(o)}" aria-label="${z(this._accessibleName())}" aria-describedby="${z(e)}" autocomplete="off"${s ? " disabled" : ""} /></div>
1700
- ${p("chevron-down", { className: "search-select-caret" })}
1701
- </div>
1702
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${z(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1703
- <div class="search-select-options"></div>
1704
- </div>
1705
- </div>
1706
- <div class="field-error wui-ms-custom-error" id="${z(e)}" aria-live="polite" hidden></div>`;
1707
- } else this.innerHTML = `
1708
- <div class="search-select${a}">
1709
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${z(o)}" aria-label="${z(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
1710
- ${r ? p(r, { className: "search-select-icon" }) : ""}
1711
- <div class="ms-chips" data-chips></div>
1712
- ${p("chevron-down", { className: "search-select-caret" })}
1713
- </div>
1714
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${z(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1715
- ${t ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${z(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
1716
- <div class="search-select-options"></div>
1717
- <div class="search-select-empty" hidden>No matches</div>
1718
- </div>
1719
- </div>`;
1720
- this._rendered = !0, this._customError = "", d(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1721
- }
1722
- _renderControl() {
1723
- let e = this.querySelector("[data-chips]");
1724
- if (!e) return;
1725
- let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${z(e)}" aria-label="Remove ${z(B(this._labelFor(e)))}">${p("x")}</button></span>`).join("");
1726
- if (n) {
1727
- for (let t of [...e.querySelectorAll(":scope > .chip")]) t.remove();
1728
- n.insertAdjacentHTML("beforebegin", r), n.placeholder = this._values.length ? "" : t, this._collapseChips();
1729
- return;
1730
- }
1731
- if (!this._values.length) {
1732
- e.innerHTML = `<span class="search-select-placeholder">${g(t)}</span>`;
1733
- return;
1734
- }
1735
- e.innerHTML = r, this._collapseChips();
1736
- }
1737
- _collapseChips() {
1738
- let e = this.querySelector("[data-chips]");
1739
- if (!e || !this.hasAttribute("collapse-chips") || !this._values.length) return;
1740
- e.querySelector(".chip-more")?.remove();
1741
- let t = [...e.querySelectorAll(":scope > .chip:not(.chip-more)")];
1742
- for (let e of t) e.style.display = "";
1743
- if (!t.length) return;
1744
- let n = e.clientWidth, r = (e) => e.offsetLeft + e.offsetWidth;
1745
- if (r(t[t.length - 1]) <= n) return;
1746
- let i = document.createElement("span");
1747
- i.className = "chip chip-sm chip-more", i.textContent = `+${t.length}`, t[t.length - 1].after(i);
1748
- let a = i.offsetWidth + 6, o = 0;
1749
- for (let e of t) if (r(e) <= n - a) o += 1;
1750
- else break;
1751
- o < 1 && (o = 1);
1752
- for (let e = o; e < t.length; e += 1) t[e].style.display = "none";
1753
- i.textContent = `+${t.length - o}`;
1754
- }
1755
- _matches(e, t) {
1756
- return B(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
1757
- }
1758
- _optionNamed(e) {
1759
- let t = e.trim().toLowerCase();
1760
- return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || B(e.label).trim().toLowerCase() === t);
1761
- }
1762
- _renderOptions(e) {
1763
- let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1764
- if (!t) return;
1765
- let r = (e || "").trim(), i = r.toLowerCase(), a = this._readOptions();
1766
- i && (a = a.filter((e) => this._matches(e, i)));
1767
- let o = this._listboxId || `${this.id || "wui-multiselect"}-listbox`, s = this._allowCustom && r && !this._optionNamed(r), c = a.map((e, t) => {
1768
- let n = this._values.includes(String(e.value)), r = `${o}-opt-${t}`;
1769
- return _e(e) ? be(e, r, n) : `<button type="button" role="option" id="${z(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${z(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${v(e)}</span><span class="ms-check">${p("check")}</span></button>`;
1770
- });
1771
- s && c.push(`<button type="button" role="option" id="${z(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${z(r)}" data-custom="true" aria-selected="false">Add “${g(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
1772
- }
1773
- _combobox() {
1774
- return this._allowCustom ? this.querySelector("[data-input]") : this.querySelector(".search-select-control");
1775
- }
1776
- _setCustomError(e) {
1777
- this._customError = e || "";
1778
- let t = this.querySelector(".wui-ms-custom-error"), n = this.querySelector("[data-input]");
1779
- t && (t.textContent = this._customError, t.hidden = !this._customError), n && (this._customError ? n.setAttribute("aria-invalid", "true") : n.removeAttribute("aria-invalid")), this._syncInvalid();
1780
- }
1781
- _customRefusal(e) {
1782
- let t = this.getAttribute("custom-invalid-message") || "Enter a valid value.", n = this.getAttribute("custom-pattern");
1783
- if (n) {
1784
- let r = xe(n);
1785
- if (r && !r.test(e)) return t;
1786
- }
1787
- let r = this._validateCustom;
1788
- if (r) {
1789
- let n = r(e);
1790
- return n === !0 ? "" : typeof n == "string" && n ? n : t;
1791
- }
1792
- return "";
1793
- }
1794
- _commitTyped(e) {
1795
- let t = e.trim().replace(/,+$/, "").trim();
1796
- if (!t) return "";
1797
- let n = this._optionNamed(t), r;
1798
- if (n) {
1799
- if (n.disabled) return n.disabledHint || this.getAttribute("custom-invalid-message") || "That option is not available.";
1800
- r = String(n.value);
1801
- } else {
1802
- let e = this._customRefusal(t);
1803
- if (e) return e;
1804
- r = t;
1805
- }
1806
- let i = r.toLowerCase();
1807
- return this._values.some((e) => e.toLowerCase() === i) || (this._values = [...this._values, r]), "";
1808
- }
1809
- _wire() {
1810
- this._teardown();
1811
- let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options"), a = this._allowCustom, o = a ? this.querySelector("[data-input]") : null, l = o || e;
1812
- if (!e || !t) return;
1813
- let u = () => this.hasAttribute("disabled"), f = () => s(e, t, { matchWidth: !0 }), p = () => [...this.querySelectorAll(".search-select-option")], h = () => p().filter((e) => !e.hidden), g = (e) => {
1814
- let t = h();
1815
- this._active = e;
1816
- for (let e of p()) e.classList.remove("is-active");
1817
- e >= 0 && t[e] ? (t[e].classList.add("is-active"), t[e].scrollIntoView({ block: "nearest" }), l.setAttribute("aria-activedescendant", t[e].id)) : l.removeAttribute("aria-activedescendant");
1818
- }, _ = !1, v = () => a ? _ : !t.hidden, y = () => {
1819
- let n = _ && p().length > 0, r = t.hidden;
1820
- t.hidden = !n, l.setAttribute("aria-expanded", String(n)), e.classList.toggle("open", n), n && r && f();
1821
- };
1822
- this._syncCustomMenu = a ? y : null;
1823
- let b = () => {
1824
- if (!u()) {
1825
- if (a) {
1826
- _ = !0, y();
1827
- return;
1828
- }
1829
- t.hidden = !1, e.setAttribute("aria-expanded", "true"), e.classList.add("open"), f(), n && (n.value = "", this._renderOptions(""), n.focus());
1830
- }
1831
- }, x = () => {
1832
- a ? (_ = !1, y()) : (t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open")), g(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
1833
- }, S = () => {
1834
- d(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1835
- }, C = (e) => {
1836
- let t = String(e);
1837
- if (this._values.includes(t)) this._values = this._values.filter((e) => e !== t);
1838
- else if (a && this._values.some((e) => e.toLowerCase() === t.toLowerCase())) return;
1839
- else this._values = [...this._values, t];
1840
- this._renderControl(), this._renderOptions(this._query()), S();
1841
- }, ee = (e) => {
1842
- this._values = this._values.filter((t) => t !== String(e)), this._renderControl(), this._renderOptions(this._query()), S();
1843
- }, w = (e, { quiet: t = !1 } = {}) => {
1844
- let n = this._values.length, r = I(e, L) ? me(e, L) : [e], i = [], a = "";
1845
- for (let e of r) {
1846
- let t = this._commitTyped(e);
1847
- t && (i.push(e.trim()), a ||= t);
1848
- }
1849
- t && i.length || (o.value = i.join(", "), this._setCustomError(a), this._values.length !== n && (this._renderControl(), S()), this._renderOptions(o.value));
1850
- }, T = (e) => {
1851
- if (!(!e || e.getAttribute("aria-disabled") === "true")) {
1852
- if (e.dataset.custom === "true") {
1853
- w(e.dataset.value);
1854
- return;
1855
- }
1856
- C(e.dataset.value), o?.value && (o.value = "", this._setCustomError(""), this._renderOptions(""));
1857
- }
1858
- };
1859
- e.addEventListener("click", (e) => {
1860
- if (u()) return;
1861
- let t = e.target.closest("[data-remove]");
1862
- if (t) {
1863
- e.stopPropagation(), ee(t.dataset.remove), o?.focus();
1864
- return;
1865
- }
1866
- if (o) {
1867
- let t = v();
1868
- e.target !== o && o.focus(), e.target === o || !t ? b() : x();
1869
- return;
1870
- }
1871
- v() ? x() : b();
1872
- }), i.addEventListener("click", (e) => {
1873
- let t = e.target.closest(".search-select-option");
1874
- t && (T(t), (o || n)?.focus());
1875
- }), i.addEventListener("mousemove", (e) => {
1876
- let t = e.target.closest(".search-select-option");
1877
- t && g(h().indexOf(t));
1878
- }), i.addEventListener("mouseleave", () => g(-1)), i.addEventListener("error", (e) => {
1879
- e.target?.classList?.contains("avatar-img") && e.target.remove();
1880
- }, !0), n?.addEventListener("input", () => {
1881
- this._renderOptions(n.value), r && (r.hidden = !n.value), g(-1);
1882
- }), this._navHandler = m({
1883
- getVisibleOptions: h,
1884
- getActive: () => this._active,
1885
- setActive: (e) => g(e),
1886
- onEnter: (e) => {
1887
- e ? T(e) : o?.value.trim() && w(o.value);
1888
- },
1889
- onEscape: () => {
1890
- this._navHandler.clearTypeahead(), x(), o || e.focus();
1891
- }
1892
- });
1893
- let E = (e) => {
1894
- let t = o || n;
1895
- if (e.key === "Backspace" && !t?.value && this._values.length) {
1896
- ee(this._values[this._values.length - 1]);
1897
- return;
1898
- }
1899
- this._navHandler.handler(e);
1900
- };
1901
- if (n?.addEventListener("keydown", E), r?.addEventListener("click", () => {
1902
- n.value = "", this._renderOptions(""), r.hidden = !0, n.focus();
1903
- }), o) {
1904
- let t = (e) => {
1905
- e.target !== o && e.preventDefault();
1906
- };
1907
- i.addEventListener("mousedown", t), e.addEventListener("mousedown", t), o.addEventListener("focus", () => b()), o.addEventListener("input", () => {
1908
- this._customError && this._setCustomError(""), this._renderOptions(o.value), b();
1909
- }), o.addEventListener("keydown", (e) => {
1910
- if (e.key === "," && o.value.trim()) {
1911
- e.preventDefault(), w(o.value);
1912
- return;
1913
- }
1914
- if (e.key === "Enter") {
1915
- if (this._active < 0 && !o.value.trim()) return;
1916
- this._navHandler.handler(e);
1917
- return;
1918
- }
1919
- (e.key === "ArrowDown" || e.key === "ArrowUp") && !v() && b(), E(e);
1920
- }), o.addEventListener("paste", (e) => {
1921
- let t = e.clipboardData?.getData("text/plain") ?? "";
1922
- I(t, L) && (e.preventDefault(), w(`${o.value}${t}`));
1923
- }), o.addEventListener("blur", (e) => {
1924
- e.relatedTarget && this.contains(e.relatedTarget) || (o.value.trim() && w(o.value, { quiet: !0 }), x());
1925
- });
1926
- } else e.addEventListener("keydown", (e) => {
1927
- if (v()) {
1928
- E(e);
1929
- return;
1930
- }
1931
- (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), b());
1932
- });
1933
- this._bindGlobal = () => {
1934
- this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
1935
- v() && !this.contains(e.target) && x();
1936
- }, document.addEventListener("click", this._onDocClick), c(this, () => {
1937
- v() && f();
1938
- });
1939
- }, this._bindGlobal();
1940
- }
1941
- _teardown() {
1942
- this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), l(this), this._navHandler?.teardown();
1943
- }
1944
- disconnectedCallback() {
1945
- this._teardown(), this._ro?.disconnect(), this._ro = null;
1946
- }
1947
- }, L = [
1948
- ",",
1949
- ";",
1950
- "\n",
1951
- " "
1952
- ], ge = [
1953
- ["description", "description"],
1954
- ["avatar", "avatar"],
1955
- ["initials", "initials"],
1956
- ["disabled-hint", "disabledHint"]
1957
- ], _e = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), ve = (e) => {
1958
- let t = String(e ?? "").trim();
1959
- return /^(https?:)?\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t) ? t : "";
1960
- }, ye = (e) => {
1961
- let t = ve(e.avatar);
1962
- return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${g(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${z(t)}" alt="" />` : ""}</span>`;
1963
- }, be = (e, t, n) => {
1964
- let r = !!e.disabled, i = e.description ? `<span class="wui-opt-desc">${g(e.description)}</span>` : "", a = e.disabledHint && r ? `<span class="wui-opt-hint">${g(e.disabledHint)}</span>` : "";
1965
- return `<button type="button" role="option" id="${z(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${z(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${v(e)}</span>${i}</span>${a}${ye(e)}<span class="ms-check">${p("check")}</span></button>`;
1966
- }, R = /* @__PURE__ */ new Map(), xe = (e) => {
1967
- if (R.has(e)) return R.get(e);
1968
- let t = null;
1969
- try {
1970
- t = RegExp(`^(?:${e})$`, "u");
1971
- } catch {
1972
- console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`);
1973
- }
1974
- return R.set(e, t), t;
1975
- }, z = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), B = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Se = /[^0-9]/g, Ce = /[^0-9a-zA-Z]/g, we = class extends e {
1976
- static formAssociated = !0;
1977
- static get observedAttributes() {
1978
- return [
1979
- "value",
1980
- "length",
1981
- "mode",
1982
- "disabled",
1983
- "aria-label"
1984
- ];
1985
- }
1986
- get length() {
1987
- let e = Number.parseInt(this.getAttribute("length") ?? "6", 10);
1988
- return Number.isFinite(e) && e > 0 ? e : 6;
1989
- }
1990
- set length(e) {
1991
- this.setAttribute("length", String(e));
1992
- }
1993
- get mode() {
1994
- return this.getAttribute("mode") === "alphanumeric" ? "alphanumeric" : "numeric";
1995
- }
1996
- set mode(e) {
1997
- this.setAttribute("mode", String(e ?? "numeric"));
1998
- }
1999
- get value() {
2000
- return this._value ?? "";
2001
- }
2002
- set value(e) {
2003
- this._value = this._clean(e), d(this, this._value), this._paint();
2004
- }
2005
- _clean(e) {
2006
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ce : Se, "").slice(0, this.length);
2007
- }
2008
- constructor() {
2009
- super();
2010
- try {
2011
- this._internals = this.attachInternals();
2012
- } catch {
2013
- this._internals = null;
2014
- }
2015
- }
2016
- connectedCallback() {
2017
- this._rendered ? this._onSelectionChange && document.addEventListener("selectionchange", this._onSelectionChange) : (this._defaultCaptured ||= (this._defaultValue = this._value, !0), this.render());
2018
- }
2019
- formResetCallback() {
2020
- this._value = this._defaultValue || "", d(this, this._value), this._paint();
2021
- }
2022
- attributeChangedCallback(e, t, n) {
2023
- this._rendered && (e === "value" ? (this._value = this._clean(n), d(this, this._value), this._paint()) : this.render());
2024
- }
2025
- render() {
2026
- this._value = this._clean(this.getAttribute("value") ?? this._value);
2027
- let e = this.length, t = this.mode === "numeric", n = this.hasAttribute("disabled"), r = Array.from({ length: e }, () => "<span class=\"otp-slot\" aria-hidden=\"true\"></span>").join(""), i = this.getAttribute("aria-label"), a = i ? ` aria-label="${i.replace(/"/g, "&quot;")}"` : "";
2028
- this.innerHTML = `
2029
- <div class="otp">
2030
- <input
2031
- class="otp-field"
2032
- type="text"
2033
- autocomplete="one-time-code"
2034
- inputmode="${t ? "numeric" : "text"}"
2035
- ${t ? "pattern=\"[0-9]*\"" : ""}${a}
2036
- autocapitalize="off"
2037
- autocorrect="off"
2038
- spellcheck="false"
2039
- ${n ? "disabled" : ""} />
2040
- <div class="otp-slots" aria-hidden="true">${r}</div>
2041
- </div>`, this._rendered = !0, d(this, this._value), this._wire(), this._paint();
2042
- }
2043
- _refs() {
2044
- return {
2045
- input: this.querySelector(".otp-field"),
2046
- slots: [...this.querySelectorAll(".otp-slot")]
2047
- };
2048
- }
2049
- _paint() {
2050
- let { input: e, slots: t } = this._refs();
2051
- if (!e || !t.length) return;
2052
- e.value !== this._value && (e.value = this._value);
2053
- let n = e.selectionStart ?? this._value.length, r = Math.min(n, t.length - 1), i = document.activeElement === e;
2054
- t.forEach((e, t) => {
2055
- e.textContent = this._value[t] ?? "", e.classList.toggle("filled", !!this._value[t]), e.classList.toggle("active", i && t === r);
2056
- });
2057
- }
2058
- _wire() {
2059
- let { input: e } = this._refs();
2060
- if (!e) return;
2061
- let t = (e) => {
2062
- let t = this._clean(e), n = t !== this._value;
2063
- this._value = t, d(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
2064
- bubbles: !0,
2065
- detail: t
2066
- }));
2067
- };
2068
- e.addEventListener("input", () => {
2069
- let n = e.value;
2070
- if (this._value.length === this.length && n.length > this._value.length && n.startsWith(this._value)) {
2071
- let e = this._clean(n.slice(this._value.length));
2072
- if (e) {
2073
- t(e);
2074
- return;
2075
- }
2076
- }
2077
- t(n);
2078
- }), e.addEventListener("paste", (e) => {
2079
- let n = e.clipboardData?.getData("text");
2080
- n != null && (e.preventDefault(), t(n));
2081
- });
2082
- for (let t of [
2083
- "keyup",
2084
- "click",
2085
- "blur",
2086
- "select"
2087
- ]) e.addEventListener(t, () => this._paint());
2088
- e.addEventListener("focus", () => {
2089
- this._value.length === this.length && e.select(), this._paint();
2090
- }), this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange), this._onSelectionChange = () => {
2091
- document.activeElement === e && this._paint();
2092
- }, document.addEventListener("selectionchange", this._onSelectionChange);
2093
- }
2094
- disconnectedCallback() {
2095
- this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
2096
- }
2097
- }, V = [
1086
+ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ce = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), M = [
2098
1087
  [
2099
1088
  "AF",
2100
1089
  "Afghanistan",
@@ -3320,11 +2309,1413 @@ var I = (e, t) => t.some((t) => String(e ?? "").includes(t)), he = class extends
3320
2309
  "Zimbabwe",
3321
2310
  "263"
3322
2311
  ]
3323
- ], H = (e) => (V.find((t) => t[0] === e) || [
2312
+ ], N = (e) => (M.find((t) => t[0] === e) || [
3324
2313
  "",
3325
2314
  "",
3326
2315
  ""
3327
- ])[2], Te = {
2316
+ ])[2], P = class extends e {
2317
+ static formAssociated = !0;
2318
+ static get observedAttributes() {
2319
+ return [
2320
+ "value",
2321
+ "placeholder",
2322
+ "search-placeholder",
2323
+ "searchable",
2324
+ "disabled",
2325
+ "compact",
2326
+ "size",
2327
+ "clearable",
2328
+ "icon",
2329
+ "prefix",
2330
+ "aria-label",
2331
+ "aria-invalid"
2332
+ ];
2333
+ }
2334
+ _accessibleName() {
2335
+ return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
2336
+ }
2337
+ constructor() {
2338
+ super();
2339
+ try {
2340
+ this._internals = this.attachInternals();
2341
+ } catch {
2342
+ this._internals = null;
2343
+ }
2344
+ this._value = "", this._optionsProp = null, this._active = -1, this._typeahead = "", this._typeaheadTimer = null;
2345
+ }
2346
+ connectedCallback() {
2347
+ if (!this._rendered) {
2348
+ this.render();
2349
+ return;
2350
+ }
2351
+ this._bindGlobal?.();
2352
+ }
2353
+ attributeChangedCallback(e, t, n) {
2354
+ if (e === "value") {
2355
+ this.value = n;
2356
+ return;
2357
+ }
2358
+ if (e === "aria-invalid") {
2359
+ this._syncInvalid();
2360
+ return;
2361
+ }
2362
+ this._rendered && this.render();
2363
+ }
2364
+ _syncInvalid() {
2365
+ let e = this.querySelector(".search-select-control");
2366
+ e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
2367
+ }
2368
+ formResetCallback() {
2369
+ this.value = this._defaultValue || "";
2370
+ }
2371
+ get value() {
2372
+ return this._value;
2373
+ }
2374
+ set value(e) {
2375
+ this._value = e == null ? "" : String(e), f(this, this._value), this._syncSelected(), this._syncReset();
2376
+ }
2377
+ set options(e) {
2378
+ this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
2379
+ }
2380
+ get options() {
2381
+ return this._readOptions();
2382
+ }
2383
+ _snapshotDeclared() {
2384
+ if (this._declared) return;
2385
+ let e = [...this.querySelectorAll(":scope > wui-option")];
2386
+ e.length && (this._declared = e.map((e) => ({
2387
+ value: e.getAttribute("value") ?? e.textContent.trim(),
2388
+ label: e.innerHTML,
2389
+ icon: e.getAttribute("icon") || void 0,
2390
+ [g]: !0,
2391
+ selected: e.hasAttribute("selected")
2392
+ })));
2393
+ }
2394
+ _readOptions() {
2395
+ return this._optionsProp ? this._optionsProp : (this._snapshotDeclared(), this._declared || []);
2396
+ }
2397
+ render() {
2398
+ this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._snapshotDeclared();
2399
+ let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
2400
+ l && (this._value = String(l.value)), f(this, this._value), this.id ||= `wui-select-${Math.random().toString(36).slice(2, 9)}`;
2401
+ let u = `${this.id}-listbox`;
2402
+ this._listboxId = u;
2403
+ let d = e.map((e, t) => {
2404
+ let n = String(e.value) === String(this._value);
2405
+ return `<button type="button" role="option" id="${F(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${F(e.value)}" aria-selected="${n}">${x(e)}</button>`;
2406
+ }).join("");
2407
+ this.innerHTML = `
2408
+ <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
2409
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${F(u)}" aria-label="${F(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
2410
+ ${a ? m(a, { className: "search-select-icon" }) : ""}
2411
+ ${o ? `<span class="search-select-prefix">${_(o)}</span>` : ""}
2412
+ <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? x(l) : _(s)}</span>
2413
+ ${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${m("x")}</span>` : ""}
2414
+ ${m("chevron-down", { className: "search-select-caret" })}
2415
+ </button>
2416
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${F(u)}" tabindex="-1" hidden>
2417
+ ${t ? `<div class="search-select-search">${m("search")}<input class="search-select-input" placeholder="${F(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${m("x")}</button></div>` : ""}
2418
+ <div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
2419
+ </div>
2420
+ </div>`, this._rendered = !0, f(this, this._value), this._wire(), this._syncReset();
2421
+ }
2422
+ _refs() {
2423
+ return {
2424
+ control: this.querySelector(".search-select-control"),
2425
+ menu: this.querySelector(".search-select-menu"),
2426
+ label: this.querySelector("[data-label]"),
2427
+ reset: this.querySelector(".search-select-reset"),
2428
+ search: this.querySelector(".search-select-input"),
2429
+ clear: this.querySelector(".search-select-clear"),
2430
+ empty: this.querySelector(".search-select-empty"),
2431
+ optionsWrap: this.querySelector(".search-select-options")
2432
+ };
2433
+ }
2434
+ _optionEls() {
2435
+ return [...this.querySelectorAll(".search-select-option")];
2436
+ }
2437
+ _visible() {
2438
+ return this._optionEls().filter((e) => !e.hidden);
2439
+ }
2440
+ _syncSelected() {
2441
+ let { label: e } = this._refs(), t = this._readOptions().find((e) => String(e.value) === String(this._value));
2442
+ for (let e of this._optionEls()) {
2443
+ let t = e.dataset.value === String(this._value);
2444
+ e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
2445
+ }
2446
+ e && (e.innerHTML = t ? x(t) : _(this.getAttribute("placeholder") || "Select..."), e.classList.toggle("search-select-placeholder", !t));
2447
+ }
2448
+ _syncReset() {
2449
+ let { reset: e } = this._refs();
2450
+ e && (e.hidden = !(this.hasAttribute("clearable") && this._value !== "" && !this.hasAttribute("disabled")));
2451
+ }
2452
+ _wire() {
2453
+ this._teardown();
2454
+ let e = this._refs();
2455
+ if (!e.control || !e.menu) return;
2456
+ let t = () => {
2457
+ if (this.hasAttribute("compact")) {
2458
+ let t = e.control.getBoundingClientRect();
2459
+ e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", c(e.control, e.menu);
2460
+ } else c(e.control, e.menu, { matchWidth: !0 });
2461
+ }, n = (t) => {
2462
+ let n = this._visible();
2463
+ this._active = t;
2464
+ for (let e of this._optionEls()) e.classList.remove("is-active");
2465
+ t >= 0 && n[t] ? (n[t].classList.add("is-active"), n[t].scrollIntoView({ block: "nearest" }), e.control.setAttribute("aria-activedescendant", n[t].id)) : e.control.removeAttribute("aria-activedescendant");
2466
+ }, r = (n) => {
2467
+ let r = n.trim().toLowerCase(), i = 0;
2468
+ for (let e of this._optionEls()) {
2469
+ let t = !r || e.textContent.toLowerCase().includes(r);
2470
+ e.hidden = !t, t && (i += 1);
2471
+ }
2472
+ e.empty && (e.empty.hidden = i > 0), e.clear && (e.clear.hidden = !r), e.menu.hidden || t();
2473
+ }, i = () => !e.menu.hidden, a = () => {
2474
+ e.menu.hidden = !1, e.control.setAttribute("aria-expanded", "true"), e.control.classList.add("open"), t(), e.search && (e.search.value = "", r(""), e.search.focus()), n(this._optionEls().findIndex((e) => e.classList.contains("selected")));
2475
+ }, o = () => {
2476
+ e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), n(-1);
2477
+ }, s = (t) => {
2478
+ this.value = t.dataset.value, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.control.focus();
2479
+ };
2480
+ this._navHandler = h({
2481
+ getVisibleOptions: () => this._visible(),
2482
+ getActive: () => this._active,
2483
+ setActive: (e) => n(e),
2484
+ onEnter: (e) => {
2485
+ e && s(e);
2486
+ },
2487
+ onEscape: () => {
2488
+ this._navHandler.clearTypeahead(), o(), e.control.focus();
2489
+ }
2490
+ }), e.reset?.addEventListener("click", (t) => {
2491
+ t.stopPropagation(), this.value = "", this.dispatchEvent(new Event("change", { bubbles: !0 })), e.control.focus();
2492
+ }), e.control.addEventListener("click", () => i() ? o() : a()), e.control.addEventListener("keydown", (e) => {
2493
+ if (i()) {
2494
+ this._navHandler.handler(e);
2495
+ return;
2496
+ }
2497
+ (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
2498
+ }), e.optionsWrap.addEventListener("click", (e) => {
2499
+ let t = e.target.closest(".search-select-option");
2500
+ t && s(t);
2501
+ }), e.optionsWrap.addEventListener("mousemove", (e) => {
2502
+ let t = e.target.closest(".search-select-option");
2503
+ t && n(this._visible().indexOf(t));
2504
+ }), e.optionsWrap.addEventListener("mouseleave", () => n(-1)), e.search?.addEventListener("input", () => {
2505
+ r(e.search.value), n(-1);
2506
+ }), e.clear?.addEventListener("click", () => {
2507
+ e.search.value = "", r(""), e.search.focus();
2508
+ }), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
2509
+ this._teardown(), this._onDocClick = (e) => {
2510
+ i() && !this.contains(e.target) && o();
2511
+ }, document.addEventListener("click", this._onDocClick), l(this, () => {
2512
+ i() && t();
2513
+ });
2514
+ }, this._bindGlobal();
2515
+ }
2516
+ _teardown() {
2517
+ this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), u(this), this._navHandler?.teardown();
2518
+ }
2519
+ disconnectedCallback() {
2520
+ this._teardown();
2521
+ }
2522
+ }, F = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), le = (e) => {
2523
+ if (e == null) return null;
2524
+ let t = String(e).split(",").map((e) => e.trim().toUpperCase()).filter(Boolean);
2525
+ return t.length ? new Set(t) : null;
2526
+ }, ue = (e) => {
2527
+ let t = le(e);
2528
+ return M.filter(([e]) => !t || t.has(e)).map(([e, t]) => ({
2529
+ value: e,
2530
+ label: t,
2531
+ flag: e
2532
+ }));
2533
+ }, de = class extends P {
2534
+ static get observedAttributes() {
2535
+ return [...P.observedAttributes, "countries"];
2536
+ }
2537
+ _readOptions() {
2538
+ let e = this.getAttribute("countries");
2539
+ return this._countryCache?.attr !== e && (this._countryCache = {
2540
+ attr: e,
2541
+ options: ue(e)
2542
+ }), this._countryCache.options;
2543
+ }
2544
+ }, I = [
2545
+ "January",
2546
+ "February",
2547
+ "March",
2548
+ "April",
2549
+ "May",
2550
+ "June",
2551
+ "July",
2552
+ "August",
2553
+ "September",
2554
+ "October",
2555
+ "November",
2556
+ "December"
2557
+ ], L = [
2558
+ "Su",
2559
+ "Mo",
2560
+ "Tu",
2561
+ "We",
2562
+ "Th",
2563
+ "Fr",
2564
+ "Sa"
2565
+ ], R = (e) => String(e).padStart(2, "0"), z = (e, t, n) => `${e}-${R(t + 1)}-${R(n)}`, B = (e) => {
2566
+ let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
2567
+ return t ? {
2568
+ y: +t[1],
2569
+ m: t[2] - 1,
2570
+ d: +t[3]
2571
+ } : null;
2572
+ }, V = (e) => {
2573
+ let t = B(e);
2574
+ return t ? `${R(t.d)} ${I[t.m].slice(0, 3)} ${t.y}` : "";
2575
+ }, H = (e, t) => new Date(e, t + 1, 0).getDate(), U = (e, t) => {
2576
+ for (; t < 0;) t += 12, --e;
2577
+ for (; t > 11;) t -= 12, e += 1;
2578
+ return {
2579
+ y: e,
2580
+ m: t
2581
+ };
2582
+ }, fe = class extends e {
2583
+ static formAssociated = !0;
2584
+ static get observedAttributes() {
2585
+ return [
2586
+ "value",
2587
+ "min",
2588
+ "max",
2589
+ "placeholder",
2590
+ "disabled",
2591
+ "first-day",
2592
+ "size",
2593
+ "aria-label",
2594
+ "aria-describedby",
2595
+ "aria-invalid"
2596
+ ];
2597
+ }
2598
+ constructor() {
2599
+ super();
2600
+ try {
2601
+ this._internals = this.attachInternals();
2602
+ } catch {
2603
+ this._internals = null;
2604
+ }
2605
+ this._value = "";
2606
+ let e = new Date(2e3, 0, 1);
2607
+ this._viewY = e.getFullYear(), this._viewM = e.getMonth(), this._mode = "days", this._focus = null, this._slide = "";
2608
+ }
2609
+ connectedCallback() {
2610
+ if (!this._rendered) {
2611
+ this.render();
2612
+ return;
2613
+ }
2614
+ this._bindGlobal?.();
2615
+ }
2616
+ attributeChangedCallback(e, t, n) {
2617
+ if (e === "aria-invalid") {
2618
+ this._syncInvalid();
2619
+ return;
2620
+ }
2621
+ this._rendered && (e === "value" ? (this._value = n || "", this._syncFormValue(), this._syncTrigger()) : e === "first-day" ? this.querySelector(".datepicker-pop")?.hidden || this._renderView() : this.render());
2622
+ }
2623
+ _syncInvalid() {
2624
+ let e = this.querySelector(".datepicker-trigger");
2625
+ e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
2626
+ }
2627
+ formResetCallback() {
2628
+ this.value = this._defaultValue || "";
2629
+ }
2630
+ get value() {
2631
+ return this._value;
2632
+ }
2633
+ set value(e) {
2634
+ this._value = e || "", f(this, this._value), this._syncTrigger();
2635
+ }
2636
+ _firstDay() {
2637
+ let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
2638
+ return Number.isInteger(e) && e >= 0 && e <= 6 ? e : 0;
2639
+ }
2640
+ render() {
2641
+ this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
2642
+ let e = this.getAttribute("placeholder") || "Enter Date", t = B(this._value);
2643
+ t && (this._viewY = t.y, this._viewM = t.m);
2644
+ let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "", i = this.getAttribute("aria-label"), a = this.getAttribute("aria-describedby");
2645
+ this.innerHTML = `
2646
+ <div class="datepicker">
2647
+ <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${_(i)}"` : ""}${a ? ` aria-describedby="${_(a)}"` : ""}>
2648
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? V(this._value) : _(e)}</span>
2649
+ ${m("calendar-dots")}
2650
+ </button>
2651
+ <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
2652
+ </div>`, this._rendered = !0, f(this, this._value), this._wire();
2653
+ }
2654
+ _syncFormValue() {
2655
+ f(this, this._value);
2656
+ }
2657
+ _syncTrigger() {
2658
+ let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
2659
+ if (!t) return;
2660
+ let n = B(this._value);
2661
+ t.textContent = n ? V(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
2662
+ }
2663
+ _limits() {
2664
+ let e = B(this.getAttribute("min")), t = B(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
2665
+ return {
2666
+ dayDisabled: (e, t, i) => {
2667
+ let a = new Date(e, t, i).getTime();
2668
+ return a < n || a > r;
2669
+ },
2670
+ monthDisabled: (e, t) => {
2671
+ let i = new Date(e, t, 1).getTime();
2672
+ return new Date(e, t, H(e, t)).getTime() < n || i > r;
2673
+ },
2674
+ yearDisabled: (e) => {
2675
+ let t = new Date(e, 0, 1).getTime();
2676
+ return new Date(e, 11, 31).getTime() < n || t > r;
2677
+ }
2678
+ };
2679
+ }
2680
+ _renderView() {
2681
+ let e = this.querySelector(".datepicker-pop");
2682
+ e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
2683
+ }
2684
+ _daysHtml() {
2685
+ let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = H(this._viewY, this._viewM), r = B(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
2686
+ y: this._viewY,
2687
+ m: this._viewM,
2688
+ d: 1
2689
+ }, s = (e, t, n, s) => {
2690
+ let c = z(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
2691
+ return `<button type="button" class="${[
2692
+ "datepicker-day",
2693
+ s ? "is-outside" : "",
2694
+ u ? "is-today" : "",
2695
+ l ? "is-selected" : ""
2696
+ ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
2697
+ }, c = "", l = U(this._viewY, this._viewM - 1), u = H(l.y, l.m);
2698
+ for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
2699
+ for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
2700
+ let d = U(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
2701
+ for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
2702
+ let p = a(i.getFullYear(), i.getMonth(), i.getDate()), h = L.map((t, n) => L[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
2703
+ return `
2704
+ <div class="datepicker-head">
2705
+ <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${m("chevron-left")}</button>
2706
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${I[this._viewM]} ${this._viewY}</button>
2707
+ <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${m("chevron-right")}</button>
2708
+ </div>
2709
+ <div class="datepicker-weekdays">${h}</div>
2710
+ <div class="datepicker-grid${this._slide ? ` ${this._slide}` : ""}" role="grid">${c}</div>
2711
+ <div class="datepicker-foot">
2712
+ <button type="button" class="datepicker-link" data-today${p ? " disabled" : ""}>Today</button>
2713
+ <button type="button" class="datepicker-link" data-clear>Clear</button>
2714
+ </div>`;
2715
+ }
2716
+ _monthsHtml() {
2717
+ let e = B(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
2718
+ for (let i = 0; i < 12; i++) {
2719
+ let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
2720
+ "datepicker-cell",
2721
+ o ? "is-today" : "",
2722
+ a ? "is-selected" : ""
2723
+ ].filter(Boolean).join(" ");
2724
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${I[i].slice(0, 3)}</button>`;
2725
+ }
2726
+ return `
2727
+ <div class="datepicker-head">
2728
+ <button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${m("chevron-left")}</button>
2729
+ <button type="button" class="datepicker-month" data-view="years" aria-label="Choose year">${this._viewY}</button>
2730
+ <button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${m("chevron-right")}</button>
2731
+ </div>
2732
+ <div class="datepicker-cells">${r}</div>`;
2733
+ }
2734
+ _yearsHtml() {
2735
+ let e = B(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
2736
+ for (let a = 0; a < 12; a++) {
2737
+ let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
2738
+ "datepicker-cell",
2739
+ c ? "is-today" : "",
2740
+ s ? "is-selected" : ""
2741
+ ].filter(Boolean).join(" ");
2742
+ i += `<button type="button" class="${u}" data-year="${o}"${l ? " disabled" : ""}>${o}</button>`;
2743
+ }
2744
+ return `
2745
+ <div class="datepicker-head">
2746
+ <button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${m("chevron-left")}</button>
2747
+ <span class="datepicker-month">${r + 1} – ${r + 10}</span>
2748
+ <button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${m("chevron-right")}</button>
2749
+ </div>
2750
+ <div class="datepicker-cells">${i}</div>`;
2751
+ }
2752
+ _focusActive() {
2753
+ let e = this.querySelector(".datepicker-pop"), t = e?.querySelector("[tabindex=\"0\"]") || e?.querySelector(".is-selected") || e?.querySelector(".datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)");
2754
+ t && e.contains(document.activeElement) && t.focus();
2755
+ }
2756
+ _position(e, t) {
2757
+ c(e, t, { clampHeight: !0 });
2758
+ }
2759
+ _setFocus(e, t, n, r) {
2760
+ let { y: i, m: a } = U(e, t);
2761
+ this._focus = {
2762
+ y: i,
2763
+ m: a,
2764
+ d: n
2765
+ };
2766
+ let o = i !== this._viewY || a !== this._viewM;
2767
+ this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${z(i, a, n)}"]`)?.focus();
2768
+ }
2769
+ _onKey(e) {
2770
+ if (this._mode !== "days") {
2771
+ e.key === "Escape" && this._close();
2772
+ return;
2773
+ }
2774
+ let t = this._focus || B(this._value) || {
2775
+ y: this._viewY,
2776
+ m: this._viewM,
2777
+ d: 1
2778
+ }, n = (n, r) => {
2779
+ e.preventDefault();
2780
+ let i = new Date(t.y, t.m, t.d + n);
2781
+ this._setFocus(i.getFullYear(), i.getMonth(), i.getDate(), r);
2782
+ };
2783
+ switch (e.key) {
2784
+ case "ArrowLeft": return n(-1, "slide-prev");
2785
+ case "ArrowRight": return n(1, "slide-next");
2786
+ case "ArrowUp": return n(-7, "slide-prev");
2787
+ case "ArrowDown": return n(7, "slide-next");
2788
+ case "Home": return n(-((new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7), "slide-prev");
2789
+ case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
2790
+ case "PageUp": {
2791
+ e.preventDefault();
2792
+ let n = U(t.y, t.m - (e.shiftKey ? 12 : 1));
2793
+ return this._setFocus(n.y, n.m, Math.min(t.d, H(n.y, n.m)), "slide-prev");
2794
+ }
2795
+ case "PageDown": {
2796
+ e.preventDefault();
2797
+ let n = U(t.y, t.m + (e.shiftKey ? 12 : 1));
2798
+ return this._setFocus(n.y, n.m, Math.min(t.d, H(n.y, n.m)), "slide-next");
2799
+ }
2800
+ case "Enter":
2801
+ case " ":
2802
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = z(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
2803
+ return;
2804
+ case "Escape": return this._close();
2805
+ default:
2806
+ }
2807
+ }
2808
+ _wire() {
2809
+ this._teardown();
2810
+ let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop"), n = this.querySelector(".datepicker");
2811
+ if (!e || !t) return;
2812
+ let r = () => !t.hidden;
2813
+ this._open = () => {
2814
+ let r = /* @__PURE__ */ new Date(), i = B(this._value);
2815
+ (i || !this._viewNavigated) && (this._viewY = r.getFullYear(), this._viewM = r.getMonth()), this._mode = "days";
2816
+ let a = r.getFullYear() === this._viewY && r.getMonth() === this._viewM, o = i && i.y === this._viewY && i.m === this._viewM;
2817
+ this._focus = o ? i : {
2818
+ y: this._viewY,
2819
+ m: this._viewM,
2820
+ d: a ? r.getDate() : 1
2821
+ }, this._renderView(), t.hidden = !1, n?.classList.add("open"), this._position(e, t), e.setAttribute("aria-expanded", "true"), t.querySelector("[tabindex=\"0\"]")?.focus();
2822
+ }, this._close = () => {
2823
+ t.hidden = !0, n?.classList.remove("open"), e.setAttribute("aria-expanded", "false"), e.focus();
2824
+ }, e.addEventListener("click", () => r() ? this._close() : this._open()), t.addEventListener("click", (e) => {
2825
+ this._popClick = !0;
2826
+ let t = e.target.closest("[data-nav]");
2827
+ if (t) {
2828
+ this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
2829
+ let e = U(this._viewY, this._viewM + Number(t.dataset.nav));
2830
+ this._viewY = e.y, this._viewM = e.m, this._focus = {
2831
+ y: e.y,
2832
+ m: e.m,
2833
+ d: 1
2834
+ }, this._renderView(), this._slide = "";
2835
+ return;
2836
+ }
2837
+ let n = e.target.closest("[data-nav-year]");
2838
+ if (n) {
2839
+ this._viewY += Number(n.dataset.navYear), this._renderView();
2840
+ return;
2841
+ }
2842
+ let r = e.target.closest("[data-nav-decade]");
2843
+ if (r) {
2844
+ this._viewY += Number(r.dataset.navDecade) * 10, this._renderView();
2845
+ return;
2846
+ }
2847
+ let i = e.target.closest("[data-view]");
2848
+ if (i) {
2849
+ this._mode = i.dataset.view, this._renderView();
2850
+ return;
2851
+ }
2852
+ let a = e.target.closest("[data-month]");
2853
+ if (a && !a.disabled) {
2854
+ this._viewNavigated = !0, this._viewM = Number(a.dataset.month), this._mode = "days", this._focus = {
2855
+ y: this._viewY,
2856
+ m: this._viewM,
2857
+ d: 1
2858
+ }, this._renderView();
2859
+ return;
2860
+ }
2861
+ let o = e.target.closest("[data-year]");
2862
+ if (o && !o.disabled) {
2863
+ this._viewNavigated = !0, this._viewY = Number(o.dataset.year), this._mode = "months", this._renderView();
2864
+ return;
2865
+ }
2866
+ if (e.target.closest("[data-today]")) {
2867
+ let e = /* @__PURE__ */ new Date();
2868
+ if (this._limits().dayDisabled(e.getFullYear(), e.getMonth(), e.getDate())) return;
2869
+ this.value = z(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
2870
+ return;
2871
+ }
2872
+ if (e.target.closest("[data-clear]")) {
2873
+ this.value = "", this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
2874
+ return;
2875
+ }
2876
+ let s = e.target.closest(".datepicker-day[data-iso]");
2877
+ s && !s.disabled && (this.value = s.dataset.iso, this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
2878
+ }), this._onKeyBound = (e) => {
2879
+ r() && this._onKey(e);
2880
+ }, t.addEventListener("keydown", this._onKeyBound), this._bindGlobal = () => {
2881
+ this._teardown(), this._onDocClick = (e) => {
2882
+ let t = this._popClick;
2883
+ this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
2884
+ }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
2885
+ r() && e.key === "Escape" && this._close();
2886
+ }, document.addEventListener("keydown", this._onDocKey), l(this, () => {
2887
+ r() && this._position(e, t);
2888
+ });
2889
+ }, this._bindGlobal(), this._syncFormValue();
2890
+ }
2891
+ _teardown() {
2892
+ this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), u(this);
2893
+ }
2894
+ disconnectedCallback() {
2895
+ this._teardown();
2896
+ }
2897
+ }, pe = class extends e {
2898
+ static formAssociated = !0;
2899
+ static get observedAttributes() {
2900
+ return [
2901
+ "start",
2902
+ "end",
2903
+ "min",
2904
+ "max",
2905
+ "placeholder",
2906
+ "disabled",
2907
+ "first-day",
2908
+ "size",
2909
+ "aria-label",
2910
+ "aria-describedby",
2911
+ "name",
2912
+ "start-name",
2913
+ "end-name",
2914
+ "aria-invalid"
2915
+ ];
2916
+ }
2917
+ constructor() {
2918
+ super();
2919
+ try {
2920
+ this._internals = this.attachInternals();
2921
+ } catch {
2922
+ this._internals = null;
2923
+ }
2924
+ this._start = "", this._end = "", this._hover = "";
2925
+ let e = new Date(2e3, 0, 1);
2926
+ this._viewY = e.getFullYear(), this._viewM = e.getMonth();
2927
+ }
2928
+ connectedCallback() {
2929
+ if (!this._rendered) {
2930
+ this.render();
2931
+ return;
2932
+ }
2933
+ this._bindGlobal?.();
2934
+ }
2935
+ attributeChangedCallback(e, t, n) {
2936
+ if (e === "aria-invalid") {
2937
+ this._syncInvalid();
2938
+ return;
2939
+ }
2940
+ this._rendered && (e === "start" || e === "end" ? (this._start = this.getAttribute("start") || "", this._end = this.getAttribute("end") || "", this._syncTrigger(), this._syncMirrors()) : this.render());
2941
+ }
2942
+ _syncInvalid() {
2943
+ let e = this.querySelector(".daterange-trigger");
2944
+ e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
2945
+ }
2946
+ get value() {
2947
+ return {
2948
+ start: this._start,
2949
+ end: this._end
2950
+ };
2951
+ }
2952
+ set value(e) {
2953
+ this._start = e?.start || "", this._end = e?.end || "", this._syncTrigger(), this._syncMirrors();
2954
+ }
2955
+ _firstDay() {
2956
+ let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
2957
+ return Number.isInteger(e) && e >= 0 && e <= 6 ? e : 0;
2958
+ }
2959
+ _label() {
2960
+ let e = this.getAttribute("placeholder") || "Start – End";
2961
+ return !this._start && !this._end ? {
2962
+ text: e,
2963
+ empty: !0
2964
+ } : {
2965
+ text: `${V(this._start) || "Start"} – ${V(this._end) || "End"}`,
2966
+ empty: !1
2967
+ };
2968
+ }
2969
+ render() {
2970
+ this._defaultStart === void 0 && (this._defaultStart = this.getAttribute("start") || "", this._defaultEnd = this.getAttribute("end") || "", this._start = this._defaultStart || this._start, this._end = this._defaultEnd || this._end);
2971
+ let e = B(this._start);
2972
+ e && (this._viewY = e.y, this._viewM = e.m);
2973
+ let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label(), a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
2974
+ this.innerHTML = `
2975
+ <div class="daterange">
2976
+ <button type="button" class="input daterange-trigger${n}${i ? "" : " has-value"}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${_(a)}"` : ""}${o ? ` aria-describedby="${_(o)}"` : ""}>
2977
+ <span data-range-label class="${i ? "search-select-placeholder" : ""}">${_(r)}</span>
2978
+ ${m("calendar")}
2979
+ </button>
2980
+ <div class="daterange-pop" role="dialog" aria-modal="false" hidden></div>
2981
+ </div>`, this._rendered = !0, this._syncMirrors(), this._wire();
2982
+ }
2983
+ formResetCallback() {
2984
+ this.value = {
2985
+ start: this._defaultStart || "",
2986
+ end: this._defaultEnd || ""
2987
+ };
2988
+ }
2989
+ _syncTrigger() {
2990
+ let e = this.querySelector(".daterange-trigger"), t = this.querySelector("[data-range-label]");
2991
+ if (!t) return;
2992
+ let { text: n, empty: r } = this._label();
2993
+ t.textContent = n, t.classList.toggle("search-select-placeholder", r), e?.classList.toggle("has-value", !r);
2994
+ }
2995
+ _syncMirrors() {
2996
+ let e = this.getAttribute("start-name") || this.getAttribute("name"), t = this.getAttribute("end-name");
2997
+ this._mirror("start", e, this._start), this._mirror("end", t, this._end);
2998
+ }
2999
+ _mirror(e, t, n) {
3000
+ if (!t) return;
3001
+ let r = this.querySelector(`input[type="hidden"][data-range-mirror="${e}"]`);
3002
+ r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "", r.disabled = this.hasAttribute("disabled");
3003
+ }
3004
+ _limits() {
3005
+ let e = B(this.getAttribute("min")), t = B(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
3006
+ return (e, t, i) => {
3007
+ let a = new Date(e, t, i).getTime();
3008
+ return a < n || a > r;
3009
+ };
3010
+ }
3011
+ _monthHtml(e, t) {
3012
+ let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = H(e, t), a = this._limits(), o = L.map((e, t) => L[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
3013
+ let i = z(e, t, n), o = a(e, t, n);
3014
+ return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
3015
+ }, c = "", l = U(e, t - 1), u = H(l.y, l.m);
3016
+ for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
3017
+ for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
3018
+ let d = U(e, t + 1), f = (7 - (r + i) % 7) % 7;
3019
+ for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
3020
+ return `
3021
+ <div class="daterange-cal">
3022
+ <div class="datepicker-month-label">${I[t]} ${e}</div>
3023
+ <div class="datepicker-weekdays">${o}</div>
3024
+ <div class="datepicker-grid" role="grid">${c}</div>
3025
+ </div>`;
3026
+ }
3027
+ _renderView() {
3028
+ let e = this.querySelector(".daterange-pop");
3029
+ if (!e) return;
3030
+ let t = U(this._viewY, this._viewM + 1);
3031
+ e.innerHTML = `
3032
+ <div class="daterange-head">
3033
+ <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${m("chevron-left")}</button>
3034
+ <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${m("chevron-right")}</button>
3035
+ </div>
3036
+ <div class="daterange-cals">
3037
+ ${this._monthHtml(this._viewY, this._viewM)}
3038
+ ${this._monthHtml(t.y, t.m)}
3039
+ </div>
3040
+ <div class="datepicker-foot">
3041
+ <span class="daterange-hint" data-range-hint></span>
3042
+ <button type="button" class="datepicker-link" data-clear>Clear</button>
3043
+ </div>`, this._paint();
3044
+ }
3045
+ _paint() {
3046
+ let e = this.querySelector(".daterange-pop");
3047
+ if (!e) return;
3048
+ let t = this._start ? new Date(this._start).getTime() : null, n = this._end;
3049
+ t && !this._end && this._hover && new Date(this._hover).getTime() >= t && (n = this._hover);
3050
+ let r = n ? new Date(n).getTime() : null;
3051
+ for (let n of e.querySelectorAll(".datepicker-day[data-iso]")) {
3052
+ let e = new Date(n.dataset.iso).getTime(), i = t != null && e === t, a = r != null && e === r, o = t != null && r != null && e > t && e < r;
3053
+ n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
3054
+ }
3055
+ let i = e.querySelector("[data-range-hint]");
3056
+ i && (i.textContent = this._start ? this._end ? `${V(this._start)} – ${V(this._end)}` : "Pick an end date" : "Pick a start date");
3057
+ }
3058
+ _position(e, t) {
3059
+ c(e, t, { clampHeight: !0 });
3060
+ }
3061
+ _pick(e) {
3062
+ if (!this._start || this._start && this._end) {
3063
+ this._start = e, this._end = "", this._hover = "", this._syncTrigger(), this._syncMirrors(), this._paint();
3064
+ return;
3065
+ }
3066
+ if (new Date(e).getTime() < new Date(this._start).getTime()) {
3067
+ this._start = e, this._syncTrigger(), this._syncMirrors(), this._paint(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
3068
+ return;
3069
+ }
3070
+ this._end = e, this._syncTrigger(), this._syncMirrors(), this._paint(), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
3071
+ }
3072
+ _wire() {
3073
+ this._teardown();
3074
+ let e = this.querySelector(".daterange-trigger"), t = this.querySelector(".daterange-pop"), n = this.querySelector(".daterange");
3075
+ if (!e || !t) return;
3076
+ let r = () => !t.hidden;
3077
+ this._open = () => {
3078
+ let r = B(this._start);
3079
+ if (r) this._viewY = r.y, this._viewM = r.m;
3080
+ else {
3081
+ let e = /* @__PURE__ */ new Date();
3082
+ this._viewY = e.getFullYear(), this._viewM = e.getMonth();
3083
+ }
3084
+ this._renderView(), t.hidden = !1, n?.classList.add("open"), this._position(e, t), e.setAttribute("aria-expanded", "true");
3085
+ }, this._close = () => {
3086
+ t.hidden = !0, this._hover = "", n?.classList.remove("open"), e.setAttribute("aria-expanded", "false");
3087
+ }, e.addEventListener("click", () => r() ? this._close() : this._open()), t.addEventListener("click", (e) => {
3088
+ this._popClick = !0;
3089
+ let t = e.target.closest("[data-nav]");
3090
+ if (t) {
3091
+ let e = U(this._viewY, this._viewM + Number(t.dataset.nav));
3092
+ this._viewY = e.y, this._viewM = e.m, this._renderView();
3093
+ return;
3094
+ }
3095
+ if (e.target.closest("[data-clear]")) {
3096
+ this._start = "", this._end = "", this._hover = "", this._syncTrigger(), this._syncMirrors(), this._renderView(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
3097
+ return;
3098
+ }
3099
+ let n = e.target.closest(".datepicker-day[data-iso]");
3100
+ n && !n.disabled && this._pick(n.dataset.iso);
3101
+ }), t.addEventListener("mouseover", (e) => {
3102
+ let t = e.target.closest(".datepicker-day[data-iso]");
3103
+ t && this._start && !this._end && (this._hover = t.dataset.iso, this._paint());
3104
+ }), this._bindGlobal = () => {
3105
+ this._teardown(), this._onDocClick = (e) => {
3106
+ let t = this._popClick;
3107
+ this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
3108
+ }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
3109
+ r() && e.key === "Escape" && this._close();
3110
+ }, document.addEventListener("keydown", this._onDocKey), l(this, () => {
3111
+ r() && this._position(e, t);
3112
+ });
3113
+ }, this._bindGlobal(), this._syncMirrors();
3114
+ }
3115
+ _teardown() {
3116
+ this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), u(this);
3117
+ }
3118
+ disconnectedCallback() {
3119
+ this._teardown();
3120
+ }
3121
+ }, me = class extends e {
3122
+ static get observedAttributes() {
3123
+ return [
3124
+ "static",
3125
+ "max-scale",
3126
+ "radius"
3127
+ ];
3128
+ }
3129
+ constructor() {
3130
+ super(), this._pointerMoveListener = null, this._pointerLeaveListener = null, this._frame = 0, this._pointerX = 0;
3131
+ }
3132
+ connectedCallback() {
3133
+ this._wire();
3134
+ }
3135
+ disconnectedCallback() {
3136
+ this._teardown();
3137
+ }
3138
+ attributeChangedCallback(e, t, n) {
3139
+ e === "static" && this.isConnected && this._wire();
3140
+ }
3141
+ _maxScale() {
3142
+ return he(this.getAttribute("max-scale"), 1.6);
3143
+ }
3144
+ _radius() {
3145
+ return he(this.getAttribute("radius"), 100);
3146
+ }
3147
+ _magnifyEnabled() {
3148
+ return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
3149
+ }
3150
+ _applyMagnification() {
3151
+ this._frame = 0;
3152
+ let e = this._maxScale(), t = this._radius();
3153
+ for (let n of this.querySelectorAll(".dock-item")) {
3154
+ let r = n.getBoundingClientRect(), i = Math.abs(this._pointerX - (r.left + r.width / 2)), a = Math.max(0, 1 - i / t), o = 1 + (e - 1) * a;
3155
+ n.style.setProperty("--wui-dock-mag", o.toFixed(3));
3156
+ }
3157
+ }
3158
+ _resetMagnification() {
3159
+ this._frame &&= (cancelAnimationFrame(this._frame), 0);
3160
+ for (let e of this.querySelectorAll(".dock-item")) e.style.removeProperty("--wui-dock-mag");
3161
+ }
3162
+ _wire() {
3163
+ this._teardown(), this._magnifyEnabled() && (this._pointerMoveListener = (e) => {
3164
+ this._pointerX = e.clientX, this._frame ||= requestAnimationFrame(() => this._applyMagnification());
3165
+ }, this._pointerLeaveListener = () => this._resetMagnification(), this.addEventListener("pointermove", this._pointerMoveListener), this.addEventListener("pointerleave", this._pointerLeaveListener));
3166
+ }
3167
+ _teardown() {
3168
+ this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
3169
+ }
3170
+ }, he = (e, t) => {
3171
+ let n = Number.parseFloat(e);
3172
+ return Number.isFinite(n) ? n : t;
3173
+ }, ge = {
3174
+ enter: "Enter",
3175
+ comma: ",",
3176
+ space: " ",
3177
+ tab: "Tab"
3178
+ }, _e = {
3179
+ enter: "\n",
3180
+ comma: ",",
3181
+ space: " ",
3182
+ tab: " "
3183
+ }, ve = (e) => ge[e], ye = (e) => _e[e];
3184
+ function be(e, t) {
3185
+ let n = [String(e ?? "")];
3186
+ for (let e of t) n = n.flatMap((t) => t.split(e));
3187
+ return n.map((e) => e.trim()).filter(Boolean);
3188
+ }
3189
+ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extends e {
3190
+ static formAssociated = !0;
3191
+ _accessibleName() {
3192
+ return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
3193
+ }
3194
+ static get observedAttributes() {
3195
+ return [
3196
+ "placeholder",
3197
+ "search-placeholder",
3198
+ "searchable",
3199
+ "disabled",
3200
+ "icon",
3201
+ "size",
3202
+ "collapse-chips",
3203
+ "aria-label",
3204
+ "aria-invalid",
3205
+ "allow-custom",
3206
+ "custom-pattern",
3207
+ "custom-invalid-message"
3208
+ ];
3209
+ }
3210
+ constructor() {
3211
+ super(), this._values = [], this._optionsProp = null, this._active = -1, this._typeahead = "", this._typeaheadTimer = null, this._customError = "";
3212
+ try {
3213
+ this._internals = this.attachInternals();
3214
+ } catch {
3215
+ this._internals = null;
3216
+ }
3217
+ }
3218
+ connectedCallback() {
3219
+ if (!this._rendered) {
3220
+ if (!this._valuesInit && !this._optionsProp && !this._values.length) {
3221
+ let e = this.getAttribute("value");
3222
+ if (e != null && e !== "") this._values = e.split(",").map((e) => e.trim()).filter(Boolean);
3223
+ else {
3224
+ let e = [...this.querySelectorAll(":scope > wui-option[selected]")].map((e) => e.getAttribute("value") ?? e.textContent.trim());
3225
+ e.length && (this._values = e.map(String));
3226
+ }
3227
+ }
3228
+ this._valuesInit = !0, this._defaultCaptured ||= (this._defaultValues = this._values.slice(), !0), this.render();
3229
+ return;
3230
+ }
3231
+ this._bindGlobal?.();
3232
+ }
3233
+ formResetCallback() {
3234
+ this.values = (this._defaultValues || []).slice();
3235
+ let e = this.querySelector("[data-input]");
3236
+ e && (e.value = ""), this._setCustomError("");
3237
+ }
3238
+ attributeChangedCallback(e) {
3239
+ if (e === "aria-invalid") {
3240
+ this._syncInvalid();
3241
+ return;
3242
+ }
3243
+ e === "custom-pattern" || e === "custom-invalid-message" || this._rendered && this.render();
3244
+ }
3245
+ _syncInvalid() {
3246
+ let e = this.querySelector(".search-select-control");
3247
+ e && (this.hasAttribute("aria-invalid") || this._customError ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
3248
+ }
3249
+ get values() {
3250
+ return this._values.slice();
3251
+ }
3252
+ set values(e) {
3253
+ this._values = Array.isArray(e) ? e.map(String) : [], f(this, this._values.join(",")), this._rendered && (this._renderControl(), this._renderOptions(this._query()));
3254
+ }
3255
+ set options(e) {
3256
+ if (this._optionsProp = Array.isArray(e) ? e : null, this._rendered && this._allowCustom) {
3257
+ this._renderControl(), this._renderOptions(this._query());
3258
+ return;
3259
+ }
3260
+ this.isConnected && this.render();
3261
+ }
3262
+ get options() {
3263
+ return this._readOptions();
3264
+ }
3265
+ get validateCustom() {
3266
+ return this._validateCustom ?? null;
3267
+ }
3268
+ set validateCustom(e) {
3269
+ this._validateCustom = typeof e == "function" ? e : null;
3270
+ }
3271
+ get _allowCustom() {
3272
+ return this.hasAttribute("allow-custom");
3273
+ }
3274
+ _query() {
3275
+ let e = this.querySelector(this._allowCustom ? "[data-input]" : ".search-select-input");
3276
+ return e ? e.value : "";
3277
+ }
3278
+ _snapshotDeclared() {
3279
+ if (this._declared) return;
3280
+ let e = [...this.querySelectorAll(":scope > wui-option")];
3281
+ e.length && (this._declared = e.map((e) => {
3282
+ let t = {
3283
+ value: e.getAttribute("value") ?? e.textContent.trim(),
3284
+ label: e.innerHTML,
3285
+ icon: e.getAttribute("icon") || void 0,
3286
+ [g]: !0,
3287
+ selected: e.hasAttribute("selected")
3288
+ };
3289
+ for (let [n, r] of we) {
3290
+ let i = e.getAttribute(n);
3291
+ i && (t[r] = i);
3292
+ }
3293
+ return e.hasAttribute("disabled") && (t.disabled = !0), t;
3294
+ }));
3295
+ }
3296
+ _readOptions() {
3297
+ return this._optionsProp ? this._optionsProp : (this._snapshotDeclared(), this._declared || []);
3298
+ }
3299
+ _labelFor(e) {
3300
+ let t = this._readOptions().find((t) => String(t.value) === String(e));
3301
+ return t ? t.label : e;
3302
+ }
3303
+ _labelHtmlFor(e) {
3304
+ let t = this._readOptions().find((t) => String(t.value) === String(e));
3305
+ return t ? x(t) : _(e);
3306
+ }
3307
+ render() {
3308
+ this._snapshotDeclared();
3309
+ let e = this._allowCustom, t = this.hasAttribute("searchable") && !e, n = this.getAttribute("search-placeholder") || "Search…", r = this.getAttribute("icon"), i = this.getAttribute("size"), a = i === "sm" ? " search-select-sm" : i === "lg" ? " search-select-lg" : "";
3310
+ f(this, this._values.join(",")), this.id ||= `wui-multiselect-${Math.random().toString(36).slice(2, 9)}`;
3311
+ let o = `${this.id}-listbox`;
3312
+ this._listboxId = o;
3313
+ let s = this.hasAttribute("disabled");
3314
+ if (e) {
3315
+ let e = `${this.id}-custom-error`;
3316
+ this.innerHTML = `
3317
+ <div class="search-select${a}">
3318
+ <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : ""}>
3319
+ ${r ? m(r, { className: "search-select-icon" }) : ""}
3320
+ <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${W(o)}" aria-label="${W(this._accessibleName())}" aria-describedby="${W(e)}" autocomplete="off"${s ? " disabled" : ""} /></div>
3321
+ ${m("chevron-down", { className: "search-select-caret" })}
3322
+ </div>
3323
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${W(o)}" aria-multiselectable="true" tabindex="-1" hidden>
3324
+ <div class="search-select-options"></div>
3325
+ </div>
3326
+ </div>
3327
+ <div class="field-error wui-ms-custom-error" id="${W(e)}" aria-live="polite" hidden></div>`;
3328
+ } else this.innerHTML = `
3329
+ <div class="search-select${a}">
3330
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${W(o)}" aria-label="${W(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
3331
+ ${r ? m(r, { className: "search-select-icon" }) : ""}
3332
+ <div class="ms-chips" data-chips></div>
3333
+ ${m("chevron-down", { className: "search-select-caret" })}
3334
+ </div>
3335
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${W(o)}" aria-multiselectable="true" tabindex="-1" hidden>
3336
+ ${t ? `<div class="search-select-search">${m("search")}<input class="search-select-input" placeholder="${W(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${m("x")}</button></div>` : ""}
3337
+ <div class="search-select-options"></div>
3338
+ <div class="search-select-empty" hidden>No matches</div>
3339
+ </div>
3340
+ </div>`;
3341
+ this._rendered = !0, this._customError = "", f(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
3342
+ }
3343
+ _renderControl() {
3344
+ let e = this.querySelector("[data-chips]");
3345
+ if (!e) return;
3346
+ let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${W(e)}" aria-label="Remove ${W(je(this._labelFor(e)))}">${m("x")}</button></span>`).join("");
3347
+ if (n) {
3348
+ for (let t of [...e.querySelectorAll(":scope > .chip")]) t.remove();
3349
+ n.insertAdjacentHTML("beforebegin", r), n.placeholder = this._values.length ? "" : t, this._collapseChips();
3350
+ return;
3351
+ }
3352
+ if (!this._values.length) {
3353
+ e.innerHTML = `<span class="search-select-placeholder">${_(t)}</span>`;
3354
+ return;
3355
+ }
3356
+ e.innerHTML = r, this._collapseChips();
3357
+ }
3358
+ _collapseChips() {
3359
+ let e = this.querySelector("[data-chips]");
3360
+ if (!e || !this.hasAttribute("collapse-chips") || !this._values.length) return;
3361
+ e.querySelector(".chip-more")?.remove();
3362
+ let t = [...e.querySelectorAll(":scope > .chip:not(.chip-more)")];
3363
+ for (let e of t) e.style.display = "";
3364
+ if (!t.length) return;
3365
+ let n = e.clientWidth, r = (e) => e.offsetLeft + e.offsetWidth;
3366
+ if (r(t[t.length - 1]) <= n) return;
3367
+ let i = document.createElement("span");
3368
+ i.className = "chip chip-sm chip-more", i.textContent = `+${t.length}`, t[t.length - 1].after(i);
3369
+ let a = i.offsetWidth + 6, o = 0;
3370
+ for (let e of t) if (r(e) <= n - a) o += 1;
3371
+ else break;
3372
+ o < 1 && (o = 1);
3373
+ for (let e = o; e < t.length; e += 1) t[e].style.display = "none";
3374
+ i.textContent = `+${t.length - o}`;
3375
+ }
3376
+ _matches(e, t) {
3377
+ return je(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
3378
+ }
3379
+ _optionNamed(e) {
3380
+ let t = e.trim().toLowerCase();
3381
+ return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || je(e.label).trim().toLowerCase() === t);
3382
+ }
3383
+ _renderOptions(e) {
3384
+ let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
3385
+ if (!t) return;
3386
+ let r = (e || "").trim(), i = r.toLowerCase(), a = this._readOptions();
3387
+ i && (a = a.filter((e) => this._matches(e, i)));
3388
+ let o = this._listboxId || `${this.id || "wui-multiselect"}-listbox`, s = this._allowCustom && r && !this._optionNamed(r), c = a.map((e, t) => {
3389
+ let n = this._values.includes(String(e.value)), r = `${o}-opt-${t}`;
3390
+ return Te(e) ? Oe(e, r, n) : `<button type="button" role="option" id="${W(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${x(e)}</span><span class="ms-check">${m("check")}</span></button>`;
3391
+ });
3392
+ s && c.push(`<button type="button" role="option" id="${W(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${W(r)}" data-custom="true" aria-selected="false">Add “${_(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
3393
+ }
3394
+ _combobox() {
3395
+ return this._allowCustom ? this.querySelector("[data-input]") : this.querySelector(".search-select-control");
3396
+ }
3397
+ _setCustomError(e) {
3398
+ this._customError = e || "";
3399
+ let t = this.querySelector(".wui-ms-custom-error"), n = this.querySelector("[data-input]");
3400
+ t && (t.textContent = this._customError, t.hidden = !this._customError), n && (this._customError ? n.setAttribute("aria-invalid", "true") : n.removeAttribute("aria-invalid")), this._syncInvalid();
3401
+ }
3402
+ _customRefusal(e) {
3403
+ let t = this.getAttribute("custom-invalid-message") || "Enter a valid value.", n = this.getAttribute("custom-pattern");
3404
+ if (n) {
3405
+ let r = Ae(n);
3406
+ if (r && !r.test(e)) return t;
3407
+ }
3408
+ let r = this._validateCustom;
3409
+ if (r) {
3410
+ let n = r(e);
3411
+ return n === !0 ? "" : typeof n == "string" && n ? n : t;
3412
+ }
3413
+ return "";
3414
+ }
3415
+ _commitTyped(e) {
3416
+ let t = e.trim().replace(/,+$/, "").trim();
3417
+ if (!t) return "";
3418
+ let n = this._optionNamed(t), r;
3419
+ if (n) {
3420
+ if (n.disabled) return n.disabledHint || this.getAttribute("custom-invalid-message") || "That option is not available.";
3421
+ r = String(n.value);
3422
+ } else {
3423
+ let e = this._customRefusal(t);
3424
+ if (e) return e;
3425
+ r = t;
3426
+ }
3427
+ let i = r.toLowerCase();
3428
+ return this._values.some((e) => e.toLowerCase() === i) || (this._values = [...this._values, r]), "";
3429
+ }
3430
+ _wire() {
3431
+ this._teardown();
3432
+ let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options"), a = this._allowCustom, o = a ? this.querySelector("[data-input]") : null, s = o || e;
3433
+ if (!e || !t) return;
3434
+ let u = () => this.hasAttribute("disabled"), d = () => c(e, t, { matchWidth: !0 }), p = () => [...this.querySelectorAll(".search-select-option")], m = () => p().filter((e) => !e.hidden), g = (e) => {
3435
+ let t = m();
3436
+ this._active = e;
3437
+ for (let e of p()) e.classList.remove("is-active");
3438
+ e >= 0 && t[e] ? (t[e].classList.add("is-active"), t[e].scrollIntoView({ block: "nearest" }), s.setAttribute("aria-activedescendant", t[e].id)) : s.removeAttribute("aria-activedescendant");
3439
+ }, _ = !1, v = () => a ? _ : !t.hidden, y = () => {
3440
+ let n = _ && p().length > 0, r = t.hidden;
3441
+ t.hidden = !n, s.setAttribute("aria-expanded", String(n)), e.classList.toggle("open", n), n && r && d();
3442
+ };
3443
+ this._syncCustomMenu = a ? y : null;
3444
+ let b = () => {
3445
+ if (!u()) {
3446
+ if (a) {
3447
+ _ = !0, y();
3448
+ return;
3449
+ }
3450
+ t.hidden = !1, e.setAttribute("aria-expanded", "true"), e.classList.add("open"), d(), n && (n.value = "", this._renderOptions(""), n.focus());
3451
+ }
3452
+ }, x = () => {
3453
+ a ? (_ = !1, y()) : (t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open")), g(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
3454
+ }, S = () => {
3455
+ f(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
3456
+ }, C = (e) => {
3457
+ let t = String(e);
3458
+ if (this._values.includes(t)) this._values = this._values.filter((e) => e !== t);
3459
+ else if (a && this._values.some((e) => e.toLowerCase() === t.toLowerCase())) return;
3460
+ else this._values = [...this._values, t];
3461
+ this._renderControl(), this._renderOptions(this._query()), S();
3462
+ }, w = (e) => {
3463
+ this._values = this._values.filter((t) => t !== String(e)), this._renderControl(), this._renderOptions(this._query()), S();
3464
+ }, T = (e, { quiet: t = !1 } = {}) => {
3465
+ let n = this._values.length, r = xe(e, Ce) ? be(e, Ce) : [e], i = [], a = "";
3466
+ for (let e of r) {
3467
+ let t = this._commitTyped(e);
3468
+ t && (i.push(e.trim()), a ||= t);
3469
+ }
3470
+ t && i.length || (o.value = i.join(", "), this._setCustomError(a), this._values.length !== n && (this._renderControl(), S()), this._renderOptions(o.value));
3471
+ }, E = (e) => {
3472
+ if (!(!e || e.getAttribute("aria-disabled") === "true")) {
3473
+ if (e.dataset.custom === "true") {
3474
+ T(e.dataset.value);
3475
+ return;
3476
+ }
3477
+ C(e.dataset.value), o?.value && (o.value = "", this._setCustomError(""), this._renderOptions(""));
3478
+ }
3479
+ };
3480
+ e.addEventListener("click", (e) => {
3481
+ if (u()) return;
3482
+ let t = e.target.closest("[data-remove]");
3483
+ if (t) {
3484
+ e.stopPropagation(), w(t.dataset.remove), o?.focus();
3485
+ return;
3486
+ }
3487
+ if (o) {
3488
+ let t = v();
3489
+ e.target !== o && o.focus(), e.target === o || !t ? b() : x();
3490
+ return;
3491
+ }
3492
+ v() ? x() : b();
3493
+ }), i.addEventListener("click", (e) => {
3494
+ let t = e.target.closest(".search-select-option");
3495
+ t && (E(t), (o || n)?.focus());
3496
+ }), i.addEventListener("mousemove", (e) => {
3497
+ let t = e.target.closest(".search-select-option");
3498
+ t && g(m().indexOf(t));
3499
+ }), i.addEventListener("mouseleave", () => g(-1)), i.addEventListener("error", (e) => {
3500
+ e.target?.classList?.contains("avatar-img") && e.target.remove();
3501
+ }, !0), n?.addEventListener("input", () => {
3502
+ this._renderOptions(n.value), r && (r.hidden = !n.value), g(-1);
3503
+ }), this._navHandler = h({
3504
+ getVisibleOptions: m,
3505
+ getActive: () => this._active,
3506
+ setActive: (e) => g(e),
3507
+ onEnter: (e) => {
3508
+ e ? E(e) : o?.value.trim() && T(o.value);
3509
+ },
3510
+ onEscape: () => {
3511
+ this._navHandler.clearTypeahead(), x(), o || e.focus();
3512
+ }
3513
+ });
3514
+ let D = (e) => {
3515
+ let t = o || n;
3516
+ if (e.key === "Backspace" && !t?.value && this._values.length) {
3517
+ w(this._values[this._values.length - 1]);
3518
+ return;
3519
+ }
3520
+ this._navHandler.handler(e);
3521
+ };
3522
+ if (n?.addEventListener("keydown", D), r?.addEventListener("click", () => {
3523
+ n.value = "", this._renderOptions(""), r.hidden = !0, n.focus();
3524
+ }), o) {
3525
+ let t = (e) => {
3526
+ e.target !== o && e.preventDefault();
3527
+ };
3528
+ i.addEventListener("mousedown", t), e.addEventListener("mousedown", t), o.addEventListener("focus", () => b()), o.addEventListener("input", () => {
3529
+ this._customError && this._setCustomError(""), this._renderOptions(o.value), b();
3530
+ }), o.addEventListener("keydown", (e) => {
3531
+ if (e.key === "," && o.value.trim()) {
3532
+ e.preventDefault(), T(o.value);
3533
+ return;
3534
+ }
3535
+ if (e.key === "Enter") {
3536
+ if (this._active < 0 && !o.value.trim()) return;
3537
+ this._navHandler.handler(e);
3538
+ return;
3539
+ }
3540
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && !v() && b(), D(e);
3541
+ }), o.addEventListener("paste", (e) => {
3542
+ let t = e.clipboardData?.getData("text/plain") ?? "";
3543
+ xe(t, Ce) && (e.preventDefault(), T(`${o.value}${t}`));
3544
+ }), o.addEventListener("blur", (e) => {
3545
+ e.relatedTarget && this.contains(e.relatedTarget) || (o.value.trim() && T(o.value, { quiet: !0 }), x());
3546
+ });
3547
+ } else e.addEventListener("keydown", (e) => {
3548
+ if (v()) {
3549
+ D(e);
3550
+ return;
3551
+ }
3552
+ (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), b());
3553
+ });
3554
+ this._bindGlobal = () => {
3555
+ this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
3556
+ v() && !this.contains(e.target) && x();
3557
+ }, document.addEventListener("click", this._onDocClick), l(this, () => {
3558
+ v() && d();
3559
+ });
3560
+ }, this._bindGlobal();
3561
+ }
3562
+ _teardown() {
3563
+ this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), u(this), this._navHandler?.teardown();
3564
+ }
3565
+ disconnectedCallback() {
3566
+ this._teardown(), this._ro?.disconnect(), this._ro = null;
3567
+ }
3568
+ }, Ce = [
3569
+ ",",
3570
+ ";",
3571
+ "\n",
3572
+ " "
3573
+ ], we = [
3574
+ ["description", "description"],
3575
+ ["avatar", "avatar"],
3576
+ ["initials", "initials"],
3577
+ ["disabled-hint", "disabledHint"]
3578
+ ], Te = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), Ee = (e) => {
3579
+ let t = String(e ?? "").trim();
3580
+ return /^(https?:)?\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t) ? t : "";
3581
+ }, De = (e) => {
3582
+ let t = Ee(e.avatar);
3583
+ return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${_(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${W(t)}" alt="" />` : ""}</span>`;
3584
+ }, Oe = (e, t, n) => {
3585
+ let r = !!e.disabled, i = e.description ? `<span class="wui-opt-desc">${_(e.description)}</span>` : "", a = e.disabledHint && r ? `<span class="wui-opt-hint">${_(e.disabledHint)}</span>` : "";
3586
+ return `<button type="button" role="option" id="${W(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${x(e)}</span>${i}</span>${a}${De(e)}<span class="ms-check">${m("check")}</span></button>`;
3587
+ }, ke = /* @__PURE__ */ new Map(), Ae = (e) => {
3588
+ if (ke.has(e)) return ke.get(e);
3589
+ let t = null;
3590
+ try {
3591
+ t = RegExp(`^(?:${e})$`, "u");
3592
+ } catch {
3593
+ console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`);
3594
+ }
3595
+ return ke.set(e, t), t;
3596
+ }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), je = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Me = /[^0-9]/g, Ne = /[^0-9a-zA-Z]/g, Pe = class extends e {
3597
+ static formAssociated = !0;
3598
+ static get observedAttributes() {
3599
+ return [
3600
+ "value",
3601
+ "length",
3602
+ "mode",
3603
+ "disabled",
3604
+ "aria-label"
3605
+ ];
3606
+ }
3607
+ get length() {
3608
+ let e = Number.parseInt(this.getAttribute("length") ?? "6", 10);
3609
+ return Number.isFinite(e) && e > 0 ? e : 6;
3610
+ }
3611
+ set length(e) {
3612
+ this.setAttribute("length", String(e));
3613
+ }
3614
+ get mode() {
3615
+ return this.getAttribute("mode") === "alphanumeric" ? "alphanumeric" : "numeric";
3616
+ }
3617
+ set mode(e) {
3618
+ this.setAttribute("mode", String(e ?? "numeric"));
3619
+ }
3620
+ get value() {
3621
+ return this._value ?? "";
3622
+ }
3623
+ set value(e) {
3624
+ this._value = this._clean(e), f(this, this._value), this._paint();
3625
+ }
3626
+ _clean(e) {
3627
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ne : Me, "").slice(0, this.length);
3628
+ }
3629
+ constructor() {
3630
+ super();
3631
+ try {
3632
+ this._internals = this.attachInternals();
3633
+ } catch {
3634
+ this._internals = null;
3635
+ }
3636
+ }
3637
+ connectedCallback() {
3638
+ this._rendered ? this._onSelectionChange && document.addEventListener("selectionchange", this._onSelectionChange) : (this._defaultCaptured ||= (this._defaultValue = this._value, !0), this.render());
3639
+ }
3640
+ formResetCallback() {
3641
+ this._value = this._defaultValue || "", f(this, this._value), this._paint();
3642
+ }
3643
+ attributeChangedCallback(e, t, n) {
3644
+ this._rendered && (e === "value" ? (this._value = this._clean(n), f(this, this._value), this._paint()) : this.render());
3645
+ }
3646
+ render() {
3647
+ this._value = this._clean(this.getAttribute("value") ?? this._value);
3648
+ let e = this.length, t = this.mode === "numeric", n = this.hasAttribute("disabled"), r = Array.from({ length: e }, () => "<span class=\"otp-slot\" aria-hidden=\"true\"></span>").join(""), i = this.getAttribute("aria-label"), a = i ? ` aria-label="${i.replace(/"/g, "&quot;")}"` : "";
3649
+ this.innerHTML = `
3650
+ <div class="otp">
3651
+ <input
3652
+ class="otp-field"
3653
+ type="text"
3654
+ autocomplete="one-time-code"
3655
+ inputmode="${t ? "numeric" : "text"}"
3656
+ ${t ? "pattern=\"[0-9]*\"" : ""}${a}
3657
+ autocapitalize="off"
3658
+ autocorrect="off"
3659
+ spellcheck="false"
3660
+ ${n ? "disabled" : ""} />
3661
+ <div class="otp-slots" aria-hidden="true">${r}</div>
3662
+ </div>`, this._rendered = !0, f(this, this._value), this._wire(), this._paint();
3663
+ }
3664
+ _refs() {
3665
+ return {
3666
+ input: this.querySelector(".otp-field"),
3667
+ slots: [...this.querySelectorAll(".otp-slot")]
3668
+ };
3669
+ }
3670
+ _paint() {
3671
+ let { input: e, slots: t } = this._refs();
3672
+ if (!e || !t.length) return;
3673
+ e.value !== this._value && (e.value = this._value);
3674
+ let n = e.selectionStart ?? this._value.length, r = Math.min(n, t.length - 1), i = document.activeElement === e;
3675
+ t.forEach((e, t) => {
3676
+ e.textContent = this._value[t] ?? "", e.classList.toggle("filled", !!this._value[t]), e.classList.toggle("active", i && t === r);
3677
+ });
3678
+ }
3679
+ _wire() {
3680
+ let { input: e } = this._refs();
3681
+ if (!e) return;
3682
+ let t = (e) => {
3683
+ let t = this._clean(e), n = t !== this._value;
3684
+ this._value = t, f(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
3685
+ bubbles: !0,
3686
+ detail: t
3687
+ }));
3688
+ };
3689
+ e.addEventListener("input", () => {
3690
+ let n = e.value;
3691
+ if (this._value.length === this.length && n.length > this._value.length && n.startsWith(this._value)) {
3692
+ let e = this._clean(n.slice(this._value.length));
3693
+ if (e) {
3694
+ t(e);
3695
+ return;
3696
+ }
3697
+ }
3698
+ t(n);
3699
+ }), e.addEventListener("paste", (e) => {
3700
+ let n = e.clipboardData?.getData("text");
3701
+ n != null && (e.preventDefault(), t(n));
3702
+ });
3703
+ for (let t of [
3704
+ "keyup",
3705
+ "click",
3706
+ "blur",
3707
+ "select"
3708
+ ]) e.addEventListener(t, () => this._paint());
3709
+ e.addEventListener("focus", () => {
3710
+ this._value.length === this.length && e.select(), this._paint();
3711
+ }), this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange), this._onSelectionChange = () => {
3712
+ document.activeElement === e && this._paint();
3713
+ }, document.addEventListener("selectionchange", this._onSelectionChange);
3714
+ }
3715
+ disconnectedCallback() {
3716
+ this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
3717
+ }
3718
+ }, Fe = {
3328
3719
  AD: ["Europe/Andorra"],
3329
3720
  AE: ["Asia/Dubai"],
3330
3721
  AF: ["Asia/Kabul"],
@@ -3726,13 +4117,13 @@ var I = (e, t) => t.some((t) => String(e ?? "").includes(t)), he = class extends
3726
4117
  ZA: ["Africa/Johannesburg"],
3727
4118
  ZM: ["Africa/Lusaka"],
3728
4119
  ZW: ["Africa/Harare"]
3729
- }, Ee = new Set(V.map(([e]) => e)), De = /* @__PURE__ */ new Map();
3730
- for (let [e, t] of Object.entries(Te)) for (let n of t) De.set(n, e);
3731
- function Oe(e) {
3732
- let t = De.get(e);
3733
- return t && Ee.has(t) ? t : null;
4120
+ }, Ie = new Set(M.map(([e]) => e)), Le = /* @__PURE__ */ new Map();
4121
+ for (let [e, t] of Object.entries(Fe)) for (let n of t) Le.set(n, e);
4122
+ function Re(e) {
4123
+ let t = Le.get(e);
4124
+ return t && Ie.has(t) ? t : null;
3734
4125
  }
3735
- function ke(e) {
4126
+ function ze(e) {
3736
4127
  if (!e) return null;
3737
4128
  let t;
3738
4129
  try {
@@ -3740,9 +4131,9 @@ function ke(e) {
3740
4131
  } catch {
3741
4132
  return null;
3742
4133
  }
3743
- return t && Ee.has(t) ? t : null;
4134
+ return t && Ie.has(t) ? t : null;
3744
4135
  }
3745
- function Ae() {
4136
+ function Be() {
3746
4137
  let e;
3747
4138
  try {
3748
4139
  e = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -3750,77 +4141,77 @@ function Ae() {
3750
4141
  e = void 0;
3751
4142
  }
3752
4143
  let t = typeof navigator > "u" ? void 0 : navigator.language;
3753
- return Oe(e) || ke(t) || "IN";
4144
+ return Re(e) || ze(t) || "IN";
3754
4145
  }
3755
4146
  //#endregion
3756
4147
  //#region src/WuiPhone.js
3757
- var U = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, W = null, je = null;
3758
- function Me() {
3759
- return W ? Promise.resolve(W) : (je ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (W = {
4148
+ var Ve = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, G = null, He = null;
4149
+ function Ue() {
4150
+ return G ? Promise.resolve(G) : (He ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (G = {
3760
4151
  AsYouType: e.AsYouType,
3761
4152
  getExampleNumber: e.getExampleNumber,
3762
4153
  isValidPhoneNumber: e.isValidPhoneNumber,
3763
4154
  parsePhoneNumber: e.parsePhoneNumber,
3764
4155
  examples: t.default || t
3765
- }, W)).catch(() => null), je);
4156
+ }, G)).catch(() => null), He);
3766
4157
  }
3767
- function Ne(e, t) {
3768
- let n = `+${H(e)}`;
4158
+ function We(e, t) {
4159
+ let n = `+${N(e)}`;
3769
4160
  return t?.startsWith(n) ? t.slice(n.length).trimStart() : null;
3770
4161
  }
3771
- function G(e, t) {
3772
- if (!W || !t) return t;
4162
+ function K(e, t) {
4163
+ if (!G || !t) return t;
3773
4164
  try {
3774
- return Ne(e, new W.AsYouType(e).input(`+${H(e)}${t}`)) || t;
4165
+ return We(e, new G.AsYouType(e).input(`+${N(e)}${t}`)) || t;
3775
4166
  } catch {
3776
4167
  return t;
3777
4168
  }
3778
4169
  }
3779
- function Pe(e, t) {
4170
+ function Ge(e, t) {
3780
4171
  if (t <= 0) return 0;
3781
4172
  let n = 0;
3782
4173
  for (let r = 0; r < e.length; r++) if (/[0-9]/.test(e[r]) && (n += 1, n === t)) return r + 1;
3783
4174
  return e.length;
3784
4175
  }
3785
- function K(e) {
3786
- if (!W) return null;
4176
+ function q(e) {
4177
+ if (!G) return null;
3787
4178
  try {
3788
- return Ne(e, W.getExampleNumber(e, W.examples)?.formatInternational()) || null;
4179
+ return We(e, G.getExampleNumber(e, G.examples)?.formatInternational()) || null;
3789
4180
  } catch {
3790
4181
  return null;
3791
4182
  }
3792
4183
  }
3793
- function Fe(e) {
3794
- if (!W || !e) return null;
4184
+ function Ke(e) {
4185
+ if (!G || !e) return null;
3795
4186
  try {
3796
- if (!W.isValidPhoneNumber(e)) return !1;
3797
- let t = W.parsePhoneNumber(e)?.getType?.();
4187
+ if (!G.isValidPhoneNumber(e)) return !1;
4188
+ let t = G.parsePhoneNumber(e)?.getType?.();
3798
4189
  return t === void 0 || t === "MOBILE" || t === "FIXED_LINE_OR_MOBILE";
3799
4190
  } catch {
3800
4191
  return null;
3801
4192
  }
3802
4193
  }
3803
- function Ie(e) {
3804
- if (!W) return null;
4194
+ function qe(e) {
4195
+ if (!G) return null;
3805
4196
  try {
3806
- let t = W.getExampleNumber(e, W.examples);
4197
+ let t = G.getExampleNumber(e, G.examples);
3807
4198
  return t?.nationalNumber ? t.nationalNumber.length : null;
3808
4199
  } catch {
3809
4200
  return null;
3810
4201
  }
3811
4202
  }
3812
- function Le(e, t, n) {
4203
+ function Je(e, t, n) {
3813
4204
  try {
3814
- let r = W.parsePhoneNumber(t, e), i = r?.nationalNumber;
4205
+ let r = G.parsePhoneNumber(t, e), i = r?.nationalNumber;
3815
4206
  return !i || r.country !== e || i.length > n || !t.endsWith(i) ? null : i;
3816
4207
  } catch {
3817
4208
  return null;
3818
4209
  }
3819
4210
  }
3820
- function Re(e) {
3821
- if (!W || !e?.trim().startsWith("+")) return null;
4211
+ function Ye(e) {
4212
+ if (!G || !e?.trim().startsWith("+")) return null;
3822
4213
  try {
3823
- let t = new W.AsYouType();
4214
+ let t = new G.AsYouType();
3824
4215
  t.input(e.trim());
3825
4216
  let n = t.getCountry();
3826
4217
  return n ? {
@@ -3831,7 +4222,7 @@ function Re(e) {
3831
4222
  return null;
3832
4223
  }
3833
4224
  }
3834
- var ze = class extends e {
4225
+ var Xe = class extends e {
3835
4226
  static formAssociated = !0;
3836
4227
  static get observedAttributes() {
3837
4228
  return [
@@ -3851,7 +4242,7 @@ var ze = class extends e {
3851
4242
  } catch {
3852
4243
  this._internals = null;
3853
4244
  }
3854
- this._defaultCountry = Ae(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
4245
+ this._defaultCountry = Be(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
3855
4246
  }
3856
4247
  connectedCallback() {
3857
4248
  if (!this._rendered) {
@@ -3878,19 +4269,19 @@ var ze = class extends e {
3878
4269
  this.value = this._defaultValue || "";
3879
4270
  }
3880
4271
  get value() {
3881
- return this._national ? `+${H(this._country)}${this._national}` : "";
4272
+ return this._national ? `+${N(this._country)}${this._national}` : "";
3882
4273
  }
3883
4274
  set value(e) {
3884
- let t = String(e ?? "").trim(), n = Re(t);
4275
+ let t = String(e ?? "").trim(), n = Ye(t);
3885
4276
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
3886
4277
  else if (t.startsWith("+")) {
3887
- let e = t.replace(/[^0-9]/g, ""), n = String(H(this._country));
4278
+ let e = t.replace(/[^0-9]/g, ""), n = String(N(this._country));
3888
4279
  n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
3889
4280
  } else this._national = t.replace(/[^0-9]/g, "");
3890
4281
  n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
3891
4282
  }
3892
4283
  _syncMirror() {
3893
- d(this, this.value);
4284
+ f(this, this.value);
3894
4285
  }
3895
4286
  _emitInput() {
3896
4287
  this.dispatchEvent(new Event("input", { bubbles: !0 }));
@@ -3900,27 +4291,27 @@ var ze = class extends e {
3900
4291
  }
3901
4292
  render() {
3902
4293
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
3903
- let e = this.getAttribute("placeholder") || K(this._country) || "Enter phone number";
4294
+ let e = this.getAttribute("placeholder") || q(this._country) || "Enter phone number";
3904
4295
  this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
3905
4296
  let t = `${this.id}-listbox`;
3906
4297
  this._listboxId = t;
3907
- let n = V.map(([e, n, r], i) => `<button type="button" role="option" id="${q(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${U(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
4298
+ let n = M.map(([e, n, r], i) => `<button type="button" role="option" id="${J(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${Ve(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
3908
4299
  this.innerHTML = `
3909
4300
  <div class="phone-input-wrap">
3910
4301
  <div class="phone-country-adornment">
3911
- <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${q(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
3912
- <span class="${U(this._country)}" data-flag aria-hidden="true"></span>
3913
- ${p("chevron-down", { className: "phone-chevron" })}
3914
- <span class="phone-dial" data-dial>+${H(this._country)}</span>
4302
+ <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${J(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
4303
+ <span class="${Ve(this._country)}" data-flag aria-hidden="true"></span>
4304
+ ${m("chevron-down", { className: "phone-chevron" })}
4305
+ <span class="phone-dial" data-dial>+${N(this._country)}</span>
3915
4306
  </button>
3916
- <div class="country-dropdown-menu" role="listbox" id="${q(t)}" tabindex="-1" hidden>
3917
- <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${p("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${q(t)}" aria-autocomplete="list" /></div>
4307
+ <div class="country-dropdown-menu" role="listbox" id="${J(t)}" tabindex="-1" hidden>
4308
+ <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${m("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${J(t)}" aria-autocomplete="list" /></div>
3918
4309
  <div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
3919
4310
  </div>
3920
4311
  </div>
3921
- <input type="tel" class="input" placeholder="${q(e)}" value="${q(G(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${q(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${q(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
4312
+ <input type="tel" class="input" placeholder="${J(e)}" value="${J(K(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${J(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${J(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
3922
4313
  </div>
3923
- <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, d(this, this.value), this._wire();
4314
+ <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, f(this, this.value), this._wire();
3924
4315
  }
3925
4316
  _itemEls() {
3926
4317
  return [...this.querySelectorAll(".country-dropdown-item")];
@@ -3930,9 +4321,9 @@ var ze = class extends e {
3930
4321
  }
3931
4322
  _wire() {
3932
4323
  this._teardown();
3933
- let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), u = this.querySelector("[data-flag]"), d = this.querySelector("[data-dial]");
4324
+ let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), s = this.querySelector("[data-flag]"), d = this.querySelector("[data-dial]");
3934
4325
  if (!e || !n) return;
3935
- let f = () => !n.hidden, p = () => s(t || e, n), m = (e) => {
4326
+ let f = () => !n.hidden, p = () => c(t || e, n), m = (e) => {
3936
4327
  let t = this._visibleItems();
3937
4328
  this._active = e;
3938
4329
  for (let e of this._itemEls()) e.classList.remove("is-active");
@@ -3949,12 +4340,12 @@ var ze = class extends e {
3949
4340
  }
3950
4341
  a && (a.hidden = n > 0);
3951
4342
  }, v = (e) => {
3952
- this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), u && (u.className = U(e)), d && (d.textContent = `+${H(e)}`);
4343
+ this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = Ve(e)), d && (d.textContent = `+${N(e)}`);
3953
4344
  for (let t of this._itemEls()) {
3954
4345
  let n = t.dataset.iso === e;
3955
4346
  t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
3956
4347
  }
3957
- !this.getAttribute("placeholder") && o && (o.placeholder = K(e) || "Enter phone number"), o && this._national && (o.value = G(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
4348
+ !this.getAttribute("placeholder") && o && (o.placeholder = q(e) || "Enter phone number"), o && this._national && (o.value = K(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
3958
4349
  }, y = (t) => {
3959
4350
  let n = this._visibleItems();
3960
4351
  if (t.key === "ArrowDown") {
@@ -3988,7 +4379,7 @@ var ze = class extends e {
3988
4379
  let b = this.querySelector("[data-phone-error]"), x = (e) => {
3989
4380
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), b) {
3990
4381
  if (e) {
3991
- let e = K(this._country);
4382
+ let e = q(this._country);
3992
4383
  b.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
3993
4384
  }
3994
4385
  b.hidden = !e;
@@ -3996,35 +4387,35 @@ var ze = class extends e {
3996
4387
  };
3997
4388
  o.addEventListener("input", (e) => {
3998
4389
  e.stopPropagation();
3999
- let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = Ie(this._country);
4390
+ let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = qe(this._country);
4000
4391
  if (i && r.length > i) {
4001
- let e = Le(this._country, r, i);
4392
+ let e = Je(this._country, r, i);
4002
4393
  e ? (n = Math.max(0, n - (r.length - e.length)), r = e) : r = r.slice(0, i);
4003
4394
  }
4004
4395
  this._national = r;
4005
- let a = G(this._country, this._national);
4396
+ let a = K(this._country, this._national);
4006
4397
  if (o.value !== a) {
4007
4398
  o.value = a;
4008
- let e = Pe(a, Math.min(n, r.length));
4399
+ let e = Ge(a, Math.min(n, r.length));
4009
4400
  o.setSelectionRange(e, e);
4010
4401
  }
4011
- this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || Fe(this.value) === !0) && x(!1);
4402
+ this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || Ke(this.value) === !0) && x(!1);
4012
4403
  }), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
4013
- x(this._national.length > 0 && Fe(this.value) === !1), this.value !== this._committedValue && this._emitChange();
4404
+ x(this._national.length > 0 && Ke(this.value) === !1), this.value !== this._committedValue && this._emitChange();
4014
4405
  }), o.addEventListener("paste", (e) => {
4015
- let t = Re(e.clipboardData?.getData("text"));
4016
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = G(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
4406
+ let t = Ye(e.clipboardData?.getData("text"));
4407
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = K(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
4017
4408
  }), this._bindGlobal = () => {
4018
4409
  this._teardownGlobals?.(), this._onDocClick = (e) => {
4019
4410
  f() && !this.contains(e.target) && g();
4020
- }, document.addEventListener("click", this._onDocClick), c(this, () => {
4411
+ }, document.addEventListener("click", this._onDocClick), l(this, () => {
4021
4412
  f() && p();
4022
4413
  });
4023
4414
  }, this._teardownGlobals = () => {
4024
- this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), l(this);
4025
- }, this._bindGlobal(), Me().then((e) => {
4026
- if (!(!e || !o.isConnected) && (this._national && (o.value = G(this._country, this._national)), !this.getAttribute("placeholder"))) {
4027
- let e = K(this._country);
4415
+ this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), u(this);
4416
+ }, this._bindGlobal(), Ue().then((e) => {
4417
+ if (!(!e || !o.isConnected) && (this._national && (o.value = K(this._country, this._national)), !this.getAttribute("placeholder"))) {
4418
+ let e = q(this._country);
4028
4419
  e && (o.placeholder = e);
4029
4420
  }
4030
4421
  }), this._syncMirror();
@@ -4035,213 +4426,7 @@ var ze = class extends e {
4035
4426
  disconnectedCallback() {
4036
4427
  this._teardown();
4037
4428
  }
4038
- }, q = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Be = class extends e {
4039
- static formAssociated = !0;
4040
- static get observedAttributes() {
4041
- return [
4042
- "value",
4043
- "placeholder",
4044
- "search-placeholder",
4045
- "searchable",
4046
- "disabled",
4047
- "compact",
4048
- "size",
4049
- "clearable",
4050
- "icon",
4051
- "prefix",
4052
- "aria-label",
4053
- "aria-invalid"
4054
- ];
4055
- }
4056
- _accessibleName() {
4057
- return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
4058
- }
4059
- constructor() {
4060
- super();
4061
- try {
4062
- this._internals = this.attachInternals();
4063
- } catch {
4064
- this._internals = null;
4065
- }
4066
- this._value = "", this._optionsProp = null, this._active = -1, this._typeahead = "", this._typeaheadTimer = null;
4067
- }
4068
- connectedCallback() {
4069
- if (!this._rendered) {
4070
- this.render();
4071
- return;
4072
- }
4073
- this._bindGlobal?.();
4074
- }
4075
- attributeChangedCallback(e, t, n) {
4076
- if (e === "value") {
4077
- this.value = n;
4078
- return;
4079
- }
4080
- if (e === "aria-invalid") {
4081
- this._syncInvalid();
4082
- return;
4083
- }
4084
- this._rendered && this.render();
4085
- }
4086
- _syncInvalid() {
4087
- let e = this.querySelector(".search-select-control");
4088
- e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
4089
- }
4090
- formResetCallback() {
4091
- this.value = this._defaultValue || "";
4092
- }
4093
- get value() {
4094
- return this._value;
4095
- }
4096
- set value(e) {
4097
- this._value = e == null ? "" : String(e), d(this, this._value), this._syncSelected(), this._syncReset();
4098
- }
4099
- set options(e) {
4100
- this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
4101
- }
4102
- get options() {
4103
- return this._readOptions();
4104
- }
4105
- _snapshotDeclared() {
4106
- if (this._declared) return;
4107
- let e = [...this.querySelectorAll(":scope > wui-option")];
4108
- e.length && (this._declared = e.map((e) => ({
4109
- value: e.getAttribute("value") ?? e.textContent.trim(),
4110
- label: e.innerHTML,
4111
- icon: e.getAttribute("icon") || void 0,
4112
- [h]: !0,
4113
- selected: e.hasAttribute("selected")
4114
- })));
4115
- }
4116
- _readOptions() {
4117
- return this._optionsProp ? this._optionsProp : (this._snapshotDeclared(), this._declared || []);
4118
- }
4119
- render() {
4120
- this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._snapshotDeclared();
4121
- let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
4122
- l && (this._value = String(l.value)), d(this, this._value), this.id ||= `wui-select-${Math.random().toString(36).slice(2, 9)}`;
4123
- let u = `${this.id}-listbox`;
4124
- this._listboxId = u;
4125
- let f = e.map((e, t) => {
4126
- let n = String(e.value) === String(this._value);
4127
- return `<button type="button" role="option" id="${J(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${n}">${v(e)}</button>`;
4128
- }).join("");
4129
- this.innerHTML = `
4130
- <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
4131
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${J(u)}" aria-label="${J(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
4132
- ${a ? p(a, { className: "search-select-icon" }) : ""}
4133
- ${o ? `<span class="search-select-prefix">${g(o)}</span>` : ""}
4134
- <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? v(l) : g(s)}</span>
4135
- ${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${p("x")}</span>` : ""}
4136
- ${p("chevron-down", { className: "search-select-caret" })}
4137
- </button>
4138
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${J(u)}" tabindex="-1" hidden>
4139
- ${t ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${J(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
4140
- <div class="search-select-options">${f}<div class="search-select-empty" hidden>No matches</div></div>
4141
- </div>
4142
- </div>`, this._rendered = !0, d(this, this._value), this._wire(), this._syncReset();
4143
- }
4144
- _refs() {
4145
- return {
4146
- control: this.querySelector(".search-select-control"),
4147
- menu: this.querySelector(".search-select-menu"),
4148
- label: this.querySelector("[data-label]"),
4149
- reset: this.querySelector(".search-select-reset"),
4150
- search: this.querySelector(".search-select-input"),
4151
- clear: this.querySelector(".search-select-clear"),
4152
- empty: this.querySelector(".search-select-empty"),
4153
- optionsWrap: this.querySelector(".search-select-options")
4154
- };
4155
- }
4156
- _optionEls() {
4157
- return [...this.querySelectorAll(".search-select-option")];
4158
- }
4159
- _visible() {
4160
- return this._optionEls().filter((e) => !e.hidden);
4161
- }
4162
- _syncSelected() {
4163
- let { label: e } = this._refs(), t = this._readOptions().find((e) => String(e.value) === String(this._value));
4164
- for (let e of this._optionEls()) {
4165
- let t = e.dataset.value === String(this._value);
4166
- e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
4167
- }
4168
- e && (e.innerHTML = t ? v(t) : g(this.getAttribute("placeholder") || "Select..."), e.classList.toggle("search-select-placeholder", !t));
4169
- }
4170
- _syncReset() {
4171
- let { reset: e } = this._refs();
4172
- e && (e.hidden = !(this.hasAttribute("clearable") && this._value !== "" && !this.hasAttribute("disabled")));
4173
- }
4174
- _wire() {
4175
- this._teardown();
4176
- let e = this._refs();
4177
- if (!e.control || !e.menu) return;
4178
- let t = () => {
4179
- if (this.hasAttribute("compact")) {
4180
- let t = e.control.getBoundingClientRect();
4181
- e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", s(e.control, e.menu);
4182
- } else s(e.control, e.menu, { matchWidth: !0 });
4183
- }, n = (t) => {
4184
- let n = this._visible();
4185
- this._active = t;
4186
- for (let e of this._optionEls()) e.classList.remove("is-active");
4187
- t >= 0 && n[t] ? (n[t].classList.add("is-active"), n[t].scrollIntoView({ block: "nearest" }), e.control.setAttribute("aria-activedescendant", n[t].id)) : e.control.removeAttribute("aria-activedescendant");
4188
- }, r = (n) => {
4189
- let r = n.trim().toLowerCase(), i = 0;
4190
- for (let e of this._optionEls()) {
4191
- let t = !r || e.textContent.toLowerCase().includes(r);
4192
- e.hidden = !t, t && (i += 1);
4193
- }
4194
- e.empty && (e.empty.hidden = i > 0), e.clear && (e.clear.hidden = !r), e.menu.hidden || t();
4195
- }, i = () => !e.menu.hidden, a = () => {
4196
- e.menu.hidden = !1, e.control.setAttribute("aria-expanded", "true"), e.control.classList.add("open"), t(), e.search && (e.search.value = "", r(""), e.search.focus()), n(this._optionEls().findIndex((e) => e.classList.contains("selected")));
4197
- }, o = () => {
4198
- e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), n(-1);
4199
- }, l = (t) => {
4200
- this.value = t.dataset.value, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.control.focus();
4201
- };
4202
- this._navHandler = m({
4203
- getVisibleOptions: () => this._visible(),
4204
- getActive: () => this._active,
4205
- setActive: (e) => n(e),
4206
- onEnter: (e) => {
4207
- e && l(e);
4208
- },
4209
- onEscape: () => {
4210
- this._navHandler.clearTypeahead(), o(), e.control.focus();
4211
- }
4212
- }), e.reset?.addEventListener("click", (t) => {
4213
- t.stopPropagation(), this.value = "", this.dispatchEvent(new Event("change", { bubbles: !0 })), e.control.focus();
4214
- }), e.control.addEventListener("click", () => i() ? o() : a()), e.control.addEventListener("keydown", (e) => {
4215
- if (i()) {
4216
- this._navHandler.handler(e);
4217
- return;
4218
- }
4219
- (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
4220
- }), e.optionsWrap.addEventListener("click", (e) => {
4221
- let t = e.target.closest(".search-select-option");
4222
- t && l(t);
4223
- }), e.optionsWrap.addEventListener("mousemove", (e) => {
4224
- let t = e.target.closest(".search-select-option");
4225
- t && n(this._visible().indexOf(t));
4226
- }), e.optionsWrap.addEventListener("mouseleave", () => n(-1)), e.search?.addEventListener("input", () => {
4227
- r(e.search.value), n(-1);
4228
- }), e.clear?.addEventListener("click", () => {
4229
- e.search.value = "", r(""), e.search.focus();
4230
- }), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
4231
- this._teardown(), this._onDocClick = (e) => {
4232
- i() && !this.contains(e.target) && o();
4233
- }, document.addEventListener("click", this._onDocClick), c(this, () => {
4234
- i() && t();
4235
- });
4236
- }, this._bindGlobal();
4237
- }
4238
- _teardown() {
4239
- this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), l(this), this._navHandler?.teardown();
4240
- }
4241
- disconnectedCallback() {
4242
- this._teardown();
4243
- }
4244
- }, J = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ve = class extends e {
4429
+ }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ze = class extends e {
4245
4430
  static formAssociated = !0;
4246
4431
  static get observedAttributes() {
4247
4432
  return [
@@ -4386,7 +4571,7 @@ var ze = class extends e {
4386
4571
  aria-valuenow="${this._value}"
4387
4572
  aria-valuetext="${this._formatValue(this._value)}"
4388
4573
  ${a ? "disabled" : ""}
4389
- aria-label="${He(this.getAttribute("aria-label") || "Value")}"
4574
+ aria-label="${Qe(this.getAttribute("aria-label") || "Value")}"
4390
4575
  ></button>
4391
4576
  `}
4392
4577
  ${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
@@ -4421,7 +4606,7 @@ var ze = class extends e {
4421
4606
  this._isRange() ? this._syncRangeMirrors() : this._syncSingleMirror();
4422
4607
  }
4423
4608
  _syncSingleMirror() {
4424
- this.getAttribute("name") && d(this, String(this._value));
4609
+ this.getAttribute("name") && f(this, String(this._value));
4425
4610
  }
4426
4611
  _syncRangeMirrors() {
4427
4612
  let e = this.getAttribute("start-name") || this.getAttribute("name"), t = this.getAttribute("end-name");
@@ -4491,7 +4676,7 @@ var ze = class extends e {
4491
4676
  }, Y = (e, t) => {
4492
4677
  let n = Number.parseFloat(e);
4493
4678
  return Number.isFinite(n) ? n : t;
4494
- }, He = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ue = class extends e {
4679
+ }, Qe = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), $e = class extends e {
4495
4680
  static formAssociated = !0;
4496
4681
  _accessibleName() {
4497
4682
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
@@ -4557,17 +4742,17 @@ var ze = class extends e {
4557
4742
  return this._values.slice();
4558
4743
  }
4559
4744
  set values(e) {
4560
- this._values = Array.isArray(e) ? e.map(String) : [], d(this, this._values.join(",")), this._rendered && this._renderControl();
4745
+ this._values = Array.isArray(e) ? e.map(String) : [], f(this, this._values.join(",")), this._rendered && this._renderControl();
4561
4746
  }
4562
4747
  render() {
4563
4748
  let e = this.getAttribute("size"), t = e === "sm" ? " search-select-sm" : e === "lg" ? " search-select-lg" : "";
4564
- d(this, this._values.join(",")), this.innerHTML = `
4749
+ f(this, this._values.join(",")), this.innerHTML = `
4565
4750
  <div class="search-select${t}">
4566
4751
  <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
4567
4752
  <input type="text" class="ms-input" data-input aria-label="${X(this._accessibleName())}" placeholder="${X(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
4568
4753
  <div class="ms-chips" data-chips></div>
4569
4754
  </div>
4570
- </div>`, this._rendered = !0, d(this, this._values.join(",")), this._renderControl(), this._wire();
4755
+ </div>`, this._rendered = !0, f(this, this._values.join(",")), this._renderControl(), this._wire();
4571
4756
  }
4572
4757
  _renderControl() {
4573
4758
  let e = this.querySelector("[data-chips]");
@@ -4576,15 +4761,15 @@ var ze = class extends e {
4576
4761
  e.innerHTML = "";
4577
4762
  return;
4578
4763
  }
4579
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${We(e)}</span><button type="button" class="chip-remove" data-remove="${X(e)}" aria-label="Remove ${X(e)}">${p("x")}</button></span>`).join("");
4764
+ e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${et(e)}</span><button type="button" class="chip-remove" data-remove="${X(e)}" aria-label="Remove ${X(e)}">${m("x")}</button></span>`).join("");
4580
4765
  }
4581
4766
  }
4582
4767
  _wire() {
4583
4768
  this._teardown();
4584
4769
  let e = this.querySelector(".search-select-control"), t = this.querySelector("[data-input]");
4585
4770
  if (!e || !t) return;
4586
- let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(fe).filter(Boolean)), s = () => {
4587
- d(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
4771
+ let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(ve).filter(Boolean)), s = () => {
4772
+ f(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
4588
4773
  }, c = (e) => {
4589
4774
  let t = e.trim();
4590
4775
  if (!t || i && this._values.length >= parseInt(i, 10)) return;
@@ -4611,13 +4796,13 @@ var ze = class extends e {
4611
4796
  return;
4612
4797
  }
4613
4798
  e.key === "Backspace" && !t.value && this._values.length && (e.preventDefault(), l(this._values[this._values.length - 1])), e.key === "Escape" && (t.value = "");
4614
- }, f = (e) => {
4799
+ }, d = (e) => {
4615
4800
  e.preventDefault();
4616
4801
  let n = e.clipboardData.getData("text/plain"), a = [];
4617
4802
  for (let e of r) {
4618
- let t = pe(e) ?? e;
4619
- if (I(n, [t])) {
4620
- a.push(...me(n, [t]));
4803
+ let t = ye(e) ?? e;
4804
+ if (xe(n, [t])) {
4805
+ a.push(...be(n, [t]));
4621
4806
  break;
4622
4807
  }
4623
4808
  }
@@ -4633,7 +4818,7 @@ var ze = class extends e {
4633
4818
  return;
4634
4819
  }
4635
4820
  t.focus();
4636
- }, this._onInputKey = u, this._onInputPaste = f, e.addEventListener("click", this._onControlClick), t.addEventListener("keydown", this._onInputKey), t.addEventListener("paste", this._onInputPaste), this._onDocClick = (e) => {
4821
+ }, this._onInputKey = u, this._onInputPaste = d, e.addEventListener("click", this._onControlClick), t.addEventListener("keydown", this._onInputKey), t.addEventListener("paste", this._onInputPaste), this._onDocClick = (e) => {
4637
4822
  this.contains(e.target) || t.blur();
4638
4823
  }, document.addEventListener("click", this._onDocClick);
4639
4824
  }
@@ -4645,18 +4830,18 @@ var ze = class extends e {
4645
4830
  disconnectedCallback() {
4646
4831
  this._teardown();
4647
4832
  }
4648
- }, We = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ge = (e) => String(e).padStart(2, "0"), Ke = (e, t) => `${Ge(e)}:${Ge(t)}`, Z = (e) => {
4833
+ }, et = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), tt = (e) => String(e).padStart(2, "0"), nt = (e, t) => `${tt(e)}:${tt(t)}`, Z = (e) => {
4649
4834
  let t = /^(\d{2}):(\d{2})$/.exec(e || "");
4650
4835
  return t ? {
4651
4836
  h: +t[1],
4652
4837
  m: +t[2]
4653
4838
  } : null;
4654
- }, qe = (e, t = "24") => {
4839
+ }, rt = (e, t = "24") => {
4655
4840
  if (!e) return "";
4656
- if (t === "24") return Ke(e.h, e.m);
4841
+ if (t === "24") return nt(e.h, e.m);
4657
4842
  let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
4658
- return `${n}:${Ge(e.m)} ${r}`;
4659
- }, Je = class extends e {
4843
+ return `${n}:${tt(e.m)} ${r}`;
4844
+ }, it = class extends e {
4660
4845
  static formAssociated = !0;
4661
4846
  static get observedAttributes() {
4662
4847
  return [
@@ -4708,28 +4893,28 @@ var ze = class extends e {
4708
4893
  return this._value;
4709
4894
  }
4710
4895
  set value(e) {
4711
- this._value = e || "", d(this, this._value), this._syncTrigger();
4896
+ this._value = e || "", f(this, this._value), this._syncTrigger();
4712
4897
  }
4713
4898
  render() {
4714
4899
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
4715
4900
  let e = this.getAttribute("placeholder") || "Select time", t = Z(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
4716
4901
  this.innerHTML = `
4717
4902
  <div class="timepicker">
4718
- <button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${g(a)}"` : ""}${o ? ` aria-describedby="${g(o)}"` : ""}>
4719
- <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? qe(t, n) : g(e)}</span>
4720
- ${p("clock")}
4903
+ <button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${_(a)}"` : ""}${o ? ` aria-describedby="${_(o)}"` : ""}>
4904
+ <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? rt(t, n) : _(e)}</span>
4905
+ ${m("clock")}
4721
4906
  </button>
4722
4907
  <div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
4723
- </div>`, this._rendered = !0, d(this, this._value), this._wire();
4908
+ </div>`, this._rendered = !0, f(this, this._value), this._wire();
4724
4909
  }
4725
4910
  _syncFormValue() {
4726
- d(this, this._value);
4911
+ f(this, this._value);
4727
4912
  }
4728
4913
  _syncTrigger() {
4729
4914
  let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
4730
4915
  if (!t) return;
4731
4916
  let n = Z(this._value), r = this.getAttribute("format") || "24";
4732
- t.textContent = n ? qe(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4917
+ t.textContent = n ? rt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4733
4918
  }
4734
4919
  _buildTimes() {
4735
4920
  let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = Z(t) || {
@@ -4750,8 +4935,8 @@ var ze = class extends e {
4750
4935
  if (!e) return;
4751
4936
  let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Z(this._value), i = this._focus, a = "";
4752
4937
  for (let e = 0; e < n.length; e++) {
4753
- let o = n[e], s = Ke(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4754
- a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${qe(o, t)}</button>`;
4938
+ let o = n[e], s = nt(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4939
+ a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${rt(o, t)}</button>`;
4755
4940
  }
4756
4941
  e.innerHTML = a, this._focusActive();
4757
4942
  }
@@ -4760,7 +4945,7 @@ var ze = class extends e {
4760
4945
  t && !e.hidden && t.focus();
4761
4946
  }
4762
4947
  _position(e, t) {
4763
- s(e, t);
4948
+ c(e, t);
4764
4949
  }
4765
4950
  _onKey(e) {
4766
4951
  let t = [...this.querySelector(".timepicker-pop").querySelectorAll(".timepicker-option")];
@@ -4838,18 +5023,18 @@ var ze = class extends e {
4838
5023
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
4839
5024
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
4840
5025
  r() && e.key === "Escape" && this._close();
4841
- }, document.addEventListener("keydown", this._onDocKey), c(this, () => {
5026
+ }, document.addEventListener("keydown", this._onDocKey), l(this, () => {
4842
5027
  r() && this._position(e, t);
4843
5028
  });
4844
5029
  }, this._bindGlobal(), this._syncFormValue();
4845
5030
  }
4846
5031
  _teardown() {
4847
- this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), l(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
5032
+ this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), u(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
4848
5033
  }
4849
5034
  disconnectedCallback() {
4850
5035
  this._teardown();
4851
5036
  }
4852
- }, Ye = "wui-wizard-step", Xe = class extends e {
5037
+ }, at = "wui-wizard-step", ot = class extends e {
4853
5038
  static get observedAttributes() {
4854
5039
  return [
4855
5040
  "active",
@@ -4883,7 +5068,7 @@ var ze = class extends e {
4883
5068
  this._beforeNext = typeof e == "function" ? e : null;
4884
5069
  }
4885
5070
  get _steps() {
4886
- return [...this.querySelectorAll(`:scope > ${Ye}`)];
5071
+ return [...this.querySelectorAll(`:scope > ${at}`)];
4887
5072
  }
4888
5073
  refresh() {
4889
5074
  this._rendered && this._renderChrome();
@@ -4922,7 +5107,7 @@ var ze = class extends e {
4922
5107
  }
4923
5108
  _reconcileSteps() {
4924
5109
  let e = this._steps, t = this._known;
4925
- if (this._known = e, Ze(e, t)) return e;
5110
+ if (this._known = e, st(e, t)) return e;
4926
5111
  let n = (n) => new Set([...n].map((n) => e.indexOf(t[n])).filter((e) => e >= 0));
4927
5112
  this._skipped = n(this._skipped), this._invalid = n(this._invalid);
4928
5113
  let r = t[this._active];
@@ -4942,7 +5127,7 @@ var ze = class extends e {
4942
5127
  _onStepsMutated() {
4943
5128
  if (!this._rendered) return;
4944
5129
  let e = this._steps;
4945
- (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && Ze(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
5130
+ (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && st(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
4946
5131
  }
4947
5132
  _syncPanels(e) {
4948
5133
  e.forEach((e, t) => {
@@ -4965,14 +5150,14 @@ var ze = class extends e {
4965
5150
  let i = this.hasAttribute("non-linear");
4966
5151
  return e.map((e, r) => {
4967
5152
  let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
4968
- u = a === "done" ? p("check") : a === "error" ? p("alert-triangle") : a === "skipped" ? p("minus") : c ? p(c) : String(l);
4969
- let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", m = i || r < this._active, h = s ? `<span class="step-desc">${Q(s)}</span>` : "", g;
4970
- return g = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}` : `<span class="step-circle">${u}</span><span class="step-label">${Q(o)}</span>${h}`, m ? `<button type="button" class="${d}" data-step="${r}"${f}>${g}</button>` : `<div class="${d}"${f}>${g}</div>`;
5153
+ u = a === "done" ? m("check") : a === "error" ? m("alert-triangle") : a === "skipped" ? m("minus") : c ? m(c) : String(l);
5154
+ let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, h = s ? `<span class="step-desc">${Q(s)}</span>` : "", g;
5155
+ return g = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}` : `<span class="step-circle">${u}</span><span class="step-label">${Q(o)}</span>${h}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${g}</button>` : `<div class="${d}"${f}>${g}</div>`;
4971
5156
  }).join("");
4972
5157
  }
4973
5158
  _footerHtml(e) {
4974
5159
  let t = this._active, n = e.length - 1, r = this.hasAttribute("disabled") ? " disabled" : "", i = e[t]?.hasAttribute("optional") || this.hasAttribute("skippable"), a = this.getAttribute("back-label") || "Back", o = this.getAttribute("next-label") || "Next", s = this.getAttribute("skip-label") || "Skip", c = this.getAttribute("finish-label") || "Finish";
4975
- return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${p("arrow-left", { className: "me-2" })}${Q(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Q(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Q(o)}${p("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Q(c)}</button>`}</span>`;
5160
+ return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${m("arrow-left", { className: "me-2" })}${Q(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Q(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Q(o)}${m("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Q(c)}</button>`}</span>`;
4976
5161
  }
4977
5162
  _wire() {
4978
5163
  this._teardown(), this._onHeaderClick = (e) => {
@@ -5046,7 +5231,7 @@ var ze = class extends e {
5046
5231
  _reflectActive(e) {
5047
5232
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
5048
5233
  }
5049
- }, Ze = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Q = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Qe = class extends e {
5234
+ }, st = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Q = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ct = class extends e {
5050
5235
  static get observedAttributes() {
5051
5236
  return [
5052
5237
  "label",
@@ -5060,8 +5245,8 @@ var ze = class extends e {
5060
5245
  let e = this.closest("wui-wizard");
5061
5246
  e && typeof e.refresh == "function" && e.refresh();
5062
5247
  }
5063
- }, $e = 2e3;
5064
- async function et(e) {
5248
+ }, lt = 2e3;
5249
+ async function ut(e) {
5065
5250
  try {
5066
5251
  if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
5067
5252
  } catch {}
@@ -5076,14 +5261,14 @@ async function et(e) {
5076
5261
  }
5077
5262
  //#endregion
5078
5263
  //#region src/fileValidation.js
5079
- var tt = "image/png,image/jpeg,image/webp", nt = 5, rt = {
5264
+ var dt = "image/png,image/jpeg,image/webp", ft = 5, pt = {
5080
5265
  "image/png": [".png"],
5081
5266
  "image/jpeg": [".jpg", ".jpeg"],
5082
5267
  "image/webp": [".webp"],
5083
5268
  "image/gif": [".gif"],
5084
5269
  "image/svg+xml": [".svg"],
5085
5270
  "application/pdf": [".pdf"]
5086
- }, it = {
5271
+ }, mt = {
5087
5272
  "image/png": "PNG",
5088
5273
  "image/jpeg": "JPG",
5089
5274
  "image/webp": "WEBP",
@@ -5097,7 +5282,7 @@ var tt = "image/png,image/jpeg,image/webp", nt = 5, rt = {
5097
5282
  ".gif": "GIF",
5098
5283
  ".svg": "SVG",
5099
5284
  ".pdf": "PDF"
5100
- }, at = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), ot = [
5285
+ }, ht = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), gt = [
5101
5286
  ".png",
5102
5287
  ".jpg",
5103
5288
  ".jpeg",
@@ -5108,54 +5293,54 @@ var tt = "image/png,image/jpeg,image/webp", nt = 5, rt = {
5108
5293
  ".avif",
5109
5294
  ".heic"
5110
5295
  ];
5111
- function st(e) {
5296
+ function _t(e) {
5112
5297
  if (!e) return !1;
5113
5298
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
5114
5299
  if (t) return t.startsWith("image/");
5115
5300
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
5116
- return ot.some((e) => r.endsWith(e));
5301
+ return gt.some((e) => r.endsWith(e));
5117
5302
  }
5118
- function ct(e) {
5119
- let t = at(e);
5120
- return t.length ? t.every((e) => e.startsWith(".") ? ot.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
5303
+ function vt(e) {
5304
+ let t = ht(e);
5305
+ return t.length ? t.every((e) => e.startsWith(".") ? gt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
5121
5306
  }
5122
- function lt(e) {
5307
+ function yt(e) {
5123
5308
  let t = [];
5124
- for (let n of at(e)) {
5125
- let e = it[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
5309
+ for (let n of ht(e)) {
5310
+ let e = mt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
5126
5311
  t.includes(e) || t.push(e);
5127
5312
  }
5128
5313
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
5129
5314
  }
5130
- function ut(e, t) {
5131
- let n = at(t);
5315
+ function bt(e, t) {
5316
+ let n = ht(t);
5132
5317
  if (!n.length) return !0;
5133
5318
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
5134
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (rt[e] || []).some((e) => i.endsWith(e)));
5319
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (pt[e] || []).some((e) => i.endsWith(e)));
5135
5320
  }
5136
- function dt(e, t = {}) {
5321
+ function xt(e, t = {}) {
5137
5322
  if (!e) return null;
5138
- let n = t.accept === void 0 ? tt : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
5139
- return ut(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${lt(n)} file.`;
5323
+ let n = t.accept === void 0 ? dt : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
5324
+ return bt(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${yt(n)} file.`;
5140
5325
  }
5141
5326
  //#endregion
5142
5327
  //#region src/passwordRules.js
5143
- var ft = {
5328
+ var St = {
5144
5329
  minLength: 8,
5145
5330
  uppercase: !0,
5146
5331
  lowercase: !0,
5147
5332
  digit: !0,
5148
5333
  special: !0,
5149
5334
  uniqueChars: 0
5150
- }, pt = "Password Requirements";
5151
- function mt(e) {
5152
- return e === !0 || e == null ? { ...ft } : {
5153
- ...ft,
5335
+ }, Ct = "Password Requirements";
5336
+ function wt(e) {
5337
+ return e === !0 || e == null ? { ...St } : {
5338
+ ...St,
5154
5339
  ...e
5155
5340
  };
5156
5341
  }
5157
- function ht(e) {
5158
- let t = mt(e), n = [];
5342
+ function Tt(e) {
5343
+ let t = wt(e), n = [];
5159
5344
  if (t.minLength > 0 && n.push({
5160
5345
  key: "length",
5161
5346
  label: `At least ${t.minLength} characters long`,
@@ -5186,25 +5371,25 @@ function ht(e) {
5186
5371
  }
5187
5372
  return n;
5188
5373
  }
5189
- function gt(e, t) {
5374
+ function Et(e, t) {
5190
5375
  let n = e == null ? "" : String(e);
5191
- return ht(t).map((e) => ({
5376
+ return Tt(t).map((e) => ({
5192
5377
  key: e.key,
5193
5378
  label: e.label,
5194
5379
  met: e.test(n)
5195
5380
  }));
5196
5381
  }
5197
- function _t(e, t) {
5198
- return gt(e, t).every((e) => e.met);
5382
+ function Dt(e, t) {
5383
+ return Et(e, t).every((e) => e.met);
5199
5384
  }
5200
5385
  //#endregion
5201
5386
  //#region src/index.js
5202
5387
  var $ = (e, t) => {
5203
5388
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
5204
5389
  };
5205
- function vt() {
5206
- $("wui-select", Be), $("wui-phone", ze), $("wui-datepicker", oe), $("wui-date-range", se), $("wui-dock", ce), $("wui-consent-banner", re), $("wui-slider", Ve), $("wui-timepicker", Je), $("wui-autocomplete", y), $("wui-multiselect", he), $("wui-taginput", Ue), $("wui-otp", we), $("wui-status-icon", r), $("wui-wizard-step", Qe), $("wui-wizard", Xe);
5390
+ function Ot() {
5391
+ $("wui-select", P), $("wui-country-select", de), $("wui-phone", Xe), $("wui-datepicker", fe), $("wui-date-range", pe), $("wui-dock", me), $("wui-consent-banner", se), $("wui-slider", Ze), $("wui-timepicker", it), $("wui-autocomplete", S), $("wui-command-palette", ee), $("wui-multiselect", Se), $("wui-taginput", $e), $("wui-otp", Pe), $("wui-status-icon", i), $("wui-wizard-step", ct), $("wui-wizard", ot);
5207
5392
  }
5208
- vt();
5393
+ Ot();
5209
5394
  //#endregion
5210
- export { $e as COPY_FEEDBACK_MS, tt as DEFAULT_IMAGE_ACCEPT, nt as DEFAULT_MAX_SIZE_MB, ft as DEFAULT_PASSWORD_RULES, pt as DEFAULT_REQUIREMENTS_TITLE, n as STATUS_TONES, y as WuiAutocomplete, re as WuiConsentBanner, oe as WuiDatePicker, se as WuiDateRange, ce as WuiDock, he as WuiMultiSelect, we as WuiOtp, ze as WuiPhone, Be as WuiSelect, Ve as WuiSlider, r as WuiStatusIcon, Ue as WuiTagInput, Je as WuiTimePicker, Xe as WuiWizard, Qe as WuiWizardStep, lt as acceptLabel, ht as buildPasswordRules, et as copyTextToClipboard, vt as defineWeborityElements, gt as evaluatePassword, p as glyphSvg, st as isImageFile, ct as isImageOnlyAccept, ut as matchesAccept, _t as passwordSatisfies, dt as validateFile };
5395
+ export { lt as COPY_FEEDBACK_MS, dt as DEFAULT_IMAGE_ACCEPT, ft as DEFAULT_MAX_SIZE_MB, St as DEFAULT_PASSWORD_RULES, Ct as DEFAULT_REQUIREMENTS_TITLE, r as STATUS_TONES, S as WuiAutocomplete, ee as WuiCommandPalette, se as WuiConsentBanner, de as WuiCountrySelect, fe as WuiDatePicker, pe as WuiDateRange, me as WuiDock, Se as WuiMultiSelect, Pe as WuiOtp, Xe as WuiPhone, P as WuiSelect, Ze as WuiSlider, i as WuiStatusIcon, $e as WuiTagInput, it as WuiTimePicker, ot as WuiWizard, ct as WuiWizardStep, yt as acceptLabel, Tt as buildPasswordRules, ut as copyTextToClipboard, Ot as defineWeborityElements, Et as evaluatePassword, m as glyphSvg, _t as isImageFile, vt as isImageOnlyAccept, T as matchSegments, bt as matchesAccept, Dt as passwordSatisfies, xt as validateFile };