@utahdts/utah-design-system-header 0.7.0 → 0.8.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.
- package/dist/style.css +1 -1
- package/dist/utah-design-system-header.es.js +1284 -1150
- package/dist/utah-design-system-header.umd.js +96 -78
- package/package.json +14 -5
- package/src/css/_citizen-experience.scss +7 -2
- package/src/css/_mobile-menu.scss +5 -1
- package/src/css/_official-website-popup.scss +18 -0
- package/src/css/_utah-header-wrapper.scss +3 -0
- package/src/css/media-queries.css +13 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const In = "@utahdts/utah-design-system-header", gn = "0.8.0", Tn = "Utah Header for the Utah Design System", Mn = {
|
|
2
2
|
".": {
|
|
3
3
|
"development-local": "./src/index.js",
|
|
4
4
|
development: "./dist/utah-design-system-header.es.js",
|
|
@@ -13,50 +13,55 @@ const En = "@utahdts/utah-design-system-header", bn = "0.7.0", gn = "Utah Header
|
|
|
13
13
|
},
|
|
14
14
|
"./css": "./dist/style.css",
|
|
15
15
|
"./src/css/index.scss": "./src/css/index.scss"
|
|
16
|
-
},
|
|
16
|
+
}, An = "./src/index.js", On = [
|
|
17
17
|
"src/css",
|
|
18
18
|
"dist"
|
|
19
|
-
],
|
|
19
|
+
], wn = {
|
|
20
20
|
build: "vite build",
|
|
21
21
|
preview: "vite preview",
|
|
22
22
|
publishHeader: "npm publish --access public",
|
|
23
23
|
"test-publish": "npm publish --dry-run",
|
|
24
24
|
test: "vitest",
|
|
25
25
|
testc: "vitest run --coverage",
|
|
26
|
+
testOnce: "vitest run",
|
|
27
|
+
testui: "vitest --ui",
|
|
26
28
|
watch: "vite build --watch"
|
|
27
|
-
},
|
|
29
|
+
}, Ln = {
|
|
28
30
|
type: "git",
|
|
29
31
|
url: "git+https://github.com/utahdts/utah-design-system.git"
|
|
30
|
-
},
|
|
32
|
+
}, yn = "Apache-2.0", Pn = {
|
|
31
33
|
url: "https://github.com/utahdts/utah-design-system/issues"
|
|
32
|
-
},
|
|
34
|
+
}, Nn = "https://github.com/utahdts/utah-design-system#readme", Sn = {
|
|
33
35
|
"@popperjs/core": "2.11.7"
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
+
}, Un = {
|
|
37
|
+
"@vitest/ui": "0.31.1",
|
|
38
|
+
eslint: "8.40.0",
|
|
36
39
|
"eslint-config-airbnb": "19.0.4",
|
|
37
40
|
"eslint-plugin-import": "2.27.5",
|
|
38
41
|
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
42
|
+
"eslint-plugin-react-refresh": "0.4.1",
|
|
43
|
+
jsdom: "22.0.0",
|
|
39
44
|
sass: "1.62.1",
|
|
40
|
-
vite: "4.3.
|
|
45
|
+
vite: "4.3.7",
|
|
41
46
|
"vite-plugin-eslint": "1.8.1",
|
|
42
|
-
vitest: "0.
|
|
43
|
-
},
|
|
44
|
-
name:
|
|
45
|
-
version:
|
|
46
|
-
description:
|
|
47
|
-
exports:
|
|
48
|
-
main:
|
|
49
|
-
files:
|
|
50
|
-
scripts:
|
|
51
|
-
repository:
|
|
52
|
-
license:
|
|
53
|
-
bugs:
|
|
54
|
-
homepage:
|
|
55
|
-
dependencies:
|
|
56
|
-
devDependencies:
|
|
57
|
-
type:
|
|
47
|
+
vitest: "0.31.0"
|
|
48
|
+
}, Cn = "module", Rn = {
|
|
49
|
+
name: In,
|
|
50
|
+
version: gn,
|
|
51
|
+
description: Tn,
|
|
52
|
+
exports: Mn,
|
|
53
|
+
main: An,
|
|
54
|
+
files: On,
|
|
55
|
+
scripts: wn,
|
|
56
|
+
repository: Ln,
|
|
57
|
+
license: yn,
|
|
58
|
+
bugs: Pn,
|
|
59
|
+
homepage: Nn,
|
|
60
|
+
dependencies: Sn,
|
|
61
|
+
devDependencies: Un,
|
|
62
|
+
type: Cn
|
|
58
63
|
};
|
|
59
|
-
const
|
|
64
|
+
const j = {
|
|
60
65
|
FLYOUT: (
|
|
61
66
|
/** @type {ChildrenMenuType} */
|
|
62
67
|
"flyout"
|
|
@@ -69,7 +74,7 @@ const $ = {
|
|
|
69
74
|
/** @type {ChildrenMenuType} */
|
|
70
75
|
"mega-menu"
|
|
71
76
|
)
|
|
72
|
-
},
|
|
77
|
+
}, $t = {
|
|
73
78
|
// Fired when the utah header is first loaded (setUtahHeaderSettings does not trigger this)
|
|
74
79
|
HEADER_LOADED: (
|
|
75
80
|
/** @type {Events} */
|
|
@@ -80,7 +85,7 @@ const $ = {
|
|
|
80
85
|
/** @type {Events} */
|
|
81
86
|
"utahHeaderUnloaded"
|
|
82
87
|
)
|
|
83
|
-
},
|
|
88
|
+
}, Te = {
|
|
84
89
|
SMALL: (
|
|
85
90
|
/** @type {Size} */
|
|
86
91
|
"SMALL"
|
|
@@ -93,7 +98,7 @@ const $ = {
|
|
|
93
98
|
/** @type {Size} */
|
|
94
99
|
"LARGE"
|
|
95
100
|
)
|
|
96
|
-
},
|
|
101
|
+
}, Dn = `/* @media is never in scope for --variables, so this is the only way to solve this. :-( */
|
|
97
102
|
|
|
98
103
|
@media screen and (max-width: media-size__tablet-landscape__PLACEHOLDER) {
|
|
99
104
|
/* put your media query here for tablet landscape */
|
|
@@ -103,6 +108,12 @@ const $ = {
|
|
|
103
108
|
}
|
|
104
109
|
|
|
105
110
|
@media screen and (max-width: media-size__tablet-portrait__PLACEHOLDER) {
|
|
111
|
+
.utds-header-desktop--hidden {
|
|
112
|
+
display: flex !important;
|
|
113
|
+
}
|
|
114
|
+
.utds-header-mobile--hidden {
|
|
115
|
+
display: none !important;
|
|
116
|
+
}
|
|
106
117
|
.utds-header {
|
|
107
118
|
height: 60px;
|
|
108
119
|
padding: var(--spacing-xs) var(--spacing);
|
|
@@ -113,8 +124,13 @@ const $ = {
|
|
|
113
124
|
.utds-citizen-experience-wrapper {
|
|
114
125
|
display: none;
|
|
115
126
|
}
|
|
127
|
+
.utds-citizen-experience-wrapper--mobile {
|
|
128
|
+
display: flex;
|
|
129
|
+
}
|
|
116
130
|
.utah-design-system .main-menu__wrapper {
|
|
117
131
|
padding: 0 var(--spacing);
|
|
132
|
+
/* The utah id button is this tall, but without it, the menu doesn't fill the space up to the mobile menu content popup */
|
|
133
|
+
min-height: 46px;
|
|
118
134
|
}
|
|
119
135
|
.utah-design-system .main-menu__nav {
|
|
120
136
|
display: none;
|
|
@@ -125,7 +141,8 @@ const $ = {
|
|
|
125
141
|
}
|
|
126
142
|
.utah-design-system .icon-button.main-menu__hamburger,
|
|
127
143
|
.utah-design-system .utds-header-mobile__vip-action-items--left,
|
|
128
|
-
.utah-design-system .utds-header-mobile__vip-action-items--right
|
|
144
|
+
.utah-design-system .utds-header-mobile__vip-action-items--right,
|
|
145
|
+
.utah-design-system .main-menu__search-placeholder {
|
|
129
146
|
display: flex;
|
|
130
147
|
}
|
|
131
148
|
|
|
@@ -151,7 +168,7 @@ const $ = {
|
|
|
151
168
|
@media screen and (max-width: media-size__mobile__PLACEHOLDER) {
|
|
152
169
|
/* put your media query here for mobile */
|
|
153
170
|
}
|
|
154
|
-
`,
|
|
171
|
+
`, Bn = `<div class="utah-design-system utds-header-mobile-menu" id="utds-header-mobile-menu">
|
|
155
172
|
<div class="utds-header-mobile-menu__backdrop" aria-hidden></div>
|
|
156
173
|
<div class="utds-header-mobile-menu__wrapper">
|
|
157
174
|
<div class="utds-header-mobile-menu__action-bar" role="tablist">
|
|
@@ -178,13 +195,16 @@ const $ = {
|
|
|
178
195
|
|
|
179
196
|
</div>
|
|
180
197
|
<div class="utds-header-mobile-menu__content"> </div>
|
|
198
|
+
<div aria-hidden tabindex="0" class="utds-header-mobile-menu__hidden-last-focusable visually-hidden">
|
|
199
|
+
end of mobile content form
|
|
200
|
+
</div>
|
|
181
201
|
</div>
|
|
182
202
|
</div>
|
|
183
203
|
`;
|
|
184
|
-
function
|
|
204
|
+
function p(e) {
|
|
185
205
|
return `.${(Array.isArray(e) ? e : [e]).join(".")}`;
|
|
186
206
|
}
|
|
187
|
-
const
|
|
207
|
+
const a = {
|
|
188
208
|
// Global Information
|
|
189
209
|
UTAH_DESIGN_SYSTEM: "utah-design-system",
|
|
190
210
|
HEADER: "utds-header",
|
|
@@ -206,12 +226,14 @@ const s = {
|
|
|
206
226
|
ACTION_ITEM__ICON_BUTTON: "utds-header-action-item__icon-button",
|
|
207
227
|
ACTION_ITEM__ICON_BUTTON_TITLE: "utds-header-action-item__icon-button--has-title",
|
|
208
228
|
ACTION_ITEM__TITLE: "utds-header-action-item__title",
|
|
229
|
+
ACTION_ITEMS__WRAPPER: "utds-action-items-wrapper",
|
|
209
230
|
BADGE__LABEL: "utds-badge__label",
|
|
210
231
|
BADGE__VALUE: "utds-badge__value",
|
|
211
232
|
BADGE_WRAPPER: "utds-badge__wrapper",
|
|
212
233
|
BADGE_WRAPPER__SMALL: "utds-badge__wrapper--small",
|
|
213
234
|
BADGE_WRAPPER__ACTION_ITEM: "utds-badge__wrapper--action-item",
|
|
214
235
|
CITIZEN_EXPERIENCE: "utds-citizen-experience-wrapper",
|
|
236
|
+
CITIZEN_EXPERIENCE_MOBILE: "utds-citizen-experience-wrapper--mobile",
|
|
215
237
|
FOOTER_HORIZONTAL_DIVIDER: "utds-footer__horizontal-divider",
|
|
216
238
|
LOGO: "utds-logo-wrapper",
|
|
217
239
|
LOGO_OFFICIAL_CLOSE_BUTTON: "utds-official-website-popup__close-button",
|
|
@@ -225,6 +247,7 @@ const s = {
|
|
|
225
247
|
MAIN_MENU__MENU_TOP: "main-menu__menu-top",
|
|
226
248
|
MAIN_MENU__NAV: "main-menu__nav",
|
|
227
249
|
MAIN_MENU__OUTER: "main-menu__outer",
|
|
250
|
+
MAIN_MENU__REMOVED: "main-menu-is-removed",
|
|
228
251
|
MAIN_MENU__SEARCH: "main-menu__search",
|
|
229
252
|
MAIN_MENU__TITLE: "main-menu__title",
|
|
230
253
|
MENU_ITEM: "menu-item",
|
|
@@ -235,8 +258,10 @@ const s = {
|
|
|
235
258
|
MENU_ITEM__FLY_OUT: "menu-item--fly_out",
|
|
236
259
|
MENU_ITEM__INLINE: "menu-item--inline",
|
|
237
260
|
MENU_ITEM__MEGA_MENU: "menu-item--mega-menu",
|
|
238
|
-
|
|
261
|
+
DESKTOP__HIDDEN: "utds-header-desktop--hidden",
|
|
262
|
+
MOBILE__HIDDEN: "utds-header-mobile--hidden",
|
|
239
263
|
MOBILE__UTAH_ID: "utds-header-mobile__utah-id-wrapper",
|
|
264
|
+
MOBILE__VIP_ACTION_ITEMS__LEFT: "utds-header-mobile__vip-action-items--left",
|
|
240
265
|
MOBILE__VIP_ACTION_ITEMS__RIGHT: "utds-header-mobile__vip-action-items--right",
|
|
241
266
|
ACTION_ITEM__SELECTED: "utds-header-mobile-menu__action-item--selected",
|
|
242
267
|
MOBILE_MENU: "utds-header-mobile-menu",
|
|
@@ -244,6 +269,7 @@ const s = {
|
|
|
244
269
|
MOBILE_MENU__BACKDROP: "utds-header-mobile-menu__backdrop",
|
|
245
270
|
MOBILE_MENU__CONTENT: "utds-header-mobile-menu__content",
|
|
246
271
|
MOBILE_MENU__CONTENT_ITEM: "utds-header-mobile-menu__content-item",
|
|
272
|
+
MOBILE_MENU__LAST_FOCUSABLE: "utds-header-mobile-menu__hidden-last-focusable",
|
|
247
273
|
MOBILE_MENU__WRAPPER: "utds-header-mobile-menu__wrapper",
|
|
248
274
|
MOBILE_MENU_ACTON_BAR__HOME_ID: "utds-header-mobile-menu_action-bar__home",
|
|
249
275
|
MOBILE_MENU_ACTON_BAR__PROFILE_ID: "utds-header-mobile-menu_action-bar__profile",
|
|
@@ -285,25 +311,25 @@ const s = {
|
|
|
285
311
|
UTAH_ID: "utds-utah-id-wrapper",
|
|
286
312
|
UTAH_ID__BUTTON: "utds-utah-id__button"
|
|
287
313
|
};
|
|
288
|
-
function
|
|
314
|
+
function ee(e, t) {
|
|
289
315
|
if (e)
|
|
290
316
|
throw new Error(t);
|
|
291
317
|
}
|
|
292
|
-
function
|
|
318
|
+
function P(e, t) {
|
|
293
319
|
if (e == null)
|
|
294
320
|
throw new Error(t);
|
|
295
321
|
return e;
|
|
296
322
|
}
|
|
297
|
-
function
|
|
323
|
+
function Lt(e) {
|
|
298
324
|
return typeof e == "string" || e instanceof String;
|
|
299
325
|
}
|
|
300
|
-
function
|
|
326
|
+
function Hn(e) {
|
|
301
327
|
const t = new DOMParser();
|
|
302
328
|
let n;
|
|
303
|
-
if (
|
|
329
|
+
if (Lt(e)) {
|
|
304
330
|
const o = (
|
|
305
331
|
/** @type {Document} */
|
|
306
|
-
|
|
332
|
+
Lt(e) ? t.parseFromString(e, "text/html") : e
|
|
307
333
|
), r = o.body.children.length > 1 ? o.body.children : o.body.children.item(0);
|
|
308
334
|
if (!r)
|
|
309
335
|
throw console.error(e), new Error("renderDOM: nothing rendered");
|
|
@@ -317,8 +343,8 @@ function Dn(e) {
|
|
|
317
343
|
throw e ? (console.error(e), new Error(`renderDOM: str is not a string nor a DOM Element : '${e}'`)) : new Error("renderDOM: falsy string passed; cannot render nothing");
|
|
318
344
|
return n;
|
|
319
345
|
}
|
|
320
|
-
function
|
|
321
|
-
const t = typeof e == "string" ?
|
|
346
|
+
function g(e) {
|
|
347
|
+
const t = typeof e == "string" ? Hn(e) : e;
|
|
322
348
|
if (t instanceof HTMLCollection && t.length > 1)
|
|
323
349
|
throw new Error("renderDOMSingle: must render a single element");
|
|
324
350
|
const n = (
|
|
@@ -329,7 +355,7 @@ function I(e) {
|
|
|
329
355
|
throw console.error(e), new Error("renderDOMSingle: nothing rendered");
|
|
330
356
|
return n;
|
|
331
357
|
}
|
|
332
|
-
const
|
|
358
|
+
const xn = `<div class="utds-footer utah-design-system">
|
|
333
359
|
<div class="utds-footer__horizontal-divider">
|
|
334
360
|
<hr />
|
|
335
361
|
</div>
|
|
@@ -356,138 +382,238 @@ const Hn = `<div class="utds-footer utah-design-system">
|
|
|
356
382
|
</div>
|
|
357
383
|
</div>
|
|
358
384
|
`;
|
|
359
|
-
let
|
|
360
|
-
function
|
|
361
|
-
var r, i,
|
|
362
|
-
const e =
|
|
363
|
-
let
|
|
364
|
-
if (
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
else if ((
|
|
378
|
-
|
|
385
|
+
let se = null;
|
|
386
|
+
function Wn() {
|
|
387
|
+
var o, r, i, u, s, l, c, d, h, f, _, m, E, v, T, A;
|
|
388
|
+
const e = O(), t = document.querySelector(p(a.FOOTER));
|
|
389
|
+
let n = t;
|
|
390
|
+
if (e.footer === null)
|
|
391
|
+
t == null || t.remove();
|
|
392
|
+
else if (((o = se == null ? void 0 : se.footer) == null ? void 0 : o.domLocationTarget) !== ((r = e == null ? void 0 : e.footer) == null ? void 0 : r.domLocationTarget) || ((i = se == null ? void 0 : se.footer) == null ? void 0 : i.showHorizontalRule) !== ((u = e == null ? void 0 : e.footer) == null ? void 0 : u.showHorizontalRule) || !t) {
|
|
393
|
+
t && t.remove(), n = g(xn);
|
|
394
|
+
let b = document.body;
|
|
395
|
+
if ((s = e == null ? void 0 : e.footer) != null && s.domLocationTarget) {
|
|
396
|
+
const I = [
|
|
397
|
+
(l = e == null ? void 0 : e.footer) == null ? void 0 : l.domLocationTarget.cssSelector,
|
|
398
|
+
(c = e == null ? void 0 : e.footer) == null ? void 0 : c.domLocationTarget.element,
|
|
399
|
+
(d = e == null ? void 0 : e.footer) == null ? void 0 : d.domLocationTarget.elementFunction
|
|
400
|
+
].filter((M) => M);
|
|
401
|
+
if (ee(I.length < 1, "renderFooter: footer.domLocationTarget must either have a value for one of its properties or not be specified at all"), ee(I.length > 1, "renderFooter: footer.domLocationTarget must only have one target specified"), (h = e == null ? void 0 : e.footer) != null && h.domLocationTarget.cssSelector)
|
|
402
|
+
b = document.querySelector((f = e == null ? void 0 : e.footer) == null ? void 0 : f.domLocationTarget.cssSelector), ee(!b, `renderFooter: element not found for domLocationTarget.cssSelector ${(_ = e == null ? void 0 : e.footer) == null ? void 0 : _.domLocationTarget.cssSelector}`);
|
|
403
|
+
else if ((m = e == null ? void 0 : e.footer) != null && m.domLocationTarget.element)
|
|
404
|
+
b = (E = e == null ? void 0 : e.footer) == null ? void 0 : E.domLocationTarget.element;
|
|
405
|
+
else if ((v = e == null ? void 0 : e.footer) != null && v.domLocationTarget.elementFunction)
|
|
406
|
+
b = (T = e == null ? void 0 : e.footer) == null ? void 0 : T.domLocationTarget.elementFunction(), ee(!b, "renderFooter: element not returned from domLocationTarget.elementFunction");
|
|
379
407
|
else
|
|
380
408
|
throw new Error("renderFooter: domLocationTarget must have at least one field set");
|
|
381
409
|
}
|
|
382
|
-
if (
|
|
383
|
-
const
|
|
384
|
-
|
|
410
|
+
if (b == null || b.appendChild(n), !((A = e == null ? void 0 : e.footer) != null && A.showHorizontalRule)) {
|
|
411
|
+
const I = document.querySelector(p(a.FOOTER_HORIZONTAL_DIVIDER));
|
|
412
|
+
ee(!I, "renderFooter: cannot remove horizontal rule; not found"), I == null || I.remove();
|
|
385
413
|
}
|
|
386
|
-
|
|
414
|
+
se = JSON.parse(JSON.stringify(e));
|
|
387
415
|
}
|
|
388
|
-
return
|
|
416
|
+
return n;
|
|
389
417
|
}
|
|
390
|
-
const
|
|
418
|
+
const jt = {
|
|
391
419
|
mediaSizes: {
|
|
392
420
|
mobile: 640,
|
|
393
421
|
tabletPortrait: 768,
|
|
394
422
|
tabletLandscape: 1024
|
|
395
423
|
},
|
|
396
424
|
showTitle: !0,
|
|
397
|
-
size:
|
|
425
|
+
size: Te.MEDIUM,
|
|
398
426
|
title: "My Utah.gov Site",
|
|
399
|
-
titleURL: "/"
|
|
400
|
-
mainMenu: {
|
|
401
|
-
menuItems: [
|
|
402
|
-
{
|
|
403
|
-
actionUrl: { url: "/" },
|
|
404
|
-
title: "Home"
|
|
405
|
-
}
|
|
406
|
-
],
|
|
407
|
-
title: "Main Menu"
|
|
408
|
-
}
|
|
427
|
+
titleURL: "/"
|
|
409
428
|
};
|
|
410
|
-
let
|
|
411
|
-
function
|
|
412
|
-
return
|
|
429
|
+
let ke = { ...jt };
|
|
430
|
+
function O() {
|
|
431
|
+
return ke;
|
|
413
432
|
}
|
|
414
|
-
function
|
|
433
|
+
function kn(e) {
|
|
415
434
|
if (!e.showTitle && !e.logo)
|
|
416
435
|
throw new Error("validateSettings: A title must be shown if there is no logo. Please change the `showTitle` setting to be `true` or provide a logo image.");
|
|
417
436
|
}
|
|
418
437
|
function yt() {
|
|
419
|
-
|
|
438
|
+
ti(!1), ei();
|
|
420
439
|
}
|
|
421
|
-
let
|
|
422
|
-
const
|
|
423
|
-
let
|
|
424
|
-
const
|
|
440
|
+
let zt = !1;
|
|
441
|
+
const qn = 15e3;
|
|
442
|
+
let Pt = 0;
|
|
443
|
+
const Vn = setInterval(
|
|
425
444
|
() => {
|
|
426
|
-
|
|
445
|
+
Pt += 1, Pt >= qn || zt ? clearInterval(Vn) : document.dispatchEvent(new Event($t.HEADER_LOADED));
|
|
427
446
|
},
|
|
428
447
|
2
|
|
429
448
|
);
|
|
430
|
-
function
|
|
431
|
-
return
|
|
449
|
+
function ni(e) {
|
|
450
|
+
return ke = { ...jt, ...O(), ...e }, kn(ke), zt = !0, document != null && document.body ? yt() : window.addEventListener("load", () => yt()), ke;
|
|
432
451
|
}
|
|
433
|
-
const
|
|
452
|
+
const Fn = `<div class="utds-header-mobile-menu__content-item" role="tabpanel">
|
|
434
453
|
</div>
|
|
435
454
|
`;
|
|
436
|
-
function
|
|
455
|
+
function R() {
|
|
437
456
|
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(
|
|
438
457
|
/[018]/g,
|
|
439
458
|
// eslint-disable-next-line no-bitwise
|
|
440
459
|
(e) => (e ^ crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> e) / 4).toString(16)
|
|
441
460
|
);
|
|
442
461
|
}
|
|
443
|
-
function
|
|
444
|
-
const t = document.querySelector(
|
|
462
|
+
function it(e) {
|
|
463
|
+
const t = document.querySelector(p(a.MOBILE_MENU__WRAPPER));
|
|
445
464
|
if (!t)
|
|
446
465
|
throw new Error("addMobileMenuContentItem: mobileMenuWrapper not found");
|
|
447
|
-
const n = t.querySelector(
|
|
466
|
+
const n = t.querySelector(p(a.MOBILE_MENU__CONTENT));
|
|
448
467
|
if (!n)
|
|
449
468
|
throw new Error("addMobileMenuContentItem: mobileContentWrapper not found");
|
|
450
|
-
const o =
|
|
451
|
-
return o.appendChild(e), n.appendChild(o), o.setAttribute("id",
|
|
469
|
+
const o = g(Fn);
|
|
470
|
+
return o.appendChild(e), n.appendChild(o), o.setAttribute("id", R()), o;
|
|
471
|
+
}
|
|
472
|
+
function K(e) {
|
|
473
|
+
return typeof e == "function" ? e() : e;
|
|
452
474
|
}
|
|
453
|
-
const
|
|
475
|
+
const Gn = `<div class="utds-badge__wrapper">
|
|
454
476
|
<span class="utds-badge__value"></span>
|
|
455
477
|
<span class="utds-badge__label visually-hidden"></span>
|
|
456
478
|
</div>
|
|
457
479
|
`;
|
|
458
|
-
function
|
|
480
|
+
function at(e) {
|
|
459
481
|
let t = null;
|
|
460
482
|
if (e) {
|
|
461
483
|
t = /** @type {HTMLElement} */
|
|
462
|
-
|
|
463
|
-
const n = t.querySelector(
|
|
484
|
+
g(Gn), t.classList.add(a.BADGE_WRAPPER__ACTION_ITEM);
|
|
485
|
+
const n = t.querySelector(p(a.BADGE__LABEL));
|
|
464
486
|
if (!n)
|
|
465
487
|
throw new Error("renderActionItemBadge: badgeLabel not found");
|
|
466
488
|
if (n.appendChild(document.createTextNode(e.label)), e.value || e.value === 0) {
|
|
467
|
-
const o = t.querySelector(
|
|
489
|
+
const o = t.querySelector(p(a.BADGE__VALUE));
|
|
468
490
|
if (!o)
|
|
469
491
|
throw new Error("renderActionItemBadge: badgeValue not found");
|
|
470
492
|
o.appendChild(document.createTextNode(`${e.value}`));
|
|
471
493
|
} else
|
|
472
|
-
t.classList.add(
|
|
494
|
+
t.classList.add(a.BADGE_WRAPPER__SMALL);
|
|
473
495
|
e.className && t.classList.add(e.className);
|
|
474
496
|
}
|
|
475
497
|
return t;
|
|
476
498
|
}
|
|
477
|
-
|
|
499
|
+
const $n = `<div class="utah-design-system utds-official-website-popup__wrapper visually-hidden" tabindex="-1">
|
|
500
|
+
<h2 class="utds-official-website-popup__heading">
|
|
501
|
+
This is an official website of the State of Utah. Here’s how you know:
|
|
502
|
+
</h2>
|
|
503
|
+
<div class="utds-official-website-popup__content">
|
|
504
|
+
<div class="utds-official-website-popup__col">
|
|
505
|
+
<div class="utds-icon-before-verified big-icon" aria-hidden="true"></div>
|
|
506
|
+
<div>
|
|
507
|
+
<strong>Official Utah websites use utah.gov in the browser's address bar.</strong><br />
|
|
508
|
+
A Utah.gov website belongs to an official government organization in the State of Utah.
|
|
509
|
+
<div class="utds-official-website-popup__address-bar"></div>
|
|
510
|
+
</div>
|
|
511
|
+
</div>
|
|
512
|
+
<div class="utds-official-website-popup__col">
|
|
513
|
+
<div class="utds-icon-before-lock big-icon" aria-hidden="true"></div>
|
|
514
|
+
<div>
|
|
515
|
+
<strong>Be careful when sharing sensitive information.</strong><br />
|
|
516
|
+
Share sensitive information only on secure official Utah.gov websites.
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
<div>
|
|
520
|
+
<svg class="utds-official-website-popup__official-image" viewBox="0 0 105.9496 47.6226" role="img">
|
|
521
|
+
<g>
|
|
522
|
+
<g>
|
|
523
|
+
<path
|
|
524
|
+
d="M12.2714,30.0877c-4.1489,0-7.2318-1.2037-9.2489-3.611C1.0055,24.0693-.002,20.334,0,15.2709V0H7.8175V16.1806c0,2.6363,.356,4.4923,1.0679,5.5679,.7613,1.1018,2.0506,1.7162,3.3859,1.6134,1.3465,.0953,2.6458-.5157,3.4313-1.6134,.7422-1.0756,1.1133-2.9316,1.1133-5.5679V0h7.5448V15.2709c0,5.0601-.9847,8.7946-2.9541,11.2035-1.9694,2.4089-5.0145,3.6133-9.1352,3.6133Zm24.0887-.5463V6.5444h-7.8175V0h23.4526V6.5444h-7.8175V29.5414h-7.8175Zm25.8151-14.362l-.5002,2.0452h5.455l-.5002-2.0452c-.3637-1.4239-.7273-2.9693-1.091-4.636-.3637-1.6667-.7261-3.242-1.0871-4.7259h-.1821c-.3334,1.5151-.6743,3.0983-1.0226,4.7497s-.7053,3.189-1.071,4.6129l-.0008-.0008Zm-11.3617,14.362L59.8127,0h9.4502l9.0023,29.5414h-8.2724l-1.4544-6.2709h-8.2716l-1.4544,6.2709h-7.9988Zm30.2713,0V0h7.8175V10.9991h8.8171V0h7.8175V29.5414h-7.8175v-11.7251h-8.8194v11.7251h-7.8152Z" />
|
|
525
|
+
</g>
|
|
526
|
+
<text transform="translate(.0419 43.5205)" aria-hidden="true">
|
|
527
|
+
<tspan x="0" y="0">An official website</tspan>
|
|
528
|
+
</text>
|
|
529
|
+
</g>
|
|
530
|
+
</svg>
|
|
531
|
+
<div class="utds-official-website-popup__copyright">© State of Utah</div>
|
|
532
|
+
</div>
|
|
533
|
+
</div>
|
|
534
|
+
<button type="button" class="utds-official-website-popup__close-button button icon-button icon-button--borderless"
|
|
535
|
+
tabIndex="-1">
|
|
536
|
+
<span class="utds-icon-before-x-icon" aria-hidden="true"></span>
|
|
537
|
+
<span class="visually-hidden">Close official website popup</span>
|
|
538
|
+
</button>
|
|
539
|
+
</div>
|
|
540
|
+
`;
|
|
541
|
+
function Yt() {
|
|
542
|
+
const e = P(
|
|
543
|
+
document.querySelector(p(a.LOGO_OFFICIAL_WRAPPER)),
|
|
544
|
+
"openOfficialWebsite: official wrapper not found"
|
|
545
|
+
), t = P(
|
|
546
|
+
document.querySelector(p(a.LOGO)),
|
|
547
|
+
"openOfficialWebsite: logoWrapper not found"
|
|
548
|
+
), n = P(
|
|
549
|
+
t.querySelector(p(a.LOGO_SVG)),
|
|
550
|
+
"openOfficialWebsite: logoButton not found"
|
|
551
|
+
), o = P(
|
|
552
|
+
e.querySelector(p(a.LOGO_OFFICIAL_CLOSE_BUTTON)),
|
|
553
|
+
"openOfficialWebsite: official close button not found"
|
|
554
|
+
);
|
|
555
|
+
e.classList.add(a.VISUALLY_HIDDEN), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true"), o.setAttribute("tabIndex", -1), e.setAttribute("tabIndex", -1);
|
|
556
|
+
const r = document.querySelectorAll(p(a.TOOLTIP__WRAPPER));
|
|
557
|
+
r == null || r.forEach((i) => {
|
|
558
|
+
i.classList.add(a.TOOLTIP__WRAPPER__HIDDEN), i.classList.remove(a.TOOLTIP__WRAPPER__VISIBLE);
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
function jn() {
|
|
562
|
+
const e = P(
|
|
563
|
+
document.querySelector(p(a.LOGO_OFFICIAL_WRAPPER)),
|
|
564
|
+
"openOfficialWebsite: official wrapper not found"
|
|
565
|
+
), t = P(
|
|
566
|
+
document.querySelector(p(a.LOGO)),
|
|
567
|
+
"openOfficialWebsite: logoWrapper not found"
|
|
568
|
+
), n = P(
|
|
569
|
+
t.querySelector(p(a.LOGO_SVG)),
|
|
570
|
+
"openOfficialWebsite: logoButton not found"
|
|
571
|
+
), o = P(
|
|
572
|
+
e.querySelector(p(a.LOGO_OFFICIAL_CLOSE_BUTTON)),
|
|
573
|
+
"openOfficialWebsite: official close button not found"
|
|
574
|
+
);
|
|
575
|
+
e.classList.remove(a.VISUALLY_HIDDEN), o.removeAttribute("tabIndex"), e.removeAttribute("tabIndex"), n.setAttribute("aria-expanded", "true"), e.setAttribute("aria-hidden", "false"), e.focus();
|
|
576
|
+
const r = document.querySelectorAll(p(a.TOOLTIP__WRAPPER));
|
|
577
|
+
r == null || r.forEach((i) => {
|
|
578
|
+
i.classList.add(a.TOOLTIP__WRAPPER__HIDDEN), i.classList.remove(a.TOOLTIP__WRAPPER__VISIBLE);
|
|
579
|
+
}), Ge();
|
|
580
|
+
}
|
|
581
|
+
function zn() {
|
|
582
|
+
const e = g($n), n = (
|
|
583
|
+
/** @type {HTMLElement} */
|
|
584
|
+
document.querySelector(p(a.LOGO)).querySelector(p(a.LOGO_SVG))
|
|
585
|
+
);
|
|
586
|
+
if (!n)
|
|
587
|
+
throw new Error("renderOfficialWebsite: logoButton not found");
|
|
588
|
+
if (n.onclick)
|
|
589
|
+
throw new Error("renderOfficialWebsite: logoButton already has an onclick");
|
|
590
|
+
const o = e.querySelector(p(a.LOGO_OFFICIAL_CLOSE_BUTTON));
|
|
591
|
+
if (!o)
|
|
592
|
+
throw new Error("renderOfficialWebsite: closeButton not found");
|
|
593
|
+
return n.onclick = () => {
|
|
594
|
+
e.classList.toggle(a.VISUALLY_HIDDEN), e.classList.contains(a.VISUALLY_HIDDEN) ? Yt() : jn();
|
|
595
|
+
const r = document.querySelectorAll(p(a.TOOLTIP__WRAPPER));
|
|
596
|
+
r == null || r.forEach((i) => {
|
|
597
|
+
i.classList.add(a.TOOLTIP__WRAPPER__HIDDEN), i.classList.remove(a.TOOLTIP__WRAPPER__VISIBLE);
|
|
598
|
+
});
|
|
599
|
+
}, o.onclick = () => {
|
|
600
|
+
e.classList.toggle(a.VISUALLY_HIDDEN), n.focus(), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true");
|
|
601
|
+
}, o.id || (o.id = R()), e.id || (e.id = R()), n.setAttribute("aria-controls", e.id), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true"), e.setAttribute("aria-labelledby", n.id), e;
|
|
602
|
+
}
|
|
603
|
+
function we(e) {
|
|
478
604
|
const t = (
|
|
479
605
|
/** @type {HTMLElement} */
|
|
480
|
-
|
|
481
|
-
document.querySelector(
|
|
606
|
+
P(
|
|
607
|
+
document.querySelector(p(a.MOBILE_MENU)),
|
|
482
608
|
`${e}: mobileMenu not found`
|
|
483
609
|
)
|
|
484
|
-
), n =
|
|
485
|
-
document.getElementById(
|
|
610
|
+
), n = P(
|
|
611
|
+
document.getElementById(a.MAIN_MENU__HAMBURGER_ID),
|
|
486
612
|
`${e}: hamburger not found (🍔 🎶 I will gladly pay you Tuesday for a hamburger today 🎵 🍔)`
|
|
487
613
|
), o = (
|
|
488
614
|
/** @type {HTMLElement} */
|
|
489
|
-
|
|
490
|
-
document.getElementById(
|
|
615
|
+
P(
|
|
616
|
+
document.getElementById(a.MAIN_MENU__HAMBURGER_ICON_ID),
|
|
491
617
|
`${e}: hamburgerIcon not found`
|
|
492
618
|
)
|
|
493
619
|
);
|
|
@@ -497,128 +623,169 @@ function ke(e) {
|
|
|
497
623
|
mobileMenu: t
|
|
498
624
|
};
|
|
499
625
|
}
|
|
500
|
-
function
|
|
501
|
-
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } =
|
|
502
|
-
e.setAttribute("aria-expanded", "false"), n.classList.remove(
|
|
503
|
-
}
|
|
504
|
-
function
|
|
505
|
-
|
|
506
|
-
e
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
626
|
+
function Ge() {
|
|
627
|
+
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } = we("hideMobileMenu");
|
|
628
|
+
e.setAttribute("aria-expanded", "false"), n.classList.remove(a.IS_OPEN), t.classList.add("utds-icon-before-hamburger"), t.classList.remove("utds-icon-before-x-icon");
|
|
629
|
+
}
|
|
630
|
+
function Yn() {
|
|
631
|
+
var r;
|
|
632
|
+
const e = document.querySelector(p(a.MAIN_MENU));
|
|
633
|
+
e != null && e.classList.contains(a.MOBILE__HIDDEN) && ((r = document.querySelector(`${p(a.UTAH_DESIGN_SYSTEM)}${p(a.MOBILE_MENU)}`)) == null || r.classList.add(a.MAIN_MENU__REMOVED));
|
|
634
|
+
const { hamburger: t, hamburgerIcon: n, mobileMenu: o } = we("showMobileMenu");
|
|
635
|
+
t.setAttribute("aria-expanded", "true"), o.classList.add(a.IS_OPEN), n.classList.remove("utds-icon-before-hamburger"), n.classList.add("utds-icon-before-x-icon");
|
|
636
|
+
}
|
|
637
|
+
function Zn(e) {
|
|
638
|
+
var l, c;
|
|
639
|
+
const { hamburger: t } = we("hookupHamburger"), n = O();
|
|
640
|
+
if ((l = n.actionItems) == null ? void 0 : l.some((d) => !!d.badge)) {
|
|
641
|
+
const d = at({ label: "Home Badge" });
|
|
642
|
+
d && t.appendChild(d);
|
|
514
643
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
644
|
+
Ge();
|
|
645
|
+
function r() {
|
|
646
|
+
const d = P(
|
|
647
|
+
/** @type {HTMLElement} */
|
|
648
|
+
document.querySelectorAll(`.${a.MOBILE_MENU__ACTION_BAR} .${a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER}`)[0],
|
|
649
|
+
"hookupHamburger: no action items to select on mobile hamburger open"
|
|
650
|
+
), h = d.querySelector("button"), f = h == null ? void 0 : h.getAttribute("aria-controls");
|
|
651
|
+
return { actionItem: d, actionItemWrapper: f ? document.getElementById(f) : null };
|
|
652
|
+
}
|
|
653
|
+
const i = P(
|
|
520
654
|
/** @type {HTMLElement} */
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
655
|
+
document.querySelectorAll(`.${a.MOBILE_MENU__ACTION_BAR} .${a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER}`)[0],
|
|
656
|
+
"hookupHamburger: no action items to select on mobile hamburger open"
|
|
657
|
+
), u = (c = i.querySelector) == null ? void 0 : c.call(i, "button"), s = (u || i).getAttribute("id");
|
|
658
|
+
if (!s)
|
|
659
|
+
throw new Error("mobileMenuInteractionHandler: actionItemId not found");
|
|
660
|
+
if (e) {
|
|
661
|
+
const d = e.getAttribute("id");
|
|
662
|
+
if (!d)
|
|
663
|
+
throw new Error("mobileMenuInteractionHandler: mobileMainMenuContentItemId not found");
|
|
664
|
+
(u || i).setAttribute("aria-controls", d), e.setAttribute("aria-labelledby", s);
|
|
665
|
+
}
|
|
666
|
+
st(
|
|
527
667
|
t,
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
{
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
668
|
+
() => r().actionItemWrapper,
|
|
669
|
+
() => r().actionItem,
|
|
670
|
+
{
|
|
671
|
+
additionalOnClick: () => Yt(),
|
|
672
|
+
ariaHasPopupType: "menu",
|
|
673
|
+
shouldOnClickCloseMenu: !0
|
|
674
|
+
}
|
|
675
|
+
), ee(!!t.onblur, "hookupHamburger: hamburger already has an onblur event"), t.onblur = () => {
|
|
676
|
+
const { mobileMenu: d } = we("showMobileMenu");
|
|
677
|
+
if (d.classList.contains(a.IS_OPEN)) {
|
|
678
|
+
const h = p(a.MOBILE_MENU__ACTION_BAR), f = p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER), _ = p(a.ICON_BUTTON), m = (
|
|
535
679
|
/** @type {HTMLElement | null} */
|
|
536
|
-
document.querySelector(`${
|
|
680
|
+
document.querySelector(`${h} ${f}:first-child ${_}`)
|
|
537
681
|
);
|
|
538
|
-
|
|
682
|
+
m == null || m.focus();
|
|
539
683
|
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
684
|
+
}, (n.mainMenu || n.actionItems) && !n.onSearch && n.utahId === !1 && (P(
|
|
685
|
+
document.querySelector(p(a.CITIZEN_EXPERIENCE_MOBILE)),
|
|
686
|
+
"hookupHamburger: citizen experience mobile not found"
|
|
687
|
+
).appendChild(t), P(
|
|
688
|
+
document.querySelector(p(a.MAIN_MENU)),
|
|
689
|
+
"hookupHamburger: main menu not found"
|
|
690
|
+
).classList.add(a.MOBILE__HIDDEN)), n.onSearch && !n.mainMenu && P(
|
|
691
|
+
document.querySelector(p(a.MAIN_MENU)),
|
|
692
|
+
"renderMainMenu: main menu not found"
|
|
693
|
+
).classList.add(a.DESKTOP__HIDDEN);
|
|
694
|
+
}
|
|
695
|
+
function Je(e, t) {
|
|
696
|
+
e.querySelectorAll(p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)).forEach((o) => {
|
|
697
|
+
o.classList.remove(a.ACTION_ITEM__SELECTED);
|
|
545
698
|
const r = o.querySelector("button");
|
|
546
699
|
if (!r)
|
|
547
|
-
throw new Error("showActionItem: actionWrapper does not have actionItem");
|
|
700
|
+
throw new Error("showActionItem: actionWrapper does not have actionItem A");
|
|
548
701
|
r.setAttribute("aria-selected", "false"), r.setAttribute("tabIndex", "-1");
|
|
549
|
-
}), t.classList.add(
|
|
702
|
+
}), t.classList.add(a.ACTION_ITEM__SELECTED);
|
|
550
703
|
const n = t.querySelector("button");
|
|
551
704
|
if (!n)
|
|
552
|
-
throw new Error("showActionItem: actionWrapper does not have actionItem");
|
|
705
|
+
throw new Error("showActionItem: actionWrapper does not have actionItem B");
|
|
553
706
|
n.setAttribute("aria-selected", "true"), n.removeAttribute("tabIndex"), n.focus();
|
|
554
707
|
}
|
|
555
|
-
function
|
|
556
|
-
e.querySelectorAll(
|
|
708
|
+
function Nt(e, t) {
|
|
709
|
+
e.querySelectorAll(p(a.MOBILE_MENU__CONTENT_ITEM)).forEach((n) => n.classList.remove(a.IS_OPEN)), t.classList.add(a.IS_OPEN);
|
|
557
710
|
}
|
|
558
|
-
function
|
|
711
|
+
function st(e, t, n, {
|
|
559
712
|
ariaHasPopupType: o,
|
|
560
|
-
|
|
561
|
-
|
|
713
|
+
additionalOnClick: r,
|
|
714
|
+
onClickHandler: i,
|
|
715
|
+
shouldOnClickCloseMenu: u
|
|
562
716
|
}) {
|
|
563
|
-
var _;
|
|
717
|
+
var _, m;
|
|
564
718
|
if (t && !o)
|
|
565
719
|
throw new Error("mobileMenuInteractionHandler: there is content, but the aria type is not given");
|
|
566
|
-
const
|
|
720
|
+
const s = (
|
|
567
721
|
/** @type {HTMLElement} */
|
|
568
|
-
document.querySelector(
|
|
722
|
+
document.querySelector(p(a.MOBILE_MENU))
|
|
569
723
|
);
|
|
570
|
-
if (!
|
|
724
|
+
if (!s)
|
|
571
725
|
throw new Error("mobileMenuInteractionHandler: mobileMenu not found");
|
|
572
|
-
const
|
|
726
|
+
const l = (
|
|
573
727
|
/** @type {HTMLElement} */
|
|
574
|
-
document.querySelector(
|
|
728
|
+
document.querySelector(p(a.MOBILE_MENU__WRAPPER))
|
|
575
729
|
);
|
|
576
|
-
if (!
|
|
730
|
+
if (!l)
|
|
577
731
|
throw new Error("mobileMenuInteractionHandler: mobileMenuWrapper not found");
|
|
578
|
-
const
|
|
732
|
+
const c = (
|
|
579
733
|
/** @type {HTMLElement} */
|
|
580
|
-
|
|
734
|
+
l.querySelector(p(a.MOBILE_MENU__CONTENT))
|
|
581
735
|
);
|
|
582
|
-
if (!
|
|
736
|
+
if (!c)
|
|
583
737
|
throw new Error("mobileMenuInteractionHandler: mobileContentWrapper not found");
|
|
584
|
-
const
|
|
585
|
-
if (!
|
|
738
|
+
const d = K(n), h = (m = (_ = K(n)) == null ? void 0 : _.querySelector) == null ? void 0 : m.call(_, "button"), f = (h || e).getAttribute("id");
|
|
739
|
+
if (!f)
|
|
586
740
|
throw new Error("mobileMenuInteractionHandler: interactiveElementId not found");
|
|
587
741
|
if (t) {
|
|
588
|
-
const
|
|
589
|
-
if (
|
|
590
|
-
|
|
591
|
-
|
|
742
|
+
const E = K(t);
|
|
743
|
+
if (E) {
|
|
744
|
+
const v = E.getAttribute("id");
|
|
745
|
+
if (!v)
|
|
746
|
+
throw new Error("mobileMenuInteractionHandler: mobileMenuContentId not found");
|
|
747
|
+
(h || e).setAttribute("aria-controls", v), E.setAttribute("aria-labelledby", f);
|
|
748
|
+
}
|
|
592
749
|
}
|
|
593
750
|
if (e.onclick)
|
|
594
751
|
throw new Error("mobileMenuInteractionHandler: interactiveElement already has onclick");
|
|
595
|
-
if (e.onclick = (
|
|
596
|
-
|
|
752
|
+
if (e.onclick = (E) => {
|
|
753
|
+
if (!(i != null && i(E)))
|
|
754
|
+
if (r == null || r(E), s.classList.contains(a.IS_OPEN))
|
|
755
|
+
u && Ge();
|
|
756
|
+
else {
|
|
757
|
+
Yn();
|
|
758
|
+
const T = K(t);
|
|
759
|
+
T && Nt(c, T), Je(l, K(n));
|
|
760
|
+
}
|
|
597
761
|
}, t) {
|
|
598
|
-
if (
|
|
599
|
-
throw new Error("mobileMenuInteractionHandler:
|
|
600
|
-
|
|
601
|
-
|
|
762
|
+
if (d !== e && d.onclick)
|
|
763
|
+
throw new Error("mobileMenuInteractionHandler: actionItemWrapperValue already has onclick");
|
|
764
|
+
d.onclick = (E) => {
|
|
765
|
+
if (!(i != null && i(E))) {
|
|
766
|
+
const v = K(t);
|
|
767
|
+
v && Nt(c, v), Je(l, K(n));
|
|
768
|
+
}
|
|
602
769
|
};
|
|
603
770
|
}
|
|
604
771
|
}
|
|
605
|
-
const
|
|
772
|
+
const Kn = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
606
773
|
<button type="button" class="icon-button icon-button--borderless utds-header-action-item__icon-button">
|
|
607
774
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
608
775
|
<span aria-hidden="true" role="presentation">
|
|
609
776
|
</button>
|
|
610
777
|
<span class="menu-chiclet"></span>
|
|
611
778
|
</div>
|
|
612
|
-
`,
|
|
779
|
+
`, Xn = `<div class="utds-header-action-item-menu">
|
|
613
780
|
<div class="vertical-menu__wrapper-title"></div>
|
|
614
781
|
</div>
|
|
615
|
-
`,
|
|
616
|
-
`,
|
|
782
|
+
`, Jn = `<span class="utds-icon-before-chevron-right vertical-menu__chevron" aria-hidden="true"></span>
|
|
783
|
+
`, Zt = `<span class="utds-new-tab-link-a11y">
|
|
617
784
|
<span class="visually-hidden">opens in a new tab</span>
|
|
618
785
|
<span class="utds-icon-after-external-link" aria-hidden="true"></span>
|
|
619
786
|
</span>
|
|
620
|
-
`,
|
|
621
|
-
`,
|
|
787
|
+
`, Qn = `<ul class="vertical-menu" role="menu" />
|
|
788
|
+
`, eo = `<li class="vertical-menu__item">
|
|
622
789
|
<span class="vertical-menu__title">
|
|
623
790
|
<span class="vertical-menu__plain-title"></span>
|
|
624
791
|
<a href="#" class="vertical-menu__link-title">
|
|
@@ -630,7 +797,7 @@ const $n = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
630
797
|
</span>
|
|
631
798
|
<span class="vertical-menu__divider" />
|
|
632
799
|
</li>
|
|
633
|
-
`,
|
|
800
|
+
`, lt = {
|
|
634
801
|
AUTO: (
|
|
635
802
|
/** @type {PopupPlacement} */
|
|
636
803
|
"auto"
|
|
@@ -692,20 +859,20 @@ const $n = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
692
859
|
"top-end"
|
|
693
860
|
)
|
|
694
861
|
};
|
|
695
|
-
function
|
|
862
|
+
function Ve(e, t, n) {
|
|
696
863
|
var r;
|
|
697
864
|
let o = !1;
|
|
698
|
-
return e && (Array.isArray(e) ? o = e.some((i) =>
|
|
865
|
+
return e && (Array.isArray(e) ? o = e.some((i) => Ve(i, t, n)) : (o = n(e), o || (o = !!((r = t == null ? void 0 : t.filter((i) => e[i])) != null && r.some((i) => Ve(e[i], t, n)))))), o;
|
|
699
866
|
}
|
|
700
|
-
var H = "top", F = "bottom",
|
|
701
|
-
return e.concat([t + "-" +
|
|
702
|
-
}, []),
|
|
703
|
-
return e.concat([t, t + "-" +
|
|
704
|
-
}, []),
|
|
705
|
-
function
|
|
867
|
+
var H = "top", F = "bottom", G = "right", x = "left", $e = "auto", Se = [H, F, G, x], fe = "start", Le = "end", to = "clippingParents", Kt = "viewport", Ie = "popper", no = "reference", St = /* @__PURE__ */ Se.reduce(function(e, t) {
|
|
868
|
+
return e.concat([t + "-" + fe, t + "-" + Le]);
|
|
869
|
+
}, []), Xt = /* @__PURE__ */ [].concat(Se, [$e]).reduce(function(e, t) {
|
|
870
|
+
return e.concat([t, t + "-" + fe, t + "-" + Le]);
|
|
871
|
+
}, []), oo = "beforeRead", ro = "read", io = "afterRead", ao = "beforeMain", so = "main", lo = "afterMain", co = "beforeWrite", uo = "write", po = "afterWrite", Qe = [oo, ro, io, ao, so, lo, co, uo, po];
|
|
872
|
+
function X(e) {
|
|
706
873
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
707
874
|
}
|
|
708
|
-
function
|
|
875
|
+
function V(e) {
|
|
709
876
|
if (e == null)
|
|
710
877
|
return window;
|
|
711
878
|
if (e.toString() !== "[object Window]") {
|
|
@@ -714,31 +881,31 @@ function q(e) {
|
|
|
714
881
|
}
|
|
715
882
|
return e;
|
|
716
883
|
}
|
|
717
|
-
function
|
|
718
|
-
var t =
|
|
884
|
+
function ue(e) {
|
|
885
|
+
var t = V(e).Element;
|
|
719
886
|
return e instanceof t || e instanceof Element;
|
|
720
887
|
}
|
|
721
|
-
function
|
|
722
|
-
var t =
|
|
888
|
+
function q(e) {
|
|
889
|
+
var t = V(e).HTMLElement;
|
|
723
890
|
return e instanceof t || e instanceof HTMLElement;
|
|
724
891
|
}
|
|
725
|
-
function
|
|
892
|
+
function ct(e) {
|
|
726
893
|
if (typeof ShadowRoot > "u")
|
|
727
894
|
return !1;
|
|
728
|
-
var t =
|
|
895
|
+
var t = V(e).ShadowRoot;
|
|
729
896
|
return e instanceof t || e instanceof ShadowRoot;
|
|
730
897
|
}
|
|
731
|
-
function
|
|
898
|
+
function fo(e) {
|
|
732
899
|
var t = e.state;
|
|
733
900
|
Object.keys(t.elements).forEach(function(n) {
|
|
734
901
|
var o = t.styles[n] || {}, r = t.attributes[n] || {}, i = t.elements[n];
|
|
735
|
-
!
|
|
736
|
-
var
|
|
737
|
-
|
|
902
|
+
!q(i) || !X(i) || (Object.assign(i.style, o), Object.keys(r).forEach(function(u) {
|
|
903
|
+
var s = r[u];
|
|
904
|
+
s === !1 ? i.removeAttribute(u) : i.setAttribute(u, s === !0 ? "" : s);
|
|
738
905
|
}));
|
|
739
906
|
});
|
|
740
907
|
}
|
|
741
|
-
function
|
|
908
|
+
function _o(e) {
|
|
742
909
|
var t = e.state, n = {
|
|
743
910
|
popper: {
|
|
744
911
|
position: t.options.strategy,
|
|
@@ -753,54 +920,54 @@ function lo(e) {
|
|
|
753
920
|
};
|
|
754
921
|
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
|
|
755
922
|
Object.keys(t.elements).forEach(function(o) {
|
|
756
|
-
var r = t.elements[o], i = t.attributes[o] || {},
|
|
757
|
-
return l[
|
|
923
|
+
var r = t.elements[o], i = t.attributes[o] || {}, u = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), s = u.reduce(function(l, c) {
|
|
924
|
+
return l[c] = "", l;
|
|
758
925
|
}, {});
|
|
759
|
-
!
|
|
926
|
+
!q(r) || !X(r) || (Object.assign(r.style, s), Object.keys(i).forEach(function(l) {
|
|
760
927
|
r.removeAttribute(l);
|
|
761
928
|
}));
|
|
762
929
|
});
|
|
763
930
|
};
|
|
764
931
|
}
|
|
765
|
-
const
|
|
932
|
+
const ho = {
|
|
766
933
|
name: "applyStyles",
|
|
767
934
|
enabled: !0,
|
|
768
935
|
phase: "write",
|
|
769
|
-
fn:
|
|
770
|
-
effect:
|
|
936
|
+
fn: fo,
|
|
937
|
+
effect: _o,
|
|
771
938
|
requires: ["computeStyles"]
|
|
772
939
|
};
|
|
773
|
-
function
|
|
940
|
+
function z(e) {
|
|
774
941
|
return e.split("-")[0];
|
|
775
942
|
}
|
|
776
|
-
var
|
|
777
|
-
function
|
|
943
|
+
var ce = Math.max, Fe = Math.min, _e = Math.round;
|
|
944
|
+
function et() {
|
|
778
945
|
var e = navigator.userAgentData;
|
|
779
946
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
780
947
|
return t.brand + "/" + t.version;
|
|
781
948
|
}).join(" ") : navigator.userAgent;
|
|
782
949
|
}
|
|
783
|
-
function
|
|
784
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
950
|
+
function Jt() {
|
|
951
|
+
return !/^((?!chrome|android).)*safari/i.test(et());
|
|
785
952
|
}
|
|
786
|
-
function
|
|
953
|
+
function he(e, t, n) {
|
|
787
954
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
788
955
|
var o = e.getBoundingClientRect(), r = 1, i = 1;
|
|
789
|
-
t &&
|
|
790
|
-
var
|
|
956
|
+
t && q(e) && (r = e.offsetWidth > 0 && _e(o.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && _e(o.height) / e.offsetHeight || 1);
|
|
957
|
+
var u = ue(e) ? V(e) : window, s = u.visualViewport, l = !Jt() && n, c = (o.left + (l && s ? s.offsetLeft : 0)) / r, d = (o.top + (l && s ? s.offsetTop : 0)) / i, h = o.width / r, f = o.height / i;
|
|
791
958
|
return {
|
|
792
|
-
width:
|
|
793
|
-
height:
|
|
959
|
+
width: h,
|
|
960
|
+
height: f,
|
|
794
961
|
top: d,
|
|
795
|
-
right:
|
|
796
|
-
bottom: d +
|
|
797
|
-
left:
|
|
798
|
-
x:
|
|
962
|
+
right: c + h,
|
|
963
|
+
bottom: d + f,
|
|
964
|
+
left: c,
|
|
965
|
+
x: c,
|
|
799
966
|
y: d
|
|
800
967
|
};
|
|
801
968
|
}
|
|
802
|
-
function
|
|
803
|
-
var t =
|
|
969
|
+
function ut(e) {
|
|
970
|
+
var t = he(e), n = e.offsetWidth, o = e.offsetHeight;
|
|
804
971
|
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
805
972
|
x: e.offsetLeft,
|
|
806
973
|
y: e.offsetTop,
|
|
@@ -808,11 +975,11 @@ function lt(e) {
|
|
|
808
975
|
height: o
|
|
809
976
|
};
|
|
810
977
|
}
|
|
811
|
-
function
|
|
978
|
+
function Qt(e, t) {
|
|
812
979
|
var n = t.getRootNode && t.getRootNode();
|
|
813
980
|
if (e.contains(t))
|
|
814
981
|
return !0;
|
|
815
|
-
if (n &&
|
|
982
|
+
if (n && ct(n)) {
|
|
816
983
|
var o = t;
|
|
817
984
|
do {
|
|
818
985
|
if (o && e.isSameNode(o))
|
|
@@ -822,66 +989,66 @@ function Xt(e, t) {
|
|
|
822
989
|
}
|
|
823
990
|
return !1;
|
|
824
991
|
}
|
|
825
|
-
function
|
|
826
|
-
return
|
|
992
|
+
function Y(e) {
|
|
993
|
+
return V(e).getComputedStyle(e);
|
|
827
994
|
}
|
|
828
|
-
function
|
|
829
|
-
return ["table", "td", "th"].indexOf(
|
|
995
|
+
function mo(e) {
|
|
996
|
+
return ["table", "td", "th"].indexOf(X(e)) >= 0;
|
|
830
997
|
}
|
|
831
|
-
function
|
|
832
|
-
return ((
|
|
998
|
+
function te(e) {
|
|
999
|
+
return ((ue(e) ? e.ownerDocument : (
|
|
833
1000
|
// $FlowFixMe[prop-missing]
|
|
834
1001
|
e.document
|
|
835
1002
|
)) || window.document).documentElement;
|
|
836
1003
|
}
|
|
837
|
-
function
|
|
838
|
-
return
|
|
1004
|
+
function je(e) {
|
|
1005
|
+
return X(e) === "html" ? e : (
|
|
839
1006
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
840
1007
|
// $FlowFixMe[incompatible-return]
|
|
841
1008
|
// $FlowFixMe[prop-missing]
|
|
842
1009
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
843
1010
|
e.parentNode || // DOM Element detected
|
|
844
|
-
(
|
|
1011
|
+
(ct(e) ? e.host : null) || // ShadowRoot detected
|
|
845
1012
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
846
|
-
|
|
1013
|
+
te(e)
|
|
847
1014
|
);
|
|
848
1015
|
}
|
|
849
|
-
function
|
|
850
|
-
return !
|
|
851
|
-
|
|
1016
|
+
function Ut(e) {
|
|
1017
|
+
return !q(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1018
|
+
Y(e).position === "fixed" ? null : e.offsetParent;
|
|
852
1019
|
}
|
|
853
|
-
function
|
|
854
|
-
var t = /firefox/i.test(
|
|
855
|
-
if (n &&
|
|
856
|
-
var o =
|
|
1020
|
+
function Eo(e) {
|
|
1021
|
+
var t = /firefox/i.test(et()), n = /Trident/i.test(et());
|
|
1022
|
+
if (n && q(e)) {
|
|
1023
|
+
var o = Y(e);
|
|
857
1024
|
if (o.position === "fixed")
|
|
858
1025
|
return null;
|
|
859
1026
|
}
|
|
860
|
-
var r =
|
|
861
|
-
for (
|
|
862
|
-
var i =
|
|
1027
|
+
var r = je(e);
|
|
1028
|
+
for (ct(r) && (r = r.host); q(r) && ["html", "body"].indexOf(X(r)) < 0; ) {
|
|
1029
|
+
var i = Y(r);
|
|
863
1030
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
|
|
864
1031
|
return r;
|
|
865
1032
|
r = r.parentNode;
|
|
866
1033
|
}
|
|
867
1034
|
return null;
|
|
868
1035
|
}
|
|
869
|
-
function
|
|
870
|
-
for (var t =
|
|
871
|
-
n =
|
|
872
|
-
return n && (
|
|
1036
|
+
function Ue(e) {
|
|
1037
|
+
for (var t = V(e), n = Ut(e); n && mo(n) && Y(n).position === "static"; )
|
|
1038
|
+
n = Ut(n);
|
|
1039
|
+
return n && (X(n) === "html" || X(n) === "body" && Y(n).position === "static") ? t : n || Eo(e) || t;
|
|
873
1040
|
}
|
|
874
|
-
function
|
|
1041
|
+
function dt(e) {
|
|
875
1042
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
876
1043
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
1044
|
+
function Me(e, t, n) {
|
|
1045
|
+
return ce(e, Fe(t, n));
|
|
879
1046
|
}
|
|
880
|
-
function
|
|
881
|
-
var o =
|
|
1047
|
+
function vo(e, t, n) {
|
|
1048
|
+
var o = Me(e, t, n);
|
|
882
1049
|
return o > n ? n : o;
|
|
883
1050
|
}
|
|
884
|
-
function
|
|
1051
|
+
function en() {
|
|
885
1052
|
return {
|
|
886
1053
|
top: 0,
|
|
887
1054
|
right: 0,
|
|
@@ -889,111 +1056,111 @@ function Jt() {
|
|
|
889
1056
|
left: 0
|
|
890
1057
|
};
|
|
891
1058
|
}
|
|
892
|
-
function
|
|
893
|
-
return Object.assign({},
|
|
1059
|
+
function tn(e) {
|
|
1060
|
+
return Object.assign({}, en(), e);
|
|
894
1061
|
}
|
|
895
|
-
function
|
|
1062
|
+
function nn(e, t) {
|
|
896
1063
|
return t.reduce(function(n, o) {
|
|
897
1064
|
return n[o] = e, n;
|
|
898
1065
|
}, {});
|
|
899
1066
|
}
|
|
900
|
-
var
|
|
1067
|
+
var bo = function(t, n) {
|
|
901
1068
|
return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
|
|
902
1069
|
placement: n.placement
|
|
903
|
-
})) : t,
|
|
1070
|
+
})) : t, tn(typeof t != "number" ? t : nn(t, Se));
|
|
904
1071
|
};
|
|
905
|
-
function
|
|
906
|
-
var t, n = e.state, o = e.name, r = e.options, i = n.elements.arrow,
|
|
907
|
-
if (!(!i || !
|
|
908
|
-
var
|
|
909
|
-
n.modifiersData[o] = (t = {}, t[
|
|
1072
|
+
function Io(e) {
|
|
1073
|
+
var t, n = e.state, o = e.name, r = e.options, i = n.elements.arrow, u = n.modifiersData.popperOffsets, s = z(n.placement), l = dt(s), c = [x, G].indexOf(s) >= 0, d = c ? "height" : "width";
|
|
1074
|
+
if (!(!i || !u)) {
|
|
1075
|
+
var h = bo(r.padding, n), f = ut(i), _ = l === "y" ? H : x, m = l === "y" ? F : G, E = n.rects.reference[d] + n.rects.reference[l] - u[l] - n.rects.popper[d], v = u[l] - n.rects.reference[l], T = Ue(i), A = T ? l === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, L = E / 2 - v / 2, b = h[_], I = A - f[d] - h[m], M = A / 2 - f[d] / 2 + L, N = Me(b, M, I), S = l;
|
|
1076
|
+
n.modifiersData[o] = (t = {}, t[S] = N, t.centerOffset = N - M, t);
|
|
910
1077
|
}
|
|
911
1078
|
}
|
|
912
|
-
function
|
|
1079
|
+
function go(e) {
|
|
913
1080
|
var t = e.state, n = e.options, o = n.element, r = o === void 0 ? "[data-popper-arrow]" : o;
|
|
914
1081
|
if (r != null && !(typeof r == "string" && (r = t.elements.popper.querySelector(r), !r))) {
|
|
915
|
-
if ({}.NODE_ENV !== "production" && (
|
|
1082
|
+
if ({}.NODE_ENV !== "production" && (q(r) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !Qt(t.elements.popper, r)) {
|
|
916
1083
|
({}).NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
|
|
917
1084
|
return;
|
|
918
1085
|
}
|
|
919
1086
|
t.elements.arrow = r;
|
|
920
1087
|
}
|
|
921
1088
|
}
|
|
922
|
-
const
|
|
1089
|
+
const To = {
|
|
923
1090
|
name: "arrow",
|
|
924
1091
|
enabled: !0,
|
|
925
1092
|
phase: "main",
|
|
926
|
-
fn:
|
|
927
|
-
effect:
|
|
1093
|
+
fn: Io,
|
|
1094
|
+
effect: go,
|
|
928
1095
|
requires: ["popperOffsets"],
|
|
929
1096
|
requiresIfExists: ["preventOverflow"]
|
|
930
1097
|
};
|
|
931
|
-
function
|
|
1098
|
+
function me(e) {
|
|
932
1099
|
return e.split("-")[1];
|
|
933
1100
|
}
|
|
934
|
-
var
|
|
1101
|
+
var Mo = {
|
|
935
1102
|
top: "auto",
|
|
936
1103
|
right: "auto",
|
|
937
1104
|
bottom: "auto",
|
|
938
1105
|
left: "auto"
|
|
939
1106
|
};
|
|
940
|
-
function
|
|
1107
|
+
function Ao(e, t) {
|
|
941
1108
|
var n = e.x, o = e.y, r = t.devicePixelRatio || 1;
|
|
942
1109
|
return {
|
|
943
|
-
x:
|
|
944
|
-
y:
|
|
1110
|
+
x: _e(n * r) / r || 0,
|
|
1111
|
+
y: _e(o * r) / r || 0
|
|
945
1112
|
};
|
|
946
1113
|
}
|
|
947
|
-
function
|
|
948
|
-
var t, n = e.popper, o = e.popperRect, r = e.placement, i = e.variation,
|
|
949
|
-
x:
|
|
950
|
-
y:
|
|
1114
|
+
function Ct(e) {
|
|
1115
|
+
var t, n = e.popper, o = e.popperRect, r = e.placement, i = e.variation, u = e.offsets, s = e.position, l = e.gpuAcceleration, c = e.adaptive, d = e.roundOffsets, h = e.isFixed, f = u.x, _ = f === void 0 ? 0 : f, m = u.y, E = m === void 0 ? 0 : m, v = typeof d == "function" ? d({
|
|
1116
|
+
x: _,
|
|
1117
|
+
y: E
|
|
951
1118
|
}) : {
|
|
952
|
-
x:
|
|
953
|
-
y:
|
|
1119
|
+
x: _,
|
|
1120
|
+
y: E
|
|
954
1121
|
};
|
|
955
|
-
|
|
956
|
-
var T =
|
|
957
|
-
if (
|
|
958
|
-
var
|
|
959
|
-
if (
|
|
960
|
-
|
|
961
|
-
var
|
|
1122
|
+
_ = v.x, E = v.y;
|
|
1123
|
+
var T = u.hasOwnProperty("x"), A = u.hasOwnProperty("y"), L = x, b = H, I = window;
|
|
1124
|
+
if (c) {
|
|
1125
|
+
var M = Ue(n), N = "clientHeight", S = "clientWidth";
|
|
1126
|
+
if (M === V(n) && (M = te(n), Y(M).position !== "static" && s === "absolute" && (N = "scrollHeight", S = "scrollWidth")), M = M, r === H || (r === x || r === G) && i === Le) {
|
|
1127
|
+
b = F;
|
|
1128
|
+
var U = h && M === I && I.visualViewport ? I.visualViewport.height : (
|
|
962
1129
|
// $FlowFixMe[prop-missing]
|
|
963
|
-
|
|
1130
|
+
M[N]
|
|
964
1131
|
);
|
|
965
|
-
|
|
1132
|
+
E -= U - o.height, E *= l ? 1 : -1;
|
|
966
1133
|
}
|
|
967
|
-
if (r === x || (r === H || r === F) && i ===
|
|
968
|
-
|
|
969
|
-
var
|
|
1134
|
+
if (r === x || (r === H || r === F) && i === Le) {
|
|
1135
|
+
L = G;
|
|
1136
|
+
var C = h && M === I && I.visualViewport ? I.visualViewport.width : (
|
|
970
1137
|
// $FlowFixMe[prop-missing]
|
|
971
|
-
|
|
1138
|
+
M[S]
|
|
972
1139
|
);
|
|
973
|
-
|
|
1140
|
+
_ -= C - o.width, _ *= l ? 1 : -1;
|
|
974
1141
|
}
|
|
975
1142
|
}
|
|
976
|
-
var
|
|
977
|
-
position:
|
|
978
|
-
},
|
|
979
|
-
x:
|
|
980
|
-
y:
|
|
981
|
-
},
|
|
982
|
-
x:
|
|
983
|
-
y:
|
|
1143
|
+
var w = Object.assign({
|
|
1144
|
+
position: s
|
|
1145
|
+
}, c && Mo), D = d === !0 ? Ao({
|
|
1146
|
+
x: _,
|
|
1147
|
+
y: E
|
|
1148
|
+
}, V(n)) : {
|
|
1149
|
+
x: _,
|
|
1150
|
+
y: E
|
|
984
1151
|
};
|
|
985
|
-
if (
|
|
986
|
-
var
|
|
987
|
-
return Object.assign({},
|
|
1152
|
+
if (_ = D.x, E = D.y, l) {
|
|
1153
|
+
var B;
|
|
1154
|
+
return Object.assign({}, w, (B = {}, B[b] = A ? "0" : "", B[L] = T ? "0" : "", B.transform = (I.devicePixelRatio || 1) <= 1 ? "translate(" + _ + "px, " + E + "px)" : "translate3d(" + _ + "px, " + E + "px, 0)", B));
|
|
988
1155
|
}
|
|
989
|
-
return Object.assign({},
|
|
1156
|
+
return Object.assign({}, w, (t = {}, t[b] = A ? E + "px" : "", t[L] = T ? _ + "px" : "", t.transform = "", t));
|
|
990
1157
|
}
|
|
991
|
-
function
|
|
992
|
-
var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, i = n.adaptive,
|
|
1158
|
+
function Oo(e) {
|
|
1159
|
+
var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, i = n.adaptive, u = i === void 0 ? !0 : i, s = n.roundOffsets, l = s === void 0 ? !0 : s;
|
|
993
1160
|
if ({}.NODE_ENV !== "production") {
|
|
994
|
-
var
|
|
995
|
-
|
|
996
|
-
return
|
|
1161
|
+
var c = Y(t.elements.popper).transitionProperty || "";
|
|
1162
|
+
u && ["transform", "top", "right", "bottom", "left"].some(function(h) {
|
|
1163
|
+
return c.indexOf(h) >= 0;
|
|
997
1164
|
}) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `
|
|
998
1165
|
|
|
999
1166
|
`, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", `
|
|
@@ -1001,19 +1168,19 @@ function go(e) {
|
|
|
1001
1168
|
`, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
|
|
1002
1169
|
}
|
|
1003
1170
|
var d = {
|
|
1004
|
-
placement:
|
|
1005
|
-
variation:
|
|
1171
|
+
placement: z(t.placement),
|
|
1172
|
+
variation: me(t.placement),
|
|
1006
1173
|
popper: t.elements.popper,
|
|
1007
1174
|
popperRect: t.rects.popper,
|
|
1008
1175
|
gpuAcceleration: r,
|
|
1009
1176
|
isFixed: t.options.strategy === "fixed"
|
|
1010
1177
|
};
|
|
1011
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1178
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ct(Object.assign({}, d, {
|
|
1012
1179
|
offsets: t.modifiersData.popperOffsets,
|
|
1013
1180
|
position: t.options.strategy,
|
|
1014
|
-
adaptive:
|
|
1181
|
+
adaptive: u,
|
|
1015
1182
|
roundOffsets: l
|
|
1016
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1183
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ct(Object.assign({}, d, {
|
|
1017
1184
|
offsets: t.modifiersData.arrow,
|
|
1018
1185
|
position: "absolute",
|
|
1019
1186
|
adaptive: !1,
|
|
@@ -1022,105 +1189,105 @@ function go(e) {
|
|
|
1022
1189
|
"data-popper-placement": t.placement
|
|
1023
1190
|
});
|
|
1024
1191
|
}
|
|
1025
|
-
const
|
|
1192
|
+
const wo = {
|
|
1026
1193
|
name: "computeStyles",
|
|
1027
1194
|
enabled: !0,
|
|
1028
1195
|
phase: "beforeWrite",
|
|
1029
|
-
fn:
|
|
1196
|
+
fn: Oo,
|
|
1030
1197
|
data: {}
|
|
1031
1198
|
};
|
|
1032
|
-
var
|
|
1199
|
+
var xe = {
|
|
1033
1200
|
passive: !0
|
|
1034
1201
|
};
|
|
1035
|
-
function
|
|
1036
|
-
var t = e.state, n = e.instance, o = e.options, r = o.scroll, i = r === void 0 ? !0 : r,
|
|
1037
|
-
return i &&
|
|
1038
|
-
d.addEventListener("scroll", n.update,
|
|
1039
|
-
}),
|
|
1040
|
-
i &&
|
|
1041
|
-
d.removeEventListener("scroll", n.update,
|
|
1042
|
-
}),
|
|
1202
|
+
function Lo(e) {
|
|
1203
|
+
var t = e.state, n = e.instance, o = e.options, r = o.scroll, i = r === void 0 ? !0 : r, u = o.resize, s = u === void 0 ? !0 : u, l = V(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1204
|
+
return i && c.forEach(function(d) {
|
|
1205
|
+
d.addEventListener("scroll", n.update, xe);
|
|
1206
|
+
}), s && l.addEventListener("resize", n.update, xe), function() {
|
|
1207
|
+
i && c.forEach(function(d) {
|
|
1208
|
+
d.removeEventListener("scroll", n.update, xe);
|
|
1209
|
+
}), s && l.removeEventListener("resize", n.update, xe);
|
|
1043
1210
|
};
|
|
1044
1211
|
}
|
|
1045
|
-
const
|
|
1212
|
+
const yo = {
|
|
1046
1213
|
name: "eventListeners",
|
|
1047
1214
|
enabled: !0,
|
|
1048
1215
|
phase: "write",
|
|
1049
1216
|
fn: function() {
|
|
1050
1217
|
},
|
|
1051
|
-
effect:
|
|
1218
|
+
effect: Lo,
|
|
1052
1219
|
data: {}
|
|
1053
1220
|
};
|
|
1054
|
-
var
|
|
1221
|
+
var Po = {
|
|
1055
1222
|
left: "right",
|
|
1056
1223
|
right: "left",
|
|
1057
1224
|
bottom: "top",
|
|
1058
1225
|
top: "bottom"
|
|
1059
1226
|
};
|
|
1060
|
-
function
|
|
1227
|
+
function qe(e) {
|
|
1061
1228
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1062
|
-
return
|
|
1229
|
+
return Po[t];
|
|
1063
1230
|
});
|
|
1064
1231
|
}
|
|
1065
|
-
var
|
|
1232
|
+
var No = {
|
|
1066
1233
|
start: "end",
|
|
1067
1234
|
end: "start"
|
|
1068
1235
|
};
|
|
1069
|
-
function
|
|
1236
|
+
function Rt(e) {
|
|
1070
1237
|
return e.replace(/start|end/g, function(t) {
|
|
1071
|
-
return
|
|
1238
|
+
return No[t];
|
|
1072
1239
|
});
|
|
1073
1240
|
}
|
|
1074
|
-
function
|
|
1075
|
-
var t =
|
|
1241
|
+
function pt(e) {
|
|
1242
|
+
var t = V(e), n = t.pageXOffset, o = t.pageYOffset;
|
|
1076
1243
|
return {
|
|
1077
1244
|
scrollLeft: n,
|
|
1078
1245
|
scrollTop: o
|
|
1079
1246
|
};
|
|
1080
1247
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return
|
|
1248
|
+
function ft(e) {
|
|
1249
|
+
return he(te(e)).left + pt(e).scrollLeft;
|
|
1083
1250
|
}
|
|
1084
|
-
function
|
|
1085
|
-
var n =
|
|
1251
|
+
function So(e, t) {
|
|
1252
|
+
var n = V(e), o = te(e), r = n.visualViewport, i = o.clientWidth, u = o.clientHeight, s = 0, l = 0;
|
|
1086
1253
|
if (r) {
|
|
1087
|
-
i = r.width,
|
|
1088
|
-
var
|
|
1089
|
-
(
|
|
1254
|
+
i = r.width, u = r.height;
|
|
1255
|
+
var c = Jt();
|
|
1256
|
+
(c || !c && t === "fixed") && (s = r.offsetLeft, l = r.offsetTop);
|
|
1090
1257
|
}
|
|
1091
1258
|
return {
|
|
1092
1259
|
width: i,
|
|
1093
|
-
height:
|
|
1094
|
-
x:
|
|
1260
|
+
height: u,
|
|
1261
|
+
x: s + ft(e),
|
|
1095
1262
|
y: l
|
|
1096
1263
|
};
|
|
1097
1264
|
}
|
|
1098
|
-
function
|
|
1099
|
-
var t, n =
|
|
1100
|
-
return
|
|
1265
|
+
function Uo(e) {
|
|
1266
|
+
var t, n = te(e), o = pt(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, i = ce(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), u = ce(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), s = -o.scrollLeft + ft(e), l = -o.scrollTop;
|
|
1267
|
+
return Y(r || n).direction === "rtl" && (s += ce(n.clientWidth, r ? r.clientWidth : 0) - i), {
|
|
1101
1268
|
width: i,
|
|
1102
|
-
height:
|
|
1103
|
-
x:
|
|
1269
|
+
height: u,
|
|
1270
|
+
x: s,
|
|
1104
1271
|
y: l
|
|
1105
1272
|
};
|
|
1106
1273
|
}
|
|
1107
|
-
function
|
|
1108
|
-
var t =
|
|
1274
|
+
function _t(e) {
|
|
1275
|
+
var t = Y(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
|
|
1109
1276
|
return /auto|scroll|overlay|hidden/.test(n + r + o);
|
|
1110
1277
|
}
|
|
1111
|
-
function
|
|
1112
|
-
return ["html", "body", "#document"].indexOf(
|
|
1278
|
+
function on(e) {
|
|
1279
|
+
return ["html", "body", "#document"].indexOf(X(e)) >= 0 ? e.ownerDocument.body : q(e) && _t(e) ? e : on(je(e));
|
|
1113
1280
|
}
|
|
1114
|
-
function
|
|
1281
|
+
function Ae(e, t) {
|
|
1115
1282
|
var n;
|
|
1116
1283
|
t === void 0 && (t = []);
|
|
1117
|
-
var o =
|
|
1118
|
-
return r ?
|
|
1284
|
+
var o = on(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), i = V(o), u = r ? [i].concat(i.visualViewport || [], _t(o) ? o : []) : o, s = t.concat(u);
|
|
1285
|
+
return r ? s : (
|
|
1119
1286
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1120
|
-
|
|
1287
|
+
s.concat(Ae(je(u)))
|
|
1121
1288
|
);
|
|
1122
1289
|
}
|
|
1123
|
-
function
|
|
1290
|
+
function tt(e) {
|
|
1124
1291
|
return Object.assign({}, e, {
|
|
1125
1292
|
left: e.x,
|
|
1126
1293
|
top: e.y,
|
|
@@ -1128,51 +1295,51 @@ function Je(e) {
|
|
|
1128
1295
|
bottom: e.y + e.height
|
|
1129
1296
|
});
|
|
1130
1297
|
}
|
|
1131
|
-
function
|
|
1132
|
-
var n =
|
|
1298
|
+
function Co(e, t) {
|
|
1299
|
+
var n = he(e, !1, t === "fixed");
|
|
1133
1300
|
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
1134
1301
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return t ===
|
|
1302
|
+
function Dt(e, t, n) {
|
|
1303
|
+
return t === Kt ? tt(So(e, n)) : ue(t) ? Co(t, n) : tt(Uo(te(e)));
|
|
1137
1304
|
}
|
|
1138
|
-
function
|
|
1139
|
-
var t =
|
|
1140
|
-
return
|
|
1141
|
-
return
|
|
1305
|
+
function Ro(e) {
|
|
1306
|
+
var t = Ae(je(e)), n = ["absolute", "fixed"].indexOf(Y(e).position) >= 0, o = n && q(e) ? Ue(e) : e;
|
|
1307
|
+
return ue(o) ? t.filter(function(r) {
|
|
1308
|
+
return ue(r) && Qt(r, o) && X(r) !== "body";
|
|
1142
1309
|
}) : [];
|
|
1143
1310
|
}
|
|
1144
|
-
function
|
|
1145
|
-
var r = t === "clippingParents" ?
|
|
1146
|
-
var d =
|
|
1147
|
-
return l.top =
|
|
1148
|
-
},
|
|
1149
|
-
return
|
|
1311
|
+
function Do(e, t, n, o) {
|
|
1312
|
+
var r = t === "clippingParents" ? Ro(e) : [].concat(t), i = [].concat(r, [n]), u = i[0], s = i.reduce(function(l, c) {
|
|
1313
|
+
var d = Dt(e, c, o);
|
|
1314
|
+
return l.top = ce(d.top, l.top), l.right = Fe(d.right, l.right), l.bottom = Fe(d.bottom, l.bottom), l.left = ce(d.left, l.left), l;
|
|
1315
|
+
}, Dt(e, u, o));
|
|
1316
|
+
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
1150
1317
|
}
|
|
1151
|
-
function
|
|
1152
|
-
var t = e.reference, n = e.element, o = e.placement, r = o ?
|
|
1318
|
+
function rn(e) {
|
|
1319
|
+
var t = e.reference, n = e.element, o = e.placement, r = o ? z(o) : null, i = o ? me(o) : null, u = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l;
|
|
1153
1320
|
switch (r) {
|
|
1154
1321
|
case H:
|
|
1155
1322
|
l = {
|
|
1156
|
-
x:
|
|
1323
|
+
x: u,
|
|
1157
1324
|
y: t.y - n.height
|
|
1158
1325
|
};
|
|
1159
1326
|
break;
|
|
1160
1327
|
case F:
|
|
1161
1328
|
l = {
|
|
1162
|
-
x:
|
|
1329
|
+
x: u,
|
|
1163
1330
|
y: t.y + t.height
|
|
1164
1331
|
};
|
|
1165
1332
|
break;
|
|
1166
|
-
case
|
|
1333
|
+
case G:
|
|
1167
1334
|
l = {
|
|
1168
1335
|
x: t.x + t.width,
|
|
1169
|
-
y:
|
|
1336
|
+
y: s
|
|
1170
1337
|
};
|
|
1171
1338
|
break;
|
|
1172
1339
|
case x:
|
|
1173
1340
|
l = {
|
|
1174
1341
|
x: t.x - n.width,
|
|
1175
|
-
y:
|
|
1342
|
+
y: s
|
|
1176
1343
|
};
|
|
1177
1344
|
break;
|
|
1178
1345
|
default:
|
|
@@ -1181,128 +1348,128 @@ function nn(e) {
|
|
|
1181
1348
|
y: t.y
|
|
1182
1349
|
};
|
|
1183
1350
|
}
|
|
1184
|
-
var
|
|
1185
|
-
if (
|
|
1186
|
-
var d =
|
|
1351
|
+
var c = r ? dt(r) : null;
|
|
1352
|
+
if (c != null) {
|
|
1353
|
+
var d = c === "y" ? "height" : "width";
|
|
1187
1354
|
switch (i) {
|
|
1188
|
-
case
|
|
1189
|
-
l[
|
|
1355
|
+
case fe:
|
|
1356
|
+
l[c] = l[c] - (t[d] / 2 - n[d] / 2);
|
|
1190
1357
|
break;
|
|
1191
|
-
case
|
|
1192
|
-
l[
|
|
1358
|
+
case Le:
|
|
1359
|
+
l[c] = l[c] + (t[d] / 2 - n[d] / 2);
|
|
1193
1360
|
break;
|
|
1194
1361
|
}
|
|
1195
1362
|
}
|
|
1196
1363
|
return l;
|
|
1197
1364
|
}
|
|
1198
|
-
function
|
|
1365
|
+
function ye(e, t) {
|
|
1199
1366
|
t === void 0 && (t = {});
|
|
1200
|
-
var n = t, o = n.placement, r = o === void 0 ? e.placement : o, i = n.strategy,
|
|
1201
|
-
reference:
|
|
1202
|
-
element:
|
|
1367
|
+
var n = t, o = n.placement, r = o === void 0 ? e.placement : o, i = n.strategy, u = i === void 0 ? e.strategy : i, s = n.boundary, l = s === void 0 ? to : s, c = n.rootBoundary, d = c === void 0 ? Kt : c, h = n.elementContext, f = h === void 0 ? Ie : h, _ = n.altBoundary, m = _ === void 0 ? !1 : _, E = n.padding, v = E === void 0 ? 0 : E, T = tn(typeof v != "number" ? v : nn(v, Se)), A = f === Ie ? no : Ie, L = e.rects.popper, b = e.elements[m ? A : f], I = Do(ue(b) ? b : b.contextElement || te(e.elements.popper), l, d, u), M = he(e.elements.reference), N = rn({
|
|
1368
|
+
reference: M,
|
|
1369
|
+
element: L,
|
|
1203
1370
|
strategy: "absolute",
|
|
1204
1371
|
placement: r
|
|
1205
|
-
}),
|
|
1206
|
-
top:
|
|
1207
|
-
bottom:
|
|
1208
|
-
left:
|
|
1209
|
-
right:
|
|
1210
|
-
},
|
|
1211
|
-
if (
|
|
1212
|
-
var
|
|
1213
|
-
Object.keys(
|
|
1214
|
-
var
|
|
1215
|
-
|
|
1372
|
+
}), S = tt(Object.assign({}, L, N)), U = f === Ie ? S : M, C = {
|
|
1373
|
+
top: I.top - U.top + T.top,
|
|
1374
|
+
bottom: U.bottom - I.bottom + T.bottom,
|
|
1375
|
+
left: I.left - U.left + T.left,
|
|
1376
|
+
right: U.right - I.right + T.right
|
|
1377
|
+
}, w = e.modifiersData.offset;
|
|
1378
|
+
if (f === Ie && w) {
|
|
1379
|
+
var D = w[r];
|
|
1380
|
+
Object.keys(C).forEach(function(B) {
|
|
1381
|
+
var ne = [G, F].indexOf(B) >= 0 ? 1 : -1, oe = [H, F].indexOf(B) >= 0 ? "y" : "x";
|
|
1382
|
+
C[B] += D[oe] * ne;
|
|
1216
1383
|
});
|
|
1217
1384
|
}
|
|
1218
|
-
return
|
|
1385
|
+
return C;
|
|
1219
1386
|
}
|
|
1220
|
-
function
|
|
1387
|
+
function Bo(e, t) {
|
|
1221
1388
|
t === void 0 && (t = {});
|
|
1222
|
-
var n = t, o = n.placement, r = n.boundary, i = n.rootBoundary,
|
|
1223
|
-
return
|
|
1224
|
-
}) :
|
|
1225
|
-
return
|
|
1389
|
+
var n = t, o = n.placement, r = n.boundary, i = n.rootBoundary, u = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? Xt : l, d = me(o), h = d ? s ? St : St.filter(function(m) {
|
|
1390
|
+
return me(m) === d;
|
|
1391
|
+
}) : Se, f = h.filter(function(m) {
|
|
1392
|
+
return c.indexOf(m) >= 0;
|
|
1226
1393
|
});
|
|
1227
|
-
|
|
1228
|
-
var
|
|
1229
|
-
return m[
|
|
1230
|
-
placement:
|
|
1394
|
+
f.length === 0 && (f = h, {}.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")));
|
|
1395
|
+
var _ = f.reduce(function(m, E) {
|
|
1396
|
+
return m[E] = ye(e, {
|
|
1397
|
+
placement: E,
|
|
1231
1398
|
boundary: r,
|
|
1232
1399
|
rootBoundary: i,
|
|
1233
|
-
padding:
|
|
1234
|
-
})[
|
|
1400
|
+
padding: u
|
|
1401
|
+
})[z(E)], m;
|
|
1235
1402
|
}, {});
|
|
1236
|
-
return Object.keys(
|
|
1237
|
-
return
|
|
1403
|
+
return Object.keys(_).sort(function(m, E) {
|
|
1404
|
+
return _[m] - _[E];
|
|
1238
1405
|
});
|
|
1239
1406
|
}
|
|
1240
|
-
function
|
|
1241
|
-
if (
|
|
1407
|
+
function Ho(e) {
|
|
1408
|
+
if (z(e) === $e)
|
|
1242
1409
|
return [];
|
|
1243
|
-
var t =
|
|
1244
|
-
return [
|
|
1410
|
+
var t = qe(e);
|
|
1411
|
+
return [Rt(e), t, Rt(t)];
|
|
1245
1412
|
}
|
|
1246
|
-
function
|
|
1413
|
+
function xo(e) {
|
|
1247
1414
|
var t = e.state, n = e.options, o = e.name;
|
|
1248
1415
|
if (!t.modifiersData[o]._skip) {
|
|
1249
|
-
for (var r = n.mainAxis, i = r === void 0 ? !0 : r,
|
|
1250
|
-
return
|
|
1251
|
-
placement:
|
|
1416
|
+
for (var r = n.mainAxis, i = r === void 0 ? !0 : r, u = n.altAxis, s = u === void 0 ? !0 : u, l = n.fallbackPlacements, c = n.padding, d = n.boundary, h = n.rootBoundary, f = n.altBoundary, _ = n.flipVariations, m = _ === void 0 ? !0 : _, E = n.allowedAutoPlacements, v = t.options.placement, T = z(v), A = T === v, L = l || (A || !m ? [qe(v)] : Ho(v)), b = [v].concat(L).reduce(function(de, J) {
|
|
1417
|
+
return de.concat(z(J) === $e ? Bo(t, {
|
|
1418
|
+
placement: J,
|
|
1252
1419
|
boundary: d,
|
|
1253
|
-
rootBoundary:
|
|
1254
|
-
padding:
|
|
1420
|
+
rootBoundary: h,
|
|
1421
|
+
padding: c,
|
|
1255
1422
|
flipVariations: m,
|
|
1256
|
-
allowedAutoPlacements:
|
|
1257
|
-
}) :
|
|
1258
|
-
}, []),
|
|
1259
|
-
var
|
|
1260
|
-
placement:
|
|
1423
|
+
allowedAutoPlacements: E
|
|
1424
|
+
}) : J);
|
|
1425
|
+
}, []), I = t.rects.reference, M = t.rects.popper, N = /* @__PURE__ */ new Map(), S = !0, U = b[0], C = 0; C < b.length; C++) {
|
|
1426
|
+
var w = b[C], D = z(w), B = me(w) === fe, ne = [H, F].indexOf(D) >= 0, oe = ne ? "width" : "height", W = ye(t, {
|
|
1427
|
+
placement: w,
|
|
1261
1428
|
boundary: d,
|
|
1262
|
-
rootBoundary:
|
|
1263
|
-
altBoundary:
|
|
1264
|
-
padding:
|
|
1265
|
-
}),
|
|
1266
|
-
|
|
1267
|
-
var
|
|
1268
|
-
if (i &&
|
|
1269
|
-
return
|
|
1429
|
+
rootBoundary: h,
|
|
1430
|
+
altBoundary: f,
|
|
1431
|
+
padding: c
|
|
1432
|
+
}), $ = ne ? B ? G : x : B ? F : H;
|
|
1433
|
+
I[oe] > M[oe] && ($ = qe($));
|
|
1434
|
+
var Ce = qe($), re = [];
|
|
1435
|
+
if (i && re.push(W[D] <= 0), s && re.push(W[$] <= 0, W[Ce] <= 0), re.every(function(de) {
|
|
1436
|
+
return de;
|
|
1270
1437
|
})) {
|
|
1271
|
-
|
|
1438
|
+
U = w, S = !1;
|
|
1272
1439
|
break;
|
|
1273
1440
|
}
|
|
1274
|
-
|
|
1441
|
+
N.set(w, re);
|
|
1275
1442
|
}
|
|
1276
|
-
if (
|
|
1277
|
-
for (var
|
|
1278
|
-
var
|
|
1279
|
-
var
|
|
1280
|
-
if (
|
|
1281
|
-
return
|
|
1282
|
-
return
|
|
1443
|
+
if (S)
|
|
1444
|
+
for (var Re = m ? 3 : 1, ze = function(J) {
|
|
1445
|
+
var be = b.find(function(Be) {
|
|
1446
|
+
var ie = N.get(Be);
|
|
1447
|
+
if (ie)
|
|
1448
|
+
return ie.slice(0, J).every(function(Ye) {
|
|
1449
|
+
return Ye;
|
|
1283
1450
|
});
|
|
1284
1451
|
});
|
|
1285
|
-
if (
|
|
1286
|
-
return
|
|
1287
|
-
}, ve =
|
|
1288
|
-
var
|
|
1289
|
-
if (
|
|
1452
|
+
if (be)
|
|
1453
|
+
return U = be, "break";
|
|
1454
|
+
}, ve = Re; ve > 0; ve--) {
|
|
1455
|
+
var De = ze(ve);
|
|
1456
|
+
if (De === "break")
|
|
1290
1457
|
break;
|
|
1291
1458
|
}
|
|
1292
|
-
t.placement !==
|
|
1459
|
+
t.placement !== U && (t.modifiersData[o]._skip = !0, t.placement = U, t.reset = !0);
|
|
1293
1460
|
}
|
|
1294
1461
|
}
|
|
1295
|
-
const
|
|
1462
|
+
const Wo = {
|
|
1296
1463
|
name: "flip",
|
|
1297
1464
|
enabled: !0,
|
|
1298
1465
|
phase: "main",
|
|
1299
|
-
fn:
|
|
1466
|
+
fn: xo,
|
|
1300
1467
|
requiresIfExists: ["offset"],
|
|
1301
1468
|
data: {
|
|
1302
1469
|
_skip: !1
|
|
1303
1470
|
}
|
|
1304
1471
|
};
|
|
1305
|
-
function
|
|
1472
|
+
function Bt(e, t, n) {
|
|
1306
1473
|
return n === void 0 && (n = {
|
|
1307
1474
|
x: 0,
|
|
1308
1475
|
y: 0
|
|
@@ -1314,158 +1481,158 @@ function Dt(e, t, n) {
|
|
|
1314
1481
|
};
|
|
1315
1482
|
}
|
|
1316
1483
|
function Ht(e) {
|
|
1317
|
-
return [H,
|
|
1484
|
+
return [H, G, F, x].some(function(t) {
|
|
1318
1485
|
return e[t] >= 0;
|
|
1319
1486
|
});
|
|
1320
1487
|
}
|
|
1321
|
-
function
|
|
1322
|
-
var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, i = t.modifiersData.preventOverflow,
|
|
1488
|
+
function ko(e) {
|
|
1489
|
+
var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, i = t.modifiersData.preventOverflow, u = ye(t, {
|
|
1323
1490
|
elementContext: "reference"
|
|
1324
|
-
}),
|
|
1491
|
+
}), s = ye(t, {
|
|
1325
1492
|
altBoundary: !0
|
|
1326
|
-
}), l =
|
|
1493
|
+
}), l = Bt(u, o), c = Bt(s, r, i), d = Ht(l), h = Ht(c);
|
|
1327
1494
|
t.modifiersData[n] = {
|
|
1328
1495
|
referenceClippingOffsets: l,
|
|
1329
|
-
popperEscapeOffsets:
|
|
1496
|
+
popperEscapeOffsets: c,
|
|
1330
1497
|
isReferenceHidden: d,
|
|
1331
|
-
hasPopperEscaped:
|
|
1498
|
+
hasPopperEscaped: h
|
|
1332
1499
|
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1333
1500
|
"data-popper-reference-hidden": d,
|
|
1334
|
-
"data-popper-escaped":
|
|
1501
|
+
"data-popper-escaped": h
|
|
1335
1502
|
});
|
|
1336
1503
|
}
|
|
1337
|
-
const
|
|
1504
|
+
const qo = {
|
|
1338
1505
|
name: "hide",
|
|
1339
1506
|
enabled: !0,
|
|
1340
1507
|
phase: "main",
|
|
1341
1508
|
requiresIfExists: ["preventOverflow"],
|
|
1342
|
-
fn:
|
|
1509
|
+
fn: ko
|
|
1343
1510
|
};
|
|
1344
|
-
function
|
|
1345
|
-
var o =
|
|
1511
|
+
function Vo(e, t, n) {
|
|
1512
|
+
var o = z(e), r = [x, H].indexOf(o) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, t, {
|
|
1346
1513
|
placement: e
|
|
1347
|
-
})) : n,
|
|
1348
|
-
return
|
|
1349
|
-
x:
|
|
1350
|
-
y:
|
|
1514
|
+
})) : n, u = i[0], s = i[1];
|
|
1515
|
+
return u = u || 0, s = (s || 0) * r, [x, G].indexOf(o) >= 0 ? {
|
|
1516
|
+
x: s,
|
|
1517
|
+
y: u
|
|
1351
1518
|
} : {
|
|
1352
|
-
x:
|
|
1353
|
-
y:
|
|
1519
|
+
x: u,
|
|
1520
|
+
y: s
|
|
1354
1521
|
};
|
|
1355
1522
|
}
|
|
1356
|
-
function
|
|
1357
|
-
var t = e.state, n = e.options, o = e.name, r = n.offset, i = r === void 0 ? [0, 0] : r,
|
|
1358
|
-
return d[
|
|
1359
|
-
}, {}),
|
|
1360
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y +=
|
|
1523
|
+
function Fo(e) {
|
|
1524
|
+
var t = e.state, n = e.options, o = e.name, r = n.offset, i = r === void 0 ? [0, 0] : r, u = Xt.reduce(function(d, h) {
|
|
1525
|
+
return d[h] = Vo(h, t.rects, i), d;
|
|
1526
|
+
}, {}), s = u[t.placement], l = s.x, c = s.y;
|
|
1527
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[o] = u;
|
|
1361
1528
|
}
|
|
1362
|
-
const
|
|
1529
|
+
const Go = {
|
|
1363
1530
|
name: "offset",
|
|
1364
1531
|
enabled: !0,
|
|
1365
1532
|
phase: "main",
|
|
1366
1533
|
requires: ["popperOffsets"],
|
|
1367
|
-
fn:
|
|
1534
|
+
fn: Fo
|
|
1368
1535
|
};
|
|
1369
|
-
function
|
|
1536
|
+
function $o(e) {
|
|
1370
1537
|
var t = e.state, n = e.name;
|
|
1371
|
-
t.modifiersData[n] =
|
|
1538
|
+
t.modifiersData[n] = rn({
|
|
1372
1539
|
reference: t.rects.reference,
|
|
1373
1540
|
element: t.rects.popper,
|
|
1374
1541
|
strategy: "absolute",
|
|
1375
1542
|
placement: t.placement
|
|
1376
1543
|
});
|
|
1377
1544
|
}
|
|
1378
|
-
const
|
|
1545
|
+
const jo = {
|
|
1379
1546
|
name: "popperOffsets",
|
|
1380
1547
|
enabled: !0,
|
|
1381
1548
|
phase: "read",
|
|
1382
|
-
fn:
|
|
1549
|
+
fn: $o,
|
|
1383
1550
|
data: {}
|
|
1384
1551
|
};
|
|
1385
|
-
function
|
|
1552
|
+
function zo(e) {
|
|
1386
1553
|
return e === "x" ? "y" : "x";
|
|
1387
1554
|
}
|
|
1388
|
-
function
|
|
1389
|
-
var t = e.state, n = e.options, o = e.name, r = n.mainAxis, i = r === void 0 ? !0 : r,
|
|
1555
|
+
function Yo(e) {
|
|
1556
|
+
var t = e.state, n = e.options, o = e.name, r = n.mainAxis, i = r === void 0 ? !0 : r, u = n.altAxis, s = u === void 0 ? !1 : u, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, h = n.padding, f = n.tether, _ = f === void 0 ? !0 : f, m = n.tetherOffset, E = m === void 0 ? 0 : m, v = ye(t, {
|
|
1390
1557
|
boundary: l,
|
|
1391
|
-
rootBoundary:
|
|
1392
|
-
padding:
|
|
1558
|
+
rootBoundary: c,
|
|
1559
|
+
padding: h,
|
|
1393
1560
|
altBoundary: d
|
|
1394
|
-
}), T =
|
|
1561
|
+
}), T = z(t.placement), A = me(t.placement), L = !A, b = dt(T), I = zo(b), M = t.modifiersData.popperOffsets, N = t.rects.reference, S = t.rects.popper, U = typeof E == "function" ? E(Object.assign({}, t.rects, {
|
|
1395
1562
|
placement: t.placement
|
|
1396
|
-
})) :
|
|
1397
|
-
mainAxis:
|
|
1398
|
-
altAxis:
|
|
1563
|
+
})) : E, C = typeof U == "number" ? {
|
|
1564
|
+
mainAxis: U,
|
|
1565
|
+
altAxis: U
|
|
1399
1566
|
} : Object.assign({
|
|
1400
1567
|
mainAxis: 0,
|
|
1401
1568
|
altAxis: 0
|
|
1402
|
-
},
|
|
1569
|
+
}, U), w = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, D = {
|
|
1403
1570
|
x: 0,
|
|
1404
1571
|
y: 0
|
|
1405
1572
|
};
|
|
1406
|
-
if (
|
|
1573
|
+
if (M) {
|
|
1407
1574
|
if (i) {
|
|
1408
|
-
var
|
|
1575
|
+
var B, ne = b === "y" ? H : x, oe = b === "y" ? F : G, W = b === "y" ? "height" : "width", $ = M[b], Ce = $ + v[ne], re = $ - v[oe], Re = _ ? -S[W] / 2 : 0, ze = A === fe ? N[W] : S[W], ve = A === fe ? -S[W] : -N[W], De = t.elements.arrow, de = _ && De ? ut(De) : {
|
|
1409
1576
|
width: 0,
|
|
1410
1577
|
height: 0
|
|
1411
|
-
},
|
|
1412
|
-
|
|
1578
|
+
}, J = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : en(), be = J[ne], Be = J[oe], ie = Me(0, N[W], de[W]), Ye = L ? N[W] / 2 - Re - ie - be - C.mainAxis : ze - ie - be - C.mainAxis, _n = L ? -N[W] / 2 + Re + ie + Be + C.mainAxis : ve + ie + Be + C.mainAxis, Ze = t.elements.arrow && Ue(t.elements.arrow), hn = Ze ? b === "y" ? Ze.clientTop || 0 : Ze.clientLeft || 0 : 0, vt = (B = w == null ? void 0 : w[b]) != null ? B : 0, mn = $ + Ye - vt - hn, En = $ + _n - vt, bt = Me(_ ? Fe(Ce, mn) : Ce, $, _ ? ce(re, En) : re);
|
|
1579
|
+
M[b] = bt, D[b] = bt - $;
|
|
1413
1580
|
}
|
|
1414
|
-
if (
|
|
1415
|
-
var
|
|
1416
|
-
|
|
1581
|
+
if (s) {
|
|
1582
|
+
var It, vn = b === "x" ? H : x, bn = b === "x" ? F : G, ae = M[I], He = I === "y" ? "height" : "width", gt = ae + v[vn], Tt = ae - v[bn], Ke = [H, x].indexOf(T) !== -1, Mt = (It = w == null ? void 0 : w[I]) != null ? It : 0, At = Ke ? gt : ae - N[He] - S[He] - Mt + C.altAxis, Ot = Ke ? ae + N[He] + S[He] - Mt - C.altAxis : Tt, wt = _ && Ke ? vo(At, ae, Ot) : Me(_ ? At : gt, ae, _ ? Ot : Tt);
|
|
1583
|
+
M[I] = wt, D[I] = wt - ae;
|
|
1417
1584
|
}
|
|
1418
|
-
t.modifiersData[o] =
|
|
1585
|
+
t.modifiersData[o] = D;
|
|
1419
1586
|
}
|
|
1420
1587
|
}
|
|
1421
|
-
const
|
|
1588
|
+
const Zo = {
|
|
1422
1589
|
name: "preventOverflow",
|
|
1423
1590
|
enabled: !0,
|
|
1424
1591
|
phase: "main",
|
|
1425
|
-
fn:
|
|
1592
|
+
fn: Yo,
|
|
1426
1593
|
requiresIfExists: ["offset"]
|
|
1427
1594
|
};
|
|
1428
|
-
function
|
|
1595
|
+
function Ko(e) {
|
|
1429
1596
|
return {
|
|
1430
1597
|
scrollLeft: e.scrollLeft,
|
|
1431
1598
|
scrollTop: e.scrollTop
|
|
1432
1599
|
};
|
|
1433
1600
|
}
|
|
1434
|
-
function
|
|
1435
|
-
return e ===
|
|
1601
|
+
function Xo(e) {
|
|
1602
|
+
return e === V(e) || !q(e) ? pt(e) : Ko(e);
|
|
1436
1603
|
}
|
|
1437
|
-
function
|
|
1438
|
-
var t = e.getBoundingClientRect(), n =
|
|
1604
|
+
function Jo(e) {
|
|
1605
|
+
var t = e.getBoundingClientRect(), n = _e(t.width) / e.offsetWidth || 1, o = _e(t.height) / e.offsetHeight || 1;
|
|
1439
1606
|
return n !== 1 || o !== 1;
|
|
1440
1607
|
}
|
|
1441
|
-
function
|
|
1608
|
+
function Qo(e, t, n) {
|
|
1442
1609
|
n === void 0 && (n = !1);
|
|
1443
|
-
var o =
|
|
1610
|
+
var o = q(t), r = q(t) && Jo(t), i = te(t), u = he(e, r, n), s = {
|
|
1444
1611
|
scrollLeft: 0,
|
|
1445
1612
|
scrollTop: 0
|
|
1446
1613
|
}, l = {
|
|
1447
1614
|
x: 0,
|
|
1448
1615
|
y: 0
|
|
1449
1616
|
};
|
|
1450
|
-
return (o || !o && !n) && ((
|
|
1451
|
-
|
|
1452
|
-
x:
|
|
1453
|
-
y:
|
|
1454
|
-
width:
|
|
1455
|
-
height:
|
|
1617
|
+
return (o || !o && !n) && ((X(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1618
|
+
_t(i)) && (s = Xo(t)), q(t) ? (l = he(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : i && (l.x = ft(i))), {
|
|
1619
|
+
x: u.left + s.scrollLeft - l.x,
|
|
1620
|
+
y: u.top + s.scrollTop - l.y,
|
|
1621
|
+
width: u.width,
|
|
1622
|
+
height: u.height
|
|
1456
1623
|
};
|
|
1457
1624
|
}
|
|
1458
|
-
function
|
|
1625
|
+
function er(e) {
|
|
1459
1626
|
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = [];
|
|
1460
1627
|
e.forEach(function(i) {
|
|
1461
1628
|
t.set(i.name, i);
|
|
1462
1629
|
});
|
|
1463
1630
|
function r(i) {
|
|
1464
1631
|
n.add(i.name);
|
|
1465
|
-
var
|
|
1466
|
-
|
|
1467
|
-
if (!n.has(
|
|
1468
|
-
var l = t.get(
|
|
1632
|
+
var u = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
1633
|
+
u.forEach(function(s) {
|
|
1634
|
+
if (!n.has(s)) {
|
|
1635
|
+
var l = t.get(s);
|
|
1469
1636
|
l && r(l);
|
|
1470
1637
|
}
|
|
1471
1638
|
}), o.push(i);
|
|
@@ -1474,15 +1641,15 @@ function Ko(e) {
|
|
|
1474
1641
|
n.has(i.name) || r(i);
|
|
1475
1642
|
}), o;
|
|
1476
1643
|
}
|
|
1477
|
-
function
|
|
1478
|
-
var t =
|
|
1479
|
-
return
|
|
1644
|
+
function tr(e) {
|
|
1645
|
+
var t = er(e);
|
|
1646
|
+
return Qe.reduce(function(n, o) {
|
|
1480
1647
|
return n.concat(t.filter(function(r) {
|
|
1481
1648
|
return r.phase === o;
|
|
1482
1649
|
}));
|
|
1483
1650
|
}, []);
|
|
1484
1651
|
}
|
|
1485
|
-
function
|
|
1652
|
+
function nr(e) {
|
|
1486
1653
|
var t;
|
|
1487
1654
|
return function() {
|
|
1488
1655
|
return t || (t = new Promise(function(n) {
|
|
@@ -1492,40 +1659,40 @@ function Xo(e) {
|
|
|
1492
1659
|
})), t;
|
|
1493
1660
|
};
|
|
1494
1661
|
}
|
|
1495
|
-
function
|
|
1662
|
+
function Q(e) {
|
|
1496
1663
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
1497
1664
|
n[o - 1] = arguments[o];
|
|
1498
1665
|
return [].concat(n).reduce(function(r, i) {
|
|
1499
1666
|
return r.replace(/%s/, i);
|
|
1500
1667
|
}, e);
|
|
1501
1668
|
}
|
|
1502
|
-
var
|
|
1503
|
-
function
|
|
1669
|
+
var le = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', or = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', xt = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
|
|
1670
|
+
function rr(e) {
|
|
1504
1671
|
e.forEach(function(t) {
|
|
1505
1672
|
[].concat(Object.keys(t), xt).filter(function(n, o, r) {
|
|
1506
1673
|
return r.indexOf(n) === o;
|
|
1507
1674
|
}).forEach(function(n) {
|
|
1508
1675
|
switch (n) {
|
|
1509
1676
|
case "name":
|
|
1510
|
-
typeof t.name != "string" && console.error(
|
|
1677
|
+
typeof t.name != "string" && console.error(Q(le, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"'));
|
|
1511
1678
|
break;
|
|
1512
1679
|
case "enabled":
|
|
1513
|
-
typeof t.enabled != "boolean" && console.error(
|
|
1680
|
+
typeof t.enabled != "boolean" && console.error(Q(le, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"'));
|
|
1514
1681
|
break;
|
|
1515
1682
|
case "phase":
|
|
1516
|
-
|
|
1683
|
+
Qe.indexOf(t.phase) < 0 && console.error(Q(le, t.name, '"phase"', "either " + Qe.join(", "), '"' + String(t.phase) + '"'));
|
|
1517
1684
|
break;
|
|
1518
1685
|
case "fn":
|
|
1519
|
-
typeof t.fn != "function" && console.error(
|
|
1686
|
+
typeof t.fn != "function" && console.error(Q(le, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"'));
|
|
1520
1687
|
break;
|
|
1521
1688
|
case "effect":
|
|
1522
|
-
t.effect != null && typeof t.effect != "function" && console.error(
|
|
1689
|
+
t.effect != null && typeof t.effect != "function" && console.error(Q(le, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"'));
|
|
1523
1690
|
break;
|
|
1524
1691
|
case "requires":
|
|
1525
|
-
t.requires != null && !Array.isArray(t.requires) && console.error(
|
|
1692
|
+
t.requires != null && !Array.isArray(t.requires) && console.error(Q(le, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"'));
|
|
1526
1693
|
break;
|
|
1527
1694
|
case "requiresIfExists":
|
|
1528
|
-
Array.isArray(t.requiresIfExists) || console.error(
|
|
1695
|
+
Array.isArray(t.requiresIfExists) || console.error(Q(le, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"'));
|
|
1529
1696
|
break;
|
|
1530
1697
|
case "options":
|
|
1531
1698
|
case "data":
|
|
@@ -1538,12 +1705,12 @@ function Qo(e) {
|
|
|
1538
1705
|
t.requires && t.requires.forEach(function(o) {
|
|
1539
1706
|
e.find(function(r) {
|
|
1540
1707
|
return r.name === o;
|
|
1541
|
-
}) == null && console.error(
|
|
1708
|
+
}) == null && console.error(Q(or, String(t.name), o, o));
|
|
1542
1709
|
});
|
|
1543
1710
|
});
|
|
1544
1711
|
});
|
|
1545
1712
|
}
|
|
1546
|
-
function
|
|
1713
|
+
function ir(e, t) {
|
|
1547
1714
|
var n = /* @__PURE__ */ new Set();
|
|
1548
1715
|
return e.filter(function(o) {
|
|
1549
1716
|
var r = t(o);
|
|
@@ -1551,7 +1718,7 @@ function er(e, t) {
|
|
|
1551
1718
|
return n.add(r), !0;
|
|
1552
1719
|
});
|
|
1553
1720
|
}
|
|
1554
|
-
function
|
|
1721
|
+
function ar(e) {
|
|
1555
1722
|
var t = e.reduce(function(n, o) {
|
|
1556
1723
|
var r = n[o.name];
|
|
1557
1724
|
return n[o.name] = r ? Object.assign({}, r, o, {
|
|
@@ -1563,63 +1730,63 @@ function tr(e) {
|
|
|
1563
1730
|
return t[n];
|
|
1564
1731
|
});
|
|
1565
1732
|
}
|
|
1566
|
-
var
|
|
1733
|
+
var Wt = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", sr = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", kt = {
|
|
1567
1734
|
placement: "bottom",
|
|
1568
1735
|
modifiers: [],
|
|
1569
1736
|
strategy: "absolute"
|
|
1570
1737
|
};
|
|
1571
|
-
function
|
|
1738
|
+
function qt() {
|
|
1572
1739
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
1573
1740
|
t[n] = arguments[n];
|
|
1574
1741
|
return !t.some(function(o) {
|
|
1575
1742
|
return !(o && typeof o.getBoundingClientRect == "function");
|
|
1576
1743
|
});
|
|
1577
1744
|
}
|
|
1578
|
-
function
|
|
1745
|
+
function lr(e) {
|
|
1579
1746
|
e === void 0 && (e = {});
|
|
1580
1747
|
var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, r = t.defaultOptions, i = r === void 0 ? kt : r;
|
|
1581
|
-
return function(
|
|
1582
|
-
|
|
1748
|
+
return function(s, l, c) {
|
|
1749
|
+
c === void 0 && (c = i);
|
|
1583
1750
|
var d = {
|
|
1584
1751
|
placement: "bottom",
|
|
1585
1752
|
orderedModifiers: [],
|
|
1586
1753
|
options: Object.assign({}, kt, i),
|
|
1587
1754
|
modifiersData: {},
|
|
1588
1755
|
elements: {
|
|
1589
|
-
reference:
|
|
1756
|
+
reference: s,
|
|
1590
1757
|
popper: l
|
|
1591
1758
|
},
|
|
1592
1759
|
attributes: {},
|
|
1593
1760
|
styles: {}
|
|
1594
|
-
},
|
|
1761
|
+
}, h = [], f = !1, _ = {
|
|
1595
1762
|
state: d,
|
|
1596
1763
|
setOptions: function(T) {
|
|
1597
|
-
var
|
|
1598
|
-
|
|
1599
|
-
reference:
|
|
1600
|
-
popper:
|
|
1764
|
+
var A = typeof T == "function" ? T(d.options) : T;
|
|
1765
|
+
E(), d.options = Object.assign({}, i, d.options, A), d.scrollParents = {
|
|
1766
|
+
reference: ue(s) ? Ae(s) : s.contextElement ? Ae(s.contextElement) : [],
|
|
1767
|
+
popper: Ae(l)
|
|
1601
1768
|
};
|
|
1602
|
-
var
|
|
1603
|
-
if (d.orderedModifiers =
|
|
1604
|
-
return
|
|
1769
|
+
var L = tr(ar([].concat(o, d.options.modifiers)));
|
|
1770
|
+
if (d.orderedModifiers = L.filter(function(w) {
|
|
1771
|
+
return w.enabled;
|
|
1605
1772
|
}), {}.NODE_ENV !== "production") {
|
|
1606
|
-
var
|
|
1607
|
-
var
|
|
1608
|
-
return
|
|
1773
|
+
var b = ir([].concat(L, d.options.modifiers), function(w) {
|
|
1774
|
+
var D = w.name;
|
|
1775
|
+
return D;
|
|
1609
1776
|
});
|
|
1610
|
-
if (
|
|
1611
|
-
var
|
|
1612
|
-
var
|
|
1613
|
-
return
|
|
1777
|
+
if (rr(b), z(d.options.placement) === $e) {
|
|
1778
|
+
var I = d.orderedModifiers.find(function(w) {
|
|
1779
|
+
var D = w.name;
|
|
1780
|
+
return D === "flip";
|
|
1614
1781
|
});
|
|
1615
|
-
|
|
1782
|
+
I || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
|
|
1616
1783
|
}
|
|
1617
|
-
var
|
|
1618
|
-
[
|
|
1619
|
-
return parseFloat(
|
|
1784
|
+
var M = Y(l), N = M.marginTop, S = M.marginRight, U = M.marginBottom, C = M.marginLeft;
|
|
1785
|
+
[N, S, U, C].some(function(w) {
|
|
1786
|
+
return parseFloat(w);
|
|
1620
1787
|
}) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
|
|
1621
1788
|
}
|
|
1622
|
-
return m(),
|
|
1789
|
+
return m(), _.update();
|
|
1623
1790
|
},
|
|
1624
1791
|
// Sync update – it will always be executed, even if not necessary. This
|
|
1625
1792
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -1627,233 +1794,233 @@ function or(e) {
|
|
|
1627
1794
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1628
1795
|
// prefer the async Popper#update method
|
|
1629
1796
|
forceUpdate: function() {
|
|
1630
|
-
if (!
|
|
1631
|
-
var T = d.elements,
|
|
1632
|
-
if (!
|
|
1633
|
-
({}).NODE_ENV !== "production" && console.error(
|
|
1797
|
+
if (!f) {
|
|
1798
|
+
var T = d.elements, A = T.reference, L = T.popper;
|
|
1799
|
+
if (!qt(A, L)) {
|
|
1800
|
+
({}).NODE_ENV !== "production" && console.error(Wt);
|
|
1634
1801
|
return;
|
|
1635
1802
|
}
|
|
1636
1803
|
d.rects = {
|
|
1637
|
-
reference:
|
|
1638
|
-
popper:
|
|
1639
|
-
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(
|
|
1640
|
-
return d.modifiersData[
|
|
1804
|
+
reference: Qo(A, Ue(L), d.options.strategy === "fixed"),
|
|
1805
|
+
popper: ut(L)
|
|
1806
|
+
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(w) {
|
|
1807
|
+
return d.modifiersData[w.name] = Object.assign({}, w.data);
|
|
1641
1808
|
});
|
|
1642
|
-
for (var
|
|
1643
|
-
if ({}.NODE_ENV !== "production" && (
|
|
1644
|
-
console.error(
|
|
1809
|
+
for (var b = 0, I = 0; I < d.orderedModifiers.length; I++) {
|
|
1810
|
+
if ({}.NODE_ENV !== "production" && (b += 1, b > 100)) {
|
|
1811
|
+
console.error(sr);
|
|
1645
1812
|
break;
|
|
1646
1813
|
}
|
|
1647
1814
|
if (d.reset === !0) {
|
|
1648
|
-
d.reset = !1,
|
|
1815
|
+
d.reset = !1, I = -1;
|
|
1649
1816
|
continue;
|
|
1650
1817
|
}
|
|
1651
|
-
var
|
|
1652
|
-
typeof
|
|
1818
|
+
var M = d.orderedModifiers[I], N = M.fn, S = M.options, U = S === void 0 ? {} : S, C = M.name;
|
|
1819
|
+
typeof N == "function" && (d = N({
|
|
1653
1820
|
state: d,
|
|
1654
|
-
options:
|
|
1655
|
-
name:
|
|
1656
|
-
instance:
|
|
1821
|
+
options: U,
|
|
1822
|
+
name: C,
|
|
1823
|
+
instance: _
|
|
1657
1824
|
}) || d);
|
|
1658
1825
|
}
|
|
1659
1826
|
}
|
|
1660
1827
|
},
|
|
1661
1828
|
// Async and optimistically optimized update – it will not be executed if
|
|
1662
1829
|
// not necessary (debounced to run at most once-per-tick)
|
|
1663
|
-
update:
|
|
1830
|
+
update: nr(function() {
|
|
1664
1831
|
return new Promise(function(v) {
|
|
1665
|
-
|
|
1832
|
+
_.forceUpdate(), v(d);
|
|
1666
1833
|
});
|
|
1667
1834
|
}),
|
|
1668
1835
|
destroy: function() {
|
|
1669
|
-
|
|
1836
|
+
E(), f = !0;
|
|
1670
1837
|
}
|
|
1671
1838
|
};
|
|
1672
|
-
if (!
|
|
1673
|
-
return {}.NODE_ENV !== "production" && console.error(
|
|
1674
|
-
|
|
1675
|
-
!
|
|
1839
|
+
if (!qt(s, l))
|
|
1840
|
+
return {}.NODE_ENV !== "production" && console.error(Wt), _;
|
|
1841
|
+
_.setOptions(c).then(function(v) {
|
|
1842
|
+
!f && c.onFirstUpdate && c.onFirstUpdate(v);
|
|
1676
1843
|
});
|
|
1677
1844
|
function m() {
|
|
1678
1845
|
d.orderedModifiers.forEach(function(v) {
|
|
1679
|
-
var T = v.name,
|
|
1680
|
-
if (typeof
|
|
1681
|
-
var
|
|
1846
|
+
var T = v.name, A = v.options, L = A === void 0 ? {} : A, b = v.effect;
|
|
1847
|
+
if (typeof b == "function") {
|
|
1848
|
+
var I = b({
|
|
1682
1849
|
state: d,
|
|
1683
1850
|
name: T,
|
|
1684
|
-
instance:
|
|
1685
|
-
options:
|
|
1686
|
-
}),
|
|
1851
|
+
instance: _,
|
|
1852
|
+
options: L
|
|
1853
|
+
}), M = function() {
|
|
1687
1854
|
};
|
|
1688
|
-
|
|
1855
|
+
h.push(I || M);
|
|
1689
1856
|
}
|
|
1690
1857
|
});
|
|
1691
1858
|
}
|
|
1692
|
-
function
|
|
1693
|
-
|
|
1859
|
+
function E() {
|
|
1860
|
+
h.forEach(function(v) {
|
|
1694
1861
|
return v();
|
|
1695
|
-
}),
|
|
1862
|
+
}), h = [];
|
|
1696
1863
|
}
|
|
1697
|
-
return
|
|
1864
|
+
return _;
|
|
1698
1865
|
};
|
|
1699
1866
|
}
|
|
1700
|
-
var
|
|
1701
|
-
defaultModifiers:
|
|
1867
|
+
var cr = [yo, jo, wo, ho, Go, Wo, Zo, To, qo], an = /* @__PURE__ */ lr({
|
|
1868
|
+
defaultModifiers: cr
|
|
1702
1869
|
});
|
|
1703
|
-
function
|
|
1870
|
+
function nt(e, t, n, o) {
|
|
1704
1871
|
t ? (e.classList.remove(o), e.classList.add(n)) : (e.classList.add(o), e.classList.remove(n));
|
|
1705
1872
|
}
|
|
1706
1873
|
let k;
|
|
1707
|
-
const ge = {},
|
|
1874
|
+
const ge = {}, ot = {
|
|
1708
1875
|
SHIFT: "shift-key"
|
|
1709
1876
|
};
|
|
1710
|
-
function
|
|
1877
|
+
function sn() {
|
|
1711
1878
|
k && (document.removeEventListener("click", k.globalOnClick), document.removeEventListener("keyup", k.globalOnKeyup), document.removeEventListener("keydown", k.globalOnKeydown), k = null);
|
|
1712
1879
|
}
|
|
1713
|
-
function
|
|
1880
|
+
function rt() {
|
|
1714
1881
|
const e = document.querySelectorAll(
|
|
1715
|
-
`${
|
|
1882
|
+
`${p(a.UTAH_DESIGN_SYSTEM)} ${p(a.POPUP_WRAPPER)}`
|
|
1716
1883
|
);
|
|
1717
|
-
Array.from(e).filter((t) => !t.classList.contains(
|
|
1884
|
+
Array.from(e).filter((t) => !t.classList.contains(a.POPUP__HIDDEN)).forEach((t) => {
|
|
1718
1885
|
const n = t.getAttribute("id");
|
|
1719
1886
|
if (n) {
|
|
1720
1887
|
const o = document.querySelector(`[aria-controls="${n}"]`);
|
|
1721
1888
|
o && o.setAttribute("aria-expanded", "false");
|
|
1722
1889
|
}
|
|
1723
|
-
|
|
1890
|
+
nt(t, !1, a.POPUP__VISIBLE, a.POPUP__HIDDEN);
|
|
1724
1891
|
});
|
|
1725
1892
|
}
|
|
1726
|
-
function
|
|
1727
|
-
k &&
|
|
1728
|
-
e.key === "Escape" &&
|
|
1893
|
+
function ur() {
|
|
1894
|
+
k && sn(), k = {}, k.globalOnClick = rt, document.addEventListener("click", k.globalOnClick), k.globalOnKeyup = (e) => {
|
|
1895
|
+
e.key === "Escape" && rt(), e.shiftKey || (ge[ot.SHIFT] = !1), ge[e.key] = !1;
|
|
1729
1896
|
}, document.addEventListener("keyup", k.globalOnKeyup), k.globalOnKeydown = (e) => {
|
|
1730
|
-
e.shiftKey && (ge[
|
|
1897
|
+
e.shiftKey && (ge[ot.SHIFT] = !0), ge[e.key] = !0;
|
|
1731
1898
|
}, document.addEventListener("keydown", k.globalOnKeydown);
|
|
1732
1899
|
}
|
|
1733
|
-
function
|
|
1900
|
+
function dr() {
|
|
1734
1901
|
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
1735
1902
|
}
|
|
1736
|
-
function
|
|
1737
|
-
let i = NaN,
|
|
1738
|
-
const
|
|
1903
|
+
function Pe(e, t, n, o, r) {
|
|
1904
|
+
let i = NaN, u = NaN;
|
|
1905
|
+
const s = 300, l = 150, c = 50;
|
|
1739
1906
|
t.setAttribute("aria-expanded", "false"), t.setAttribute("aria-haspopup", o);
|
|
1740
|
-
function d(
|
|
1741
|
-
clearTimeout(i), clearTimeout(
|
|
1907
|
+
function d(f) {
|
|
1908
|
+
clearTimeout(i), clearTimeout(u), (!(r != null && r.isPerformPopup) || r != null && r.isPerformPopup && r.isPerformPopup()) && (i = window.setTimeout(
|
|
1742
1909
|
() => {
|
|
1743
|
-
|
|
1744
|
-
placement: (r == null ? void 0 : r.popupPlacement) ||
|
|
1910
|
+
an(t, n, {
|
|
1911
|
+
placement: (r == null ? void 0 : r.popupPlacement) || lt.BOTTOM,
|
|
1745
1912
|
modifiers: [
|
|
1746
1913
|
{
|
|
1747
1914
|
name: "offset",
|
|
1748
1915
|
options: { offset: [0, 11] }
|
|
1749
1916
|
}
|
|
1750
1917
|
]
|
|
1751
|
-
}),
|
|
1918
|
+
}), nt(n, !0, a.POPUP__VISIBLE, a.POPUP__HIDDEN), t.setAttribute("aria-expanded", "true"), document.querySelectorAll(p(a.TOOLTIP__WRAPPER)).forEach((_) => _.classList.add(a.TOOLTIP__WRAPPER__HIDDEN));
|
|
1752
1919
|
},
|
|
1753
|
-
|
|
1920
|
+
f
|
|
1754
1921
|
));
|
|
1755
1922
|
}
|
|
1756
|
-
function
|
|
1757
|
-
clearTimeout(i), clearTimeout(
|
|
1923
|
+
function h(f) {
|
|
1924
|
+
clearTimeout(i), clearTimeout(u), (!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (u = window.setTimeout(
|
|
1758
1925
|
() => {
|
|
1759
|
-
|
|
1926
|
+
nt(n, !1, a.POPUP__VISIBLE, a.POPUP__HIDDEN), t.setAttribute("aria-expanded", "false");
|
|
1760
1927
|
},
|
|
1761
|
-
|
|
1928
|
+
f
|
|
1762
1929
|
));
|
|
1763
1930
|
}
|
|
1764
|
-
if (r != null && r.preventOnClickHandling || (e.addEventListener("focusin", () => d(l)), e.addEventListener("focusout", () =>
|
|
1931
|
+
if (r != null && r.preventOnClickHandling || (e.addEventListener("focusin", () => d(l)), e.addEventListener("focusout", () => h(l))), r != null && r.shouldFocusOnHover && (e.addEventListener("mouseenter", () => d(s)), e.addEventListener("mouseleave", () => h(s))), !(r != null && r.preventOnClickHandling)) {
|
|
1765
1932
|
if (t.onclick)
|
|
1766
1933
|
throw new Error("popupFocusHandler: button already has onclick");
|
|
1767
|
-
t.onclick = (
|
|
1934
|
+
t.onclick = (f) => {
|
|
1768
1935
|
var m;
|
|
1769
|
-
const
|
|
1770
|
-
(!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (
|
|
1936
|
+
const _ = t.getAttribute("aria-expanded") === "true";
|
|
1937
|
+
(!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (f.stopPropagation(), f.preventDefault(), _ && t.getAttribute("aria-expanded") === "true" ? (h(c), (m = document.activeElement) == null || m.blur()) : (dr() && rt(), d(c))), r != null && r.onClick && r.onClick(f);
|
|
1771
1938
|
};
|
|
1772
1939
|
}
|
|
1773
1940
|
}
|
|
1774
|
-
const
|
|
1941
|
+
const pr = `<div class="popup__wrapper popup__wrapper--hidden">
|
|
1775
1942
|
<div class="popup__content">
|
|
1776
1943
|
<div class="popup__arrow" data-popper-arrow></div>
|
|
1777
1944
|
</div>
|
|
1778
1945
|
</div>
|
|
1779
1946
|
`;
|
|
1780
|
-
function
|
|
1947
|
+
function ht(e, t) {
|
|
1781
1948
|
const n = e.getAttribute("id");
|
|
1782
1949
|
if (!n)
|
|
1783
1950
|
throw new Error("renderPopup: labelledByElement does not have an `id` attribute");
|
|
1784
|
-
const o =
|
|
1951
|
+
const o = R();
|
|
1785
1952
|
e.setAttribute("aria-controls", o);
|
|
1786
|
-
const r =
|
|
1953
|
+
const r = g(pr);
|
|
1787
1954
|
if (r.setAttribute("id", o), r.setAttribute("aria-labelledby", n), t != null && t.removePopupArrow) {
|
|
1788
|
-
const i = r.querySelector(
|
|
1955
|
+
const i = r.querySelector(p(a.POPUP_ARROW));
|
|
1789
1956
|
if (!i)
|
|
1790
1957
|
throw new Error("renderPopup(): popup arrow missing (I wanted to remove it!!)");
|
|
1791
1958
|
i.remove();
|
|
1792
1959
|
}
|
|
1793
1960
|
return r;
|
|
1794
1961
|
}
|
|
1795
|
-
function
|
|
1962
|
+
function fr(e) {
|
|
1796
1963
|
const t = e.closest("li");
|
|
1797
1964
|
if (!t)
|
|
1798
1965
|
throw console.error("element", e), new Error("toggleChildMenuExpansion: parent not found for child");
|
|
1799
1966
|
t.querySelectorAll(":scope > ul").forEach((n) => {
|
|
1800
1967
|
var i;
|
|
1801
|
-
const o = (i = n.closest("li")) == null ? void 0 : i.querySelector(
|
|
1968
|
+
const o = (i = n.closest("li")) == null ? void 0 : i.querySelector(p(a.POPUP_MENU__BUTTON_TITLE));
|
|
1802
1969
|
if (!o)
|
|
1803
1970
|
throw new Error("toggleChildMenuExpansion: button not found");
|
|
1804
|
-
const r = o.querySelector(`:scope > ${
|
|
1971
|
+
const r = o.querySelector(`:scope > ${p(a.POPUP_MENU__CHEVRON)}`);
|
|
1805
1972
|
if (!r)
|
|
1806
1973
|
throw new Error("toggleChildMenuExpansion: chevron not found");
|
|
1807
|
-
n.classList.toggle(
|
|
1974
|
+
n.classList.toggle(a.VISUALLY_HIDDEN), n.classList.contains(a.VISUALLY_HIDDEN) ? (o.setAttribute("aria-expanded", "false"), r.classList.add(a.IS_CLOSED), r.classList.remove(a.IS_OPEN)) : (o.setAttribute("aria-expanded", "true"), r.classList.remove(a.IS_CLOSED), r.classList.add(a.IS_OPEN));
|
|
1808
1975
|
});
|
|
1809
1976
|
}
|
|
1810
|
-
function
|
|
1977
|
+
function _r(e) {
|
|
1811
1978
|
return (t) => {
|
|
1812
|
-
t.preventDefault(), t.stopPropagation(),
|
|
1979
|
+
t.preventDefault(), t.stopPropagation(), fr(e);
|
|
1813
1980
|
};
|
|
1814
1981
|
}
|
|
1815
|
-
function
|
|
1816
|
-
const e =
|
|
1817
|
-
return e.classList.add(
|
|
1982
|
+
function Vt() {
|
|
1983
|
+
const e = g(Jn);
|
|
1984
|
+
return e.classList.add(a.IS_CLOSED), e;
|
|
1818
1985
|
}
|
|
1819
|
-
function
|
|
1820
|
-
var
|
|
1821
|
-
const o =
|
|
1986
|
+
function hr(e, t, n) {
|
|
1987
|
+
var h, f;
|
|
1988
|
+
const o = g(eo), r = o.querySelector(p(a.POPUP_MENU__TITLE));
|
|
1822
1989
|
if (!r)
|
|
1823
1990
|
throw new Error("renderPopupMenuItem: menuItemTitleWrapper not found");
|
|
1824
1991
|
const i = (
|
|
1825
1992
|
/** @type HTMLElement | null */
|
|
1826
|
-
o.querySelector(
|
|
1993
|
+
o.querySelector(p(a.POPUP_MENU__BUTTON_TITLE))
|
|
1827
1994
|
);
|
|
1828
1995
|
if (!i)
|
|
1829
1996
|
throw new Error("renderPopupMenuItem: menuButton not found");
|
|
1830
|
-
const
|
|
1997
|
+
const u = (
|
|
1831
1998
|
/** @type HTMLElement | null */
|
|
1832
|
-
o.querySelector(
|
|
1999
|
+
o.querySelector(p(a.POPUP_MENU__LINK_TITLE))
|
|
1833
2000
|
);
|
|
1834
|
-
if (!
|
|
2001
|
+
if (!u)
|
|
1835
2002
|
throw new Error("renderPopupMenuItem: aHref not found");
|
|
1836
|
-
const
|
|
2003
|
+
const s = (
|
|
1837
2004
|
/** @type HTMLElement | null */
|
|
1838
|
-
o.querySelector(
|
|
2005
|
+
o.querySelector(p(a.POPUP_MENU__PLAIN_TITLE))
|
|
1839
2006
|
);
|
|
1840
|
-
if (!
|
|
2007
|
+
if (!s)
|
|
1841
2008
|
throw new Error("renderPopupMenuItem: plainTitle not found");
|
|
1842
|
-
const l = o.querySelector(
|
|
2009
|
+
const l = o.querySelector(p(a.POPUP_MENU__DIVIDER));
|
|
1843
2010
|
if (!l)
|
|
1844
2011
|
throw new Error("renderPopupMenuItem: menuDivider not found");
|
|
1845
|
-
const
|
|
1846
|
-
if (!
|
|
2012
|
+
const c = o.querySelector(`button ${p(a.POPUP_MENU__LINK_TEXT)}`);
|
|
2013
|
+
if (!c)
|
|
1847
2014
|
throw new Error("renderPopupMenuItem: titleSpanButton not found");
|
|
1848
|
-
const d = o.querySelector(`a ${
|
|
2015
|
+
const d = o.querySelector(`a ${p(a.POPUP_MENU__LINK_TEXT)}`);
|
|
1849
2016
|
if (!d)
|
|
1850
2017
|
throw new Error("renderPopupMenuItem: titleSpanLink not found");
|
|
1851
2018
|
if (t.actionMenu) {
|
|
1852
|
-
let
|
|
2019
|
+
let _;
|
|
1853
2020
|
switch (n.childrenMenuType) {
|
|
1854
|
-
case
|
|
1855
|
-
|
|
1856
|
-
const m =
|
|
2021
|
+
case j.FLYOUT: {
|
|
2022
|
+
_ = Vt(), i.appendChild(_), i.setAttribute("id", R());
|
|
2023
|
+
const m = mt(
|
|
1857
2024
|
{
|
|
1858
2025
|
menuItems: t.actionMenu,
|
|
1859
2026
|
title: t.title
|
|
@@ -1864,40 +2031,40 @@ function ur(e, t, n) {
|
|
|
1864
2031
|
removePopupArrow: !0
|
|
1865
2032
|
}
|
|
1866
2033
|
);
|
|
1867
|
-
o.appendChild(m),
|
|
2034
|
+
o.appendChild(m), Pe(
|
|
1868
2035
|
o,
|
|
1869
2036
|
i,
|
|
1870
2037
|
m,
|
|
1871
2038
|
"menu",
|
|
1872
2039
|
{
|
|
1873
|
-
popupPlacement:
|
|
2040
|
+
popupPlacement: lt.RIGHT_START,
|
|
1874
2041
|
preventOnClickHandling: !0,
|
|
1875
2042
|
shouldFocusOnHover: !0
|
|
1876
2043
|
}
|
|
1877
|
-
),
|
|
2044
|
+
), u.remove(), s.remove();
|
|
1878
2045
|
break;
|
|
1879
2046
|
}
|
|
1880
|
-
case
|
|
1881
|
-
const m =
|
|
2047
|
+
case j.INLINE: {
|
|
2048
|
+
const m = Ee(
|
|
1882
2049
|
t.actionMenu,
|
|
1883
2050
|
n
|
|
1884
|
-
),
|
|
1885
|
-
m.setAttribute("id",
|
|
1886
|
-
var T,
|
|
1887
|
-
for (let
|
|
2051
|
+
), E = R();
|
|
2052
|
+
m.setAttribute("id", E), m.classList.add(a.VISUALLY_HIDDEN), o.appendChild(m), i.onclick = _r(i), i.setAttribute("aria-expanded", "false"), i.setAttribute("aria-controls", E), _ = Vt(), i.appendChild(_), u.remove(), s.remove(), o.addEventListener("focusin", (v) => {
|
|
2053
|
+
var T, A, L, b;
|
|
2054
|
+
for (let I = (
|
|
1888
2055
|
/** @type Element | null | undefined */
|
|
1889
2056
|
(T = v.target) == null ? void 0 : T.closest("ul")
|
|
1890
|
-
);
|
|
1891
|
-
|
|
2057
|
+
); I; I = (A = I.parentElement) == null ? void 0 : A.closest("ul"))
|
|
2058
|
+
I.classList.remove(a.VISUALLY_HIDDEN), i.setAttribute("aria-expanded", "true"), v.target !== i && ((L = _ == null ? void 0 : _.classList) == null || L.remove(a.IS_CLOSED), (b = _ == null ? void 0 : _.classList) == null || b.add(a.IS_OPEN));
|
|
1892
2059
|
});
|
|
1893
2060
|
break;
|
|
1894
2061
|
}
|
|
1895
|
-
case
|
|
1896
|
-
const m =
|
|
2062
|
+
case j.MEGA_MENU: {
|
|
2063
|
+
const m = Ee(
|
|
1897
2064
|
t.actionMenu,
|
|
1898
2065
|
n
|
|
1899
|
-
),
|
|
1900
|
-
m.setAttribute("id",
|
|
2066
|
+
), E = R();
|
|
2067
|
+
m.setAttribute("id", E), o.appendChild(m), u.remove(), i.remove(), s.appendChild(document.createTextNode(t.title));
|
|
1901
2068
|
break;
|
|
1902
2069
|
}
|
|
1903
2070
|
default:
|
|
@@ -1905,146 +2072,147 @@ function ur(e, t, n) {
|
|
|
1905
2072
|
}
|
|
1906
2073
|
l.remove();
|
|
1907
2074
|
} else if (t.actionFunction)
|
|
1908
|
-
i.onclick = t.actionFunction,
|
|
2075
|
+
i.onclick = t.actionFunction, u.remove(), l.remove(), s.remove();
|
|
1909
2076
|
else if (t.actionUrl)
|
|
1910
|
-
|
|
2077
|
+
u.setAttribute("href", t.actionUrl.url), i.remove(), l.remove(), s.remove();
|
|
1911
2078
|
else if (t.actionFunctionUrl)
|
|
1912
|
-
|
|
1913
|
-
var m,
|
|
1914
|
-
(m = t.actionFunctionUrl) != null && m.skipHandleEvent || (
|
|
1915
|
-
}, i.remove(), l.remove(),
|
|
2079
|
+
u.setAttribute("href", t.actionFunctionUrl.url), u.onclick = (_) => {
|
|
2080
|
+
var m, E;
|
|
2081
|
+
(m = t.actionFunctionUrl) != null && m.skipHandleEvent || (_.stopPropagation(), _.preventDefault()), (E = t.actionFunctionUrl) == null || E.actionFunction(_);
|
|
2082
|
+
}, i.remove(), l.remove(), s.remove();
|
|
1916
2083
|
else if (t.isDivider)
|
|
1917
2084
|
r.remove(), o.setAttribute("aria-hidden", "true"), o.setAttribute("role", "separator");
|
|
1918
2085
|
else
|
|
1919
2086
|
throw console.error(t), new Error("renderPopupMenuItem: popupMenuItem must have either actionMenu, actionFunction, actionUrl, or isDivider (popupMenuItem.title)");
|
|
1920
|
-
if (!t.isDivider && (
|
|
1921
|
-
|
|
1922
|
-
const
|
|
1923
|
-
|
|
2087
|
+
if (!t.isDivider && (c.appendChild(document.createTextNode(t.title)), d.appendChild(document.createTextNode(t.title)), (h = t.actionUrl) != null && h.openInNewTab || (f = t.actionFunctionUrl) != null && f.openInNewTab)) {
|
|
2088
|
+
u.setAttribute("target", "_blank");
|
|
2089
|
+
const _ = g(Zt);
|
|
2090
|
+
c.appendChild(_), d.appendChild(_);
|
|
1924
2091
|
}
|
|
1925
|
-
return (t.isSelected || t.actionMenu &&
|
|
2092
|
+
return (t.isSelected || t.actionMenu && Ve(t.actionMenu, ["actionMenu"], (_) => !!_.isSelected)) && (i.classList.add(a.MENU_ITEM__SELECTED), u.classList.add(a.MENU_ITEM__SELECTED)), t.isSelected ? o.classList.add(a.MENU_ITEM__SELECTED) : o.classList.remove(a.MENU_ITEM__SELECTED), e.appendChild(o), o;
|
|
1926
2093
|
}
|
|
1927
|
-
function
|
|
1928
|
-
const n =
|
|
1929
|
-
return e.forEach((o) =>
|
|
2094
|
+
function Ee(e, t) {
|
|
2095
|
+
const n = g(Qn);
|
|
2096
|
+
return e == null || e.forEach((o) => hr(n, o, t)), n;
|
|
1930
2097
|
}
|
|
1931
|
-
function
|
|
1932
|
-
const o =
|
|
2098
|
+
function mt(e, t, n) {
|
|
2099
|
+
const o = ht(t, { removePopupArrow: n.removePopupArrow }), r = o.querySelector(p(a.POPUP_CONTENT_WRAPPER));
|
|
1933
2100
|
if (!r)
|
|
1934
2101
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
1935
|
-
const i =
|
|
2102
|
+
const i = Ee(e.menuItems, n);
|
|
1936
2103
|
return i.setAttribute("aria-label", e.title), r.appendChild(i), o;
|
|
1937
2104
|
}
|
|
1938
|
-
function
|
|
1939
|
-
const t =
|
|
1940
|
-
t.getAttribute("id") || t.setAttribute("id",
|
|
2105
|
+
function mr(e) {
|
|
2106
|
+
const t = g(Kn);
|
|
2107
|
+
t.getAttribute("id") || t.setAttribute("id", R());
|
|
1941
2108
|
const n = document.createTextNode(e.title), o = (
|
|
1942
2109
|
/** @type {HTMLElement} */
|
|
1943
2110
|
t instanceof HTMLCollection ? t[0] : t
|
|
1944
2111
|
);
|
|
1945
|
-
e.showTitle && o.classList.add(
|
|
1946
|
-
const r = o.querySelector(
|
|
2112
|
+
e.showTitle && o.classList.add(a.ACTION_ITEM__ICON_BUTTON_TITLE), o.classList.add(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER), o.classList.remove(a.ACTION_ITEM);
|
|
2113
|
+
const r = o.querySelector(p(a.ACTION_ITEM__TITLE));
|
|
1947
2114
|
if (!r)
|
|
1948
2115
|
throw new Error("renderActionItem: titleDiv not found");
|
|
1949
|
-
r.appendChild(n), e.showTitle ? r.classList.remove(
|
|
2116
|
+
r.appendChild(n), e.showTitle ? r.classList.remove(a.VISUALLY_HIDDEN) : r.classList.add(a.VISUALLY_HIDDEN);
|
|
1950
2117
|
const i = (
|
|
1951
2118
|
/** @type {HTMLElement} */
|
|
1952
|
-
t.querySelector(
|
|
2119
|
+
t.querySelector(p(a.ACTION_ITEM__ICON_BUTTON))
|
|
1953
2120
|
);
|
|
1954
2121
|
if (!i)
|
|
1955
2122
|
throw new Error("renderActionItem: iconButton not found");
|
|
1956
2123
|
e.className && i.classList.add(e.className);
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1959
|
-
const
|
|
1960
|
-
|
|
2124
|
+
const u = at(e.badge);
|
|
2125
|
+
u && i.appendChild(u);
|
|
2126
|
+
const s = g(e.icon);
|
|
2127
|
+
s.setAttribute("role", "presentation"), i.appendChild(s);
|
|
1961
2128
|
let l = null;
|
|
1962
2129
|
if (e.actionFunction)
|
|
1963
2130
|
i.onclick = e.actionFunction;
|
|
1964
2131
|
else if (e.actionDom) {
|
|
1965
|
-
const
|
|
1966
|
-
i.setAttribute("id",
|
|
2132
|
+
const c = R();
|
|
2133
|
+
i.setAttribute("id", c), l = g(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom);
|
|
1967
2134
|
} else if (e.actionPopupMenu) {
|
|
1968
|
-
const
|
|
1969
|
-
i.setAttribute("id",
|
|
1970
|
-
const d = l.querySelector(
|
|
2135
|
+
const c = R();
|
|
2136
|
+
i.setAttribute("id", c), l = g(Xn);
|
|
2137
|
+
const d = l.querySelector(p(a.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
1971
2138
|
if (!d)
|
|
1972
2139
|
throw new Error("renderMobileActionItem: actionItemContentTitle not found");
|
|
1973
2140
|
d.appendChild(document.createTextNode(e.actionPopupMenu.title));
|
|
1974
|
-
const
|
|
1975
|
-
l.appendChild(
|
|
2141
|
+
const h = Ee(e.actionPopupMenu.menuItems, { childrenMenuType: j.INLINE });
|
|
2142
|
+
l.appendChild(h);
|
|
1976
2143
|
} else
|
|
1977
2144
|
throw console.error(e), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
1978
2145
|
return { actionItemElement: t, actionItemContent: l };
|
|
1979
2146
|
}
|
|
1980
|
-
function
|
|
1981
|
-
var
|
|
1982
|
-
const e = document.getElementById(
|
|
2147
|
+
function Er() {
|
|
2148
|
+
var u, s, l;
|
|
2149
|
+
const e = document.getElementById(a.MOBILE_MENU_ACTON_BAR__HOME_ID);
|
|
1983
2150
|
if (!e)
|
|
1984
2151
|
throw new Error("renderMobileActionItems: homeActionItem not found");
|
|
1985
2152
|
const t = (
|
|
1986
2153
|
/** @type {HTMLElement} */
|
|
1987
|
-
e.closest(
|
|
2154
|
+
e.closest(p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
1988
2155
|
);
|
|
1989
2156
|
if (!t)
|
|
1990
2157
|
throw new Error("renderMobileActionItems: homeActionItemWrapper not found");
|
|
1991
|
-
const o = !!
|
|
2158
|
+
const o = !!O().utahId ? document.getElementById(a.MOBILE_MENU_ACTON_BAR__PROFILE_ID) : null, r = (
|
|
1992
2159
|
/** @type {HTMLElement} */
|
|
1993
|
-
(
|
|
2160
|
+
(u = o == null ? void 0 : o.closest) == null ? void 0 : u.call(o, p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
1994
2161
|
);
|
|
1995
|
-
(
|
|
1996
|
-
let
|
|
1997
|
-
switch (
|
|
2162
|
+
(l = (s = [...O().actionItems || []].reverse()) == null ? void 0 : s.map((c) => ({ actionItem: c, ...mr(c) }))) == null || l.forEach(({ actionItem: c, actionItemContent: d, actionItemElement: h }) => {
|
|
2163
|
+
let f;
|
|
2164
|
+
switch (c.mobileMenuLocation) {
|
|
1998
2165
|
case "left":
|
|
1999
|
-
|
|
2166
|
+
f = t;
|
|
2000
2167
|
break;
|
|
2001
2168
|
case "none":
|
|
2002
|
-
|
|
2169
|
+
f = null;
|
|
2003
2170
|
break;
|
|
2004
2171
|
case "right":
|
|
2005
2172
|
default:
|
|
2006
|
-
|
|
2173
|
+
f = r || t;
|
|
2007
2174
|
break;
|
|
2008
2175
|
}
|
|
2009
|
-
if (
|
|
2010
|
-
const
|
|
2011
|
-
let
|
|
2012
|
-
|
|
2013
|
-
d,
|
|
2176
|
+
if (f && (f.after(h), d)) {
|
|
2177
|
+
const _ = it(d);
|
|
2178
|
+
let m = null;
|
|
2179
|
+
c.actionDom ? m = "dialog" : c.actionPopupMenu && (m = "menu"), st(
|
|
2014
2180
|
h,
|
|
2015
|
-
|
|
2016
|
-
|
|
2181
|
+
_,
|
|
2182
|
+
h,
|
|
2183
|
+
{ ariaHasPopupType: m, shouldOnClickCloseMenu: !1 }
|
|
2017
2184
|
);
|
|
2018
2185
|
}
|
|
2019
|
-
});
|
|
2020
|
-
}
|
|
2021
|
-
const
|
|
2022
|
-
`,
|
|
2023
|
-
`,
|
|
2024
|
-
`,
|
|
2025
|
-
`,
|
|
2026
|
-
`,
|
|
2186
|
+
}), O().mainMenu || (e.remove(), t.remove());
|
|
2187
|
+
}
|
|
2188
|
+
const vr = `<div class="utds-citizen-experience-wrapper--mobile"></div>
|
|
2189
|
+
`, br = `<h1 class="utds-logo-wrapper"></h1>
|
|
2190
|
+
`, Ir = `<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
|
|
2191
|
+
`, gr = `<span class="utds-logo-vert-line"></span>
|
|
2192
|
+
`, Tr = `<div class="utds-citizen-experience-wrapper"></div>
|
|
2193
|
+
`, Mr = `<div class="utds-action-items-wrapper"></div>
|
|
2194
|
+
`, Ar = `<div class="utds-header-action-item">
|
|
2027
2195
|
<button type="button" class="icon-button utds-header-action-item__icon-button">
|
|
2028
2196
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
2029
2197
|
</button>
|
|
2030
2198
|
</div>
|
|
2031
|
-
`,
|
|
2199
|
+
`, Or = `<div class="tooltip__wrapper tooltip__wrapper--hidden" aria-hidden="true">
|
|
2032
2200
|
<div class="tooltip__content">
|
|
2033
2201
|
<div class="tooltip__arrow" data-popper-arrow></div>
|
|
2034
2202
|
</div>
|
|
2035
2203
|
</div>
|
|
2036
2204
|
`;
|
|
2037
|
-
let
|
|
2038
|
-
function
|
|
2039
|
-
const n =
|
|
2205
|
+
let pe = NaN;
|
|
2206
|
+
function Oe(e, t) {
|
|
2207
|
+
const n = g(Or), o = n.querySelector(p(a.TOOLTIP__CONTENT));
|
|
2040
2208
|
if (!o)
|
|
2041
2209
|
throw new Error("hookupToolTip: toolTipContent not found");
|
|
2042
2210
|
o.appendChild(t), e.appendChild(n);
|
|
2043
|
-
const r =
|
|
2211
|
+
const r = an(
|
|
2044
2212
|
e,
|
|
2045
2213
|
n,
|
|
2046
2214
|
{
|
|
2047
|
-
placement:
|
|
2215
|
+
placement: lt.BOTTOM,
|
|
2048
2216
|
modifiers: [
|
|
2049
2217
|
{
|
|
2050
2218
|
name: "offset",
|
|
@@ -2059,119 +2227,119 @@ function ht(e, t) {
|
|
|
2059
2227
|
e.onmouseenter = () => {
|
|
2060
2228
|
clearTimeout(i), i = window.setTimeout(
|
|
2061
2229
|
() => {
|
|
2062
|
-
clearTimeout(
|
|
2063
|
-
const
|
|
2064
|
-
(!
|
|
2230
|
+
clearTimeout(pe), pe = -1;
|
|
2231
|
+
const u = e.querySelector(p(a.POPUP_WRAPPER));
|
|
2232
|
+
(!u || u.classList.contains(a.POPUP__HIDDEN)) && (n.classList.remove(a.TOOLTIP__WRAPPER__HIDDEN), n.classList.add(a.TOOLTIP__WRAPPER__VISIBLE), r.update().catch((s) => console.error(s)));
|
|
2065
2233
|
},
|
|
2066
2234
|
// tooltip was already opened on another item, so instantly open tooltip
|
|
2067
|
-
|
|
2235
|
+
pe ? 0 : 500
|
|
2068
2236
|
);
|
|
2069
2237
|
}, e.onmouseleave = () => {
|
|
2070
|
-
clearTimeout(i), n.classList.add(
|
|
2238
|
+
clearTimeout(i), n.classList.add(a.TOOLTIP__WRAPPER__HIDDEN), n.classList.remove(a.TOOLTIP__WRAPPER__VISIBLE), clearTimeout(pe), pe = window.setTimeout(
|
|
2071
2239
|
() => {
|
|
2072
|
-
|
|
2240
|
+
pe = NaN;
|
|
2073
2241
|
},
|
|
2074
2242
|
500
|
|
2075
2243
|
);
|
|
2076
2244
|
};
|
|
2077
2245
|
}
|
|
2078
|
-
function
|
|
2079
|
-
const t =
|
|
2246
|
+
function wr(e) {
|
|
2247
|
+
const t = g(Ar), n = document.createTextNode(e.title), o = (
|
|
2080
2248
|
/** @type {HTMLElement} */
|
|
2081
2249
|
t instanceof HTMLCollection ? t[0] : t
|
|
2082
2250
|
);
|
|
2083
|
-
e.showTitle && o.classList.add(
|
|
2084
|
-
const r = o.querySelector(
|
|
2251
|
+
e.showTitle && o.classList.add(a.ACTION_ITEM__ICON_BUTTON_TITLE);
|
|
2252
|
+
const r = o.querySelector(p(a.ACTION_ITEM__TITLE));
|
|
2085
2253
|
if (!r)
|
|
2086
2254
|
throw new Error("renderActionItem: titleDiv not found");
|
|
2087
|
-
r.appendChild(n), e.showTitle ? r.classList.remove(
|
|
2088
|
-
const i = t.querySelector(
|
|
2255
|
+
r.appendChild(n), e.showTitle ? r.classList.remove(a.VISUALLY_HIDDEN) : r.classList.add(a.VISUALLY_HIDDEN);
|
|
2256
|
+
const i = t.querySelector(p(a.ACTION_ITEM__ICON_BUTTON));
|
|
2089
2257
|
if (!i)
|
|
2090
2258
|
throw new Error("renderActionItem: iconButton not found");
|
|
2091
2259
|
e.className && i.classList.add(e.className);
|
|
2092
|
-
const
|
|
2093
|
-
|
|
2094
|
-
const
|
|
2095
|
-
if (
|
|
2260
|
+
const u = at(e.badge);
|
|
2261
|
+
u && i.appendChild(u);
|
|
2262
|
+
const s = g(e.icon);
|
|
2263
|
+
if (s.setAttribute("role", "presentation"), i.appendChild(s), !(i instanceof HTMLElement))
|
|
2096
2264
|
throw new Error("renderActionItem: iconButton is not an HTMLElement");
|
|
2097
2265
|
if (e.actionFunction)
|
|
2098
2266
|
i.onclick = e.actionFunction;
|
|
2099
2267
|
else if (e.actionDom) {
|
|
2100
|
-
const l =
|
|
2268
|
+
const l = R();
|
|
2101
2269
|
i.setAttribute("id", l);
|
|
2102
|
-
const
|
|
2270
|
+
const c = ht(i), d = (
|
|
2103
2271
|
/** @type {HTMLElement} */
|
|
2104
|
-
|
|
2272
|
+
c.querySelector(p(a.POPUP_CONTENT_WRAPPER))
|
|
2105
2273
|
);
|
|
2106
2274
|
if (!d)
|
|
2107
2275
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
2108
|
-
d.appendChild(
|
|
2276
|
+
d.appendChild(g(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom)), t.appendChild(c), Pe(o, i, c, "dialog", void 0);
|
|
2109
2277
|
} else if (e.actionPopupMenu) {
|
|
2110
|
-
const l =
|
|
2278
|
+
const l = R();
|
|
2111
2279
|
i.setAttribute("id", l);
|
|
2112
|
-
const
|
|
2280
|
+
const c = mt(
|
|
2113
2281
|
/** @type {PopupMenu} */
|
|
2114
2282
|
e.actionPopupMenu,
|
|
2115
2283
|
i,
|
|
2116
|
-
{ childrenMenuType:
|
|
2284
|
+
{ childrenMenuType: j.INLINE }
|
|
2117
2285
|
);
|
|
2118
|
-
t.appendChild(
|
|
2286
|
+
t.appendChild(c), Pe(o, i, c, "menu", void 0);
|
|
2119
2287
|
} else
|
|
2120
2288
|
throw console.error(e), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
2121
|
-
return
|
|
2289
|
+
return Oe(t, document.createTextNode(e.title)), t;
|
|
2122
2290
|
}
|
|
2123
|
-
function
|
|
2291
|
+
function Lr() {
|
|
2124
2292
|
var n, o;
|
|
2125
|
-
const { actionItems: e } =
|
|
2293
|
+
const { actionItems: e } = O();
|
|
2126
2294
|
let t = null;
|
|
2127
|
-
return e != null && e.length && (t =
|
|
2295
|
+
return e != null && e.length && (t = g(Mr), (o = (n = O().actionItems) == null ? void 0 : n.map((r) => wr(r))) == null || o.forEach((r) => t.appendChild(r))), t;
|
|
2128
2296
|
}
|
|
2129
|
-
const
|
|
2130
|
-
`,
|
|
2131
|
-
`,
|
|
2297
|
+
const yr = `<button class="utds-utah-id__button button--solid" type="button">UtahID Sign In</button>
|
|
2298
|
+
`, ln = `<div class="utds-utah-id-wrapper"></div>
|
|
2299
|
+
`, Ne = {
|
|
2132
2300
|
PROFILE: "https://id.utah.gov",
|
|
2133
2301
|
SIGN_IN: `https://id.utah.gov/login?goto=${window.location}`,
|
|
2134
2302
|
SIGN_OUT: `https://id.utah.gov/logout?goto=${window.location}`,
|
|
2135
2303
|
USER_INFO: "https://id.utah.gov/api/userInfo"
|
|
2136
|
-
},
|
|
2304
|
+
}, Pr = `<div class="vertical-menu__wrapper">
|
|
2137
2305
|
<div class="vertical-menu__wrapper-title"></div>
|
|
2138
2306
|
</div>
|
|
2139
2307
|
`;
|
|
2140
|
-
function
|
|
2141
|
-
const n =
|
|
2308
|
+
function cn(e, t) {
|
|
2309
|
+
const n = g(Pr), o = n.querySelector(p(a.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
2142
2310
|
if (!o)
|
|
2143
2311
|
throw new Error("renderMenuWithTitle: menuTitleDiv not found");
|
|
2144
2312
|
return o.appendChild(document.createTextNode(t)), n.appendChild(e), n;
|
|
2145
2313
|
}
|
|
2146
|
-
let
|
|
2147
|
-
function
|
|
2148
|
-
|
|
2314
|
+
let y = null;
|
|
2315
|
+
function un(e) {
|
|
2316
|
+
y = e, document.querySelectorAll(p(a.UTAH_ID__BUTTON)).forEach((n) => {
|
|
2149
2317
|
var o;
|
|
2150
2318
|
if (n) {
|
|
2151
|
-
if (n.innerHTML = "",
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2319
|
+
if (n.innerHTML = "", y != null && y.userInfo && ((o = y.userInfo) != null && o.authenticated)) {
|
|
2320
|
+
const u = document.createElement("span");
|
|
2321
|
+
u.appendChild(document.createTextNode("UtahID Account:")), u.classList.add(a.VISUALLY_HIDDEN), n.appendChild(u), n.appendChild(document.createTextNode(`Hello, ${y.userInfo.first || ""}`));
|
|
2154
2322
|
} else
|
|
2155
2323
|
n.appendChild(document.createTextNode("UtahID Sign In"));
|
|
2156
2324
|
const r = n.getAttribute("aria-controls");
|
|
2157
2325
|
if (!r)
|
|
2158
2326
|
throw new Error(`authChangedEventHandler: popup id for button not found - ${r}`);
|
|
2159
2327
|
const i = document.getElementById(r);
|
|
2160
|
-
i &&
|
|
2328
|
+
i && Et(n, i);
|
|
2161
2329
|
}
|
|
2162
2330
|
});
|
|
2163
2331
|
}
|
|
2164
|
-
function
|
|
2332
|
+
function Et(e, t) {
|
|
2165
2333
|
var n;
|
|
2166
|
-
e && t && (!!(
|
|
2334
|
+
e && t && (!!(y != null && y.isDefinitive) && !!((n = y == null ? void 0 : y.userInfo) != null && n.authenticated) ? (e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", "false"), t.removeAttribute("aria-hidden")) : (e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), t.setAttribute("aria-hidden", "true")));
|
|
2167
2335
|
}
|
|
2168
|
-
function
|
|
2169
|
-
const e =
|
|
2170
|
-
return e.setAttribute("id",
|
|
2336
|
+
function dn() {
|
|
2337
|
+
const e = g(yr);
|
|
2338
|
+
return e.setAttribute("id", R()), y && un(y), e;
|
|
2171
2339
|
}
|
|
2172
|
-
function
|
|
2173
|
-
var l,
|
|
2174
|
-
const t =
|
|
2340
|
+
function pn(e) {
|
|
2341
|
+
var l, c, d;
|
|
2342
|
+
const t = O(), n = t.utahId !== !1 && t.utahId !== !0 && ((l = t.utahId) == null ? void 0 : l.onProfile), o = t.utahId !== !1 && t.utahId !== !0 && ((c = t.utahId) == null ? void 0 : c.onSignOut), r = [...t.utahId !== !0 && t.utahId !== !1 && ((d = t.utahId) == null ? void 0 : d.menuItems) || []];
|
|
2175
2343
|
r.length && r.push({
|
|
2176
2344
|
isDivider: !0,
|
|
2177
2345
|
title: "--divider--"
|
|
@@ -2179,32 +2347,32 @@ function un(e) {
|
|
|
2179
2347
|
const i = [
|
|
2180
2348
|
...r,
|
|
2181
2349
|
{
|
|
2182
|
-
actionUrl: n ? void 0 : { url:
|
|
2350
|
+
actionUrl: n ? void 0 : { url: Ne.PROFILE, openInNewTab: !0 },
|
|
2183
2351
|
actionFunction: n || void 0,
|
|
2184
2352
|
className: "external-link",
|
|
2185
2353
|
title: "UtahID Profile"
|
|
2186
2354
|
},
|
|
2187
2355
|
{
|
|
2188
|
-
actionUrl: o ? void 0 : { url:
|
|
2356
|
+
actionUrl: o ? void 0 : { url: Ne.SIGN_OUT },
|
|
2189
2357
|
actionFunction: o || void 0,
|
|
2190
2358
|
title: "Sign Out"
|
|
2191
2359
|
}
|
|
2192
|
-
],
|
|
2193
|
-
return
|
|
2194
|
-
}
|
|
2195
|
-
function
|
|
2196
|
-
var
|
|
2197
|
-
const e =
|
|
2198
|
-
t.setAttribute("id",
|
|
2199
|
-
const n =
|
|
2360
|
+
], u = Ee(i, { childrenMenuType: j.INLINE }), s = e ? cn(u, "Utah ID Menu") : u;
|
|
2361
|
+
return s.setAttribute("aria-label", "Utah Id Menu"), s.setAttribute("id", R()), s;
|
|
2362
|
+
}
|
|
2363
|
+
function Nr() {
|
|
2364
|
+
var s;
|
|
2365
|
+
const e = g(ln), t = dn();
|
|
2366
|
+
t.setAttribute("id", R()), e.appendChild(t);
|
|
2367
|
+
const n = pn(!1), o = ht(t), r = (
|
|
2200
2368
|
/** @type {HTMLElement} */
|
|
2201
|
-
o.querySelector(
|
|
2369
|
+
o.querySelector(p(a.POPUP_CONTENT_WRAPPER))
|
|
2202
2370
|
);
|
|
2203
2371
|
if (!r)
|
|
2204
2372
|
throw new Error("renderUtahIdForDesktop: contentWrapper not found");
|
|
2205
|
-
r.appendChild(n), e.appendChild(o),
|
|
2206
|
-
const i =
|
|
2207
|
-
return
|
|
2373
|
+
r.appendChild(n), e.appendChild(o), Et(t, o);
|
|
2374
|
+
const i = O(), u = i.utahId !== !1 && i.utahId !== !0 && ((s = i.utahId) == null ? void 0 : s.onSignIn);
|
|
2375
|
+
return Pe(
|
|
2208
2376
|
e,
|
|
2209
2377
|
t,
|
|
2210
2378
|
o,
|
|
@@ -2212,67 +2380,64 @@ function Mr() {
|
|
|
2212
2380
|
{
|
|
2213
2381
|
isPerformPopup: () => {
|
|
2214
2382
|
var l;
|
|
2215
|
-
return !!(
|
|
2383
|
+
return !!(y != null && y.isDefinitive) && !!((l = y == null ? void 0 : y.userInfo) != null && l.authenticated);
|
|
2216
2384
|
},
|
|
2217
2385
|
onClick: (l) => {
|
|
2218
|
-
var
|
|
2219
|
-
(!(
|
|
2386
|
+
var c;
|
|
2387
|
+
(!(y != null && y.isDefinitive) || !((c = y == null ? void 0 : y.userInfo) != null && c.authenticated)) && (u ? u(l) : (l.preventDefault(), l.stopPropagation(), window.location.href = Ne.SIGN_IN));
|
|
2220
2388
|
}
|
|
2221
2389
|
}
|
|
2222
2390
|
), e;
|
|
2223
2391
|
}
|
|
2224
|
-
function
|
|
2225
|
-
const e =
|
|
2392
|
+
function Sr() {
|
|
2393
|
+
const e = g(ln), t = dn(), n = t.getAttribute("id");
|
|
2226
2394
|
if (!n)
|
|
2227
2395
|
throw new Error("renderUtahIdForMobile: utahIdButton has no id");
|
|
2228
2396
|
e.appendChild(t);
|
|
2229
|
-
const o =
|
|
2397
|
+
const o = pn(!0), r = o.getAttribute("id");
|
|
2230
2398
|
if (!r)
|
|
2231
2399
|
throw new Error("renderUtahIdForMobile: utahIdPopupMenu has no id");
|
|
2232
|
-
return e.appendChild(o), t.setAttribute("aria-controls", r), o.setAttribute("aria-labelledby", n),
|
|
2400
|
+
return e.appendChild(o), t.setAttribute("aria-controls", r), o.setAttribute("aria-labelledby", n), Et(t, o), { button: t, menu: o };
|
|
2233
2401
|
}
|
|
2234
|
-
function
|
|
2235
|
-
const e =
|
|
2236
|
-
return t && e.appendChild(t),
|
|
2402
|
+
function Ur() {
|
|
2403
|
+
const e = g(Tr), t = Lr();
|
|
2404
|
+
return t && e.appendChild(t), O().utahId !== !1 && e.appendChild(Nr()), e;
|
|
2237
2405
|
}
|
|
2238
|
-
const
|
|
2406
|
+
const Cr = `<div class="utds-title-wrapper">
|
|
2239
2407
|
<div class="utds-title-wrapper__logo"></div>
|
|
2240
2408
|
<div class="utds-title-wrapper__title"></div>
|
|
2241
2409
|
</div>
|
|
2242
|
-
`,
|
|
2410
|
+
`, Rr = `<a class="utds-title-wrapper">
|
|
2243
2411
|
<div class="utds-title-wrapper__logo"></div>
|
|
2244
2412
|
<div class="utds-title-wrapper__title"></div>
|
|
2245
2413
|
</a>
|
|
2246
2414
|
`;
|
|
2247
|
-
function
|
|
2248
|
-
|
|
2249
|
-
}
|
|
2250
|
-
function Pr() {
|
|
2251
|
-
const e = y().titleURL, t = I(e ? Lr : yr);
|
|
2415
|
+
function Dr() {
|
|
2416
|
+
const e = O().titleURL, t = g(e ? Rr : Cr);
|
|
2252
2417
|
if (!t)
|
|
2253
2418
|
throw new Error("LogoTitle: titleWrapper is null");
|
|
2254
2419
|
e && t.setAttribute("href", e);
|
|
2255
|
-
const n = t.querySelector(
|
|
2420
|
+
const n = t.querySelector(p(a.TITLE__LOGO));
|
|
2256
2421
|
if (!n)
|
|
2257
2422
|
throw new Error("LogoTitle: logoWrapper is null");
|
|
2258
|
-
const o =
|
|
2423
|
+
const o = O().logo, r = O().showTitle, i = O().title;
|
|
2259
2424
|
if (o) {
|
|
2260
2425
|
let l;
|
|
2261
2426
|
if (o.htmlString)
|
|
2262
|
-
l =
|
|
2427
|
+
l = g(K(o.htmlString));
|
|
2263
2428
|
else if (o.element)
|
|
2264
|
-
l =
|
|
2429
|
+
l = K(o.element);
|
|
2265
2430
|
else if (o.imageUrl)
|
|
2266
|
-
l =
|
|
2431
|
+
l = g(`<img src=${K(o.imageUrl)} id="design-system-logo" />`);
|
|
2267
2432
|
else
|
|
2268
2433
|
throw new Error("LogoTitle: logo set but has no settings");
|
|
2269
2434
|
l.setAttribute("role", "presentation"), n.appendChild(l);
|
|
2270
2435
|
} else
|
|
2271
2436
|
t.removeChild(n);
|
|
2272
|
-
const
|
|
2273
|
-
return
|
|
2437
|
+
const u = document.createTextNode(i), s = t.querySelector(p(a.TITLE__TITLE));
|
|
2438
|
+
return s == null || s.appendChild(u), !r && o && (s == null || s.classList.add(a.VISUALLY_HIDDEN)), t;
|
|
2274
2439
|
}
|
|
2275
|
-
const
|
|
2440
|
+
const Br = `<div class="utah-logo-wrapper">
|
|
2276
2441
|
<button class="utah-logo-svg" id="utah-logo-svg" aria-haspopup="dialog">
|
|
2277
2442
|
<span class="visually-hidden" id="utah-logo-description">An official website of the State of Utah. Click to learn
|
|
2278
2443
|
more.</span>
|
|
@@ -2283,21 +2448,13 @@ const Nr = `<div class="utah-logo-wrapper">
|
|
|
2283
2448
|
d="M15.972,39.161c-5.4,0-9.4127-1.5667-12.038-4.7C1.3087,31.3277-.0027,26.466,0,19.876V0H10.175V21.06c0,3.4313,.4633,5.847,1.39,7.247,.9909,1.434,2.669,2.2337,4.407,2.1,1.7525,.124,3.4436-.6712,4.466-2.1,.966-1.4,1.449-3.8157,1.449-7.247V0h9.82V19.876c0,6.586-1.2817,11.4467-3.845,14.582-2.5633,3.1353-6.5267,4.703-11.89,4.703Zm31.353-.711V8.518h-10.175V0h30.525V8.518h-10.175v29.932h-10.175Zm33.6-18.693l-.651,2.662h7.1l-.651-2.662c-.4733-1.8533-.9467-3.8647-1.42-6.034-.4733-2.1693-.945-4.2197-1.415-6.151h-.237c-.434,1.972-.8777,4.0327-1.331,6.182s-.918,4.1507-1.394,6.004l-.001-.001Zm-14.788,18.693L77.85,0h12.3l11.717,38.45h-10.767l-1.893-8.162h-10.766l-1.893,8.162h-10.411Zm39.4,0V0h10.175V14.316h11.476V0h10.175V38.45h-10.175v-15.261h-11.479v15.261h-10.172Z" />
|
|
2284
2449
|
</g>
|
|
2285
2450
|
<text transform="translate(.0419 52.5939)" aria-hidden="true">
|
|
2286
|
-
<tspan x="0" y="0">An official </tspan>
|
|
2287
|
-
<tspan x="60.437" y="0" style="letter-spacing: -.02em;">s</tspan>
|
|
2288
|
-
<tspan x="66.0229" y="0" style="letter-spacing: -.021em;">t</tspan>
|
|
2289
|
-
<tspan x="70.4614" y="0" style="letter-spacing: -.014em;">at</tspan>
|
|
2290
|
-
<tspan x="81.8569" y="0" style="letter-spacing: 0em;">e </tspan>
|
|
2291
|
-
<tspan x="91.6011" y="0" style="letter-spacing: -.004em;">w</tspan>
|
|
2292
|
-
<tspan x="101.5972" y="0">ebsi</tspan>
|
|
2293
|
-
<tspan x="125.5923" y="0" style="letter-spacing: -.014em;">t</tspan>
|
|
2294
|
-
<tspan x="130.1284" y="0">e</tspan>
|
|
2451
|
+
<tspan x="0" y="0">An official state website</tspan>
|
|
2295
2452
|
</text>
|
|
2296
2453
|
</g>
|
|
2297
2454
|
</svg>
|
|
2298
2455
|
</button>
|
|
2299
2456
|
</div>
|
|
2300
|
-
`,
|
|
2457
|
+
`, Hr = `<div class="utah-logo-wrapper">
|
|
2301
2458
|
<button class="utah-logo-svg" id="utah-logo-svg" aria-haspopup="dialog">
|
|
2302
2459
|
<span class="visually-hidden" id="utah-logo-description">An official website of the State of Utah. Click to learn
|
|
2303
2460
|
more.</span>
|
|
@@ -2308,55 +2465,51 @@ const Nr = `<div class="utah-logo-wrapper">
|
|
|
2308
2465
|
d="M12.2714,30.0877c-4.1489,0-7.2318-1.2037-9.2489-3.611C1.0055,24.0693-.002,20.334,0,15.2709V0H7.8175V16.1806c0,2.6363,.356,4.4923,1.0679,5.5679,.7613,1.1018,2.0506,1.7162,3.3859,1.6134,1.3465,.0953,2.6458-.5157,3.4313-1.6134,.7422-1.0756,1.1133-2.9316,1.1133-5.5679V0h7.5448V15.2709c0,5.0601-.9847,8.7946-2.9541,11.2035-1.9694,2.4089-5.0145,3.6133-9.1352,3.6133Zm24.0887-.5463V6.5444h-7.8175V0h23.4526V6.5444h-7.8175V29.5414h-7.8175Zm25.8151-14.362l-.5002,2.0452h5.455l-.5002-2.0452c-.3637-1.4239-.7273-2.9693-1.091-4.636-.3637-1.6667-.7261-3.242-1.0871-4.7259h-.1821c-.3334,1.5151-.6743,3.0983-1.0226,4.7497s-.7053,3.189-1.071,4.6129l-.0008-.0008Zm-11.3617,14.362L59.8127,0h9.4502l9.0023,29.5414h-8.2724l-1.4544-6.2709h-8.2716l-1.4544,6.2709h-7.9988Zm30.2713,0V0h7.8175V10.9991h8.8171V0h7.8175V29.5414h-7.8175v-11.7251h-8.8194v11.7251h-7.8152Z" />
|
|
2309
2466
|
</g>
|
|
2310
2467
|
<text transform="translate(.0419 43.5205)" aria-hidden="true">
|
|
2311
|
-
<tspan x="0" y="0">An official </tspan>
|
|
2312
|
-
<tspan x="60.437" y="0" style="letter-spacing: -.004em;">w</tspan>
|
|
2313
|
-
<tspan x="70.4331" y="0">ebsi</tspan>
|
|
2314
|
-
<tspan x="94.4282" y="0" style="letter-spacing: -.014em;">t</tspan>
|
|
2315
|
-
<tspan x="98.9644" y="0">e</tspan>
|
|
2468
|
+
<tspan x="0" y="0">An official website</tspan>
|
|
2316
2469
|
</text>
|
|
2317
2470
|
</g>
|
|
2318
2471
|
</svg>
|
|
2319
2472
|
</button>
|
|
2320
2473
|
</div>
|
|
2321
|
-
`,
|
|
2474
|
+
`, xr = `<div class="utds-official-website-hover__wrapper">
|
|
2322
2475
|
How do I know it’s official?<br />
|
|
2323
2476
|
Learn more.
|
|
2324
2477
|
</div>
|
|
2325
2478
|
`;
|
|
2326
|
-
function
|
|
2479
|
+
function Wr() {
|
|
2327
2480
|
let e;
|
|
2328
|
-
switch (
|
|
2329
|
-
case
|
|
2330
|
-
e =
|
|
2481
|
+
switch (O().size) {
|
|
2482
|
+
case Te.LARGE:
|
|
2483
|
+
e = Br;
|
|
2331
2484
|
break;
|
|
2332
|
-
case
|
|
2333
|
-
case
|
|
2334
|
-
e =
|
|
2485
|
+
case Te.SMALL:
|
|
2486
|
+
case Te.MEDIUM:
|
|
2487
|
+
e = Hr;
|
|
2335
2488
|
break;
|
|
2336
2489
|
default:
|
|
2337
|
-
throw new Error(`Unknown settings size: '${
|
|
2490
|
+
throw new Error(`Unknown settings size: '${O().size}'`);
|
|
2338
2491
|
}
|
|
2339
|
-
const t =
|
|
2492
|
+
const t = g(e);
|
|
2340
2493
|
if (!/** @type {HTMLElement} */
|
|
2341
|
-
t.querySelector(
|
|
2494
|
+
t.querySelector(p(a.LOGO_SVG)))
|
|
2342
2495
|
throw new Error("UtahLogo: logoButton not found");
|
|
2343
|
-
return t.setAttribute("id",
|
|
2496
|
+
return t.setAttribute("id", R()), Oe(t, g(xr)), t;
|
|
2344
2497
|
}
|
|
2345
|
-
function
|
|
2498
|
+
function kr() {
|
|
2346
2499
|
var n;
|
|
2347
|
-
const e =
|
|
2348
|
-
e.classList.add(`utds-header--${((n =
|
|
2349
|
-
const t =
|
|
2350
|
-
return e.appendChild(t), t.appendChild(
|
|
2500
|
+
const e = g(Ir);
|
|
2501
|
+
e.classList.add(`utds-header--${((n = O().size) == null ? void 0 : n.toLowerCase()) || Te.MEDIUM}`);
|
|
2502
|
+
const t = g(br);
|
|
2503
|
+
return e.appendChild(t), t.appendChild(Wr()), t.appendChild(g(gr)), t.appendChild(Dr()), e.appendChild(Ur()), e.appendChild(g(vr)), e;
|
|
2351
2504
|
}
|
|
2352
|
-
const
|
|
2505
|
+
const qr = `<li class="menu-item">
|
|
2353
2506
|
<span class="menu-item__title">
|
|
2354
2507
|
<button class="menu-item__button-title" type="button"></button>
|
|
2355
2508
|
<a class="menu-item__link-title"></a>
|
|
2356
2509
|
<span class="menu-chiclet"></span>
|
|
2357
2510
|
</span>
|
|
2358
2511
|
</li>
|
|
2359
|
-
`,
|
|
2512
|
+
`, Vr = `<div class="utah-design-system main-menu__outer">
|
|
2360
2513
|
<div class="main-menu__wrapper">
|
|
2361
2514
|
<nav class="horizontal-menu main-menu__nav">
|
|
2362
2515
|
<h2 class="main-menu__title visually-hidden"></h2>
|
|
@@ -2383,7 +2536,7 @@ const Dr = `<li class="menu-item">
|
|
|
2383
2536
|
</button>
|
|
2384
2537
|
</div>
|
|
2385
2538
|
</div>
|
|
2386
|
-
`,
|
|
2539
|
+
`, Fr = `<div class="utah-design-system" id="search-modal">
|
|
2387
2540
|
<div class="search-modal__close-button-wrapper">
|
|
2388
2541
|
<button type="button" class="search-modal__close-button button icon-button icon-button--borderless">
|
|
2389
2542
|
<span class="utds-icon-before-x-icon" aria-hidden="true"></span>
|
|
@@ -2409,183 +2562,205 @@ const Dr = `<li class="menu-item">
|
|
|
2409
2562
|
<div class="search-backdrop modal-backdrop backdrop-dark"></div>
|
|
2410
2563
|
</div>
|
|
2411
2564
|
`;
|
|
2412
|
-
function
|
|
2413
|
-
const e = document.getElementById(
|
|
2565
|
+
function We() {
|
|
2566
|
+
const e = document.getElementById(a.SEARCH__SEARCH_MODAL);
|
|
2414
2567
|
if (!e)
|
|
2415
2568
|
throw new Error("closSearchModal: searchModal not found");
|
|
2416
2569
|
e.remove();
|
|
2417
2570
|
const t = (
|
|
2418
2571
|
/** @type {HTMLElement} */
|
|
2419
|
-
document.querySelector(
|
|
2572
|
+
document.querySelector(p(a.MAIN_MENU__SEARCH))
|
|
2420
2573
|
);
|
|
2421
2574
|
if (!t)
|
|
2422
2575
|
throw new Error("closSearchModal: searchIcon not found");
|
|
2423
2576
|
t.focus();
|
|
2424
2577
|
}
|
|
2425
|
-
function
|
|
2426
|
-
const e =
|
|
2578
|
+
function Xe() {
|
|
2579
|
+
const e = g(Fr), t = (
|
|
2427
2580
|
/** @type {HTMLElement} */
|
|
2428
|
-
e.querySelector(
|
|
2581
|
+
e.querySelector(p(a.SEARCH__SEARCH_BACKDROP))
|
|
2429
2582
|
);
|
|
2430
2583
|
if (!t)
|
|
2431
2584
|
throw new Error("showSearchModal: backdrop not found");
|
|
2432
2585
|
const n = (
|
|
2433
2586
|
/** @type {HTMLElement} */
|
|
2434
|
-
e.querySelector(
|
|
2587
|
+
e.querySelector(p(a.SEARCH__SEARCH_CLOSE_BUTTON))
|
|
2435
2588
|
);
|
|
2436
2589
|
if (!n)
|
|
2437
2590
|
throw new Error("showSearchModal: closeButton not found");
|
|
2438
2591
|
const o = (
|
|
2439
2592
|
/** @type {HTMLElement} */
|
|
2440
|
-
e.querySelector(
|
|
2593
|
+
e.querySelector(p(a.SEARCH__SEARCH_BUTTON))
|
|
2441
2594
|
);
|
|
2442
2595
|
if (!o)
|
|
2443
2596
|
throw new Error("showSearchModal: searchButton not found");
|
|
2444
2597
|
const r = (
|
|
2445
2598
|
/** @type {HTMLElement} */
|
|
2446
|
-
e.querySelector(
|
|
2599
|
+
e.querySelector(p(a.SEARCH__SEARCH_BUTTON_WRAPPER))
|
|
2447
2600
|
);
|
|
2448
2601
|
if (!r)
|
|
2449
2602
|
throw new Error("showSearchModal: searchButtonWrapper not found");
|
|
2450
2603
|
const i = (
|
|
2451
2604
|
/** @type {HTMLInputElement} */
|
|
2452
|
-
e.querySelector(
|
|
2605
|
+
e.querySelector(p(a.SEARCH__SEARCH_INPUT))
|
|
2453
2606
|
);
|
|
2454
2607
|
if (!i)
|
|
2455
2608
|
throw new Error("showSearchModal: searchInput not found");
|
|
2456
|
-
o.onclick = (
|
|
2457
|
-
var l,
|
|
2458
|
-
|
|
2459
|
-
}, n.onclick = (
|
|
2460
|
-
|
|
2461
|
-
}, t.onclick = (
|
|
2462
|
-
|
|
2609
|
+
o.onclick = (s) => {
|
|
2610
|
+
var l, c;
|
|
2611
|
+
s.preventDefault(), s.stopPropagation(), We(), (c = (l = O()).onSearch) == null || c.call(l, i.value);
|
|
2612
|
+
}, n.onclick = (s) => {
|
|
2613
|
+
s.preventDefault(), s.stopPropagation(), We();
|
|
2614
|
+
}, t.onclick = (s) => {
|
|
2615
|
+
s.preventDefault(), s.stopPropagation(), We();
|
|
2463
2616
|
}, document.body.appendChild(e), i.focus(), i.oninput = () => {
|
|
2464
|
-
r.classList.remove(
|
|
2617
|
+
r.classList.remove(a.VISUALLY_HIDDEN);
|
|
2465
2618
|
}, o.onfocus = () => {
|
|
2466
|
-
r.classList.remove(
|
|
2467
|
-
}, e.onkeyup = (
|
|
2468
|
-
(
|
|
2469
|
-
}, n.addEventListener("focusout", (
|
|
2470
|
-
|
|
2619
|
+
r.classList.remove(a.VISUALLY_HIDDEN);
|
|
2620
|
+
}, e.onkeyup = (s) => {
|
|
2621
|
+
(s.code === "Escape" || s.key === "Escape") && (s.preventDefault(), s.stopPropagation(), We());
|
|
2622
|
+
}, n.addEventListener("focusout", (s) => {
|
|
2623
|
+
s.preventDefault(), s.stopPropagation(), ge[ot.SHIFT] ? o.focus() : i.focus();
|
|
2471
2624
|
});
|
|
2472
|
-
const
|
|
2473
|
-
if (!
|
|
2625
|
+
const u = e.querySelector(".search-modal__hidden-last-focusable");
|
|
2626
|
+
if (!u)
|
|
2474
2627
|
throw new Error("showSearchModal: hiddenLastFocusableButton not found");
|
|
2475
|
-
|
|
2476
|
-
|
|
2628
|
+
u.addEventListener("focusin", (s) => {
|
|
2629
|
+
s.preventDefault(), s.stopPropagation(), n.focus();
|
|
2477
2630
|
});
|
|
2478
2631
|
}
|
|
2479
|
-
function
|
|
2480
|
-
var
|
|
2481
|
-
const e =
|
|
2632
|
+
function Gr() {
|
|
2633
|
+
var s;
|
|
2634
|
+
const e = O(), t = g(Vr);
|
|
2635
|
+
let n = t.querySelector(p(a.MAIN_MENU__NAV));
|
|
2482
2636
|
if (!n)
|
|
2483
2637
|
throw new Error("renderMainMenu(): mainMenu not created");
|
|
2484
|
-
const o = n.querySelector(
|
|
2638
|
+
const o = n.querySelector(p(a.MAIN_MENU__TITLE));
|
|
2485
2639
|
if (!o)
|
|
2486
2640
|
throw new Error("renderMainMenu(): titleTag not found");
|
|
2487
2641
|
const r = "main-menu__nav";
|
|
2488
|
-
n.setAttribute("aria-labelledby", r), o.setAttribute("id", r), o.innerHTML = e.mainMenu.title
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
if (!h)
|
|
2504
|
-
throw new Error(`renderMainMenu(): button title not found for ${u.title}`);
|
|
2505
|
-
h.setAttribute("id", `${s.MENU_ITEM__BUTTON_TITLE}__${u.title}-${C()}`);
|
|
2506
|
-
const p = (
|
|
2507
|
-
/** @type {HTMLElement} */
|
|
2508
|
-
_.querySelector(f(s.MENU_ITEM__LINK_TITLE))
|
|
2509
|
-
);
|
|
2510
|
-
if (!p)
|
|
2511
|
-
throw new Error(`renderMainMenu(): link title not found for ${u.title}`);
|
|
2512
|
-
if ((u.isSelected || u.actionMenu && We(u.actionMenu, ["actionMenu"], (v) => !!v.isSelected)) && (h.classList.add(s.MENU_ITEM__SELECTED), p.classList.add(s.MENU_ITEM__SELECTED)), u.actionMenu) {
|
|
2513
|
-
h.innerHTML = u.title, p.remove();
|
|
2514
|
-
const v = {
|
|
2515
|
-
menuItems: u.actionMenu,
|
|
2516
|
-
title: u.title
|
|
2517
|
-
}, T = _t(
|
|
2518
|
-
v,
|
|
2519
|
-
h,
|
|
2520
|
-
{
|
|
2521
|
-
childrenMenuType: u.childrenMenuType || $.FLYOUT
|
|
2522
|
-
}
|
|
2642
|
+
if (n.setAttribute("aria-labelledby", r), o.setAttribute("id", r), e.mainMenu ? o.innerHTML = e.mainMenu.title : (n.remove(), n = null), e.mainMenu) {
|
|
2643
|
+
const l = n == null ? void 0 : n.querySelector(p(a.MAIN_MENU__MENU_TOP));
|
|
2644
|
+
if (!l)
|
|
2645
|
+
throw new Error("renderMainMenu(): mainMenuTop not found");
|
|
2646
|
+
e.mainMenu.menuItems.forEach((c) => {
|
|
2647
|
+
var m, E;
|
|
2648
|
+
const d = g(qr);
|
|
2649
|
+
l.appendChild(d);
|
|
2650
|
+
const h = P(
|
|
2651
|
+
d.querySelector(p(a.MENU_ITEM__TITLE)),
|
|
2652
|
+
`renderMainMenu(): sub menu title not found for ${c.title}`
|
|
2653
|
+
), f = P(
|
|
2654
|
+
/** @type {HTMLElement} */
|
|
2655
|
+
h.querySelector(p(a.MENU_ITEM__BUTTON_TITLE)),
|
|
2656
|
+
`renderMainMenu(): button title not found for ${c.title}`
|
|
2523
2657
|
);
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2658
|
+
f.setAttribute("id", `${a.MENU_ITEM__BUTTON_TITLE}__${c.title}-${R()}`);
|
|
2659
|
+
const _ = P(
|
|
2660
|
+
/** @type {HTMLElement} */
|
|
2661
|
+
h.querySelector(p(a.MENU_ITEM__LINK_TITLE)),
|
|
2662
|
+
`renderMainMenu(): link title not found for ${c.title}`
|
|
2663
|
+
);
|
|
2664
|
+
if ((c.isSelected || c.actionMenu && Ve(c.actionMenu, ["actionMenu"], (v) => !!v.isSelected)) && (f.classList.add(a.MENU_ITEM__SELECTED), _.classList.add(a.MENU_ITEM__SELECTED)), c.actionMenu) {
|
|
2665
|
+
f.innerHTML = c.title, _.remove();
|
|
2666
|
+
const v = {
|
|
2667
|
+
menuItems: c.actionMenu,
|
|
2668
|
+
title: c.title
|
|
2669
|
+
}, T = mt(
|
|
2670
|
+
v,
|
|
2671
|
+
f,
|
|
2672
|
+
{
|
|
2673
|
+
childrenMenuType: c.childrenMenuType || j.FLYOUT
|
|
2674
|
+
}
|
|
2675
|
+
);
|
|
2676
|
+
d.appendChild(T), Pe(d, f, T, "menu", { shouldFocusOnHover: !0 });
|
|
2677
|
+
let A;
|
|
2678
|
+
switch (c.childrenMenuType) {
|
|
2679
|
+
case j.INLINE:
|
|
2680
|
+
A = a.MENU_ITEM__INLINE;
|
|
2681
|
+
break;
|
|
2682
|
+
case j.MEGA_MENU:
|
|
2683
|
+
A = a.MENU_ITEM__MEGA_MENU;
|
|
2684
|
+
break;
|
|
2685
|
+
case j.FLYOUT:
|
|
2686
|
+
default:
|
|
2687
|
+
A = a.MENU_ITEM__FLY_OUT;
|
|
2688
|
+
break;
|
|
2689
|
+
}
|
|
2690
|
+
d.classList.add(A);
|
|
2691
|
+
} else if (c.actionFunction)
|
|
2692
|
+
f.innerHTML = c.title, f.onclick = c.actionFunction, _.remove();
|
|
2693
|
+
else if (c.actionFunctionUrl)
|
|
2694
|
+
_.innerHTML = c.title, _.setAttribute("href", c.actionFunctionUrl.url), _.onclick = (v) => {
|
|
2695
|
+
var T, A;
|
|
2696
|
+
(T = c.actionFunctionUrl) != null && T.skipHandleEvent || (v.stopPropagation(), v.preventDefault()), (A = c.actionFunctionUrl) == null || A.actionFunction(v);
|
|
2697
|
+
}, f.remove();
|
|
2698
|
+
else if (c.actionUrl)
|
|
2699
|
+
_.innerHTML = c.title, _.setAttribute("href", c.actionUrl.url), f.remove();
|
|
2700
|
+
else
|
|
2701
|
+
throw new Error(`renderMainMenu(): menuItem is missing an action: ${c.title}`);
|
|
2702
|
+
((m = c.actionUrl) != null && m.openInNewTab || (E = c.actionFunctionUrl) != null && E.openInNewTab) && (_.setAttribute("target", "_blank"), _.appendChild(g(Zt)));
|
|
2703
|
+
});
|
|
2704
|
+
}
|
|
2705
|
+
let i = null;
|
|
2553
2706
|
if (e.utahId) {
|
|
2554
|
-
const { button:
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
_.appendChild(u);
|
|
2707
|
+
const { button: l, menu: c } = Sr();
|
|
2708
|
+
i = c, P(
|
|
2709
|
+
t.querySelector(p(a.MOBILE__UTAH_ID)),
|
|
2710
|
+
"renderMainMenu: utahIdButtonWrapper not found"
|
|
2711
|
+
).appendChild(l);
|
|
2560
2712
|
}
|
|
2561
|
-
const
|
|
2562
|
-
|
|
2563
|
-
|
|
2713
|
+
const u = P(
|
|
2714
|
+
/** @type {HTMLElement} */
|
|
2715
|
+
t.querySelector(p(a.MAIN_MENU__SEARCH)),
|
|
2716
|
+
"renderMainMenu: searchIcon not found"
|
|
2717
|
+
);
|
|
2564
2718
|
if (e.onSearch) {
|
|
2565
|
-
if (
|
|
2719
|
+
if (Oe(u, document.createTextNode("Search")), u.onclick)
|
|
2566
2720
|
throw new Error("searchIcon already has onclick");
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2721
|
+
if (u.onclick = () => Xe(), !e.mainMenu) {
|
|
2722
|
+
const l = P(
|
|
2723
|
+
document.querySelector(p(a.CITIZEN_EXPERIENCE)),
|
|
2724
|
+
"renderMainMenu: citizen experience wrapper not found"
|
|
2725
|
+
), c = g(u.outerHTML);
|
|
2726
|
+
if (Oe(c, document.createTextNode("Search")), c.onclick = () => Xe(), u.classList.add(a.DESKTOP__HIDDEN), e.utahId !== !1) {
|
|
2727
|
+
const d = P(document.querySelector(p(a.UTAH_ID)), "renderMainMenu: utahId wrapper not found");
|
|
2728
|
+
l.insertBefore(c, d);
|
|
2729
|
+
} else
|
|
2730
|
+
l.appendChild(c);
|
|
2731
|
+
}
|
|
2732
|
+
if (!e.mainMenu && !e.actionItems && e.utahId === !1) {
|
|
2733
|
+
const l = g(
|
|
2734
|
+
/** @type {HTMLElement} */
|
|
2735
|
+
u.outerHTML
|
|
2736
|
+
);
|
|
2737
|
+
if (Oe(l, document.createTextNode("Search")), l.onclick)
|
|
2738
|
+
throw new Error("searchIconMobile already has onclick");
|
|
2739
|
+
l.onclick = () => Xe(), P(
|
|
2740
|
+
document.querySelector(p(a.CITIZEN_EXPERIENCE_MOBILE)),
|
|
2741
|
+
"renderMainMenu: citizen-experience--mobile not found"
|
|
2742
|
+
).appendChild(l);
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
return e.onSearch || ((e.mainMenu || !e.mainMenu && e.utahId) && ((s = u.parentElement) == null || s.insertBefore(g('<div class="main-menu__search-placeholder">'), u)), u.remove()), { mainMenuWrapper: t, utahIdPopup: i };
|
|
2571
2746
|
}
|
|
2572
|
-
function
|
|
2747
|
+
function $r(e) {
|
|
2573
2748
|
let t = NaN, n = null, o = null;
|
|
2574
2749
|
return {
|
|
2575
|
-
promise: new Promise((i,
|
|
2750
|
+
promise: new Promise((i, u) => {
|
|
2576
2751
|
t = setTimeout(
|
|
2577
2752
|
() => {
|
|
2578
2753
|
t = NaN, i();
|
|
2579
2754
|
},
|
|
2580
2755
|
e
|
|
2581
|
-
), n = i, o =
|
|
2756
|
+
), n = i, o = u;
|
|
2582
2757
|
}),
|
|
2583
2758
|
clearTimeout: (i) => {
|
|
2584
2759
|
t && (clearTimeout(t), t = NaN, i(n, o));
|
|
2585
2760
|
}
|
|
2586
2761
|
};
|
|
2587
2762
|
}
|
|
2588
|
-
const
|
|
2763
|
+
const Z = {
|
|
2589
2764
|
// null = not yet loaded, false = ajaxing, true = have a result (may be error or user data)
|
|
2590
2765
|
isDefinitive: null,
|
|
2591
2766
|
lastError: null,
|
|
@@ -2593,21 +2768,21 @@ const Y = {
|
|
|
2593
2768
|
};
|
|
2594
2769
|
function Ft(e) {
|
|
2595
2770
|
var t, n, o;
|
|
2596
|
-
e.isDefinitive && (
|
|
2771
|
+
e.isDefinitive && (un(e), (o = (n = (t = O()) == null ? void 0 : t.utahId) == null ? void 0 : n.onAuthChanged) == null || o.call(n, e));
|
|
2597
2772
|
}
|
|
2598
|
-
let
|
|
2599
|
-
const
|
|
2600
|
-
async function
|
|
2773
|
+
let Gt = !0;
|
|
2774
|
+
const jr = 500;
|
|
2775
|
+
async function fn() {
|
|
2601
2776
|
var t, n;
|
|
2602
2777
|
let e = null;
|
|
2603
|
-
if (
|
|
2604
|
-
e = Promise.resolve(
|
|
2605
|
-
else if (
|
|
2606
|
-
e =
|
|
2607
|
-
|
|
2778
|
+
if (Z.isDefinitive === !1)
|
|
2779
|
+
e = Promise.resolve(Z);
|
|
2780
|
+
else if (Gt)
|
|
2781
|
+
e = $r(jr).promise.then(() => {
|
|
2782
|
+
Gt = !1, fn().catch((o) => console.error(o));
|
|
2608
2783
|
});
|
|
2609
2784
|
else {
|
|
2610
|
-
const o =
|
|
2785
|
+
const o = O();
|
|
2611
2786
|
if (o.utahId === !1)
|
|
2612
2787
|
e = Promise.resolve({
|
|
2613
2788
|
isDefinitive: !0,
|
|
@@ -2615,16 +2790,16 @@ async function dn() {
|
|
|
2615
2790
|
userInfo: null
|
|
2616
2791
|
});
|
|
2617
2792
|
else if (o.utahId === !0 || ((t = o.utahId) == null ? void 0 : t.currentUser) === void 0)
|
|
2618
|
-
|
|
2793
|
+
Z.isDefinitive = !1, e = fetch(Ne.USER_INFO, { credentials: "include" }).then((r) => r.json()).then((r) => {
|
|
2619
2794
|
if (r.status === 200)
|
|
2620
|
-
|
|
2795
|
+
Z.lastError = null, Z.userInfo = /** @type UserInfo */
|
|
2621
2796
|
r.data;
|
|
2622
2797
|
else
|
|
2623
2798
|
throw new Error(r.err);
|
|
2624
2799
|
}).catch((r) => {
|
|
2625
|
-
|
|
2800
|
+
Z.lastError = r, Z.userInfo = null;
|
|
2626
2801
|
}).finally(() => {
|
|
2627
|
-
|
|
2802
|
+
Z.isDefinitive = !0, Ft(Z);
|
|
2628
2803
|
});
|
|
2629
2804
|
else {
|
|
2630
2805
|
const r = {
|
|
@@ -2637,184 +2812,141 @@ async function dn() {
|
|
|
2637
2812
|
}
|
|
2638
2813
|
return e;
|
|
2639
2814
|
}
|
|
2640
|
-
function
|
|
2641
|
-
return
|
|
2815
|
+
function zr() {
|
|
2816
|
+
return Z;
|
|
2642
2817
|
}
|
|
2643
|
-
function
|
|
2644
|
-
const e = document.getElementById(
|
|
2818
|
+
function Yr() {
|
|
2819
|
+
const e = document.getElementById(a.MOBILE_MENU_ACTON_BAR__PROFILE_ID);
|
|
2645
2820
|
if (!e)
|
|
2646
2821
|
throw new Error("removeUtahIdInMobileMenu: profileActionItem not found");
|
|
2647
2822
|
const t = (
|
|
2648
2823
|
/** @type {HTMLElement} */
|
|
2649
|
-
e.closest(
|
|
2824
|
+
e.closest(p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2650
2825
|
);
|
|
2651
2826
|
if (!t)
|
|
2652
2827
|
throw new Error("removeUtahIdInMobileMenu: profileActionItemWrapper not found");
|
|
2653
2828
|
t.remove();
|
|
2654
2829
|
}
|
|
2655
|
-
function
|
|
2656
|
-
const n = document.querySelector(
|
|
2830
|
+
function Zr(e, t) {
|
|
2831
|
+
const n = document.querySelector(p(a.MOBILE__UTAH_ID));
|
|
2657
2832
|
if (!n)
|
|
2658
2833
|
throw new Error("hookupUtahIdInMobileMenu: utahIdWrapper not found");
|
|
2659
2834
|
const o = (
|
|
2660
2835
|
/** @type {HTMLElement} */
|
|
2661
|
-
n.querySelector(
|
|
2836
|
+
n.querySelector(p(a.UTAH_ID__BUTTON))
|
|
2662
2837
|
);
|
|
2663
2838
|
if (!o)
|
|
2664
2839
|
throw new Error("hookupUtahIdInMobileMenu: utahIdButton not found");
|
|
2665
|
-
if (!e.querySelector(
|
|
2840
|
+
if (!e.querySelector(p(a.MOBILE_MENU__CONTENT)))
|
|
2666
2841
|
throw new Error("hookupUtahIdInMobileMenu: mobileContentWrapper not found");
|
|
2667
|
-
const i = document.getElementById(
|
|
2842
|
+
const i = document.getElementById(a.MOBILE_MENU_ACTON_BAR__PROFILE_ID);
|
|
2668
2843
|
if (!i)
|
|
2669
2844
|
throw new Error("hookupUtahIdInMobileMenu: profileActionItem not found");
|
|
2670
|
-
const
|
|
2845
|
+
const u = (
|
|
2671
2846
|
/** @type {HTMLElement} */
|
|
2672
|
-
i.closest(
|
|
2847
|
+
i.closest(p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2673
2848
|
);
|
|
2674
|
-
if (!
|
|
2849
|
+
if (!u)
|
|
2675
2850
|
throw new Error("hookupHamburger: profileActionItemWrapper not found");
|
|
2676
|
-
const
|
|
2677
|
-
|
|
2851
|
+
const s = it(t);
|
|
2852
|
+
st(
|
|
2678
2853
|
o,
|
|
2679
|
-
|
|
2680
|
-
|
|
2854
|
+
s,
|
|
2855
|
+
u,
|
|
2681
2856
|
{
|
|
2682
2857
|
ariaHasPopupType: "menu",
|
|
2683
2858
|
onClickHandler: (l) => {
|
|
2684
|
-
var
|
|
2685
|
-
const
|
|
2686
|
-
let
|
|
2687
|
-
if (!(
|
|
2688
|
-
|
|
2689
|
-
const
|
|
2690
|
-
|
|
2859
|
+
var f;
|
|
2860
|
+
const c = zr(), d = O();
|
|
2861
|
+
let h = !1;
|
|
2862
|
+
if (!(c != null && c.isDefinitive) || !((f = c == null ? void 0 : c.userInfo) != null && f.authenticated)) {
|
|
2863
|
+
h = !0;
|
|
2864
|
+
const _ = d.utahId !== !1 && d.utahId !== !0 && d.utahId.onSignIn;
|
|
2865
|
+
_ ? _(l) : (l.preventDefault(), l.stopPropagation(), window.location.href = Ne.SIGN_IN);
|
|
2691
2866
|
}
|
|
2692
|
-
return
|
|
2867
|
+
return h;
|
|
2693
2868
|
},
|
|
2694
2869
|
shouldOnClickCloseMenu: !0
|
|
2695
2870
|
}
|
|
2696
2871
|
);
|
|
2697
2872
|
}
|
|
2698
|
-
function
|
|
2699
|
-
|
|
2700
|
-
|
|
2873
|
+
function Kr() {
|
|
2874
|
+
var e;
|
|
2875
|
+
return Ee(
|
|
2876
|
+
(e = O().mainMenu) == null ? void 0 : e.menuItems,
|
|
2701
2877
|
{
|
|
2702
|
-
childrenMenuType:
|
|
2878
|
+
childrenMenuType: j.INLINE,
|
|
2703
2879
|
removePopupArrow: !0
|
|
2704
2880
|
}
|
|
2705
2881
|
);
|
|
2706
2882
|
}
|
|
2707
|
-
|
|
2708
|
-
<h2 class="utds-official-website-popup__heading">
|
|
2709
|
-
This is an official website of the State of Utah. Here’s how you know:
|
|
2710
|
-
</h2>
|
|
2711
|
-
<div class="utds-official-website-popup__content">
|
|
2712
|
-
<div class="utds-official-website-popup__col">
|
|
2713
|
-
<div class="utds-icon-before-verified big-icon" aria-hidden="true"></div>
|
|
2714
|
-
<div>
|
|
2715
|
-
<strong>Official Utah websites use utah.gov.</strong><br />
|
|
2716
|
-
Utah.gov websites belongs to an official government organization in the State of Utah.
|
|
2717
|
-
</div>
|
|
2718
|
-
</div>
|
|
2719
|
-
<div class="utds-official-website-popup__col">
|
|
2720
|
-
<div class="utds-icon-before-lock big-icon" aria-hidden="true"></div>
|
|
2721
|
-
<div>
|
|
2722
|
-
<strong>Secure utah.gov websites use HTTPS.</strong><br />
|
|
2723
|
-
A lock <span class="utds-icon-before-lock" aria-hidden="true"></span> or <strong>https://</strong> means you’ve
|
|
2724
|
-
safely connected to the utah.gov website.
|
|
2725
|
-
Share sensitive information only on official, secure websites.
|
|
2726
|
-
</div>
|
|
2727
|
-
</div>
|
|
2728
|
-
</div>
|
|
2729
|
-
<button type="button" class="utds-official-website-popup__close-button button icon-button icon-button--borderless">
|
|
2730
|
-
<span class="utds-icon-before-x-icon" aria-hidden="true"></span>
|
|
2731
|
-
<span class="visually-hidden">Close official website popup</span>
|
|
2732
|
-
</button>
|
|
2733
|
-
</div>
|
|
2734
|
-
`;
|
|
2735
|
-
function zr() {
|
|
2736
|
-
const e = I(jr), n = (
|
|
2737
|
-
/** @type {HTMLElement} */
|
|
2738
|
-
document.querySelector(f(s.LOGO)).querySelector(f(s.LOGO_SVG))
|
|
2739
|
-
);
|
|
2740
|
-
if (!n)
|
|
2741
|
-
throw new Error("renderOfficialWebsite: logoButton not found");
|
|
2742
|
-
if (n.onclick)
|
|
2743
|
-
throw new Error("renderOfficialWebsite: logoButton already has an onclick");
|
|
2744
|
-
n.onclick = () => {
|
|
2745
|
-
e.classList.toggle(s.VISUALLY_HIDDEN), e.classList.contains(s.VISUALLY_HIDDEN) ? (n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true")) : (n.setAttribute("aria-expanded", "true"), e.setAttribute("aria-hidden", "false"), e.focus());
|
|
2746
|
-
const r = document.querySelectorAll(f(s.TOOLTIP__WRAPPER));
|
|
2747
|
-
r == null || r.forEach((i) => {
|
|
2748
|
-
i.classList.add(s.TOOLTIP__WRAPPER__HIDDEN), i.classList.remove(s.TOOLTIP__WRAPPER__VISIBLE);
|
|
2749
|
-
});
|
|
2750
|
-
};
|
|
2751
|
-
const o = e.querySelector(f(s.LOGO_OFFICIAL_CLOSE_BUTTON));
|
|
2752
|
-
if (!o)
|
|
2753
|
-
throw new Error("renderOfficialWebsite: closeButton not found");
|
|
2754
|
-
return o.onclick = () => {
|
|
2755
|
-
e.classList.toggle(s.VISUALLY_HIDDEN), n.focus(), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true");
|
|
2756
|
-
}, o.id || (o.id = C()), e.id || (e.id = C()), n.setAttribute("aria-controls", e.id), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true"), e.setAttribute("aria-labelledby", n.id), e;
|
|
2757
|
-
}
|
|
2758
|
-
function Yr() {
|
|
2883
|
+
function Xr() {
|
|
2759
2884
|
const t = [...document.querySelectorAll(`
|
|
2760
|
-
${
|
|
2761
|
-
${
|
|
2762
|
-
${
|
|
2885
|
+
${p(a.MOBILE_MENU__ACTION_BAR)}
|
|
2886
|
+
${p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)}
|
|
2887
|
+
${p(a.ACTION_ITEM__ICON_BUTTON)}
|
|
2763
2888
|
`)];
|
|
2764
2889
|
t.forEach(
|
|
2765
|
-
(
|
|
2766
|
-
|
|
2767
|
-
(
|
|
2768
|
-
},
|
|
2769
|
-
const
|
|
2770
|
-
let
|
|
2771
|
-
if (
|
|
2772
|
-
|
|
2773
|
-
const
|
|
2890
|
+
(r) => {
|
|
2891
|
+
r.onkeydown = (i) => {
|
|
2892
|
+
(i.code === "Home" || i.code === "End" || i.code === "ArrowRight" || i.code === "ArrowLeft") && i.preventDefault();
|
|
2893
|
+
}, r.onkeyup = (i) => {
|
|
2894
|
+
const u = t.indexOf(r);
|
|
2895
|
+
let s = NaN;
|
|
2896
|
+
if (i.code === "Home" ? s = 0 : i.code === "End" ? s = t.length - 1 : i.code === "ArrowRight" ? s = (u + 1) % t.length : i.code === "ArrowLeft" && (s = (t.length + u - 1) % t.length), !Number.isNaN(s)) {
|
|
2897
|
+
i.preventDefault(), i.stopPropagation();
|
|
2898
|
+
const l = t[s], c = (
|
|
2774
2899
|
/** @type {HTMLElement} */
|
|
2775
|
-
|
|
2776
|
-
|
|
2900
|
+
l.closest(
|
|
2901
|
+
p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)
|
|
2777
2902
|
)
|
|
2778
2903
|
);
|
|
2779
|
-
if (!
|
|
2904
|
+
if (!c)
|
|
2780
2905
|
throw new Error("hookupMobileActionItemKeyboarding: newWrapper not found... how in the blazes?!");
|
|
2781
|
-
const
|
|
2782
|
-
if (
|
|
2783
|
-
|
|
2906
|
+
const d = l.getAttribute("aria-controls");
|
|
2907
|
+
if (d && document.getElementById(d))
|
|
2908
|
+
l.click();
|
|
2784
2909
|
else {
|
|
2785
2910
|
const _ = (
|
|
2786
2911
|
/** @type {HTMLElement} */
|
|
2787
|
-
document.querySelector(
|
|
2912
|
+
document.querySelector(p(a.MOBILE_MENU__WRAPPER))
|
|
2788
2913
|
);
|
|
2789
2914
|
if (!_)
|
|
2790
2915
|
throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");
|
|
2791
|
-
const
|
|
2916
|
+
const m = (
|
|
2792
2917
|
/** @type {HTMLElement} */
|
|
2793
|
-
_.querySelector(
|
|
2918
|
+
_.querySelector(p(a.MOBILE_MENU__CONTENT))
|
|
2794
2919
|
);
|
|
2795
|
-
if (!
|
|
2920
|
+
if (!m)
|
|
2796
2921
|
throw new Error("hookupMobileActionItemKeyboarding: mobileContentWrapper not found");
|
|
2797
|
-
|
|
2922
|
+
m.querySelectorAll(p(a.MOBILE_MENU__CONTENT_ITEM)).forEach((E) => E.classList.remove(a.IS_OPEN));
|
|
2798
2923
|
}
|
|
2799
|
-
const
|
|
2924
|
+
const f = (
|
|
2800
2925
|
/** @type {HTMLElement} */
|
|
2801
|
-
document.querySelector(
|
|
2926
|
+
document.querySelector(p(a.MOBILE_MENU__WRAPPER))
|
|
2802
2927
|
);
|
|
2803
|
-
if (!
|
|
2928
|
+
if (!f)
|
|
2804
2929
|
throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");
|
|
2805
|
-
|
|
2930
|
+
Je(f, c);
|
|
2806
2931
|
}
|
|
2807
2932
|
};
|
|
2808
2933
|
}
|
|
2809
2934
|
);
|
|
2935
|
+
const n = P(
|
|
2936
|
+
document.querySelector(p(a.MOBILE_MENU__LAST_FOCUSABLE)),
|
|
2937
|
+
"hookupMobileActionItemKeyboarding: hiddenLastFocusableButton not found"
|
|
2938
|
+
), { hamburger: o } = we("hookupMobileActionItemKeyboarding");
|
|
2939
|
+
n.addEventListener("focusin", (r) => {
|
|
2940
|
+
r.preventDefault(), r.stopPropagation(), o.focus();
|
|
2941
|
+
});
|
|
2810
2942
|
}
|
|
2811
|
-
function
|
|
2812
|
-
const e =
|
|
2813
|
-
let t = document.getElementById(
|
|
2814
|
-
t || (t = document.createElement("style"), t.id =
|
|
2943
|
+
function Jr() {
|
|
2944
|
+
const e = Dn.replace(a.MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER, `${O().mediaSizes.tabletPortrait}px`).replace(a.MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER, `${O().mediaSizes.tabletLandscape}px`).replace(a.MEDIA_SIZE__MOBILE__PLACEHOLDER, `${O().mediaSizes.mobile}px`);
|
|
2945
|
+
let t = document.getElementById(a.CSS_HEADER_MEDIA_TAG_ID);
|
|
2946
|
+
t || (t = document.createElement("style"), t.id = a.CSS_HEADER_MEDIA_TAG_ID), t.innerHTML = e, document.body.appendChild(t);
|
|
2815
2947
|
}
|
|
2816
|
-
function
|
|
2817
|
-
const e =
|
|
2948
|
+
function Qr() {
|
|
2949
|
+
const e = O();
|
|
2818
2950
|
let t = document.body;
|
|
2819
2951
|
if (e.domLocationTarget) {
|
|
2820
2952
|
const n = [
|
|
@@ -2827,56 +2959,58 @@ function Zr() {
|
|
|
2827
2959
|
if (n.length > 1)
|
|
2828
2960
|
throw new Error("loadHeader: domLocationTarget must only have one target specified");
|
|
2829
2961
|
if (e.domLocationTarget.cssSelector)
|
|
2830
|
-
t = document.querySelector(e.domLocationTarget.cssSelector),
|
|
2962
|
+
t = document.querySelector(e.domLocationTarget.cssSelector), ee(!t, `loadHeader: element not found for domLocationTarget.cssSelector ${e.domLocationTarget.cssSelector}`);
|
|
2831
2963
|
else if (e.domLocationTarget.element)
|
|
2832
2964
|
t = e.domLocationTarget.element;
|
|
2833
2965
|
else if (e.domLocationTarget.elementFunction)
|
|
2834
|
-
t = e.domLocationTarget.elementFunction(),
|
|
2966
|
+
t = e.domLocationTarget.elementFunction(), ee(!t, "loadHeader: element not returned from domLocationTarget.elementFunction");
|
|
2835
2967
|
else
|
|
2836
2968
|
throw new Error("loadHeader: domLocationTarget must have at least one field set");
|
|
2837
2969
|
}
|
|
2838
|
-
return
|
|
2970
|
+
return P(t, "loadHeader: domTarget is null (how?!)");
|
|
2839
2971
|
}
|
|
2840
|
-
function
|
|
2972
|
+
function ei() {
|
|
2841
2973
|
var t;
|
|
2842
|
-
if (!document.querySelector(
|
|
2843
|
-
const n =
|
|
2974
|
+
if (!document.querySelector(p([a.UTAH_DESIGN_SYSTEM, a.HEADER]))) {
|
|
2975
|
+
const n = kr(), o = Qr();
|
|
2844
2976
|
o.insertBefore(n, o.firstChild);
|
|
2845
|
-
const r =
|
|
2977
|
+
const r = zn();
|
|
2846
2978
|
n.after(r);
|
|
2847
|
-
const { mainMenuWrapper: i, utahIdPopup:
|
|
2979
|
+
const { mainMenuWrapper: i, utahIdPopup: u } = Gr();
|
|
2848
2980
|
i && r.after(i);
|
|
2849
|
-
const
|
|
2850
|
-
r.after(
|
|
2981
|
+
const s = g(Bn);
|
|
2982
|
+
r.after(s);
|
|
2851
2983
|
const l = (
|
|
2852
2984
|
/** @type {HTMLElement} */
|
|
2853
|
-
document.querySelector(
|
|
2985
|
+
document.querySelector(p(a.MOBILE_MENU__BACKDROP))
|
|
2854
2986
|
);
|
|
2855
2987
|
if (!l)
|
|
2856
2988
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop not found");
|
|
2857
2989
|
if (l.onclick)
|
|
2858
2990
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop already has onclick");
|
|
2859
|
-
l.onclick = () =>
|
|
2860
|
-
const
|
|
2861
|
-
d.appendChild(
|
|
2862
|
-
const
|
|
2863
|
-
|
|
2991
|
+
l.onclick = () => Ge();
|
|
2992
|
+
const c = Kr(), d = cn(c, "Main Menu");
|
|
2993
|
+
d.appendChild(c);
|
|
2994
|
+
const h = it(d);
|
|
2995
|
+
Zn(h), u ? ((t = u.closest("div")) == null || t.removeAttribute("aria-labelledby"), Zr(s, u)) : Yr(), Er(), Xr(), ur(), Jr(), fn().catch((_) => console.error(_));
|
|
2996
|
+
const f = O();
|
|
2997
|
+
(!f.mainMenu && !f.actionItems && f.utahId === !1 && !f.onSearch || !f.mainMenu && !f.actionItems && f.utahId === !1 && f.onSearch || !f.mainMenu && f.actionItems && f.utahId === !1 && !f.onSearch) && (s.classList.add(a.MAIN_MENU__REMOVED), i.remove()), (!f.mainMenu && !f.actionItems && f.utahId && !f.onSearch || !f.mainMenu && f.actionItems && f.utahId && !f.onSearch || !f.mainMenu && f.actionItems && !f.utahId && f.onSearch) && i.classList.add(a.DESKTOP__HIDDEN);
|
|
2864
2998
|
}
|
|
2865
|
-
|
|
2999
|
+
Wn();
|
|
2866
3000
|
}
|
|
2867
|
-
function
|
|
3001
|
+
function ti(e) {
|
|
2868
3002
|
var t, n, o, r;
|
|
2869
|
-
(t = document.querySelector(
|
|
3003
|
+
(t = document.querySelector(p([a.UTAH_DESIGN_SYSTEM, a.HEADER]))) == null || t.remove(), (n = document.querySelector(p([a.UTAH_DESIGN_SYSTEM, a.MAIN_MENU__OUTER]))) == null || n.remove(), (o = document.querySelector(p([a.UTAH_DESIGN_SYSTEM, a.MOBILE_MENU]))) == null || o.remove(), (r = document.querySelector(p([a.UTAH_DESIGN_SYSTEM, a.LOGO_OFFICIAL_WRAPPER]))) == null || r.remove(), sn(), e && setTimeout(() => document.dispatchEvent(new Event($t.HEADER_UNLOADED)), 0);
|
|
2870
3004
|
}
|
|
2871
|
-
console.log(`Utah Header v${
|
|
3005
|
+
console.log(`Utah Header v${Rn.version}`);
|
|
2872
3006
|
export {
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
3007
|
+
j as childrenMenuTypes,
|
|
3008
|
+
jt as defaultSettings,
|
|
3009
|
+
$t as events,
|
|
3010
|
+
O as getUtahHeaderSettings,
|
|
3011
|
+
ei as loadHeader,
|
|
3012
|
+
ti as removeHeader,
|
|
3013
|
+
g as renderDOMSingle,
|
|
3014
|
+
ni as setUtahHeaderSettings,
|
|
3015
|
+
Te as sizes
|
|
2882
3016
|
};
|