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