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