@nysds/nys-radiobutton 1.0.0 → 1.1.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,10 +1,10 @@
1
- import { css as b1, LitElement as t1, html as M } from "lit";
1
+ import { css as a1, LitElement as F, html as w } from "lit";
2
2
  /*!
3
3
  * ▒█▄░▒█ ▒█░░▒█ ▒█▀▀▀█ ▒█▀▀▄ ▒█▀▀▀█
4
4
  * ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
5
5
  * ▒█░░▀█ ░░▒█░░ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄█
6
6
  *
7
- * Radiobutton Component v1.0.0
7
+ * Radiobutton Component v1.1.0
8
8
  * Part of the New York State Design System
9
9
  * Repository: https://github.com/its-hcd/nysds
10
10
  * License: MIT
@@ -14,18 +14,18 @@ import { css as b1, LitElement as t1, html as M } from "lit";
14
14
  * Copyright 2019 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- const D = globalThis, e1 = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, m1 = Symbol(), n1 = /* @__PURE__ */ new WeakMap();
18
- let P1 = class {
19
- constructor(t, e, o) {
20
- if (this._$cssResult$ = !0, o !== m1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
17
+ const Y = globalThis, g1 = Y.ShadowRoot && (Y.ShadyCSS === void 0 || Y.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Q1 = Symbol(), x1 = /* @__PURE__ */ new WeakMap();
18
+ let d5 = class {
19
+ constructor(t, e, s) {
20
+ if (this._$cssResult$ = !0, s !== Q1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
21
21
  this.cssText = t, this.t = e;
22
22
  }
23
23
  get styleSheet() {
24
24
  let t = this.o;
25
25
  const e = this.t;
26
- if (e1 && t === void 0) {
27
- const o = e !== void 0 && e.length === 1;
28
- o && (t = n1.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), o && n1.set(e, t));
26
+ if (g1 && t === void 0) {
27
+ const s = e !== void 0 && e.length === 1;
28
+ s && (t = x1.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && x1.set(e, t));
29
29
  }
30
30
  return t;
31
31
  }
@@ -33,115 +33,115 @@ let P1 = class {
33
33
  return this.cssText;
34
34
  }
35
35
  };
36
- const k1 = (i) => new P1(typeof i == "string" ? i : i + "", void 0, m1), z1 = (i, t) => {
37
- if (e1) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
36
+ const p5 = (o) => new d5(typeof o == "string" ? o : o + "", void 0, Q1), u5 = (o, t) => {
37
+ if (g1) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
38
38
  else for (const e of t) {
39
- const o = document.createElement("style"), s = D.litNonce;
40
- s !== void 0 && o.setAttribute("nonce", s), o.textContent = e.cssText, i.appendChild(o);
39
+ const s = document.createElement("style"), i = Y.litNonce;
40
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
41
41
  }
42
- }, C1 = e1 ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
42
+ }, A1 = g1 ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
43
43
  let e = "";
44
- for (const o of t.cssRules) e += o.cssText;
45
- return k1(e);
46
- })(i) : i;
44
+ for (const s of t.cssRules) e += s.cssText;
45
+ return p5(e);
46
+ })(o) : o;
47
47
  /**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
51
  */
52
- const { is: U1, defineProperty: B1, getOwnPropertyDescriptor: O1, getOwnPropertyNames: R1, getOwnPropertySymbols: T1, getPrototypeOf: N1 } = Object, m = globalThis, l1 = m.trustedTypes, q1 = l1 ? l1.emptyScript : "", J = m.reactiveElementPolyfillSupport, B = (i, t) => i, I = { toAttribute(i, t) {
52
+ const { is: v5, defineProperty: y5, getOwnPropertyDescriptor: g5, getOwnPropertyNames: f5, getOwnPropertySymbols: w5, getPrototypeOf: _5 } = Object, E = globalThis, P1 = E.trustedTypes, m5 = P1 ? P1.emptyScript : "", d1 = E.reactiveElementPolyfillSupport, q = (o, t) => o, e1 = { toAttribute(o, t) {
53
53
  switch (t) {
54
54
  case Boolean:
55
- i = i ? q1 : null;
55
+ o = o ? m5 : null;
56
56
  break;
57
57
  case Object:
58
58
  case Array:
59
- i = i == null ? i : JSON.stringify(i);
59
+ o = o == null ? o : JSON.stringify(o);
60
60
  }
61
- return i;
62
- }, fromAttribute(i, t) {
63
- let e = i;
61
+ return o;
62
+ }, fromAttribute(o, t) {
63
+ let e = o;
64
64
  switch (t) {
65
65
  case Boolean:
66
- e = i !== null;
66
+ e = o !== null;
67
67
  break;
68
68
  case Number:
69
- e = i === null ? null : Number(i);
69
+ e = o === null ? null : Number(o);
70
70
  break;
71
71
  case Object:
72
72
  case Array:
73
73
  try {
74
- e = JSON.parse(i);
74
+ e = JSON.parse(o);
75
75
  } catch {
76
76
  e = null;
77
77
  }
78
78
  }
79
79
  return e;
80
- } }, o1 = (i, t) => !U1(i, t), a1 = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: o1 };
81
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), m.litPropertyMetadata ?? (m.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
82
- class P extends HTMLElement {
80
+ } }, f1 = (o, t) => !v5(o, t), H1 = { attribute: !0, type: String, converter: e1, reflect: !1, hasChanged: f1 };
81
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
82
+ let z = class extends HTMLElement {
83
83
  static addInitializer(t) {
84
84
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
85
85
  }
86
86
  static get observedAttributes() {
87
87
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
88
88
  }
89
- static createProperty(t, e = a1) {
89
+ static createProperty(t, e = H1) {
90
90
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
91
- const o = Symbol(), s = this.getPropertyDescriptor(t, o, e);
92
- s !== void 0 && B1(this.prototype, t, s);
91
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
92
+ i !== void 0 && y5(this.prototype, t, i);
93
93
  }
94
94
  }
95
- static getPropertyDescriptor(t, e, o) {
96
- const { get: s, set: n } = O1(this.prototype, t) ?? { get() {
95
+ static getPropertyDescriptor(t, e, s) {
96
+ const { get: i, set: r } = g5(this.prototype, t) ?? { get() {
97
97
  return this[e];
98
- }, set(r) {
99
- this[e] = r;
98
+ }, set(n) {
99
+ this[e] = n;
100
100
  } };
101
101
  return { get() {
102
- return s == null ? void 0 : s.call(this);
103
- }, set(r) {
104
- const l = s == null ? void 0 : s.call(this);
105
- n.call(this, r), this.requestUpdate(t, l, o);
102
+ return i == null ? void 0 : i.call(this);
103
+ }, set(n) {
104
+ const a = i == null ? void 0 : i.call(this);
105
+ r.call(this, n), this.requestUpdate(t, a, s);
106
106
  }, configurable: !0, enumerable: !0 };
107
107
  }
108
108
  static getPropertyOptions(t) {
109
- return this.elementProperties.get(t) ?? a1;
109
+ return this.elementProperties.get(t) ?? H1;
110
110
  }
111
111
  static _$Ei() {
112
- if (this.hasOwnProperty(B("elementProperties"))) return;
113
- const t = N1(this);
112
+ if (this.hasOwnProperty(q("elementProperties"))) return;
113
+ const t = _5(this);
114
114
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
115
115
  }
116
116
  static finalize() {
117
- if (this.hasOwnProperty(B("finalized"))) return;
118
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(B("properties"))) {
119
- const e = this.properties, o = [...R1(e), ...T1(e)];
120
- for (const s of o) this.createProperty(s, e[s]);
117
+ if (this.hasOwnProperty(q("finalized"))) return;
118
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(q("properties"))) {
119
+ const e = this.properties, s = [...f5(e), ...w5(e)];
120
+ for (const i of s) this.createProperty(i, e[i]);
121
121
  }
122
122
  const t = this[Symbol.metadata];
123
123
  if (t !== null) {
124
124
  const e = litPropertyMetadata.get(t);
125
- if (e !== void 0) for (const [o, s] of e) this.elementProperties.set(o, s);
125
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
126
126
  }
127
127
  this._$Eh = /* @__PURE__ */ new Map();
128
- for (const [e, o] of this.elementProperties) {
129
- const s = this._$Eu(e, o);
130
- s !== void 0 && this._$Eh.set(s, e);
128
+ for (const [e, s] of this.elementProperties) {
129
+ const i = this._$Eu(e, s);
130
+ i !== void 0 && this._$Eh.set(i, e);
131
131
  }
132
132
  this.elementStyles = this.finalizeStyles(this.styles);
133
133
  }
134
134
  static finalizeStyles(t) {
135
135
  const e = [];
136
136
  if (Array.isArray(t)) {
137
- const o = new Set(t.flat(1 / 0).reverse());
138
- for (const s of o) e.unshift(C1(s));
139
- } else t !== void 0 && e.push(C1(t));
137
+ const s = new Set(t.flat(1 / 0).reverse());
138
+ for (const i of s) e.unshift(A1(i));
139
+ } else t !== void 0 && e.push(A1(t));
140
140
  return e;
141
141
  }
142
142
  static _$Eu(t, e) {
143
- const o = e.attribute;
144
- return o === !1 ? void 0 : typeof o == "string" ? o : typeof t == "string" ? t.toLowerCase() : void 0;
143
+ const s = e.attribute;
144
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
145
145
  }
146
146
  constructor() {
147
147
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -160,18 +160,18 @@ class P extends HTMLElement {
160
160
  }
161
161
  _$E_() {
162
162
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
163
- for (const o of e.keys()) this.hasOwnProperty(o) && (t.set(o, this[o]), delete this[o]);
163
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
164
164
  t.size > 0 && (this._$Ep = t);
165
165
  }
166
166
  createRenderRoot() {
167
167
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
168
- return z1(t, this.constructor.elementStyles), t;
168
+ return u5(t, this.constructor.elementStyles), t;
169
169
  }
170
170
  connectedCallback() {
171
171
  var t;
172
172
  this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
173
- var o;
174
- return (o = e.hostConnected) == null ? void 0 : o.call(e);
173
+ var s;
174
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
175
175
  });
176
176
  }
177
177
  enableUpdating(t) {
@@ -179,38 +179,38 @@ class P extends HTMLElement {
179
179
  disconnectedCallback() {
180
180
  var t;
181
181
  (t = this._$EO) == null || t.forEach((e) => {
182
- var o;
183
- return (o = e.hostDisconnected) == null ? void 0 : o.call(e);
182
+ var s;
183
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
184
184
  });
185
185
  }
186
- attributeChangedCallback(t, e, o) {
187
- this._$AK(t, o);
186
+ attributeChangedCallback(t, e, s) {
187
+ this._$AK(t, s);
188
188
  }
189
189
  _$EC(t, e) {
190
- var n;
191
- const o = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, o);
192
- if (s !== void 0 && o.reflect === !0) {
193
- const r = (((n = o.converter) == null ? void 0 : n.toAttribute) !== void 0 ? o.converter : I).toAttribute(e, o.type);
194
- this._$Em = t, r == null ? this.removeAttribute(s) : this.setAttribute(s, r), this._$Em = null;
190
+ var r;
191
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
192
+ if (i !== void 0 && s.reflect === !0) {
193
+ const n = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : e1).toAttribute(e, s.type);
194
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
195
195
  }
196
196
  }
197
197
  _$AK(t, e) {
198
- var n;
199
- const o = this.constructor, s = o._$Eh.get(t);
200
- if (s !== void 0 && this._$Em !== s) {
201
- const r = o.getPropertyOptions(s), l = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((n = r.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? r.converter : I;
202
- this._$Em = s, this[s] = l.fromAttribute(e, r.type), this._$Em = null;
198
+ var r;
199
+ const s = this.constructor, i = s._$Eh.get(t);
200
+ if (i !== void 0 && this._$Em !== i) {
201
+ const n = s.getPropertyOptions(i), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((r = n.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? n.converter : e1;
202
+ this._$Em = i, this[i] = a.fromAttribute(e, n.type), this._$Em = null;
203
203
  }
204
204
  }
205
- requestUpdate(t, e, o) {
205
+ requestUpdate(t, e, s) {
206
206
  if (t !== void 0) {
207
- if (o ?? (o = this.constructor.getPropertyOptions(t)), !(o.hasChanged ?? o1)(this[t], e)) return;
208
- this.P(t, e, o);
207
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? f1)(this[t], e)) return;
208
+ this.P(t, e, s);
209
209
  }
210
210
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
211
211
  }
212
- P(t, e, o) {
213
- this._$AL.has(t) || this._$AL.set(t, e), o.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
212
+ P(t, e, s) {
213
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
214
214
  }
215
215
  async _$ET() {
216
216
  this.isUpdatePending = !0;
@@ -226,25 +226,25 @@ class P extends HTMLElement {
226
226
  return this.performUpdate();
227
227
  }
228
228
  performUpdate() {
229
- var o;
229
+ var s;
230
230
  if (!this.isUpdatePending) return;
231
231
  if (!this.hasUpdated) {
232
232
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
233
- for (const [n, r] of this._$Ep) this[n] = r;
233
+ for (const [r, n] of this._$Ep) this[r] = n;
234
234
  this._$Ep = void 0;
235
235
  }
236
- const s = this.constructor.elementProperties;
237
- if (s.size > 0) for (const [n, r] of s) r.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], r);
236
+ const i = this.constructor.elementProperties;
237
+ if (i.size > 0) for (const [r, n] of i) n.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], n);
238
238
  }
239
239
  let t = !1;
240
240
  const e = this._$AL;
241
241
  try {
242
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (o = this._$EO) == null || o.forEach((s) => {
243
- var n;
244
- return (n = s.hostUpdate) == null ? void 0 : n.call(s);
242
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
243
+ var r;
244
+ return (r = i.hostUpdate) == null ? void 0 : r.call(i);
245
245
  }), this.update(e)) : this._$EU();
246
- } catch (s) {
247
- throw t = !1, this._$EU(), s;
246
+ } catch (i) {
247
+ throw t = !1, this._$EU(), i;
248
248
  }
249
249
  t && this._$AE(e);
250
250
  }
@@ -252,9 +252,9 @@ class P extends HTMLElement {
252
252
  }
253
253
  _$AE(t) {
254
254
  var e;
255
- (e = this._$EO) == null || e.forEach((o) => {
256
- var s;
257
- return (s = o.hostUpdated) == null ? void 0 : s.call(o);
255
+ (e = this._$EO) == null || e.forEach((s) => {
256
+ var i;
257
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
258
258
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
259
259
  }
260
260
  _$EU() {
@@ -276,117 +276,117 @@ class P extends HTMLElement {
276
276
  }
277
277
  firstUpdated(t) {
278
278
  }
279
- }
280
- P.elementStyles = [], P.shadowRootOptions = { mode: "open" }, P[B("elementProperties")] = /* @__PURE__ */ new Map(), P[B("finalized")] = /* @__PURE__ */ new Map(), J == null || J({ ReactiveElement: P }), (m.reactiveElementVersions ?? (m.reactiveElementVersions = [])).push("2.0.4");
279
+ };
280
+ z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, z[q("elementProperties")] = /* @__PURE__ */ new Map(), z[q("finalized")] = /* @__PURE__ */ new Map(), d1 == null || d1({ ReactiveElement: z }), (E.reactiveElementVersions ?? (E.reactiveElementVersions = [])).push("2.0.4");
281
281
  /**
282
282
  * @license
283
283
  * Copyright 2017 Google LLC
284
284
  * SPDX-License-Identifier: BSD-3-Clause
285
285
  */
286
- const D1 = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: o1 }, j1 = (i = D1, t, e) => {
287
- const { kind: o, metadata: s } = e;
288
- let n = globalThis.litPropertyMetadata.get(s);
289
- if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), n.set(e.name, i), o === "accessor") {
290
- const { name: r } = e;
291
- return { set(l) {
292
- const C = t.get.call(this);
293
- t.set.call(this, l), this.requestUpdate(r, C, i);
294
- }, init(l) {
295
- return l !== void 0 && this.P(r, void 0, i), l;
286
+ const b5 = { attribute: !0, type: String, converter: e1, reflect: !1, hasChanged: f1 }, $5 = (o = b5, t, e) => {
287
+ const { kind: s, metadata: i } = e;
288
+ let r = globalThis.litPropertyMetadata.get(i);
289
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), r.set(e.name, o), s === "accessor") {
290
+ const { name: n } = e;
291
+ return { set(a) {
292
+ const l = t.get.call(this);
293
+ t.set.call(this, a), this.requestUpdate(n, l, o);
294
+ }, init(a) {
295
+ return a !== void 0 && this.P(n, void 0, o), a;
296
296
  } };
297
297
  }
298
- if (o === "setter") {
299
- const { name: r } = e;
300
- return function(l) {
301
- const C = this[r];
302
- t.call(this, l), this.requestUpdate(r, C, i);
298
+ if (s === "setter") {
299
+ const { name: n } = e;
300
+ return function(a) {
301
+ const l = this[n];
302
+ t.call(this, a), this.requestUpdate(n, l, o);
303
303
  };
304
304
  }
305
- throw Error("Unsupported decorator location: " + o);
305
+ throw Error("Unsupported decorator location: " + s);
306
306
  };
307
- function u(i) {
308
- return (t, e) => typeof e == "object" ? j1(i, t, e) : ((o, s, n) => {
309
- const r = s.hasOwnProperty(n);
310
- return s.constructor.createProperty(n, r ? { ...o, wrapped: !0 } : o), r ? Object.getOwnPropertyDescriptor(s, n) : void 0;
311
- })(i, t, e);
307
+ function p(o) {
308
+ return (t, e) => typeof e == "object" ? $5(o, t, e) : ((s, i, r) => {
309
+ const n = i.hasOwnProperty(r);
310
+ return i.constructor.createProperty(r, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
311
+ })(o, t, e);
312
312
  }
313
313
  /**
314
314
  * @license
315
315
  * Copyright 2017 Google LLC
316
316
  * SPDX-License-Identifier: BSD-3-Clause
317
317
  */
318
- function $1(i) {
319
- return u({ ...i, state: !0, attribute: !1 });
318
+ function E5(o) {
319
+ return p({ ...o, state: !0, attribute: !1 });
320
320
  }
321
321
  /**
322
322
  * @license
323
323
  * Copyright 2017 Google LLC
324
324
  * SPDX-License-Identifier: BSD-3-Clause
325
325
  */
326
- const O = globalThis, G = O.trustedTypes, c1 = G ? G.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, L1 = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, M1 = "?" + b, I1 = `<${M1}>`, Z = document, W = () => Z.createComment(""), T = (i) => i === null || typeof i != "object" && typeof i != "function", s1 = Array.isArray, G1 = (i) => s1(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Y = `[
327
- \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, h1 = /-->/g, d1 = />/g, L = RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^
328
- \f\r"'\`<>=]|("|')|))|$)`, "g"), u1 = /'/g, p1 = /"/g, x1 = /^(?:script|style|textarea|title)$/i, N = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), v1 = /* @__PURE__ */ new WeakMap(), x = Z.createTreeWalker(Z, 129);
329
- function Z1(i, t) {
330
- if (!s1(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
331
- return c1 !== void 0 ? c1.createHTML(t) : t;
326
+ const N = globalThis, s1 = N.trustedTypes, Z1 = s1 ? s1.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, t5 = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, e5 = "?" + $, S5 = `<${e5}>`, M = document, i1 = () => M.createComment(""), G = (o) => o === null || typeof o != "object" && typeof o != "function", w1 = Array.isArray, L5 = (o) => w1(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", p1 = `[
327
+ \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, V1 = /-->/g, U1 = />/g, S = RegExp(`>|${p1}(?:([^\\s"'>=/]+)(${p1}*=${p1}*(?:[^
328
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), z1 = /'/g, O1 = /"/g, s5 = /^(?:script|style|textarea|title)$/i, W = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), k1 = /* @__PURE__ */ new WeakMap(), L = M.createTreeWalker(M, 129);
329
+ function i5(o, t) {
330
+ if (!w1(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
331
+ return Z1 !== void 0 ? Z1.createHTML(t) : t;
332
332
  }
333
- const W1 = (i, t) => {
334
- const e = i.length - 1, o = [];
335
- let s, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = k;
336
- for (let l = 0; l < e; l++) {
337
- const C = i[l];
338
- let d, p, c = -1, f = 0;
339
- for (; f < C.length && (r.lastIndex = f, p = r.exec(C), p !== null); ) f = r.lastIndex, r === k ? p[1] === "!--" ? r = h1 : p[1] !== void 0 ? r = d1 : p[2] !== void 0 ? (x1.test(p[2]) && (s = RegExp("</" + p[2], "g")), r = L) : p[3] !== void 0 && (r = L) : r === L ? p[0] === ">" ? (r = s ?? k, c = -1) : p[1] === void 0 ? c = -2 : (c = r.lastIndex - p[2].length, d = p[1], r = p[3] === void 0 ? L : p[3] === '"' ? p1 : u1) : r === p1 || r === u1 ? r = L : r === h1 || r === d1 ? r = k : (r = L, s = void 0);
340
- const _ = r === L && i[l + 1].startsWith("/>") ? " " : "";
341
- n += r === k ? C + I1 : c >= 0 ? (o.push(d), C.slice(0, c) + L1 + C.slice(c) + b + _) : C + b + (c === -2 ? l : _);
342
- }
343
- return [Z1(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), o];
333
+ const M5 = (o, t) => {
334
+ const e = o.length - 1, s = [];
335
+ let i, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = O;
336
+ for (let a = 0; a < e; a++) {
337
+ const l = o[a];
338
+ let d, u, h = -1, g = 0;
339
+ for (; g < l.length && (n.lastIndex = g, u = n.exec(l), u !== null); ) g = n.lastIndex, n === O ? u[1] === "!--" ? n = V1 : u[1] !== void 0 ? n = U1 : u[2] !== void 0 ? (s5.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = S) : u[3] !== void 0 && (n = S) : n === S ? u[0] === ">" ? (n = i ?? O, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? S : u[3] === '"' ? O1 : z1) : n === O1 || n === z1 ? n = S : n === V1 || n === U1 ? n = O : (n = S, i = void 0);
340
+ const b = n === S && o[a + 1].startsWith("/>") ? " " : "";
341
+ r += n === O ? l + S5 : h >= 0 ? (s.push(d), l.slice(0, h) + t5 + l.slice(h) + $ + b) : l + $ + (h === -2 ? a : b);
342
+ }
343
+ return [i5(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
344
344
  };
345
- let Q = class H1 {
346
- constructor({ strings: t, _$litType$: e }, o) {
347
- let s;
345
+ let v1 = class o5 {
346
+ constructor({ strings: t, _$litType$: e }, s) {
347
+ let i;
348
348
  this.parts = [];
349
- let n = 0, r = 0;
350
- const l = t.length - 1, C = this.parts, [d, p] = W1(t, e);
351
- if (this.el = H1.createElement(d, o), x.currentNode = this.el.content, e === 2 || e === 3) {
352
- const c = this.el.content.firstChild;
353
- c.replaceWith(...c.childNodes);
349
+ let r = 0, n = 0;
350
+ const a = t.length - 1, l = this.parts, [d, u] = M5(t, e);
351
+ if (this.el = o5.createElement(d, s), L.currentNode = this.el.content, e === 2 || e === 3) {
352
+ const h = this.el.content.firstChild;
353
+ h.replaceWith(...h.childNodes);
354
354
  }
355
- for (; (s = x.nextNode()) !== null && C.length < l; ) {
356
- if (s.nodeType === 1) {
357
- if (s.hasAttributes()) for (const c of s.getAttributeNames()) if (c.endsWith(L1)) {
358
- const f = p[r++], _ = s.getAttribute(c).split(b), q = /([.?@])?(.*)/.exec(f);
359
- C.push({ type: 1, index: n, name: q[2], strings: _, ctor: q[1] === "." ? K1 : q[1] === "?" ? J1 : q[1] === "@" ? Y1 : K }), s.removeAttribute(c);
360
- } else c.startsWith(b) && (C.push({ type: 6, index: n }), s.removeAttribute(c));
361
- if (x1.test(s.tagName)) {
362
- const c = s.textContent.split(b), f = c.length - 1;
363
- if (f > 0) {
364
- s.textContent = G ? G.emptyScript : "";
365
- for (let _ = 0; _ < f; _++) s.append(c[_], W()), x.nextNode(), C.push({ type: 2, index: ++n });
366
- s.append(c[f], W());
355
+ for (; (i = L.nextNode()) !== null && l.length < a; ) {
356
+ if (i.nodeType === 1) {
357
+ if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(t5)) {
358
+ const g = u[n++], b = i.getAttribute(h).split($), J = /([.?@])?(.*)/.exec(g);
359
+ l.push({ type: 1, index: r, name: J[2], strings: b, ctor: J[1] === "." ? A5 : J[1] === "?" ? P5 : J[1] === "@" ? H5 : l1 }), i.removeAttribute(h);
360
+ } else h.startsWith($) && (l.push({ type: 6, index: r }), i.removeAttribute(h));
361
+ if (s5.test(i.tagName)) {
362
+ const h = i.textContent.split($), g = h.length - 1;
363
+ if (g > 0) {
364
+ i.textContent = s1 ? s1.emptyScript : "";
365
+ for (let b = 0; b < g; b++) i.append(h[b], i1()), L.nextNode(), l.push({ type: 2, index: ++r });
366
+ i.append(h[g], i1());
367
367
  }
368
368
  }
369
- } else if (s.nodeType === 8) if (s.data === M1) C.push({ type: 2, index: n });
369
+ } else if (i.nodeType === 8) if (i.data === e5) l.push({ type: 2, index: r });
370
370
  else {
371
- let c = -1;
372
- for (; (c = s.data.indexOf(b, c + 1)) !== -1; ) C.push({ type: 7, index: n }), c += b.length - 1;
371
+ let h = -1;
372
+ for (; (h = i.data.indexOf($, h + 1)) !== -1; ) l.push({ type: 7, index: r }), h += $.length - 1;
373
373
  }
374
- n++;
374
+ r++;
375
375
  }
376
376
  }
377
377
  static createElement(t, e) {
378
- const o = Z.createElement("template");
379
- return o.innerHTML = t, o;
378
+ const s = M.createElement("template");
379
+ return s.innerHTML = t, s;
380
380
  }
381
381
  };
382
- function E(i, t, e = i, o) {
383
- var r, l;
384
- if (t === N) return t;
385
- let s = o !== void 0 ? (r = e._$Co) == null ? void 0 : r[o] : e._$Cl;
386
- const n = T(t) ? void 0 : t._$litDirective$;
387
- return (s == null ? void 0 : s.constructor) !== n && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), n === void 0 ? s = void 0 : (s = new n(i), s._$AT(i, e, o)), o !== void 0 ? (e._$Co ?? (e._$Co = []))[o] = s : e._$Cl = s), s !== void 0 && (t = E(i, s._$AS(i, t.values), s, o)), t;
382
+ function A(o, t, e = o, s) {
383
+ var n, a;
384
+ if (t === W) return t;
385
+ let i = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
386
+ const r = G(t) ? void 0 : t._$litDirective$;
387
+ return (i == null ? void 0 : i.constructor) !== r && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), r === void 0 ? i = void 0 : (i = new r(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = A(o, i._$AS(o, t.values), i, s)), t;
388
388
  }
389
- let F1 = class {
389
+ let x5 = class {
390
390
  constructor(t, e) {
391
391
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
392
392
  }
@@ -397,29 +397,29 @@ let F1 = class {
397
397
  return this._$AM._$AU;
398
398
  }
399
399
  u(t) {
400
- const { el: { content: e }, parts: o } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? Z).importNode(e, !0);
401
- x.currentNode = s;
402
- let n = x.nextNode(), r = 0, l = 0, C = o[0];
403
- for (; C !== void 0; ) {
404
- if (r === C.index) {
400
+ const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? M).importNode(e, !0);
401
+ L.currentNode = i;
402
+ let r = L.nextNode(), n = 0, a = 0, l = s[0];
403
+ for (; l !== void 0; ) {
404
+ if (n === l.index) {
405
405
  let d;
406
- C.type === 2 ? d = new E1(n, n.nextSibling, this, t) : C.type === 1 ? d = new C.ctor(n, C.name, C.strings, this, t) : C.type === 6 && (d = new X1(n, this, t)), this._$AV.push(d), C = o[++l];
406
+ l.type === 2 ? d = new r5(r, r.nextSibling, this, t) : l.type === 1 ? d = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (d = new Z5(r, this, t)), this._$AV.push(d), l = s[++a];
407
407
  }
408
- r !== (C == null ? void 0 : C.index) && (n = x.nextNode(), r++);
408
+ n !== (l == null ? void 0 : l.index) && (r = L.nextNode(), n++);
409
409
  }
410
- return x.currentNode = Z, s;
410
+ return L.currentNode = M, i;
411
411
  }
412
412
  p(t) {
413
413
  let e = 0;
414
- for (const o of this._$AV) o !== void 0 && (o.strings !== void 0 ? (o._$AI(t, o, e), e += o.strings.length - 2) : o._$AI(t[e])), e++;
414
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
415
415
  }
416
- }, E1 = class S1 {
416
+ }, r5 = class n5 {
417
417
  get _$AU() {
418
418
  var t;
419
419
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
420
420
  }
421
- constructor(t, e, o, s) {
422
- this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = o, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
421
+ constructor(t, e, s, i) {
422
+ this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
423
423
  }
424
424
  get parentNode() {
425
425
  let t = this._$AA.parentNode;
@@ -433,7 +433,7 @@ let F1 = class {
433
433
  return this._$AB;
434
434
  }
435
435
  _$AI(t, e = this) {
436
- t = E(this, t, e), T(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== N && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : G1(t) ? this.k(t) : this._(t);
436
+ t = A(this, t, e), G(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : L5(t) ? this.k(t) : this._(t);
437
437
  }
438
438
  O(t) {
439
439
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -442,109 +442,109 @@ let F1 = class {
442
442
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
443
443
  }
444
444
  _(t) {
445
- this._$AH !== h && T(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Z.createTextNode(t)), this._$AH = t;
445
+ this._$AH !== c && G(this._$AH) ? this._$AA.nextSibling.data = t : this.T(M.createTextNode(t)), this._$AH = t;
446
446
  }
447
447
  $(t) {
448
- var n;
449
- const { values: e, _$litType$: o } = t, s = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = Q.createElement(Z1(o.h, o.h[0]), this.options)), o);
450
- if (((n = this._$AH) == null ? void 0 : n._$AD) === s) this._$AH.p(e);
448
+ var r;
449
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = v1.createElement(i5(s.h, s.h[0]), this.options)), s);
450
+ if (((r = this._$AH) == null ? void 0 : r._$AD) === i) this._$AH.p(e);
451
451
  else {
452
- const r = new F1(s, this), l = r.u(this.options);
453
- r.p(e), this.T(l), this._$AH = r;
452
+ const n = new x5(i, this), a = n.u(this.options);
453
+ n.p(e), this.T(a), this._$AH = n;
454
454
  }
455
455
  }
456
456
  _$AC(t) {
457
- let e = v1.get(t.strings);
458
- return e === void 0 && v1.set(t.strings, e = new Q(t)), e;
457
+ let e = k1.get(t.strings);
458
+ return e === void 0 && k1.set(t.strings, e = new v1(t)), e;
459
459
  }
460
460
  k(t) {
461
- s1(this._$AH) || (this._$AH = [], this._$AR());
461
+ w1(this._$AH) || (this._$AH = [], this._$AR());
462
462
  const e = this._$AH;
463
- let o, s = 0;
464
- for (const n of t) s === e.length ? e.push(o = new S1(this.O(W()), this.O(W()), this, this.options)) : o = e[s], o._$AI(n), s++;
465
- s < e.length && (this._$AR(o && o._$AB.nextSibling, s), e.length = s);
463
+ let s, i = 0;
464
+ for (const r of t) i === e.length ? e.push(s = new n5(this.O(i1()), this.O(i1()), this, this.options)) : s = e[i], s._$AI(r), i++;
465
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
466
466
  }
467
467
  _$AR(t = this._$AA.nextSibling, e) {
468
- var o;
469
- for ((o = this._$AP) == null ? void 0 : o.call(this, !1, !0, e); t && t !== this._$AB; ) {
470
- const s = t.nextSibling;
471
- t.remove(), t = s;
468
+ var s;
469
+ for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
470
+ const i = t.nextSibling;
471
+ t.remove(), t = i;
472
472
  }
473
473
  }
474
474
  setConnected(t) {
475
475
  var e;
476
476
  this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
477
477
  }
478
- }, K = class {
478
+ }, l1 = class {
479
479
  get tagName() {
480
480
  return this.element.tagName;
481
481
  }
482
482
  get _$AU() {
483
483
  return this._$AM._$AU;
484
484
  }
485
- constructor(t, e, o, s, n) {
486
- this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = h;
485
+ constructor(t, e, s, i, r) {
486
+ this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
487
487
  }
488
- _$AI(t, e = this, o, s) {
489
- const n = this.strings;
490
- let r = !1;
491
- if (n === void 0) t = E(this, t, e, 0), r = !T(t) || t !== this._$AH && t !== N, r && (this._$AH = t);
488
+ _$AI(t, e = this, s, i) {
489
+ const r = this.strings;
490
+ let n = !1;
491
+ if (r === void 0) t = A(this, t, e, 0), n = !G(t) || t !== this._$AH && t !== W, n && (this._$AH = t);
492
492
  else {
493
- const l = t;
494
- let C, d;
495
- for (t = n[0], C = 0; C < n.length - 1; C++) d = E(this, l[o + C], e, C), d === N && (d = this._$AH[C]), r || (r = !T(d) || d !== this._$AH[C]), d === h ? t = h : t !== h && (t += (d ?? "") + n[C + 1]), this._$AH[C] = d;
493
+ const a = t;
494
+ let l, d;
495
+ for (t = r[0], l = 0; l < r.length - 1; l++) d = A(this, a[s + l], e, l), d === W && (d = this._$AH[l]), n || (n = !G(d) || d !== this._$AH[l]), d === c ? t = c : t !== c && (t += (d ?? "") + r[l + 1]), this._$AH[l] = d;
496
496
  }
497
- r && !s && this.j(t);
497
+ n && !i && this.j(t);
498
498
  }
499
499
  j(t) {
500
- t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
500
+ t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
501
501
  }
502
- }, K1 = class extends K {
502
+ }, A5 = class extends l1 {
503
503
  constructor() {
504
504
  super(...arguments), this.type = 3;
505
505
  }
506
506
  j(t) {
507
- this.element[this.name] = t === h ? void 0 : t;
507
+ this.element[this.name] = t === c ? void 0 : t;
508
508
  }
509
- }, J1 = class extends K {
509
+ }, P5 = class extends l1 {
510
510
  constructor() {
511
511
  super(...arguments), this.type = 4;
512
512
  }
513
513
  j(t) {
514
- this.element.toggleAttribute(this.name, !!t && t !== h);
514
+ this.element.toggleAttribute(this.name, !!t && t !== c);
515
515
  }
516
- }, Y1 = class extends K {
517
- constructor(t, e, o, s, n) {
518
- super(t, e, o, s, n), this.type = 5;
516
+ }, H5 = class extends l1 {
517
+ constructor(t, e, s, i, r) {
518
+ super(t, e, s, i, r), this.type = 5;
519
519
  }
520
520
  _$AI(t, e = this) {
521
- if ((t = E(this, t, e, 0) ?? h) === N) return;
522
- const o = this._$AH, s = t === h && o !== h || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, n = t !== h && (o === h || s);
523
- s && this.element.removeEventListener(this.name, this, o), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
521
+ if ((t = A(this, t, e, 0) ?? c) === W) return;
522
+ const s = this._$AH, i = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== c && (s === c || i);
523
+ i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
524
524
  }
525
525
  handleEvent(t) {
526
526
  var e;
527
527
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
528
528
  }
529
- }, X1 = class {
530
- constructor(t, e, o) {
531
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = o;
529
+ }, Z5 = class {
530
+ constructor(t, e, s) {
531
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
532
532
  }
533
533
  get _$AU() {
534
534
  return this._$AM._$AU;
535
535
  }
536
536
  _$AI(t) {
537
- E(this, t);
537
+ A(this, t);
538
538
  }
539
539
  };
540
- const X = O.litHtmlPolyfillSupport;
541
- X == null || X(Q, E1), (O.litHtmlVersions ?? (O.litHtmlVersions = [])).push("3.2.1");
540
+ const u1 = N.litHtmlPolyfillSupport;
541
+ u1 == null || u1(v1, r5), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.2.1");
542
542
  /**
543
543
  * @license
544
544
  * Copyright 2018 Google LLC
545
545
  * SPDX-License-Identifier: BSD-3-Clause
546
546
  */
547
- const Q1 = (i) => i ?? h, A1 = b1`
547
+ const V5 = (o) => o ?? c, a5 = a1`
548
548
  :host {
549
549
  /* Global Radiobutton Styles */
550
550
  --_nys-radiobutton-size: var(--nys-size-400, 32px);
@@ -553,10 +553,6 @@ const Q1 = (i) => i ?? h, A1 = b1`
553
553
  --_nys-radiobutton-color-focus: var(--nys-color-focus, #004dd1);
554
554
  --_nys-radiobutton-width-focus: var(--nys-border-width-md, 2px);
555
555
  --_nys-radiobutton-offset-focus: var(--nys-space-2px, 2px);
556
- --_nys-radiobutton-transition-duration: var(
557
- --nys-transition-duration-sm,
558
- 0.1s
559
- );
560
556
  --_nys-radiobutton-gap: var(
561
557
  --nys-space-150,
562
558
  12px
@@ -588,10 +584,6 @@ const Q1 = (i) => i ?? h, A1 = b1`
588
584
  --nys-color-ink,
589
585
  var(--nys-color-neutral-900, #1b1b1b)
590
586
  );
591
- --_nys-radiobutton-error-color: var(
592
- --nys-color-danger,
593
- var(--nys-color-red-600, #b52c2c)
594
- );
595
587
 
596
588
  /* Default (Empty) */
597
589
  --_nys-radiobutton-color-bg: var(--nys-color-ink-reverse, #ffffff);
@@ -751,18 +743,13 @@ const Q1 = (i) => i ?? h, A1 = b1`
751
743
  }
752
744
 
753
745
  /* Label styling */
754
- .nys-radiogroup__label {
755
- font-weight: var(--_nys-radiobutton-font-weight-600);
756
- color: var(--_nys-radiobutton-color);
757
- }
758
746
  .nys-radiobutton__label {
759
747
  font-weight: var(--_nys-radiobutton-font-weight-400);
760
748
  color: var(--_nys-radiobutton-color);
761
749
  }
762
750
 
763
751
  /* Description styling */
764
- .nys-radiobutton__description,
765
- .nys-radiogroup__description {
752
+ .nys-radiobutton__description {
766
753
  font-weight: var(--_nys-radiobutton-font-weight-400);
767
754
  font-style: italic;
768
755
  }
@@ -783,39 +770,782 @@ const Q1 = (i) => i ?? h, A1 = b1`
783
770
  color: var(--_nys-radiobutton-disabled-color-text);
784
771
  cursor: not-allowed;
785
772
  }
773
+ `;
774
+ /*!
775
+ * Label v1.1.0
776
+ * Part of the New York State Design System
777
+ * A design system for New York State's digital products.
778
+ * Repository: https://github.com/its-hcd/nysds
779
+ * License: MIT
780
+ */
781
+ /**
782
+ * @license
783
+ * Copyright 2019 Google LLC
784
+ * SPDX-License-Identifier: BSD-3-Clause
785
+ */
786
+ const X = globalThis, _1 = X.ShadowRoot && (X.ShadyCSS === void 0 || X.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, l5 = Symbol(), R1 = /* @__PURE__ */ new WeakMap();
787
+ let U5 = class {
788
+ constructor(t, e, s) {
789
+ if (this._$cssResult$ = !0, s !== l5) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
790
+ this.cssText = t, this.t = e;
791
+ }
792
+ get styleSheet() {
793
+ let t = this.o;
794
+ const e = this.t;
795
+ if (_1 && t === void 0) {
796
+ const s = e !== void 0 && e.length === 1;
797
+ s && (t = R1.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && R1.set(e, t));
798
+ }
799
+ return t;
800
+ }
801
+ toString() {
802
+ return this.cssText;
803
+ }
804
+ };
805
+ const z5 = (o) => new U5(typeof o == "string" ? o : o + "", void 0, l5), O5 = (o, t) => {
806
+ if (_1) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
807
+ else for (const e of t) {
808
+ const s = document.createElement("style"), i = X.litNonce;
809
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
810
+ }
811
+ }, B1 = _1 ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
812
+ let e = "";
813
+ for (const s of t.cssRules) e += s.cssText;
814
+ return z5(e);
815
+ })(o) : o;
816
+ /**
817
+ * @license
818
+ * Copyright 2017 Google LLC
819
+ * SPDX-License-Identifier: BSD-3-Clause
820
+ */
821
+ const { is: k5, defineProperty: R5, getOwnPropertyDescriptor: B5, getOwnPropertyNames: T5, getOwnPropertySymbols: q5, getPrototypeOf: N5 } = Object, P = globalThis, T1 = P.trustedTypes, D5 = T1 ? T1.emptyScript : "", q1 = P.reactiveElementPolyfillSupport, D = (o, t) => o, o1 = { toAttribute(o, t) {
822
+ switch (t) {
823
+ case Boolean:
824
+ o = o ? D5 : null;
825
+ break;
826
+ case Object:
827
+ case Array:
828
+ o = o == null ? o : JSON.stringify(o);
829
+ }
830
+ return o;
831
+ }, fromAttribute(o, t) {
832
+ let e = o;
833
+ switch (t) {
834
+ case Boolean:
835
+ e = o !== null;
836
+ break;
837
+ case Number:
838
+ e = o === null ? null : Number(o);
839
+ break;
840
+ case Object:
841
+ case Array:
842
+ try {
843
+ e = JSON.parse(o);
844
+ } catch {
845
+ e = null;
846
+ }
847
+ }
848
+ return e;
849
+ } }, m1 = (o, t) => !k5(o, t), N1 = { attribute: !0, type: String, converter: o1, reflect: !1, hasChanged: m1 };
850
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), P.litPropertyMetadata ?? (P.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
851
+ let k = class extends HTMLElement {
852
+ static addInitializer(t) {
853
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
854
+ }
855
+ static get observedAttributes() {
856
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
857
+ }
858
+ static createProperty(t, e = N1) {
859
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
860
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
861
+ i !== void 0 && R5(this.prototype, t, i);
862
+ }
863
+ }
864
+ static getPropertyDescriptor(t, e, s) {
865
+ const { get: i, set: r } = B5(this.prototype, t) ?? { get() {
866
+ return this[e];
867
+ }, set(n) {
868
+ this[e] = n;
869
+ } };
870
+ return { get() {
871
+ return i == null ? void 0 : i.call(this);
872
+ }, set(n) {
873
+ const a = i == null ? void 0 : i.call(this);
874
+ r.call(this, n), this.requestUpdate(t, a, s);
875
+ }, configurable: !0, enumerable: !0 };
876
+ }
877
+ static getPropertyOptions(t) {
878
+ return this.elementProperties.get(t) ?? N1;
879
+ }
880
+ static _$Ei() {
881
+ if (this.hasOwnProperty(D("elementProperties"))) return;
882
+ const t = N5(this);
883
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
884
+ }
885
+ static finalize() {
886
+ if (this.hasOwnProperty(D("finalized"))) return;
887
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(D("properties"))) {
888
+ const e = this.properties, s = [...T5(e), ...q5(e)];
889
+ for (const i of s) this.createProperty(i, e[i]);
890
+ }
891
+ const t = this[Symbol.metadata];
892
+ if (t !== null) {
893
+ const e = litPropertyMetadata.get(t);
894
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
895
+ }
896
+ this._$Eh = /* @__PURE__ */ new Map();
897
+ for (const [e, s] of this.elementProperties) {
898
+ const i = this._$Eu(e, s);
899
+ i !== void 0 && this._$Eh.set(i, e);
900
+ }
901
+ this.elementStyles = this.finalizeStyles(this.styles);
902
+ }
903
+ static finalizeStyles(t) {
904
+ const e = [];
905
+ if (Array.isArray(t)) {
906
+ const s = new Set(t.flat(1 / 0).reverse());
907
+ for (const i of s) e.unshift(B1(i));
908
+ } else t !== void 0 && e.push(B1(t));
909
+ return e;
910
+ }
911
+ static _$Eu(t, e) {
912
+ const s = e.attribute;
913
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
914
+ }
915
+ constructor() {
916
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
917
+ }
918
+ _$Ev() {
919
+ var t;
920
+ this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
921
+ }
922
+ addController(t) {
923
+ var e;
924
+ (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
925
+ }
926
+ removeController(t) {
927
+ var e;
928
+ (e = this._$EO) == null || e.delete(t);
929
+ }
930
+ _$E_() {
931
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
932
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
933
+ t.size > 0 && (this._$Ep = t);
934
+ }
935
+ createRenderRoot() {
936
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
937
+ return O5(t, this.constructor.elementStyles), t;
938
+ }
939
+ connectedCallback() {
940
+ var t;
941
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
942
+ var s;
943
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
944
+ });
945
+ }
946
+ enableUpdating(t) {
947
+ }
948
+ disconnectedCallback() {
949
+ var t;
950
+ (t = this._$EO) == null || t.forEach((e) => {
951
+ var s;
952
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
953
+ });
954
+ }
955
+ attributeChangedCallback(t, e, s) {
956
+ this._$AK(t, s);
957
+ }
958
+ _$EC(t, e) {
959
+ var s;
960
+ const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
961
+ if (r !== void 0 && i.reflect === !0) {
962
+ const n = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : o1).toAttribute(e, i.type);
963
+ this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
964
+ }
965
+ }
966
+ _$AK(t, e) {
967
+ var s;
968
+ const i = this.constructor, r = i._$Eh.get(t);
969
+ if (r !== void 0 && this._$Em !== r) {
970
+ const n = i.getPropertyOptions(r), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((s = n.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? n.converter : o1;
971
+ this._$Em = r, this[r] = a.fromAttribute(e, n.type), this._$Em = null;
972
+ }
973
+ }
974
+ requestUpdate(t, e, s) {
975
+ if (t !== void 0) {
976
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? m1)(this[t], e)) return;
977
+ this.P(t, e, s);
978
+ }
979
+ this.isUpdatePending === !1 && (this._$ES = this._$ET());
980
+ }
981
+ P(t, e, s) {
982
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
983
+ }
984
+ async _$ET() {
985
+ this.isUpdatePending = !0;
986
+ try {
987
+ await this._$ES;
988
+ } catch (e) {
989
+ Promise.reject(e);
990
+ }
991
+ const t = this.scheduleUpdate();
992
+ return t != null && await t, !this.isUpdatePending;
993
+ }
994
+ scheduleUpdate() {
995
+ return this.performUpdate();
996
+ }
997
+ performUpdate() {
998
+ var t;
999
+ if (!this.isUpdatePending) return;
1000
+ if (!this.hasUpdated) {
1001
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
1002
+ for (const [r, n] of this._$Ep) this[r] = n;
1003
+ this._$Ep = void 0;
1004
+ }
1005
+ const i = this.constructor.elementProperties;
1006
+ if (i.size > 0) for (const [r, n] of i) n.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], n);
1007
+ }
1008
+ let e = !1;
1009
+ const s = this._$AL;
1010
+ try {
1011
+ e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$EO) == null || t.forEach((i) => {
1012
+ var r;
1013
+ return (r = i.hostUpdate) == null ? void 0 : r.call(i);
1014
+ }), this.update(s)) : this._$EU();
1015
+ } catch (i) {
1016
+ throw e = !1, this._$EU(), i;
1017
+ }
1018
+ e && this._$AE(s);
1019
+ }
1020
+ willUpdate(t) {
1021
+ }
1022
+ _$AE(t) {
1023
+ var e;
1024
+ (e = this._$EO) == null || e.forEach((s) => {
1025
+ var i;
1026
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
1027
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
1028
+ }
1029
+ _$EU() {
1030
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
1031
+ }
1032
+ get updateComplete() {
1033
+ return this.getUpdateComplete();
1034
+ }
1035
+ getUpdateComplete() {
1036
+ return this._$ES;
1037
+ }
1038
+ shouldUpdate(t) {
1039
+ return !0;
1040
+ }
1041
+ update(t) {
1042
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
1043
+ }
1044
+ updated(t) {
1045
+ }
1046
+ firstUpdated(t) {
1047
+ }
1048
+ };
1049
+ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[D("elementProperties")] = /* @__PURE__ */ new Map(), k[D("finalized")] = /* @__PURE__ */ new Map(), q1 == null || q1({ ReactiveElement: k }), (P.reactiveElementVersions ?? (P.reactiveElementVersions = [])).push("2.0.4");
1050
+ /**
1051
+ * @license
1052
+ * Copyright 2017 Google LLC
1053
+ * SPDX-License-Identifier: BSD-3-Clause
1054
+ */
1055
+ const j5 = { attribute: !0, type: String, converter: o1, reflect: !1, hasChanged: m1 }, I5 = (o = j5, t, e) => {
1056
+ const { kind: s, metadata: i } = e;
1057
+ let r = globalThis.litPropertyMetadata.get(i);
1058
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), r.set(e.name, o), s === "accessor") {
1059
+ const { name: n } = e;
1060
+ return { set(a) {
1061
+ const l = t.get.call(this);
1062
+ t.set.call(this, a), this.requestUpdate(n, l, o);
1063
+ }, init(a) {
1064
+ return a !== void 0 && this.P(n, void 0, o), a;
1065
+ } };
1066
+ }
1067
+ if (s === "setter") {
1068
+ const { name: n } = e;
1069
+ return function(a) {
1070
+ const l = this[n];
1071
+ t.call(this, a), this.requestUpdate(n, l, o);
1072
+ };
1073
+ }
1074
+ throw Error("Unsupported decorator location: " + s);
1075
+ };
1076
+ function C1(o) {
1077
+ return (t, e) => typeof e == "object" ? I5(o, t, e) : ((s, i, r) => {
1078
+ const n = i.hasOwnProperty(r);
1079
+ return i.constructor.createProperty(r, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
1080
+ })(o, t, e);
1081
+ }
1082
+ const G5 = a1`
1083
+ :host {
1084
+ /* Label Typography */
1085
+ --_nys-label-font-family: var(
1086
+ --nys-font-family-ui,
1087
+ var(
1088
+ --nys-font-family-sans,
1089
+ "Proxima Nova",
1090
+ "Helvetica Neue",
1091
+ "Helvetica",
1092
+ "Arial",
1093
+ sans-serif
1094
+ )
1095
+ );
1096
+ --_nys-label-font-weight: var(--nys-font-weight-semibold, 600);
1097
+ --_nys-label-font-size: var(--nys-font-size-ui-md, 16px);
1098
+ --_nys-label-line-height: var(--nys-font-lineheight-ui-md, 24px);
1099
+ --_nys-label-letter-spacing: var(--nys-font-letterspacing-ui-md, 0.044px);
1100
+ --_nys-label-font-color: var(--nys-color-ink, #1b1b1b);
1101
+
1102
+ /* Description */
1103
+ --nys-description-font-weight: var(--nys-font-weight-regular, 400);
1104
+ --nys-description-font-style: italic;
1105
+ --nys-description-font-color: var(--nys-neutral-900, #1b1b1b);
1106
+
1107
+ /* Required Flag */
1108
+ --nys-required-font-color: var(--nys-color-danger, #b52c2c);
1109
+
1110
+ /* Optional Flag */
1111
+ --nys-optional-font-weight: var(--nys-font-weight-regular, 400);
1112
+ --nys-optional-font-color: var(--nys-color-neutral-700, #4a4d4f);
786
1113
 
787
- /* Required */
788
- .nys-radiobutton__required {
789
- color: var(--_nys-radiobutton-error-color);
790
- margin-left: var(--_nys-select-margin);
1114
+ /* Spacing */
1115
+ --_nys-label-flag-gap: var(--nys-space-2px, 2px);
791
1116
  }
792
1117
 
793
- .nys-radiobutton__requiredwrapper {
794
- display: inline;
1118
+ .nys-label {
1119
+ display: flex;
1120
+ flex-direction: column;
1121
+ align-items: flex-start;
1122
+ font-family: var(--_nys-label-font-family);
1123
+ font-size: var(--_nys-label-font-size);
1124
+ line-height: var(--_nys-label-line-height);
1125
+ letter-spacing: var(--_nys-label-letter-spacing);
795
1126
  }
796
1127
 
797
- /* Error Message Styling */
798
- .nys-radiobutton__error {
1128
+ .nys-label__labelwrapper {
799
1129
  display: flex;
800
- align-items: center;
801
- gap: var(--nys-space-100, 8px);
802
- color: var(--_nys-radiobutton-error-color);
1130
+ gap: var(--_nys-label-flag-gap);
1131
+ }
1132
+
1133
+ .nys-label__label {
1134
+ font-weight: var(--_nys-label-font-weight);
1135
+ color: var(--_nys-label-font-color);
1136
+ }
803
1137
 
804
- /* add divider line */
805
- border-top: 1px solid var(--_nys-radiobutton-error-color);
806
- padding-top: var(--nys-space-50, 4px);
807
- margin-top: var(--nys-space-100, 8px);
1138
+ .nys-label__description {
1139
+ font-weight: var(--nys-description-font-weight);
1140
+ font-style: var(--nys-description-font-style);
1141
+ color: var(--nys-description-font-color);
808
1142
  }
809
1143
 
810
- /* Error Icon Styling */
811
- nys-icon[name="error"] {
1144
+ .nys-label__required {
1145
+ font-weight: var(--_nys-label-font-weight);
1146
+ color: var(--nys-required-font-color);
1147
+ }
1148
+
1149
+ .nys-label__optional {
1150
+ font-weight: var(--nys-optional-font-weight);
1151
+ color: var(--nys-optional-font-color);
1152
+ }
1153
+ `;
1154
+ var W5 = Object.defineProperty, h1 = (o, t, e, s) => {
1155
+ for (var i = void 0, r = o.length - 1, n; r >= 0; r--)
1156
+ (n = o[r]) && (i = n(t, e, i) || i);
1157
+ return i && W5(t, e, i), i;
1158
+ };
1159
+ const C5 = class extends F {
1160
+ constructor() {
1161
+ super(...arguments), this.id = "", this.label = "", this.description = "", this.flag = "";
1162
+ }
1163
+ render() {
1164
+ return w`
1165
+ <div class="nys-label">
1166
+ <label for=${this.id} class="nys-label__label"
1167
+ >${this.label}
1168
+ ${this.flag === "required" ? w`<label class="nys-label__required">*</label>` : ""}
1169
+ ${this.flag === "optional" ? w`<label class="nys-label__optional">(Optional)</label>` : ""}</label
1170
+ >
1171
+ <label for=${this.id} class="nys-label__description">
1172
+ <slot name="description">${this.description}</slot>
1173
+ </label>
1174
+ </div>
1175
+ `;
1176
+ }
1177
+ };
1178
+ C5.styles = G5;
1179
+ let K = C5;
1180
+ h1([
1181
+ C1({ type: String })
1182
+ ], K.prototype, "id");
1183
+ h1([
1184
+ C1({ type: String })
1185
+ ], K.prototype, "label");
1186
+ h1([
1187
+ C1({ type: String })
1188
+ ], K.prototype, "description");
1189
+ h1([
1190
+ C1({ type: String })
1191
+ ], K.prototype, "flag");
1192
+ customElements.get("nys-label") || customElements.define("nys-label", K);
1193
+ /*!
1194
+ * Error Message v1.1.0
1195
+ * Part of the New York State Design System
1196
+ * A design system for New York State's digital products.
1197
+ * Repository: https://github.com/its-hcd/nysds
1198
+ * License: MIT
1199
+ */
1200
+ /**
1201
+ * @license
1202
+ * Copyright 2019 Google LLC
1203
+ * SPDX-License-Identifier: BSD-3-Clause
1204
+ */
1205
+ const Q = globalThis, b1 = Q.ShadowRoot && (Q.ShadyCSS === void 0 || Q.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, h5 = Symbol(), D1 = /* @__PURE__ */ new WeakMap();
1206
+ let F5 = class {
1207
+ constructor(o, t, e) {
1208
+ if (this._$cssResult$ = !0, e !== h5) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1209
+ this.cssText = o, this.t = t;
1210
+ }
1211
+ get styleSheet() {
1212
+ let o = this.o;
1213
+ const t = this.t;
1214
+ if (b1 && o === void 0) {
1215
+ const e = t !== void 0 && t.length === 1;
1216
+ e && (o = D1.get(t)), o === void 0 && ((this.o = o = new CSSStyleSheet()).replaceSync(this.cssText), e && D1.set(t, o));
1217
+ }
1218
+ return o;
1219
+ }
1220
+ toString() {
1221
+ return this.cssText;
1222
+ }
1223
+ };
1224
+ const K5 = (o) => new F5(typeof o == "string" ? o : o + "", void 0, h5), J5 = (o, t) => {
1225
+ if (b1) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
1226
+ else for (const e of t) {
1227
+ const s = document.createElement("style"), i = Q.litNonce;
1228
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
1229
+ }
1230
+ }, j1 = b1 ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
1231
+ let e = "";
1232
+ for (const s of t.cssRules) e += s.cssText;
1233
+ return K5(e);
1234
+ })(o) : o;
1235
+ /**
1236
+ * @license
1237
+ * Copyright 2017 Google LLC
1238
+ * SPDX-License-Identifier: BSD-3-Clause
1239
+ */
1240
+ const { is: Y5, defineProperty: X5, getOwnPropertyDescriptor: Q5, getOwnPropertyNames: t2, getOwnPropertySymbols: e2, getPrototypeOf: s2 } = Object, H = globalThis, I1 = H.trustedTypes, i2 = I1 ? I1.emptyScript : "", G1 = H.reactiveElementPolyfillSupport, j = (o, t) => o, r1 = { toAttribute(o, t) {
1241
+ switch (t) {
1242
+ case Boolean:
1243
+ o = o ? i2 : null;
1244
+ break;
1245
+ case Object:
1246
+ case Array:
1247
+ o = o == null ? o : JSON.stringify(o);
1248
+ }
1249
+ return o;
1250
+ }, fromAttribute(o, t) {
1251
+ let e = o;
1252
+ switch (t) {
1253
+ case Boolean:
1254
+ e = o !== null;
1255
+ break;
1256
+ case Number:
1257
+ e = o === null ? null : Number(o);
1258
+ break;
1259
+ case Object:
1260
+ case Array:
1261
+ try {
1262
+ e = JSON.parse(o);
1263
+ } catch {
1264
+ e = null;
1265
+ }
1266
+ }
1267
+ return e;
1268
+ } }, $1 = (o, t) => !Y5(o, t), W1 = { attribute: !0, type: String, converter: r1, reflect: !1, hasChanged: $1 };
1269
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), H.litPropertyMetadata ?? (H.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
1270
+ class R extends HTMLElement {
1271
+ static addInitializer(t) {
1272
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
1273
+ }
1274
+ static get observedAttributes() {
1275
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
1276
+ }
1277
+ static createProperty(t, e = W1) {
1278
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
1279
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
1280
+ i !== void 0 && X5(this.prototype, t, i);
1281
+ }
1282
+ }
1283
+ static getPropertyDescriptor(t, e, s) {
1284
+ const { get: i, set: r } = Q5(this.prototype, t) ?? { get() {
1285
+ return this[e];
1286
+ }, set(n) {
1287
+ this[e] = n;
1288
+ } };
1289
+ return { get() {
1290
+ return i == null ? void 0 : i.call(this);
1291
+ }, set(n) {
1292
+ const a = i == null ? void 0 : i.call(this);
1293
+ r.call(this, n), this.requestUpdate(t, a, s);
1294
+ }, configurable: !0, enumerable: !0 };
1295
+ }
1296
+ static getPropertyOptions(t) {
1297
+ return this.elementProperties.get(t) ?? W1;
1298
+ }
1299
+ static _$Ei() {
1300
+ if (this.hasOwnProperty(j("elementProperties"))) return;
1301
+ const t = s2(this);
1302
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
1303
+ }
1304
+ static finalize() {
1305
+ if (this.hasOwnProperty(j("finalized"))) return;
1306
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(j("properties"))) {
1307
+ const e = this.properties, s = [...t2(e), ...e2(e)];
1308
+ for (const i of s) this.createProperty(i, e[i]);
1309
+ }
1310
+ const t = this[Symbol.metadata];
1311
+ if (t !== null) {
1312
+ const e = litPropertyMetadata.get(t);
1313
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
1314
+ }
1315
+ this._$Eh = /* @__PURE__ */ new Map();
1316
+ for (const [e, s] of this.elementProperties) {
1317
+ const i = this._$Eu(e, s);
1318
+ i !== void 0 && this._$Eh.set(i, e);
1319
+ }
1320
+ this.elementStyles = this.finalizeStyles(this.styles);
1321
+ }
1322
+ static finalizeStyles(t) {
1323
+ const e = [];
1324
+ if (Array.isArray(t)) {
1325
+ const s = new Set(t.flat(1 / 0).reverse());
1326
+ for (const i of s) e.unshift(j1(i));
1327
+ } else t !== void 0 && e.push(j1(t));
1328
+ return e;
1329
+ }
1330
+ static _$Eu(t, e) {
1331
+ const s = e.attribute;
1332
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
1333
+ }
1334
+ constructor() {
1335
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
1336
+ }
1337
+ _$Ev() {
1338
+ var t;
1339
+ this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
1340
+ }
1341
+ addController(t) {
1342
+ var e;
1343
+ (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
1344
+ }
1345
+ removeController(t) {
1346
+ var e;
1347
+ (e = this._$EO) == null || e.delete(t);
1348
+ }
1349
+ _$E_() {
1350
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
1351
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
1352
+ t.size > 0 && (this._$Ep = t);
1353
+ }
1354
+ createRenderRoot() {
1355
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
1356
+ return J5(t, this.constructor.elementStyles), t;
1357
+ }
1358
+ connectedCallback() {
1359
+ var t;
1360
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
1361
+ var s;
1362
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
1363
+ });
1364
+ }
1365
+ enableUpdating(t) {
1366
+ }
1367
+ disconnectedCallback() {
1368
+ var t;
1369
+ (t = this._$EO) == null || t.forEach((e) => {
1370
+ var s;
1371
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
1372
+ });
1373
+ }
1374
+ attributeChangedCallback(t, e, s) {
1375
+ this._$AK(t, s);
1376
+ }
1377
+ _$EC(t, e) {
1378
+ var s;
1379
+ const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
1380
+ if (r !== void 0 && i.reflect === !0) {
1381
+ const n = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : r1).toAttribute(e, i.type);
1382
+ this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
1383
+ }
1384
+ }
1385
+ _$AK(t, e) {
1386
+ var s;
1387
+ const i = this.constructor, r = i._$Eh.get(t);
1388
+ if (r !== void 0 && this._$Em !== r) {
1389
+ const n = i.getPropertyOptions(r), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((s = n.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? n.converter : r1;
1390
+ this._$Em = r, this[r] = a.fromAttribute(e, n.type), this._$Em = null;
1391
+ }
1392
+ }
1393
+ requestUpdate(t, e, s) {
1394
+ if (t !== void 0) {
1395
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? $1)(this[t], e)) return;
1396
+ this.P(t, e, s);
1397
+ }
1398
+ this.isUpdatePending === !1 && (this._$ES = this._$ET());
1399
+ }
1400
+ P(t, e, s) {
1401
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
1402
+ }
1403
+ async _$ET() {
1404
+ this.isUpdatePending = !0;
1405
+ try {
1406
+ await this._$ES;
1407
+ } catch (e) {
1408
+ Promise.reject(e);
1409
+ }
1410
+ const t = this.scheduleUpdate();
1411
+ return t != null && await t, !this.isUpdatePending;
1412
+ }
1413
+ scheduleUpdate() {
1414
+ return this.performUpdate();
1415
+ }
1416
+ performUpdate() {
1417
+ var t;
1418
+ if (!this.isUpdatePending) return;
1419
+ if (!this.hasUpdated) {
1420
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
1421
+ for (const [r, n] of this._$Ep) this[r] = n;
1422
+ this._$Ep = void 0;
1423
+ }
1424
+ const i = this.constructor.elementProperties;
1425
+ if (i.size > 0) for (const [r, n] of i) n.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], n);
1426
+ }
1427
+ let e = !1;
1428
+ const s = this._$AL;
1429
+ try {
1430
+ e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$EO) == null || t.forEach((i) => {
1431
+ var r;
1432
+ return (r = i.hostUpdate) == null ? void 0 : r.call(i);
1433
+ }), this.update(s)) : this._$EU();
1434
+ } catch (i) {
1435
+ throw e = !1, this._$EU(), i;
1436
+ }
1437
+ e && this._$AE(s);
1438
+ }
1439
+ willUpdate(t) {
1440
+ }
1441
+ _$AE(t) {
1442
+ var e;
1443
+ (e = this._$EO) == null || e.forEach((s) => {
1444
+ var i;
1445
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
1446
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
1447
+ }
1448
+ _$EU() {
1449
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
1450
+ }
1451
+ get updateComplete() {
1452
+ return this.getUpdateComplete();
1453
+ }
1454
+ getUpdateComplete() {
1455
+ return this._$ES;
1456
+ }
1457
+ shouldUpdate(t) {
1458
+ return !0;
1459
+ }
1460
+ update(t) {
1461
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
1462
+ }
1463
+ updated(t) {
1464
+ }
1465
+ firstUpdated(t) {
1466
+ }
1467
+ }
1468
+ R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[j("elementProperties")] = /* @__PURE__ */ new Map(), R[j("finalized")] = /* @__PURE__ */ new Map(), G1 == null || G1({ ReactiveElement: R }), (H.reactiveElementVersions ?? (H.reactiveElementVersions = [])).push("2.0.4");
1469
+ /**
1470
+ * @license
1471
+ * Copyright 2017 Google LLC
1472
+ * SPDX-License-Identifier: BSD-3-Clause
1473
+ */
1474
+ const o2 = { attribute: !0, type: String, converter: r1, reflect: !1, hasChanged: $1 }, r2 = (o = o2, t, e) => {
1475
+ const { kind: s, metadata: i } = e;
1476
+ let r = globalThis.litPropertyMetadata.get(i);
1477
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), r.set(e.name, o), s === "accessor") {
1478
+ const { name: n } = e;
1479
+ return { set(a) {
1480
+ const l = t.get.call(this);
1481
+ t.set.call(this, a), this.requestUpdate(n, l, o);
1482
+ }, init(a) {
1483
+ return a !== void 0 && this.P(n, void 0, o), a;
1484
+ } };
1485
+ }
1486
+ if (s === "setter") {
1487
+ const { name: n } = e;
1488
+ return function(a) {
1489
+ const l = this[n];
1490
+ t.call(this, a), this.requestUpdate(n, l, o);
1491
+ };
1492
+ }
1493
+ throw Error("Unsupported decorator location: " + s);
1494
+ };
1495
+ function E1(o) {
1496
+ return (t, e) => typeof e == "object" ? r2(o, t, e) : ((s, i, r) => {
1497
+ const n = i.hasOwnProperty(r);
1498
+ return i.constructor.createProperty(r, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
1499
+ })(o, t, e);
1500
+ }
1501
+ const n2 = a1`
1502
+ :host {
1503
+ --_nys-errormessage-font-family: var(
1504
+ --nys-font-family-ui,
1505
+ var(
1506
+ --nys-font-family-sans,
1507
+ "Proxima Nova",
1508
+ "Helvetica Neue",
1509
+ "Helvetica",
1510
+ "Arial",
1511
+ sans-serif
1512
+ )
1513
+ );
1514
+ --_nys-errormessage-font-weight: var(--nys-font-weight-regular, 400);
1515
+ --_nys-errormessage-font-size: var(--nys-font-size-ui-md, 16px);
1516
+ --_nys-errormessage-line-height: var(--nys-font-lineheight-ui-md, 24px);
1517
+ --_nys-errormessage-letter-spacing: var(
1518
+ --nys-font-letterspacing-ui-md,
1519
+ 0.044px
1520
+ );
1521
+ --_nys-errormessage-color: var(
1522
+ --nys-color-danger,
1523
+ var(--nys-color-red-600, #b52c2c)
1524
+ );
1525
+
1526
+ /* Spacing */
1527
+ --_nys-errormessage-gap: var(--nys-space-100, 8px);
1528
+ --_nys-errormessage-divider-gap: var(--nys-space-50, 4px);
1529
+ --_nys-errormessage-divider-width: var(--nys-border-width-sm, 1px);
1530
+ }
1531
+
1532
+ .nys-errormessage {
812
1533
  display: flex;
813
1534
  align-items: center;
814
- justify-content: center;
815
- margin-bottom: auto;
816
- box-sizing: border-box;
817
- height: var(--_nys-radiobutton-line-height);
818
- text-align: center;
1535
+ gap: var(--_nys-errormessage-gap);
1536
+ font-family: var(--_nys-errormessage-font-family);
1537
+ font-weight: var(--_nys-errormessage-font-weight);
1538
+ font-size: var(--_nys-errormessage-font-size);
1539
+ line-height: var(--_nys-errormessage-line-height);
1540
+ letter-spacing: var(--_nys-errormessage-letter-spacing);
1541
+ color: var(--_nys-errormessage-color);
1542
+ }
1543
+
1544
+ .nys-errormessage[showDivider] {
1545
+ padding-top: var(--_nys-errormessage-divider-gap);
1546
+ margin-top: var(--_nys-errormessage-divider-gap);
1547
+ border-top: var(--_nys-errormessage-divider-width) solid
1548
+ var(--_nys-errormessage-color);
819
1549
  }
820
1550
  `;
821
1551
  /*!
@@ -823,7 +1553,7 @@ const Q1 = (i) => i ?? h, A1 = b1`
823
1553
  * ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
824
1554
  * ▒█░░▀█ ░░▒█░░ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄█
825
1555
  *
826
- * Icon Component v1.0.0
1556
+ * Icon Component v1.1.0
827
1557
  * Part of the New York State Design System
828
1558
  * Repository: https://github.com/its-hcd/nysds
829
1559
  * License: MIT
@@ -833,134 +1563,134 @@ const Q1 = (i) => i ?? h, A1 = b1`
833
1563
  * Copyright 2019 Google LLC
834
1564
  * SPDX-License-Identifier: BSD-3-Clause
835
1565
  */
836
- const j = globalThis, i1 = j.ShadowRoot && (j.ShadyCSS === void 0 || j.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, V1 = Symbol(), g1 = /* @__PURE__ */ new WeakMap();
837
- let t5 = class {
838
- constructor(i, t, e) {
839
- if (this._$cssResult$ = !0, e !== V1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
840
- this.cssText = i, this.t = t;
1566
+ const t1 = globalThis, S1 = t1.ShadowRoot && (t1.ShadyCSS === void 0 || t1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, c5 = Symbol(), F1 = /* @__PURE__ */ new WeakMap();
1567
+ let a2 = class {
1568
+ constructor(o, t, e) {
1569
+ if (this._$cssResult$ = !0, e !== c5) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1570
+ this.cssText = o, this.t = t;
841
1571
  }
842
1572
  get styleSheet() {
843
- let i = this.o;
1573
+ let o = this.o;
844
1574
  const t = this.t;
845
- if (i1 && i === void 0) {
1575
+ if (S1 && o === void 0) {
846
1576
  const e = t !== void 0 && t.length === 1;
847
- e && (i = g1.get(t)), i === void 0 && ((this.o = i = new CSSStyleSheet()).replaceSync(this.cssText), e && g1.set(t, i));
1577
+ e && (o = F1.get(t)), o === void 0 && ((this.o = o = new CSSStyleSheet()).replaceSync(this.cssText), e && F1.set(t, o));
848
1578
  }
849
- return i;
1579
+ return o;
850
1580
  }
851
1581
  toString() {
852
1582
  return this.cssText;
853
1583
  }
854
1584
  };
855
- const e5 = (i) => new t5(typeof i == "string" ? i : i + "", void 0, V1), o5 = (i, t) => {
856
- if (i1) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
1585
+ const l2 = (o) => new a2(typeof o == "string" ? o : o + "", void 0, c5), C2 = (o, t) => {
1586
+ if (S1) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
857
1587
  else for (const e of t) {
858
- const o = document.createElement("style"), s = j.litNonce;
859
- s !== void 0 && o.setAttribute("nonce", s), o.textContent = e.cssText, i.appendChild(o);
1588
+ const s = document.createElement("style"), i = t1.litNonce;
1589
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
860
1590
  }
861
- }, y1 = i1 ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
1591
+ }, K1 = S1 ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
862
1592
  let e = "";
863
- for (const o of t.cssRules) e += o.cssText;
864
- return e5(e);
865
- })(i) : i;
1593
+ for (const s of t.cssRules) e += s.cssText;
1594
+ return l2(e);
1595
+ })(o) : o;
866
1596
  /**
867
1597
  * @license
868
1598
  * Copyright 2017 Google LLC
869
1599
  * SPDX-License-Identifier: BSD-3-Clause
870
1600
  */
871
- const { is: s5, defineProperty: i5, getOwnPropertyDescriptor: r5, getOwnPropertyNames: n5, getOwnPropertySymbols: C5, getPrototypeOf: l5 } = Object, S = globalThis, f1 = S.trustedTypes, a5 = f1 ? f1.emptyScript : "", w1 = S.reactiveElementPolyfillSupport, R = (i, t) => i, F = { toAttribute(i, t) {
1601
+ const { is: h2, defineProperty: c2, getOwnPropertyDescriptor: d2, getOwnPropertyNames: p2, getOwnPropertySymbols: u2, getPrototypeOf: v2 } = Object, Z = globalThis, J1 = Z.trustedTypes, y2 = J1 ? J1.emptyScript : "", Y1 = Z.reactiveElementPolyfillSupport, I = (o, t) => o, n1 = { toAttribute(o, t) {
872
1602
  switch (t) {
873
1603
  case Boolean:
874
- i = i ? a5 : null;
1604
+ o = o ? y2 : null;
875
1605
  break;
876
1606
  case Object:
877
1607
  case Array:
878
- i = i == null ? i : JSON.stringify(i);
1608
+ o = o == null ? o : JSON.stringify(o);
879
1609
  }
880
- return i;
881
- }, fromAttribute(i, t) {
882
- let e = i;
1610
+ return o;
1611
+ }, fromAttribute(o, t) {
1612
+ let e = o;
883
1613
  switch (t) {
884
1614
  case Boolean:
885
- e = i !== null;
1615
+ e = o !== null;
886
1616
  break;
887
1617
  case Number:
888
- e = i === null ? null : Number(i);
1618
+ e = o === null ? null : Number(o);
889
1619
  break;
890
1620
  case Object:
891
1621
  case Array:
892
1622
  try {
893
- e = JSON.parse(i);
1623
+ e = JSON.parse(o);
894
1624
  } catch {
895
1625
  e = null;
896
1626
  }
897
1627
  }
898
1628
  return e;
899
- } }, r1 = (i, t) => !s5(i, t), _1 = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: r1 };
900
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
901
- class z extends HTMLElement {
1629
+ } }, L1 = (o, t) => !h2(o, t), X1 = { attribute: !0, type: String, converter: n1, reflect: !1, hasChanged: L1 };
1630
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), Z.litPropertyMetadata ?? (Z.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
1631
+ class B extends HTMLElement {
902
1632
  static addInitializer(t) {
903
1633
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
904
1634
  }
905
1635
  static get observedAttributes() {
906
1636
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
907
1637
  }
908
- static createProperty(t, e = _1) {
1638
+ static createProperty(t, e = X1) {
909
1639
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
910
- const o = Symbol(), s = this.getPropertyDescriptor(t, o, e);
911
- s !== void 0 && i5(this.prototype, t, s);
1640
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
1641
+ i !== void 0 && c2(this.prototype, t, i);
912
1642
  }
913
1643
  }
914
- static getPropertyDescriptor(t, e, o) {
915
- const { get: s, set: n } = r5(this.prototype, t) ?? { get() {
1644
+ static getPropertyDescriptor(t, e, s) {
1645
+ const { get: i, set: r } = d2(this.prototype, t) ?? { get() {
916
1646
  return this[e];
917
- }, set(r) {
918
- this[e] = r;
1647
+ }, set(n) {
1648
+ this[e] = n;
919
1649
  } };
920
1650
  return { get() {
921
- return s == null ? void 0 : s.call(this);
922
- }, set(r) {
923
- const l = s == null ? void 0 : s.call(this);
924
- n.call(this, r), this.requestUpdate(t, l, o);
1651
+ return i == null ? void 0 : i.call(this);
1652
+ }, set(n) {
1653
+ const a = i == null ? void 0 : i.call(this);
1654
+ r.call(this, n), this.requestUpdate(t, a, s);
925
1655
  }, configurable: !0, enumerable: !0 };
926
1656
  }
927
1657
  static getPropertyOptions(t) {
928
- return this.elementProperties.get(t) ?? _1;
1658
+ return this.elementProperties.get(t) ?? X1;
929
1659
  }
930
1660
  static _$Ei() {
931
- if (this.hasOwnProperty(R("elementProperties"))) return;
932
- const t = l5(this);
1661
+ if (this.hasOwnProperty(I("elementProperties"))) return;
1662
+ const t = v2(this);
933
1663
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
934
1664
  }
935
1665
  static finalize() {
936
- if (this.hasOwnProperty(R("finalized"))) return;
937
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(R("properties"))) {
938
- const e = this.properties, o = [...n5(e), ...C5(e)];
939
- for (const s of o) this.createProperty(s, e[s]);
1666
+ if (this.hasOwnProperty(I("finalized"))) return;
1667
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(I("properties"))) {
1668
+ const e = this.properties, s = [...p2(e), ...u2(e)];
1669
+ for (const i of s) this.createProperty(i, e[i]);
940
1670
  }
941
1671
  const t = this[Symbol.metadata];
942
1672
  if (t !== null) {
943
1673
  const e = litPropertyMetadata.get(t);
944
- if (e !== void 0) for (const [o, s] of e) this.elementProperties.set(o, s);
1674
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
945
1675
  }
946
1676
  this._$Eh = /* @__PURE__ */ new Map();
947
- for (const [e, o] of this.elementProperties) {
948
- const s = this._$Eu(e, o);
949
- s !== void 0 && this._$Eh.set(s, e);
1677
+ for (const [e, s] of this.elementProperties) {
1678
+ const i = this._$Eu(e, s);
1679
+ i !== void 0 && this._$Eh.set(i, e);
950
1680
  }
951
1681
  this.elementStyles = this.finalizeStyles(this.styles);
952
1682
  }
953
1683
  static finalizeStyles(t) {
954
1684
  const e = [];
955
1685
  if (Array.isArray(t)) {
956
- const o = new Set(t.flat(1 / 0).reverse());
957
- for (const s of o) e.unshift(y1(s));
958
- } else t !== void 0 && e.push(y1(t));
1686
+ const s = new Set(t.flat(1 / 0).reverse());
1687
+ for (const i of s) e.unshift(K1(i));
1688
+ } else t !== void 0 && e.push(K1(t));
959
1689
  return e;
960
1690
  }
961
1691
  static _$Eu(t, e) {
962
- const o = e.attribute;
963
- return o === !1 ? void 0 : typeof o == "string" ? o : typeof t == "string" ? t.toLowerCase() : void 0;
1692
+ const s = e.attribute;
1693
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
964
1694
  }
965
1695
  constructor() {
966
1696
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -979,18 +1709,18 @@ class z extends HTMLElement {
979
1709
  }
980
1710
  _$E_() {
981
1711
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
982
- for (const o of e.keys()) this.hasOwnProperty(o) && (t.set(o, this[o]), delete this[o]);
1712
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
983
1713
  t.size > 0 && (this._$Ep = t);
984
1714
  }
985
1715
  createRenderRoot() {
986
1716
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
987
- return o5(t, this.constructor.elementStyles), t;
1717
+ return C2(t, this.constructor.elementStyles), t;
988
1718
  }
989
1719
  connectedCallback() {
990
1720
  var t;
991
1721
  this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
992
- var o;
993
- return (o = e.hostConnected) == null ? void 0 : o.call(e);
1722
+ var s;
1723
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
994
1724
  });
995
1725
  }
996
1726
  enableUpdating(t) {
@@ -998,38 +1728,38 @@ class z extends HTMLElement {
998
1728
  disconnectedCallback() {
999
1729
  var t;
1000
1730
  (t = this._$EO) == null || t.forEach((e) => {
1001
- var o;
1002
- return (o = e.hostDisconnected) == null ? void 0 : o.call(e);
1731
+ var s;
1732
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
1003
1733
  });
1004
1734
  }
1005
- attributeChangedCallback(t, e, o) {
1006
- this._$AK(t, o);
1735
+ attributeChangedCallback(t, e, s) {
1736
+ this._$AK(t, s);
1007
1737
  }
1008
1738
  _$EC(t, e) {
1009
- var o;
1010
- const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
1011
- if (n !== void 0 && s.reflect === !0) {
1012
- const r = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : F).toAttribute(e, s.type);
1013
- this._$Em = t, r == null ? this.removeAttribute(n) : this.setAttribute(n, r), this._$Em = null;
1739
+ var s;
1740
+ const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
1741
+ if (r !== void 0 && i.reflect === !0) {
1742
+ const n = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : n1).toAttribute(e, i.type);
1743
+ this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
1014
1744
  }
1015
1745
  }
1016
1746
  _$AK(t, e) {
1017
- var o;
1018
- const s = this.constructor, n = s._$Eh.get(t);
1019
- if (n !== void 0 && this._$Em !== n) {
1020
- const r = s.getPropertyOptions(n), l = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((o = r.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? r.converter : F;
1021
- this._$Em = n, this[n] = l.fromAttribute(e, r.type), this._$Em = null;
1747
+ var s;
1748
+ const i = this.constructor, r = i._$Eh.get(t);
1749
+ if (r !== void 0 && this._$Em !== r) {
1750
+ const n = i.getPropertyOptions(r), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((s = n.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? n.converter : n1;
1751
+ this._$Em = r, this[r] = a.fromAttribute(e, n.type), this._$Em = null;
1022
1752
  }
1023
1753
  }
1024
- requestUpdate(t, e, o) {
1754
+ requestUpdate(t, e, s) {
1025
1755
  if (t !== void 0) {
1026
- if (o ?? (o = this.constructor.getPropertyOptions(t)), !(o.hasChanged ?? r1)(this[t], e)) return;
1027
- this.P(t, e, o);
1756
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? L1)(this[t], e)) return;
1757
+ this.P(t, e, s);
1028
1758
  }
1029
1759
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
1030
1760
  }
1031
- P(t, e, o) {
1032
- this._$AL.has(t) || this._$AL.set(t, e), o.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
1761
+ P(t, e, s) {
1762
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
1033
1763
  }
1034
1764
  async _$ET() {
1035
1765
  this.isUpdatePending = !0;
@@ -1049,31 +1779,31 @@ class z extends HTMLElement {
1049
1779
  if (!this.isUpdatePending) return;
1050
1780
  if (!this.hasUpdated) {
1051
1781
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
1052
- for (const [n, r] of this._$Ep) this[n] = r;
1782
+ for (const [r, n] of this._$Ep) this[r] = n;
1053
1783
  this._$Ep = void 0;
1054
1784
  }
1055
- const s = this.constructor.elementProperties;
1056
- if (s.size > 0) for (const [n, r] of s) r.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], r);
1785
+ const i = this.constructor.elementProperties;
1786
+ if (i.size > 0) for (const [r, n] of i) n.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], n);
1057
1787
  }
1058
1788
  let e = !1;
1059
- const o = this._$AL;
1789
+ const s = this._$AL;
1060
1790
  try {
1061
- e = this.shouldUpdate(o), e ? (this.willUpdate(o), (t = this._$EO) == null || t.forEach((s) => {
1062
- var n;
1063
- return (n = s.hostUpdate) == null ? void 0 : n.call(s);
1064
- }), this.update(o)) : this._$EU();
1065
- } catch (s) {
1066
- throw e = !1, this._$EU(), s;
1791
+ e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$EO) == null || t.forEach((i) => {
1792
+ var r;
1793
+ return (r = i.hostUpdate) == null ? void 0 : r.call(i);
1794
+ }), this.update(s)) : this._$EU();
1795
+ } catch (i) {
1796
+ throw e = !1, this._$EU(), i;
1067
1797
  }
1068
- e && this._$AE(o);
1798
+ e && this._$AE(s);
1069
1799
  }
1070
1800
  willUpdate(t) {
1071
1801
  }
1072
1802
  _$AE(t) {
1073
1803
  var e;
1074
- (e = this._$EO) == null || e.forEach((o) => {
1075
- var s;
1076
- return (s = o.hostUpdated) == null ? void 0 : s.call(o);
1804
+ (e = this._$EO) == null || e.forEach((s) => {
1805
+ var i;
1806
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
1077
1807
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
1078
1808
  }
1079
1809
  _$EU() {
@@ -1096,40 +1826,40 @@ class z extends HTMLElement {
1096
1826
  firstUpdated(t) {
1097
1827
  }
1098
1828
  }
1099
- z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, z[R("elementProperties")] = /* @__PURE__ */ new Map(), z[R("finalized")] = /* @__PURE__ */ new Map(), w1 == null || w1({ ReactiveElement: z }), (S.reactiveElementVersions ?? (S.reactiveElementVersions = [])).push("2.0.4");
1829
+ B.elementStyles = [], B.shadowRootOptions = { mode: "open" }, B[I("elementProperties")] = /* @__PURE__ */ new Map(), B[I("finalized")] = /* @__PURE__ */ new Map(), Y1 == null || Y1({ ReactiveElement: B }), (Z.reactiveElementVersions ?? (Z.reactiveElementVersions = [])).push("2.0.4");
1100
1830
  /**
1101
1831
  * @license
1102
1832
  * Copyright 2017 Google LLC
1103
1833
  * SPDX-License-Identifier: BSD-3-Clause
1104
1834
  */
1105
- const c5 = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: r1 }, h5 = (i = c5, t, e) => {
1106
- const { kind: o, metadata: s } = e;
1107
- let n = globalThis.litPropertyMetadata.get(s);
1108
- if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), n.set(e.name, i), o === "accessor") {
1109
- const { name: r } = e;
1110
- return { set(l) {
1111
- const C = t.get.call(this);
1112
- t.set.call(this, l), this.requestUpdate(r, C, i);
1113
- }, init(l) {
1114
- return l !== void 0 && this.P(r, void 0, i), l;
1835
+ const g2 = { attribute: !0, type: String, converter: n1, reflect: !1, hasChanged: L1 }, f2 = (o = g2, t, e) => {
1836
+ const { kind: s, metadata: i } = e;
1837
+ let r = globalThis.litPropertyMetadata.get(i);
1838
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), r.set(e.name, o), s === "accessor") {
1839
+ const { name: n } = e;
1840
+ return { set(a) {
1841
+ const l = t.get.call(this);
1842
+ t.set.call(this, a), this.requestUpdate(n, l, o);
1843
+ }, init(a) {
1844
+ return a !== void 0 && this.P(n, void 0, o), a;
1115
1845
  } };
1116
1846
  }
1117
- if (o === "setter") {
1118
- const { name: r } = e;
1119
- return function(l) {
1120
- const C = this[r];
1121
- t.call(this, l), this.requestUpdate(r, C, i);
1847
+ if (s === "setter") {
1848
+ const { name: n } = e;
1849
+ return function(a) {
1850
+ const l = this[n];
1851
+ t.call(this, a), this.requestUpdate(n, l, o);
1122
1852
  };
1123
1853
  }
1124
- throw Error("Unsupported decorator location: " + o);
1854
+ throw Error("Unsupported decorator location: " + s);
1125
1855
  };
1126
- function A(i) {
1127
- return (t, e) => typeof e == "object" ? h5(i, t, e) : ((o, s, n) => {
1128
- const r = s.hasOwnProperty(n);
1129
- return s.constructor.createProperty(n, r ? { ...o, wrapped: !0 } : o), r ? Object.getOwnPropertyDescriptor(s, n) : void 0;
1130
- })(i, t, e);
1856
+ function V(o) {
1857
+ return (t, e) => typeof e == "object" ? f2(o, t, e) : ((s, i, r) => {
1858
+ const n = i.hasOwnProperty(r);
1859
+ return i.constructor.createProperty(r, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
1860
+ })(o, t, e);
1131
1861
  }
1132
- const d5 = {
1862
+ const w2 = {
1133
1863
  // --------- UX Team Main Library (below) --------- //
1134
1864
  // *** CORE *** //
1135
1865
  account_circle: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
@@ -1328,7 +2058,7 @@ const d5 = {
1328
2058
  lock_filled: `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="23" viewBox="0 0 18 23" fill="none">
1329
2059
  <path d="M3.30002 22.7751C2.43369 22.7751 1.69211 22.4667 1.07527 21.8498C0.458441 21.2328 0.150024 20.4913 0.150024 19.6251V10.2251C0.150024 9.35893 0.458441 8.61735 1.07527 8.00035C1.69211 7.38351 2.43369 7.0751 3.30002 7.0751H3.62502V5.8001C3.62502 4.28343 4.14586 2.99593 5.18752 1.9376C6.22919 0.879264 7.50002 0.350098 9.00002 0.350098C10.5 0.350098 11.7709 0.879264 12.8125 1.9376C13.8542 2.99593 14.375 4.28343 14.375 5.8001V7.0751H14.7C15.5662 7.0751 16.3078 7.38351 16.9248 8.00035C17.5416 8.61735 17.85 9.35893 17.85 10.2251V19.6251C17.85 20.4913 17.5416 21.2328 16.9248 21.8498C16.3078 22.4667 15.5662 22.7751 14.7 22.7751H3.30002ZM9.00002 16.9251C9.55002 16.9251 10.0209 16.7293 10.4125 16.3376C10.8042 15.9459 11 15.4751 11 14.9251C11 14.3751 10.8042 13.9043 10.4125 13.5126C10.0209 13.1209 9.55002 12.9251 9.00002 12.9251C8.45002 12.9251 7.97919 13.1209 7.58752 13.5126C7.19586 13.9043 7.00002 14.3751 7.00002 14.9251C7.00002 15.4751 7.19586 15.9459 7.58752 16.3376C7.97919 16.7293 8.45002 16.9251 9.00002 16.9251ZM6.77502 7.0751H11.225V5.8001C11.225 5.16126 11.0125 4.61818 10.5875 4.17085C10.1625 3.72368 9.63336 3.5001 9.00002 3.5001C8.36669 3.5001 7.83752 3.72368 7.41252 4.17085C6.98752 4.61818 6.77502 5.16126 6.77502 5.8001V7.0751Z" fill="var(--nys-icon-color, currentcolor)"/>
1330
2060
  </svg>`
1331
- }, u5 = b1`
2061
+ }, _2 = a1`
1332
2062
  :host {
1333
2063
  display: inline-block;
1334
2064
  --_nys-icon-size: 0.7em; /* If cap isn't supported, a fallback value of 0.7em is used, as it closely approximates the height of capital letters in most fonts. */
@@ -1425,34 +2155,34 @@ const d5 = {
1425
2155
  transform: scale(-1, -1);
1426
2156
  }
1427
2157
  `;
1428
- var p5 = Object.defineProperty, v5 = Object.getOwnPropertyDescriptor, V = (i, t, e, o) => {
1429
- for (var s = o > 1 ? void 0 : o ? v5(t, e) : t, n = i.length - 1, r; n >= 0; n--)
1430
- (r = i[n]) && (s = (o ? r(t, e, s) : r(s)) || s);
1431
- return o && s && p5(t, e, s), s;
1432
- }, U;
1433
- const H = (U = class extends t1 {
2158
+ var m2 = Object.defineProperty, b2 = Object.getOwnPropertyDescriptor, U = (o, t, e, s) => {
2159
+ for (var i = s > 1 ? void 0 : s ? b2(t, e) : t, r = o.length - 1, n; r >= 0; r--)
2160
+ (n = o[r]) && (i = (s ? n(t, e, i) : n(i)) || i);
2161
+ return s && i && m2(t, e, i), i;
2162
+ }, T;
2163
+ const x = (T = class extends F {
1434
2164
  constructor() {
1435
2165
  super(...arguments), this.name = "", this.label = "", this.rotate = "0", this.flip = "", this.color = "", this._size = "sm";
1436
2166
  }
1437
2167
  get size() {
1438
2168
  return this._size;
1439
2169
  }
1440
- set size(i) {
1441
- this._size = U.VALID_TYPES.includes(
1442
- i
1443
- ) ? i : "sm";
2170
+ set size(o) {
2171
+ this._size = T.VALID_TYPES.includes(
2172
+ o
2173
+ ) ? o : "sm";
1444
2174
  }
1445
2175
  getIcon() {
1446
- const i = d5[this.name], t = !!this.label;
1447
- if (!i) return null;
1448
- const e = new DOMParser().parseFromString(i, "image/svg+xml").documentElement;
2176
+ const o = w2[this.name], t = !!this.label;
2177
+ if (!o) return null;
2178
+ const e = new DOMParser().parseFromString(o, "image/svg+xml").documentElement;
1449
2179
  return e instanceof SVGElement ? (e.setAttribute("role", "img"), e.setAttribute("aria-label", t ? this.label : ""), e.setAttribute("aria-hidden", t ? "false" : "true"), e.style.rotate = `${this.rotate}deg`, e.style.color = this.color || "currentcolor", e.classList.add(`nys-icon--${this.size}`), e.classList.add("nys-icon--svg"), this.flip && e.classList.add(`nys-icon--flip-${this.flip}`), e) : null;
1450
2180
  }
1451
2181
  render() {
1452
- const i = this.getIcon();
1453
- return i ? M`${i}` : null;
2182
+ const o = this.getIcon();
2183
+ return o ? w`${o}` : null;
1454
2184
  }
1455
- }, U.styles = u5, U.VALID_TYPES = [
2185
+ }, T.styles = _2, T.VALID_TYPES = [
1456
2186
  "2xs",
1457
2187
  "xs",
1458
2188
  "sm",
@@ -1468,62 +2198,117 @@ const H = (U = class extends t1 {
1468
2198
  "32",
1469
2199
  "48",
1470
2200
  "64"
1471
- ], U);
1472
- V([
1473
- A({ type: String })
1474
- ], H.prototype, "name", 2);
1475
- V([
1476
- A({ type: String })
1477
- ], H.prototype, "label", 2);
1478
- V([
1479
- A({ type: String })
1480
- ], H.prototype, "rotate", 2);
1481
- V([
1482
- A({ type: String })
1483
- ], H.prototype, "flip", 2);
1484
- V([
1485
- A({ type: String })
1486
- ], H.prototype, "color", 2);
1487
- V([
1488
- A({ reflect: !0 })
1489
- ], H.prototype, "size", 1);
1490
- let g5 = H;
1491
- customElements.get("nys-icon") || customElements.define("nys-icon", g5);
1492
- var y5 = Object.defineProperty, f5 = Object.getOwnPropertyDescriptor, g = (i, t, e, o) => {
1493
- for (var s = o > 1 ? void 0 : o ? f5(t, e) : t, n = i.length - 1, r; n >= 0; n--)
1494
- (r = i[n]) && (s = (o ? r(t, e, s) : r(s)) || s);
1495
- return o && s && y5(t, e, s), s;
2201
+ ], T);
2202
+ U([
2203
+ V({ type: String })
2204
+ ], x.prototype, "name", 2);
2205
+ U([
2206
+ V({ type: String })
2207
+ ], x.prototype, "label", 2);
2208
+ U([
2209
+ V({ type: String })
2210
+ ], x.prototype, "rotate", 2);
2211
+ U([
2212
+ V({ type: String })
2213
+ ], x.prototype, "flip", 2);
2214
+ U([
2215
+ V({ type: String })
2216
+ ], x.prototype, "color", 2);
2217
+ U([
2218
+ V({ reflect: !0 })
2219
+ ], x.prototype, "size", 1);
2220
+ let $2 = x;
2221
+ customElements.get("nys-icon") || customElements.define("nys-icon", $2);
2222
+ var E2 = Object.defineProperty, M1 = (o, t, e, s) => {
2223
+ for (var i = void 0, r = o.length - 1, n; r >= 0; r--)
2224
+ (n = o[r]) && (i = n(t, e, i) || i);
2225
+ return i && E2(t, e, i), i;
1496
2226
  };
1497
- let w5 = 0;
1498
- var $;
1499
- const v = ($ = class extends t1 {
2227
+ const y1 = class extends F {
2228
+ // allows use of elementInternals' API
1500
2229
  constructor() {
1501
- super(...arguments), this.id = "", this.name = "", this.required = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.selectedName = null, this.selectedValue = null, this._size = "md";
2230
+ super(), this.showError = !1, this.errorMessage = "", this.showDivider = !1, this._internals = this.attachInternals();
2231
+ }
2232
+ render() {
2233
+ return w`${this.showError ? w`<div class="nys-errormessage" ?showDivider=${this.showDivider}>
2234
+ <nys-icon name="error" size="xl"></nys-icon>
2235
+ ${this._internals.validationMessage || this.errorMessage}
2236
+ </div>` : ""}`;
2237
+ }
2238
+ };
2239
+ y1.styles = n2, y1.formAssociated = !0;
2240
+ let c1 = y1;
2241
+ M1([
2242
+ E1({ type: Boolean })
2243
+ ], c1.prototype, "showError");
2244
+ M1([
2245
+ E1({ type: String })
2246
+ ], c1.prototype, "errorMessage");
2247
+ M1([
2248
+ E1({ type: Boolean, reflect: !0 })
2249
+ ], c1.prototype, "showDivider");
2250
+ customElements.get("nys-errormessage") || customElements.define("nys-errormessage", c1);
2251
+ var S2 = Object.defineProperty, L2 = Object.getOwnPropertyDescriptor, _ = (o, t, e, s) => {
2252
+ for (var i = s > 1 ? void 0 : s ? L2(t, e) : t, r = o.length - 1, n; r >= 0; r--)
2253
+ (n = o[r]) && (i = (s ? n(t, e, i) : n(i)) || i);
2254
+ return s && i && S2(t, e, i), i;
2255
+ };
2256
+ let M2 = 0;
2257
+ var f;
2258
+ const v = (f = class extends F {
2259
+ // allows use of elementInternals' API
2260
+ constructor() {
2261
+ super(), this.id = "", this.name = "", this.required = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.selectedValue = null, this._size = "md", this._internals = this.attachInternals();
1502
2262
  }
1503
2263
  get size() {
1504
2264
  return this._size;
1505
2265
  }
1506
2266
  set size(t) {
1507
- this._size = $.VALID_SIZES.includes(
2267
+ this._size = f.VALID_SIZES.includes(
1508
2268
  t
1509
2269
  ) ? t : "md";
1510
2270
  }
1511
2271
  // Generate a unique ID if one is not provided
1512
2272
  connectedCallback() {
1513
- super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${w5++}`), this.addEventListener("change", this._handleRadioButtonChange);
2273
+ super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${M2++}`), this.addEventListener("change", this._handleRadioButtonChange), this.addEventListener("invalid", this._handleInvalid);
1514
2274
  }
1515
2275
  disconnectedCallback() {
1516
- super.disconnectedCallback(), this.removeEventListener("change", this._handleRadioButtonChange);
2276
+ super.disconnectedCallback(), this.removeEventListener("change", this._handleRadioButtonChange), this.removeEventListener("invalid", this._handleInvalid);
2277
+ }
2278
+ firstUpdated() {
2279
+ this._initializeCheckedState(), this._setValue(), this.setRadioButtonRequire();
1517
2280
  }
1518
2281
  updated(t) {
1519
- t.has("required") && this.updateRadioButtonsRequire(), t.has("size") && this.updateRadioButtonsSize();
2282
+ (t.has("required") || t.has("selectedValue")) && this._manageRequire(), t.has("size") && this.updateRadioButtonsSize();
2283
+ }
2284
+ // This callback is automatically called when the parent form is reset.
2285
+ formResetCallback() {
2286
+ this.querySelectorAll("nys-radiobutton").forEach((e) => {
2287
+ e.formResetUpdate();
2288
+ });
2289
+ }
2290
+ /********************** Form Integration **********************/
2291
+ _setValue() {
2292
+ this._internals.setFormValue(this.selectedValue);
1520
2293
  }
1521
2294
  // Updates the "require" attribute of a radiobutton underneath a radiogroup to ensure requirement for all radiobutton under the same name/group
1522
- updateRadioButtonsRequire() {
1523
- this.querySelectorAll("nys-radiobutton").forEach((e, o) => {
1524
- this.required && o === 0 && e.setAttribute("required", "required");
2295
+ setRadioButtonRequire() {
2296
+ this.querySelectorAll("nys-radiobutton").forEach((e, s) => {
2297
+ this.required && s === 0 && e.setAttribute("required", "required");
1525
2298
  });
1526
2299
  }
2300
+ async _manageRequire() {
2301
+ const t = this.errorMessage || "Please select an option.", e = this.querySelector("nys-radiobutton"), s = e ? await e.getInputElement() : null;
2302
+ this.required && !this.selectedValue ? (this._internals.setValidity(
2303
+ { valueMissing: !0 },
2304
+ t,
2305
+ s || this
2306
+ ), this.showError = !0) : (this._internals.setValidity({}), this.showError = !1);
2307
+ }
2308
+ _initializeCheckedState() {
2309
+ const t = this.querySelector("nys-radiobutton[checked]");
2310
+ t && (this.selectedValue = t.getAttribute("value"), this._internals.setFormValue(this.selectedValue));
2311
+ }
1527
2312
  // Updates the size of each radiobutton underneath a radiogroup to ensure size standardization
1528
2313
  updateRadioButtonsSize() {
1529
2314
  this.querySelectorAll("nys-radiobutton").forEach((e) => {
@@ -1532,73 +2317,74 @@ const v = ($ = class extends t1 {
1532
2317
  }
1533
2318
  // Keeps radiogroup informed of the name and value of its current selected radiobutton
1534
2319
  _handleRadioButtonChange(t) {
1535
- const e = t, { name: o, value: s } = e.detail;
1536
- this.selectedName = o, this.selectedValue = s, console.log("you have selected:", this.selectedName, this.selectedValue);
2320
+ const e = t, { value: s } = e.detail;
2321
+ this.selectedValue = s, this._internals.setFormValue(this.selectedValue);
2322
+ }
2323
+ _handleInvalid() {
2324
+ this._internals.validity.valueMissing && (this.showError = !0, this._manageRequire());
1537
2325
  }
1538
2326
  render() {
1539
- return M` <div role="radiogroup" class="nys-radiogroup">
1540
- ${this.label && M` <div class="nys-radiobutton__text">
1541
- <div class="nys-radiobutton__requiredwrapper">
1542
- <label for=${this.id} class="nys-radiogroup__label"
1543
- >${this.label}</label
1544
- >
1545
- ${this.required ? M`<label class="nys-radiobutton__required">*</label>` : ""}
1546
- </div>
1547
- <div class="nys-radiogroup__description">
1548
- ${this.description}
1549
- <slot name="description"></slot>
1550
- </div>
1551
- </div>`}
2327
+ return w` <div
2328
+ role="radiogroup"
2329
+ class="nys-radiogroup"
2330
+ aria-required="${this.required ? "true" : "false"}"
2331
+ aria-invalid="${this.showError ? "true" : "false"}"
2332
+ >
2333
+ <nys-label
2334
+ label=${this.label}
2335
+ description=${this.description}
2336
+ flag=${this.required ? "required" : ""}
2337
+ >
2338
+ <slot name="description" slot="description">${this.description}</slot>
2339
+ </nys-label>
1552
2340
  <div class="nys-radiogroup__content">
1553
2341
  <slot></slot>
1554
2342
  </div>
1555
- ${this.showError && this.errorMessage ? M`<div class="nys-radiobutton__error">
1556
- <nys-icon name="error" size="xl"></nys-icon>
1557
- ${this.errorMessage}
1558
- </div>` : ""}
2343
+ <nys-errormessage
2344
+ ?showError=${this.showError}
2345
+ errorMessage=${this._internals.validationMessage || this.errorMessage}
2346
+ showDivider
2347
+ ></nys-errormessage>
1559
2348
  </div>`;
1560
2349
  }
1561
- }, $.VALID_SIZES = ["sm", "md"], $.styles = A1, $);
1562
- g([
1563
- u({ type: String })
2350
+ }, f.VALID_SIZES = ["sm", "md"], f.styles = a5, f.formAssociated = !0, f);
2351
+ _([
2352
+ p({ type: String })
1564
2353
  ], v.prototype, "id", 2);
1565
- g([
1566
- u({ type: String })
2354
+ _([
2355
+ p({ type: String })
1567
2356
  ], v.prototype, "name", 2);
1568
- g([
1569
- u({ type: Boolean })
2357
+ _([
2358
+ p({ type: Boolean, reflect: !0 })
1570
2359
  ], v.prototype, "required", 2);
1571
- g([
1572
- u({ type: Boolean })
2360
+ _([
2361
+ p({ type: Boolean, reflect: !0 })
1573
2362
  ], v.prototype, "showError", 2);
1574
- g([
1575
- u({ type: String })
2363
+ _([
2364
+ p({ type: String })
1576
2365
  ], v.prototype, "errorMessage", 2);
1577
- g([
1578
- u({ type: String })
2366
+ _([
2367
+ p({ type: String })
1579
2368
  ], v.prototype, "label", 2);
1580
- g([
1581
- u({ type: String })
2369
+ _([
2370
+ p({ type: String })
1582
2371
  ], v.prototype, "description", 2);
1583
- g([
1584
- $1()
1585
- ], v.prototype, "selectedName", 2);
1586
- g([
1587
- $1()
2372
+ _([
2373
+ E5()
1588
2374
  ], v.prototype, "selectedValue", 2);
1589
- g([
1590
- u({ reflect: !0 })
2375
+ _([
2376
+ p({ reflect: !0 })
1591
2377
  ], v.prototype, "size", 1);
1592
- let _5 = v;
1593
- customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", _5);
1594
- var b5 = Object.defineProperty, m5 = Object.getOwnPropertyDescriptor, w = (i, t, e, o) => {
1595
- for (var s = o > 1 ? void 0 : o ? m5(t, e) : t, n = i.length - 1, r; n >= 0; n--)
1596
- (r = i[n]) && (s = (o ? r(t, e, s) : r(s)) || s);
1597
- return o && s && b5(t, e, s), s;
2378
+ let x2 = v;
2379
+ customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", x2);
2380
+ var A2 = Object.defineProperty, P2 = Object.getOwnPropertyDescriptor, m = (o, t, e, s) => {
2381
+ for (var i = s > 1 ? void 0 : s ? P2(t, e) : t, r = o.length - 1, n; r >= 0; r--)
2382
+ (n = o[r]) && (i = (s ? n(t, e, i) : n(i)) || i);
2383
+ return s && i && A2(t, e, i), i;
1598
2384
  };
1599
- let $5 = 0;
1600
- var a;
1601
- const y = (a = class extends t1 {
2385
+ let H2 = 0;
2386
+ var C;
2387
+ const y = (C = class extends F {
1602
2388
  constructor() {
1603
2389
  super(...arguments), this.checked = !1, this.disabled = !1, this.required = !1, this.label = "", this.description = "", this.id = "", this.name = "", this.value = "", this._size = "md";
1604
2390
  }
@@ -1606,20 +2392,30 @@ const y = (a = class extends t1 {
1606
2392
  return this._size;
1607
2393
  }
1608
2394
  set size(t) {
1609
- this._size = a.VALID_SIZES.includes(
2395
+ this._size = C.VALID_SIZES.includes(
1610
2396
  t
1611
2397
  ) ? t : "md";
1612
2398
  }
2399
+ async getInputElement() {
2400
+ var t;
2401
+ return await this.updateComplete, ((t = this.shadowRoot) == null ? void 0 : t.querySelector("input")) || null;
2402
+ }
2403
+ // This callback is automatically called when the parent form is reset.
2404
+ formResetUpdate() {
2405
+ this.checked = !1;
2406
+ }
2407
+ /********************** Lifecycle updates **********************/
1613
2408
  // Generate a unique ID if one is not provided
1614
2409
  connectedCallback() {
1615
- super.connectedCallback(), this.id || (this.id = `nys-radiobutton-${Date.now()}-${$5++}`), this.checked && (a.buttonGroup[this.name] && (a.buttonGroup[this.name].checked = !1, a.buttonGroup[this.name].requestUpdate()), a.buttonGroup[this.name] = this);
2410
+ super.connectedCallback(), this.id || (this.id = `nys-radiobutton-${Date.now()}-${H2++}`), this.checked && (C.buttonGroup[this.name] && (C.buttonGroup[this.name].checked = !1, C.buttonGroup[this.name].requestUpdate()), C.buttonGroup[this.name] = this);
1616
2411
  }
1617
2412
  updated(t) {
1618
- t.has("checked") && this.checked && a.buttonGroup[this.name] !== this && (a.buttonGroup[this.name] && (a.buttonGroup[this.name].checked = !1, a.buttonGroup[this.name].requestUpdate()), a.buttonGroup[this.name] = this);
2413
+ t.has("checked") && this.checked && C.buttonGroup[this.name] !== this && (C.buttonGroup[this.name] && (C.buttonGroup[this.name].checked = !1, C.buttonGroup[this.name].requestUpdate()), C.buttonGroup[this.name] = this);
1619
2414
  }
2415
+ /******************** Event Handlers ********************/
1620
2416
  // Handle radiobutton change event & unselection of other options in group
1621
2417
  _handleChange() {
1622
- this.checked || (a.buttonGroup[this.name] && (a.buttonGroup[this.name].checked = !1, a.buttonGroup[this.name].requestUpdate()), a.buttonGroup[this.name] = this, this.checked = !0, this.dispatchEvent(
2418
+ this.checked || (C.buttonGroup[this.name] && (C.buttonGroup[this.name].checked = !1, C.buttonGroup[this.name].requestUpdate()), C.buttonGroup[this.name] = this, this.checked = !0, this.dispatchEvent(
1623
2419
  new CustomEvent("change", {
1624
2420
  detail: { checked: this.checked, name: this.name, value: this.value },
1625
2421
  bubbles: !0,
@@ -1637,7 +2433,7 @@ const y = (a = class extends t1 {
1637
2433
  }
1638
2434
  // Handle keydown for keyboard accessibility
1639
2435
  _handleKeydown(t) {
1640
- t.code === "Space" && (t.preventDefault(), !this.disabled && !this.checked && (a.buttonGroup[this.name] && (a.buttonGroup[this.name].checked = !1, a.buttonGroup[this.name].requestUpdate()), a.buttonGroup[this.name] = this, this.checked = !0, this.dispatchEvent(
2436
+ t.code === "Space" && (t.preventDefault(), !this.disabled && !this.checked && (C.buttonGroup[this.name] && (C.buttonGroup[this.name].checked = !1, C.buttonGroup[this.name].requestUpdate()), C.buttonGroup[this.name] = this, this.checked = !0, this.dispatchEvent(
1641
2437
  new CustomEvent("change", {
1642
2438
  detail: {
1643
2439
  checked: this.checked,
@@ -1650,13 +2446,13 @@ const y = (a = class extends t1 {
1650
2446
  )));
1651
2447
  }
1652
2448
  render() {
1653
- return M`
2449
+ return w`
1654
2450
  <label class="nys-radiobutton">
1655
2451
  <input
1656
2452
  id="${this.id}"
1657
2453
  class="nys-radiobutton__radio"
1658
2454
  type="radio"
1659
- name="${Q1(this.name ? this.name : void 0)}"
2455
+ name="${V5(this.name ? this.name : void 0)}"
1660
2456
  .checked=${this.checked}
1661
2457
  ?disabled=${this.disabled}
1662
2458
  .value=${this.value}
@@ -1669,51 +2465,49 @@ const y = (a = class extends t1 {
1669
2465
  @blur="${this._handleBlur}"
1670
2466
  @keydown="${this._handleKeydown}"
1671
2467
  />
1672
- ${this.label && M` <div class="nys-radiobutton__text">
1673
- <div class="nys-radiobutton__requiredwrapper">
1674
- <label for=${this.id} class="nys-radiobutton__label"
1675
- >${this.label}</label
1676
- >
1677
- </div>
2468
+ ${this.label && w` <div class="nys-radiobutton__text">
2469
+ <label for=${this.id} class="nys-radiobutton__label"
2470
+ >${this.label}</label
2471
+ >
1678
2472
  <label for=${this.id} class="nys-radiobutton__description">
1679
2473
  ${this.description}
1680
- <slot name="description"></slot>
2474
+ <slot></slot>
1681
2475
  </label>
1682
2476
  </div>`}
1683
2477
  </label>
1684
2478
  `;
1685
2479
  }
1686
- }, a.VALID_SIZES = ["sm", "md"], a.buttonGroup = {}, a.styles = A1, a);
1687
- w([
1688
- u({ type: Boolean })
2480
+ }, C.VALID_SIZES = ["sm", "md"], C.buttonGroup = {}, C.styles = a5, C);
2481
+ m([
2482
+ p({ type: Boolean, reflect: !0 })
1689
2483
  ], y.prototype, "checked", 2);
1690
- w([
1691
- u({ type: Boolean })
2484
+ m([
2485
+ p({ type: Boolean, reflect: !0 })
1692
2486
  ], y.prototype, "disabled", 2);
1693
- w([
1694
- u({ type: Boolean })
2487
+ m([
2488
+ p({ type: Boolean, reflect: !0 })
1695
2489
  ], y.prototype, "required", 2);
1696
- w([
1697
- u({ type: String })
2490
+ m([
2491
+ p({ type: String })
1698
2492
  ], y.prototype, "label", 2);
1699
- w([
1700
- u({ type: String })
2493
+ m([
2494
+ p({ type: String })
1701
2495
  ], y.prototype, "description", 2);
1702
- w([
1703
- u({ type: String })
2496
+ m([
2497
+ p({ type: String })
1704
2498
  ], y.prototype, "id", 2);
1705
- w([
1706
- u({ type: String })
2499
+ m([
2500
+ p({ type: String })
1707
2501
  ], y.prototype, "name", 2);
1708
- w([
1709
- u({ type: String })
2502
+ m([
2503
+ p({ type: String })
1710
2504
  ], y.prototype, "value", 2);
1711
- w([
1712
- u({ reflect: !0 })
2505
+ m([
2506
+ p({ reflect: !0 })
1713
2507
  ], y.prototype, "size", 1);
1714
- let L5 = y;
1715
- customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", L5);
2508
+ let Z2 = y;
2509
+ customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", Z2);
1716
2510
  export {
1717
- L5 as NysRadiobutton
2511
+ Z2 as NysRadiobutton
1718
2512
  };
1719
2513
  //# sourceMappingURL=nys-radiobutton.js.map