@nysds/nys-datepicker 1.21.0 → 1.22.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,5 +1,5 @@
1
- import { LitElement as me, unsafeCSS as je, html as A } from "lit";
2
- import { property as g, state as ze } from "lit/decorators.js";
1
+ import { LitElement as De, unsafeCSS as Ke, html as A } from "lit";
2
+ import { property as g, state as Ve } from "lit/decorators.js";
3
3
  import { ifDefined as D } from "lit/directives/if-defined.js";
4
4
  import "@nysds/nys-label";
5
5
  import "@nysds/nys-errormessage";
@@ -10,59 +10,70 @@ import "@nysds/nys-button";
10
10
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
11
11
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
12
12
  *
13
- * Datepicker Component v1.21.0
13
+ * Datepicker Component v1.22.0
14
14
  * Part of the New York State Design System
15
15
  * Repository: https://github.com/its-hcd/nysds
16
16
  * License: MIT
17
17
  */
18
18
  /*!
19
- * New York State Design System v1.21.0
19
+ * New York State Design System v1.22.0
20
20
  * Description: A design system for New York State's digital products.
21
21
  * Repository: https://github.com/its-hcd/nysds
22
22
  * License: MIT
23
23
  */
24
- var Ke = 0;
25
- function Ge(t) {
26
- return `${t}-${Date.now()}-${Ke++}`;
24
+ let Ge = 0;
25
+ function Qe(t) {
26
+ return `${t}-${Date.now()}-${Ge++}`;
27
27
  }
28
- var Qe = (t) => {
28
+ function ne(t, e, a) {
29
+ t.dispatchEvent(
30
+ new CustomEvent(e, { detail: a, bubbles: !0, composed: !0 })
31
+ );
32
+ }
33
+ function oe(t, e) {
34
+ t.dispatchEvent(
35
+ new Event(`nys-${e}`, { bubbles: !0, composed: !0 })
36
+ );
37
+ }
38
+ const Xe = (t) => {
29
39
  class e extends t {
30
40
  get idPrefix() {
31
41
  return this.localName || "nys-element";
32
42
  }
33
43
  ensureId() {
34
- this.id || (this.id = Ge(this.idPrefix));
44
+ this.id || (this.id = Qe(this.idPrefix));
35
45
  }
36
46
  connectedCallback() {
37
47
  super.connectedCallback(), this.ensureId();
38
48
  }
39
49
  }
40
50
  return e;
41
- }, Xe = (t) => {
42
- class e extends Qe(t) {
43
- constructor(...s) {
44
- super(...s), this.__internals = null;
51
+ }, Je = (t) => {
52
+ class e extends Xe(t) {
53
+ constructor() {
54
+ super(...arguments), this.__internals = null;
45
55
  }
46
56
  get internals() {
47
57
  if (this.__internals) return this.__internals;
48
- if (typeof this.attachInternals == "function") try {
49
- this.__internals = this.attachInternals();
50
- } catch {
51
- this.__internals = null;
52
- }
58
+ if (typeof this.attachInternals == "function")
59
+ try {
60
+ this.__internals = this.attachInternals();
61
+ } catch {
62
+ this.__internals = null;
63
+ }
53
64
  return this.__internals;
54
65
  }
55
66
  get defaultRole() {
56
67
  return null;
57
68
  }
58
- setHostAria(s, r) {
69
+ setHostAria(s, i) {
59
70
  const n = this.internals;
60
71
  if (n && s in n) {
61
- n[s] = r;
72
+ n[s] = i;
62
73
  return;
63
74
  }
64
- const i = Je(s);
65
- r === null ? this.removeAttribute(i) : this.setAttribute(i, r);
75
+ const r = Ze(s);
76
+ i === null ? this.removeAttribute(r) : this.setAttribute(r, i);
66
77
  }
67
78
  reflectDefaultSemantics() {
68
79
  const s = this.defaultRole;
@@ -74,21 +85,33 @@ var Qe = (t) => {
74
85
  }
75
86
  return e;
76
87
  };
77
- function Je(t) {
88
+ function Ze(t) {
78
89
  if (t === "role") return "role";
79
90
  const e = t.replace(/^aria/, "");
80
91
  return "aria-" + e.charAt(0).toLowerCase() + e.slice(1);
81
92
  }
82
- var Ve = (t) => {
83
- const a = class a extends Xe(t) {
84
- setFormValue(r) {
85
- this.internals?.setFormValue(r ?? null);
93
+ const et = (t) => {
94
+ const e = class extends Je(t) {
95
+ constructor() {
96
+ super(...arguments), this.__internalValidationMessage = "";
97
+ }
98
+ get internalValidationMessage() {
99
+ return this.__internalValidationMessage;
100
+ }
101
+ set internalValidationMessage(i) {
102
+ i !== this.__internalValidationMessage && (this.__internalValidationMessage = i, this.requestUpdate("internalValidationMessage"));
86
103
  }
87
- setValidityFromState(r, n, i) {
104
+ resolvedErrorMessage() {
105
+ return this.errorMessage || this.internalValidationMessage;
106
+ }
107
+ setFormValue(i) {
108
+ this.internals?.setFormValue(i ?? null);
109
+ }
110
+ setValidityFromState(i, n, r) {
88
111
  const o = this.internals;
89
112
  if (!o) return;
90
- const c = Object.values(r).some(Boolean);
91
- c ? o.setValidity(r, n ?? "Invalid value", i) : o.setValidity({}), this.setHostAria("ariaInvalid", c ? "true" : "false");
113
+ const l = Object.values(i).some(Boolean);
114
+ l ? o.setValidity(i, n ?? "Invalid value", r) : o.setValidity({}), this.setHostAria("ariaInvalid", l ? "true" : "false");
92
115
  }
93
116
  clearValidity() {
94
117
  this.internals?.setValidity({}), this.setHostAria("ariaInvalid", "false");
@@ -100,14 +123,11 @@ var Ve = (t) => {
100
123
  return this.internals?.reportValidity() ?? !0;
101
124
  }
102
125
  formResetCallback() {
103
- this.clearValidity();
126
+ this.internalValidationMessage = "", this.clearValidity();
104
127
  }
105
128
  };
106
- a.formAssociated = !0;
107
- let e = a;
108
- return e;
109
- }, Ze = /* @__PURE__ */ Ve(me);
110
- const et = ':host{--_nys-datepicker-width: fit-content;--_nys-datepicker-width--input: var(--nys-form-width-md, 200px);--_nys-datepicker-gap: var(--nys-space-100, 8px);--_nys-datepicker-height: var(--nys-size-600, 48px);--_nys-datepicker-radius: var(--nys-radius-xl, 12px);--_nys-datepicker-color: var( --nys-color-text, var(--nys-color-neutral-900, #1b1b1b) );--_nys-datepicker-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-space-sm: var(--nys-space-50, 4px);--_nys-datepicker-space-md: var(--nys-space-100, 8px);--_nys-datepicker-space-lg: var(--nys-space-150, 12px);--_nys-datepicker-border-width: var(--nys-border-width-sm, 1px);--_nys-datepicker-border-color: var(--nys-color-neutral-400, #909395);--_nys-datepicker-border-radius: var(--nys-radius-md, 4px);--_nys-datepicker-outline-color--hover: var(--nys-color-neutral-900, #1b1b1b);--_nys-datepicker-outline-color--focus: var(--nys-color-focus, #004dd1);--_nys-datepicker-font-size: var(--nys-font-size-ui-md, 16px);--_nys-datepicker-font-weight: var(--nys-font-weight-regular, 400);--_nys-datepicker-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-datepicker-letterspacing: var(--nys-font-letterspacing-ui-md, .044px);--_nys-datepicker-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-datepicker-text-color: var(--nys-color-text, #1b1b1b);--_nys-datepicker-text-disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-background-color: var(--nys-color-ink-reverse, #ffffff);--_nys-datepicker-background-color--button--active: var( --nys-color-gray-100, #d0d0ce );--_nys-datepicker-padding--calendar: var(--nys-space-200, 16px);--_nys-datepicker-color--calendar--weekends: var( --nys-color-text-weaker, #797c7f );--_nys-datepicker-gap--calendar-row: var(--nys-space-2-px, 2px);--_nys-datepicker-font-size--date: var(--nys-font-size-ui-sm, 14px);--_nys-datepicker-background-color--date--hover: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--date--active: var( --nys-color-neutral-100, #d0d0ce );--_nys-datepicker-background-color--date--selected: var( --nys-color-info-weak, #e5effa );--_nys-datepicker-focus-ring--date: var(--nys-color-link, #004dd1);--_nys-datepicker-color--date: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--hover: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--selected: var(--nys-color-info, #004dd1);--_nys-datepicker-color--date--disabled: var( --nys-color-text-disabled, #bec0c1 );--_nys-datepicker-border-color--date--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-background-color--navigation--hover: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-background-color--navigation--pressed: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--navigation--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-color--navigation--hover: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--pressed: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-box-shadow-border--navigation: inset 0 0 0 1px var(--nys-color-neutral-900, #1b1b1b)}:host([width=lg]){--_nys-datepicker-width--input: var(--nys-form-width-lg, 384px)}:host([width=full]){--_nys-datepicker-width--input: 100%}:host([showError]){--_nys-datepicker-border-color: var(--nys-color-danger, #b52c2c)}:host([inverted]){--_nys-datepicker-outline-color--focus: var( --nys-color-focus-reverse, #7aa5e7 )}.nys-datepicker--container{position:relative;display:flex;flex-direction:column;gap:var(--_nys-datepicker-space-sm);font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);font-weight:var(--_nys-datepicker-font-weight);line-height:var(--_nys-datepicker-line-height);width:100%}.nys-datepicker--container .nys-datepicker--input-container{position:relative;width:var(--_nys-datepicker-width--input);display:flex;cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container.disabled #calendar-button{cursor:not-allowed;color:var(--_nys-datepicker-color--date--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input{cursor:text;text-align:start;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);flex:1;height:24px;outline:transparent solid 1px;border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-border-color);background-color:var(--_nys-datepicker-background-color);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);color:var(--_nys-datepicker-color)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:hover{outline-color:var(--_nys-datepicker-outline-color--hover);border-color:var(--_nys-datepicker-outline-color--hover)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:focus{outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:disabled{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);cursor:not-allowed;color:var(--_nys-datepicker-color--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input::-webkit-date-and-time-value{text-align:start}.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-inner-spin-button,.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-calendar-picker-indicator{display:none;appearance:none}.nys-datepicker--container .nys-datepicker--input-container #calendar-button{display:flex;align-items:center;justify-content:center;padding:var(--_nys-datepicker-space-sm);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-background-color);outline:transparent solid 1px;background-color:var(--_nys-datepicker-background-color);position:absolute;top:50%;right:var(--_nys-datepicker-space-sm);transform:translateY(-50%);cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:hover{outline-color:var(--_nys-datepicker-background-color--date--hover);border-color:var(--_nys-datepicker-background-color--date--hover);background:var(--_nys-datepicker-background-color--date--hover)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:active{outline-color:var(--_nys-datepicker-background-color--button--active);border-color:var(--_nys-datepicker-background-color--button--active);background:var(--_nys-datepicker-background-color--button--active)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:focus:not(:active):not(:disabled){outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .wc-datepicker--container{display:flex;width:fit-content}.nys-datepicker--container .wc-datepicker--container *{flex:1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}wc-datepicker{display:none;padding:var(--_nys-datepicker-padding--calendar);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--nys-color-neutral-100, #d0d0ce);background-color:var(--_nys-datepicker-background-color);box-shadow:0 4px 6px -1px var(--nys-color-black-transparent-100, rgba(27, 27, 27, .1)),0 4px 6px -1px var(--nys-color-black-transparent-50, rgba(27, 27, 27, .01));color:var(--_nys-datepicker-text-color);margin-bottom:3px}wc-datepicker.active{display:flex;flex-direction:column-reverse;position:absolute;z-index:1}wc-datepicker .position-top{box-shadow:0 -4px 6px -1px var(--nys-color-black-transparent-100, rgba(27, 27, 27, .1)),0 -4px 6px -1px var(--nys-color-black-transparent-50, rgba(27, 27, 27, .01))}wc-datepicker *,wc-datepicker *:before,wc-datepicker *:after{margin:0;box-sizing:border-box}.wc-datepicker{display:block;width:min-content;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size--date);font-weight:400;line-height:var(--_nys-datepicker-line-height);letter-spacing:var(--_nys-datepicker-letterspacing)}.wc-datepicker--disabled *:disabled{opacity:.5;cursor:not-allowed}.wc-datepicker--disabled .wc-datepicker__date{cursor:not-allowed;opacity:.5}.wc-datepicker--disabled .wc-datepicker__date:focus{outline:none;border-color:var(--_nys-datepicker-border-color--date--disabled);box-shadow:none}.wc-datepicker--disabled .wc-datepicker__date:hover:not(.wc-datepicker__date--selected){background-color:transparent}.wc-datepicker--disabled .wc-datepicker__date--selected:hover{color:var(--_nys-datepicker-background-color);background-color:var(--_nys-datepicker-background-color--date--selected)}.wc-datepicker--disabled #wc-month-dropdown-icon{color:var(--_nys-datepicker-color--date--disabled)}.wc-datepicker__header{display:flex;align-items:center;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__current-month{display:flex;flex-grow:1;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__month-select,.wc-datepicker__year-select{display:flex;align-items:center;font-size:var(--_nys-datepicker-font-size);font-family:var(--_nys-datepicker-font-family);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color);background-color:var(--_nys-datepicker-background-color);line-height:var(--_nys-datepicker-line-height)}.wc-datepicker__month-select:hover:not(:disabled),.wc-datepicker__year-select:hover:not(:disabled){border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover);background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:active:not(:disabled),.wc-datepicker__month-select[aria-pressed=true],.wc-datepicker__year-select:active:not(:disabled),.wc-datepicker__year-select[aria-pressed=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed);background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:disabled,.wc-datepicker__month-select[aria-disabled=true],.wc-datepicker__year-select:disabled,.wc-datepicker__year-select[aria-disabled=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);background-color:var(--_nys-datepicker-background-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker .month-wrapper{position:relative;width:135px;display:flex;align-items:center;align-self:stretch}.wc-datepicker .month-wrapper #wc-month-dropdown-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none}.wc-datepicker__month-select{width:100%;max-width:100%;flex-grow:1;cursor:pointer;appearance:none;text-overflow:ellipsis;padding-right:var(--nys-space-400, 32px)}.wc-datepicker__month-select>*{width:91px;height:24px}.wc-datepicker__year-select{border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;padding-right:var(--_nys-datepicker-space-sm);max-width:5rem}.wc-datepicker__previous-month-button,.wc-datepicker__next-month-button,.wc-datepicker__previous-year-button,.wc-datepicker__next-year-button{display:inline-flex;width:40px;max-width:40px;max-height:42px;padding:var(--_nys-datepicker-space-lg);justify-content:center;align-items:center;border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color--date);background-color:var(--_nys-datepicker-background-color);cursor:pointer}.wc-datepicker__previous-month-button:hover:not(:disabled),.wc-datepicker__next-month-button:hover:not(:disabled),.wc-datepicker__previous-year-button:hover:not(:disabled),.wc-datepicker__next-year-button:hover:not(:disabled){background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover)}.wc-datepicker__previous-month-button:active:not(:disabled),.wc-datepicker__previous-month-button[aria-pressed=true],.wc-datepicker__next-month-button:active:not(:disabled),.wc-datepicker__next-month-button[aria-pressed=true],.wc-datepicker__previous-year-button:active:not(:disabled),.wc-datepicker__previous-year-button[aria-pressed=true],.wc-datepicker__next-year-button:active:not(:disabled),.wc-datepicker__next-year-button[aria-pressed=true]{background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed)}.wc-datepicker__previous-month-button:disabled,.wc-datepicker__previous-month-button[aria-disabled=true],.wc-datepicker__next-month-button:disabled,.wc-datepicker__next-month-button[aria-disabled=true],.wc-datepicker__previous-year-button:disabled,.wc-datepicker__previous-year-button[aria-disabled=true],.wc-datepicker__next-year-button:disabled,.wc-datepicker__next-year-button[aria-disabled=true]{background-color:var(--_nys-datepicker-background-color--navigation--disabled);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker__calendar{width:100%;table-layout:fixed;border-collapse:collapse}.wc-datepicker__weekday{padding:var(--_nys-datepicker-padding--calendar) 0 var(--_nys-datepicker-space-sm) 0;min-width:var(--nys-size-500, 40px);font-weight:600;aspect-ratio:1}.wc-datepicker__weekday>span{width:42.3px;height:24px;display:flex;justify-content:center;align-items:center}.wc-datepicker__weekday[aria-label=Saturday],.wc-datepicker__weekday[aria-label=Sunday]{color:var(--_nys-datepicker-color--calendar--weekends)}.wc-datepicker__date{padding:var(--_nys-datepicker-space-md);text-align:center;cursor:pointer;border-radius:var(--nys-radius-lg)}.wc-datepicker__date:focus,.wc-datepicker__date:focus-visible{outline:none}.wc-datepicker__date:focus{box-shadow:inset 0 0 0 2px var(--_nys-datepicker-focus-ring--date)}.wc-datepicker__date:hover:not(.wc-datepicker__date--selected):not(:active){color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--hover)}.wc-datepicker__date:active{color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--active)}.wc-datepicker__date>*{display:flex;justify-content:center;align-items:center;aspect-ratio:1;width:24.3px;height:24px}.wc-datepicker__date--today{font-weight:600;color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--today>*{font-style:normal;text-decoration-line:underline}.wc-datepicker__date--selected{text-decoration-line:none;background-color:var(--_nys-datepicker-background-color--date--selected);color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--selected>*{font-weight:600}.wc-datepicker__date--disabled{color:var(--_nys-datepicker-color--date--disabled);cursor:default}.wc-datepicker__date--disabled:not(.wc-datepicker__date--disabled--selected,.wc-datepicker__date--disabled--in-range):hover{background-color:transparent}.wc-datepicker__date.wc-datepicker__date--overflowing{color:var(--_nys-datepicker-text-disabled)}.wc-datepicker__date.wc-datepicker__date--overflowing:hover,.wc-datepicker__date.wc-datepicker__date--overflowing:active{color:var(--_nys-datepicker-color)}.wc-datepicker--button-container{display:flex;padding-top:var(--_nys-datepicker-space-lg);align-items:flex-end;gap:var(--_nys-datepicker-padding--calendar);align-self:stretch}.wc-datepicker tr.wc-datepicker__calendar-row.sc-wc-datepicker{display:flex;align-items:center;gap:var(--_nys-datepicker-gap--calendar-row);align-self:stretch}', R = {
129
+ return e.formAssociated = !0, e;
130
+ }, tt = /* @__PURE__ */ et(De), at = ':host{--_nys-datepicker-width: fit-content;--_nys-datepicker-width--input: var(--nys-form-width-md, 200px);--_nys-datepicker-gap: var(--nys-space-100, 8px);--_nys-datepicker-height: var(--nys-size-600, 48px);--_nys-datepicker-radius: var(--nys-radius-xl, 12px);--_nys-datepicker-color: var( --nys-color-text, var(--nys-color-neutral-900, #1b1b1b) );--_nys-datepicker-color--disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-space-sm: var(--nys-space-50, 4px);--_nys-datepicker-space-md: var(--nys-space-100, 8px);--_nys-datepicker-space-lg: var(--nys-space-150, 12px);--_nys-datepicker-border-width: var(--nys-border-width-sm, 1px);--_nys-datepicker-border-color: var(--nys-color-neutral-400, #909395);--_nys-datepicker-border-radius: var(--nys-radius-md, 4px);--_nys-datepicker-outline-color--hover: var(--nys-color-neutral-900, #1b1b1b);--_nys-datepicker-outline-color--focus: var(--nys-color-focus, #004dd1);--_nys-datepicker-font-size: var(--nys-font-size-ui-md, 16px);--_nys-datepicker-font-weight: var(--nys-font-weight-regular, 400);--_nys-datepicker-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-datepicker-letterspacing: var(--nys-font-letterspacing-ui-md, .044px);--_nys-datepicker-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-datepicker-text-color: var(--nys-color-text, #1b1b1b);--_nys-datepicker-text-disabled: var(--nys-color-text-disabled, #bec0c1);--_nys-datepicker-background-color: var(--nys-color-ink-reverse, #ffffff);--_nys-datepicker-background-color--button--active: var( --nys-color-gray-100, #d0d0ce );--_nys-datepicker-padding--calendar: var(--nys-space-200, 16px);--_nys-datepicker-color--calendar--weekends: var( --nys-color-text-weaker, #797c7f );--_nys-datepicker-gap--calendar-row: var(--nys-space-2-px, 2px);--_nys-datepicker-font-size--date: var(--nys-font-size-ui-sm, 14px);--_nys-datepicker-background-color--date--hover: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--date--active: var( --nys-color-neutral-100, #d0d0ce );--_nys-datepicker-background-color--date--selected: var( --nys-color-info-weak, #e5effa );--_nys-datepicker-focus-ring--date: var(--nys-color-link, #004dd1);--_nys-datepicker-color--date: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--hover: var(--nys-color-text, #1b1b1b);--_nys-datepicker-color--date--selected: var(--nys-color-info, #004dd1);--_nys-datepicker-color--date--disabled: var( --nys-color-text-disabled, #bec0c1 );--_nys-datepicker-border-color--date--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-background-color--navigation--hover: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-background-color--navigation--pressed: var( --nys-color-neutral-50, #ededed );--_nys-datepicker-background-color--navigation--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-datepicker-color--navigation--hover: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--pressed: var( --nys-color-neutral-900, #1b1b1b );--_nys-datepicker-color--navigation--disabled: var( --nys-color-neutral-200, #bec0c1 );--_nys-datepicker-box-shadow-border--navigation: inset 0 0 0 1px var(--nys-color-neutral-900, #1b1b1b)}:host([width=lg]){--_nys-datepicker-width--input: var(--nys-form-width-lg, 384px)}:host([width=full]){--_nys-datepicker-width--input: 100%}:host([showError]){--_nys-datepicker-border-color: var(--nys-color-danger, #b52c2c)}:host([inverted]){--_nys-datepicker-outline-color--focus: var( --nys-color-focus-reverse, #7aa5e7 )}.nys-datepicker--container{position:relative;display:flex;flex-direction:column;gap:var(--_nys-datepicker-space-sm);font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);font-weight:var(--_nys-datepicker-font-weight);line-height:var(--_nys-datepicker-line-height);width:100%}.nys-datepicker--container .nys-datepicker--input-container{position:relative;width:var(--_nys-datepicker-width--input);display:flex;cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container.disabled #calendar-button{cursor:not-allowed;color:var(--_nys-datepicker-color--date--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input{cursor:text;text-align:start;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size);flex:1;height:24px;outline:transparent solid 1px;border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-border-color);background-color:var(--_nys-datepicker-background-color);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);color:var(--_nys-datepicker-color)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:hover{outline-color:var(--_nys-datepicker-outline-color--hover);border-color:var(--_nys-datepicker-outline-color--hover)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:focus{outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input:disabled{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);cursor:not-allowed;color:var(--_nys-datepicker-color--disabled)}.nys-datepicker--container .nys-datepicker--input-container .nys-datepicker--input::-webkit-date-and-time-value{text-align:start}.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-inner-spin-button,.nys-datepicker--container .nys-datepicker--input-container input[type=date]::-webkit-calendar-picker-indicator{display:none;appearance:none}.nys-datepicker--container .nys-datepicker--input-container #calendar-button{display:flex;align-items:center;justify-content:center;padding:var(--_nys-datepicker-space-sm);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-background-color);outline:transparent solid 1px;background-color:var(--_nys-datepicker-background-color);position:absolute;top:50%;right:var(--_nys-datepicker-space-sm);transform:translateY(-50%);cursor:pointer}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:hover{outline-color:var(--_nys-datepicker-background-color--date--hover);border-color:var(--_nys-datepicker-background-color--date--hover);background:var(--_nys-datepicker-background-color--date--hover)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:active{outline-color:var(--_nys-datepicker-background-color--button--active);border-color:var(--_nys-datepicker-background-color--button--active);background:var(--_nys-datepicker-background-color--button--active)}.nys-datepicker--container .nys-datepicker--input-container #calendar-button:focus:not(:active):not(:disabled){outline-color:var(--_nys-datepicker-outline-color--focus);border-color:var(--_nys-datepicker-outline-color--focus)}.nys-datepicker--container .wc-datepicker--container{display:flex;width:fit-content}.nys-datepicker--container .wc-datepicker--container *{flex:1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}wc-datepicker{display:none;padding:var(--_nys-datepicker-padding--calendar);border-radius:var(--_nys-datepicker-border-radius);border:var(--_nys-datepicker-border-width) solid var(--nys-color-neutral-100, #d0d0ce);background-color:var(--_nys-datepicker-background-color);box-shadow:0 4px 6px -1px var(--nys-color-black-transparent-100, rgba(27, 27, 27, .1)),0 4px 6px -1px var(--nys-color-black-transparent-50, rgba(27, 27, 27, .01));color:var(--_nys-datepicker-text-color);margin-bottom:3px}wc-datepicker.active{display:flex;flex-direction:column-reverse;position:absolute;z-index:1}wc-datepicker .position-top{box-shadow:0 -4px 6px -1px var(--nys-color-black-transparent-100, rgba(27, 27, 27, .1)),0 -4px 6px -1px var(--nys-color-black-transparent-50, rgba(27, 27, 27, .01))}wc-datepicker *,wc-datepicker *:before,wc-datepicker *:after{margin:0;box-sizing:border-box}.wc-datepicker{display:block;width:min-content;font-family:var(--_nys-datepicker-font-family);font-size:var(--_nys-datepicker-font-size--date);font-weight:400;line-height:var(--_nys-datepicker-line-height);letter-spacing:var(--_nys-datepicker-letterspacing)}.wc-datepicker--disabled *:disabled{opacity:.5;cursor:not-allowed}.wc-datepicker--disabled .wc-datepicker__date{cursor:not-allowed;opacity:.5}.wc-datepicker--disabled .wc-datepicker__date:focus{outline:none;border-color:var(--_nys-datepicker-border-color--date--disabled);box-shadow:none}.wc-datepicker--disabled .wc-datepicker__date:hover:not(.wc-datepicker__date--selected){background-color:transparent}.wc-datepicker--disabled .wc-datepicker__date--selected:hover{color:var(--_nys-datepicker-background-color);background-color:var(--_nys-datepicker-background-color--date--selected)}.wc-datepicker--disabled #wc-month-dropdown-icon{color:var(--_nys-datepicker-color--date--disabled)}.wc-datepicker__header{display:flex;align-items:center;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__current-month{display:flex;flex-grow:1;gap:var(--_nys-datepicker-space-sm)}.wc-datepicker__month-select,.wc-datepicker__year-select{display:flex;align-items:center;font-size:var(--_nys-datepicker-font-size);font-family:var(--_nys-datepicker-font-family);padding:var(--_nys-datepicker-space-md) var(--_nys-datepicker-space-lg);border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color);background-color:var(--_nys-datepicker-background-color);line-height:var(--_nys-datepicker-line-height)}.wc-datepicker__month-select:hover:not(:disabled),.wc-datepicker__year-select:hover:not(:disabled){border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover);background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:active:not(:disabled),.wc-datepicker__month-select[aria-pressed=true],.wc-datepicker__year-select:active:not(:disabled),.wc-datepicker__year-select[aria-pressed=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed);background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation)}.wc-datepicker__month-select:disabled,.wc-datepicker__month-select[aria-disabled=true],.wc-datepicker__year-select:disabled,.wc-datepicker__year-select[aria-disabled=true]{border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);background-color:var(--_nys-datepicker-background-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker .month-wrapper{position:relative;width:135px;display:flex;align-items:center;align-self:stretch}.wc-datepicker .month-wrapper #wc-month-dropdown-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none}.wc-datepicker__month-select{width:100%;max-width:100%;flex-grow:1;cursor:pointer;appearance:none;text-overflow:ellipsis;padding-right:var(--nys-space-400, 32px)}.wc-datepicker__month-select>*{width:91px;height:24px}.wc-datepicker__year-select{border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;padding-right:var(--_nys-datepicker-space-sm);max-width:5rem}.wc-datepicker__previous-month-button,.wc-datepicker__next-month-button,.wc-datepicker__previous-year-button,.wc-datepicker__next-year-button{display:inline-flex;width:40px;max-width:40px;max-height:42px;padding:var(--_nys-datepicker-space-lg);justify-content:center;align-items:center;border:solid var(--_nys-datepicker-border-width) var(--_nys-datepicker-border-color);border-radius:.25rem;color:var(--_nys-datepicker-color--date);background-color:var(--_nys-datepicker-background-color);cursor:pointer}.wc-datepicker__previous-month-button:hover:not(:disabled),.wc-datepicker__next-month-button:hover:not(:disabled),.wc-datepicker__previous-year-button:hover:not(:disabled),.wc-datepicker__next-year-button:hover:not(:disabled){background-color:var(--_nys-datepicker-background-color--navigation--hover);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--hover)}.wc-datepicker__previous-month-button:active:not(:disabled),.wc-datepicker__previous-month-button[aria-pressed=true],.wc-datepicker__next-month-button:active:not(:disabled),.wc-datepicker__next-month-button[aria-pressed=true],.wc-datepicker__previous-year-button:active:not(:disabled),.wc-datepicker__previous-year-button[aria-pressed=true],.wc-datepicker__next-year-button:active:not(:disabled),.wc-datepicker__next-year-button[aria-pressed=true]{background-color:var(--_nys-datepicker-background-color--navigation--pressed);box-shadow:var(--_nys-datepicker-box-shadow-border--navigation);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--pressed)}.wc-datepicker__previous-month-button:disabled,.wc-datepicker__previous-month-button[aria-disabled=true],.wc-datepicker__next-month-button:disabled,.wc-datepicker__next-month-button[aria-disabled=true],.wc-datepicker__previous-year-button:disabled,.wc-datepicker__previous-year-button[aria-disabled=true],.wc-datepicker__next-year-button:disabled,.wc-datepicker__next-year-button[aria-disabled=true]{background-color:var(--_nys-datepicker-background-color--navigation--disabled);border:var(--_nys-datepicker-border-width) solid var(--_nys-datepicker-color--navigation--disabled);color:var(--_nys-datepicker-color--disabled)}.wc-datepicker__calendar{width:100%;table-layout:fixed;border-collapse:collapse}.wc-datepicker__weekday{padding:var(--_nys-datepicker-padding--calendar) 0 var(--_nys-datepicker-space-sm) 0;min-width:var(--nys-size-500, 40px);font-weight:600;aspect-ratio:1}.wc-datepicker__weekday>span{width:42.3px;height:24px;display:flex;justify-content:center;align-items:center}.wc-datepicker__weekday[aria-label=Saturday],.wc-datepicker__weekday[aria-label=Sunday]{color:var(--_nys-datepicker-color--calendar--weekends)}.wc-datepicker__date{padding:var(--_nys-datepicker-space-md);text-align:center;cursor:pointer;border-radius:var(--nys-radius-lg)}.wc-datepicker__date:focus,.wc-datepicker__date:focus-visible{outline:none}.wc-datepicker__date:focus{box-shadow:inset 0 0 0 2px var(--_nys-datepicker-focus-ring--date)}.wc-datepicker__date:hover:not(.wc-datepicker__date--selected):not(:active){color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--hover)}.wc-datepicker__date:active{color:var(--_nys-datepicker-color--date--hover);background-color:var(--_nys-datepicker-background-color--date--active)}.wc-datepicker__date>*{display:flex;justify-content:center;align-items:center;aspect-ratio:1;width:24.3px;height:24px}.wc-datepicker__date--today{font-weight:600;color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--today>*{font-style:normal;text-decoration-line:underline}.wc-datepicker__date--selected{text-decoration-line:none;background-color:var(--_nys-datepicker-background-color--date--selected);color:var(--_nys-datepicker-color--date--selected)}.wc-datepicker__date--selected>*{font-weight:600}.wc-datepicker__date--disabled{color:var(--_nys-datepicker-color--date--disabled);cursor:default}.wc-datepicker__date--disabled:not(.wc-datepicker__date--disabled--selected,.wc-datepicker__date--disabled--in-range):hover{background-color:transparent}.wc-datepicker__date.wc-datepicker__date--overflowing{color:var(--_nys-datepicker-text-disabled)}.wc-datepicker__date.wc-datepicker__date--overflowing:hover,.wc-datepicker__date.wc-datepicker__date--overflowing:active{color:var(--_nys-datepicker-color)}.wc-datepicker--button-container{display:flex;padding-top:var(--_nys-datepicker-space-lg);align-items:flex-end;gap:var(--_nys-datepicker-padding--calendar);align-self:stretch}.wc-datepicker tr.wc-datepicker__calendar-row.sc-wc-datepicker{display:flex;align-items:center;gap:var(--_nys-datepicker-gap--calendar-row);align-self:stretch}', R = {
111
131
  allRenderFn: !1,
112
132
  cmpDidLoad: !0,
113
133
  cmpDidUnload: !1,
@@ -191,30 +211,30 @@ const et = ':host{--_nys-datepicker-width: fit-content;--_nys-datepicker-width--
191
211
  transformTagName: !1,
192
212
  attachStyles: !0
193
213
  };
194
- let B, we, X, De = !1, H = !1, se = !1, $ = !1, ne = null, te = !1;
195
- const T = (t, e = "") => () => {
196
- }, oe = "http://www.w3.org/1999/xlink", ce = {}, tt = "http://www.w3.org/2000/svg", at = "http://www.w3.org/1999/xhtml", st = (t) => t != null, re = (t) => (t = typeof t, t === "object" || t === "function");
197
- function rt(t) {
214
+ let B, xe, Q, Se = !1, H = !1, se = !1, _ = !1, le = null, te = !1;
215
+ const E = (t, e = "") => () => {
216
+ }, ce = "http://www.w3.org/1999/xlink", de = {}, st = "http://www.w3.org/2000/svg", it = "http://www.w3.org/1999/xhtml", rt = (t) => t != null, ie = (t) => (t = typeof t, t === "object" || t === "function");
217
+ function nt(t) {
198
218
  var e, a, s;
199
219
  return (s = (a = (e = t.head) === null || e === void 0 ? void 0 : e.querySelector('meta[name="csp-nonce"]')) === null || a === void 0 ? void 0 : a.getAttribute("content")) !== null && s !== void 0 ? s : void 0;
200
220
  }
201
221
  const h = (t, e, ...a) => {
202
- let s = null, r = null, n = null, i = !1, o = !1;
203
- const c = [], l = (d) => {
204
- for (let p = 0; p < d.length; p++)
205
- s = d[p], Array.isArray(s) ? l(s) : s != null && typeof s != "boolean" && ((i = typeof t != "function" && !re(s)) && (s = String(s)), i && o ? c[c.length - 1].$text$ += s : c.push(i ? j(null, s) : s), o = i);
222
+ let s = null, i = null, n = null, r = !1, o = !1;
223
+ const l = [], c = (u) => {
224
+ for (let p = 0; p < u.length; p++)
225
+ s = u[p], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((r = typeof t != "function" && !ie(s)) && (s = String(s)), r && o ? l[l.length - 1].$text$ += s : l.push(r ? j(null, s) : s), o = r);
206
226
  };
207
- if (l(a), e) {
208
- e.key && (r = e.key), e.name && (n = e.name);
227
+ if (c(a), e) {
228
+ e.key && (i = e.key), e.name && (n = e.name);
209
229
  {
210
- const d = e.className || e.class;
211
- d && (e.class = typeof d != "object" ? d : Object.keys(d).filter((p) => d[p]).join(" "));
230
+ const u = e.className || e.class;
231
+ u && (e.class = typeof u != "object" ? u : Object.keys(u).filter((p) => u[p]).join(" "));
212
232
  }
213
233
  }
214
234
  if (typeof t == "function")
215
- return t(e === null ? {} : e, c, nt);
216
- const u = j(t, null);
217
- return u.$attrs$ = e, c.length > 0 && (u.$children$ = c), u.$key$ = r, u.$name$ = n, u;
235
+ return t(e === null ? {} : e, l, lt);
236
+ const d = j(t, null);
237
+ return d.$attrs$ = e, l.length > 0 && (d.$children$ = l), d.$key$ = i, d.$name$ = n, d;
218
238
  }, j = (t, e) => {
219
239
  const a = {
220
240
  $flags$: 0,
@@ -224,174 +244,174 @@ const h = (t, e, ...a) => {
224
244
  $children$: null
225
245
  };
226
246
  return a.$attrs$ = null, a.$key$ = null, a.$name$ = null, a;
227
- }, xe = {}, it = (t) => t && t.$tag$ === xe, nt = {
228
- forEach: (t, e) => t.map(le).forEach(e),
229
- map: (t, e) => t.map(le).map(e).map(ot)
230
- }, le = (t) => ({
247
+ }, Ce = {}, ot = (t) => t && t.$tag$ === Ce, lt = {
248
+ forEach: (t, e) => t.map(ue).forEach(e),
249
+ map: (t, e) => t.map(ue).map(e).map(ct)
250
+ }, ue = (t) => ({
231
251
  vattrs: t.$attrs$,
232
252
  vchildren: t.$children$,
233
253
  vkey: t.$key$,
234
254
  vname: t.$name$,
235
255
  vtag: t.$tag$,
236
256
  vtext: t.$text$
237
- }), ot = (t) => {
257
+ }), ct = (t) => {
238
258
  if (typeof t.vtag == "function") {
239
259
  const a = Object.assign({}, t.vattrs);
240
260
  return t.vkey && (a.key = t.vkey), t.vname && (a.name = t.vname), h(t.vtag, a, ...t.vchildren || []);
241
261
  }
242
262
  const e = j(t.vtag, t.vtext);
243
263
  return e.$attrs$ = t.vattrs, e.$children$ = t.vchildren, e.$key$ = t.vkey, e.$name$ = t.vname, e;
244
- }, ct = (t) => At.map((e) => e(t)).find((e) => !!e), lt = (t, e) => t != null && !re(t) ? e & 4 ? t === "false" ? !1 : t === "" || !!t : e & 2 ? parseFloat(t) : e & 1 ? String(t) : t : t, dt = (t) => t, de = (t, e, a) => {
245
- const s = dt(t);
264
+ }, dt = (t) => Ft.map((e) => e(t)).find((e) => !!e), ut = (t, e) => t != null && !ie(t) ? e & 4 ? t === "false" ? !1 : t === "" || !!t : e & 2 ? parseFloat(t) : e & 1 ? String(t) : t : t, ht = (t) => t, he = (t, e, a) => {
265
+ const s = ht(t);
246
266
  return {
247
- emit: (r) => ut(s, e, {
267
+ emit: (i) => pt(s, e, {
248
268
  bubbles: !0,
249
269
  composed: !0,
250
270
  cancelable: !0,
251
- detail: r
271
+ detail: i
252
272
  })
253
273
  };
254
- }, ut = (t, e, a) => {
274
+ }, pt = (t, e, a) => {
255
275
  const s = b.ce(e, a);
256
276
  return t.dispatchEvent(s), s;
257
- }, ue = /* @__PURE__ */ new WeakMap(), ht = (t, e, a) => {
277
+ }, pe = /* @__PURE__ */ new WeakMap(), ft = (t, e, a) => {
258
278
  let s = K.get(t);
259
- qt && a ? (s = s || new CSSStyleSheet(), typeof s == "string" ? s = e : s.replaceSync(e)) : s = e, K.set(t, s);
260
- }, pt = (t, e, a, s) => {
261
- var r;
262
- let n = Se(e, a);
263
- const i = K.get(n);
264
- if (t = t.nodeType === 11 ? t : w, i)
265
- if (typeof i == "string") {
279
+ Ut && a ? (s = s || new CSSStyleSheet(), typeof s == "string" ? s = e : s.replaceSync(e)) : s = e, K.set(t, s);
280
+ }, yt = (t, e, a, s) => {
281
+ var i;
282
+ let n = Me(e, a);
283
+ const r = K.get(n);
284
+ if (t = t.nodeType === 11 ? t : w, r)
285
+ if (typeof r == "string") {
266
286
  t = t.head || t;
267
- let o = ue.get(t), c;
268
- if (o || ue.set(t, o = /* @__PURE__ */ new Set()), !o.has(n)) {
287
+ let o = pe.get(t), l;
288
+ if (o || pe.set(t, o = /* @__PURE__ */ new Set()), !o.has(n)) {
269
289
  {
270
- c = w.createElement("style"), c.innerHTML = i;
271
- const l = (r = b.$nonce$) !== null && r !== void 0 ? r : rt(w);
272
- l != null && c.setAttribute("nonce", l), t.insertBefore(c, t.querySelector("link"));
290
+ l = w.createElement("style"), l.innerHTML = r;
291
+ const c = (i = b.$nonce$) !== null && i !== void 0 ? i : nt(w);
292
+ c != null && l.setAttribute("nonce", c), t.insertBefore(l, t.querySelector("link"));
273
293
  }
274
294
  o && o.add(n);
275
295
  }
276
- } else t.adoptedStyleSheets.includes(i) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, i]);
296
+ } else t.adoptedStyleSheets.includes(r) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, r]);
277
297
  return n;
278
- }, ft = (t) => {
279
- const e = t.$cmpMeta$, a = t.$hostElement$, s = e.$flags$, r = T("attachStyles", e.$tagName$), n = pt(a.shadowRoot ? a.shadowRoot : a.getRootNode(), e, t.$modeName$);
280
- s & 10 && (a["s-sc"] = n, a.classList.add(n + "-h"), s & 2 && a.classList.add(n + "-s")), r();
281
- }, Se = (t, e) => "sc-" + (e && t.$flags$ & 32 ? t.$tagName$ + "-" + e : t.$tagName$), he = (t, e, a, s, r, n) => {
298
+ }, gt = (t) => {
299
+ const e = t.$cmpMeta$, a = t.$hostElement$, s = e.$flags$, i = E("attachStyles", e.$tagName$), n = yt(a.shadowRoot ? a.shadowRoot : a.getRootNode(), e, t.$modeName$);
300
+ s & 10 && (a["s-sc"] = n, a.classList.add(n + "-h"), s & 2 && a.classList.add(n + "-s")), i();
301
+ }, Me = (t, e) => "sc-" + (e && t.$flags$ & 32 ? t.$tagName$ + "-" + e : t.$tagName$), fe = (t, e, a, s, i, n) => {
282
302
  if (a !== s) {
283
- let i = ge(t, e), o = e.toLowerCase();
303
+ let r = ke(t, e), o = e.toLowerCase();
284
304
  if (e === "class") {
285
- const c = t.classList, l = pe(a), u = pe(s);
286
- c.remove(...l.filter((d) => d && !u.includes(d))), c.add(...u.filter((d) => d && !l.includes(d)));
305
+ const l = t.classList, c = ye(a), d = ye(s);
306
+ l.remove(...c.filter((u) => u && !d.includes(u))), l.add(...d.filter((u) => u && !c.includes(u)));
287
307
  } else if (e === "style") {
288
- for (const c in a)
289
- (!s || s[c] == null) && (c.includes("-") ? t.style.removeProperty(c) : t.style[c] = "");
290
- for (const c in s)
291
- (!a || s[c] !== a[c]) && (c.includes("-") ? t.style.setProperty(c, s[c]) : t.style[c] = s[c]);
308
+ for (const l in a)
309
+ (!s || s[l] == null) && (l.includes("-") ? t.style.removeProperty(l) : t.style[l] = "");
310
+ for (const l in s)
311
+ (!a || s[l] !== a[l]) && (l.includes("-") ? t.style.setProperty(l, s[l]) : t.style[l] = s[l]);
292
312
  } else if (e !== "key")
293
313
  if (e === "ref")
294
314
  s && s(t);
295
315
  else if (!t.__lookupSetter__(e) && e[0] === "o" && e[1] === "n")
296
- e[2] === "-" ? e = e.slice(3) : ge(V, o) ? e = o.slice(2) : e = o[2] + e.slice(3), a && b.rel(t, e, a, !1), s && b.ael(t, e, s, !1);
316
+ e[2] === "-" ? e = e.slice(3) : ke(J, o) ? e = o.slice(2) : e = o[2] + e.slice(3), a && b.rel(t, e, a, !1), s && b.ael(t, e, s, !1);
297
317
  else {
298
- const c = re(s);
299
- if ((i || c && s !== null) && !r)
318
+ const l = ie(s);
319
+ if ((r || l && s !== null) && !i)
300
320
  try {
301
321
  if (t.tagName.includes("-"))
302
322
  t[e] = s;
303
323
  else {
304
- const u = s ?? "";
305
- e === "list" ? i = !1 : (a == null || t[e] != u) && (t[e] = u);
324
+ const d = s ?? "";
325
+ e === "list" ? r = !1 : (a == null || t[e] != d) && (t[e] = d);
306
326
  }
307
327
  } catch {
308
328
  }
309
- let l = !1;
310
- o !== (o = o.replace(/^xlink\:?/, "")) && (e = o, l = !0), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === "") && (l ? t.removeAttributeNS(oe, e) : t.removeAttribute(e)) : (!i || n & 4 || r) && !c && (s = s === !0 ? "" : s, l ? t.setAttributeNS(oe, e, s) : t.setAttribute(e, s));
329
+ let c = !1;
330
+ o !== (o = o.replace(/^xlink\:?/, "")) && (e = o, c = !0), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === "") && (c ? t.removeAttributeNS(ce, e) : t.removeAttribute(e)) : (!r || n & 4 || i) && !l && (s = s === !0 ? "" : s, c ? t.setAttributeNS(ce, e, s) : t.setAttribute(e, s));
311
331
  }
312
332
  }
313
- }, yt = /\s/, pe = (t) => t ? t.split(yt) : [], Me = (t, e, a, s) => {
314
- const r = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, n = t && t.$attrs$ || ce, i = e.$attrs$ || ce;
333
+ }, vt = /\s/, ye = (t) => t ? t.split(vt) : [], Ee = (t, e, a, s) => {
334
+ const i = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, n = t && t.$attrs$ || de, r = e.$attrs$ || de;
315
335
  for (s in n)
316
- s in i || he(r, s, n[s], void 0, a, e.$flags$);
317
- for (s in i)
318
- he(r, s, n[s], i[s], a, e.$flags$);
336
+ s in r || fe(i, s, n[s], void 0, a, e.$flags$);
337
+ for (s in r)
338
+ fe(i, s, n[s], r[s], a, e.$flags$);
319
339
  }, z = (t, e, a, s) => {
320
- const r = e.$children$[a];
321
- let n = 0, i, o, c;
322
- if (De || (se = !0, r.$tag$ === "slot" && (B && s.classList.add(B + "-s"), r.$flags$ |= r.$children$ ? (
340
+ const i = e.$children$[a];
341
+ let n = 0, r, o, l;
342
+ if (Se || (se = !0, i.$tag$ === "slot" && (B && s.classList.add(B + "-s"), i.$flags$ |= i.$children$ ? (
323
343
  // slot element has fallback content
324
344
  2
325
345
  ) : (
326
346
  // slot element does not have fallback content
327
347
  1
328
- ))), r.$text$ !== null)
329
- i = r.$elm$ = w.createTextNode(r.$text$);
330
- else if (r.$flags$ & 1)
331
- i = r.$elm$ = w.createTextNode("");
348
+ ))), i.$text$ !== null)
349
+ r = i.$elm$ = w.createTextNode(i.$text$);
350
+ else if (i.$flags$ & 1)
351
+ r = i.$elm$ = w.createTextNode("");
332
352
  else {
333
- if ($ || ($ = r.$tag$ === "svg"), i = r.$elm$ = w.createElementNS($ ? tt : at, r.$flags$ & 2 ? "slot-fb" : r.$tag$), $ && r.$tag$ === "foreignObject" && ($ = !1), Me(null, r, $), st(B) && i["s-si"] !== B && i.classList.add(i["s-si"] = B), r.$children$)
334
- for (n = 0; n < r.$children$.length; ++n)
335
- o = z(t, r, n, i), o && i.appendChild(o);
336
- r.$tag$ === "svg" ? $ = !1 : i.tagName === "foreignObject" && ($ = !0);
353
+ if (_ || (_ = i.$tag$ === "svg"), r = i.$elm$ = w.createElementNS(_ ? st : it, i.$flags$ & 2 ? "slot-fb" : i.$tag$), _ && i.$tag$ === "foreignObject" && (_ = !1), Ee(null, i, _), rt(B) && r["s-si"] !== B && r.classList.add(r["s-si"] = B), i.$children$)
354
+ for (n = 0; n < i.$children$.length; ++n)
355
+ o = z(t, i, n, r), o && r.appendChild(o);
356
+ i.$tag$ === "svg" ? _ = !1 : r.tagName === "foreignObject" && (_ = !0);
337
357
  }
338
- return i["s-hn"] = X, r.$flags$ & 3 && (i["s-sr"] = !0, i["s-cr"] = we, i["s-sn"] = r.$name$ || "", c = t && t.$children$ && t.$children$[a], c && c.$tag$ === r.$tag$ && t.$elm$ && P(t.$elm$, !1)), i;
339
- }, P = (t, e) => {
358
+ return r["s-hn"] = Q, i.$flags$ & 3 && (r["s-sr"] = !0, r["s-cr"] = xe, r["s-sn"] = i.$name$ || "", l = t && t.$children$ && t.$children$[a], l && l.$tag$ === i.$tag$ && t.$elm$ && q(t.$elm$, !1)), r;
359
+ }, q = (t, e) => {
340
360
  b.$flags$ |= 1;
341
361
  const a = t.childNodes;
342
362
  for (let s = a.length - 1; s >= 0; s--) {
343
- const r = a[s];
344
- r["s-hn"] !== X && r["s-ol"] && (Le(r).insertBefore(r, ie(r)), r["s-ol"].remove(), r["s-ol"] = void 0, se = !0), e && P(r, e);
363
+ const i = a[s];
364
+ i["s-hn"] !== Q && i["s-ol"] && (Re(i).insertBefore(i, re(i)), i["s-ol"].remove(), i["s-ol"] = void 0, se = !0), e && q(i, e);
345
365
  }
346
366
  b.$flags$ &= -2;
347
- }, Ce = (t, e, a, s, r, n) => {
348
- let i = t["s-cr"] && t["s-cr"].parentNode || t, o;
349
- for (i.shadowRoot && i.tagName === X && (i = i.shadowRoot); r <= n; ++r)
350
- s[r] && (o = z(null, a, r, t), o && (s[r].$elm$ = o, i.insertBefore(o, ie(e))));
351
- }, Te = (t, e, a, s, r) => {
367
+ }, Te = (t, e, a, s, i, n) => {
368
+ let r = t["s-cr"] && t["s-cr"].parentNode || t, o;
369
+ for (r.shadowRoot && r.tagName === Q && (r = r.shadowRoot); i <= n; ++i)
370
+ s[i] && (o = z(null, a, i, t), o && (s[i].$elm$ = o, r.insertBefore(o, re(e))));
371
+ }, Le = (t, e, a, s, i) => {
352
372
  for (; e <= a; ++e)
353
- (s = t[e]) && (r = s.$elm$, Be(s), H = !0, r["s-ol"] ? r["s-ol"].remove() : P(r, !0), r.remove());
354
- }, gt = (t, e, a, s) => {
355
- let r = 0, n = 0, i = 0, o = 0, c = e.length - 1, l = e[0], u = e[c], d = s.length - 1, p = s[0], k = s[d], _, S;
356
- for (; r <= c && n <= d; )
357
- if (l == null)
358
- l = e[++r];
359
- else if (u == null)
360
- u = e[--c];
373
+ (s = t[e]) && (i = s.$elm$, Ie(s), H = !0, i["s-ol"] ? i["s-ol"].remove() : q(i, !0), i.remove());
374
+ }, kt = (t, e, a, s) => {
375
+ let i = 0, n = 0, r = 0, o = 0, l = e.length - 1, c = e[0], d = e[l], u = s.length - 1, p = s[0], v = s[u], $, S;
376
+ for (; i <= l && n <= u; )
377
+ if (c == null)
378
+ c = e[++i];
379
+ else if (d == null)
380
+ d = e[--l];
361
381
  else if (p == null)
362
382
  p = s[++n];
363
- else if (k == null)
364
- k = s[--d];
365
- else if (Y(l, p))
366
- O(l, p), l = e[++r], p = s[++n];
367
- else if (Y(u, k))
368
- O(u, k), u = e[--c], k = s[--d];
369
- else if (Y(l, k))
370
- (l.$tag$ === "slot" || k.$tag$ === "slot") && P(l.$elm$.parentNode, !1), O(l, k), t.insertBefore(l.$elm$, u.$elm$.nextSibling), l = e[++r], k = s[--d];
371
- else if (Y(u, p))
372
- (l.$tag$ === "slot" || k.$tag$ === "slot") && P(u.$elm$.parentNode, !1), O(u, p), t.insertBefore(u.$elm$, l.$elm$), u = e[--c], p = s[++n];
383
+ else if (v == null)
384
+ v = s[--u];
385
+ else if (Y(c, p))
386
+ O(c, p), c = e[++i], p = s[++n];
387
+ else if (Y(d, v))
388
+ O(d, v), d = e[--l], v = s[--u];
389
+ else if (Y(c, v))
390
+ (c.$tag$ === "slot" || v.$tag$ === "slot") && q(c.$elm$.parentNode, !1), O(c, v), t.insertBefore(c.$elm$, d.$elm$.nextSibling), c = e[++i], v = s[--u];
391
+ else if (Y(d, p))
392
+ (c.$tag$ === "slot" || v.$tag$ === "slot") && q(d.$elm$.parentNode, !1), O(d, p), t.insertBefore(d.$elm$, c.$elm$), d = e[--l], p = s[++n];
373
393
  else {
374
- for (i = -1, o = r; o <= c; ++o)
394
+ for (r = -1, o = i; o <= l; ++o)
375
395
  if (e[o] && e[o].$key$ !== null && e[o].$key$ === p.$key$) {
376
- i = o;
396
+ r = o;
377
397
  break;
378
398
  }
379
- i >= 0 ? (S = e[i], S.$tag$ !== p.$tag$ ? _ = z(e && e[n], a, i, t) : (O(S, p), e[i] = void 0, _ = S.$elm$), p = s[++n]) : (_ = z(e && e[n], a, n, t), p = s[++n]), _ && Le(l.$elm$).insertBefore(_, ie(l.$elm$));
399
+ r >= 0 ? (S = e[r], S.$tag$ !== p.$tag$ ? $ = z(e && e[n], a, r, t) : (O(S, p), e[r] = void 0, $ = S.$elm$), p = s[++n]) : ($ = z(e && e[n], a, n, t), p = s[++n]), $ && Re(c.$elm$).insertBefore($, re(c.$elm$));
380
400
  }
381
- r > c ? Ce(t, s[d + 1] == null ? null : s[d + 1].$elm$, a, s, n, d) : n > d && Te(e, r, c);
382
- }, Y = (t, e) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : t.$key$ === e.$key$ : !1, ie = (t) => t && t["s-ol"] || t, Le = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, O = (t, e) => {
383
- const a = e.$elm$ = t.$elm$, s = t.$children$, r = e.$children$, n = e.$tag$, i = e.$text$;
401
+ i > l ? Te(t, s[u + 1] == null ? null : s[u + 1].$elm$, a, s, n, u) : n > u && Le(e, i, l);
402
+ }, Y = (t, e) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : t.$key$ === e.$key$ : !1, re = (t) => t && t["s-ol"] || t, Re = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, O = (t, e) => {
403
+ const a = e.$elm$ = t.$elm$, s = t.$children$, i = e.$children$, n = e.$tag$, r = e.$text$;
384
404
  let o;
385
- i === null ? ($ = n === "svg" ? !0 : n === "foreignObject" ? !1 : $, n === "slot" || Me(t, e, $), s !== null && r !== null ? gt(a, s, e, r) : r !== null ? (t.$text$ !== null && (a.textContent = ""), Ce(a, null, e, r, 0, r.length - 1)) : s !== null && Te(s, 0, s.length - 1), $ && n === "svg" && ($ = !1)) : (o = a["s-cr"]) ? o.parentNode.textContent = i : t.$text$ !== i && (a.data = i);
386
- }, Ee = (t) => {
405
+ r === null ? (_ = n === "svg" ? !0 : n === "foreignObject" ? !1 : _, n === "slot" || Ee(t, e, _), s !== null && i !== null ? kt(a, s, e, i) : i !== null ? (t.$text$ !== null && (a.textContent = ""), Te(a, null, e, i, 0, i.length - 1)) : s !== null && Le(s, 0, s.length - 1), _ && n === "svg" && (_ = !1)) : (o = a["s-cr"]) ? o.parentNode.textContent = r : t.$text$ !== r && (a.data = r);
406
+ }, Be = (t) => {
387
407
  const e = t.childNodes;
388
- let a, s, r, n, i, o;
389
- for (s = 0, r = e.length; s < r; s++)
408
+ let a, s, i, n, r, o;
409
+ for (s = 0, i = e.length; s < i; s++)
390
410
  if (a = e[s], a.nodeType === 1) {
391
411
  if (a["s-sr"]) {
392
- for (i = a["s-sn"], a.hidden = !1, n = 0; n < r; n++)
393
- if (o = e[n].nodeType, e[n]["s-hn"] !== a["s-hn"] || i !== "") {
394
- if (o === 1 && i === e[n].getAttribute("slot")) {
412
+ for (r = a["s-sn"], a.hidden = !1, n = 0; n < i; n++)
413
+ if (o = e[n].nodeType, e[n]["s-hn"] !== a["s-hn"] || r !== "") {
414
+ if (o === 1 && r === e[n].getAttribute("slot")) {
395
415
  a.hidden = !0;
396
416
  break;
397
417
  }
@@ -400,110 +420,110 @@ const h = (t, e, ...a) => {
400
420
  break;
401
421
  }
402
422
  }
403
- Ee(a);
423
+ Be(a);
404
424
  }
405
- }, m = [], Re = (t) => {
406
- let e, a, s, r, n, i, o = 0;
407
- const c = t.childNodes, l = c.length;
408
- for (; o < l; o++) {
409
- if (e = c[o], e["s-sr"] && (a = e["s-cr"]) && a.parentNode)
410
- for (s = a.parentNode.childNodes, r = e["s-sn"], i = s.length - 1; i >= 0; i--)
411
- a = s[i], !a["s-cn"] && !a["s-nr"] && a["s-hn"] !== e["s-hn"] && (fe(a, r) ? (n = m.find((u) => u.$nodeToRelocate$ === a), H = !0, a["s-sn"] = a["s-sn"] || r, n ? n.$slotRefNode$ = e : m.push({
425
+ }, m = [], Oe = (t) => {
426
+ let e, a, s, i, n, r, o = 0;
427
+ const l = t.childNodes, c = l.length;
428
+ for (; o < c; o++) {
429
+ if (e = l[o], e["s-sr"] && (a = e["s-cr"]) && a.parentNode)
430
+ for (s = a.parentNode.childNodes, i = e["s-sn"], r = s.length - 1; r >= 0; r--)
431
+ a = s[r], !a["s-cn"] && !a["s-nr"] && a["s-hn"] !== e["s-hn"] && (ge(a, i) ? (n = m.find((d) => d.$nodeToRelocate$ === a), H = !0, a["s-sn"] = a["s-sn"] || i, n ? n.$slotRefNode$ = e : m.push({
412
432
  $slotRefNode$: e,
413
433
  $nodeToRelocate$: a
414
- }), a["s-sr"] && m.map((u) => {
415
- fe(u.$nodeToRelocate$, a["s-sn"]) && (n = m.find((d) => d.$nodeToRelocate$ === a), n && !u.$slotRefNode$ && (u.$slotRefNode$ = n.$slotRefNode$));
416
- })) : m.some((u) => u.$nodeToRelocate$ === a) || m.push({
434
+ }), a["s-sr"] && m.map((d) => {
435
+ ge(d.$nodeToRelocate$, a["s-sn"]) && (n = m.find((u) => u.$nodeToRelocate$ === a), n && !d.$slotRefNode$ && (d.$slotRefNode$ = n.$slotRefNode$));
436
+ })) : m.some((d) => d.$nodeToRelocate$ === a) || m.push({
417
437
  $nodeToRelocate$: a
418
438
  }));
419
- e.nodeType === 1 && Re(e);
439
+ e.nodeType === 1 && Oe(e);
420
440
  }
421
- }, fe = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", Be = (t) => {
422
- t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(Be);
423
- }, kt = (t, e) => {
424
- const a = t.$hostElement$, s = t.$cmpMeta$, r = t.$vnode$ || j(null, null), n = it(e) ? e : h(null, null, e);
425
- X = a.tagName, s.$attrsToReflect$ && (n.$attrs$ = n.$attrs$ || {}, s.$attrsToReflect$.map(([i, o]) => n.$attrs$[o] = a[i])), n.$tag$ = null, n.$flags$ |= 4, t.$vnode$ = n, n.$elm$ = r.$elm$ = a.shadowRoot || a, B = a["s-sc"], we = a["s-cr"], De = (s.$flags$ & 1) !== 0, H = !1, O(r, n);
441
+ }, ge = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", Ie = (t) => {
442
+ t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(Ie);
443
+ }, bt = (t, e) => {
444
+ const a = t.$hostElement$, s = t.$cmpMeta$, i = t.$vnode$ || j(null, null), n = ot(e) ? e : h(null, null, e);
445
+ Q = a.tagName, s.$attrsToReflect$ && (n.$attrs$ = n.$attrs$ || {}, s.$attrsToReflect$.map(([r, o]) => n.$attrs$[o] = a[r])), n.$tag$ = null, n.$flags$ |= 4, t.$vnode$ = n, n.$elm$ = i.$elm$ = a.shadowRoot || a, B = a["s-sc"], xe = a["s-cr"], Se = (s.$flags$ & 1) !== 0, H = !1, O(i, n);
426
446
  {
427
447
  if (b.$flags$ |= 1, se) {
428
- Re(n.$elm$);
429
- let i, o, c, l, u, d, p = 0;
448
+ Oe(n.$elm$);
449
+ let r, o, l, c, d, u, p = 0;
430
450
  for (; p < m.length; p++)
431
- i = m[p], o = i.$nodeToRelocate$, o["s-ol"] || (c = w.createTextNode(""), c["s-nr"] = o, o.parentNode.insertBefore(o["s-ol"] = c, o));
451
+ r = m[p], o = r.$nodeToRelocate$, o["s-ol"] || (l = w.createTextNode(""), l["s-nr"] = o, o.parentNode.insertBefore(o["s-ol"] = l, o));
432
452
  for (p = 0; p < m.length; p++)
433
- if (i = m[p], o = i.$nodeToRelocate$, i.$slotRefNode$) {
434
- for (l = i.$slotRefNode$.parentNode, u = i.$slotRefNode$.nextSibling, c = o["s-ol"]; c = c.previousSibling; )
435
- if (d = c["s-nr"], d && d["s-sn"] === o["s-sn"] && l === d.parentNode && (d = d.nextSibling, !d || !d["s-nr"])) {
436
- u = d;
453
+ if (r = m[p], o = r.$nodeToRelocate$, r.$slotRefNode$) {
454
+ for (c = r.$slotRefNode$.parentNode, d = r.$slotRefNode$.nextSibling, l = o["s-ol"]; l = l.previousSibling; )
455
+ if (u = l["s-nr"], u && u["s-sn"] === o["s-sn"] && c === u.parentNode && (u = u.nextSibling, !u || !u["s-nr"])) {
456
+ d = u;
437
457
  break;
438
458
  }
439
- (!u && l !== o.parentNode || o.nextSibling !== u) && o !== u && (!o["s-hn"] && o["s-ol"] && (o["s-hn"] = o["s-ol"].parentNode.nodeName), l.insertBefore(o, u));
459
+ (!d && c !== o.parentNode || o.nextSibling !== d) && o !== d && (!o["s-hn"] && o["s-ol"] && (o["s-hn"] = o["s-ol"].parentNode.nodeName), c.insertBefore(o, d));
440
460
  } else
441
461
  o.nodeType === 1 && (o.hidden = !0);
442
462
  }
443
- H && Ee(n.$elm$), b.$flags$ &= -2, m.length = 0;
463
+ H && Be(n.$elm$), b.$flags$ &= -2, m.length = 0;
444
464
  }
445
- }, vt = (t, e) => {
446
- }, Oe = (t, e) => (t.$flags$ |= 16, vt(t, t.$ancestorComponent$), Wt(() => bt(t, e))), bt = (t, e) => {
447
- const a = t.$hostElement$, s = T("scheduleUpdate", t.$cmpMeta$.$tagName$), r = a;
465
+ }, _t = (t, e) => {
466
+ }, Ae = (t, e) => (t.$flags$ |= 16, _t(t, t.$ancestorComponent$), jt(() => $t(t, e))), $t = (t, e) => {
467
+ const a = t.$hostElement$, s = E("scheduleUpdate", t.$cmpMeta$.$tagName$), i = a;
448
468
  let n;
449
- return e ? n = I(r, "componentWillLoad") : n = I(r, "componentWillUpdate"), n = ye(n, () => I(r, "componentWillRender")), s(), ye(n, () => $t(t, r, e));
450
- }, $t = async (t, e, a) => {
451
- const s = t.$hostElement$, r = T("update", t.$cmpMeta$.$tagName$);
452
- s["s-rc"], a && ft(t);
453
- const n = T("render", t.$cmpMeta$.$tagName$);
454
- _t(t, e, s), n(), r(), mt(t);
455
- }, _t = (t, e, a) => {
469
+ return e ? n = I(i, "componentWillLoad") : n = I(i, "componentWillUpdate"), n = ve(n, () => I(i, "componentWillRender")), s(), ve(n, () => mt(t, i, e));
470
+ }, mt = async (t, e, a) => {
471
+ const s = t.$hostElement$, i = E("update", t.$cmpMeta$.$tagName$);
472
+ s["s-rc"], a && gt(t);
473
+ const n = E("render", t.$cmpMeta$.$tagName$);
474
+ wt(t, e, s), n(), i(), Dt(t);
475
+ }, wt = (t, e, a) => {
456
476
  try {
457
- ne = e, e = e.render && e.render(), t.$flags$ &= -17, t.$flags$ |= 2, (R.hasRenderFn || R.reflect) && (R.vdomRender || R.reflect) && (R.hydrateServerSide || kt(t, e));
477
+ le = e, e = e.render && e.render(), t.$flags$ &= -17, t.$flags$ |= 2, (R.hasRenderFn || R.reflect) && (R.vdomRender || R.reflect) && (R.hydrateServerSide || bt(t, e));
458
478
  } catch (o) {
459
- q(o, t.$hostElement$);
479
+ P(o, t.$hostElement$);
460
480
  }
461
- return ne = null, null;
462
- }, mt = (t) => {
463
- const e = t.$cmpMeta$.$tagName$, a = t.$hostElement$, s = T("postUpdate", e), r = a;
464
- t.$ancestorComponent$, I(r, "componentDidRender"), t.$flags$ & 64 ? (I(r, "componentDidUpdate"), s()) : (t.$flags$ |= 64, I(r, "componentDidLoad"), s());
481
+ return le = null, null;
482
+ }, Dt = (t) => {
483
+ const e = t.$cmpMeta$.$tagName$, a = t.$hostElement$, s = E("postUpdate", e), i = a;
484
+ t.$ancestorComponent$, I(i, "componentDidRender"), t.$flags$ & 64 ? (I(i, "componentDidUpdate"), s()) : (t.$flags$ |= 64, I(i, "componentDidLoad"), s());
465
485
  }, I = (t, e, a) => {
466
486
  if (t && t[e])
467
487
  try {
468
488
  return t[e](a);
469
489
  } catch (s) {
470
- q(s);
490
+ P(s);
471
491
  }
472
- }, ye = (t, e) => t && t.then ? t.then(e) : e(), wt = (t, e) => J(t).$instanceValues$.get(e), Dt = (t, e, a, s) => {
473
- const r = J(t), n = t, i = r.$instanceValues$.get(e), o = r.$flags$, c = n;
474
- a = lt(a, s.$members$[e][0]);
475
- const l = Number.isNaN(i) && Number.isNaN(a);
476
- if (a !== i && !l) {
477
- r.$instanceValues$.set(e, a);
492
+ }, ve = (t, e) => t && t.then ? t.then(e) : e(), xt = (t, e) => X(t).$instanceValues$.get(e), St = (t, e, a, s) => {
493
+ const i = X(t), n = t, r = i.$instanceValues$.get(e), o = i.$flags$, l = n;
494
+ a = ut(a, s.$members$[e][0]);
495
+ const c = Number.isNaN(r) && Number.isNaN(a);
496
+ if (a !== r && !c) {
497
+ i.$instanceValues$.set(e, a);
478
498
  {
479
499
  if (s.$watchers$ && o & 128) {
480
- const d = s.$watchers$[e];
481
- d && d.map((p) => {
500
+ const u = s.$watchers$[e];
501
+ u && u.map((p) => {
482
502
  try {
483
- c[p](a, i, e);
484
- } catch (k) {
485
- q(k, n);
503
+ l[p](a, r, e);
504
+ } catch (v) {
505
+ P(v, n);
486
506
  }
487
507
  });
488
508
  }
489
509
  if ((o & 18) === 2) {
490
- if (c.componentShouldUpdate && c.componentShouldUpdate(a, i, e) === !1)
510
+ if (l.componentShouldUpdate && l.componentShouldUpdate(a, r, e) === !1)
491
511
  return;
492
- Oe(r, !1);
512
+ Ae(i, !1);
493
513
  }
494
514
  }
495
515
  }
496
- }, xt = (t, e, a) => {
516
+ }, Ct = (t, e, a) => {
497
517
  if (e.$members$) {
498
518
  t.watchers && (e.$watchers$ = t.watchers);
499
- const s = Object.entries(e.$members$), r = t.prototype;
500
- s.map(([n, [i]]) => {
501
- (i & 31 || i & 32) && Object.defineProperty(r, n, {
519
+ const s = Object.entries(e.$members$), i = t.prototype;
520
+ s.map(([n, [r]]) => {
521
+ (r & 31 || r & 32) && Object.defineProperty(i, n, {
502
522
  get() {
503
- return wt(this, n);
523
+ return xt(this, n);
504
524
  },
505
525
  set(o) {
506
- Dt(this, n, o, e);
526
+ St(this, n, o, e);
507
527
  },
508
528
  configurable: !0,
509
529
  enumerable: !0
@@ -511,71 +531,71 @@ const h = (t, e, ...a) => {
511
531
  });
512
532
  {
513
533
  const n = /* @__PURE__ */ new Map();
514
- r.attributeChangedCallback = function(i, o, c) {
534
+ i.attributeChangedCallback = function(r, o, l) {
515
535
  b.jmp(() => {
516
- const l = n.get(i);
517
- if (this.hasOwnProperty(l))
518
- c = this[l], delete this[l];
519
- else if (r.hasOwnProperty(l) && typeof this[l] == "number" && this[l] == c)
536
+ const c = n.get(r);
537
+ if (this.hasOwnProperty(c))
538
+ l = this[c], delete this[c];
539
+ else if (i.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == l)
520
540
  return;
521
- this[l] = c === null && typeof this[l] == "boolean" ? !1 : c;
541
+ this[c] = l === null && typeof this[c] == "boolean" ? !1 : l;
522
542
  });
523
543
  }, t.observedAttributes = s.filter(
524
- ([i, o]) => o[0] & 15
544
+ ([r, o]) => o[0] & 15
525
545
  /* MEMBER_FLAGS.HasAttribute */
526
- ).map(([i, o]) => {
527
- const c = o[1] || i;
528
- return n.set(c, i), o[0] & 512 && e.$attrsToReflect$.push([i, c]), c;
546
+ ).map(([r, o]) => {
547
+ const l = o[1] || r;
548
+ return n.set(l, r), o[0] & 512 && e.$attrsToReflect$.push([r, l]), l;
529
549
  });
530
550
  }
531
551
  }
532
552
  return t;
533
- }, St = async (t, e, a, s, r) => {
534
- if ((e.$flags$ & 32) === 0 && (r = t.constructor, e.$flags$ |= 32, customElements.whenDefined(a.$tagName$).then(() => e.$flags$ |= 128), r.style)) {
535
- let i = r.style;
536
- typeof i != "string" && (i = i[e.$modeName$ = ct(t)]);
537
- const o = Se(a, e.$modeName$);
553
+ }, Mt = async (t, e, a, s, i) => {
554
+ if ((e.$flags$ & 32) === 0 && (i = t.constructor, e.$flags$ |= 32, customElements.whenDefined(a.$tagName$).then(() => e.$flags$ |= 128), i.style)) {
555
+ let r = i.style;
556
+ typeof r != "string" && (r = r[e.$modeName$ = dt(t)]);
557
+ const o = Me(a, e.$modeName$);
538
558
  if (!K.has(o)) {
539
- const c = T("registerStyles", a.$tagName$);
540
- ht(o, i, !!(a.$flags$ & 1)), c();
559
+ const l = E("registerStyles", a.$tagName$);
560
+ ft(o, r, !!(a.$flags$ & 1)), l();
541
561
  }
542
562
  }
543
- e.$ancestorComponent$, Oe(e, !0);
544
- }, Mt = (t) => {
545
- }, Ct = (t) => {
563
+ e.$ancestorComponent$, Ae(e, !0);
564
+ }, Et = (t) => {
565
+ }, Tt = (t) => {
546
566
  if ((b.$flags$ & 1) === 0) {
547
- const e = J(t), a = e.$cmpMeta$, s = T("connectedCallback", a.$tagName$);
548
- e.$flags$ & 1 ? (Ie(t, e, a.$listeners$), Mt(e.$lazyInstance$)) : (e.$flags$ |= 1, a.$flags$ & 12 && Tt(t), a.$members$ && Object.entries(a.$members$).map(([r, [n]]) => {
549
- if (n & 31 && t.hasOwnProperty(r)) {
550
- const i = t[r];
551
- delete t[r], t[r] = i;
567
+ const e = X(t), a = e.$cmpMeta$, s = E("connectedCallback", a.$tagName$);
568
+ e.$flags$ & 1 ? (Ne(t, e, a.$listeners$), Et(e.$lazyInstance$)) : (e.$flags$ |= 1, a.$flags$ & 12 && Lt(t), a.$members$ && Object.entries(a.$members$).map(([i, [n]]) => {
569
+ if (n & 31 && t.hasOwnProperty(i)) {
570
+ const r = t[i];
571
+ delete t[i], t[i] = r;
552
572
  }
553
- }), St(t, e, a)), s();
573
+ }), Mt(t, e, a)), s();
554
574
  }
555
- }, Tt = (t) => {
575
+ }, Lt = (t) => {
556
576
  const e = t["s-cr"] = w.createComment("");
557
577
  e["s-cn"] = !0, t.insertBefore(e, t.firstChild);
558
- }, Lt = (t) => {
578
+ }, Rt = (t) => {
559
579
  if ((b.$flags$ & 1) === 0) {
560
- const e = J(t);
580
+ const e = X(t);
561
581
  e.$rmListeners$ && (e.$rmListeners$.map((a) => a()), e.$rmListeners$ = void 0);
562
582
  }
563
- }, Et = (t, e) => {
583
+ }, Bt = (t, e) => {
564
584
  const a = {
565
585
  $flags$: e[0],
566
586
  $tagName$: e[1]
567
587
  };
568
588
  a.$members$ = e[2], a.$listeners$ = e[3], a.$watchers$ = t.$watchers$, a.$attrsToReflect$ = [];
569
- const s = t.prototype.connectedCallback, r = t.prototype.disconnectedCallback;
589
+ const s = t.prototype.connectedCallback, i = t.prototype.disconnectedCallback;
570
590
  return Object.assign(t.prototype, {
571
591
  __registerHost() {
572
- It(this, a);
592
+ Nt(this, a);
573
593
  },
574
594
  connectedCallback() {
575
- Ct(this), s && s.call(this);
595
+ Tt(this), s && s.call(this);
576
596
  },
577
597
  disconnectedCallback() {
578
- Lt(this), r && r.call(this);
598
+ Rt(this), i && i.call(this);
579
599
  },
580
600
  __attachShadow() {
581
601
  this.attachShadow({
@@ -583,30 +603,30 @@ const h = (t, e, ...a) => {
583
603
  delegatesFocus: !!(a.$flags$ & 16)
584
604
  });
585
605
  }
586
- }), t.is = a.$tagName$, xt(t, a);
587
- }, Ie = (t, e, a, s) => {
588
- a && a.map(([r, n, i]) => {
589
- const o = Bt(t, r), c = Rt(e, i), l = Ot(r);
590
- b.ael(o, n, c, l), (e.$rmListeners$ = e.$rmListeners$ || []).push(() => b.rel(o, n, c, l));
606
+ }), t.is = a.$tagName$, Ct(t, a);
607
+ }, Ne = (t, e, a, s) => {
608
+ a && a.map(([i, n, r]) => {
609
+ const o = It(t, i), l = Ot(e, r), c = At(i);
610
+ b.ael(o, n, l, c), (e.$rmListeners$ = e.$rmListeners$ || []).push(() => b.rel(o, n, l, c));
591
611
  });
592
- }, Rt = (t, e) => (a) => {
612
+ }, Ot = (t, e) => (a) => {
593
613
  try {
594
614
  R.lazyLoad || t.$hostElement$[e](a);
595
615
  } catch (s) {
596
- q(s);
616
+ P(s);
597
617
  }
598
- }, Bt = (t, e) => e & 4 ? w : e & 8 ? V : e & 16 ? w.body : t, Ot = (t) => Ft ? {
618
+ }, It = (t, e) => e & 4 ? w : e & 8 ? J : e & 16 ? w.body : t, At = (t) => Pt ? {
599
619
  passive: (t & 1) !== 0,
600
620
  capture: (t & 2) !== 0
601
- } : (t & 2) !== 0, Ae = /* @__PURE__ */ new WeakMap(), J = (t) => Ae.get(t), It = (t, e) => {
621
+ } : (t & 2) !== 0, Fe = /* @__PURE__ */ new WeakMap(), X = (t) => Fe.get(t), Nt = (t, e) => {
602
622
  const a = {
603
623
  $flags$: 0,
604
624
  $hostElement$: t,
605
625
  $cmpMeta$: e,
606
626
  $instanceValues$: /* @__PURE__ */ new Map()
607
627
  };
608
- return Ie(t, a, e.$listeners$), Ae.set(t, a);
609
- }, ge = (t, e) => e in t, q = (t, e) => (0, console.error)(t, e), K = /* @__PURE__ */ new Map(), At = [], V = typeof window < "u" ? window : {}, w = V.document || { head: {} }, Nt = V.HTMLElement || class {
628
+ return Ne(t, a, e.$listeners$), Fe.set(t, a);
629
+ }, ke = (t, e) => e in t, P = (t, e) => (0, console.error)(t, e), K = /* @__PURE__ */ new Map(), Ft = [], J = typeof window < "u" ? window : {}, w = J.document || { head: {} }, qt = J.HTMLElement || class {
610
630
  }, b = {
611
631
  $flags$: 0,
612
632
  $resourcesUrl$: "",
@@ -615,7 +635,7 @@ const h = (t, e, ...a) => {
615
635
  ael: (t, e, a, s) => t.addEventListener(e, a, s),
616
636
  rel: (t, e, a, s) => t.removeEventListener(e, a, s),
617
637
  ce: (t, e) => new CustomEvent(t, e)
618
- }, Ft = /* @__PURE__ */ (() => {
638
+ }, Pt = /* @__PURE__ */ (() => {
619
639
  let t = !1;
620
640
  try {
621
641
  w.addEventListener("e", null, Object.defineProperty({}, "passive", {
@@ -626,62 +646,62 @@ const h = (t, e, ...a) => {
626
646
  } catch {
627
647
  }
628
648
  return t;
629
- })(), Pt = (t) => Promise.resolve(t), qt = /* @__PURE__ */ (() => {
649
+ })(), Yt = (t) => Promise.resolve(t), Ut = /* @__PURE__ */ (() => {
630
650
  try {
631
651
  return new CSSStyleSheet(), typeof new CSSStyleSheet().replaceSync == "function";
632
652
  } catch {
633
653
  }
634
654
  return !1;
635
- })(), ke = [], Ne = [], Yt = (t, e) => (a) => {
636
- t.push(a), te || (te = !0, e && b.$flags$ & 4 ? Ut(ae) : b.raf(ae));
637
- }, ve = (t) => {
655
+ })(), be = [], qe = [], Wt = (t, e) => (a) => {
656
+ t.push(a), te || (te = !0, e && b.$flags$ & 4 ? Ht(ae) : b.raf(ae));
657
+ }, _e = (t) => {
638
658
  for (let e = 0; e < t.length; e++)
639
659
  try {
640
660
  t[e](performance.now());
641
661
  } catch (a) {
642
- q(a);
662
+ P(a);
643
663
  }
644
664
  t.length = 0;
645
665
  }, ae = () => {
646
- ve(ke), ve(Ne), (te = ke.length > 0) && b.raf(ae);
647
- }, Ut = (t) => Pt().then(t), Wt = /* @__PURE__ */ Yt(Ne, !0);
666
+ _e(be), _e(qe), (te = be.length > 0) && b.raf(ae);
667
+ }, Ht = (t) => Yt().then(t), jt = /* @__PURE__ */ Wt(qe, !0);
648
668
  function U(t, e) {
649
669
  const a = new Date(t);
650
670
  return a.setDate(a.getDate() + e), a;
651
671
  }
652
- function Ht(t, e, a) {
653
- const s = [], r = G(t), n = r.getDay() === 0 ? 7 : r.getDay(), i = N(t), o = i.getDay() === 0 ? 7 : i.getDay(), c = a === 1 ? 7 : a - 1, l = [], u = [];
672
+ function zt(t, e, a) {
673
+ const s = [], i = V(t), n = i.getDay() === 0 ? 7 : i.getDay(), r = N(t), o = r.getDay() === 0 ? 7 : r.getDay(), l = a === 1 ? 7 : a - 1, c = [], d = [];
654
674
  {
655
- let k = (7 - a + n) % 7, _ = Q(r);
656
- for (; k > 0; )
657
- l.push(_), _ = Q(_), k -= 1;
658
- l.reverse();
659
- let L = (7 - o + c) % 7, E = F(i);
660
- for (; L > 0; )
661
- u.push(E), E = F(E), L -= 1;
662
- }
663
- let d = r;
664
- for (; d.getMonth() === t.getMonth(); )
665
- s.push(d), d = F(d);
666
- return [...l, ...s, ...u];
675
+ let v = (7 - a + n) % 7, $ = G(i);
676
+ for (; v > 0; )
677
+ c.push($), $ = G($), v -= 1;
678
+ c.reverse();
679
+ let T = (7 - o + l) % 7, L = F(r);
680
+ for (; T > 0; )
681
+ d.push(L), L = F(L), T -= 1;
682
+ }
683
+ let u = i;
684
+ for (; u.getMonth() === t.getMonth(); )
685
+ s.push(u), u = F(u);
686
+ return [...c, ...s, ...d];
667
687
  }
668
- function G(t) {
669
- return v(/* @__PURE__ */ new Date(`${String(Pe(t)).padStart(4, "0")}-${String(Fe(t)).padStart(2, "0")}-01`));
688
+ function V(t) {
689
+ return k(/* @__PURE__ */ new Date(`${String(Ye(t)).padStart(4, "0")}-${String(Pe(t)).padStart(2, "0")}-01`));
670
690
  }
671
- function M(t) {
691
+ function C(t) {
672
692
  if (t instanceof Date)
673
693
  return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
674
694
  }
675
695
  function N(t) {
676
- const e = G(t);
696
+ const e = V(t);
677
697
  return e.setMonth(e.getMonth() + 1), e.setDate(e.getDate() - 1), e;
678
698
  }
679
- function Fe(t) {
699
+ function Pe(t) {
680
700
  return t.getMonth() + 1;
681
701
  }
682
- function jt(t) {
702
+ function Kt(t) {
683
703
  return new Array(12).fill(void 0).map((e, a) => {
684
- const s = v(/* @__PURE__ */ new Date(`2006-${String(a + 1).padStart(2, "0")}-01`));
704
+ const s = k(/* @__PURE__ */ new Date(`2006-${String(a + 1).padStart(2, "0")}-01`));
685
705
  return Intl.DateTimeFormat(t, {
686
706
  month: "long"
687
707
  }).format(s);
@@ -694,24 +714,24 @@ function Z(t) {
694
714
  const e = new Date(t);
695
715
  return e.setDate(1), e.setMonth(e.getMonth() + 1), e;
696
716
  }
697
- function be(t) {
717
+ function $e(t) {
698
718
  const e = new Date(t);
699
719
  return e.setFullYear(e.getFullYear() + 1), e;
700
720
  }
701
- function Q(t) {
721
+ function G(t) {
702
722
  return W(t, 1);
703
723
  }
704
724
  function ee(t) {
705
725
  const e = new Date(t);
706
726
  return e.setDate(1), e.setMonth(e.getMonth() - 1), e;
707
727
  }
708
- function $e(t) {
728
+ function me(t) {
709
729
  const e = new Date(t);
710
730
  return e.setFullYear(e.getFullYear() - 1), e;
711
731
  }
712
- function zt(t, e) {
732
+ function Vt(t, e) {
713
733
  return new Array(7).fill(void 0).map((a, s) => (t + s) % 7 + 1).map((a) => {
714
- const s = v(/* @__PURE__ */ new Date(`2006-01-0${a}`));
734
+ const s = k(/* @__PURE__ */ new Date(`2006-01-0${a}`));
715
735
  return [
716
736
  Intl.DateTimeFormat(e, {
717
737
  weekday: "short"
@@ -722,10 +742,10 @@ function zt(t, e) {
722
742
  ];
723
743
  });
724
744
  }
725
- function Pe(t) {
745
+ function Ye(t) {
726
746
  return t.getFullYear();
727
747
  }
728
- function _e(t, e) {
748
+ function we(t, e) {
729
749
  if (!t || !e || !e.from || !e.to)
730
750
  return !1;
731
751
  const a = e.from < e.to ? e.from : e.to, s = e.from < e.to ? e.to : e.from;
@@ -734,7 +754,7 @@ function _e(t, e) {
734
754
  function x(t, e) {
735
755
  return !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
736
756
  }
737
- function v(t) {
757
+ function k(t) {
738
758
  const e = new Date(t);
739
759
  return e.setMinutes(e.getMinutes() + e.getTimezoneOffset()), e;
740
760
  }
@@ -742,7 +762,7 @@ function W(t, e) {
742
762
  const a = new Date(t);
743
763
  return a.setDate(a.getDate() - e), a;
744
764
  }
745
- const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}", Gt = {
765
+ const Gt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}", Qt = {
746
766
  clearButton: "Clear value",
747
767
  monthSelect: "Select month",
748
768
  nextMonthButton: "Next month",
@@ -752,15 +772,15 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
752
772
  previousYearButton: "Previous year",
753
773
  todayButton: "Show today",
754
774
  yearSelect: "Select year"
755
- }, Qt = /* @__PURE__ */ Et(class extends Nt {
775
+ }, Xt = /* @__PURE__ */ Bt(class extends qt {
756
776
  constructor() {
757
- super(), this.__registerHost(), this.selectDate = de(this, "selectDate"), this.changeMonth = de(this, "changeMonth"), this.disabled = !1, this.disableDate = () => !1, this.elementClassName = "wc-datepicker", this.firstDayOfWeek = 0, this.goToRangeStartOnSelect = !0, this.labels = Gt, this.locale = navigator?.language || "en-US", this.maxSearchDays = 365, this.showClearButton = !1, this.showMonthStepper = !0, this.showTodayButton = !1, this.showYearStepper = !1, this.startDate = M(/* @__PURE__ */ new Date()), this.pendingClick = !1, this.init = () => {
758
- this.currentDate = this.startDate ? v(new Date(this.startDate)) : /* @__PURE__ */ new Date(), this.updateWeekdays(), this.handleMinDate(), this.handleMaxDate();
777
+ super(), this.__registerHost(), this.selectDate = he(this, "selectDate"), this.changeMonth = he(this, "changeMonth"), this.disabled = !1, this.disableDate = () => !1, this.elementClassName = "wc-datepicker", this.firstDayOfWeek = 0, this.goToRangeStartOnSelect = !0, this.labels = Qt, this.locale = navigator?.language || "en-US", this.maxSearchDays = 365, this.showClearButton = !1, this.showMonthStepper = !0, this.showTodayButton = !1, this.showYearStepper = !1, this.startDate = C(/* @__PURE__ */ new Date()), this.pendingClick = !1, this.init = () => {
778
+ this.currentDate = this.startDate ? k(new Date(this.startDate)) : /* @__PURE__ */ new Date(), this.updateWeekdays(), this.handleMinDate(), this.handleMaxDate();
759
779
  }, this.getAvailableDate = (t, e) => {
760
780
  let a, s = !1;
761
781
  switch (e) {
762
782
  case "previousDay":
763
- a = Q(t);
783
+ a = G(t);
764
784
  break;
765
785
  case "nextDay":
766
786
  a = F(t);
@@ -772,7 +792,7 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
772
792
  a = U(t, 7);
773
793
  break;
774
794
  case "firstOfMonth":
775
- a = G(t);
795
+ a = V(t);
776
796
  break;
777
797
  case "lastOfMonth":
778
798
  a = N(t);
@@ -784,17 +804,17 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
784
804
  a = Z(t);
785
805
  break;
786
806
  case "previousYear":
787
- a = $e(t);
807
+ a = me(t);
788
808
  break;
789
809
  case "nextYear":
790
- a = be(t);
810
+ a = $e(t);
791
811
  break;
792
812
  }
793
813
  for (; this.disableDate(a) && !s; ) {
794
814
  switch (e) {
795
815
  case "previousDay":
796
816
  case "lastOfMonth":
797
- a = Q(a);
817
+ a = G(a);
798
818
  break;
799
819
  case "nextDay":
800
820
  case "firstOfMonth":
@@ -825,7 +845,7 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
825
845
  s = a.getMonth() !== t.getMonth() + 1;
826
846
  break;
827
847
  default:
828
- s = !_e(a, {
848
+ s = !we(a, {
829
849
  from: W(t, this.maxSearchDays),
830
850
  to: U(t, this.maxSearchDays)
831
851
  });
@@ -836,11 +856,11 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
836
856
  }, this.nextMonth = () => {
837
857
  this.updateCurrentDate(Z(this.currentDate));
838
858
  }, this.nextYear = () => {
839
- this.updateCurrentDate(be(this.currentDate));
859
+ this.updateCurrentDate($e(this.currentDate));
840
860
  }, this.previousMonth = () => {
841
861
  this.updateCurrentDate(ee(this.currentDate));
842
862
  }, this.previousYear = () => {
843
- this.updateCurrentDate($e(this.currentDate));
863
+ this.updateCurrentDate(me(this.currentDate));
844
864
  }, this.showToday = () => {
845
865
  this.updateCurrentDate(/* @__PURE__ */ new Date());
846
866
  }, this.clear = () => {
@@ -852,25 +872,25 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
852
872
  const e = t.target.closest("[data-date]");
853
873
  if (!e)
854
874
  return;
855
- const a = v(new Date(e.dataset.date));
875
+ const a = k(new Date(e.dataset.date));
856
876
  this.isDateDisabled(a) || (this.updateCurrentDate(a), this.onSelectDate(a));
857
877
  }, this.onMonthSelect = (t) => {
858
- const e = +t.target.value - 1, a = this.currentDate.getDate(), s = new Date(this.currentDate.getFullYear(), e, 1), r = N(s).getDate(), n = Math.min(a, r), i = new Date(this.currentDate.getFullYear(), e, n);
859
- this.updateCurrentDate(i);
878
+ const e = +t.target.value - 1, a = this.currentDate.getDate(), s = new Date(this.currentDate.getFullYear(), e, 1), i = N(s).getDate(), n = Math.min(a, i), r = new Date(this.currentDate.getFullYear(), e, n);
879
+ this.updateCurrentDate(r);
860
880
  }, this.onYearSelect = (t) => {
861
881
  let e = +t.target.value;
862
882
  const a = t.target;
863
883
  isNaN(e) ? (e = (/* @__PURE__ */ new Date()).getFullYear(), a.value = String(e)) : e < 0 ? (e = 0, a.value = String(e)) : e > 9999 && (e = 9999, a.value = String(e));
864
- const s = this.currentDate.getDate(), r = this.currentDate.getMonth(), n = /* @__PURE__ */ new Date();
865
- n.setFullYear(e, r, 1);
866
- const i = N(n).getDate(), o = Math.min(s, i), c = /* @__PURE__ */ new Date();
867
- c.setFullYear(e, r, o), this.updateCurrentDate(c);
884
+ const s = this.currentDate.getDate(), i = this.currentDate.getMonth(), n = /* @__PURE__ */ new Date();
885
+ n.setFullYear(e, i, 1);
886
+ const r = N(n).getDate(), o = Math.min(s, r), l = /* @__PURE__ */ new Date();
887
+ l.setFullYear(e, i, o), this.updateCurrentDate(l);
868
888
  }, this.onKeyDown = (t) => {
869
889
  this.disabled || (t.code === "ArrowLeft" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousDay"), !0)) : t.code === "ArrowRight" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextDay"), !0)) : t.code === "ArrowUp" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousSameWeekDay"), !0)) : t.code === "ArrowDown" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextSameWeekDay"), !0)) : t.code === "PageUp" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousYear"), !0) : this.updateCurrentDate(this.getAvailableDate(this.currentDate, "previousMonth"), !0)) : t.code === "PageDown" ? (t.preventDefault(), t.shiftKey ? this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextYear"), !0) : this.updateCurrentDate(this.getAvailableDate(this.currentDate, "nextMonth"), !0)) : t.code === "Home" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "firstOfMonth"), !0)) : t.code === "End" ? (t.preventDefault(), this.updateCurrentDate(this.getAvailableDate(this.currentDate, "lastOfMonth"), !0)) : (t.code === "Space" || t.code === "Enter") && (t.preventDefault(), this.isDateDisabled(this.currentDate) || this.onSelectDate(this.currentDate)));
870
890
  }, this.onMouseEnter = (t) => {
871
891
  if (this.disabled)
872
892
  return;
873
- const e = v(new Date(t.target.closest("td").dataset.date));
893
+ const e = k(new Date(t.target.closest("td").dataset.date));
874
894
  this.hoveredDate = e;
875
895
  }, this.onMouseLeave = () => {
876
896
  this.hoveredDate = void 0;
@@ -879,7 +899,7 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
879
899
  }, this.onFocus = (t) => {
880
900
  if (this.pendingClick)
881
901
  return;
882
- const e = v(new Date(t.target.dataset.date));
902
+ const e = k(new Date(t.target.dataset.date));
883
903
  x(e, this.currentDate) || this.updateCurrentDate(e);
884
904
  };
885
905
  }
@@ -896,28 +916,28 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
896
916
  this.value = void 0, this.selectDate.emit(void 0);
897
917
  }
898
918
  watchStartDate() {
899
- this.currentDate = this.startDate ? v(new Date(this.startDate)) : /* @__PURE__ */ new Date();
919
+ this.currentDate = this.startDate ? k(new Date(this.startDate)) : /* @__PURE__ */ new Date();
900
920
  }
901
921
  watchValue() {
902
922
  this.value && (Array.isArray(this.value) ? this.currentDate = this.value.length > 1 && !this.goToRangeStartOnSelect ? this.value[1] : this.value[0] : this.value instanceof Date && (this.currentDate = this.value));
903
923
  }
904
924
  handleMinDate() {
905
- this.minDate && this.currentDate < v(new Date(this.minDate)) && (this.currentDate = v(new Date(this.minDate)));
925
+ this.minDate && this.currentDate < k(new Date(this.minDate)) && (this.currentDate = k(new Date(this.minDate)));
906
926
  }
907
927
  handleMaxDate() {
908
- this.maxDate && this.currentDate > v(new Date(this.maxDate)) && (this.currentDate = v(new Date(this.maxDate)));
928
+ this.maxDate && this.currentDate > k(new Date(this.maxDate)) && (this.currentDate = k(new Date(this.maxDate)));
909
929
  }
910
930
  componentDidRender() {
911
931
  this.moveFocusAfterMonthChanged && (this.focusDate(this.currentDate), this.moveFocusAfterMonthChanged = !1);
912
932
  }
913
933
  updateWeekdays() {
914
- this.weekdays = zt(this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek, this.locale);
934
+ this.weekdays = Vt(this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek, this.locale);
915
935
  }
916
936
  getClassName(t) {
917
937
  return t ? `${this.elementClassName}__${t}` : this.elementClassName;
918
938
  }
919
939
  getCalendarRows() {
920
- const t = Ht(this.currentDate, !0, this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek), e = [];
940
+ const t = zt(this.currentDate, !0, this.firstDayOfWeek === 0 ? 7 : this.firstDayOfWeek), e = [];
921
941
  for (let a = 0; a < t.length; a += 7) {
922
942
  const s = t.slice(a, a + 7);
923
943
  e.push(s);
@@ -946,15 +966,15 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
946
966
  }
947
967
  focusDate(t) {
948
968
  var e;
949
- (e = this.el.querySelector(`[data-date="${M(t)}"]`)) === null || e === void 0 || e.focus();
969
+ (e = this.el.querySelector(`[data-date="${C(t)}"]`)) === null || e === void 0 || e.focus();
950
970
  }
951
971
  updateCurrentDate(t, e) {
952
972
  const a = t.getMonth(), s = t.getFullYear();
953
973
  if (s > 9999 || s < 0)
954
974
  return;
955
975
  (a !== this.currentDate.getMonth() || s !== this.currentDate.getFullYear()) && (this.changeMonth.emit({
956
- month: Fe(t),
957
- year: Pe(t),
976
+ month: Pe(t),
977
+ year: Ye(t),
958
978
  day: t.getDate()
959
979
  }), e && (this.moveFocusAfterMonthChanged = !0)), this.currentDate = t, e && this.focusDate(this.currentDate);
960
980
  }
@@ -964,12 +984,12 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
964
984
  if (this.isRangeValue(this.value)) {
965
985
  const s = ((e = this.value) === null || e === void 0 ? void 0 : e[0]) === void 0 || this.value.length === 2 ? [t] : [this.value[0], t];
966
986
  s.length === 2 && s[0] > s[1] && s.reverse();
967
- const r = s[1] === void 0 ? [M(s[0])] : [M(s[0]), M(s[1])];
968
- this.value = s, this.selectDate.emit(r);
987
+ const i = s[1] === void 0 ? [C(s[0])] : [C(s[0]), C(s[1])];
988
+ this.value = s, this.selectDate.emit(i);
969
989
  } else {
970
990
  if (((a = this.value) === null || a === void 0 ? void 0 : a.getTime()) === t.getTime())
971
991
  return;
972
- this.value = t, this.selectDate.emit(M(t));
992
+ this.value = t, this.selectDate.emit(C(t));
973
993
  }
974
994
  }
975
995
  // @ts-ignore
@@ -979,54 +999,54 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
979
999
  get isPreviousMonthDisabled() {
980
1000
  if (!this.minDate)
981
1001
  return !1;
982
- const t = ee(this.currentDate), e = v(new Date(this.minDate));
1002
+ const t = ee(this.currentDate), e = k(new Date(this.minDate));
983
1003
  return N(t) < e;
984
1004
  }
985
1005
  get isNextMonthDisabled() {
986
1006
  if (!this.maxDate)
987
1007
  return !1;
988
- const t = Z(this.currentDate), e = v(new Date(this.maxDate));
989
- return G(t) > e;
1008
+ const t = Z(this.currentDate), e = k(new Date(this.maxDate));
1009
+ return V(t) > e;
990
1010
  }
991
1011
  isDateDisabled(t) {
992
1012
  if (this.disableDate(t))
993
1013
  return !0;
994
- const e = this.minDate && t < v(new Date(this.minDate)), a = this.maxDate && t > v(new Date(this.maxDate));
1014
+ const e = this.minDate && t < k(new Date(this.minDate)), a = this.maxDate && t > k(new Date(this.maxDate));
995
1015
  return !!(e || a);
996
1016
  }
997
1017
  render() {
998
1018
  const t = this.showTodayButton || this.showClearButton;
999
- return h(xe, null, h("div", { "aria-disabled": String(this.disabled), "aria-label": this.labels.picker, class: {
1019
+ return h(Ce, null, h("div", { "aria-disabled": String(this.disabled), "aria-label": this.labels.picker, class: {
1000
1020
  [this.getClassName()]: !0,
1001
1021
  [`${this.getClassName()}--disabled`]: this.disabled
1002
1022
  }, role: "group" }, h("div", { class: this.getClassName("header") }, h("span", { "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle()), this.showYearStepper && h("button", { "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), disabled: this.disabled, innerHTML: this.previousYearButtonContent || void 0, onClick: this.previousYear, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "11 17 6 12 11 7" }), h("polyline", { points: "18 17 13 12 18 7" }))), this.showMonthStepper && h("button", { "aria-label": this.labels.previousMonthButton, class: {
1003
1023
  [this.getClassName("previous-month-button")]: !0,
1004
1024
  [this.getClassName("next-month-button--disabled")]: this.isPreviousMonthDisabled
1005
- }, disabled: this.disabled || this.isPreviousMonthDisabled, innerHTML: this.previousMonthButtonContent || void 0, onClick: this.previousMonth, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "15 18 9 12 15 6" }))), h("span", { class: this.getClassName("current-month") }, h("select", { title: this.labels.monthSelect, "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), disabled: this.disabled, onChange: this.onMonthSelect }, jt(this.locale).map((e, a) => h("option", { key: e, selected: this.currentDate.getMonth() === a, value: a + 1 }, e))), h("input", { title: this.labels.yearSelect, "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), disabled: this.disabled, max: 9999, maxLength: 4, min: 1, onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && h("button", { "aria-label": this.labels.nextMonthButton, class: {
1025
+ }, disabled: this.disabled || this.isPreviousMonthDisabled, innerHTML: this.previousMonthButtonContent || void 0, onClick: this.previousMonth, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "15 18 9 12 15 6" }))), h("span", { class: this.getClassName("current-month") }, h("select", { title: this.labels.monthSelect, "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), disabled: this.disabled, onChange: this.onMonthSelect }, Kt(this.locale).map((e, a) => h("option", { key: e, selected: this.currentDate.getMonth() === a, value: a + 1 }, e))), h("input", { title: this.labels.yearSelect, "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), disabled: this.disabled, max: 9999, maxLength: 4, min: 1, onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && h("button", { "aria-label": this.labels.nextMonthButton, class: {
1006
1026
  [this.getClassName("next-month-button")]: !0,
1007
1027
  [this.getClassName("next-month-button--disabled")]: this.isNextMonthDisabled
1008
1028
  }, disabled: this.disabled || this.isNextMonthDisabled, innerHTML: this.nextMonthButtonContent || void 0, onClick: this.nextMonth, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "9 18 15 12 9 6" }))), this.showYearStepper && h("button", { "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), disabled: this.disabled, innerHTML: this.nextYearButtonContent || void 0, onClick: this.nextYear, type: "button" }, h("svg", { fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { points: "13 17 18 12 13 7" }), h("polyline", { points: "6 17 11 12 6 7" })))), h("div", { class: this.getClassName("body") }, h("table", { class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid" }, h("thead", { class: this.getClassName("calendar-header") }, h("tr", { class: this.getClassName("weekday-row") }, this.weekdays.map((e) => h("th", { "aria-label": e[1], abbr: e[1], class: this.getClassName("weekday"), key: e[0], scope: "col" }, h("span", null, e[0]))))), h("tbody", null, this.getCalendarRows().map((e) => {
1009
1029
  const a = `row-${e[0].getMonth()}-${e[0].getDate()}`;
1010
1030
  return h("tr", { class: this.getClassName("calendar-row"), key: a }, e.map((s) => {
1011
- var r, n, i, o, c;
1012
- const l = x(s, this.currentDate), u = s.getMonth() !== this.currentDate.getMonth(), d = Array.isArray(this.value) ? x(s, this.value[0]) || x(s, this.value[1]) : x(s, this.value), p = this.isRangeValue ? _e(s, {
1013
- from: (r = this.value) === null || r === void 0 ? void 0 : r[0],
1031
+ var i, n, r, o, l;
1032
+ const c = x(s, this.currentDate), d = s.getMonth() !== this.currentDate.getMonth(), u = Array.isArray(this.value) ? x(s, this.value[0]) || x(s, this.value[1]) : x(s, this.value), p = this.isRangeValue ? we(s, {
1033
+ from: (i = this.value) === null || i === void 0 ? void 0 : i[0],
1014
1034
  to: ((n = this.value) === null || n === void 0 ? void 0 : n[1]) || this.hoveredDate || this.currentDate
1015
- }) : !1, k = !((i = this.value) === null || i === void 0) && i[0] ? [
1035
+ }) : !1, v = !((r = this.value) === null || r === void 0) && r[0] ? [
1016
1036
  (o = this.value) === null || o === void 0 ? void 0 : o[0],
1017
- ((c = this.value) === null || c === void 0 ? void 0 : c[1]) || this.hoveredDate
1018
- ].sort((We, He) => We - He) : [], _ = this.range && x(k[0], s), S = this.range && x(k[1], s), L = x(s, /* @__PURE__ */ new Date()), E = this.isDateDisabled(s), qe = `cell-${s.getMonth()}-${s.getDate()}`, Ye = {
1037
+ ((l = this.value) === null || l === void 0 ? void 0 : l[1]) || this.hoveredDate
1038
+ ].sort((je, ze) => je - ze) : [], $ = this.range && x(v[0], s), S = this.range && x(v[1], s), T = x(s, /* @__PURE__ */ new Date()), L = this.isDateDisabled(s), Ue = `cell-${s.getMonth()}-${s.getDate()}`, We = {
1019
1039
  [this.getClassName("date")]: !0,
1020
- [this.getClassName("date--current")]: l,
1021
- [this.getClassName("date--disabled")]: E,
1022
- [this.getClassName("date--overflowing")]: u,
1023
- [this.getClassName("date--today")]: L,
1024
- [this.getClassName("date--selected")]: d,
1040
+ [this.getClassName("date--current")]: c,
1041
+ [this.getClassName("date--disabled")]: L,
1042
+ [this.getClassName("date--overflowing")]: d,
1043
+ [this.getClassName("date--today")]: T,
1044
+ [this.getClassName("date--selected")]: u,
1025
1045
  [this.getClassName("date--in-range")]: p,
1026
- [this.getClassName("date--start")]: _,
1046
+ [this.getClassName("date--start")]: $,
1027
1047
  [this.getClassName("date--end")]: S
1028
- }, Ue = d ? "strong" : L ? "em" : "span";
1029
- return h("td", { "aria-disabled": String(E), "aria-selected": d ? "true" : void 0, "aria-current": L ? "date" : d ? "true" : void 0, class: Ye, "data-date": M(s), key: qe, onClick: this.onClick, onMouseDown: this.onMouseDown, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onFocus: this.onFocus, role: "gridcell", tabIndex: x(s, this.currentDate) && !this.disabled ? 0 : -1 }, h(Ue, { "aria-hidden": "true" }, s.getDate()), h("span", { class: "visually-hidden" }, Intl.DateTimeFormat(this.locale, {
1048
+ }, He = u ? "strong" : T ? "em" : "span";
1049
+ return h("td", { "aria-disabled": String(L), "aria-selected": u ? "true" : void 0, "aria-current": T ? "date" : u ? "true" : void 0, class: We, "data-date": C(s), key: Ue, onClick: this.onClick, onMouseDown: this.onMouseDown, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onFocus: this.onFocus, role: "gridcell", tabIndex: x(s, this.currentDate) && !this.disabled ? 0 : -1 }, h(He, { "aria-hidden": "true" }, s.getDate()), h("span", { class: "visually-hidden" }, Intl.DateTimeFormat(this.locale, {
1030
1050
  day: "numeric",
1031
1051
  month: "long",
1032
1052
  year: "numeric"
@@ -1049,7 +1069,7 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
1049
1069
  };
1050
1070
  }
1051
1071
  static get style() {
1052
- return Kt;
1072
+ return Gt;
1053
1073
  }
1054
1074
  }, [2, "wc-datepicker", {
1055
1075
  clearButtonContent: [1, "clear-button-content"],
@@ -1078,24 +1098,22 @@ const Kt = ".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;
1078
1098
  currentDate: [32],
1079
1099
  hoveredDate: [32],
1080
1100
  weekdays: [32]
1081
- }]), Xt = Qt;
1082
- var Jt = Object.defineProperty, y = (t, e, a, s) => {
1083
- for (var r = void 0, n = t.length - 1, i; n >= 0; n--)
1084
- (i = t[n]) && (r = i(e, a, r) || r);
1085
- return r && Jt(e, a, r), r;
1101
+ }]), Jt = Xt;
1102
+ var Zt = Object.defineProperty, y = (t, e, a, s) => {
1103
+ for (var i = void 0, n = t.length - 1, r; n >= 0; n--)
1104
+ (r = t[n]) && (i = r(e, a, i) || i);
1105
+ return i && Zt(e, a, i), i;
1086
1106
  };
1087
- customElements.get("wc-datepicker") || customElements.define("wc-datepicker", Xt);
1088
- var C;
1089
- const f = (C = class extends Ze {
1107
+ customElements.get("wc-datepicker") || customElements.define("wc-datepicker", Jt);
1108
+ var M;
1109
+ const f = (M = class extends tt {
1090
1110
  constructor() {
1091
- super(...arguments), this.id = "", this.name = "", this.width = "full", this.hideTodayButton = !1, this.hideClearButton = !1, this.disabled = !1, this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.form = null, this.tooltip = "", this.type = "date", this.label = "", this.description = "", this.startDate = "", this.minDate = "", this.maxDate = "", this.inverted = !1, this.value = void 0, this.datepickerIsOpen = !1, this.DATEPICKER_GAP = 4, this._hasUserInteracted = !1, this._onKeydownEsc = (e) => {
1092
- if (e.key !== "Escape" || e.code !== "Escape" || !this.datepickerIsOpen) return;
1093
- e.preventDefault(), e.stopPropagation(), this.shadowRoot?.querySelector("wc-datepicker")?.classList.remove("active"), this.datepickerIsOpen = !1, this.removeEventListener("keydown", this._handleFocusTrap), this.shadowRoot?.querySelector("input")?.focus();
1111
+ super(...arguments), this.id = "", this.name = "", this.width = "full", this.hideTodayButton = !1, this.hideClearButton = !1, this.disabled = !1, this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.form = null, this.tooltip = "", this.type = "date", this.label = "", this.description = "", this.startDate = "", this.minDate = "", this.maxDate = "", this.inverted = !1, this.value = void 0, this.datepickerIsOpen = !1, this.DATEPICKER_GAP = 4, this._hasUserInteracted = !1, this._dirtySinceCommit = !1, this._onKeydownEsc = (e) => {
1112
+ e.key !== "Escape" || e.code !== "Escape" || this.datepickerIsOpen && (e.preventDefault(), e.stopPropagation(), this._closeCalendar(), this._focusInput());
1094
1113
  }, this._handleScrollReposition = () => {
1095
1114
  this.datepickerIsOpen && this._positionDatepicker();
1096
1115
  };
1097
1116
  }
1098
- // need this flag for "eager mode"
1099
1117
  /**
1100
1118
  * Lifecycle methods
1101
1119
  * --------------------------------------------------------------------------
@@ -1103,10 +1121,10 @@ const f = (C = class extends Ze {
1103
1121
  * NysFormControlElement (@nysds/internals).
1104
1122
  */
1105
1123
  connectedCallback() {
1106
- super.connectedCallback(), this.addEventListener("invalid", this._handleInvalid), this.addEventListener("focusout", this._handleBlur), this.addEventListener("keydown", this._onKeydownEsc);
1124
+ super.connectedCallback(), this.addEventListener("invalid", this._handleInvalid), this.addEventListener("focusin", this._handleFocus), this.addEventListener("focusout", this._handleBlur), this.addEventListener("keydown", this._onKeydownEsc);
1107
1125
  }
1108
1126
  disconnectedCallback() {
1109
- super.disconnectedCallback(), this._stopDatepickerPositioning(), this.removeEventListener("invalid", this._handleInvalid), this.removeEventListener("focusout", this._handleBlur), this.removeEventListener("keydown", this._onKeydownEsc);
1127
+ super.disconnectedCallback(), this._stopDatepickerPositioning(), this.removeEventListener("invalid", this._handleInvalid), this.removeEventListener("focusin", this._handleFocus), this.removeEventListener("focusout", this._handleBlur), this.removeEventListener("keydown", this._onKeydownEsc);
1110
1128
  }
1111
1129
  async firstUpdated() {
1112
1130
  this._setValue(this.value), !(this._shouldUseNativeDatepicker() || !await this._whenWcDatepickerReady()) && (setTimeout(() => this._replaceButtonSVG(), 0), setTimeout(() => this._addMonthDropdownIcon(), 0), setTimeout(() => this._handleDateChange(), 0), setTimeout(() => this._onDocumentClick(), 0));
@@ -1116,6 +1134,7 @@ const f = (C = class extends Ze {
1116
1134
  const a = e.get("value"), s = this.value;
1117
1135
  !s && a !== s ? (this.setFormValue(""), this._manageRequire()) : s && this._setValue(s);
1118
1136
  }
1137
+ e.has("required") && !e.has("value") && this._manageRequire();
1119
1138
  }
1120
1139
  async _whenWcDatepickerReady() {
1121
1140
  await customElements.whenDefined("wc-datepicker");
@@ -1148,8 +1167,8 @@ const f = (C = class extends Ze {
1148
1167
  String(a.getDate()).padStart(2, "0")
1149
1168
  ].join("-");
1150
1169
  this.value = a, this.setFormValue(s);
1151
- const r = this.shadowRoot?.querySelector("input");
1152
- r && (r.value = s);
1170
+ const i = this.shadowRoot?.querySelector("input");
1171
+ i && (i.value = s);
1153
1172
  const n = this.shadowRoot?.querySelector("wc-datepicker");
1154
1173
  n && (n.value = a), this._manageRequire();
1155
1174
  }
@@ -1157,8 +1176,11 @@ const f = (C = class extends Ze {
1157
1176
  _manageRequire() {
1158
1177
  const e = this.shadowRoot?.querySelector("input");
1159
1178
  if (!e) return;
1160
- const a = this.errorMessage || "This field is required.";
1161
- this.required && !this.value ? this.setValidityFromState({ valueMissing: !0 }, a, e) : this.clearValidity();
1179
+ this.required && !this.value ? (this.internalValidationMessage = "This field is required.", this.setValidityFromState(
1180
+ { valueMissing: !0 },
1181
+ this.resolvedErrorMessage(),
1182
+ e
1183
+ )) : (this.internalValidationMessage = "", this.clearValidity());
1162
1184
  }
1163
1185
  /**
1164
1186
  * Actively validates the component:
@@ -1171,7 +1193,7 @@ const f = (C = class extends Ze {
1171
1193
  if (!e) return;
1172
1194
  this._manageRequire();
1173
1195
  let a = "";
1174
- e.validity.valueMissing ? a = this.errorMessage || "This field is required." : a = e.validationMessage, this._setValidityMessage(a);
1196
+ e.validity.valueMissing ? a = "This field is required." : a = e.validationMessage, this._setValidityMessage(a);
1175
1197
  }
1176
1198
  /**
1177
1199
  * Passive check of validity:
@@ -1186,7 +1208,11 @@ const f = (C = class extends Ze {
1186
1208
  // Sets custom validity message
1187
1209
  _setValidityMessage(e = "") {
1188
1210
  const a = this.shadowRoot?.querySelector("input");
1189
- a && (!e && this.showError && this.errorMessage?.trim() || (this.showError = !!e, this.errorMessage?.trim() && e !== "" && (e = this.errorMessage), e ? this.setValidityFromState({ customError: !0 }, e, a) : this.clearValidity()));
1211
+ a && (!e && this.showError && this.errorMessage?.trim() || (this.showError = !!e, this.internalValidationMessage = e, e ? this.setValidityFromState(
1212
+ { customError: !0 },
1213
+ this.resolvedErrorMessage(),
1214
+ a
1215
+ ) : this.clearValidity()));
1190
1216
  }
1191
1217
  // Handles native 'invalid' events
1192
1218
  _handleInvalid(e) {
@@ -1195,7 +1221,7 @@ const f = (C = class extends Ze {
1195
1221
  if (a) {
1196
1222
  const s = this.internals?.form;
1197
1223
  s ? Array.from(s.elements).find(
1198
- (i) => typeof i.checkValidity == "function" && !i.checkValidity()
1224
+ (r) => typeof r.checkValidity == "function" && !r.checkValidity()
1199
1225
  ) === this && a.focus() : a.focus();
1200
1226
  }
1201
1227
  }
@@ -1230,25 +1256,25 @@ const f = (C = class extends Ze {
1230
1256
  if (a && !a.parentElement?.classList.contains("month-wrapper")) {
1231
1257
  const s = document.createElement("span");
1232
1258
  s.className = "month-wrapper", a.parentNode?.insertBefore(s, a), s.appendChild(a);
1233
- const r = document.createElement("nys-icon");
1234
- r.setAttribute("name", "chevron_down"), r.setAttribute("id", "wc-month-dropdown-icon"), r.setAttribute("size", "20"), s.appendChild(r);
1259
+ const i = document.createElement("nys-icon");
1260
+ i.setAttribute("name", "chevron_down"), i.setAttribute("id", "wc-month-dropdown-icon"), i.setAttribute("size", "20"), s.appendChild(i);
1235
1261
  }
1236
1262
  }
1237
1263
  // Creates a Date at local midnight to avoid UTC timezone shifting
1238
1264
  _parseLocalDate(e) {
1239
- const [a, s, r] = e.split("-").map(Number);
1240
- return new Date(a, s - 1, r);
1265
+ const [a, s, i] = e.split("-").map(Number);
1266
+ return new Date(a, s - 1, i);
1241
1267
  }
1242
1268
  _setTodayDate() {
1243
1269
  const e = /* @__PURE__ */ new Date();
1244
- e.setHours(0, 0, 0, 0), this._setValue(e), this._setFocusOnTodayDate();
1270
+ e.setHours(0, 0, 0, 0), this._setValue(e);
1245
1271
  }
1246
1272
  async _setFocusOnTodayDate(e = !1) {
1247
1273
  if (this.minDate) {
1248
- const i = /* @__PURE__ */ new Date();
1249
- i.setHours(0, 0, 0, 0);
1274
+ const r = /* @__PURE__ */ new Date();
1275
+ r.setHours(0, 0, 0, 0);
1250
1276
  const o = this._parseLocalDate(this.minDate);
1251
- if (i < o) return;
1277
+ if (r < o) return;
1252
1278
  }
1253
1279
  const a = /* @__PURE__ */ new Date();
1254
1280
  a.setHours(0, 0, 0, 0);
@@ -1256,9 +1282,9 @@ const f = (C = class extends Ze {
1256
1282
  a.getFullYear(),
1257
1283
  String(a.getMonth() + 1).padStart(2, "0"),
1258
1284
  String(a.getDate()).padStart(2, "0")
1259
- ].join("-"), r = this.shadowRoot?.querySelector("wc-datepicker");
1260
- if (!r) return;
1261
- const n = r.querySelector(
1285
+ ].join("-"), i = this.shadowRoot?.querySelector("wc-datepicker");
1286
+ if (!i) return;
1287
+ const n = i.querySelector(
1262
1288
  `td[data-date="${s}"]`
1263
1289
  );
1264
1290
  n && (e || n.focus());
@@ -1274,40 +1300,66 @@ const f = (C = class extends Ze {
1274
1300
  }
1275
1301
  return !1;
1276
1302
  }
1303
+ // The current value normalized to a YYYY-MM-DD string (local time, no UTC
1304
+ // shift). Empty string when no date is set. This is the shape nys-change
1305
+ // always carries, regardless of whether `value` holds a Date or a string.
1306
+ _valueAsString() {
1307
+ return this.value ? typeof this.value == "string" ? this.value : [
1308
+ this.value.getFullYear(),
1309
+ String(this.value.getMonth() + 1).padStart(2, "0"),
1310
+ String(this.value.getDate()).padStart(2, "0")
1311
+ ].join("-") : "";
1312
+ }
1277
1313
  _dispatchInputEvent() {
1278
- this.dispatchEvent(
1279
- new CustomEvent("nys-input", {
1280
- detail: { id: this.id, value: this.value },
1281
- bubbles: !0,
1282
- composed: !0
1283
- })
1284
- );
1314
+ ne(this, "nys-input", {
1315
+ id: this.id,
1316
+ name: this.name,
1317
+ value: this.value
1318
+ });
1319
+ }
1320
+ // Commit the current value: fires nys-change and clears the dirty flag so
1321
+ // a later blur doesn't re-commit the same selection.
1322
+ _dispatchChangeEvent() {
1323
+ this._dirtySinceCommit = !1, ne(this, "nys-change", {
1324
+ id: this.id,
1325
+ name: this.name,
1326
+ value: this._valueAsString()
1327
+ });
1328
+ }
1329
+ _closeCalendar() {
1330
+ this.shadowRoot?.querySelector("wc-datepicker")?.classList.remove("active"), this.datepickerIsOpen = !1, this._stopDatepickerPositioning(), this.removeEventListener("keydown", this._handleFocusTrap);
1331
+ }
1332
+ // We need to return focus to input after the calendar closes
1333
+ _focusInput() {
1334
+ this.shadowRoot?.querySelector("input")?.focus();
1285
1335
  }
1286
1336
  /**
1287
1337
  * Event Handlers
1288
1338
  * --------------------------------------------------------------------------
1289
1339
  */
1290
1340
  _handleInputKeydown(e) {
1291
- this.disabled || this._shouldUseNativeDatepicker() || ((e.key == " " || e.code == "Space") && (e.preventDefault(), this._openDatepicker()), (e.key === "Escape" || e.code === "Escape") && (e.preventDefault(), this.shadowRoot?.querySelector("wc-datepicker")?.classList.remove("active")));
1341
+ this.disabled || this._shouldUseNativeDatepicker() || ((e.key == " " || e.code == "Space") && (e.preventDefault(), this._openDatepicker()), (e.key === "Escape" || e.code === "Escape") && (e.preventDefault(), this._closeCalendar()), (e.key === "Enter" || e.code === "Enter") && this.datepickerIsOpen && this._closeCalendar());
1342
+ }
1343
+ // Fires nys-focus only when focus enters the component from outside;
1344
+ // internal focus moves (input <-> calendar popup) don't re-fire it.
1345
+ _handleFocus(e) {
1346
+ const a = e.relatedTarget;
1347
+ a && (this.contains(a) || this.shadowRoot?.contains(a)) || oe(this, "focus");
1292
1348
  }
1293
1349
  _handleBlur(e) {
1294
1350
  const a = e.relatedTarget;
1295
- if (a && (this.contains(a) || this.shadowRoot?.contains(a)) || this.datepickerIsOpen && !a)
1296
- return;
1297
- this._hasUserInteracted || (this._hasUserInteracted = !0), this.shadowRoot?.querySelector("wc-datepicker")?.classList.remove("active"), this.datepickerIsOpen = !1, this._validate(), this.dispatchEvent(
1298
- new Event("nys-blur", { bubbles: !0, composed: !0 })
1299
- ), this.removeEventListener("keydown", this._handleFocusTrap);
1351
+ a && (this.contains(a) || this.shadowRoot?.contains(a)) || this.datepickerIsOpen && !a || (this._hasUserInteracted || (this._hasUserInteracted = !0), this._closeCalendar(), this._validate(), this._dirtySinceCommit && this._dispatchChangeEvent(), oe(this, "blur"), this.removeEventListener("keydown", this._handleFocusTrap));
1300
1352
  }
1301
1353
  // For when users click outside of the datepicker, we remove the calendar popup
1302
1354
  _onDocumentClick() {
1303
1355
  if (this._shouldUseNativeDatepicker()) return;
1304
1356
  const e = (a) => {
1305
- const s = a.composedPath(), r = this.shadowRoot?.querySelector(
1357
+ const s = a.composedPath(), i = this.shadowRoot?.querySelector(
1306
1358
  ".nys-datepicker--input-container"
1307
1359
  ), n = this.shadowRoot?.querySelector(
1308
1360
  ".wc-datepicker--container"
1309
- ), i = this.shadowRoot?.querySelector("wc-datepicker");
1310
- r && s.includes(r) || n && s.includes(n) || i && s.includes(i) || i?.classList.remove("active");
1361
+ ), r = this.shadowRoot?.querySelector("wc-datepicker");
1362
+ i && s.includes(i) || n && s.includes(n) || r && s.includes(r) || r?.classList.remove("active");
1311
1363
  };
1312
1364
  document.addEventListener("click", e);
1313
1365
  }
@@ -1321,7 +1373,7 @@ const f = (C = class extends Ze {
1321
1373
  return;
1322
1374
  }
1323
1375
  const a = this.shadowRoot?.querySelector("wc-datepicker")?.classList.toggle("active");
1324
- this.datepickerIsOpen = !!a, a ? (this.value || this._setFocusOnTodayDate(), this._startDatepickerPositioning(), this.addEventListener("keydown", this._handleFocusTrap)) : this._stopDatepickerPositioning();
1376
+ this.datepickerIsOpen = !!a, a ? (this.value || this._setFocusOnTodayDate(), this._startDatepickerPositioning(), this.addEventListener("keydown", this._handleFocusTrap)) : (this._stopDatepickerPositioning(), this.removeEventListener("keydown", this._handleFocusTrap));
1325
1377
  }
1326
1378
  _openDatepicker() {
1327
1379
  if (this.disabled || this._shouldUseNativeDatepicker()) return;
@@ -1330,33 +1382,44 @@ const f = (C = class extends Ze {
1330
1382
  }
1331
1383
  _handleDateChange() {
1332
1384
  const e = this.shadowRoot?.querySelector("wc-datepicker");
1333
- e && e.addEventListener("selectDate", (a) => {
1334
- const s = a.detail, r = this._parseLocalDate(s);
1335
- if (this._isOutOfRange(r)) {
1385
+ e && (e.addEventListener("selectDate", (a) => {
1386
+ const s = a.detail, i = this._parseLocalDate(s);
1387
+ if (this._isOutOfRange(i)) {
1336
1388
  e.classList.add("active");
1337
1389
  return;
1338
1390
  }
1339
- this._setValue(r), this._validate(), this._dispatchInputEvent(), e.classList.remove("active"), this.datepickerIsOpen = !1, this.removeEventListener("keydown", this._handleFocusTrap);
1340
- });
1391
+ this._setValue(i), this._validate(), this._dispatchInputEvent(), this._dispatchChangeEvent(), this._closeCalendar();
1392
+ }), e.addEventListener("click", (a) => {
1393
+ const s = a.target?.closest(
1394
+ "td[data-date]"
1395
+ );
1396
+ if (!s) return;
1397
+ const i = s.getAttribute("data-date");
1398
+ if (!i) return;
1399
+ const n = this._parseLocalDate(i);
1400
+ this._isOutOfRange(n) || this._closeCalendar();
1401
+ }));
1341
1402
  }
1342
1403
  _handleTodayClick() {
1343
- this.disabled || (this._setTodayDate(), this._hasUserInteracted = !0, this._validate(), this._dispatchInputEvent());
1404
+ if (this.disabled) return;
1405
+ const e = /* @__PURE__ */ new Date();
1406
+ e.setHours(0, 0, 0, 0), !this._isOutOfRange(e) && (this._setTodayDate(), this._hasUserInteracted = !0, this._validate(), this._dispatchInputEvent(), this._dispatchChangeEvent(), this._closeCalendar());
1344
1407
  }
1345
1408
  _handleClearClick() {
1346
1409
  if (this.disabled) return;
1347
1410
  this.value = void 0, this.setFormValue("");
1348
1411
  const e = this.shadowRoot?.querySelector("input");
1349
- e && (e.value = ""), this._hasUserInteracted = !0, this._validate(), this._dispatchInputEvent();
1412
+ e && (e.value = ""), this._hasUserInteracted = !0, this._validate(), this._dispatchInputEvent(), this._dispatchChangeEvent();
1350
1413
  }
1351
1414
  _handleInputChange(e) {
1352
1415
  const a = e.target;
1353
1416
  if (!a) return;
1354
1417
  const s = this._getValidDateFromInput(a.value);
1355
1418
  if (!s) {
1356
- a.value || (this.value = void 0, this.setFormValue(""), this._hasUserInteracted && this._validate());
1419
+ a.value || (this.value !== void 0 && (this._dirtySinceCommit = !0), this.value = void 0, this.setFormValue(""), this._hasUserInteracted && this._validate());
1357
1420
  return;
1358
1421
  }
1359
- this._setValue(s), this._hasUserInteracted && this._validate(), this._dispatchInputEvent();
1422
+ a.value !== this._valueAsString() && (this._dirtySinceCommit = !0), this._setValue(s), this._hasUserInteracted && this._validate(), this._dispatchInputEvent();
1360
1423
  }
1361
1424
  _getValidDateFromInput(e) {
1362
1425
  const s = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
@@ -1364,25 +1427,31 @@ const f = (C = class extends Ze {
1364
1427
  }
1365
1428
  _handleFocusTrap(e) {
1366
1429
  if (!this.datepickerIsOpen || e.key !== "Tab") return;
1367
- const a = this.shadowRoot?.querySelector(
1368
- ".wc-datepicker--container"
1369
- );
1370
- if (!a) return;
1371
- const s = [
1430
+ const a = [
1372
1431
  "button:not([disabled])",
1373
1432
  "input:not([disabled])",
1374
1433
  "select:not([disabled])",
1375
1434
  "[tabindex]:not([tabindex='-1'])"
1376
- ], r = [];
1377
- if (a.querySelectorAll("nys-button").forEach((c) => {
1378
- r.push(c);
1379
- }), r.push(
1435
+ ], s = [], i = this.shadowRoot?.querySelector(
1436
+ ".nys-datepicker--input"
1437
+ );
1438
+ i && !i.disabled && s.push(i);
1439
+ const n = this.shadowRoot?.querySelector(
1440
+ "#calendar-button"
1441
+ );
1442
+ n && !n.disabled && s.push(n);
1443
+ const r = this.shadowRoot?.querySelector(
1444
+ ".wc-datepicker--container"
1445
+ );
1446
+ if (r && (r.querySelectorAll("nys-button").forEach((d) => {
1447
+ s.push(d);
1448
+ }), s.push(
1380
1449
  ...Array.from(
1381
- a.querySelectorAll(s.join(","))
1382
- ).filter((c) => c.offsetParent !== null)
1383
- ), r.length === 0) return;
1384
- const n = r[0], i = r[r.length - 1], o = this.shadowRoot?.activeElement;
1385
- e.shiftKey ? o === n && (e.preventDefault(), i.focus()) : o === i && (e.preventDefault(), n.focus());
1450
+ r.querySelectorAll(a.join(","))
1451
+ ).filter((d) => d.offsetParent !== null)
1452
+ )), s.length === 0) return;
1453
+ const o = s[0], l = s[s.length - 1], c = this.shadowRoot?.activeElement;
1454
+ e.shiftKey ? c === o && (e.preventDefault(), l.focus()) : c === l && (e.preventDefault(), o.focus());
1386
1455
  }
1387
1456
  _isSafari() {
1388
1457
  const e = navigator.userAgent;
@@ -1419,10 +1488,10 @@ const f = (C = class extends Ze {
1419
1488
  );
1420
1489
  if (!e || !a || !s) return;
1421
1490
  e.classList.remove("position-top"), e.style.top = "";
1422
- const r = e?.getBoundingClientRect();
1423
- if (window.innerHeight - r?.bottom < this.DATEPICKER_GAP) {
1424
- const i = a.getBoundingClientRect(), o = s.getBoundingClientRect(), c = i.top - o.top - r.height - this.DATEPICKER_GAP;
1425
- e.style.top = `${c}px`, e.classList.add("position-top");
1491
+ const i = e?.getBoundingClientRect();
1492
+ if (window.innerHeight - i?.bottom < this.DATEPICKER_GAP) {
1493
+ const r = a.getBoundingClientRect(), o = s.getBoundingClientRect(), l = r.top - o.top - i.height - this.DATEPICKER_GAP;
1494
+ e.style.top = `${l}px`, e.classList.add("position-top");
1426
1495
  }
1427
1496
  }
1428
1497
  _startDatepickerPositioning() {
@@ -1530,13 +1599,13 @@ const f = (C = class extends Ze {
1530
1599
  <nys-errormessage
1531
1600
  id=${this.id + "--error"}
1532
1601
  ?showError=${this.showError}
1533
- errorMessage=${this.internals.validationMessage || this.errorMessage}
1602
+ errorMessage=${this.resolvedErrorMessage()}
1534
1603
  ></nys-errormessage>`;
1535
1604
  }
1536
- }, C.styles = je(et), C.shadowRootOptions = {
1537
- ...me.shadowRootOptions,
1605
+ }, M.styles = Ke(at), M.shadowRootOptions = {
1606
+ ...De.shadowRootOptions,
1538
1607
  delegatesFocus: !0
1539
- }, C);
1608
+ }, M);
1540
1609
  y([
1541
1610
  g({ type: String, reflect: !0 })
1542
1611
  ], f.prototype, "id");
@@ -1604,11 +1673,11 @@ y([
1604
1673
  })
1605
1674
  ], f.prototype, "value");
1606
1675
  y([
1607
- ze()
1676
+ Ve()
1608
1677
  ], f.prototype, "datepickerIsOpen");
1609
- let Vt = f;
1610
- customElements.get("nys-datepicker") || customElements.define("nys-datepicker", Vt);
1678
+ let ea = f;
1679
+ customElements.get("nys-datepicker") || customElements.define("nys-datepicker", ea);
1611
1680
  export {
1612
- Vt as NysDatepicker
1681
+ ea as NysDatepicker
1613
1682
  };
1614
1683
  //# sourceMappingURL=nys-datepicker.js.map