@utahdts/utah-design-system-header 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/style.css +1 -0
- package/dist/utah-design-system-header.es.js +2317 -0
- package/dist/utah-design-system-header.umd.js +124 -0
- package/package.json +41 -0
- package/src/css/_action-items.scss +44 -0
- package/src/css/_badge.scss +34 -0
- package/src/css/_citizen-experience.scss +13 -0
- package/src/css/_logos.scss +64 -0
- package/src/css/_popup.scss +1 -0
- package/src/css/_utah-header-wrapper.scss +21 -0
- package/src/css/_vertical-menu.scss +2 -0
- package/src/css/build/utah-design-system-header.css +973 -0
- package/src/css/index.scss +7 -0
- package/src/css/media-queries.css +25 -0
|
@@ -0,0 +1,2317 @@
|
|
|
1
|
+
const Kt = "@utahdts/utah-design-system-header", Qt = "0.1.0", Jt = "Utah Header for the Utah Design System", en = "dist/utah-design-system-header.umd.js", tn = "dist/utah-design-system-header.es.js", nn = [
|
|
2
|
+
"src/css",
|
|
3
|
+
"dist"
|
|
4
|
+
], rn = {
|
|
5
|
+
test: "vitest run",
|
|
6
|
+
build: "vite build",
|
|
7
|
+
watch: "vite build --watch",
|
|
8
|
+
"sass-build": "sass --no-source-map ./src/css/index.scss ./src/css/build/utah-design-system-header.css",
|
|
9
|
+
"test-publish": "npm publish --dry-run"
|
|
10
|
+
}, on = {
|
|
11
|
+
type: "git",
|
|
12
|
+
url: "git+https://github.com/utahdts/utah-design-system.git"
|
|
13
|
+
}, an = "Apache-2.0", sn = {
|
|
14
|
+
url: "https://github.com/utahdts/utah-design-system/issues"
|
|
15
|
+
}, ln = "https://github.com/utahdts/utah-design-system#readme", cn = {
|
|
16
|
+
"@popperjs/core": "2.11.6"
|
|
17
|
+
}, un = {
|
|
18
|
+
eslint: "8.35.0",
|
|
19
|
+
"eslint-config-airbnb": "19.0.4",
|
|
20
|
+
"eslint-plugin-import": "2.27.5",
|
|
21
|
+
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
22
|
+
sass: "1.58.3",
|
|
23
|
+
vite: "4.1.4",
|
|
24
|
+
"vite-plugin-eslint": "1.8.1",
|
|
25
|
+
vitest: "0.29.1"
|
|
26
|
+
}, dn = "module", pn = {
|
|
27
|
+
name: Kt,
|
|
28
|
+
version: Qt,
|
|
29
|
+
description: Jt,
|
|
30
|
+
main: en,
|
|
31
|
+
module: tn,
|
|
32
|
+
files: nn,
|
|
33
|
+
scripts: rn,
|
|
34
|
+
repository: on,
|
|
35
|
+
license: an,
|
|
36
|
+
bugs: sn,
|
|
37
|
+
homepage: ln,
|
|
38
|
+
dependencies: cn,
|
|
39
|
+
devDependencies: un,
|
|
40
|
+
type: dn
|
|
41
|
+
};
|
|
42
|
+
const Lt = {
|
|
43
|
+
AUTO: (
|
|
44
|
+
/** @type {PopupPlacement} */
|
|
45
|
+
"auto"
|
|
46
|
+
),
|
|
47
|
+
AUTO_START: (
|
|
48
|
+
/** @type {PopupPlacement} */
|
|
49
|
+
"auto-start"
|
|
50
|
+
),
|
|
51
|
+
AUTO_END: (
|
|
52
|
+
/** @type {PopupPlacement} */
|
|
53
|
+
"auto-end"
|
|
54
|
+
),
|
|
55
|
+
BOTTOM: (
|
|
56
|
+
/** @type {PopupPlacement} */
|
|
57
|
+
"bottom"
|
|
58
|
+
),
|
|
59
|
+
BOTTOM_START: (
|
|
60
|
+
/** @type {PopupPlacement} */
|
|
61
|
+
"bottom-start"
|
|
62
|
+
),
|
|
63
|
+
BOTTOM_END: (
|
|
64
|
+
/** @type {PopupPlacement} */
|
|
65
|
+
"bottom-end"
|
|
66
|
+
),
|
|
67
|
+
LEFT: (
|
|
68
|
+
/** @type {PopupPlacement} */
|
|
69
|
+
"left"
|
|
70
|
+
),
|
|
71
|
+
LEFT_START: (
|
|
72
|
+
/** @type {PopupPlacement} */
|
|
73
|
+
"left-start"
|
|
74
|
+
),
|
|
75
|
+
LEFT_END: (
|
|
76
|
+
/** @type {PopupPlacement} */
|
|
77
|
+
"left-end"
|
|
78
|
+
),
|
|
79
|
+
RIGHT: (
|
|
80
|
+
/** @type {PopupPlacement} */
|
|
81
|
+
"right"
|
|
82
|
+
),
|
|
83
|
+
RIGHT_START: (
|
|
84
|
+
/** @type {PopupPlacement} */
|
|
85
|
+
"right-start"
|
|
86
|
+
),
|
|
87
|
+
RIGHT_END: (
|
|
88
|
+
/** @type {PopupPlacement} */
|
|
89
|
+
"right-end"
|
|
90
|
+
),
|
|
91
|
+
TOP: (
|
|
92
|
+
/** @type {PopupPlacement} */
|
|
93
|
+
"top"
|
|
94
|
+
),
|
|
95
|
+
TOP_START: (
|
|
96
|
+
/** @type {PopupPlacement} */
|
|
97
|
+
"top-start"
|
|
98
|
+
),
|
|
99
|
+
TOP_END: (
|
|
100
|
+
/** @type {PopupPlacement} */
|
|
101
|
+
"top-end"
|
|
102
|
+
)
|
|
103
|
+
}, ue = {
|
|
104
|
+
SMALL: (
|
|
105
|
+
/** @type {Size} */
|
|
106
|
+
"SMALL"
|
|
107
|
+
),
|
|
108
|
+
MEDIUM: (
|
|
109
|
+
/** @type {Size} */
|
|
110
|
+
"MEDIUM"
|
|
111
|
+
),
|
|
112
|
+
LARGE: (
|
|
113
|
+
/** @type {Size} */
|
|
114
|
+
"LARGE"
|
|
115
|
+
)
|
|
116
|
+
}, fn = {
|
|
117
|
+
mediaSizes: {
|
|
118
|
+
mobile: 640,
|
|
119
|
+
tabletPortrait: 768,
|
|
120
|
+
tabletLandscape: 1024
|
|
121
|
+
},
|
|
122
|
+
showTitle: !0,
|
|
123
|
+
size: ue.MEDIUM,
|
|
124
|
+
title: "Utah Design System",
|
|
125
|
+
titleURL: "/",
|
|
126
|
+
utahId: !0
|
|
127
|
+
}, G = {
|
|
128
|
+
FLYOUT: (
|
|
129
|
+
/** @type {ChildrenMenuType} */
|
|
130
|
+
"flyout"
|
|
131
|
+
),
|
|
132
|
+
INLINE: (
|
|
133
|
+
/** @type {ChildrenMenuType} */
|
|
134
|
+
"inline"
|
|
135
|
+
),
|
|
136
|
+
MEGA_MENU: (
|
|
137
|
+
/** @type {ChildrenMenuType} */
|
|
138
|
+
"mega-menu"
|
|
139
|
+
)
|
|
140
|
+
}, Nt = {
|
|
141
|
+
// Fired when the utah header is first loaded (setUtahHeaderSettings does not trigger this)
|
|
142
|
+
HEADER_LOADED: (
|
|
143
|
+
/** @type {Events} */
|
|
144
|
+
"utahHeaderLoaded"
|
|
145
|
+
),
|
|
146
|
+
// Fired when the header unloads by code calling the function removeHeader() (not when settings updated)
|
|
147
|
+
HEADER_UNLOADED: (
|
|
148
|
+
/** @type {Events} */
|
|
149
|
+
"utahHeaderUnloaded"
|
|
150
|
+
)
|
|
151
|
+
};
|
|
152
|
+
function je(t) {
|
|
153
|
+
return typeof t == "string" || t instanceof String;
|
|
154
|
+
}
|
|
155
|
+
function Be(t) {
|
|
156
|
+
const e = new DOMParser();
|
|
157
|
+
let n;
|
|
158
|
+
if (je(t)) {
|
|
159
|
+
const r = (
|
|
160
|
+
/** @type {Document} */
|
|
161
|
+
je(t) ? e.parseFromString(t, "text/html") : t
|
|
162
|
+
), i = r.body.children.length > 1 ? r.body.children : r.body.children.item(0);
|
|
163
|
+
if (!i)
|
|
164
|
+
throw console.error(t), new Error("renderDOM: nothing rendered");
|
|
165
|
+
n = i;
|
|
166
|
+
} else if (
|
|
167
|
+
/** @type {unknown} */
|
|
168
|
+
t instanceof Element
|
|
169
|
+
)
|
|
170
|
+
n = t;
|
|
171
|
+
else
|
|
172
|
+
throw t ? (console.error(t), new Error(`renderDOM: str is not a string nor a DOM Element : '${t}'`)) : new Error("renderDOM: falsy string passed; cannot render nothing");
|
|
173
|
+
return n;
|
|
174
|
+
}
|
|
175
|
+
function U(t) {
|
|
176
|
+
const e = Be(t);
|
|
177
|
+
if (e instanceof HTMLCollection && e.length > 1)
|
|
178
|
+
throw new Error("renderDOMSingle: must render a single element");
|
|
179
|
+
const n = (
|
|
180
|
+
/** @type HTMLElement | null */
|
|
181
|
+
e instanceof HTMLCollection ? e[0] : e
|
|
182
|
+
);
|
|
183
|
+
if (!n)
|
|
184
|
+
throw console.error(t), new Error("renderDOMSingle: nothing rendered");
|
|
185
|
+
return n;
|
|
186
|
+
}
|
|
187
|
+
const hn = `/* @media is never in scope for --variables, so this is the only way to solve this. :-( */
|
|
188
|
+
|
|
189
|
+
@media screen and (max-width: media-size__tablet-landscape__PLACEHOLDER) {
|
|
190
|
+
/* put your media query here for tablet landscape */
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@media screen and (max-width: media-size__tablet-portrait__PLACEHOLDER) {
|
|
194
|
+
.utds-header {
|
|
195
|
+
height: 60px;
|
|
196
|
+
padding: var(--spacing-xs) var(--spacing);
|
|
197
|
+
}
|
|
198
|
+
.utds-title-wrapper {
|
|
199
|
+
font-size: var(--font-size-xl);
|
|
200
|
+
}
|
|
201
|
+
.utds-citizen-experience-wrapper {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
.utah-design-system .main-menu__nav {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@media screen and (max-width: media-size__mobile__PLACEHOLDER) {
|
|
210
|
+
/* put your media query here for mobile */
|
|
211
|
+
}
|
|
212
|
+
`;
|
|
213
|
+
function T(t) {
|
|
214
|
+
return `.${(Array.isArray(t) ? t : [t]).join(".")}`;
|
|
215
|
+
}
|
|
216
|
+
const d = {
|
|
217
|
+
// Global Information
|
|
218
|
+
UTAH_DESIGN_SYSTEM: "utah-design-system",
|
|
219
|
+
HEADER: "utds-header",
|
|
220
|
+
// HTML elements
|
|
221
|
+
ICON_BUTTON: "icon-button",
|
|
222
|
+
// IDs
|
|
223
|
+
CSS_HEADER_MEDIA_TAG_ID: "cssHeaderMediaTag",
|
|
224
|
+
// Modifiers
|
|
225
|
+
IS_CLOSED: "is-closed",
|
|
226
|
+
IS_OPEN: "is-open",
|
|
227
|
+
VISUALLY_HIDDEN: "visually-hidden",
|
|
228
|
+
// Replacement Placeholders
|
|
229
|
+
MEDIA_SIZE__MOBILE__PLACEHOLDER: "media-size__mobile__PLACEHOLDER",
|
|
230
|
+
MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER: "media-size__tablet-landscape__PLACEHOLDER",
|
|
231
|
+
MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER: "media-size__tablet-portrait__PLACEHOLDER",
|
|
232
|
+
// Header Components
|
|
233
|
+
ACTION_ITEM: "utds-header-action-item",
|
|
234
|
+
ACTION_ITEM__ICON_BUTTON: "utds-header-action-item__icon-button",
|
|
235
|
+
ACTION_ITEM__ICON_BUTTON_TITLE: "utds-header-action-item__icon-button--has-title",
|
|
236
|
+
ACTION_ITEM__TITLE: "utds-header-action-item__title",
|
|
237
|
+
BADGE__LABEL: "utds-badge__label",
|
|
238
|
+
BADGE__VALUE: "utds-badge__value",
|
|
239
|
+
BADGE_WRAPPER: "utds-badge__wrapper",
|
|
240
|
+
BADGE_WRAPPER__SMALL: "utds-badge__wrapper--small",
|
|
241
|
+
BADGE_WRAPPER__ACTION_ITEM: "utds-badge__wrapper--action-item",
|
|
242
|
+
CITIZEN_EXPERIENCE: "utds-citizen-experience-wrapper",
|
|
243
|
+
LOGO_SVG: "utah-logo-svg",
|
|
244
|
+
LOGO_VERT_LINE: "utds-logo-vert-line",
|
|
245
|
+
LOGO: "utds-logo-wrapper",
|
|
246
|
+
MAIN_MENU: "main-menu__wrapper",
|
|
247
|
+
MAIN_MENU__MENU_TOP: "main-menu__menu-top",
|
|
248
|
+
MAIN_MENU__NAV: "main-menu__nav",
|
|
249
|
+
MAIN_MENU__OUTER: "main-menu__outer",
|
|
250
|
+
MAIN_MENU__SEARCH: "main-menu__search",
|
|
251
|
+
MAIN_MENU__TITLE: "main-menu__title",
|
|
252
|
+
MENU_ITEM: "menu-item",
|
|
253
|
+
MENU_ITEM__BUTTON_TITLE: "menu-item__button-title",
|
|
254
|
+
MENU_ITEM__LINK_TITLE: "menu-item__link-title",
|
|
255
|
+
MENU_ITEM__SELECTED: "menu-item--selected",
|
|
256
|
+
MENU_ITEM__TITLE: "menu-item__title",
|
|
257
|
+
MENU_ITEM__FLY_OUT: "menu-item--fly_out",
|
|
258
|
+
MENU_ITEM__INLINE: "menu-item--inline",
|
|
259
|
+
MENU_ITEM__MEGA_MENU: "menu-item--mega-menu",
|
|
260
|
+
POPUP_MENU: "vertical-menu",
|
|
261
|
+
POPUP_MENU__BUTTON_TITLE: "vertical-menu__button-title",
|
|
262
|
+
POPUP_MENU__CHEVRON: "vertical-menu__chevron",
|
|
263
|
+
POPUP_MENU__DIVIDER: "vertical-menu__divider",
|
|
264
|
+
POPUP_MENU__LINK_TEXT: "vertical-menu__link-text",
|
|
265
|
+
POPUP_MENU__LINK_TITLE: "vertical-menu__link-title",
|
|
266
|
+
POPUP_MENU__PLAIN_TITLE: "vertical-menu__plain-title",
|
|
267
|
+
POPUP_MENU__TITLE: "vertical-menu__title",
|
|
268
|
+
POPUP__HIDDEN: "popup__wrapper--hidden",
|
|
269
|
+
POPUP__VISIBLE: "popup__wrapper--visible",
|
|
270
|
+
POPUP__WRAPPER: "popup__wrapper",
|
|
271
|
+
EXTERNAL_LINK: "utds-icon-after-external-link",
|
|
272
|
+
EXTERNAL_LINK__NEW_TAB: "utds-new-tab-link-a11y",
|
|
273
|
+
POPUP_ARROW: "popup__arrow",
|
|
274
|
+
POPUP_CONTENT_WRAPPER: "popup__content",
|
|
275
|
+
POPUP_WRAPPER: "popup__wrapper",
|
|
276
|
+
SIZE__LARGE: "large",
|
|
277
|
+
SIZE__MEDIUM: "medium",
|
|
278
|
+
TITLE: "utds-title-wrapper",
|
|
279
|
+
TITLE__LOGO: "utds-title-wrapper__logo",
|
|
280
|
+
TITLE__TITLE: "utds-title-wrapper__title",
|
|
281
|
+
UTAH_ID: "utds-utah-id-wrapper",
|
|
282
|
+
UTAH_ID__BUTTON: "utds-utah-id__button"
|
|
283
|
+
}, vn = `<span class="utds-icon-before-waffle" aria-hidden="true" />
|
|
284
|
+
`, mn = `<span class="utds-icon-before-help" aria-hidden="true" />
|
|
285
|
+
`, _n = `<span class="utds-icon-before-alert" aria-hidden="true" />
|
|
286
|
+
`, En = {
|
|
287
|
+
actionItems: [
|
|
288
|
+
{
|
|
289
|
+
actionPopupMenu: {
|
|
290
|
+
menuItems: [
|
|
291
|
+
{
|
|
292
|
+
actionUrl: { url: "https://google.com?search=how realisitic can you be" },
|
|
293
|
+
title: "Item #1"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
actionUrl: { url: "https://utah.gov", openInNewTab: !0 },
|
|
297
|
+
title: "Utah.Gov"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
actionFunction: (t) => {
|
|
301
|
+
t.stopPropagation(), t.preventDefault(), console.log("Custom menu item triggered");
|
|
302
|
+
},
|
|
303
|
+
title: "Custom menu item"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
actionMenu: [
|
|
307
|
+
{
|
|
308
|
+
title: "i am a child",
|
|
309
|
+
actionMenu: [
|
|
310
|
+
{
|
|
311
|
+
title: "i am a child",
|
|
312
|
+
actionUrl: { url: "https://dts.utah.gov" }
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
title: "i am a child 2oo",
|
|
316
|
+
actionUrl: { url: "https://dts.utah.gov/2" }
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
title: "i am a child 2oo",
|
|
322
|
+
actionMenu: [
|
|
323
|
+
{
|
|
324
|
+
title: "i am a child2",
|
|
325
|
+
actionUrl: { url: "https://dts.utah.gov" }
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
title: "i am a child 2oo2",
|
|
329
|
+
actionUrl: { url: "https://dts.utah.gov/2" }
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
],
|
|
334
|
+
title: "I have children!!"
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
title: "Divisions Menu"
|
|
338
|
+
},
|
|
339
|
+
className: "icon-waffle",
|
|
340
|
+
icon: vn,
|
|
341
|
+
showTitle: !0,
|
|
342
|
+
title: "Divisions"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
actionFunction: () => (
|
|
346
|
+
// eslint-disable-next-line no-console
|
|
347
|
+
console.log("Alerts clicked")
|
|
348
|
+
),
|
|
349
|
+
badge: {
|
|
350
|
+
// Note: make sure the `label` is plural/singular to match the value
|
|
351
|
+
label: "Unread Alert",
|
|
352
|
+
value: 1
|
|
353
|
+
},
|
|
354
|
+
icon: _n,
|
|
355
|
+
showTitle: !1,
|
|
356
|
+
title: "Alerts"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
actionDom: (() => {
|
|
360
|
+
const t = document.createElement("div");
|
|
361
|
+
t.appendChild(document.createTextNode("Hello World!"));
|
|
362
|
+
const e = document.createElement("button");
|
|
363
|
+
return e.appendChild(document.createTextNode("Do not press me.")), t.appendChild(e), t;
|
|
364
|
+
})(),
|
|
365
|
+
badge: {
|
|
366
|
+
// Note: make sure the `label` is plural/singular to match the value
|
|
367
|
+
label: "Help Items Available"
|
|
368
|
+
},
|
|
369
|
+
icon: mn,
|
|
370
|
+
showTitle: !1,
|
|
371
|
+
title: "Help"
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
mediaSizes: {
|
|
375
|
+
mobile: 640,
|
|
376
|
+
tabletPortrait: 768,
|
|
377
|
+
tabletLandscape: 1024
|
|
378
|
+
},
|
|
379
|
+
showTitle: !0,
|
|
380
|
+
size: ue.MEDIUM,
|
|
381
|
+
title: "Utah Design System",
|
|
382
|
+
titleURL: "/",
|
|
383
|
+
utahId: !0,
|
|
384
|
+
mainMenu: {
|
|
385
|
+
menuItems: [
|
|
386
|
+
{
|
|
387
|
+
actionUrl: { url: "/" },
|
|
388
|
+
title: "Home"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
actionUrl: { url: "#" },
|
|
392
|
+
title: "Link to Somewhere"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
isSelected: !0,
|
|
396
|
+
actionFunction: () => alert("hello yous guy"),
|
|
397
|
+
title: "do func"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
actionMenu: [
|
|
401
|
+
{
|
|
402
|
+
title: "Guidelines and Standards",
|
|
403
|
+
actionUrl: { url: "/guidelines" }
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
title: "Guidelines/Standards"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
actionMenu: [
|
|
410
|
+
{
|
|
411
|
+
title: "child1",
|
|
412
|
+
actionMenu: [
|
|
413
|
+
{
|
|
414
|
+
title: "child1-1",
|
|
415
|
+
actionMenu: [
|
|
416
|
+
{
|
|
417
|
+
title: "child1-1-1",
|
|
418
|
+
actionUrl: { url: "/children" }
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
title: "child1-1-2",
|
|
422
|
+
actionUrl: { url: "/children" }
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
title: "child1-1-3",
|
|
426
|
+
actionUrl: { url: "/children" }
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
title: "child1-2",
|
|
432
|
+
actionMenu: [
|
|
433
|
+
{
|
|
434
|
+
title: "child1-2-1",
|
|
435
|
+
actionUrl: { url: "/children" }
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
title: "child1-2-2",
|
|
439
|
+
actionUrl: { url: "/children" }
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
title: "child1-2-3",
|
|
443
|
+
actionUrl: { url: "/children" }
|
|
444
|
+
}
|
|
445
|
+
]
|
|
446
|
+
}
|
|
447
|
+
]
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
title: "child2",
|
|
451
|
+
actionMenu: [
|
|
452
|
+
{
|
|
453
|
+
title: "child2-1",
|
|
454
|
+
actionMenu: [
|
|
455
|
+
{
|
|
456
|
+
title: "child2-1-1",
|
|
457
|
+
actionUrl: { url: "/children" }
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
title: "child2-1-2",
|
|
461
|
+
actionUrl: { url: "/children" }
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
title: "child2-1-3",
|
|
465
|
+
actionUrl: { url: "/children" }
|
|
466
|
+
}
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
title: "child2-2",
|
|
471
|
+
actionMenu: [
|
|
472
|
+
{
|
|
473
|
+
title: "child2-2-1",
|
|
474
|
+
actionUrl: { url: "/children" }
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
title: "child2-2-2",
|
|
478
|
+
actionUrl: { url: "/children" }
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
title: "child2-2-3",
|
|
482
|
+
actionUrl: { url: "/children" }
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
}
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
childrenMenuType: G.FLYOUT,
|
|
490
|
+
title: "Childrens"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
actionMenu: [
|
|
494
|
+
{
|
|
495
|
+
title: "Title of section 1",
|
|
496
|
+
actionMenu: [
|
|
497
|
+
{
|
|
498
|
+
title: "child1-1",
|
|
499
|
+
actionMenu: [
|
|
500
|
+
{
|
|
501
|
+
title: "child1-1-1",
|
|
502
|
+
actionUrl: { url: "/children" }
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
title: "child1-1-2",
|
|
506
|
+
actionUrl: { url: "/children" }
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
title: "child1-1-3",
|
|
510
|
+
actionUrl: { url: "/children" }
|
|
511
|
+
}
|
|
512
|
+
]
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
title: "child1-2",
|
|
516
|
+
actionMenu: [
|
|
517
|
+
{
|
|
518
|
+
title: "child1-2-1",
|
|
519
|
+
actionUrl: { url: "/children" }
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
title: "child1-2-2",
|
|
523
|
+
actionUrl: { url: "/children" }
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
title: "child1-2-3",
|
|
527
|
+
actionUrl: { url: "/children" }
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
title: "Title of section 2",
|
|
535
|
+
actionMenu: [
|
|
536
|
+
{
|
|
537
|
+
title: "child2-1",
|
|
538
|
+
actionMenu: [
|
|
539
|
+
{
|
|
540
|
+
title: "child2-1-1",
|
|
541
|
+
actionUrl: { url: "/children" }
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
title: "child2-1-2",
|
|
545
|
+
actionUrl: { url: "/children" }
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
title: "child2-1-3",
|
|
549
|
+
actionUrl: { url: "/children" }
|
|
550
|
+
}
|
|
551
|
+
]
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
title: "child2-2",
|
|
555
|
+
actionMenu: [
|
|
556
|
+
{
|
|
557
|
+
title: "child2-2-1",
|
|
558
|
+
actionUrl: { url: "/children" }
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
title: "child2-2-2",
|
|
562
|
+
actionUrl: { url: "/children" }
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
title: "child2-2-3",
|
|
566
|
+
actionUrl: { url: "/children" }
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
}
|
|
570
|
+
]
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
childrenMenuType: G.MEGA_MENU,
|
|
574
|
+
title: "MEGA MENU!"
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
title: "Utah Design System Main Menu"
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
let De = { ...En };
|
|
581
|
+
function S() {
|
|
582
|
+
return De;
|
|
583
|
+
}
|
|
584
|
+
function gn(t) {
|
|
585
|
+
if (!t.showTitle && !t.logo)
|
|
586
|
+
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.");
|
|
587
|
+
}
|
|
588
|
+
function pi(t) {
|
|
589
|
+
De = { ...fn, ...t }, gn(De);
|
|
590
|
+
const e = document.querySelector(T([d.UTAH_DESIGN_SYSTEM, d.HEADER])), n = document.querySelector(T([d.UTAH_DESIGN_SYSTEM, d.MAIN_MENU__OUTER]));
|
|
591
|
+
return e && (e.remove(), n == null || n.remove()), ui(), De;
|
|
592
|
+
}
|
|
593
|
+
const bn = `<div class="utds-title-wrapper">
|
|
594
|
+
<div class="utds-title-wrapper__logo"></div>
|
|
595
|
+
<div class="utds-title-wrapper__title"></div>
|
|
596
|
+
</div>
|
|
597
|
+
`, Tn = `<a class="utds-title-wrapper">
|
|
598
|
+
<div class="utds-title-wrapper__logo"></div>
|
|
599
|
+
<div class="utds-title-wrapper__title"></div>
|
|
600
|
+
</a>
|
|
601
|
+
`;
|
|
602
|
+
function V(t, e) {
|
|
603
|
+
if (e)
|
|
604
|
+
if (e instanceof HTMLCollection)
|
|
605
|
+
for (; e.length > 0; )
|
|
606
|
+
t.appendChild(e[0]);
|
|
607
|
+
else if (e instanceof Node)
|
|
608
|
+
t.appendChild(e);
|
|
609
|
+
else
|
|
610
|
+
throw console.error(e), new Error("appendChildAll: Unknown child element");
|
|
611
|
+
}
|
|
612
|
+
function wn() {
|
|
613
|
+
const t = S().titleURL, e = U(t ? Tn : bn);
|
|
614
|
+
if (!e)
|
|
615
|
+
throw new Error("LogoTitle: titleWrapper is null");
|
|
616
|
+
t && e.setAttribute("href", t);
|
|
617
|
+
const n = e.querySelector(T(d.TITLE__LOGO));
|
|
618
|
+
if (!n)
|
|
619
|
+
throw new Error("LogoTitle: logoWrapper is null");
|
|
620
|
+
const r = S().logo, i = S().showTitle, o = S().title;
|
|
621
|
+
if (r) {
|
|
622
|
+
let s;
|
|
623
|
+
je(r) ? s = U(
|
|
624
|
+
/** @type {string} */
|
|
625
|
+
r
|
|
626
|
+
) : s = /** @type {Element} */
|
|
627
|
+
r, s.setAttribute("role", "presentation"), V(n, s);
|
|
628
|
+
} else
|
|
629
|
+
e.removeChild(n);
|
|
630
|
+
const a = document.createTextNode(o), l = e.querySelector(T(d.TITLE__TITLE));
|
|
631
|
+
return l == null || l.appendChild(a), !i && r && (l == null || l.classList.add(d.VISUALLY_HIDDEN)), e;
|
|
632
|
+
}
|
|
633
|
+
const yn = `<div class="utah-logo-svg" role="img">
|
|
634
|
+
<title>An official website of the State of Utah</title>
|
|
635
|
+
<svg viewBox="0 0 137.363 56.6959">
|
|
636
|
+
<g>
|
|
637
|
+
<g>
|
|
638
|
+
<path d="M15.972,39.161c-5.4,0-9.4127-1.5667-12.038-4.7C1.3087,31.3277-.0027,26.466,0,19.876V0H10.175V21.06c0,3.4313,.4633,5.847,1.39,7.247,.9909,1.434,2.669,2.2337,4.407,2.1,1.7525,.124,3.4436-.6712,4.466-2.1,.966-1.4,1.449-3.8157,1.449-7.247V0h9.82V19.876c0,6.586-1.2817,11.4467-3.845,14.582-2.5633,3.1353-6.5267,4.703-11.89,4.703Zm31.353-.711V8.518h-10.175V0h30.525V8.518h-10.175v29.932h-10.175Zm33.6-18.693l-.651,2.662h7.1l-.651-2.662c-.4733-1.8533-.9467-3.8647-1.42-6.034-.4733-2.1693-.945-4.2197-1.415-6.151h-.237c-.434,1.972-.8777,4.0327-1.331,6.182s-.918,4.1507-1.394,6.004l-.001-.001Zm-14.788,18.693L77.85,0h12.3l11.717,38.45h-10.767l-1.893-8.162h-10.766l-1.893,8.162h-10.411Zm39.4,0V0h10.175V14.316h11.476V0h10.175V38.45h-10.175v-15.261h-11.479v15.261h-10.172Z" />
|
|
639
|
+
</g>
|
|
640
|
+
<text transform="translate(.0419 52.5939)"><tspan x="0" y="0">An official </tspan><tspan x="60.437" y="0" style="letter-spacing: -.02em;">s</tspan><tspan x="66.0229" y="0" style="letter-spacing: -.021em;">t</tspan><tspan x="70.4614" y="0" style="letter-spacing: -.014em;">at</tspan><tspan x="81.8569" y="0" style="letter-spacing: 0em;">e </tspan><tspan x="91.6011" y="0" style="letter-spacing: -.004em;">w</tspan><tspan x="101.5972" y="0">ebsi</tspan><tspan x="125.5923" y="0" style="letter-spacing: -.014em;">t</tspan><tspan x="130.1284" y="0">e</tspan></text>
|
|
641
|
+
</g>
|
|
642
|
+
</svg>
|
|
643
|
+
</div>
|
|
644
|
+
`, Pn = `<div class="utah-logo-svg">
|
|
645
|
+
<svg viewBox="0 0 105.9496 47.6226" role="img">
|
|
646
|
+
<title>An official website of the State of Utah</title>
|
|
647
|
+
<g>
|
|
648
|
+
<g>
|
|
649
|
+
<path d="M12.2714,30.0877c-4.1489,0-7.2318-1.2037-9.2489-3.611C1.0055,24.0693-.002,20.334,0,15.2709V0H7.8175V16.1806c0,2.6363,.356,4.4923,1.0679,5.5679,.7613,1.1018,2.0506,1.7162,3.3859,1.6134,1.3465,.0953,2.6458-.5157,3.4313-1.6134,.7422-1.0756,1.1133-2.9316,1.1133-5.5679V0h7.5448V15.2709c0,5.0601-.9847,8.7946-2.9541,11.2035-1.9694,2.4089-5.0145,3.6133-9.1352,3.6133Zm24.0887-.5463V6.5444h-7.8175V0h23.4526V6.5444h-7.8175V29.5414h-7.8175Zm25.8151-14.362l-.5002,2.0452h5.455l-.5002-2.0452c-.3637-1.4239-.7273-2.9693-1.091-4.636-.3637-1.6667-.7261-3.242-1.0871-4.7259h-.1821c-.3334,1.5151-.6743,3.0983-1.0226,4.7497s-.7053,3.189-1.071,4.6129l-.0008-.0008Zm-11.3617,14.362L59.8127,0h9.4502l9.0023,29.5414h-8.2724l-1.4544-6.2709h-8.2716l-1.4544,6.2709h-7.9988Zm30.2713,0V0h7.8175V10.9991h8.8171V0h7.8175V29.5414h-7.8175v-11.7251h-8.8194v11.7251h-7.8152Z" />
|
|
650
|
+
</g>
|
|
651
|
+
<text transform="translate(.0419 43.5205)"><tspan x="0" y="0">An official </tspan><tspan x="60.437" y="0" style="letter-spacing: -.004em;">w</tspan><tspan x="70.4331" y="0">ebsi</tspan><tspan x="94.4282" y="0" style="letter-spacing: -.014em;">t</tspan><tspan x="98.9644" y="0">e</tspan></text>
|
|
652
|
+
</g>
|
|
653
|
+
</svg>
|
|
654
|
+
</div>
|
|
655
|
+
`;
|
|
656
|
+
function An() {
|
|
657
|
+
let t;
|
|
658
|
+
switch (S().size) {
|
|
659
|
+
case ue.LARGE:
|
|
660
|
+
t = yn;
|
|
661
|
+
break;
|
|
662
|
+
case ue.SMALL:
|
|
663
|
+
case ue.MEDIUM:
|
|
664
|
+
t = Pn;
|
|
665
|
+
break;
|
|
666
|
+
default:
|
|
667
|
+
throw new Error(`Unknown settings size: '${S().size}'`);
|
|
668
|
+
}
|
|
669
|
+
return Be(t);
|
|
670
|
+
}
|
|
671
|
+
const On = `<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
|
|
672
|
+
`, Mn = `<span class="utds-logo-vert-line"></span>
|
|
673
|
+
`, In = `<div class="utds-action-items-wrapper"></div>
|
|
674
|
+
`;
|
|
675
|
+
var R = "top", W = "bottom", $ = "right", H = "left", ke = "auto", Ae = [R, W, $, H], pe = "start", we = "end", Ln = "clippingParents", Ut = "viewport", Ee = "popper", Nn = "reference", ht = /* @__PURE__ */ Ae.reduce(function(t, e) {
|
|
676
|
+
return t.concat([e + "-" + pe, e + "-" + we]);
|
|
677
|
+
}, []), St = /* @__PURE__ */ [].concat(Ae, [ke]).reduce(function(t, e) {
|
|
678
|
+
return t.concat([e, e + "-" + pe, e + "-" + we]);
|
|
679
|
+
}, []), Un = "beforeRead", Sn = "read", Dn = "afterRead", xn = "beforeMain", Cn = "main", Rn = "afterMain", Hn = "beforeWrite", Bn = "write", kn = "afterWrite", ze = [Un, Sn, Dn, xn, Cn, Rn, Hn, Bn, kn];
|
|
680
|
+
function Z(t) {
|
|
681
|
+
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
682
|
+
}
|
|
683
|
+
function q(t) {
|
|
684
|
+
if (t == null)
|
|
685
|
+
return window;
|
|
686
|
+
if (t.toString() !== "[object Window]") {
|
|
687
|
+
var e = t.ownerDocument;
|
|
688
|
+
return e && e.defaultView || window;
|
|
689
|
+
}
|
|
690
|
+
return t;
|
|
691
|
+
}
|
|
692
|
+
function le(t) {
|
|
693
|
+
var e = q(t).Element;
|
|
694
|
+
return t instanceof e || t instanceof Element;
|
|
695
|
+
}
|
|
696
|
+
function k(t) {
|
|
697
|
+
var e = q(t).HTMLElement;
|
|
698
|
+
return t instanceof e || t instanceof HTMLElement;
|
|
699
|
+
}
|
|
700
|
+
function Qe(t) {
|
|
701
|
+
if (typeof ShadowRoot > "u")
|
|
702
|
+
return !1;
|
|
703
|
+
var e = q(t).ShadowRoot;
|
|
704
|
+
return t instanceof e || t instanceof ShadowRoot;
|
|
705
|
+
}
|
|
706
|
+
function Vn(t) {
|
|
707
|
+
var e = t.state;
|
|
708
|
+
Object.keys(e.elements).forEach(function(n) {
|
|
709
|
+
var r = e.styles[n] || {}, i = e.attributes[n] || {}, o = e.elements[n];
|
|
710
|
+
!k(o) || !Z(o) || (Object.assign(o.style, r), Object.keys(i).forEach(function(a) {
|
|
711
|
+
var l = i[a];
|
|
712
|
+
l === !1 ? o.removeAttribute(a) : o.setAttribute(a, l === !0 ? "" : l);
|
|
713
|
+
}));
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
function Wn(t) {
|
|
717
|
+
var e = t.state, n = {
|
|
718
|
+
popper: {
|
|
719
|
+
position: e.options.strategy,
|
|
720
|
+
left: "0",
|
|
721
|
+
top: "0",
|
|
722
|
+
margin: "0"
|
|
723
|
+
},
|
|
724
|
+
arrow: {
|
|
725
|
+
position: "absolute"
|
|
726
|
+
},
|
|
727
|
+
reference: {}
|
|
728
|
+
};
|
|
729
|
+
return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
|
|
730
|
+
Object.keys(e.elements).forEach(function(r) {
|
|
731
|
+
var i = e.elements[r], o = e.attributes[r] || {}, a = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), l = a.reduce(function(s, u) {
|
|
732
|
+
return s[u] = "", s;
|
|
733
|
+
}, {});
|
|
734
|
+
!k(i) || !Z(i) || (Object.assign(i.style, l), Object.keys(o).forEach(function(s) {
|
|
735
|
+
i.removeAttribute(s);
|
|
736
|
+
}));
|
|
737
|
+
});
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
const $n = {
|
|
741
|
+
name: "applyStyles",
|
|
742
|
+
enabled: !0,
|
|
743
|
+
phase: "write",
|
|
744
|
+
fn: Vn,
|
|
745
|
+
effect: Wn,
|
|
746
|
+
requires: ["computeStyles"]
|
|
747
|
+
};
|
|
748
|
+
function j(t) {
|
|
749
|
+
return t.split("-")[0];
|
|
750
|
+
}
|
|
751
|
+
var ae = Math.max, Re = Math.min, fe = Math.round;
|
|
752
|
+
function Ye() {
|
|
753
|
+
var t = navigator.userAgentData;
|
|
754
|
+
return t != null && t.brands ? t.brands.map(function(e) {
|
|
755
|
+
return e.brand + "/" + e.version;
|
|
756
|
+
}).join(" ") : navigator.userAgent;
|
|
757
|
+
}
|
|
758
|
+
function Dt() {
|
|
759
|
+
return !/^((?!chrome|android).)*safari/i.test(Ye());
|
|
760
|
+
}
|
|
761
|
+
function he(t, e, n) {
|
|
762
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
763
|
+
var r = t.getBoundingClientRect(), i = 1, o = 1;
|
|
764
|
+
e && k(t) && (i = t.offsetWidth > 0 && fe(r.width) / t.offsetWidth || 1, o = t.offsetHeight > 0 && fe(r.height) / t.offsetHeight || 1);
|
|
765
|
+
var a = le(t) ? q(t) : window, l = a.visualViewport, s = !Dt() && n, u = (r.left + (s && l ? l.offsetLeft : 0)) / i, c = (r.top + (s && l ? l.offsetTop : 0)) / o, v = r.width / i, b = r.height / o;
|
|
766
|
+
return {
|
|
767
|
+
width: v,
|
|
768
|
+
height: b,
|
|
769
|
+
top: c,
|
|
770
|
+
right: u + v,
|
|
771
|
+
bottom: c + b,
|
|
772
|
+
left: u,
|
|
773
|
+
x: u,
|
|
774
|
+
y: c
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
function Je(t) {
|
|
778
|
+
var e = he(t), n = t.offsetWidth, r = t.offsetHeight;
|
|
779
|
+
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
|
|
780
|
+
x: t.offsetLeft,
|
|
781
|
+
y: t.offsetTop,
|
|
782
|
+
width: n,
|
|
783
|
+
height: r
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
function xt(t, e) {
|
|
787
|
+
var n = e.getRootNode && e.getRootNode();
|
|
788
|
+
if (t.contains(e))
|
|
789
|
+
return !0;
|
|
790
|
+
if (n && Qe(n)) {
|
|
791
|
+
var r = e;
|
|
792
|
+
do {
|
|
793
|
+
if (r && t.isSameNode(r))
|
|
794
|
+
return !0;
|
|
795
|
+
r = r.parentNode || r.host;
|
|
796
|
+
} while (r);
|
|
797
|
+
}
|
|
798
|
+
return !1;
|
|
799
|
+
}
|
|
800
|
+
function z(t) {
|
|
801
|
+
return q(t).getComputedStyle(t);
|
|
802
|
+
}
|
|
803
|
+
function qn(t) {
|
|
804
|
+
return ["table", "td", "th"].indexOf(Z(t)) >= 0;
|
|
805
|
+
}
|
|
806
|
+
function J(t) {
|
|
807
|
+
return ((le(t) ? t.ownerDocument : (
|
|
808
|
+
// $FlowFixMe[prop-missing]
|
|
809
|
+
t.document
|
|
810
|
+
)) || window.document).documentElement;
|
|
811
|
+
}
|
|
812
|
+
function Ve(t) {
|
|
813
|
+
return Z(t) === "html" ? t : (
|
|
814
|
+
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
815
|
+
// $FlowFixMe[incompatible-return]
|
|
816
|
+
// $FlowFixMe[prop-missing]
|
|
817
|
+
t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
818
|
+
t.parentNode || // DOM Element detected
|
|
819
|
+
(Qe(t) ? t.host : null) || // ShadowRoot detected
|
|
820
|
+
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
821
|
+
J(t)
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
function vt(t) {
|
|
825
|
+
return !k(t) || // https://github.com/popperjs/popper-core/issues/837
|
|
826
|
+
z(t).position === "fixed" ? null : t.offsetParent;
|
|
827
|
+
}
|
|
828
|
+
function Fn(t) {
|
|
829
|
+
var e = /firefox/i.test(Ye()), n = /Trident/i.test(Ye());
|
|
830
|
+
if (n && k(t)) {
|
|
831
|
+
var r = z(t);
|
|
832
|
+
if (r.position === "fixed")
|
|
833
|
+
return null;
|
|
834
|
+
}
|
|
835
|
+
var i = Ve(t);
|
|
836
|
+
for (Qe(i) && (i = i.host); k(i) && ["html", "body"].indexOf(Z(i)) < 0; ) {
|
|
837
|
+
var o = z(i);
|
|
838
|
+
if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || e && o.willChange === "filter" || e && o.filter && o.filter !== "none")
|
|
839
|
+
return i;
|
|
840
|
+
i = i.parentNode;
|
|
841
|
+
}
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
844
|
+
function Oe(t) {
|
|
845
|
+
for (var e = q(t), n = vt(t); n && qn(n) && z(n).position === "static"; )
|
|
846
|
+
n = vt(n);
|
|
847
|
+
return n && (Z(n) === "html" || Z(n) === "body" && z(n).position === "static") ? e : n || Fn(t) || e;
|
|
848
|
+
}
|
|
849
|
+
function et(t) {
|
|
850
|
+
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
851
|
+
}
|
|
852
|
+
function be(t, e, n) {
|
|
853
|
+
return ae(t, Re(e, n));
|
|
854
|
+
}
|
|
855
|
+
function Gn(t, e, n) {
|
|
856
|
+
var r = be(t, e, n);
|
|
857
|
+
return r > n ? n : r;
|
|
858
|
+
}
|
|
859
|
+
function Ct() {
|
|
860
|
+
return {
|
|
861
|
+
top: 0,
|
|
862
|
+
right: 0,
|
|
863
|
+
bottom: 0,
|
|
864
|
+
left: 0
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
function Rt(t) {
|
|
868
|
+
return Object.assign({}, Ct(), t);
|
|
869
|
+
}
|
|
870
|
+
function Ht(t, e) {
|
|
871
|
+
return e.reduce(function(n, r) {
|
|
872
|
+
return n[r] = t, n;
|
|
873
|
+
}, {});
|
|
874
|
+
}
|
|
875
|
+
var jn = function(e, n) {
|
|
876
|
+
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
|
|
877
|
+
placement: n.placement
|
|
878
|
+
})) : e, Rt(typeof e != "number" ? e : Ht(e, Ae));
|
|
879
|
+
};
|
|
880
|
+
function zn(t) {
|
|
881
|
+
var e, n = t.state, r = t.name, i = t.options, o = n.elements.arrow, a = n.modifiersData.popperOffsets, l = j(n.placement), s = et(l), u = [H, $].indexOf(l) >= 0, c = u ? "height" : "width";
|
|
882
|
+
if (!(!o || !a)) {
|
|
883
|
+
var v = jn(i.padding, n), b = Je(o), p = s === "y" ? R : H, h = s === "y" ? W : $, f = n.rects.reference[c] + n.rects.reference[s] - a[s] - n.rects.popper[c], E = a[s] - n.rects.reference[s], w = Oe(o), A = w ? s === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, P = f / 2 - E / 2, m = v[p], _ = A - b[c] - v[h], g = A / 2 - b[c] / 2 + P, O = be(m, g, _), I = s;
|
|
884
|
+
n.modifiersData[r] = (e = {}, e[I] = O, e.centerOffset = O - g, e);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
function Yn(t) {
|
|
888
|
+
var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
|
|
889
|
+
if (i != null && !(typeof i == "string" && (i = e.elements.popper.querySelector(i), !i))) {
|
|
890
|
+
if (process.env.NODE_ENV !== "production" && (k(i) || 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(" "))), !xt(e.elements.popper, i)) {
|
|
891
|
+
process.env.NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
e.elements.arrow = i;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
const Zn = {
|
|
898
|
+
name: "arrow",
|
|
899
|
+
enabled: !0,
|
|
900
|
+
phase: "main",
|
|
901
|
+
fn: zn,
|
|
902
|
+
effect: Yn,
|
|
903
|
+
requires: ["popperOffsets"],
|
|
904
|
+
requiresIfExists: ["preventOverflow"]
|
|
905
|
+
};
|
|
906
|
+
function ve(t) {
|
|
907
|
+
return t.split("-")[1];
|
|
908
|
+
}
|
|
909
|
+
var Xn = {
|
|
910
|
+
top: "auto",
|
|
911
|
+
right: "auto",
|
|
912
|
+
bottom: "auto",
|
|
913
|
+
left: "auto"
|
|
914
|
+
};
|
|
915
|
+
function Kn(t) {
|
|
916
|
+
var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
|
|
917
|
+
return {
|
|
918
|
+
x: fe(e * i) / i || 0,
|
|
919
|
+
y: fe(n * i) / i || 0
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
function mt(t) {
|
|
923
|
+
var e, n = t.popper, r = t.popperRect, i = t.placement, o = t.variation, a = t.offsets, l = t.position, s = t.gpuAcceleration, u = t.adaptive, c = t.roundOffsets, v = t.isFixed, b = a.x, p = b === void 0 ? 0 : b, h = a.y, f = h === void 0 ? 0 : h, E = typeof c == "function" ? c({
|
|
924
|
+
x: p,
|
|
925
|
+
y: f
|
|
926
|
+
}) : {
|
|
927
|
+
x: p,
|
|
928
|
+
y: f
|
|
929
|
+
};
|
|
930
|
+
p = E.x, f = E.y;
|
|
931
|
+
var w = a.hasOwnProperty("x"), A = a.hasOwnProperty("y"), P = H, m = R, _ = window;
|
|
932
|
+
if (u) {
|
|
933
|
+
var g = Oe(n), O = "clientHeight", I = "clientWidth";
|
|
934
|
+
if (g === q(n) && (g = J(n), z(g).position !== "static" && l === "absolute" && (O = "scrollHeight", I = "scrollWidth")), g = g, i === R || (i === H || i === $) && o === we) {
|
|
935
|
+
m = W;
|
|
936
|
+
var L = v && g === _ && _.visualViewport ? _.visualViewport.height : (
|
|
937
|
+
// $FlowFixMe[prop-missing]
|
|
938
|
+
g[O]
|
|
939
|
+
);
|
|
940
|
+
f -= L - r.height, f *= s ? 1 : -1;
|
|
941
|
+
}
|
|
942
|
+
if (i === H || (i === R || i === W) && o === we) {
|
|
943
|
+
P = $;
|
|
944
|
+
var N = v && g === _ && _.visualViewport ? _.visualViewport.width : (
|
|
945
|
+
// $FlowFixMe[prop-missing]
|
|
946
|
+
g[I]
|
|
947
|
+
);
|
|
948
|
+
p -= N - r.width, p *= s ? 1 : -1;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
var y = Object.assign({
|
|
952
|
+
position: l
|
|
953
|
+
}, u && Xn), D = c === !0 ? Kn({
|
|
954
|
+
x: p,
|
|
955
|
+
y: f
|
|
956
|
+
}) : {
|
|
957
|
+
x: p,
|
|
958
|
+
y: f
|
|
959
|
+
};
|
|
960
|
+
if (p = D.x, f = D.y, s) {
|
|
961
|
+
var x;
|
|
962
|
+
return Object.assign({}, y, (x = {}, x[m] = A ? "0" : "", x[P] = w ? "0" : "", x.transform = (_.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + f + "px)" : "translate3d(" + p + "px, " + f + "px, 0)", x));
|
|
963
|
+
}
|
|
964
|
+
return Object.assign({}, y, (e = {}, e[m] = A ? f + "px" : "", e[P] = w ? p + "px" : "", e.transform = "", e));
|
|
965
|
+
}
|
|
966
|
+
function Qn(t) {
|
|
967
|
+
var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, o = n.adaptive, a = o === void 0 ? !0 : o, l = n.roundOffsets, s = l === void 0 ? !0 : l;
|
|
968
|
+
if (process.env.NODE_ENV !== "production") {
|
|
969
|
+
var u = z(e.elements.popper).transitionProperty || "";
|
|
970
|
+
a && ["transform", "top", "right", "bottom", "left"].some(function(v) {
|
|
971
|
+
return u.indexOf(v) >= 0;
|
|
972
|
+
}) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `
|
|
973
|
+
|
|
974
|
+
`, '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.", `
|
|
975
|
+
|
|
976
|
+
`, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
|
|
977
|
+
}
|
|
978
|
+
var c = {
|
|
979
|
+
placement: j(e.placement),
|
|
980
|
+
variation: ve(e.placement),
|
|
981
|
+
popper: e.elements.popper,
|
|
982
|
+
popperRect: e.rects.popper,
|
|
983
|
+
gpuAcceleration: i,
|
|
984
|
+
isFixed: e.options.strategy === "fixed"
|
|
985
|
+
};
|
|
986
|
+
e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, mt(Object.assign({}, c, {
|
|
987
|
+
offsets: e.modifiersData.popperOffsets,
|
|
988
|
+
position: e.options.strategy,
|
|
989
|
+
adaptive: a,
|
|
990
|
+
roundOffsets: s
|
|
991
|
+
})))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, mt(Object.assign({}, c, {
|
|
992
|
+
offsets: e.modifiersData.arrow,
|
|
993
|
+
position: "absolute",
|
|
994
|
+
adaptive: !1,
|
|
995
|
+
roundOffsets: s
|
|
996
|
+
})))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
|
|
997
|
+
"data-popper-placement": e.placement
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
const Jn = {
|
|
1001
|
+
name: "computeStyles",
|
|
1002
|
+
enabled: !0,
|
|
1003
|
+
phase: "beforeWrite",
|
|
1004
|
+
fn: Qn,
|
|
1005
|
+
data: {}
|
|
1006
|
+
};
|
|
1007
|
+
var Se = {
|
|
1008
|
+
passive: !0
|
|
1009
|
+
};
|
|
1010
|
+
function er(t) {
|
|
1011
|
+
var e = t.state, n = t.instance, r = t.options, i = r.scroll, o = i === void 0 ? !0 : i, a = r.resize, l = a === void 0 ? !0 : a, s = q(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
1012
|
+
return o && u.forEach(function(c) {
|
|
1013
|
+
c.addEventListener("scroll", n.update, Se);
|
|
1014
|
+
}), l && s.addEventListener("resize", n.update, Se), function() {
|
|
1015
|
+
o && u.forEach(function(c) {
|
|
1016
|
+
c.removeEventListener("scroll", n.update, Se);
|
|
1017
|
+
}), l && s.removeEventListener("resize", n.update, Se);
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
const tr = {
|
|
1021
|
+
name: "eventListeners",
|
|
1022
|
+
enabled: !0,
|
|
1023
|
+
phase: "write",
|
|
1024
|
+
fn: function() {
|
|
1025
|
+
},
|
|
1026
|
+
effect: er,
|
|
1027
|
+
data: {}
|
|
1028
|
+
};
|
|
1029
|
+
var nr = {
|
|
1030
|
+
left: "right",
|
|
1031
|
+
right: "left",
|
|
1032
|
+
bottom: "top",
|
|
1033
|
+
top: "bottom"
|
|
1034
|
+
};
|
|
1035
|
+
function xe(t) {
|
|
1036
|
+
return t.replace(/left|right|bottom|top/g, function(e) {
|
|
1037
|
+
return nr[e];
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
var rr = {
|
|
1041
|
+
start: "end",
|
|
1042
|
+
end: "start"
|
|
1043
|
+
};
|
|
1044
|
+
function _t(t) {
|
|
1045
|
+
return t.replace(/start|end/g, function(e) {
|
|
1046
|
+
return rr[e];
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
function tt(t) {
|
|
1050
|
+
var e = q(t), n = e.pageXOffset, r = e.pageYOffset;
|
|
1051
|
+
return {
|
|
1052
|
+
scrollLeft: n,
|
|
1053
|
+
scrollTop: r
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
function nt(t) {
|
|
1057
|
+
return he(J(t)).left + tt(t).scrollLeft;
|
|
1058
|
+
}
|
|
1059
|
+
function ir(t, e) {
|
|
1060
|
+
var n = q(t), r = J(t), i = n.visualViewport, o = r.clientWidth, a = r.clientHeight, l = 0, s = 0;
|
|
1061
|
+
if (i) {
|
|
1062
|
+
o = i.width, a = i.height;
|
|
1063
|
+
var u = Dt();
|
|
1064
|
+
(u || !u && e === "fixed") && (l = i.offsetLeft, s = i.offsetTop);
|
|
1065
|
+
}
|
|
1066
|
+
return {
|
|
1067
|
+
width: o,
|
|
1068
|
+
height: a,
|
|
1069
|
+
x: l + nt(t),
|
|
1070
|
+
y: s
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
function or(t) {
|
|
1074
|
+
var e, n = J(t), r = tt(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, o = ae(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = ae(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), l = -r.scrollLeft + nt(t), s = -r.scrollTop;
|
|
1075
|
+
return z(i || n).direction === "rtl" && (l += ae(n.clientWidth, i ? i.clientWidth : 0) - o), {
|
|
1076
|
+
width: o,
|
|
1077
|
+
height: a,
|
|
1078
|
+
x: l,
|
|
1079
|
+
y: s
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
function rt(t) {
|
|
1083
|
+
var e = z(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
|
|
1084
|
+
return /auto|scroll|overlay|hidden/.test(n + i + r);
|
|
1085
|
+
}
|
|
1086
|
+
function Bt(t) {
|
|
1087
|
+
return ["html", "body", "#document"].indexOf(Z(t)) >= 0 ? t.ownerDocument.body : k(t) && rt(t) ? t : Bt(Ve(t));
|
|
1088
|
+
}
|
|
1089
|
+
function Te(t, e) {
|
|
1090
|
+
var n;
|
|
1091
|
+
e === void 0 && (e = []);
|
|
1092
|
+
var r = Bt(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), o = q(r), a = i ? [o].concat(o.visualViewport || [], rt(r) ? r : []) : r, l = e.concat(a);
|
|
1093
|
+
return i ? l : (
|
|
1094
|
+
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1095
|
+
l.concat(Te(Ve(a)))
|
|
1096
|
+
);
|
|
1097
|
+
}
|
|
1098
|
+
function Ze(t) {
|
|
1099
|
+
return Object.assign({}, t, {
|
|
1100
|
+
left: t.x,
|
|
1101
|
+
top: t.y,
|
|
1102
|
+
right: t.x + t.width,
|
|
1103
|
+
bottom: t.y + t.height
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
function ar(t, e) {
|
|
1107
|
+
var n = he(t, !1, e === "fixed");
|
|
1108
|
+
return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
1109
|
+
}
|
|
1110
|
+
function Et(t, e, n) {
|
|
1111
|
+
return e === Ut ? Ze(ir(t, n)) : le(e) ? ar(e, n) : Ze(or(J(t)));
|
|
1112
|
+
}
|
|
1113
|
+
function sr(t) {
|
|
1114
|
+
var e = Te(Ve(t)), n = ["absolute", "fixed"].indexOf(z(t).position) >= 0, r = n && k(t) ? Oe(t) : t;
|
|
1115
|
+
return le(r) ? e.filter(function(i) {
|
|
1116
|
+
return le(i) && xt(i, r) && Z(i) !== "body";
|
|
1117
|
+
}) : [];
|
|
1118
|
+
}
|
|
1119
|
+
function lr(t, e, n, r) {
|
|
1120
|
+
var i = e === "clippingParents" ? sr(t) : [].concat(e), o = [].concat(i, [n]), a = o[0], l = o.reduce(function(s, u) {
|
|
1121
|
+
var c = Et(t, u, r);
|
|
1122
|
+
return s.top = ae(c.top, s.top), s.right = Re(c.right, s.right), s.bottom = Re(c.bottom, s.bottom), s.left = ae(c.left, s.left), s;
|
|
1123
|
+
}, Et(t, a, r));
|
|
1124
|
+
return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
|
|
1125
|
+
}
|
|
1126
|
+
function kt(t) {
|
|
1127
|
+
var e = t.reference, n = t.element, r = t.placement, i = r ? j(r) : null, o = r ? ve(r) : null, a = e.x + e.width / 2 - n.width / 2, l = e.y + e.height / 2 - n.height / 2, s;
|
|
1128
|
+
switch (i) {
|
|
1129
|
+
case R:
|
|
1130
|
+
s = {
|
|
1131
|
+
x: a,
|
|
1132
|
+
y: e.y - n.height
|
|
1133
|
+
};
|
|
1134
|
+
break;
|
|
1135
|
+
case W:
|
|
1136
|
+
s = {
|
|
1137
|
+
x: a,
|
|
1138
|
+
y: e.y + e.height
|
|
1139
|
+
};
|
|
1140
|
+
break;
|
|
1141
|
+
case $:
|
|
1142
|
+
s = {
|
|
1143
|
+
x: e.x + e.width,
|
|
1144
|
+
y: l
|
|
1145
|
+
};
|
|
1146
|
+
break;
|
|
1147
|
+
case H:
|
|
1148
|
+
s = {
|
|
1149
|
+
x: e.x - n.width,
|
|
1150
|
+
y: l
|
|
1151
|
+
};
|
|
1152
|
+
break;
|
|
1153
|
+
default:
|
|
1154
|
+
s = {
|
|
1155
|
+
x: e.x,
|
|
1156
|
+
y: e.y
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
var u = i ? et(i) : null;
|
|
1160
|
+
if (u != null) {
|
|
1161
|
+
var c = u === "y" ? "height" : "width";
|
|
1162
|
+
switch (o) {
|
|
1163
|
+
case pe:
|
|
1164
|
+
s[u] = s[u] - (e[c] / 2 - n[c] / 2);
|
|
1165
|
+
break;
|
|
1166
|
+
case we:
|
|
1167
|
+
s[u] = s[u] + (e[c] / 2 - n[c] / 2);
|
|
1168
|
+
break;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
return s;
|
|
1172
|
+
}
|
|
1173
|
+
function ye(t, e) {
|
|
1174
|
+
e === void 0 && (e = {});
|
|
1175
|
+
var n = e, r = n.placement, i = r === void 0 ? t.placement : r, o = n.strategy, a = o === void 0 ? t.strategy : o, l = n.boundary, s = l === void 0 ? Ln : l, u = n.rootBoundary, c = u === void 0 ? Ut : u, v = n.elementContext, b = v === void 0 ? Ee : v, p = n.altBoundary, h = p === void 0 ? !1 : p, f = n.padding, E = f === void 0 ? 0 : f, w = Rt(typeof E != "number" ? E : Ht(E, Ae)), A = b === Ee ? Nn : Ee, P = t.rects.popper, m = t.elements[h ? A : b], _ = lr(le(m) ? m : m.contextElement || J(t.elements.popper), s, c, a), g = he(t.elements.reference), O = kt({
|
|
1176
|
+
reference: g,
|
|
1177
|
+
element: P,
|
|
1178
|
+
strategy: "absolute",
|
|
1179
|
+
placement: i
|
|
1180
|
+
}), I = Ze(Object.assign({}, P, O)), L = b === Ee ? I : g, N = {
|
|
1181
|
+
top: _.top - L.top + w.top,
|
|
1182
|
+
bottom: L.bottom - _.bottom + w.bottom,
|
|
1183
|
+
left: _.left - L.left + w.left,
|
|
1184
|
+
right: L.right - _.right + w.right
|
|
1185
|
+
}, y = t.modifiersData.offset;
|
|
1186
|
+
if (b === Ee && y) {
|
|
1187
|
+
var D = y[i];
|
|
1188
|
+
Object.keys(N).forEach(function(x) {
|
|
1189
|
+
var ee = [$, W].indexOf(x) >= 0 ? 1 : -1, te = [R, W].indexOf(x) >= 0 ? "y" : "x";
|
|
1190
|
+
N[x] += D[te] * ee;
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
return N;
|
|
1194
|
+
}
|
|
1195
|
+
function cr(t, e) {
|
|
1196
|
+
e === void 0 && (e = {});
|
|
1197
|
+
var n = e, r = n.placement, i = n.boundary, o = n.rootBoundary, a = n.padding, l = n.flipVariations, s = n.allowedAutoPlacements, u = s === void 0 ? St : s, c = ve(r), v = c ? l ? ht : ht.filter(function(h) {
|
|
1198
|
+
return ve(h) === c;
|
|
1199
|
+
}) : Ae, b = v.filter(function(h) {
|
|
1200
|
+
return u.indexOf(h) >= 0;
|
|
1201
|
+
});
|
|
1202
|
+
b.length === 0 && (b = v, process.env.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(" ")));
|
|
1203
|
+
var p = b.reduce(function(h, f) {
|
|
1204
|
+
return h[f] = ye(t, {
|
|
1205
|
+
placement: f,
|
|
1206
|
+
boundary: i,
|
|
1207
|
+
rootBoundary: o,
|
|
1208
|
+
padding: a
|
|
1209
|
+
})[j(f)], h;
|
|
1210
|
+
}, {});
|
|
1211
|
+
return Object.keys(p).sort(function(h, f) {
|
|
1212
|
+
return p[h] - p[f];
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
function ur(t) {
|
|
1216
|
+
if (j(t) === ke)
|
|
1217
|
+
return [];
|
|
1218
|
+
var e = xe(t);
|
|
1219
|
+
return [_t(t), e, _t(e)];
|
|
1220
|
+
}
|
|
1221
|
+
function dr(t) {
|
|
1222
|
+
var e = t.state, n = t.options, r = t.name;
|
|
1223
|
+
if (!e.modifiersData[r]._skip) {
|
|
1224
|
+
for (var i = n.mainAxis, o = i === void 0 ? !0 : i, a = n.altAxis, l = a === void 0 ? !0 : a, s = n.fallbackPlacements, u = n.padding, c = n.boundary, v = n.rootBoundary, b = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, f = n.allowedAutoPlacements, E = e.options.placement, w = j(E), A = w === E, P = s || (A || !h ? [xe(E)] : ur(E)), m = [E].concat(P).reduce(function(ce, K) {
|
|
1225
|
+
return ce.concat(j(K) === ke ? cr(e, {
|
|
1226
|
+
placement: K,
|
|
1227
|
+
boundary: c,
|
|
1228
|
+
rootBoundary: v,
|
|
1229
|
+
padding: u,
|
|
1230
|
+
flipVariations: h,
|
|
1231
|
+
allowedAutoPlacements: f
|
|
1232
|
+
}) : K);
|
|
1233
|
+
}, []), _ = e.rects.reference, g = e.rects.popper, O = /* @__PURE__ */ new Map(), I = !0, L = m[0], N = 0; N < m.length; N++) {
|
|
1234
|
+
var y = m[N], D = j(y), x = ve(y) === pe, ee = [R, W].indexOf(D) >= 0, te = ee ? "width" : "height", B = ye(e, {
|
|
1235
|
+
placement: y,
|
|
1236
|
+
boundary: c,
|
|
1237
|
+
rootBoundary: v,
|
|
1238
|
+
altBoundary: b,
|
|
1239
|
+
padding: u
|
|
1240
|
+
}), F = ee ? x ? $ : H : x ? W : R;
|
|
1241
|
+
_[te] > g[te] && (F = xe(F));
|
|
1242
|
+
var Me = xe(F), ne = [];
|
|
1243
|
+
if (o && ne.push(B[D] <= 0), l && ne.push(B[F] <= 0, B[Me] <= 0), ne.every(function(ce) {
|
|
1244
|
+
return ce;
|
|
1245
|
+
})) {
|
|
1246
|
+
L = y, I = !1;
|
|
1247
|
+
break;
|
|
1248
|
+
}
|
|
1249
|
+
O.set(y, ne);
|
|
1250
|
+
}
|
|
1251
|
+
if (I)
|
|
1252
|
+
for (var Ie = h ? 3 : 1, $e = function(K) {
|
|
1253
|
+
var _e = m.find(function(Ne) {
|
|
1254
|
+
var re = O.get(Ne);
|
|
1255
|
+
if (re)
|
|
1256
|
+
return re.slice(0, K).every(function(qe) {
|
|
1257
|
+
return qe;
|
|
1258
|
+
});
|
|
1259
|
+
});
|
|
1260
|
+
if (_e)
|
|
1261
|
+
return L = _e, "break";
|
|
1262
|
+
}, me = Ie; me > 0; me--) {
|
|
1263
|
+
var Le = $e(me);
|
|
1264
|
+
if (Le === "break")
|
|
1265
|
+
break;
|
|
1266
|
+
}
|
|
1267
|
+
e.placement !== L && (e.modifiersData[r]._skip = !0, e.placement = L, e.reset = !0);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
const pr = {
|
|
1271
|
+
name: "flip",
|
|
1272
|
+
enabled: !0,
|
|
1273
|
+
phase: "main",
|
|
1274
|
+
fn: dr,
|
|
1275
|
+
requiresIfExists: ["offset"],
|
|
1276
|
+
data: {
|
|
1277
|
+
_skip: !1
|
|
1278
|
+
}
|
|
1279
|
+
};
|
|
1280
|
+
function gt(t, e, n) {
|
|
1281
|
+
return n === void 0 && (n = {
|
|
1282
|
+
x: 0,
|
|
1283
|
+
y: 0
|
|
1284
|
+
}), {
|
|
1285
|
+
top: t.top - e.height - n.y,
|
|
1286
|
+
right: t.right - e.width + n.x,
|
|
1287
|
+
bottom: t.bottom - e.height + n.y,
|
|
1288
|
+
left: t.left - e.width - n.x
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
function bt(t) {
|
|
1292
|
+
return [R, $, W, H].some(function(e) {
|
|
1293
|
+
return t[e] >= 0;
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
function fr(t) {
|
|
1297
|
+
var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, o = e.modifiersData.preventOverflow, a = ye(e, {
|
|
1298
|
+
elementContext: "reference"
|
|
1299
|
+
}), l = ye(e, {
|
|
1300
|
+
altBoundary: !0
|
|
1301
|
+
}), s = gt(a, r), u = gt(l, i, o), c = bt(s), v = bt(u);
|
|
1302
|
+
e.modifiersData[n] = {
|
|
1303
|
+
referenceClippingOffsets: s,
|
|
1304
|
+
popperEscapeOffsets: u,
|
|
1305
|
+
isReferenceHidden: c,
|
|
1306
|
+
hasPopperEscaped: v
|
|
1307
|
+
}, e.attributes.popper = Object.assign({}, e.attributes.popper, {
|
|
1308
|
+
"data-popper-reference-hidden": c,
|
|
1309
|
+
"data-popper-escaped": v
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
const hr = {
|
|
1313
|
+
name: "hide",
|
|
1314
|
+
enabled: !0,
|
|
1315
|
+
phase: "main",
|
|
1316
|
+
requiresIfExists: ["preventOverflow"],
|
|
1317
|
+
fn: fr
|
|
1318
|
+
};
|
|
1319
|
+
function vr(t, e, n) {
|
|
1320
|
+
var r = j(t), i = [H, R].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, e, {
|
|
1321
|
+
placement: t
|
|
1322
|
+
})) : n, a = o[0], l = o[1];
|
|
1323
|
+
return a = a || 0, l = (l || 0) * i, [H, $].indexOf(r) >= 0 ? {
|
|
1324
|
+
x: l,
|
|
1325
|
+
y: a
|
|
1326
|
+
} : {
|
|
1327
|
+
x: a,
|
|
1328
|
+
y: l
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
function mr(t) {
|
|
1332
|
+
var e = t.state, n = t.options, r = t.name, i = n.offset, o = i === void 0 ? [0, 0] : i, a = St.reduce(function(c, v) {
|
|
1333
|
+
return c[v] = vr(v, e.rects, o), c;
|
|
1334
|
+
}, {}), l = a[e.placement], s = l.x, u = l.y;
|
|
1335
|
+
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += s, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = a;
|
|
1336
|
+
}
|
|
1337
|
+
const _r = {
|
|
1338
|
+
name: "offset",
|
|
1339
|
+
enabled: !0,
|
|
1340
|
+
phase: "main",
|
|
1341
|
+
requires: ["popperOffsets"],
|
|
1342
|
+
fn: mr
|
|
1343
|
+
};
|
|
1344
|
+
function Er(t) {
|
|
1345
|
+
var e = t.state, n = t.name;
|
|
1346
|
+
e.modifiersData[n] = kt({
|
|
1347
|
+
reference: e.rects.reference,
|
|
1348
|
+
element: e.rects.popper,
|
|
1349
|
+
strategy: "absolute",
|
|
1350
|
+
placement: e.placement
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
const gr = {
|
|
1354
|
+
name: "popperOffsets",
|
|
1355
|
+
enabled: !0,
|
|
1356
|
+
phase: "read",
|
|
1357
|
+
fn: Er,
|
|
1358
|
+
data: {}
|
|
1359
|
+
};
|
|
1360
|
+
function br(t) {
|
|
1361
|
+
return t === "x" ? "y" : "x";
|
|
1362
|
+
}
|
|
1363
|
+
function Tr(t) {
|
|
1364
|
+
var e = t.state, n = t.options, r = t.name, i = n.mainAxis, o = i === void 0 ? !0 : i, a = n.altAxis, l = a === void 0 ? !1 : a, s = n.boundary, u = n.rootBoundary, c = n.altBoundary, v = n.padding, b = n.tether, p = b === void 0 ? !0 : b, h = n.tetherOffset, f = h === void 0 ? 0 : h, E = ye(e, {
|
|
1365
|
+
boundary: s,
|
|
1366
|
+
rootBoundary: u,
|
|
1367
|
+
padding: v,
|
|
1368
|
+
altBoundary: c
|
|
1369
|
+
}), w = j(e.placement), A = ve(e.placement), P = !A, m = et(w), _ = br(m), g = e.modifiersData.popperOffsets, O = e.rects.reference, I = e.rects.popper, L = typeof f == "function" ? f(Object.assign({}, e.rects, {
|
|
1370
|
+
placement: e.placement
|
|
1371
|
+
})) : f, N = typeof L == "number" ? {
|
|
1372
|
+
mainAxis: L,
|
|
1373
|
+
altAxis: L
|
|
1374
|
+
} : Object.assign({
|
|
1375
|
+
mainAxis: 0,
|
|
1376
|
+
altAxis: 0
|
|
1377
|
+
}, L), y = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, D = {
|
|
1378
|
+
x: 0,
|
|
1379
|
+
y: 0
|
|
1380
|
+
};
|
|
1381
|
+
if (g) {
|
|
1382
|
+
if (o) {
|
|
1383
|
+
var x, ee = m === "y" ? R : H, te = m === "y" ? W : $, B = m === "y" ? "height" : "width", F = g[m], Me = F + E[ee], ne = F - E[te], Ie = p ? -I[B] / 2 : 0, $e = A === pe ? O[B] : I[B], me = A === pe ? -I[B] : -O[B], Le = e.elements.arrow, ce = p && Le ? Je(Le) : {
|
|
1384
|
+
width: 0,
|
|
1385
|
+
height: 0
|
|
1386
|
+
}, K = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ct(), _e = K[ee], Ne = K[te], re = be(0, O[B], ce[B]), qe = P ? O[B] / 2 - Ie - re - _e - N.mainAxis : $e - re - _e - N.mainAxis, Gt = P ? -O[B] / 2 + Ie + re + Ne + N.mainAxis : me + re + Ne + N.mainAxis, Fe = e.elements.arrow && Oe(e.elements.arrow), jt = Fe ? m === "y" ? Fe.clientTop || 0 : Fe.clientLeft || 0 : 0, ot = (x = y == null ? void 0 : y[m]) != null ? x : 0, zt = F + qe - ot - jt, Yt = F + Gt - ot, at = be(p ? Re(Me, zt) : Me, F, p ? ae(ne, Yt) : ne);
|
|
1387
|
+
g[m] = at, D[m] = at - F;
|
|
1388
|
+
}
|
|
1389
|
+
if (l) {
|
|
1390
|
+
var st, Zt = m === "x" ? R : H, Xt = m === "x" ? W : $, ie = g[_], Ue = _ === "y" ? "height" : "width", lt = ie + E[Zt], ct = ie - E[Xt], Ge = [R, H].indexOf(w) !== -1, ut = (st = y == null ? void 0 : y[_]) != null ? st : 0, dt = Ge ? lt : ie - O[Ue] - I[Ue] - ut + N.altAxis, pt = Ge ? ie + O[Ue] + I[Ue] - ut - N.altAxis : ct, ft = p && Ge ? Gn(dt, ie, pt) : be(p ? dt : lt, ie, p ? pt : ct);
|
|
1391
|
+
g[_] = ft, D[_] = ft - ie;
|
|
1392
|
+
}
|
|
1393
|
+
e.modifiersData[r] = D;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const wr = {
|
|
1397
|
+
name: "preventOverflow",
|
|
1398
|
+
enabled: !0,
|
|
1399
|
+
phase: "main",
|
|
1400
|
+
fn: Tr,
|
|
1401
|
+
requiresIfExists: ["offset"]
|
|
1402
|
+
};
|
|
1403
|
+
function yr(t) {
|
|
1404
|
+
return {
|
|
1405
|
+
scrollLeft: t.scrollLeft,
|
|
1406
|
+
scrollTop: t.scrollTop
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1409
|
+
function Pr(t) {
|
|
1410
|
+
return t === q(t) || !k(t) ? tt(t) : yr(t);
|
|
1411
|
+
}
|
|
1412
|
+
function Ar(t) {
|
|
1413
|
+
var e = t.getBoundingClientRect(), n = fe(e.width) / t.offsetWidth || 1, r = fe(e.height) / t.offsetHeight || 1;
|
|
1414
|
+
return n !== 1 || r !== 1;
|
|
1415
|
+
}
|
|
1416
|
+
function Or(t, e, n) {
|
|
1417
|
+
n === void 0 && (n = !1);
|
|
1418
|
+
var r = k(e), i = k(e) && Ar(e), o = J(e), a = he(t, i, n), l = {
|
|
1419
|
+
scrollLeft: 0,
|
|
1420
|
+
scrollTop: 0
|
|
1421
|
+
}, s = {
|
|
1422
|
+
x: 0,
|
|
1423
|
+
y: 0
|
|
1424
|
+
};
|
|
1425
|
+
return (r || !r && !n) && ((Z(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1426
|
+
rt(o)) && (l = Pr(e)), k(e) ? (s = he(e, !0), s.x += e.clientLeft, s.y += e.clientTop) : o && (s.x = nt(o))), {
|
|
1427
|
+
x: a.left + l.scrollLeft - s.x,
|
|
1428
|
+
y: a.top + l.scrollTop - s.y,
|
|
1429
|
+
width: a.width,
|
|
1430
|
+
height: a.height
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
function Mr(t) {
|
|
1434
|
+
var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
|
1435
|
+
t.forEach(function(o) {
|
|
1436
|
+
e.set(o.name, o);
|
|
1437
|
+
});
|
|
1438
|
+
function i(o) {
|
|
1439
|
+
n.add(o.name);
|
|
1440
|
+
var a = [].concat(o.requires || [], o.requiresIfExists || []);
|
|
1441
|
+
a.forEach(function(l) {
|
|
1442
|
+
if (!n.has(l)) {
|
|
1443
|
+
var s = e.get(l);
|
|
1444
|
+
s && i(s);
|
|
1445
|
+
}
|
|
1446
|
+
}), r.push(o);
|
|
1447
|
+
}
|
|
1448
|
+
return t.forEach(function(o) {
|
|
1449
|
+
n.has(o.name) || i(o);
|
|
1450
|
+
}), r;
|
|
1451
|
+
}
|
|
1452
|
+
function Ir(t) {
|
|
1453
|
+
var e = Mr(t);
|
|
1454
|
+
return ze.reduce(function(n, r) {
|
|
1455
|
+
return n.concat(e.filter(function(i) {
|
|
1456
|
+
return i.phase === r;
|
|
1457
|
+
}));
|
|
1458
|
+
}, []);
|
|
1459
|
+
}
|
|
1460
|
+
function Lr(t) {
|
|
1461
|
+
var e;
|
|
1462
|
+
return function() {
|
|
1463
|
+
return e || (e = new Promise(function(n) {
|
|
1464
|
+
Promise.resolve().then(function() {
|
|
1465
|
+
e = void 0, n(t());
|
|
1466
|
+
});
|
|
1467
|
+
})), e;
|
|
1468
|
+
};
|
|
1469
|
+
}
|
|
1470
|
+
function Q(t) {
|
|
1471
|
+
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
|
|
1472
|
+
n[r - 1] = arguments[r];
|
|
1473
|
+
return [].concat(n).reduce(function(i, o) {
|
|
1474
|
+
return i.replace(/%s/, o);
|
|
1475
|
+
}, t);
|
|
1476
|
+
}
|
|
1477
|
+
var oe = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', Nr = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', Tt = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
|
|
1478
|
+
function Ur(t) {
|
|
1479
|
+
t.forEach(function(e) {
|
|
1480
|
+
[].concat(Object.keys(e), Tt).filter(function(n, r, i) {
|
|
1481
|
+
return i.indexOf(n) === r;
|
|
1482
|
+
}).forEach(function(n) {
|
|
1483
|
+
switch (n) {
|
|
1484
|
+
case "name":
|
|
1485
|
+
typeof e.name != "string" && console.error(Q(oe, String(e.name), '"name"', '"string"', '"' + String(e.name) + '"'));
|
|
1486
|
+
break;
|
|
1487
|
+
case "enabled":
|
|
1488
|
+
typeof e.enabled != "boolean" && console.error(Q(oe, e.name, '"enabled"', '"boolean"', '"' + String(e.enabled) + '"'));
|
|
1489
|
+
break;
|
|
1490
|
+
case "phase":
|
|
1491
|
+
ze.indexOf(e.phase) < 0 && console.error(Q(oe, e.name, '"phase"', "either " + ze.join(", "), '"' + String(e.phase) + '"'));
|
|
1492
|
+
break;
|
|
1493
|
+
case "fn":
|
|
1494
|
+
typeof e.fn != "function" && console.error(Q(oe, e.name, '"fn"', '"function"', '"' + String(e.fn) + '"'));
|
|
1495
|
+
break;
|
|
1496
|
+
case "effect":
|
|
1497
|
+
e.effect != null && typeof e.effect != "function" && console.error(Q(oe, e.name, '"effect"', '"function"', '"' + String(e.fn) + '"'));
|
|
1498
|
+
break;
|
|
1499
|
+
case "requires":
|
|
1500
|
+
e.requires != null && !Array.isArray(e.requires) && console.error(Q(oe, e.name, '"requires"', '"array"', '"' + String(e.requires) + '"'));
|
|
1501
|
+
break;
|
|
1502
|
+
case "requiresIfExists":
|
|
1503
|
+
Array.isArray(e.requiresIfExists) || console.error(Q(oe, e.name, '"requiresIfExists"', '"array"', '"' + String(e.requiresIfExists) + '"'));
|
|
1504
|
+
break;
|
|
1505
|
+
case "options":
|
|
1506
|
+
case "data":
|
|
1507
|
+
break;
|
|
1508
|
+
default:
|
|
1509
|
+
console.error('PopperJS: an invalid property has been provided to the "' + e.name + '" modifier, valid properties are ' + Tt.map(function(r) {
|
|
1510
|
+
return '"' + r + '"';
|
|
1511
|
+
}).join(", ") + '; but "' + n + '" was provided.');
|
|
1512
|
+
}
|
|
1513
|
+
e.requires && e.requires.forEach(function(r) {
|
|
1514
|
+
t.find(function(i) {
|
|
1515
|
+
return i.name === r;
|
|
1516
|
+
}) == null && console.error(Q(Nr, String(e.name), r, r));
|
|
1517
|
+
});
|
|
1518
|
+
});
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
function Sr(t, e) {
|
|
1522
|
+
var n = /* @__PURE__ */ new Set();
|
|
1523
|
+
return t.filter(function(r) {
|
|
1524
|
+
var i = e(r);
|
|
1525
|
+
if (!n.has(i))
|
|
1526
|
+
return n.add(i), !0;
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
function Dr(t) {
|
|
1530
|
+
var e = t.reduce(function(n, r) {
|
|
1531
|
+
var i = n[r.name];
|
|
1532
|
+
return n[r.name] = i ? Object.assign({}, i, r, {
|
|
1533
|
+
options: Object.assign({}, i.options, r.options),
|
|
1534
|
+
data: Object.assign({}, i.data, r.data)
|
|
1535
|
+
}) : r, n;
|
|
1536
|
+
}, {});
|
|
1537
|
+
return Object.keys(e).map(function(n) {
|
|
1538
|
+
return e[n];
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1541
|
+
var wt = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", xr = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", yt = {
|
|
1542
|
+
placement: "bottom",
|
|
1543
|
+
modifiers: [],
|
|
1544
|
+
strategy: "absolute"
|
|
1545
|
+
};
|
|
1546
|
+
function Pt() {
|
|
1547
|
+
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
1548
|
+
e[n] = arguments[n];
|
|
1549
|
+
return !e.some(function(r) {
|
|
1550
|
+
return !(r && typeof r.getBoundingClientRect == "function");
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
function Cr(t) {
|
|
1554
|
+
t === void 0 && (t = {});
|
|
1555
|
+
var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, o = i === void 0 ? yt : i;
|
|
1556
|
+
return function(l, s, u) {
|
|
1557
|
+
u === void 0 && (u = o);
|
|
1558
|
+
var c = {
|
|
1559
|
+
placement: "bottom",
|
|
1560
|
+
orderedModifiers: [],
|
|
1561
|
+
options: Object.assign({}, yt, o),
|
|
1562
|
+
modifiersData: {},
|
|
1563
|
+
elements: {
|
|
1564
|
+
reference: l,
|
|
1565
|
+
popper: s
|
|
1566
|
+
},
|
|
1567
|
+
attributes: {},
|
|
1568
|
+
styles: {}
|
|
1569
|
+
}, v = [], b = !1, p = {
|
|
1570
|
+
state: c,
|
|
1571
|
+
setOptions: function(w) {
|
|
1572
|
+
var A = typeof w == "function" ? w(c.options) : w;
|
|
1573
|
+
f(), c.options = Object.assign({}, o, c.options, A), c.scrollParents = {
|
|
1574
|
+
reference: le(l) ? Te(l) : l.contextElement ? Te(l.contextElement) : [],
|
|
1575
|
+
popper: Te(s)
|
|
1576
|
+
};
|
|
1577
|
+
var P = Ir(Dr([].concat(r, c.options.modifiers)));
|
|
1578
|
+
if (c.orderedModifiers = P.filter(function(y) {
|
|
1579
|
+
return y.enabled;
|
|
1580
|
+
}), process.env.NODE_ENV !== "production") {
|
|
1581
|
+
var m = Sr([].concat(P, c.options.modifiers), function(y) {
|
|
1582
|
+
var D = y.name;
|
|
1583
|
+
return D;
|
|
1584
|
+
});
|
|
1585
|
+
if (Ur(m), j(c.options.placement) === ke) {
|
|
1586
|
+
var _ = c.orderedModifiers.find(function(y) {
|
|
1587
|
+
var D = y.name;
|
|
1588
|
+
return D === "flip";
|
|
1589
|
+
});
|
|
1590
|
+
_ || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
|
|
1591
|
+
}
|
|
1592
|
+
var g = z(s), O = g.marginTop, I = g.marginRight, L = g.marginBottom, N = g.marginLeft;
|
|
1593
|
+
[O, I, L, N].some(function(y) {
|
|
1594
|
+
return parseFloat(y);
|
|
1595
|
+
}) && 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(" "));
|
|
1596
|
+
}
|
|
1597
|
+
return h(), p.update();
|
|
1598
|
+
},
|
|
1599
|
+
// Sync update – it will always be executed, even if not necessary. This
|
|
1600
|
+
// is useful for low frequency updates where sync behavior simplifies the
|
|
1601
|
+
// logic.
|
|
1602
|
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1603
|
+
// prefer the async Popper#update method
|
|
1604
|
+
forceUpdate: function() {
|
|
1605
|
+
if (!b) {
|
|
1606
|
+
var w = c.elements, A = w.reference, P = w.popper;
|
|
1607
|
+
if (!Pt(A, P)) {
|
|
1608
|
+
process.env.NODE_ENV !== "production" && console.error(wt);
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1611
|
+
c.rects = {
|
|
1612
|
+
reference: Or(A, Oe(P), c.options.strategy === "fixed"),
|
|
1613
|
+
popper: Je(P)
|
|
1614
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(y) {
|
|
1615
|
+
return c.modifiersData[y.name] = Object.assign({}, y.data);
|
|
1616
|
+
});
|
|
1617
|
+
for (var m = 0, _ = 0; _ < c.orderedModifiers.length; _++) {
|
|
1618
|
+
if (process.env.NODE_ENV !== "production" && (m += 1, m > 100)) {
|
|
1619
|
+
console.error(xr);
|
|
1620
|
+
break;
|
|
1621
|
+
}
|
|
1622
|
+
if (c.reset === !0) {
|
|
1623
|
+
c.reset = !1, _ = -1;
|
|
1624
|
+
continue;
|
|
1625
|
+
}
|
|
1626
|
+
var g = c.orderedModifiers[_], O = g.fn, I = g.options, L = I === void 0 ? {} : I, N = g.name;
|
|
1627
|
+
typeof O == "function" && (c = O({
|
|
1628
|
+
state: c,
|
|
1629
|
+
options: L,
|
|
1630
|
+
name: N,
|
|
1631
|
+
instance: p
|
|
1632
|
+
}) || c);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
// Async and optimistically optimized update – it will not be executed if
|
|
1637
|
+
// not necessary (debounced to run at most once-per-tick)
|
|
1638
|
+
update: Lr(function() {
|
|
1639
|
+
return new Promise(function(E) {
|
|
1640
|
+
p.forceUpdate(), E(c);
|
|
1641
|
+
});
|
|
1642
|
+
}),
|
|
1643
|
+
destroy: function() {
|
|
1644
|
+
f(), b = !0;
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
if (!Pt(l, s))
|
|
1648
|
+
return process.env.NODE_ENV !== "production" && console.error(wt), p;
|
|
1649
|
+
p.setOptions(u).then(function(E) {
|
|
1650
|
+
!b && u.onFirstUpdate && u.onFirstUpdate(E);
|
|
1651
|
+
});
|
|
1652
|
+
function h() {
|
|
1653
|
+
c.orderedModifiers.forEach(function(E) {
|
|
1654
|
+
var w = E.name, A = E.options, P = A === void 0 ? {} : A, m = E.effect;
|
|
1655
|
+
if (typeof m == "function") {
|
|
1656
|
+
var _ = m({
|
|
1657
|
+
state: c,
|
|
1658
|
+
name: w,
|
|
1659
|
+
instance: p,
|
|
1660
|
+
options: P
|
|
1661
|
+
}), g = function() {
|
|
1662
|
+
};
|
|
1663
|
+
v.push(_ || g);
|
|
1664
|
+
}
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
function f() {
|
|
1668
|
+
v.forEach(function(E) {
|
|
1669
|
+
return E();
|
|
1670
|
+
}), v = [];
|
|
1671
|
+
}
|
|
1672
|
+
return p;
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
var Rr = [tr, gr, Jn, $n, _r, pr, wr, Zn, hr], At = /* @__PURE__ */ Cr({
|
|
1676
|
+
defaultModifiers: Rr
|
|
1677
|
+
});
|
|
1678
|
+
function ge(t, e, n, r) {
|
|
1679
|
+
e ? (t.classList.remove(r), t.classList.add(n)) : (t.classList.add(r), t.classList.remove(n));
|
|
1680
|
+
}
|
|
1681
|
+
let X;
|
|
1682
|
+
function Vt() {
|
|
1683
|
+
document.removeEventListener("click", X.globalOnClick), document.removeEventListener("keyup", X.globalOnKeypress), X = null;
|
|
1684
|
+
}
|
|
1685
|
+
function Xe() {
|
|
1686
|
+
const t = document.querySelectorAll(
|
|
1687
|
+
`${T(d.UTAH_DESIGN_SYSTEM)} ${T(d.POPUP_WRAPPER)}`
|
|
1688
|
+
);
|
|
1689
|
+
Array.from(t).filter((e) => !e.classList.contains(d.POPUP__HIDDEN)).forEach((e) => {
|
|
1690
|
+
const n = e.getAttribute("id");
|
|
1691
|
+
if (n) {
|
|
1692
|
+
const r = document.querySelector(`[aria-controls="${n}"]`);
|
|
1693
|
+
r && r.setAttribute("aria-expanded", "false");
|
|
1694
|
+
}
|
|
1695
|
+
ge(e, !1, d.POPUP__VISIBLE, d.POPUP__HIDDEN);
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1698
|
+
function Hr() {
|
|
1699
|
+
X && Vt(), X = {}, X.globalOnClick = Xe, document.addEventListener("click", X.globalOnClick), X.globalOnKeypress = (t) => {
|
|
1700
|
+
t.key === "Escape" && Xe();
|
|
1701
|
+
}, document.addEventListener("keyup", X.globalOnKeypress);
|
|
1702
|
+
}
|
|
1703
|
+
function Br() {
|
|
1704
|
+
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
1705
|
+
}
|
|
1706
|
+
function Pe(t, e, n, r, i) {
|
|
1707
|
+
e.setAttribute("aria-expanded", "false"), e.setAttribute("aria-haspopup", r);
|
|
1708
|
+
function o() {
|
|
1709
|
+
(!(i != null && i.isPerformPopup) || i != null && i.isPerformPopup && i.isPerformPopup()) && (At(e, n, {
|
|
1710
|
+
placement: (i == null ? void 0 : i.popupPlacement) || Lt.BOTTOM,
|
|
1711
|
+
modifiers: [
|
|
1712
|
+
{
|
|
1713
|
+
name: "offset",
|
|
1714
|
+
options: { offset: [0, 11] }
|
|
1715
|
+
}
|
|
1716
|
+
]
|
|
1717
|
+
}), ge(n, !0, d.POPUP__VISIBLE, d.POPUP__HIDDEN), e.setAttribute("aria-expanded", "true"));
|
|
1718
|
+
}
|
|
1719
|
+
function a() {
|
|
1720
|
+
(!(i != null && i.isPerformPopup) || i.isPerformPopup()) && (ge(n, !1, d.POPUP__VISIBLE, d.POPUP__HIDDEN), e.setAttribute("aria-expanded", "false"));
|
|
1721
|
+
}
|
|
1722
|
+
if (t.addEventListener("focusin", () => o()), t.addEventListener("focusout", () => a()), i != null && i.shouldFocusOnHover) {
|
|
1723
|
+
let s = NaN, u = NaN;
|
|
1724
|
+
t.addEventListener("mouseenter", () => {
|
|
1725
|
+
clearTimeout(u), clearTimeout(s), s = window.setTimeout(o, 200);
|
|
1726
|
+
}), t.addEventListener("mouseleave", () => {
|
|
1727
|
+
clearTimeout(u), clearTimeout(s), u = window.setTimeout(a, 200);
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
let l = !1;
|
|
1731
|
+
e.onmousedown = (s) => {
|
|
1732
|
+
var u;
|
|
1733
|
+
s.stopPropagation(), (!(i != null && i.isPerformPopup) || i.isPerformPopup()) && (l = ((u = s.currentTarget) == null ? void 0 : u.getAttribute("aria-expanded")) === "true");
|
|
1734
|
+
}, i != null && i.preventOnClickHandling || (e.onclick = (s) => {
|
|
1735
|
+
var u;
|
|
1736
|
+
(!(i != null && i.isPerformPopup) || i.isPerformPopup()) && (s.stopPropagation(), s.preventDefault(), l && e.getAttribute("aria-expanded") === "true" ? (ge(n, !1, d.POPUP__VISIBLE, d.POPUP__HIDDEN), e.setAttribute("aria-expanded", "false"), (u = document.activeElement) == null || u.blur(), l = !1) : (Br() && Xe(), e.setAttribute("aria-expanded", "true"), At(
|
|
1737
|
+
e,
|
|
1738
|
+
n,
|
|
1739
|
+
{
|
|
1740
|
+
placement: "bottom",
|
|
1741
|
+
modifiers: [
|
|
1742
|
+
{
|
|
1743
|
+
name: "offset",
|
|
1744
|
+
options: { offset: [0, 10] }
|
|
1745
|
+
}
|
|
1746
|
+
]
|
|
1747
|
+
}
|
|
1748
|
+
), ge(n, !0, d.POPUP__VISIBLE, d.POPUP__HIDDEN), l = !0)), i != null && i.onClick && i.onClick(s);
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
function se() {
|
|
1752
|
+
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(
|
|
1753
|
+
/[018]/g,
|
|
1754
|
+
// eslint-disable-next-line no-bitwise
|
|
1755
|
+
(t) => (t ^ crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> t) / 4).toString(16)
|
|
1756
|
+
);
|
|
1757
|
+
}
|
|
1758
|
+
const kr = `<div class="popup__wrapper popup__wrapper--hidden">
|
|
1759
|
+
<div class="popup__content">
|
|
1760
|
+
<div class="popup__arrow" data-popper-arrow></div>
|
|
1761
|
+
</div>
|
|
1762
|
+
</div>
|
|
1763
|
+
`;
|
|
1764
|
+
function Wt(t, e) {
|
|
1765
|
+
const n = t.getAttribute("id");
|
|
1766
|
+
if (!n)
|
|
1767
|
+
throw new Error("renderPopup: labelledByElement does not have an `id` attribute");
|
|
1768
|
+
const r = se();
|
|
1769
|
+
t.setAttribute("aria-controls", r);
|
|
1770
|
+
const i = U(kr);
|
|
1771
|
+
if (i.setAttribute("id", r), i.setAttribute("aria-labelledby", n), e != null && e.removePopupArrow) {
|
|
1772
|
+
const o = i.querySelector(T(d.POPUP_ARROW));
|
|
1773
|
+
if (!o)
|
|
1774
|
+
throw new Error("renderPopup(): popup arrow missing (I wanted to remove it!!)");
|
|
1775
|
+
o.remove();
|
|
1776
|
+
}
|
|
1777
|
+
return i;
|
|
1778
|
+
}
|
|
1779
|
+
const Vr = `<span class="utds-icon-before-chevron-right vertical-menu__chevron" aria-hidden="true"></span>
|
|
1780
|
+
`, $t = `<span class="utds-new-tab-link-a11y">
|
|
1781
|
+
<span class="visually-hidden">opens in a new tab</span>
|
|
1782
|
+
<span class="utds-icon-after-external-link" aria-hidden="true"></span>
|
|
1783
|
+
</span>
|
|
1784
|
+
`, Wr = `<ul class="vertical-menu" role="menu" />
|
|
1785
|
+
`, $r = `<li class="vertical-menu__item">
|
|
1786
|
+
<span class="vertical-menu__title">
|
|
1787
|
+
<span class="vertical-menu__plain-title"></span>
|
|
1788
|
+
<a href="#" class="vertical-menu__link-title">
|
|
1789
|
+
<span class="vertical-menu__link-text"></span>
|
|
1790
|
+
</a>
|
|
1791
|
+
<button class="vertical-menu__button-title">
|
|
1792
|
+
<span class="vertical-menu__link-text"></span>
|
|
1793
|
+
</button>
|
|
1794
|
+
</span>
|
|
1795
|
+
<span class="vertical-menu__divider" />
|
|
1796
|
+
</li>
|
|
1797
|
+
`;
|
|
1798
|
+
function He(t, e, n) {
|
|
1799
|
+
var i;
|
|
1800
|
+
let r = !1;
|
|
1801
|
+
return t && (Array.isArray(t) ? r = t.some((o) => He(o, e, n)) : (r = n(t), r || (r = !!((i = e == null ? void 0 : e.filter((o) => t[o])) != null && i.some((o) => He(t[o], e, n)))))), r;
|
|
1802
|
+
}
|
|
1803
|
+
function qr(t) {
|
|
1804
|
+
const e = t.closest("li");
|
|
1805
|
+
if (!e)
|
|
1806
|
+
throw console.error("element", t), new Error("toggleChildMenuExpansion: parent not found for child");
|
|
1807
|
+
e.querySelectorAll(":scope > ul").forEach((n) => {
|
|
1808
|
+
var o;
|
|
1809
|
+
const r = (o = n.closest("li")) == null ? void 0 : o.querySelector(T(d.POPUP_MENU__BUTTON_TITLE));
|
|
1810
|
+
if (!r)
|
|
1811
|
+
throw new Error("toggleChildMenuExpansion: button not found");
|
|
1812
|
+
const i = r.querySelector(`:scope > ${T(d.POPUP_MENU__CHEVRON)}`);
|
|
1813
|
+
if (!i)
|
|
1814
|
+
throw new Error("toggleChildMenuExpansion: chevron not found");
|
|
1815
|
+
n.classList.toggle(d.VISUALLY_HIDDEN), n.classList.contains(d.VISUALLY_HIDDEN) ? (r.setAttribute("aria-expanded", "false"), i.classList.add(d.IS_CLOSED), i.classList.remove(d.IS_OPEN)) : (r.setAttribute("aria-expanded", "true"), i.classList.remove(d.IS_CLOSED), i.classList.add(d.IS_OPEN));
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
function Fr(t) {
|
|
1819
|
+
return (e) => {
|
|
1820
|
+
e.preventDefault(), e.stopPropagation(), qr(t);
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
function Ot() {
|
|
1824
|
+
const t = U(Vr);
|
|
1825
|
+
return t.classList.add(d.IS_CLOSED), t;
|
|
1826
|
+
}
|
|
1827
|
+
function Gr(t, e, n) {
|
|
1828
|
+
var v, b;
|
|
1829
|
+
const r = U($r), i = r.querySelector(T(d.POPUP_MENU__TITLE));
|
|
1830
|
+
if (!i)
|
|
1831
|
+
throw new Error("renderPopupMenuItem: menuItemTitleWrapper not found");
|
|
1832
|
+
const o = (
|
|
1833
|
+
/** @type HTMLElement | null */
|
|
1834
|
+
r.querySelector(T(d.POPUP_MENU__BUTTON_TITLE))
|
|
1835
|
+
);
|
|
1836
|
+
if (!o)
|
|
1837
|
+
throw new Error("renderPopupMenuItem: menuButton not found");
|
|
1838
|
+
const a = (
|
|
1839
|
+
/** @type HTMLElement | null */
|
|
1840
|
+
r.querySelector(T(d.POPUP_MENU__LINK_TITLE))
|
|
1841
|
+
);
|
|
1842
|
+
if (!a)
|
|
1843
|
+
throw new Error("renderPopupMenuItem: aHref not found");
|
|
1844
|
+
const l = (
|
|
1845
|
+
/** @type HTMLElement | null */
|
|
1846
|
+
r.querySelector(T(d.POPUP_MENU__PLAIN_TITLE))
|
|
1847
|
+
);
|
|
1848
|
+
if (!l)
|
|
1849
|
+
throw new Error("renderPopupMenuItem: plainTitle not found");
|
|
1850
|
+
const s = r.querySelector(T(d.POPUP_MENU__DIVIDER));
|
|
1851
|
+
if (!s)
|
|
1852
|
+
throw new Error("renderPopupMenuItem: menuDivider not found");
|
|
1853
|
+
const u = r.querySelector(`button ${T(d.POPUP_MENU__LINK_TEXT)}`);
|
|
1854
|
+
if (!u)
|
|
1855
|
+
throw new Error("renderPopupMenuItem: titleSpanButton not found");
|
|
1856
|
+
const c = r.querySelector(`a ${T(d.POPUP_MENU__LINK_TEXT)}`);
|
|
1857
|
+
if (!c)
|
|
1858
|
+
throw new Error("renderPopupMenuItem: titleSpanLink not found");
|
|
1859
|
+
if (e.actionMenu) {
|
|
1860
|
+
let p;
|
|
1861
|
+
switch (n.childrenMenuType) {
|
|
1862
|
+
case G.FLYOUT: {
|
|
1863
|
+
p = Ot(), o.appendChild(p), o.setAttribute("id", se());
|
|
1864
|
+
const h = We(
|
|
1865
|
+
{
|
|
1866
|
+
menuItems: e.actionMenu,
|
|
1867
|
+
title: e.title
|
|
1868
|
+
},
|
|
1869
|
+
o,
|
|
1870
|
+
{
|
|
1871
|
+
...n,
|
|
1872
|
+
removePopupArrow: !0
|
|
1873
|
+
}
|
|
1874
|
+
);
|
|
1875
|
+
r.appendChild(h), Pe(
|
|
1876
|
+
r,
|
|
1877
|
+
o,
|
|
1878
|
+
h,
|
|
1879
|
+
"menu",
|
|
1880
|
+
{
|
|
1881
|
+
popupPlacement: Lt.RIGHT_START,
|
|
1882
|
+
preventOnClickHandling: !0,
|
|
1883
|
+
shouldFocusOnHover: !0
|
|
1884
|
+
}
|
|
1885
|
+
), a.remove(), l.remove();
|
|
1886
|
+
break;
|
|
1887
|
+
}
|
|
1888
|
+
case G.INLINE: {
|
|
1889
|
+
const h = Ke(
|
|
1890
|
+
e,
|
|
1891
|
+
e.actionMenu,
|
|
1892
|
+
n
|
|
1893
|
+
), f = se();
|
|
1894
|
+
h.setAttribute("id", f), h.classList.add(d.VISUALLY_HIDDEN), r.appendChild(h), o.onclick = Fr(o), o.setAttribute("aria-expanded", "false"), o.setAttribute("aria-controls", f), p = Ot(), o.appendChild(p), a.remove(), l.remove(), r.addEventListener("focusin", (E) => {
|
|
1895
|
+
var w, A, P, m;
|
|
1896
|
+
for (let _ = (
|
|
1897
|
+
/** @type Element | null | undefined */
|
|
1898
|
+
(w = E.target) == null ? void 0 : w.closest("ul")
|
|
1899
|
+
); _; _ = (A = _.parentElement) == null ? void 0 : A.closest("ul"))
|
|
1900
|
+
_.classList.remove(d.VISUALLY_HIDDEN), o.setAttribute("aria-expanded", "true"), E.currentTarget !== o && ((P = p == null ? void 0 : p.classList) == null || P.remove(d.IS_CLOSED), (m = p == null ? void 0 : p.classList) == null || m.add(d.IS_OPEN));
|
|
1901
|
+
});
|
|
1902
|
+
break;
|
|
1903
|
+
}
|
|
1904
|
+
case G.MEGA_MENU: {
|
|
1905
|
+
const h = Ke(
|
|
1906
|
+
e,
|
|
1907
|
+
e.actionMenu,
|
|
1908
|
+
n
|
|
1909
|
+
), f = se();
|
|
1910
|
+
h.setAttribute("id", f), r.appendChild(h), a.remove(), o.remove(), l.appendChild(document.createTextNode(e.title));
|
|
1911
|
+
break;
|
|
1912
|
+
}
|
|
1913
|
+
default:
|
|
1914
|
+
throw new Error(`renderPopupMenuItem: childrenMenuType unknown '${e.actionMenu}'`);
|
|
1915
|
+
}
|
|
1916
|
+
s.remove();
|
|
1917
|
+
} else if (e.actionFunction)
|
|
1918
|
+
o.onclick = e.actionFunction, a.remove(), s.remove(), l.remove();
|
|
1919
|
+
else if (e.actionUrl)
|
|
1920
|
+
a.setAttribute("href", e.actionUrl.url), o.remove(), s.remove(), l.remove();
|
|
1921
|
+
else if (e.actionFunctionUrl)
|
|
1922
|
+
a.setAttribute("href", e.actionFunctionUrl.url), a.onclick = (p) => {
|
|
1923
|
+
var h, f;
|
|
1924
|
+
(h = e.actionFunctionUrl) != null && h.skipHandleEvent || (p.stopPropagation(), p.preventDefault()), (f = e.actionFunctionUrl) == null || f.actionFunction(p);
|
|
1925
|
+
}, o.remove(), s.remove(), l.remove();
|
|
1926
|
+
else if (e.isDivider)
|
|
1927
|
+
i.remove(), r.setAttribute("aria-hidden", "true"), r.setAttribute("role", "separator");
|
|
1928
|
+
else
|
|
1929
|
+
throw console.error(e), new Error("renderPopupMenuItem: popupMenuItem must have either actionMenu, actionFunction, actionUrl, or isDivider (popupMenuItem.title)");
|
|
1930
|
+
if (!e.isDivider && (u.appendChild(document.createTextNode(e.title)), c.appendChild(document.createTextNode(e.title)), (v = e.actionUrl) != null && v.openInNewTab || (b = e.actionFunctionUrl) != null && b.openInNewTab)) {
|
|
1931
|
+
a.setAttribute("target", "_blank");
|
|
1932
|
+
const p = U($t);
|
|
1933
|
+
u.appendChild(p), c.appendChild(p);
|
|
1934
|
+
}
|
|
1935
|
+
return (e.isSelected || e.actionMenu && He(e.actionMenu, ["actionMenu"], (p) => !!p.isSelected)) && (o.classList.add(d.MENU_ITEM__SELECTED), a.classList.add(d.MENU_ITEM__SELECTED)), V(t, r), r;
|
|
1936
|
+
}
|
|
1937
|
+
function Ke(t, e, n) {
|
|
1938
|
+
const r = U(Wr);
|
|
1939
|
+
return e.forEach((i) => Gr(r, i, n)), r;
|
|
1940
|
+
}
|
|
1941
|
+
function We(t, e, n) {
|
|
1942
|
+
const r = Wt(e, { removePopupArrow: n.removePopupArrow }), i = r.querySelector(T(d.POPUP_CONTENT_WRAPPER));
|
|
1943
|
+
if (!i)
|
|
1944
|
+
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
1945
|
+
const o = Ke(t, t.menuItems, n);
|
|
1946
|
+
return o.setAttribute("aria-label", t.title), i.appendChild(o), r;
|
|
1947
|
+
}
|
|
1948
|
+
const jr = `<div class="utds-header-action-item">
|
|
1949
|
+
<button type="button" class="icon-button utds-header-action-item__icon-button">
|
|
1950
|
+
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
1951
|
+
</button>
|
|
1952
|
+
</div>
|
|
1953
|
+
`, zr = `<div class="utds-badge__wrapper">
|
|
1954
|
+
<span class="utds-badge__value"></span>
|
|
1955
|
+
<span class="utds-badge__label visually-hidden"></span>
|
|
1956
|
+
</div>
|
|
1957
|
+
`;
|
|
1958
|
+
function Yr(t) {
|
|
1959
|
+
let e = null;
|
|
1960
|
+
if (t.badge) {
|
|
1961
|
+
e = /** @type {HTMLElement} */
|
|
1962
|
+
U(zr), e.classList.add(d.BADGE_WRAPPER__ACTION_ITEM);
|
|
1963
|
+
const n = e.querySelector(T(d.BADGE__LABEL));
|
|
1964
|
+
if (!n)
|
|
1965
|
+
throw new Error("renderActionItemBadge: badgeLabel not found");
|
|
1966
|
+
if (n.appendChild(document.createTextNode(t.badge.label)), t.badge.value || t.badge.value === 0) {
|
|
1967
|
+
const r = e.querySelector(T(d.BADGE__VALUE));
|
|
1968
|
+
if (!r)
|
|
1969
|
+
throw new Error("renderActionItemBadge: badgeValue not found");
|
|
1970
|
+
r.appendChild(document.createTextNode(`${t.badge.value}`));
|
|
1971
|
+
} else
|
|
1972
|
+
e.classList.add(d.BADGE_WRAPPER__SMALL);
|
|
1973
|
+
t.badge.className && e.classList.add(t.badge.className);
|
|
1974
|
+
}
|
|
1975
|
+
return e;
|
|
1976
|
+
}
|
|
1977
|
+
function Zr(t) {
|
|
1978
|
+
const e = U(jr), n = document.createTextNode(t.title), r = (
|
|
1979
|
+
/** @type {HTMLElement} */
|
|
1980
|
+
e instanceof HTMLCollection ? e[0] : e
|
|
1981
|
+
);
|
|
1982
|
+
t.showTitle && r.classList.add(d.ACTION_ITEM__ICON_BUTTON_TITLE);
|
|
1983
|
+
const i = r.querySelector(T(d.ACTION_ITEM__TITLE));
|
|
1984
|
+
if (!i)
|
|
1985
|
+
throw new Error("renderActionItem: titleDiv not found");
|
|
1986
|
+
V(i, n), t.showTitle ? i.classList.remove(d.VISUALLY_HIDDEN) : i.classList.add(d.VISUALLY_HIDDEN);
|
|
1987
|
+
const o = e.querySelector(T(d.ACTION_ITEM__ICON_BUTTON));
|
|
1988
|
+
if (!o)
|
|
1989
|
+
throw new Error("renderActionItem: iconButton not found");
|
|
1990
|
+
t.className && o.classList.add(t.className);
|
|
1991
|
+
const a = Yr(t);
|
|
1992
|
+
a && o.appendChild(a);
|
|
1993
|
+
const l = U(t.icon);
|
|
1994
|
+
if (l.setAttribute("role", "presentation"), V(o, l), !(o instanceof HTMLElement))
|
|
1995
|
+
throw new Error("renderActionItem: iconButton is not an HTMLElement");
|
|
1996
|
+
if (t.actionFunction)
|
|
1997
|
+
o.onclick = t.actionFunction;
|
|
1998
|
+
else if (t.actionDom) {
|
|
1999
|
+
const s = se();
|
|
2000
|
+
o.setAttribute("id", s);
|
|
2001
|
+
const u = Wt(o), c = (
|
|
2002
|
+
/** @type {HTMLElement} */
|
|
2003
|
+
u.querySelector(T(d.POPUP_CONTENT_WRAPPER))
|
|
2004
|
+
);
|
|
2005
|
+
if (!c)
|
|
2006
|
+
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
2007
|
+
c.appendChild(t.actionDom), e.appendChild(u), Pe(r, o, u, "dialog", void 0);
|
|
2008
|
+
} else if (t.actionPopupMenu) {
|
|
2009
|
+
const s = se();
|
|
2010
|
+
o.setAttribute("id", s);
|
|
2011
|
+
const u = We(
|
|
2012
|
+
/** @type {PopupMenu} */
|
|
2013
|
+
t.actionPopupMenu,
|
|
2014
|
+
o,
|
|
2015
|
+
{ childrenMenuType: G.INLINE }
|
|
2016
|
+
);
|
|
2017
|
+
V(e, u), Pe(r, o, u, "menu", void 0);
|
|
2018
|
+
} else
|
|
2019
|
+
throw console.error(t), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
2020
|
+
return e;
|
|
2021
|
+
}
|
|
2022
|
+
function Xr() {
|
|
2023
|
+
var n, r;
|
|
2024
|
+
const { actionItems: t } = S();
|
|
2025
|
+
let e = null;
|
|
2026
|
+
return t != null && t.length && (e = Be(In), (r = (n = S().actionItems) == null ? void 0 : n.map((i) => Zr(i))) == null || r.forEach((i) => V(e, i))), e;
|
|
2027
|
+
}
|
|
2028
|
+
const Ce = {
|
|
2029
|
+
PROFILE: "https://id.utah.gov",
|
|
2030
|
+
SIGN_IN: `https://id.utah.gov/login?goto=${window.location}`,
|
|
2031
|
+
SIGN_OUT: `https://id.utah.gov/logout?goto=${window.location}`,
|
|
2032
|
+
USER_INFO: "https://id.utah.gov/api/userInfo"
|
|
2033
|
+
};
|
|
2034
|
+
function Kr(t) {
|
|
2035
|
+
let e = NaN, n = null, r = null;
|
|
2036
|
+
return {
|
|
2037
|
+
promise: new Promise((o, a) => {
|
|
2038
|
+
e = setTimeout(
|
|
2039
|
+
() => {
|
|
2040
|
+
e = NaN, o();
|
|
2041
|
+
},
|
|
2042
|
+
t
|
|
2043
|
+
), n = o, r = a;
|
|
2044
|
+
}),
|
|
2045
|
+
clearTimeout: (o) => {
|
|
2046
|
+
e && (clearTimeout(e), e = NaN, o(n, r));
|
|
2047
|
+
}
|
|
2048
|
+
};
|
|
2049
|
+
}
|
|
2050
|
+
const Y = {
|
|
2051
|
+
// null = not yet loaded, false = ajaxing, true = have a result (may be error or user data)
|
|
2052
|
+
isDefinitive: null,
|
|
2053
|
+
lastError: null,
|
|
2054
|
+
userInfo: null
|
|
2055
|
+
};
|
|
2056
|
+
function Mt(t) {
|
|
2057
|
+
var e, n, r;
|
|
2058
|
+
t.isDefinitive && (qt(t), (r = (n = (e = S()) == null ? void 0 : e.utahId) == null ? void 0 : n.onAuthChanged) == null || r.call(n, t));
|
|
2059
|
+
}
|
|
2060
|
+
let It = !0;
|
|
2061
|
+
const Qr = 500;
|
|
2062
|
+
async function it() {
|
|
2063
|
+
var e, n;
|
|
2064
|
+
let t = null;
|
|
2065
|
+
if (Y.isDefinitive === !1)
|
|
2066
|
+
t = Promise.resolve(Y);
|
|
2067
|
+
else if (It)
|
|
2068
|
+
t = Kr(Qr).promise.then(() => {
|
|
2069
|
+
It = !1, it();
|
|
2070
|
+
});
|
|
2071
|
+
else {
|
|
2072
|
+
const r = S();
|
|
2073
|
+
if (r.utahId === !1)
|
|
2074
|
+
t = Promise.resolve({
|
|
2075
|
+
isDefinitive: !0,
|
|
2076
|
+
lastError: "Utah ID is off",
|
|
2077
|
+
userInfo: null
|
|
2078
|
+
});
|
|
2079
|
+
else if (r.utahId === !0 || ((e = r.utahId) == null ? void 0 : e.currentUser) === void 0)
|
|
2080
|
+
Y.isDefinitive = !1, t = fetch(Ce.USER_INFO, { credentials: "include" }).then((i) => i.json()).then((i) => {
|
|
2081
|
+
if (i.status === 200)
|
|
2082
|
+
Y.lastError = null, Y.userInfo = /** @type UserInfo */
|
|
2083
|
+
i.data;
|
|
2084
|
+
else
|
|
2085
|
+
throw new Error(i.err);
|
|
2086
|
+
}).catch((i) => {
|
|
2087
|
+
Y.lastError = i, Y.userInfo = null;
|
|
2088
|
+
}).finally(() => {
|
|
2089
|
+
Y.isDefinitive = !0, Mt(Y);
|
|
2090
|
+
});
|
|
2091
|
+
else {
|
|
2092
|
+
const i = {
|
|
2093
|
+
isDefinitive: !0,
|
|
2094
|
+
lastError: null,
|
|
2095
|
+
userInfo: (n = r.utahId) == null ? void 0 : n.currentUser
|
|
2096
|
+
};
|
|
2097
|
+
t = Promise.resolve(i), Mt(i);
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
return t;
|
|
2101
|
+
}
|
|
2102
|
+
function Jr() {
|
|
2103
|
+
return Y;
|
|
2104
|
+
}
|
|
2105
|
+
const ei = `<div class="utds-utah-id-wrapper">
|
|
2106
|
+
<button class="utds-utah-id__button button--solid" id="utds-utah-id-button" type="button">UtahID Sign In</button>
|
|
2107
|
+
</div>
|
|
2108
|
+
`;
|
|
2109
|
+
let C = null, M = null, de = null;
|
|
2110
|
+
function qt(t) {
|
|
2111
|
+
var e;
|
|
2112
|
+
if (M = t, C) {
|
|
2113
|
+
if (C.innerHTML = "", M != null && M.userInfo && ((e = M.userInfo) != null && e.authenticated)) {
|
|
2114
|
+
const n = document.createElement("span");
|
|
2115
|
+
n.appendChild(document.createTextNode("UtahID Account:")), n.classList.add(d.VISUALLY_HIDDEN), C.appendChild(n), C.appendChild(document.createTextNode(`Hello, ${M.userInfo.first || ""}`));
|
|
2116
|
+
} else
|
|
2117
|
+
C.appendChild(document.createTextNode("UtahID Sign In"));
|
|
2118
|
+
Ft();
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
function Ft() {
|
|
2122
|
+
var t;
|
|
2123
|
+
C && de && (!!(M != null && M.isDefinitive) && !!((t = M == null ? void 0 : M.userInfo) != null && t.authenticated) ? (C.setAttribute("aria-haspopup", "menu"), C.setAttribute("aria-expanded", "false"), de.removeAttribute("aria-hidden")) : (C.removeAttribute("aria-haspopup"), C.removeAttribute("aria-expanded"), de.setAttribute("aria-hidden", "true")));
|
|
2124
|
+
}
|
|
2125
|
+
function ti() {
|
|
2126
|
+
var l;
|
|
2127
|
+
const t = S(), e = t.utahId !== !1 && t.utahId !== !0 && t.utahId.onProfile, n = t.utahId !== !1 && t.utahId !== !0 && t.utahId.onSignIn, r = t.utahId !== !1 && t.utahId !== !0 && t.utahId.onSignOut, i = t.utahId !== !0 && t.utahId !== !1 && ((l = t.utahId) == null ? void 0 : l.menuItems) || [];
|
|
2128
|
+
i.length && i.push({
|
|
2129
|
+
isDivider: !0,
|
|
2130
|
+
title: "--divider--"
|
|
2131
|
+
});
|
|
2132
|
+
const o = {
|
|
2133
|
+
menuItems: [
|
|
2134
|
+
...i,
|
|
2135
|
+
{
|
|
2136
|
+
actionUrl: e ? void 0 : { url: Ce.PROFILE, openInNewTab: !0 },
|
|
2137
|
+
actionFunction: e || void 0,
|
|
2138
|
+
className: "external-link",
|
|
2139
|
+
title: "UtahID Profile"
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
actionUrl: r ? void 0 : { url: Ce.SIGN_OUT },
|
|
2143
|
+
actionFunction: r || void 0,
|
|
2144
|
+
title: "Sign Out"
|
|
2145
|
+
}
|
|
2146
|
+
],
|
|
2147
|
+
title: "Utah Id Menu"
|
|
2148
|
+
}, a = U(ei);
|
|
2149
|
+
if (!a)
|
|
2150
|
+
throw new Error("UtahId: utahIdWrapper not found");
|
|
2151
|
+
if (C = /** @type HTMLElement */
|
|
2152
|
+
a.querySelector(T(d.UTAH_ID__BUTTON)), !C)
|
|
2153
|
+
throw new Error("UtahId: utahIdButton not found");
|
|
2154
|
+
return de = We(o, C, { childrenMenuType: G.INLINE }), a.appendChild(de), Ft(), Pe(
|
|
2155
|
+
a,
|
|
2156
|
+
C,
|
|
2157
|
+
de,
|
|
2158
|
+
"menu",
|
|
2159
|
+
{
|
|
2160
|
+
isPerformPopup: () => {
|
|
2161
|
+
var s;
|
|
2162
|
+
return !!(M != null && M.isDefinitive) && !!((s = M == null ? void 0 : M.userInfo) != null && s.authenticated);
|
|
2163
|
+
},
|
|
2164
|
+
onClick: (s) => {
|
|
2165
|
+
var u;
|
|
2166
|
+
(!(M != null && M.isDefinitive) || !((u = M == null ? void 0 : M.userInfo) != null && u.authenticated)) && (n ? n(s) : (s.preventDefault(), s.stopPropagation(), window.location.href = Ce.SIGN_IN));
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
), it(), qt(Jr()), a;
|
|
2170
|
+
}
|
|
2171
|
+
const ni = `<div class="utds-citizen-experience-wrapper"></div>
|
|
2172
|
+
`;
|
|
2173
|
+
function ri() {
|
|
2174
|
+
const t = U(ni), e = Xr();
|
|
2175
|
+
return e && V(t, e), S().utahId !== !1 && V(t, ti()), t;
|
|
2176
|
+
}
|
|
2177
|
+
const ii = `<h1 class="utds-logo-wrapper"></h1>
|
|
2178
|
+
`;
|
|
2179
|
+
function oi() {
|
|
2180
|
+
var n;
|
|
2181
|
+
const t = U(On);
|
|
2182
|
+
t.classList.add(`utds-header--${((n = S().size) == null ? void 0 : n.toLowerCase()) || ue.MEDIUM}`);
|
|
2183
|
+
const e = U(ii);
|
|
2184
|
+
return t.appendChild(e), V(e, An()), V(e, Be(Mn)), V(e, wn()), V(t, ri()), t;
|
|
2185
|
+
}
|
|
2186
|
+
const ai = `<li class="menu-item">
|
|
2187
|
+
<span class="menu-item__title">
|
|
2188
|
+
<button class="menu-item__button-title" type="button"></button>
|
|
2189
|
+
<a class="menu-item__link-title"></a>
|
|
2190
|
+
<span class="menu-chiclet"></span>
|
|
2191
|
+
</span>
|
|
2192
|
+
</li>
|
|
2193
|
+
`, si = `<div class="utah-design-system main-menu__outer">
|
|
2194
|
+
<div class="main-menu__wrapper">
|
|
2195
|
+
<nav class="horizontal-menu main-menu__nav">
|
|
2196
|
+
<h2 class="main-menu__title visually-hidden"></h2>
|
|
2197
|
+
<ul class="main-menu__menu-top"></ul>
|
|
2198
|
+
</nav>
|
|
2199
|
+
<button type="button" class="button icon-button icon-button--borderless main-menu__search">
|
|
2200
|
+
<div>
|
|
2201
|
+
<span class="utds-icon-before-search" aria-hidden="true"></span>
|
|
2202
|
+
<span class="visually-hidden">search</span>
|
|
2203
|
+
</div>
|
|
2204
|
+
</button>
|
|
2205
|
+
</div>
|
|
2206
|
+
</div>
|
|
2207
|
+
`;
|
|
2208
|
+
function li() {
|
|
2209
|
+
const t = S();
|
|
2210
|
+
let e = null;
|
|
2211
|
+
if (t.mainMenu) {
|
|
2212
|
+
e = U(si);
|
|
2213
|
+
const n = e.querySelector(T(d.MAIN_MENU__NAV));
|
|
2214
|
+
if (!n)
|
|
2215
|
+
throw new Error("renderMainMenu(): mainMenu not created");
|
|
2216
|
+
const r = n.querySelector(T(d.MAIN_MENU__TITLE));
|
|
2217
|
+
if (!r)
|
|
2218
|
+
throw new Error("renderMainMenu(): titleTag not found");
|
|
2219
|
+
const i = "main-menu__nav";
|
|
2220
|
+
n.setAttribute("aria-labelledby", i), r.setAttribute("id", i), r.innerHTML = t.mainMenu.title;
|
|
2221
|
+
const o = n.querySelector(T(d.MAIN_MENU__MENU_TOP));
|
|
2222
|
+
if (!o)
|
|
2223
|
+
throw new Error("renderMainMenu(): mainMenuTop not found");
|
|
2224
|
+
t.mainMenu.menuItems.forEach((a) => {
|
|
2225
|
+
var v, b;
|
|
2226
|
+
const l = U(ai);
|
|
2227
|
+
o.appendChild(l);
|
|
2228
|
+
const s = l.querySelector(T(d.MENU_ITEM__TITLE));
|
|
2229
|
+
if (!s)
|
|
2230
|
+
throw new Error(`renderMainMenu(): sub menu title not found for ${a.title}`);
|
|
2231
|
+
const u = (
|
|
2232
|
+
/** @type {HTMLElement} */
|
|
2233
|
+
s.querySelector(T(d.MENU_ITEM__BUTTON_TITLE))
|
|
2234
|
+
);
|
|
2235
|
+
if (!u)
|
|
2236
|
+
throw new Error(`renderMainMenu(): button title not found for ${a.title}`);
|
|
2237
|
+
u.setAttribute("id", `${d.MENU_ITEM__BUTTON_TITLE}__${a.title}-${se()}`);
|
|
2238
|
+
const c = (
|
|
2239
|
+
/** @type {HTMLElement} */
|
|
2240
|
+
s.querySelector(T(d.MENU_ITEM__LINK_TITLE))
|
|
2241
|
+
);
|
|
2242
|
+
if (!c)
|
|
2243
|
+
throw new Error(`renderMainMenu(): link title not found for ${a.title}`);
|
|
2244
|
+
if ((a.isSelected || a.actionMenu && He(a.actionMenu, ["actionMenu"], (p) => !!p.isSelected)) && (u.classList.add(d.MENU_ITEM__SELECTED), c.classList.add(d.MENU_ITEM__SELECTED)), a.actionMenu) {
|
|
2245
|
+
u.innerHTML = a.title, c.remove();
|
|
2246
|
+
const p = {
|
|
2247
|
+
menuItems: a.actionMenu,
|
|
2248
|
+
title: a.title
|
|
2249
|
+
}, h = We(
|
|
2250
|
+
p,
|
|
2251
|
+
u,
|
|
2252
|
+
{
|
|
2253
|
+
childrenMenuType: a.childrenMenuType || G.FLYOUT
|
|
2254
|
+
}
|
|
2255
|
+
);
|
|
2256
|
+
l.appendChild(h), Pe(l, u, h, "menu", { shouldFocusOnHover: !0 });
|
|
2257
|
+
let f;
|
|
2258
|
+
switch (a.childrenMenuType) {
|
|
2259
|
+
case G.INLINE:
|
|
2260
|
+
f = d.MENU_ITEM__INLINE;
|
|
2261
|
+
break;
|
|
2262
|
+
case G.MEGA_MENU:
|
|
2263
|
+
f = d.MENU_ITEM__MEGA_MENU;
|
|
2264
|
+
break;
|
|
2265
|
+
case G.FLYOUT:
|
|
2266
|
+
default:
|
|
2267
|
+
f = d.MENU_ITEM__FLY_OUT;
|
|
2268
|
+
break;
|
|
2269
|
+
}
|
|
2270
|
+
l.classList.add(f);
|
|
2271
|
+
} else if (a.actionFunction)
|
|
2272
|
+
u.innerHTML = a.title, u.onclick = a.actionFunction, c.remove();
|
|
2273
|
+
else if (a.actionFunctionUrl)
|
|
2274
|
+
c.innerHTML = a.title, c.setAttribute("href", a.actionFunctionUrl.url), c.onclick = (p) => {
|
|
2275
|
+
var h, f;
|
|
2276
|
+
(h = a.actionFunctionUrl) != null && h.skipHandleEvent || (p.stopPropagation(), p.preventDefault()), (f = a.actionFunctionUrl) == null || f.actionFunction(p);
|
|
2277
|
+
}, u.remove();
|
|
2278
|
+
else if (a.actionUrl)
|
|
2279
|
+
c.innerHTML = a.title, c.setAttribute("href", a.actionUrl.url), u.remove();
|
|
2280
|
+
else
|
|
2281
|
+
throw new Error(`renderMainMenu(): menuItem is missing an action: ${a.title}`);
|
|
2282
|
+
((v = a.actionUrl) != null && v.openInNewTab || (b = a.actionFunctionUrl) != null && b.openInNewTab) && (c.setAttribute("target", "_blank"), c.appendChild(U($t)));
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
return e;
|
|
2286
|
+
}
|
|
2287
|
+
function ci() {
|
|
2288
|
+
const t = hn.replace(d.MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER, `${S().mediaSizes.tabletPortrait}px`).replace(d.MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER, `${S().mediaSizes.tabletLandscape}px`).replace(d.MEDIA_SIZE__MOBILE__PLACEHOLDER, `${S().mediaSizes.mobile}px`);
|
|
2289
|
+
let e = document.getElementById(d.CSS_HEADER_MEDIA_TAG_ID);
|
|
2290
|
+
e || (e = document.createElement("style"), e.id = d.CSS_HEADER_MEDIA_TAG_ID), e.innerHTML = t, document.body.appendChild(e);
|
|
2291
|
+
}
|
|
2292
|
+
function ui() {
|
|
2293
|
+
if (!document.querySelector(T([d.UTAH_DESIGN_SYSTEM, d.HEADER]))) {
|
|
2294
|
+
const e = oi();
|
|
2295
|
+
document.body.insertBefore(e, document.body.firstChild);
|
|
2296
|
+
const n = li();
|
|
2297
|
+
n && e.after(n), Hr(), setTimeout(() => document.dispatchEvent(new Event(Nt.HEADER_LOADED)), 0), ci(), it();
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
function fi() {
|
|
2301
|
+
var t, e;
|
|
2302
|
+
(t = document.querySelector(T([d.UTAH_DESIGN_SYSTEM, d.HEADER]))) == null || t.remove(), (e = document.querySelector(T([d.UTAH_DESIGN_SYSTEM, d.MAIN_MENU__OUTER]))) == null || e.remove(), Vt(), setTimeout(() => document.dispatchEvent(new Event(Nt.HEADER_UNLOADED)), 0);
|
|
2303
|
+
}
|
|
2304
|
+
const di = pn.version.replace(/\./g, "");
|
|
2305
|
+
console.log(`Utah Header v${di}`);
|
|
2306
|
+
export {
|
|
2307
|
+
fn as baseSettings,
|
|
2308
|
+
G as childrenMenuTypes,
|
|
2309
|
+
Nt as events,
|
|
2310
|
+
S as getUtahHeaderSettings,
|
|
2311
|
+
ui as loadHeader,
|
|
2312
|
+
Lt as popupPlacement,
|
|
2313
|
+
fi as removeHeader,
|
|
2314
|
+
Be as renderDOM,
|
|
2315
|
+
pi as setUtahHeaderSettings,
|
|
2316
|
+
ue as sizes
|
|
2317
|
+
};
|