@nysds/nys-globalheader 1.0.0 → 1.1.1
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.
package/dist/nys-globalheader.js
CHANGED
|
@@ -4,7 +4,7 @@ import { css as D, LitElement as q, html as a } from "lit";
|
|
|
4
4
|
* ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
|
|
5
5
|
* ▒█░░▀█ ░░▒█░░ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄█
|
|
6
6
|
*
|
|
7
|
-
* Global Header Component v1.
|
|
7
|
+
* Global Header Component v1.1.1
|
|
8
8
|
* Part of the New York State Design System
|
|
9
9
|
* Repository: https://github.com/its-hcd/nysds
|
|
10
10
|
* License: MIT
|
|
@@ -14,43 +14,43 @@ import { css as D, LitElement as q, html as a } from "lit";
|
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
17
|
+
const b = globalThis, $ = b.ShadowRoot && (b.ShadyCSS === void 0 || b.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, I = Symbol(), U = /* @__PURE__ */ new WeakMap();
|
|
18
18
|
let G = class {
|
|
19
|
-
constructor(
|
|
19
|
+
constructor(t, e, C) {
|
|
20
20
|
if (this._$cssResult$ = !0, C !== I) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
21
|
-
this.cssText =
|
|
21
|
+
this.cssText = t, this.t = e;
|
|
22
22
|
}
|
|
23
23
|
get styleSheet() {
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
if ($ &&
|
|
27
|
-
const C =
|
|
28
|
-
C && (
|
|
24
|
+
let t = this.o;
|
|
25
|
+
const e = this.t;
|
|
26
|
+
if ($ && t === void 0) {
|
|
27
|
+
const C = e !== void 0 && e.length === 1;
|
|
28
|
+
C && (t = U.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), C && U.set(e, t));
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return t;
|
|
31
31
|
}
|
|
32
32
|
toString() {
|
|
33
33
|
return this.cssText;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const X = (n) => new G(typeof n == "string" ? n : n + "", void 0, I), Q = (n,
|
|
37
|
-
if ($) n.adoptedStyleSheets =
|
|
38
|
-
else for (const
|
|
39
|
-
const C = document.createElement("style"), o =
|
|
40
|
-
o !== void 0 && C.setAttribute("nonce", o), C.textContent =
|
|
41
|
-
}
|
|
42
|
-
}, O = $ ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((
|
|
43
|
-
let
|
|
44
|
-
for (const C of
|
|
45
|
-
return X(
|
|
36
|
+
const X = (n) => new G(typeof n == "string" ? n : n + "", void 0, I), Q = (n, t) => {
|
|
37
|
+
if ($) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
38
|
+
else for (const e of t) {
|
|
39
|
+
const C = document.createElement("style"), o = b.litNonce;
|
|
40
|
+
o !== void 0 && C.setAttribute("nonce", o), C.textContent = e.cssText, n.appendChild(C);
|
|
41
|
+
}
|
|
42
|
+
}, O = $ ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
43
|
+
let e = "";
|
|
44
|
+
for (const C of t.cssRules) e += C.cssText;
|
|
45
|
+
return X(e);
|
|
46
46
|
})(n) : n;
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
51
|
*/
|
|
52
|
-
const { is:
|
|
53
|
-
switch (
|
|
52
|
+
const { is: t1, defineProperty: e1, getOwnPropertyDescriptor: C1, getOwnPropertyNames: o1, getOwnPropertySymbols: n1, getPrototypeOf: s1 } = Object, h = globalThis, k = h.trustedTypes, i1 = k ? k.emptyScript : "", H = h.reactiveElementPolyfillSupport, w = (n, t) => n, M = { toAttribute(n, t) {
|
|
53
|
+
switch (t) {
|
|
54
54
|
case Boolean:
|
|
55
55
|
n = n ? i1 : null;
|
|
56
56
|
break;
|
|
@@ -59,168 +59,168 @@ const { is: e1, defineProperty: t1, getOwnPropertyDescriptor: C1, getOwnProperty
|
|
|
59
59
|
n = n == null ? n : JSON.stringify(n);
|
|
60
60
|
}
|
|
61
61
|
return n;
|
|
62
|
-
}, fromAttribute(n,
|
|
63
|
-
let
|
|
64
|
-
switch (
|
|
62
|
+
}, fromAttribute(n, t) {
|
|
63
|
+
let e = n;
|
|
64
|
+
switch (t) {
|
|
65
65
|
case Boolean:
|
|
66
|
-
|
|
66
|
+
e = n !== null;
|
|
67
67
|
break;
|
|
68
68
|
case Number:
|
|
69
|
-
|
|
69
|
+
e = n === null ? null : Number(n);
|
|
70
70
|
break;
|
|
71
71
|
case Object:
|
|
72
72
|
case Array:
|
|
73
73
|
try {
|
|
74
|
-
|
|
74
|
+
e = JSON.parse(n);
|
|
75
75
|
} catch {
|
|
76
|
-
|
|
76
|
+
e = null;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
return
|
|
80
|
-
} }, S = (n,
|
|
81
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
82
|
-
class
|
|
83
|
-
static addInitializer(
|
|
84
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(
|
|
79
|
+
return e;
|
|
80
|
+
} }, S = (n, t) => !t1(n, t), A = { attribute: !0, type: String, converter: M, reflect: !1, hasChanged: S };
|
|
81
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), h.litPropertyMetadata ?? (h.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
82
|
+
class y extends HTMLElement {
|
|
83
|
+
static addInitializer(t) {
|
|
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(
|
|
90
|
-
if (
|
|
91
|
-
const C = Symbol(), o = this.getPropertyDescriptor(
|
|
92
|
-
o !== void 0 &&
|
|
89
|
+
static createProperty(t, e = A) {
|
|
90
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
91
|
+
const C = Symbol(), o = this.getPropertyDescriptor(t, C, e);
|
|
92
|
+
o !== void 0 && e1(this.prototype, t, o);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
static getPropertyDescriptor(
|
|
96
|
-
const { get: o, set: s } = C1(this.prototype,
|
|
97
|
-
return this[
|
|
95
|
+
static getPropertyDescriptor(t, e, C) {
|
|
96
|
+
const { get: o, set: s } = C1(this.prototype, t) ?? { get() {
|
|
97
|
+
return this[e];
|
|
98
98
|
}, set(i) {
|
|
99
|
-
this[
|
|
99
|
+
this[e] = i;
|
|
100
100
|
} };
|
|
101
101
|
return { get() {
|
|
102
102
|
return o == null ? void 0 : o.call(this);
|
|
103
103
|
}, set(i) {
|
|
104
104
|
const r = o == null ? void 0 : o.call(this);
|
|
105
|
-
s.call(this, i), this.requestUpdate(
|
|
105
|
+
s.call(this, i), this.requestUpdate(t, r, C);
|
|
106
106
|
}, configurable: !0, enumerable: !0 };
|
|
107
107
|
}
|
|
108
|
-
static getPropertyOptions(
|
|
109
|
-
return this.elementProperties.get(
|
|
108
|
+
static getPropertyOptions(t) {
|
|
109
|
+
return this.elementProperties.get(t) ?? A;
|
|
110
110
|
}
|
|
111
111
|
static _$Ei() {
|
|
112
|
-
if (this.hasOwnProperty(
|
|
113
|
-
const
|
|
114
|
-
|
|
112
|
+
if (this.hasOwnProperty(w("elementProperties"))) return;
|
|
113
|
+
const t = s1(this);
|
|
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(
|
|
118
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
119
|
-
const
|
|
120
|
-
for (const o of C) this.createProperty(o,
|
|
117
|
+
if (this.hasOwnProperty(w("finalized"))) return;
|
|
118
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(w("properties"))) {
|
|
119
|
+
const e = this.properties, C = [...o1(e), ...n1(e)];
|
|
120
|
+
for (const o of C) this.createProperty(o, e[o]);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
122
|
+
const t = this[Symbol.metadata];
|
|
123
|
+
if (t !== null) {
|
|
124
|
+
const e = litPropertyMetadata.get(t);
|
|
125
|
+
if (e !== void 0) for (const [C, o] of e) this.elementProperties.set(C, o);
|
|
126
126
|
}
|
|
127
127
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
128
|
-
for (const [
|
|
129
|
-
const o = this._$Eu(
|
|
130
|
-
o !== void 0 && this._$Eh.set(o,
|
|
128
|
+
for (const [e, C] of this.elementProperties) {
|
|
129
|
+
const o = this._$Eu(e, C);
|
|
130
|
+
o !== void 0 && this._$Eh.set(o, e);
|
|
131
131
|
}
|
|
132
132
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
133
133
|
}
|
|
134
|
-
static finalizeStyles(
|
|
135
|
-
const
|
|
136
|
-
if (Array.isArray(
|
|
137
|
-
const C = new Set(
|
|
138
|
-
for (const o of C)
|
|
139
|
-
} else
|
|
140
|
-
return
|
|
134
|
+
static finalizeStyles(t) {
|
|
135
|
+
const e = [];
|
|
136
|
+
if (Array.isArray(t)) {
|
|
137
|
+
const C = new Set(t.flat(1 / 0).reverse());
|
|
138
|
+
for (const o of C) e.unshift(O(o));
|
|
139
|
+
} else t !== void 0 && e.push(O(t));
|
|
140
|
+
return e;
|
|
141
141
|
}
|
|
142
|
-
static _$Eu(
|
|
143
|
-
const C =
|
|
144
|
-
return C === !1 ? void 0 : typeof C == "string" ? C : typeof
|
|
142
|
+
static _$Eu(t, e) {
|
|
143
|
+
const C = e.attribute;
|
|
144
|
+
return C === !1 ? void 0 : typeof C == "string" ? C : 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();
|
|
148
148
|
}
|
|
149
149
|
_$Ev() {
|
|
150
|
-
var e;
|
|
151
|
-
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
152
|
-
}
|
|
153
|
-
addController(e) {
|
|
154
150
|
var t;
|
|
155
|
-
|
|
151
|
+
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));
|
|
156
152
|
}
|
|
157
|
-
|
|
158
|
-
var
|
|
159
|
-
(
|
|
153
|
+
addController(t) {
|
|
154
|
+
var e;
|
|
155
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
156
|
+
}
|
|
157
|
+
removeController(t) {
|
|
158
|
+
var e;
|
|
159
|
+
(e = this._$EO) == null || e.delete(t);
|
|
160
160
|
}
|
|
161
161
|
_$E_() {
|
|
162
|
-
const
|
|
163
|
-
for (const C of
|
|
164
|
-
|
|
162
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
163
|
+
for (const C of e.keys()) this.hasOwnProperty(C) && (t.set(C, this[C]), delete this[C]);
|
|
164
|
+
t.size > 0 && (this._$Ep = t);
|
|
165
165
|
}
|
|
166
166
|
createRenderRoot() {
|
|
167
|
-
const
|
|
168
|
-
return Q(
|
|
167
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
168
|
+
return Q(t, this.constructor.elementStyles), t;
|
|
169
169
|
}
|
|
170
170
|
connectedCallback() {
|
|
171
|
-
var
|
|
172
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (
|
|
171
|
+
var t;
|
|
172
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
173
173
|
var C;
|
|
174
|
-
return (C =
|
|
174
|
+
return (C = e.hostConnected) == null ? void 0 : C.call(e);
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
enableUpdating(
|
|
177
|
+
enableUpdating(t) {
|
|
178
178
|
}
|
|
179
179
|
disconnectedCallback() {
|
|
180
|
-
var
|
|
181
|
-
(
|
|
180
|
+
var t;
|
|
181
|
+
(t = this._$EO) == null || t.forEach((e) => {
|
|
182
182
|
var C;
|
|
183
|
-
return (C =
|
|
183
|
+
return (C = e.hostDisconnected) == null ? void 0 : C.call(e);
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
attributeChangedCallback(
|
|
187
|
-
this._$AK(
|
|
186
|
+
attributeChangedCallback(t, e, C) {
|
|
187
|
+
this._$AK(t, C);
|
|
188
188
|
}
|
|
189
|
-
_$EC(
|
|
189
|
+
_$EC(t, e) {
|
|
190
190
|
var s;
|
|
191
|
-
const C = this.constructor.elementProperties.get(
|
|
191
|
+
const C = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, C);
|
|
192
192
|
if (o !== void 0 && C.reflect === !0) {
|
|
193
|
-
const i = (((s = C.converter) == null ? void 0 : s.toAttribute) !== void 0 ? C.converter :
|
|
194
|
-
this._$Em =
|
|
193
|
+
const i = (((s = C.converter) == null ? void 0 : s.toAttribute) !== void 0 ? C.converter : M).toAttribute(e, C.type);
|
|
194
|
+
this._$Em = t, i == null ? this.removeAttribute(o) : this.setAttribute(o, i), this._$Em = null;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
_$AK(
|
|
197
|
+
_$AK(t, e) {
|
|
198
198
|
var s;
|
|
199
|
-
const C = this.constructor, o = C._$Eh.get(
|
|
199
|
+
const C = this.constructor, o = C._$Eh.get(t);
|
|
200
200
|
if (o !== void 0 && this._$Em !== o) {
|
|
201
|
-
const i = C.getPropertyOptions(o), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((s = i.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? i.converter :
|
|
202
|
-
this._$Em = o, this[o] = r.fromAttribute(
|
|
201
|
+
const i = C.getPropertyOptions(o), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((s = i.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? i.converter : M;
|
|
202
|
+
this._$Em = o, this[o] = r.fromAttribute(e, i.type), this._$Em = null;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
requestUpdate(
|
|
206
|
-
if (
|
|
207
|
-
if (C ?? (C = this.constructor.getPropertyOptions(
|
|
208
|
-
this.P(
|
|
205
|
+
requestUpdate(t, e, C) {
|
|
206
|
+
if (t !== void 0) {
|
|
207
|
+
if (C ?? (C = this.constructor.getPropertyOptions(t)), !(C.hasChanged ?? S)(this[t], e)) return;
|
|
208
|
+
this.P(t, e, C);
|
|
209
209
|
}
|
|
210
210
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
211
211
|
}
|
|
212
|
-
P(
|
|
213
|
-
this._$AL.has(
|
|
212
|
+
P(t, e, C) {
|
|
213
|
+
this._$AL.has(t) || this._$AL.set(t, e), C.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;
|
|
217
217
|
try {
|
|
218
218
|
await this._$ES;
|
|
219
|
-
} catch (
|
|
220
|
-
Promise.reject(
|
|
219
|
+
} catch (e) {
|
|
220
|
+
Promise.reject(e);
|
|
221
221
|
}
|
|
222
|
-
const
|
|
223
|
-
return
|
|
222
|
+
const t = this.scheduleUpdate();
|
|
223
|
+
return t != null && await t, !this.isUpdatePending;
|
|
224
224
|
}
|
|
225
225
|
scheduleUpdate() {
|
|
226
226
|
return this.performUpdate();
|
|
@@ -236,26 +236,26 @@ class u extends HTMLElement {
|
|
|
236
236
|
const o = this.constructor.elementProperties;
|
|
237
237
|
if (o.size > 0) for (const [s, i] of o) i.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.P(s, this[s], i);
|
|
238
238
|
}
|
|
239
|
-
let
|
|
240
|
-
const
|
|
239
|
+
let t = !1;
|
|
240
|
+
const e = this._$AL;
|
|
241
241
|
try {
|
|
242
|
-
|
|
242
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (C = this._$EO) == null || C.forEach((o) => {
|
|
243
243
|
var s;
|
|
244
244
|
return (s = o.hostUpdate) == null ? void 0 : s.call(o);
|
|
245
|
-
}), this.update(
|
|
245
|
+
}), this.update(e)) : this._$EU();
|
|
246
246
|
} catch (o) {
|
|
247
|
-
throw
|
|
247
|
+
throw t = !1, this._$EU(), o;
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
t && this._$AE(e);
|
|
250
250
|
}
|
|
251
|
-
willUpdate(
|
|
251
|
+
willUpdate(t) {
|
|
252
252
|
}
|
|
253
|
-
_$AE(
|
|
254
|
-
var
|
|
255
|
-
(
|
|
253
|
+
_$AE(t) {
|
|
254
|
+
var e;
|
|
255
|
+
(e = this._$EO) == null || e.forEach((C) => {
|
|
256
256
|
var o;
|
|
257
257
|
return (o = C.hostUpdated) == null ? void 0 : o.call(C);
|
|
258
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(
|
|
258
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
259
259
|
}
|
|
260
260
|
_$EU() {
|
|
261
261
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -266,49 +266,49 @@ class u extends HTMLElement {
|
|
|
266
266
|
getUpdateComplete() {
|
|
267
267
|
return this._$ES;
|
|
268
268
|
}
|
|
269
|
-
shouldUpdate(
|
|
269
|
+
shouldUpdate(t) {
|
|
270
270
|
return !0;
|
|
271
271
|
}
|
|
272
|
-
update(
|
|
273
|
-
this._$Ej && (this._$Ej = this._$Ej.forEach((
|
|
272
|
+
update(t) {
|
|
273
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
|
|
274
274
|
}
|
|
275
|
-
updated(
|
|
275
|
+
updated(t) {
|
|
276
276
|
}
|
|
277
|
-
firstUpdated(
|
|
277
|
+
firstUpdated(t) {
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
|
|
280
|
+
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[w("elementProperties")] = /* @__PURE__ */ new Map(), y[w("finalized")] = /* @__PURE__ */ new Map(), H == null || H({ ReactiveElement: y }), (h.reactiveElementVersions ?? (h.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 r1 = { attribute: !0, type: String, converter:
|
|
287
|
-
const { kind: C, metadata: o } =
|
|
286
|
+
const r1 = { attribute: !0, type: String, converter: M, reflect: !1, hasChanged: S }, l1 = (n = r1, t, e) => {
|
|
287
|
+
const { kind: C, metadata: o } = e;
|
|
288
288
|
let s = globalThis.litPropertyMetadata.get(o);
|
|
289
|
-
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(
|
|
290
|
-
const { name: i } =
|
|
289
|
+
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(e.name, n), C === "accessor") {
|
|
290
|
+
const { name: i } = e;
|
|
291
291
|
return { set(r) {
|
|
292
|
-
const l =
|
|
293
|
-
|
|
292
|
+
const l = t.get.call(this);
|
|
293
|
+
t.set.call(this, r), this.requestUpdate(i, l, n);
|
|
294
294
|
}, init(r) {
|
|
295
295
|
return r !== void 0 && this.P(i, void 0, n), r;
|
|
296
296
|
} };
|
|
297
297
|
}
|
|
298
298
|
if (C === "setter") {
|
|
299
|
-
const { name: i } =
|
|
299
|
+
const { name: i } = e;
|
|
300
300
|
return function(r) {
|
|
301
301
|
const l = this[i];
|
|
302
|
-
|
|
302
|
+
t.call(this, r), this.requestUpdate(i, l, n);
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
throw Error("Unsupported decorator location: " + C);
|
|
306
306
|
};
|
|
307
|
-
function
|
|
308
|
-
return (
|
|
307
|
+
function Z(n) {
|
|
308
|
+
return (t, e) => typeof e == "object" ? l1(n, t, e) : ((C, o, s) => {
|
|
309
309
|
const i = o.hasOwnProperty(s);
|
|
310
310
|
return o.constructor.createProperty(s, i ? { ...C, wrapped: !0 } : C), i ? Object.getOwnPropertyDescriptor(o, s) : void 0;
|
|
311
|
-
})(n,
|
|
311
|
+
})(n, t, e);
|
|
312
312
|
}
|
|
313
313
|
/**
|
|
314
314
|
* @license
|
|
@@ -316,15 +316,19 @@ function b(n) {
|
|
|
316
316
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
317
317
|
*/
|
|
318
318
|
function J(n) {
|
|
319
|
-
return
|
|
319
|
+
return Z({ ...n, state: !0, attribute: !1 });
|
|
320
320
|
}
|
|
321
321
|
const a1 = D`
|
|
322
322
|
:host {
|
|
323
323
|
/* Global Header Styles */
|
|
324
|
-
--_nys-globalheader-color: var(
|
|
325
|
-
--nys-color-
|
|
324
|
+
--_nys-globalheader-text-color: var(
|
|
325
|
+
--nys-color-text-reverse,
|
|
326
326
|
var(--nys-color-white, #ffffff)
|
|
327
327
|
);
|
|
328
|
+
--_nys-globalheader-link-color: var(
|
|
329
|
+
--nys-color-link-reverse-neutral,
|
|
330
|
+
var(--nys-color-white, #fff)
|
|
331
|
+
);
|
|
328
332
|
--_nys-globalheader-background: var(
|
|
329
333
|
--nys-color-theme,
|
|
330
334
|
var(--nys-color-state-blue-700, #154973)
|
|
@@ -372,25 +376,13 @@ const a1 = D`
|
|
|
372
376
|
/* Menu Content Styling */
|
|
373
377
|
--_nys-globalfooter-link-gap-spacing-row: var(--nys-space-300, 24px);
|
|
374
378
|
--_nys-globalfooter-link-gap-spacing-column: var(--nys-space-400, 32px);
|
|
375
|
-
--_nys-globalheader-lineheight
|
|
376
|
-
--nys-font-lineheight-ui-md,
|
|
377
|
-
24px
|
|
378
|
-
);
|
|
379
|
+
--_nys-globalheader-link-lineheight: var(--nys-font-lineheight-ui-md, 24px);
|
|
379
380
|
--_nys-globalheader-link-letterspacing: var(
|
|
380
381
|
--nys-font-letterspacing-ui-md,
|
|
381
382
|
var(--nys-font-letterspacing-400, 0.044px)
|
|
382
383
|
);
|
|
383
|
-
--_nys-globalheader-
|
|
384
|
-
|
|
385
|
-
var(
|
|
386
|
-
--nys-font-family-sans,
|
|
387
|
-
"Proxima Nova",
|
|
388
|
-
"Helvetica Neue",
|
|
389
|
-
"Helvetica",
|
|
390
|
-
"Arial",
|
|
391
|
-
sans-serif
|
|
392
|
-
)
|
|
393
|
-
);
|
|
384
|
+
--_nys-globalheader-link-weight-decoration: var(--nys-size-2px, 2px);
|
|
385
|
+
|
|
394
386
|
/* Mobile Menu */
|
|
395
387
|
--_nys-globalheader-mobile-btn-font-size: var(--nys-type-size-ui-xs, 12px);
|
|
396
388
|
--_nys-globalheader-mobile-btn-lineheight: var(
|
|
@@ -428,13 +420,13 @@ const a1 = D`
|
|
|
428
420
|
}
|
|
429
421
|
|
|
430
422
|
a {
|
|
431
|
-
color: var(--_nys-globalheader-color);
|
|
423
|
+
color: var(--_nys-globalheader-link-color);
|
|
432
424
|
text-decoration: none;
|
|
433
425
|
font-family: var(--_nys-globalheader-font-family);
|
|
434
426
|
font-size: var(--_nys-globalheader-font-size-links);
|
|
435
427
|
font-style: normal;
|
|
436
428
|
font-weight: 400;
|
|
437
|
-
line-height: var(--_nys-globalheader-lineheight
|
|
429
|
+
line-height: var(--_nys-globalheader-link-lineheight);
|
|
438
430
|
letter-spacing: var(--_nys-globalheader-link-letterspacing);
|
|
439
431
|
}
|
|
440
432
|
|
|
@@ -443,7 +435,7 @@ const a1 = D`
|
|
|
443
435
|
justify-content: center;
|
|
444
436
|
padding: var(--_nys-globalheader-padding) var(--_nys-globalheader-gutter);
|
|
445
437
|
background-color: var(--_nys-globalheader-background);
|
|
446
|
-
color: var(--_nys-globalheader-color);
|
|
438
|
+
color: var(--_nys-globalheader-text-color);
|
|
447
439
|
width: 100%;
|
|
448
440
|
box-sizing: border-box;
|
|
449
441
|
}
|
|
@@ -466,7 +458,7 @@ const a1 = D`
|
|
|
466
458
|
}
|
|
467
459
|
.nys-globalheader__name {
|
|
468
460
|
margin: 0;
|
|
469
|
-
color: var(--_nys-globalheader-color);
|
|
461
|
+
color: var(--_nys-globalheader-text-color);
|
|
470
462
|
font-family: var(--_nys-globalheader-font-family-agency);
|
|
471
463
|
font-size: var(--_nys-globalheader-font-size-main-name);
|
|
472
464
|
font-style: normal;
|
|
@@ -507,6 +499,10 @@ const a1 = D`
|
|
|
507
499
|
text-underline-position: from-font;
|
|
508
500
|
}
|
|
509
501
|
|
|
502
|
+
.nys-globalheader__content ul a:active {
|
|
503
|
+
text-decoration-thickness: var(--_nys-globalheader-link-weight-decoration);
|
|
504
|
+
}
|
|
505
|
+
|
|
510
506
|
/* Mobile Menu */
|
|
511
507
|
.nys-globalheader__content-mobile {
|
|
512
508
|
position: absolute;
|
|
@@ -525,7 +521,7 @@ const a1 = D`
|
|
|
525
521
|
flex-direction: column;
|
|
526
522
|
}
|
|
527
523
|
.nys-globalheader__content-mobile ul li:first-child a {
|
|
528
|
-
border-top: 1px solid var(--_nys-globalheader-color);
|
|
524
|
+
border-top: 1px solid var(--_nys-globalheader-text-color);
|
|
529
525
|
}
|
|
530
526
|
.nys-globalheader__content-mobile ul li a {
|
|
531
527
|
display: flex;
|
|
@@ -567,7 +563,7 @@ const a1 = D`
|
|
|
567
563
|
justify-content: center;
|
|
568
564
|
align-items: center;
|
|
569
565
|
padding: 0;
|
|
570
|
-
color: var(--_nys-globalheader-color);
|
|
566
|
+
color: var(--_nys-globalheader-text-color);
|
|
571
567
|
}
|
|
572
568
|
.nys-globalheader__mobile-menu-button-text {
|
|
573
569
|
font-size: var(--_nys-globalheader-mobile-btn-font-size);
|
|
@@ -608,7 +604,7 @@ const a1 = D`
|
|
|
608
604
|
* ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
|
|
609
605
|
* ▒█░░▀█ ░░▒█░░ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄█
|
|
610
606
|
*
|
|
611
|
-
* Icon Component v1.
|
|
607
|
+
* Icon Component v1.1.1
|
|
612
608
|
* Part of the New York State Design System
|
|
613
609
|
* Repository: https://github.com/its-hcd/nysds
|
|
614
610
|
* License: MIT
|
|
@@ -618,18 +614,18 @@ const a1 = D`
|
|
|
618
614
|
* Copyright 2019 Google LLC
|
|
619
615
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
620
616
|
*/
|
|
621
|
-
const
|
|
617
|
+
const L = globalThis, E = L.ShadowRoot && (L.ShadyCSS === void 0 || L.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = Symbol(), B = /* @__PURE__ */ new WeakMap();
|
|
622
618
|
let h1 = class {
|
|
623
|
-
constructor(n,
|
|
624
|
-
if (this._$cssResult$ = !0,
|
|
625
|
-
this.cssText = n, this.t =
|
|
619
|
+
constructor(n, t, e) {
|
|
620
|
+
if (this._$cssResult$ = !0, e !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
621
|
+
this.cssText = n, this.t = t;
|
|
626
622
|
}
|
|
627
623
|
get styleSheet() {
|
|
628
624
|
let n = this.o;
|
|
629
|
-
const
|
|
625
|
+
const t = this.t;
|
|
630
626
|
if (E && n === void 0) {
|
|
631
|
-
const
|
|
632
|
-
|
|
627
|
+
const e = t !== void 0 && t.length === 1;
|
|
628
|
+
e && (n = B.get(t)), n === void 0 && ((this.o = n = new CSSStyleSheet()).replaceSync(this.cssText), e && B.set(t, n));
|
|
633
629
|
}
|
|
634
630
|
return n;
|
|
635
631
|
}
|
|
@@ -637,24 +633,24 @@ let h1 = class {
|
|
|
637
633
|
return this.cssText;
|
|
638
634
|
}
|
|
639
635
|
};
|
|
640
|
-
const c1 = (n) => new h1(typeof n == "string" ? n : n + "", void 0, K), d1 = (n,
|
|
641
|
-
if (E) n.adoptedStyleSheets =
|
|
642
|
-
else for (const
|
|
643
|
-
const C = document.createElement("style"), o =
|
|
644
|
-
o !== void 0 && C.setAttribute("nonce", o), C.textContent =
|
|
645
|
-
}
|
|
646
|
-
}, N = E ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((
|
|
647
|
-
let
|
|
648
|
-
for (const C of
|
|
649
|
-
return c1(
|
|
636
|
+
const c1 = (n) => new h1(typeof n == "string" ? n : n + "", void 0, K), d1 = (n, t) => {
|
|
637
|
+
if (E) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
638
|
+
else for (const e of t) {
|
|
639
|
+
const C = document.createElement("style"), o = L.litNonce;
|
|
640
|
+
o !== void 0 && C.setAttribute("nonce", o), C.textContent = e.cssText, n.appendChild(C);
|
|
641
|
+
}
|
|
642
|
+
}, N = E ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
643
|
+
let e = "";
|
|
644
|
+
for (const C of t.cssRules) e += C.cssText;
|
|
645
|
+
return c1(e);
|
|
650
646
|
})(n) : n;
|
|
651
647
|
/**
|
|
652
648
|
* @license
|
|
653
649
|
* Copyright 2017 Google LLC
|
|
654
650
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
655
651
|
*/
|
|
656
|
-
const { is: g1, defineProperty: p1, getOwnPropertyDescriptor: v1, getOwnPropertyNames: y1, getOwnPropertySymbols: u1, getPrototypeOf: f1 } = Object, g = globalThis, R = g.trustedTypes, w1 = R ? R.emptyScript : "", T = g.reactiveElementPolyfillSupport,
|
|
657
|
-
switch (
|
|
652
|
+
const { is: g1, defineProperty: p1, getOwnPropertyDescriptor: v1, getOwnPropertyNames: y1, getOwnPropertySymbols: u1, getPrototypeOf: f1 } = Object, g = globalThis, R = g.trustedTypes, w1 = R ? R.emptyScript : "", T = g.reactiveElementPolyfillSupport, m = (n, t) => n, x = { toAttribute(n, t) {
|
|
653
|
+
switch (t) {
|
|
658
654
|
case Boolean:
|
|
659
655
|
n = n ? w1 : null;
|
|
660
656
|
break;
|
|
@@ -663,174 +659,174 @@ const { is: g1, defineProperty: p1, getOwnPropertyDescriptor: v1, getOwnProperty
|
|
|
663
659
|
n = n == null ? n : JSON.stringify(n);
|
|
664
660
|
}
|
|
665
661
|
return n;
|
|
666
|
-
}, fromAttribute(n,
|
|
667
|
-
let
|
|
668
|
-
switch (
|
|
662
|
+
}, fromAttribute(n, t) {
|
|
663
|
+
let e = n;
|
|
664
|
+
switch (t) {
|
|
669
665
|
case Boolean:
|
|
670
|
-
|
|
666
|
+
e = n !== null;
|
|
671
667
|
break;
|
|
672
668
|
case Number:
|
|
673
|
-
|
|
669
|
+
e = n === null ? null : Number(n);
|
|
674
670
|
break;
|
|
675
671
|
case Object:
|
|
676
672
|
case Array:
|
|
677
673
|
try {
|
|
678
|
-
|
|
674
|
+
e = JSON.parse(n);
|
|
679
675
|
} catch {
|
|
680
|
-
|
|
676
|
+
e = null;
|
|
681
677
|
}
|
|
682
678
|
}
|
|
683
|
-
return
|
|
684
|
-
} }, V = (n,
|
|
679
|
+
return e;
|
|
680
|
+
} }, V = (n, t) => !g1(n, t), j = { attribute: !0, type: String, converter: x, reflect: !1, hasChanged: V };
|
|
685
681
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), g.litPropertyMetadata ?? (g.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
686
|
-
class
|
|
687
|
-
static addInitializer(
|
|
688
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(
|
|
682
|
+
class u extends HTMLElement {
|
|
683
|
+
static addInitializer(t) {
|
|
684
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
689
685
|
}
|
|
690
686
|
static get observedAttributes() {
|
|
691
687
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
692
688
|
}
|
|
693
|
-
static createProperty(
|
|
694
|
-
if (
|
|
695
|
-
const C = Symbol(), o = this.getPropertyDescriptor(
|
|
696
|
-
o !== void 0 && p1(this.prototype,
|
|
689
|
+
static createProperty(t, e = j) {
|
|
690
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
691
|
+
const C = Symbol(), o = this.getPropertyDescriptor(t, C, e);
|
|
692
|
+
o !== void 0 && p1(this.prototype, t, o);
|
|
697
693
|
}
|
|
698
694
|
}
|
|
699
|
-
static getPropertyDescriptor(
|
|
700
|
-
const { get: o, set: s } = v1(this.prototype,
|
|
701
|
-
return this[
|
|
695
|
+
static getPropertyDescriptor(t, e, C) {
|
|
696
|
+
const { get: o, set: s } = v1(this.prototype, t) ?? { get() {
|
|
697
|
+
return this[e];
|
|
702
698
|
}, set(i) {
|
|
703
|
-
this[
|
|
699
|
+
this[e] = i;
|
|
704
700
|
} };
|
|
705
701
|
return { get() {
|
|
706
702
|
return o == null ? void 0 : o.call(this);
|
|
707
703
|
}, set(i) {
|
|
708
704
|
const r = o == null ? void 0 : o.call(this);
|
|
709
|
-
s.call(this, i), this.requestUpdate(
|
|
705
|
+
s.call(this, i), this.requestUpdate(t, r, C);
|
|
710
706
|
}, configurable: !0, enumerable: !0 };
|
|
711
707
|
}
|
|
712
|
-
static getPropertyOptions(
|
|
713
|
-
return this.elementProperties.get(
|
|
708
|
+
static getPropertyOptions(t) {
|
|
709
|
+
return this.elementProperties.get(t) ?? j;
|
|
714
710
|
}
|
|
715
711
|
static _$Ei() {
|
|
716
|
-
if (this.hasOwnProperty(
|
|
717
|
-
const
|
|
718
|
-
|
|
712
|
+
if (this.hasOwnProperty(m("elementProperties"))) return;
|
|
713
|
+
const t = f1(this);
|
|
714
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
719
715
|
}
|
|
720
716
|
static finalize() {
|
|
721
|
-
if (this.hasOwnProperty(
|
|
722
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
723
|
-
const
|
|
724
|
-
for (const o of C) this.createProperty(o,
|
|
717
|
+
if (this.hasOwnProperty(m("finalized"))) return;
|
|
718
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(m("properties"))) {
|
|
719
|
+
const e = this.properties, C = [...y1(e), ...u1(e)];
|
|
720
|
+
for (const o of C) this.createProperty(o, e[o]);
|
|
725
721
|
}
|
|
726
|
-
const
|
|
727
|
-
if (
|
|
728
|
-
const
|
|
729
|
-
if (
|
|
722
|
+
const t = this[Symbol.metadata];
|
|
723
|
+
if (t !== null) {
|
|
724
|
+
const e = litPropertyMetadata.get(t);
|
|
725
|
+
if (e !== void 0) for (const [C, o] of e) this.elementProperties.set(C, o);
|
|
730
726
|
}
|
|
731
727
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
732
|
-
for (const [
|
|
733
|
-
const o = this._$Eu(
|
|
734
|
-
o !== void 0 && this._$Eh.set(o,
|
|
728
|
+
for (const [e, C] of this.elementProperties) {
|
|
729
|
+
const o = this._$Eu(e, C);
|
|
730
|
+
o !== void 0 && this._$Eh.set(o, e);
|
|
735
731
|
}
|
|
736
732
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
737
733
|
}
|
|
738
|
-
static finalizeStyles(
|
|
739
|
-
const
|
|
740
|
-
if (Array.isArray(
|
|
741
|
-
const C = new Set(
|
|
742
|
-
for (const o of C)
|
|
743
|
-
} else
|
|
744
|
-
return
|
|
734
|
+
static finalizeStyles(t) {
|
|
735
|
+
const e = [];
|
|
736
|
+
if (Array.isArray(t)) {
|
|
737
|
+
const C = new Set(t.flat(1 / 0).reverse());
|
|
738
|
+
for (const o of C) e.unshift(N(o));
|
|
739
|
+
} else t !== void 0 && e.push(N(t));
|
|
740
|
+
return e;
|
|
745
741
|
}
|
|
746
|
-
static _$Eu(
|
|
747
|
-
const C =
|
|
748
|
-
return C === !1 ? void 0 : typeof C == "string" ? C : typeof
|
|
742
|
+
static _$Eu(t, e) {
|
|
743
|
+
const C = e.attribute;
|
|
744
|
+
return C === !1 ? void 0 : typeof C == "string" ? C : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
749
745
|
}
|
|
750
746
|
constructor() {
|
|
751
747
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
752
748
|
}
|
|
753
749
|
_$Ev() {
|
|
754
|
-
var e;
|
|
755
|
-
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
756
|
-
}
|
|
757
|
-
addController(e) {
|
|
758
750
|
var t;
|
|
759
|
-
|
|
751
|
+
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));
|
|
760
752
|
}
|
|
761
|
-
|
|
762
|
-
var
|
|
763
|
-
(
|
|
753
|
+
addController(t) {
|
|
754
|
+
var e;
|
|
755
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
756
|
+
}
|
|
757
|
+
removeController(t) {
|
|
758
|
+
var e;
|
|
759
|
+
(e = this._$EO) == null || e.delete(t);
|
|
764
760
|
}
|
|
765
761
|
_$E_() {
|
|
766
|
-
const
|
|
767
|
-
for (const C of
|
|
768
|
-
|
|
762
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
763
|
+
for (const C of e.keys()) this.hasOwnProperty(C) && (t.set(C, this[C]), delete this[C]);
|
|
764
|
+
t.size > 0 && (this._$Ep = t);
|
|
769
765
|
}
|
|
770
766
|
createRenderRoot() {
|
|
771
|
-
const
|
|
772
|
-
return d1(
|
|
767
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
768
|
+
return d1(t, this.constructor.elementStyles), t;
|
|
773
769
|
}
|
|
774
770
|
connectedCallback() {
|
|
775
|
-
var
|
|
776
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (
|
|
771
|
+
var t;
|
|
772
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
777
773
|
var C;
|
|
778
|
-
return (C =
|
|
774
|
+
return (C = e.hostConnected) == null ? void 0 : C.call(e);
|
|
779
775
|
});
|
|
780
776
|
}
|
|
781
|
-
enableUpdating(
|
|
777
|
+
enableUpdating(t) {
|
|
782
778
|
}
|
|
783
779
|
disconnectedCallback() {
|
|
784
|
-
var
|
|
785
|
-
(
|
|
780
|
+
var t;
|
|
781
|
+
(t = this._$EO) == null || t.forEach((e) => {
|
|
786
782
|
var C;
|
|
787
|
-
return (C =
|
|
783
|
+
return (C = e.hostDisconnected) == null ? void 0 : C.call(e);
|
|
788
784
|
});
|
|
789
785
|
}
|
|
790
|
-
attributeChangedCallback(
|
|
791
|
-
this._$AK(
|
|
786
|
+
attributeChangedCallback(t, e, C) {
|
|
787
|
+
this._$AK(t, C);
|
|
792
788
|
}
|
|
793
|
-
_$EC(
|
|
789
|
+
_$EC(t, e) {
|
|
794
790
|
var C;
|
|
795
|
-
const o = this.constructor.elementProperties.get(
|
|
791
|
+
const o = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, o);
|
|
796
792
|
if (s !== void 0 && o.reflect === !0) {
|
|
797
|
-
const i = (((C = o.converter) == null ? void 0 : C.toAttribute) !== void 0 ? o.converter :
|
|
798
|
-
this._$Em =
|
|
793
|
+
const i = (((C = o.converter) == null ? void 0 : C.toAttribute) !== void 0 ? o.converter : x).toAttribute(e, o.type);
|
|
794
|
+
this._$Em = t, i == null ? this.removeAttribute(s) : this.setAttribute(s, i), this._$Em = null;
|
|
799
795
|
}
|
|
800
796
|
}
|
|
801
|
-
_$AK(
|
|
797
|
+
_$AK(t, e) {
|
|
802
798
|
var C;
|
|
803
|
-
const o = this.constructor, s = o._$Eh.get(
|
|
799
|
+
const o = this.constructor, s = o._$Eh.get(t);
|
|
804
800
|
if (s !== void 0 && this._$Em !== s) {
|
|
805
|
-
const i = o.getPropertyOptions(s), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((C = i.converter) == null ? void 0 : C.fromAttribute) !== void 0 ? i.converter :
|
|
806
|
-
this._$Em = s, this[s] = r.fromAttribute(
|
|
801
|
+
const i = o.getPropertyOptions(s), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((C = i.converter) == null ? void 0 : C.fromAttribute) !== void 0 ? i.converter : x;
|
|
802
|
+
this._$Em = s, this[s] = r.fromAttribute(e, i.type), this._$Em = null;
|
|
807
803
|
}
|
|
808
804
|
}
|
|
809
|
-
requestUpdate(
|
|
810
|
-
if (
|
|
811
|
-
if (C ?? (C = this.constructor.getPropertyOptions(
|
|
812
|
-
this.P(
|
|
805
|
+
requestUpdate(t, e, C) {
|
|
806
|
+
if (t !== void 0) {
|
|
807
|
+
if (C ?? (C = this.constructor.getPropertyOptions(t)), !(C.hasChanged ?? V)(this[t], e)) return;
|
|
808
|
+
this.P(t, e, C);
|
|
813
809
|
}
|
|
814
810
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
815
811
|
}
|
|
816
|
-
P(
|
|
817
|
-
this._$AL.has(
|
|
812
|
+
P(t, e, C) {
|
|
813
|
+
this._$AL.has(t) || this._$AL.set(t, e), C.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
818
814
|
}
|
|
819
815
|
async _$ET() {
|
|
820
816
|
this.isUpdatePending = !0;
|
|
821
817
|
try {
|
|
822
818
|
await this._$ES;
|
|
823
|
-
} catch (
|
|
824
|
-
Promise.reject(
|
|
819
|
+
} catch (e) {
|
|
820
|
+
Promise.reject(e);
|
|
825
821
|
}
|
|
826
|
-
const
|
|
827
|
-
return
|
|
822
|
+
const t = this.scheduleUpdate();
|
|
823
|
+
return t != null && await t, !this.isUpdatePending;
|
|
828
824
|
}
|
|
829
825
|
scheduleUpdate() {
|
|
830
826
|
return this.performUpdate();
|
|
831
827
|
}
|
|
832
828
|
performUpdate() {
|
|
833
|
-
var
|
|
829
|
+
var t;
|
|
834
830
|
if (!this.isUpdatePending) return;
|
|
835
831
|
if (!this.hasUpdated) {
|
|
836
832
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
@@ -840,26 +836,26 @@ class f extends HTMLElement {
|
|
|
840
836
|
const o = this.constructor.elementProperties;
|
|
841
837
|
if (o.size > 0) for (const [s, i] of o) i.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.P(s, this[s], i);
|
|
842
838
|
}
|
|
843
|
-
let
|
|
839
|
+
let e = !1;
|
|
844
840
|
const C = this._$AL;
|
|
845
841
|
try {
|
|
846
|
-
|
|
842
|
+
e = this.shouldUpdate(C), e ? (this.willUpdate(C), (t = this._$EO) == null || t.forEach((o) => {
|
|
847
843
|
var s;
|
|
848
844
|
return (s = o.hostUpdate) == null ? void 0 : s.call(o);
|
|
849
845
|
}), this.update(C)) : this._$EU();
|
|
850
846
|
} catch (o) {
|
|
851
|
-
throw
|
|
847
|
+
throw e = !1, this._$EU(), o;
|
|
852
848
|
}
|
|
853
|
-
|
|
849
|
+
e && this._$AE(C);
|
|
854
850
|
}
|
|
855
|
-
willUpdate(
|
|
851
|
+
willUpdate(t) {
|
|
856
852
|
}
|
|
857
|
-
_$AE(
|
|
858
|
-
var
|
|
859
|
-
(
|
|
853
|
+
_$AE(t) {
|
|
854
|
+
var e;
|
|
855
|
+
(e = this._$EO) == null || e.forEach((C) => {
|
|
860
856
|
var o;
|
|
861
857
|
return (o = C.hostUpdated) == null ? void 0 : o.call(C);
|
|
862
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(
|
|
858
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
863
859
|
}
|
|
864
860
|
_$EU() {
|
|
865
861
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -870,49 +866,49 @@ class f extends HTMLElement {
|
|
|
870
866
|
getUpdateComplete() {
|
|
871
867
|
return this._$ES;
|
|
872
868
|
}
|
|
873
|
-
shouldUpdate(
|
|
869
|
+
shouldUpdate(t) {
|
|
874
870
|
return !0;
|
|
875
871
|
}
|
|
876
|
-
update(
|
|
877
|
-
this._$Ej && (this._$Ej = this._$Ej.forEach((
|
|
872
|
+
update(t) {
|
|
873
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
|
|
878
874
|
}
|
|
879
|
-
updated(
|
|
875
|
+
updated(t) {
|
|
880
876
|
}
|
|
881
|
-
firstUpdated(
|
|
877
|
+
firstUpdated(t) {
|
|
882
878
|
}
|
|
883
879
|
}
|
|
884
|
-
|
|
880
|
+
u.elementStyles = [], u.shadowRootOptions = { mode: "open" }, u[m("elementProperties")] = /* @__PURE__ */ new Map(), u[m("finalized")] = /* @__PURE__ */ new Map(), T == null || T({ ReactiveElement: u }), (g.reactiveElementVersions ?? (g.reactiveElementVersions = [])).push("2.0.4");
|
|
885
881
|
/**
|
|
886
882
|
* @license
|
|
887
883
|
* Copyright 2017 Google LLC
|
|
888
884
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
889
885
|
*/
|
|
890
|
-
const m1 = { attribute: !0, type: String, converter:
|
|
891
|
-
const { kind: C, metadata: o } =
|
|
886
|
+
const m1 = { attribute: !0, type: String, converter: x, reflect: !1, hasChanged: V }, _1 = (n = m1, t, e) => {
|
|
887
|
+
const { kind: C, metadata: o } = e;
|
|
892
888
|
let s = globalThis.litPropertyMetadata.get(o);
|
|
893
|
-
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(
|
|
894
|
-
const { name: i } =
|
|
889
|
+
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(e.name, n), C === "accessor") {
|
|
890
|
+
const { name: i } = e;
|
|
895
891
|
return { set(r) {
|
|
896
|
-
const l =
|
|
897
|
-
|
|
892
|
+
const l = t.get.call(this);
|
|
893
|
+
t.set.call(this, r), this.requestUpdate(i, l, n);
|
|
898
894
|
}, init(r) {
|
|
899
895
|
return r !== void 0 && this.P(i, void 0, n), r;
|
|
900
896
|
} };
|
|
901
897
|
}
|
|
902
898
|
if (C === "setter") {
|
|
903
|
-
const { name: i } =
|
|
899
|
+
const { name: i } = e;
|
|
904
900
|
return function(r) {
|
|
905
901
|
const l = this[i];
|
|
906
|
-
|
|
902
|
+
t.call(this, r), this.requestUpdate(i, l, n);
|
|
907
903
|
};
|
|
908
904
|
}
|
|
909
905
|
throw Error("Unsupported decorator location: " + C);
|
|
910
906
|
};
|
|
911
907
|
function p(n) {
|
|
912
|
-
return (
|
|
908
|
+
return (t, e) => typeof e == "object" ? _1(n, t, e) : ((C, o, s) => {
|
|
913
909
|
const i = o.hasOwnProperty(s);
|
|
914
910
|
return o.constructor.createProperty(s, i ? { ...C, wrapped: !0 } : C), i ? Object.getOwnPropertyDescriptor(o, s) : void 0;
|
|
915
|
-
})(n,
|
|
911
|
+
})(n, t, e);
|
|
916
912
|
}
|
|
917
913
|
const b1 = {
|
|
918
914
|
// --------- UX Team Main Library (below) --------- //
|
|
@@ -1210,12 +1206,12 @@ const b1 = {
|
|
|
1210
1206
|
transform: scale(-1, -1);
|
|
1211
1207
|
}
|
|
1212
1208
|
`;
|
|
1213
|
-
var M1 = Object.defineProperty, x1 = Object.getOwnPropertyDescriptor, v = (n,
|
|
1214
|
-
for (var o = C > 1 ? void 0 : C ? x1(
|
|
1215
|
-
(i = n[s]) && (o = (C ? i(
|
|
1216
|
-
return C && o && M1(
|
|
1217
|
-
},
|
|
1218
|
-
const d = (
|
|
1209
|
+
var M1 = Object.defineProperty, x1 = Object.getOwnPropertyDescriptor, v = (n, t, e, C) => {
|
|
1210
|
+
for (var o = C > 1 ? void 0 : C ? x1(t, e) : t, s = n.length - 1, i; s >= 0; s--)
|
|
1211
|
+
(i = n[s]) && (o = (C ? i(t, e, o) : i(o)) || o);
|
|
1212
|
+
return C && o && M1(t, e, o), o;
|
|
1213
|
+
}, f;
|
|
1214
|
+
const d = (f = class extends q {
|
|
1219
1215
|
constructor() {
|
|
1220
1216
|
super(...arguments), this.name = "", this.label = "", this.rotate = "0", this.flip = "", this.color = "", this._size = "sm";
|
|
1221
1217
|
}
|
|
@@ -1223,21 +1219,21 @@ const d = (w = class extends q {
|
|
|
1223
1219
|
return this._size;
|
|
1224
1220
|
}
|
|
1225
1221
|
set size(n) {
|
|
1226
|
-
this._size =
|
|
1222
|
+
this._size = f.VALID_TYPES.includes(
|
|
1227
1223
|
n
|
|
1228
1224
|
) ? n : "sm";
|
|
1229
1225
|
}
|
|
1230
1226
|
getIcon() {
|
|
1231
|
-
const n = b1[this.name],
|
|
1227
|
+
const n = b1[this.name], t = !!this.label;
|
|
1232
1228
|
if (!n) return null;
|
|
1233
|
-
const
|
|
1234
|
-
return
|
|
1229
|
+
const e = new DOMParser().parseFromString(n, "image/svg+xml").documentElement;
|
|
1230
|
+
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;
|
|
1235
1231
|
}
|
|
1236
1232
|
render() {
|
|
1237
1233
|
const n = this.getIcon();
|
|
1238
1234
|
return n ? a`${n}` : null;
|
|
1239
1235
|
}
|
|
1240
|
-
},
|
|
1236
|
+
}, f.styles = L1, f.VALID_TYPES = [
|
|
1241
1237
|
"2xs",
|
|
1242
1238
|
"xs",
|
|
1243
1239
|
"sm",
|
|
@@ -1253,9 +1249,9 @@ const d = (w = class extends q {
|
|
|
1253
1249
|
"32",
|
|
1254
1250
|
"48",
|
|
1255
1251
|
"64"
|
|
1256
|
-
],
|
|
1252
|
+
], f);
|
|
1257
1253
|
v([
|
|
1258
|
-
p({ type: String })
|
|
1254
|
+
p({ type: String, reflect: !0 })
|
|
1259
1255
|
], d.prototype, "name", 2);
|
|
1260
1256
|
v([
|
|
1261
1257
|
p({ type: String })
|
|
@@ -1274,35 +1270,35 @@ v([
|
|
|
1274
1270
|
], d.prototype, "size", 1);
|
|
1275
1271
|
let Z1 = d;
|
|
1276
1272
|
customElements.get("nys-icon") || customElements.define("nys-icon", Z1);
|
|
1277
|
-
var H1 = Object.defineProperty,
|
|
1273
|
+
var H1 = Object.defineProperty, _ = (n, t, e, C) => {
|
|
1278
1274
|
for (var o = void 0, s = n.length - 1, i; s >= 0; s--)
|
|
1279
|
-
(i = n[s]) && (o = i(
|
|
1280
|
-
return o && H1(
|
|
1275
|
+
(i = n[s]) && (o = i(t, e, o) || o);
|
|
1276
|
+
return o && H1(t, e, o), o;
|
|
1281
1277
|
};
|
|
1282
1278
|
const P = class P extends q {
|
|
1283
1279
|
constructor() {
|
|
1284
|
-
super(...arguments), this.appName = "", this.agencyName = "", this.homepageLink =
|
|
1280
|
+
super(...arguments), this.appName = "", this.agencyName = "", this.homepageLink = "", this.slotHasContent = !0, this.isMobileMenuOpen = !1;
|
|
1285
1281
|
}
|
|
1286
1282
|
/**************** Lifecycle Methods ****************/
|
|
1287
1283
|
firstUpdated() {
|
|
1288
|
-
var
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1284
|
+
var e;
|
|
1285
|
+
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
1286
|
+
t == null || t.addEventListener("slotchange", () => this._handleSlotChange()), this._handleSlotChange();
|
|
1291
1287
|
}
|
|
1292
1288
|
/******************** Functions ********************/
|
|
1293
1289
|
// Gets called when the slot content changes and directly appends the slotted elements into the shadow DOM
|
|
1294
1290
|
_handleSlotChange() {
|
|
1295
1291
|
var s, i, r;
|
|
1296
|
-
const
|
|
1297
|
-
if (!
|
|
1298
|
-
const
|
|
1299
|
-
this.slotHasContent =
|
|
1292
|
+
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
|
|
1293
|
+
if (!t) return;
|
|
1294
|
+
const e = t == null ? void 0 : t.assignedNodes({ flatten: !0 }).filter((l) => l.nodeType === Node.ELEMENT_NODE);
|
|
1295
|
+
this.slotHasContent = e.length > 0;
|
|
1300
1296
|
const C = (i = this.shadowRoot) == null ? void 0 : i.querySelector(
|
|
1301
1297
|
".nys-globalheader__content"
|
|
1302
1298
|
), o = (r = this.shadowRoot) == null ? void 0 : r.querySelector(
|
|
1303
1299
|
".nys-globalheader__content-mobile"
|
|
1304
1300
|
);
|
|
1305
|
-
C && o && (C.innerHTML = "", o.innerHTML = "",
|
|
1301
|
+
C && o && (C.innerHTML = "", o.innerHTML = "", e.forEach((l) => {
|
|
1306
1302
|
if (l.nodeType === Node.ELEMENT_NODE) {
|
|
1307
1303
|
const z = l.cloneNode(!0), W = l.cloneNode(!0);
|
|
1308
1304
|
["script", "iframe", "object", "embed"].forEach((Y) => {
|
|
@@ -1315,7 +1311,7 @@ const P = class P extends q {
|
|
|
1315
1311
|
this.isMobileMenuOpen = !this.isMobileMenuOpen;
|
|
1316
1312
|
}
|
|
1317
1313
|
render() {
|
|
1318
|
-
var
|
|
1314
|
+
var t, e, C, o, s, i, r, l;
|
|
1319
1315
|
return a`
|
|
1320
1316
|
<header class="nys-globalheader">
|
|
1321
1317
|
<div class="nys-globalheader__main-container">
|
|
@@ -1334,36 +1330,36 @@ const P = class P extends q {
|
|
|
1334
1330
|
>
|
|
1335
1331
|
</button>
|
|
1336
1332
|
</div>` : ""}
|
|
1337
|
-
${this.
|
|
1333
|
+
${(t = this.homepageLink) != null && t.trim() ? a`<a
|
|
1334
|
+
class="nys-globalheader__name-container-link"
|
|
1335
|
+
href=${(s = this.homepageLink) == null ? void 0 : s.trim()}
|
|
1336
|
+
>
|
|
1338
1337
|
<div class="nys-globalheader__name-container">
|
|
1339
|
-
${((
|
|
1338
|
+
${((i = this.appName) == null ? void 0 : i.trim().length) > 0 ? a`<div
|
|
1340
1339
|
class="nys-globalheader__appName nys-globalheader__name"
|
|
1341
1340
|
>
|
|
1342
1341
|
${this.appName}
|
|
1343
1342
|
</div> ` : ""}
|
|
1344
|
-
${((
|
|
1345
|
-
class="nys-globalheader__agencyName nys-globalheader__name ${((
|
|
1343
|
+
${((r = this.agencyName) == null ? void 0 : r.trim().length) > 0 ? a`<div
|
|
1344
|
+
class="nys-globalheader__agencyName nys-globalheader__name ${((l = this.appName) == null ? void 0 : l.trim().length) > 0 ? "" : "main"}"
|
|
1346
1345
|
>
|
|
1347
1346
|
${this.agencyName}
|
|
1348
1347
|
</div> ` : ""}
|
|
1349
1348
|
</div>
|
|
1350
|
-
|
|
1351
|
-
class="nys-globalheader__name-container-link"
|
|
1352
|
-
href=${((o = this.homepageLink) == null ? void 0 : o.trim()) || window.location.origin}
|
|
1353
|
-
>
|
|
1349
|
+
</a>` : a`
|
|
1354
1350
|
<div class="nys-globalheader__name-container">
|
|
1355
|
-
${((
|
|
1351
|
+
${((e = this.appName) == null ? void 0 : e.trim().length) > 0 ? a`<div
|
|
1356
1352
|
class="nys-globalheader__appName nys-globalheader__name"
|
|
1357
1353
|
>
|
|
1358
1354
|
${this.appName}
|
|
1359
1355
|
</div> ` : ""}
|
|
1360
|
-
${((
|
|
1361
|
-
class="nys-globalheader__agencyName nys-globalheader__name ${((
|
|
1356
|
+
${((C = this.agencyName) == null ? void 0 : C.trim().length) > 0 ? a`<div
|
|
1357
|
+
class="nys-globalheader__agencyName nys-globalheader__name ${((o = this.appName) == null ? void 0 : o.trim().length) > 0 ? "" : "main"}"
|
|
1362
1358
|
>
|
|
1363
1359
|
${this.agencyName}
|
|
1364
1360
|
</div> ` : ""}
|
|
1365
1361
|
</div>
|
|
1366
|
-
|
|
1362
|
+
`}
|
|
1367
1363
|
${this.slotHasContent ? a`<div class="nys-globalheader__content">
|
|
1368
1364
|
<slot
|
|
1369
1365
|
style="display: hidden"
|
|
@@ -1379,27 +1375,24 @@ const P = class P extends q {
|
|
|
1379
1375
|
}
|
|
1380
1376
|
};
|
|
1381
1377
|
P.styles = a1;
|
|
1382
|
-
let
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
],
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
],
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
],
|
|
1392
|
-
|
|
1393
|
-
b({ type: Boolean })
|
|
1394
|
-
], h.prototype, "disableHomepageLink");
|
|
1395
|
-
y([
|
|
1378
|
+
let c = P;
|
|
1379
|
+
_([
|
|
1380
|
+
Z({ type: String })
|
|
1381
|
+
], c.prototype, "appName");
|
|
1382
|
+
_([
|
|
1383
|
+
Z({ type: String })
|
|
1384
|
+
], c.prototype, "agencyName");
|
|
1385
|
+
_([
|
|
1386
|
+
Z({ type: String })
|
|
1387
|
+
], c.prototype, "homepageLink");
|
|
1388
|
+
_([
|
|
1396
1389
|
J()
|
|
1397
|
-
],
|
|
1398
|
-
|
|
1390
|
+
], c.prototype, "slotHasContent");
|
|
1391
|
+
_([
|
|
1399
1392
|
J()
|
|
1400
|
-
],
|
|
1401
|
-
customElements.get("nys-globalheader") || customElements.define("nys-globalheader",
|
|
1393
|
+
], c.prototype, "isMobileMenuOpen");
|
|
1394
|
+
customElements.get("nys-globalheader") || customElements.define("nys-globalheader", c);
|
|
1402
1395
|
export {
|
|
1403
|
-
|
|
1396
|
+
c as NysGlobalHeader
|
|
1404
1397
|
};
|
|
1405
1398
|
//# sourceMappingURL=nys-globalheader.js.map
|