@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.
@@ -0,0 +1,124 @@
1
+ (function(D,Le){typeof exports=="object"&&typeof module<"u"?Le(exports):typeof define=="function"&&define.amd?define(["exports"],Le):(D=typeof globalThis<"u"?globalThis:D||self,Le(D["@utahdts/utah-design-system-header"]={}))})(this,function(D){"use strict";const Zt={name:"@utahdts/utah-design-system-header",version:"0.1.0",description:"Utah Header for the Utah Design System",main:"dist/utah-design-system-header.umd.js",module:"dist/utah-design-system-header.es.js",files:["src/css","dist"],scripts:{test:"vitest run",build:"vite build",watch:"vite build --watch","sass-build":"sass --no-source-map ./src/css/index.scss ./src/css/build/utah-design-system-header.css","test-publish":"npm publish --dry-run"},repository:{type:"git",url:"git+https://github.com/utahdts/utah-design-system.git"},license:"Apache-2.0",bugs:{url:"https://github.com/utahdts/utah-design-system/issues"},homepage:"https://github.com/utahdts/utah-design-system#readme",dependencies:{"@popperjs/core":"2.11.6"},devDependencies:{eslint:"8.35.0","eslint-config-airbnb":"19.0.4","eslint-plugin-import":"2.27.5","eslint-plugin-jsx-a11y":"6.7.1",sass:"1.58.3",vite:"4.1.4","vite-plugin-eslint":"1.8.1",vitest:"0.29.1"},type:"module"},fi="",Fe={AUTO:"auto",AUTO_START:"auto-start",AUTO_END:"auto-end",BOTTOM:"bottom",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end",LEFT:"left",LEFT_START:"left-start",LEFT_END:"left-end",RIGHT:"right",RIGHT_START:"right-start",RIGHT_END:"right-end",TOP:"top",TOP_START:"top-start",TOP_END:"top-end"},te={SMALL:"SMALL",MEDIUM:"MEDIUM",LARGE:"LARGE"},ct={mediaSizes:{mobile:640,tabletPortrait:768,tabletLandscape:1024},showTitle:!0,size:te.MEDIUM,title:"Utah Design System",titleURL:"/",utahId:!0},W={FLYOUT:"flyout",INLINE:"inline",MEGA_MENU:"mega-menu"},Ge={HEADER_LOADED:"utahHeaderLoaded",HEADER_UNLOADED:"utahHeaderUnloaded"};function je(t){return typeof t=="string"||t instanceof String}function _e(t){const e=new DOMParser;let n;if(je(t)){const r=je(t)?e.parseFromString(t,"text/html"):t,i=r.body.children.length>1?r.body.children:r.body.children.item(0);if(!i)throw console.error(t),new Error("renderDOM: nothing rendered");n=i}else if(t instanceof Element)n=t;else 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");return n}function U(t){const e=_e(t);if(e instanceof HTMLCollection&&e.length>1)throw new Error("renderDOMSingle: must render a single element");const n=e instanceof HTMLCollection?e[0]:e;if(!n)throw console.error(t),new Error("renderDOMSingle: nothing rendered");return n}const Xt=`/* @media is never in scope for --variables, so this is the only way to solve this. :-( */
2
+
3
+ @media screen and (max-width: media-size__tablet-landscape__PLACEHOLDER) {
4
+ /* put your media query here for tablet landscape */
5
+ }
6
+
7
+ @media screen and (max-width: media-size__tablet-portrait__PLACEHOLDER) {
8
+ .utds-header {
9
+ height: 60px;
10
+ padding: var(--spacing-xs) var(--spacing);
11
+ }
12
+ .utds-title-wrapper {
13
+ font-size: var(--font-size-xl);
14
+ }
15
+ .utds-citizen-experience-wrapper {
16
+ display: none;
17
+ }
18
+ .utah-design-system .main-menu__nav {
19
+ display: none;
20
+ }
21
+ }
22
+
23
+ @media screen and (max-width: media-size__mobile__PLACEHOLDER) {
24
+ /* put your media query here for mobile */
25
+ }
26
+ `;function b(t){return`.${(Array.isArray(t)?t:[t]).join(".")}`}const d={UTAH_DESIGN_SYSTEM:"utah-design-system",HEADER:"utds-header",ICON_BUTTON:"icon-button",CSS_HEADER_MEDIA_TAG_ID:"cssHeaderMediaTag",IS_CLOSED:"is-closed",IS_OPEN:"is-open",VISUALLY_HIDDEN:"visually-hidden",MEDIA_SIZE__MOBILE__PLACEHOLDER:"media-size__mobile__PLACEHOLDER",MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER:"media-size__tablet-landscape__PLACEHOLDER",MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER:"media-size__tablet-portrait__PLACEHOLDER",ACTION_ITEM:"utds-header-action-item",ACTION_ITEM__ICON_BUTTON:"utds-header-action-item__icon-button",ACTION_ITEM__ICON_BUTTON_TITLE:"utds-header-action-item__icon-button--has-title",ACTION_ITEM__TITLE:"utds-header-action-item__title",BADGE__LABEL:"utds-badge__label",BADGE__VALUE:"utds-badge__value",BADGE_WRAPPER:"utds-badge__wrapper",BADGE_WRAPPER__SMALL:"utds-badge__wrapper--small",BADGE_WRAPPER__ACTION_ITEM:"utds-badge__wrapper--action-item",CITIZEN_EXPERIENCE:"utds-citizen-experience-wrapper",LOGO_SVG:"utah-logo-svg",LOGO_VERT_LINE:"utds-logo-vert-line",LOGO:"utds-logo-wrapper",MAIN_MENU:"main-menu__wrapper",MAIN_MENU__MENU_TOP:"main-menu__menu-top",MAIN_MENU__NAV:"main-menu__nav",MAIN_MENU__OUTER:"main-menu__outer",MAIN_MENU__SEARCH:"main-menu__search",MAIN_MENU__TITLE:"main-menu__title",MENU_ITEM:"menu-item",MENU_ITEM__BUTTON_TITLE:"menu-item__button-title",MENU_ITEM__LINK_TITLE:"menu-item__link-title",MENU_ITEM__SELECTED:"menu-item--selected",MENU_ITEM__TITLE:"menu-item__title",MENU_ITEM__FLY_OUT:"menu-item--fly_out",MENU_ITEM__INLINE:"menu-item--inline",MENU_ITEM__MEGA_MENU:"menu-item--mega-menu",POPUP_MENU:"vertical-menu",POPUP_MENU__BUTTON_TITLE:"vertical-menu__button-title",POPUP_MENU__CHEVRON:"vertical-menu__chevron",POPUP_MENU__DIVIDER:"vertical-menu__divider",POPUP_MENU__LINK_TEXT:"vertical-menu__link-text",POPUP_MENU__LINK_TITLE:"vertical-menu__link-title",POPUP_MENU__PLAIN_TITLE:"vertical-menu__plain-title",POPUP_MENU__TITLE:"vertical-menu__title",POPUP__HIDDEN:"popup__wrapper--hidden",POPUP__VISIBLE:"popup__wrapper--visible",POPUP__WRAPPER:"popup__wrapper",EXTERNAL_LINK:"utds-icon-after-external-link",EXTERNAL_LINK__NEW_TAB:"utds-new-tab-link-a11y",POPUP_ARROW:"popup__arrow",POPUP_CONTENT_WRAPPER:"popup__content",POPUP_WRAPPER:"popup__wrapper",SIZE__LARGE:"large",SIZE__MEDIUM:"medium",TITLE:"utds-title-wrapper",TITLE__LOGO:"utds-title-wrapper__logo",TITLE__TITLE:"utds-title-wrapper__title",UTAH_ID:"utds-utah-id-wrapper",UTAH_ID__BUTTON:"utds-utah-id__button"},Kt=`<span class="utds-icon-before-waffle" aria-hidden="true" />
27
+ `,Qt=`<span class="utds-icon-before-help" aria-hidden="true" />
28
+ `;let Ne={...{actionItems:[{actionPopupMenu:{menuItems:[{actionUrl:{url:"https://google.com?search=how realisitic can you be"},title:"Item #1"},{actionUrl:{url:"https://utah.gov",openInNewTab:!0},title:"Utah.Gov"},{actionFunction:t=>{t.stopPropagation(),t.preventDefault(),console.log("Custom menu item triggered")},title:"Custom menu item"},{actionMenu:[{title:"i am a child",actionMenu:[{title:"i am a child",actionUrl:{url:"https://dts.utah.gov"}},{title:"i am a child 2oo",actionUrl:{url:"https://dts.utah.gov/2"}}]},{title:"i am a child 2oo",actionMenu:[{title:"i am a child2",actionUrl:{url:"https://dts.utah.gov"}},{title:"i am a child 2oo2",actionUrl:{url:"https://dts.utah.gov/2"}}]}],title:"I have children!!"}],title:"Divisions Menu"},className:"icon-waffle",icon:Kt,showTitle:!0,title:"Divisions"},{actionFunction:()=>console.log("Alerts clicked"),badge:{label:"Unread Alert",value:1},icon:`<span class="utds-icon-before-alert" aria-hidden="true" />
29
+ `,showTitle:!1,title:"Alerts"},{actionDom:(()=>{const t=document.createElement("div");t.appendChild(document.createTextNode("Hello World!"));const e=document.createElement("button");return e.appendChild(document.createTextNode("Do not press me.")),t.appendChild(e),t})(),badge:{label:"Help Items Available"},icon:Qt,showTitle:!1,title:"Help"}],mediaSizes:{mobile:640,tabletPortrait:768,tabletLandscape:1024},showTitle:!0,size:te.MEDIUM,title:"Utah Design System",titleURL:"/",utahId:!0,mainMenu:{menuItems:[{actionUrl:{url:"/"},title:"Home"},{actionUrl:{url:"#"},title:"Link to Somewhere"},{isSelected:!0,actionFunction:()=>alert("hello yous guy"),title:"do func"},{actionMenu:[{title:"Guidelines and Standards",actionUrl:{url:"/guidelines"}}],title:"Guidelines/Standards"},{actionMenu:[{title:"child1",actionMenu:[{title:"child1-1",actionMenu:[{title:"child1-1-1",actionUrl:{url:"/children"}},{title:"child1-1-2",actionUrl:{url:"/children"}},{title:"child1-1-3",actionUrl:{url:"/children"}}]},{title:"child1-2",actionMenu:[{title:"child1-2-1",actionUrl:{url:"/children"}},{title:"child1-2-2",actionUrl:{url:"/children"}},{title:"child1-2-3",actionUrl:{url:"/children"}}]}]},{title:"child2",actionMenu:[{title:"child2-1",actionMenu:[{title:"child2-1-1",actionUrl:{url:"/children"}},{title:"child2-1-2",actionUrl:{url:"/children"}},{title:"child2-1-3",actionUrl:{url:"/children"}}]},{title:"child2-2",actionMenu:[{title:"child2-2-1",actionUrl:{url:"/children"}},{title:"child2-2-2",actionUrl:{url:"/children"}},{title:"child2-2-3",actionUrl:{url:"/children"}}]}]}],childrenMenuType:W.FLYOUT,title:"Childrens"},{actionMenu:[{title:"Title of section 1",actionMenu:[{title:"child1-1",actionMenu:[{title:"child1-1-1",actionUrl:{url:"/children"}},{title:"child1-1-2",actionUrl:{url:"/children"}},{title:"child1-1-3",actionUrl:{url:"/children"}}]},{title:"child1-2",actionMenu:[{title:"child1-2-1",actionUrl:{url:"/children"}},{title:"child1-2-2",actionUrl:{url:"/children"}},{title:"child1-2-3",actionUrl:{url:"/children"}}]}]},{title:"Title of section 2",actionMenu:[{title:"child2-1",actionMenu:[{title:"child2-1-1",actionUrl:{url:"/children"}},{title:"child2-1-2",actionUrl:{url:"/children"}},{title:"child2-1-3",actionUrl:{url:"/children"}}]},{title:"child2-2",actionMenu:[{title:"child2-2-1",actionUrl:{url:"/children"}},{title:"child2-2-2",actionUrl:{url:"/children"}},{title:"child2-2-3",actionUrl:{url:"/children"}}]}]}],childrenMenuType:W.MEGA_MENU,title:"MEGA MENU!"}],title:"Utah Design System Main Menu"}}};function S(){return Ne}function Jt(t){if(!t.showTitle&&!t.logo)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.")}function en(t){Ne={...ct,...t},Jt(Ne);const e=document.querySelector(b([d.UTAH_DESIGN_SYSTEM,d.HEADER])),n=document.querySelector(b([d.UTAH_DESIGN_SYSTEM,d.MAIN_MENU__OUTER]));return e&&(e.remove(),n==null||n.remove()),kt(),Ne}const tn=`<div class="utds-title-wrapper">
30
+ <div class="utds-title-wrapper__logo"></div>
31
+ <div class="utds-title-wrapper__title"></div>
32
+ </div>
33
+ `,nn=`<a class="utds-title-wrapper">
34
+ <div class="utds-title-wrapper__logo"></div>
35
+ <div class="utds-title-wrapper__title"></div>
36
+ </a>
37
+ `;function $(t,e){if(e)if(e instanceof HTMLCollection)for(;e.length>0;)t.appendChild(e[0]);else if(e instanceof Node)t.appendChild(e);else throw console.error(e),new Error("appendChildAll: Unknown child element")}function rn(){const t=S().titleURL,e=U(t?nn:tn);if(!e)throw new Error("LogoTitle: titleWrapper is null");t&&e.setAttribute("href",t);const n=e.querySelector(b(d.TITLE__LOGO));if(!n)throw new Error("LogoTitle: logoWrapper is null");const r=S().logo,i=S().showTitle,o=S().title;if(r){let s;je(r)?s=U(r):s=r,s.setAttribute("role","presentation"),$(n,s)}else e.removeChild(n);const a=document.createTextNode(o),l=e.querySelector(b(d.TITLE__TITLE));return l==null||l.appendChild(a),!i&&r&&(l==null||l.classList.add(d.VISUALLY_HIDDEN)),e}const on=`<div class="utah-logo-svg" role="img">
38
+ <title>An official website of the State of Utah</title>
39
+ <svg viewBox="0 0 137.363 56.6959">
40
+ <g>
41
+ <g>
42
+ <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" />
43
+ </g>
44
+ <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>
45
+ </g>
46
+ </svg>
47
+ </div>
48
+ `,an=`<div class="utah-logo-svg">
49
+ <svg viewBox="0 0 105.9496 47.6226" role="img">
50
+ <title>An official website of the State of Utah</title>
51
+ <g>
52
+ <g>
53
+ <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" />
54
+ </g>
55
+ <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>
56
+ </g>
57
+ </svg>
58
+ </div>
59
+ `;function sn(){let t;switch(S().size){case te.LARGE:t=on;break;case te.SMALL:case te.MEDIUM:t=an;break;default:throw new Error(`Unknown settings size: '${S().size}'`)}return _e(t)}const ln=`<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
60
+ `,cn=`<span class="utds-logo-vert-line"></span>
61
+ `,un=`<div class="utds-action-items-wrapper"></div>
62
+ `;var R="top",q="bottom",F="right",H="left",Ue="auto",Ee=[R,q,F,H],de="start",ge="end",dn="clippingParents",ut="viewport",be="popper",pn="reference",dt=Ee.reduce(function(t,e){return t.concat([e+"-"+de,e+"-"+ge])},[]),pt=[].concat(Ee,[Ue]).reduce(function(t,e){return t.concat([e,e+"-"+de,e+"-"+ge])},[]),fn="beforeRead",hn="read",vn="afterRead",mn="beforeMain",_n="main",En="afterMain",gn="beforeWrite",bn="write",Tn="afterWrite",ze=[fn,hn,vn,mn,_n,En,gn,bn,Tn];function Z(t){return t?(t.nodeName||"").toLowerCase():null}function G(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ne(t){var e=G(t).Element;return t instanceof e||t instanceof Element}function k(t){var e=G(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ye(t){if(typeof ShadowRoot>"u")return!1;var e=G(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function wn(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!k(o)||!Z(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var l=i[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function yn(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){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){return s[u]="",s},{});!k(i)||!Z(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(s){i.removeAttribute(s)}))})}}const Pn={name:"applyStyles",enabled:!0,phase:"write",fn:wn,effect:yn,requires:["computeStyles"]};function j(t){return t.split("-")[0]}var re=Math.max,Se=Math.min,pe=Math.round;function Ze(){var t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ft(){return!/^((?!chrome|android).)*safari/i.test(Ze())}function fe(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&k(t)&&(i=t.offsetWidth>0&&pe(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&pe(r.height)/t.offsetHeight||1);var a=ne(t)?G(t):window,l=a.visualViewport,s=!ft()&&n,u=(r.left+(s&&l?l.offsetLeft:0))/i,c=(r.top+(s&&l?l.offsetTop:0))/o,v=r.width/i,T=r.height/o;return{width:v,height:T,top:c,right:u+v,bottom:c+T,left:u,x:u,y:c}}function Xe(t){var e=fe(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function ht(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Ye(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function z(t){return G(t).getComputedStyle(t)}function An(t){return["table","td","th"].indexOf(Z(t))>=0}function Q(t){return((ne(t)?t.ownerDocument:t.document)||window.document).documentElement}function De(t){return Z(t)==="html"?t:t.assignedSlot||t.parentNode||(Ye(t)?t.host:null)||Q(t)}function vt(t){return!k(t)||z(t).position==="fixed"?null:t.offsetParent}function Mn(t){var e=/firefox/i.test(Ze()),n=/Trident/i.test(Ze());if(n&&k(t)){var r=z(t);if(r.position==="fixed")return null}var i=De(t);for(Ye(i)&&(i=i.host);k(i)&&["html","body"].indexOf(Z(i))<0;){var o=z(i);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")return i;i=i.parentNode}return null}function Te(t){for(var e=G(t),n=vt(t);n&&An(n)&&z(n).position==="static";)n=vt(n);return n&&(Z(n)==="html"||Z(n)==="body"&&z(n).position==="static")?e:n||Mn(t)||e}function Ke(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function we(t,e,n){return re(t,Se(e,n))}function On(t,e,n){var r=we(t,e,n);return r>n?n:r}function mt(){return{top:0,right:0,bottom:0,left:0}}function _t(t){return Object.assign({},mt(),t)}function Et(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var In=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,_t(typeof e!="number"?e:Et(e,Ee))};function Ln(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=j(n.placement),s=Ke(l),u=[H,F].indexOf(l)>=0,c=u?"height":"width";if(!(!o||!a)){var v=In(i.padding,n),T=Xe(o),p=s==="y"?R:H,h=s==="y"?q:F,f=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],E=a[s]-n.rects.reference[s],w=Te(o),M=w?s==="y"?w.clientHeight||0:w.clientWidth||0:0,P=f/2-E/2,m=v[p],_=M-T[c]-v[h],g=M/2-T[c]/2+P,O=we(m,g,_),I=s;n.modifiersData[r]=(e={},e[I]=O,e.centerOffset=O-g,e)}}function Nn(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;if(i!=null&&!(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i))){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(" "))),!ht(e.elements.popper,i)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=i}}const Un={name:"arrow",enabled:!0,phase:"main",fn:Ln,effect:Nn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function he(t){return t.split("-")[1]}var Sn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dn(t){var e=t.x,n=t.y,r=window,i=r.devicePixelRatio||1;return{x:pe(e*i)/i||0,y:pe(n*i)/i||0}}function gt(t){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,T=a.x,p=T===void 0?0:T,h=a.y,f=h===void 0?0:h,E=typeof c=="function"?c({x:p,y:f}):{x:p,y:f};p=E.x,f=E.y;var w=a.hasOwnProperty("x"),M=a.hasOwnProperty("y"),P=H,m=R,_=window;if(u){var g=Te(n),O="clientHeight",I="clientWidth";if(g===G(n)&&(g=Q(n),z(g).position!=="static"&&l==="absolute"&&(O="scrollHeight",I="scrollWidth")),g=g,i===R||(i===H||i===F)&&o===ge){m=q;var L=v&&g===_&&_.visualViewport?_.visualViewport.height:g[O];f-=L-r.height,f*=s?1:-1}if(i===H||(i===R||i===q)&&o===ge){P=F;var N=v&&g===_&&_.visualViewport?_.visualViewport.width:g[I];p-=N-r.width,p*=s?1:-1}}var y=Object.assign({position:l},u&&Sn),x=c===!0?Dn({x:p,y:f}):{x:p,y:f};if(p=x.x,f=x.y,s){var C;return Object.assign({},y,(C={},C[m]=M?"0":"",C[P]=w?"0":"",C.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",C))}return Object.assign({},y,(e={},e[m]=M?f+"px":"",e[P]=w?p+"px":"",e.transform="",e))}function xn(t){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;if(process.env.NODE_ENV!=="production"){var u=z(e.elements.popper).transitionProperty||"";a&&["transform","top","right","bottom","left"].some(function(v){return u.indexOf(v)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
63
+
64
+ `,'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.",`
65
+
66
+ `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var c={placement:j(e.placement),variation:he(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,gt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:s})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,gt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Cn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xn,data:{}};var xe={passive:!0};function Rn(t){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=G(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,xe)}),l&&s.addEventListener("resize",n.update,xe),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,xe)}),l&&s.removeEventListener("resize",n.update,xe)}}const Hn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Rn,data:{}};var Bn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ce(t){return t.replace(/left|right|bottom|top/g,function(e){return Bn[e]})}var kn={start:"end",end:"start"};function bt(t){return t.replace(/start|end/g,function(e){return kn[e]})}function Qe(t){var e=G(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Je(t){return fe(Q(t)).left+Qe(t).scrollLeft}function Vn(t,e){var n=G(t),r=Q(t),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;var u=ft();(u||!u&&e==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:l+Je(t),y:s}}function Wn(t){var e,n=Q(t),r=Qe(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=re(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=re(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Je(t),s=-r.scrollTop;return z(i||n).direction==="rtl"&&(l+=re(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:l,y:s}}function et(t){var e=z(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Tt(t){return["html","body","#document"].indexOf(Z(t))>=0?t.ownerDocument.body:k(t)&&et(t)?t:Tt(De(t))}function ye(t,e){var n;e===void 0&&(e=[]);var r=Tt(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=G(r),a=i?[o].concat(o.visualViewport||[],et(r)?r:[]):r,l=e.concat(a);return i?l:l.concat(ye(De(a)))}function tt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function $n(t,e){var n=fe(t,!1,e==="fixed");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}function wt(t,e,n){return e===ut?tt(Vn(t,n)):ne(e)?$n(e,n):tt(Wn(Q(t)))}function qn(t){var e=ye(De(t)),n=["absolute","fixed"].indexOf(z(t).position)>=0,r=n&&k(t)?Te(t):t;return ne(r)?e.filter(function(i){return ne(i)&&ht(i,r)&&Z(i)!=="body"}):[]}function Fn(t,e,n,r){var i=e==="clippingParents"?qn(t):[].concat(e),o=[].concat(i,[n]),a=o[0],l=o.reduce(function(s,u){var c=wt(t,u,r);return s.top=re(c.top,s.top),s.right=Se(c.right,s.right),s.bottom=Se(c.bottom,s.bottom),s.left=re(c.left,s.left),s},wt(t,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function yt(t){var e=t.reference,n=t.element,r=t.placement,i=r?j(r):null,o=r?he(r):null,a=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,s;switch(i){case R:s={x:a,y:e.y-n.height};break;case q:s={x:a,y:e.y+e.height};break;case F:s={x:e.x+e.width,y:l};break;case H:s={x:e.x-n.width,y:l};break;default:s={x:e.x,y:e.y}}var u=i?Ke(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case de:s[u]=s[u]-(e[c]/2-n[c]/2);break;case ge:s[u]=s[u]+(e[c]/2-n[c]/2);break}}return s}function Pe(t,e){e===void 0&&(e={});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?dn:l,u=n.rootBoundary,c=u===void 0?ut:u,v=n.elementContext,T=v===void 0?be:v,p=n.altBoundary,h=p===void 0?!1:p,f=n.padding,E=f===void 0?0:f,w=_t(typeof E!="number"?E:Et(E,Ee)),M=T===be?pn:be,P=t.rects.popper,m=t.elements[h?M:T],_=Fn(ne(m)?m:m.contextElement||Q(t.elements.popper),s,c,a),g=fe(t.elements.reference),O=yt({reference:g,element:P,strategy:"absolute",placement:i}),I=tt(Object.assign({},P,O)),L=T===be?I:g,N={top:_.top-L.top+w.top,bottom:L.bottom-_.bottom+w.bottom,left:_.left-L.left+w.left,right:L.right-_.right+w.right},y=t.modifiersData.offset;if(T===be&&y){var x=y[i];Object.keys(N).forEach(function(C){var ae=[F,q].indexOf(C)>=0?1:-1,se=[R,q].indexOf(C)>=0?"y":"x";N[C]+=x[se]*ae})}return N}function Gn(t,e){e===void 0&&(e={});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?pt:s,c=he(r),v=c?l?dt:dt.filter(function(h){return he(h)===c}):Ee,T=v.filter(function(h){return u.indexOf(h)>=0});T.length===0&&(T=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(" ")));var p=T.reduce(function(h,f){return h[f]=Pe(t,{placement:f,boundary:i,rootBoundary:o,padding:a})[j(f)],h},{});return Object.keys(p).sort(function(h,f){return p[h]-p[f]})}function jn(t){if(j(t)===Ue)return[];var e=Ce(t);return[bt(t),e,bt(e)]}function zn(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){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,T=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,f=n.allowedAutoPlacements,E=e.options.placement,w=j(E),M=w===E,P=s||(M||!h?[Ce(E)]:jn(E)),m=[E].concat(P).reduce(function(me,ee){return me.concat(j(ee)===Ue?Gn(e,{placement:ee,boundary:c,rootBoundary:v,padding:u,flipVariations:h,allowedAutoPlacements:f}):ee)},[]),_=e.rects.reference,g=e.rects.popper,O=new Map,I=!0,L=m[0],N=0;N<m.length;N++){var y=m[N],x=j(y),C=he(y)===de,ae=[R,q].indexOf(x)>=0,se=ae?"width":"height",V=Pe(e,{placement:y,boundary:c,rootBoundary:v,altBoundary:T,padding:u}),Y=ae?C?F:H:C?q:R;_[se]>g[se]&&(Y=Ce(Y));var ke=Ce(Y),le=[];if(o&&le.push(V[x]<=0),l&&le.push(V[Y]<=0,V[ke]<=0),le.every(function(me){return me})){L=y,I=!1;break}O.set(y,le)}if(I)for(var Ve=h?3:1,ot=function(ee){var Ie=m.find(function($e){var ce=O.get($e);if(ce)return ce.slice(0,ee).every(function(at){return at})});if(Ie)return L=Ie,"break"},Oe=Ve;Oe>0;Oe--){var We=ot(Oe);if(We==="break")break}e.placement!==L&&(e.modifiersData[r]._skip=!0,e.placement=L,e.reset=!0)}}const Yn={name:"flip",enabled:!0,phase:"main",fn:zn,requiresIfExists:["offset"],data:{_skip:!1}};function Pt(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function At(t){return[R,F,q,H].some(function(e){return t[e]>=0})}function Zn(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=Pe(e,{elementContext:"reference"}),l=Pe(e,{altBoundary:!0}),s=Pt(a,r),u=Pt(l,i,o),c=At(s),v=At(u);e.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:v},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":v})}const Xn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zn};function Kn(t,e,n){var r=j(t),i=[H,R].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],l=o[1];return a=a||0,l=(l||0)*i,[H,F].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}function Qn(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,a=pt.reduce(function(c,v){return c[v]=Kn(v,e.rects,o),c},{}),l=a[e.placement],s=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=s,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}const Jn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Qn};function er(t){var e=t.state,n=t.name;e.modifiersData[n]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const tr={name:"popperOffsets",enabled:!0,phase:"read",fn:er,data:{}};function nr(t){return t==="x"?"y":"x"}function rr(t){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,T=n.tether,p=T===void 0?!0:T,h=n.tetherOffset,f=h===void 0?0:h,E=Pe(e,{boundary:s,rootBoundary:u,padding:v,altBoundary:c}),w=j(e.placement),M=he(e.placement),P=!M,m=Ke(w),_=nr(m),g=e.modifiersData.popperOffsets,O=e.rects.reference,I=e.rects.popper,L=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,N=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),y=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,x={x:0,y:0};if(g){if(o){var C,ae=m==="y"?R:H,se=m==="y"?q:F,V=m==="y"?"height":"width",Y=g[m],ke=Y+E[ae],le=Y-E[se],Ve=p?-I[V]/2:0,ot=M===de?O[V]:I[V],Oe=M===de?-I[V]:-O[V],We=e.elements.arrow,me=p&&We?Xe(We):{width:0,height:0},ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:mt(),Ie=ee[ae],$e=ee[se],ce=we(0,O[V],me[V]),at=P?O[V]/2-Ve-ce-Ie-N.mainAxis:ot-ce-Ie-N.mainAxis,Yr=P?-O[V]/2+Ve+ce+$e+N.mainAxis:Oe+ce+$e+N.mainAxis,st=e.elements.arrow&&Te(e.elements.arrow),Zr=st?m==="y"?st.clientTop||0:st.clientLeft||0:0,Vt=(C=y==null?void 0:y[m])!=null?C:0,Xr=Y+at-Vt-Zr,Kr=Y+Yr-Vt,Wt=we(p?Se(ke,Xr):ke,Y,p?re(le,Kr):le);g[m]=Wt,x[m]=Wt-Y}if(l){var $t,Qr=m==="x"?R:H,Jr=m==="x"?q:F,ue=g[_],qe=_==="y"?"height":"width",qt=ue+E[Qr],Ft=ue-E[Jr],lt=[R,H].indexOf(w)!==-1,Gt=($t=y==null?void 0:y[_])!=null?$t:0,jt=lt?qt:ue-O[qe]-I[qe]-Gt+N.altAxis,zt=lt?ue+O[qe]+I[qe]-Gt-N.altAxis:Ft,Yt=p&&lt?On(jt,ue,zt):we(p?jt:qt,ue,p?zt:Ft);g[_]=Yt,x[_]=Yt-ue}e.modifiersData[r]=x}}const ir={name:"preventOverflow",enabled:!0,phase:"main",fn:rr,requiresIfExists:["offset"]};function or(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function ar(t){return t===G(t)||!k(t)?Qe(t):or(t)}function sr(t){var e=t.getBoundingClientRect(),n=pe(e.width)/t.offsetWidth||1,r=pe(e.height)/t.offsetHeight||1;return n!==1||r!==1}function lr(t,e,n){n===void 0&&(n=!1);var r=k(e),i=k(e)&&sr(e),o=Q(e),a=fe(t,i,n),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&((Z(e)!=="body"||et(o))&&(l=ar(e)),k(e)?(s=fe(e,!0),s.x+=e.clientLeft,s.y+=e.clientTop):o&&(s.x=Je(o))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function cr(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var s=e.get(l);s&&i(s)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function ur(t){var e=cr(t);return ze.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function dr(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function J(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return[].concat(n).reduce(function(i,o){return i.replace(/%s/,o)},t)}var ie='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',pr='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',Mt=["name","enabled","phase","fn","effect","requires","options"];function fr(t){t.forEach(function(e){[].concat(Object.keys(e),Mt).filter(function(n,r,i){return i.indexOf(n)===r}).forEach(function(n){switch(n){case"name":typeof e.name!="string"&&console.error(J(ie,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(J(ie,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":ze.indexOf(e.phase)<0&&console.error(J(ie,e.name,'"phase"',"either "+ze.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(J(ie,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(J(ie,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(J(ie,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(J(ie,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+Mt.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+n+'" was provided.')}e.requires&&e.requires.forEach(function(r){t.find(function(i){return i.name===r})==null&&console.error(J(pr,String(e.name),r,r))})})})}function hr(t,e){var n=new Set;return t.filter(function(r){var i=e(r);if(!n.has(i))return n.add(i),!0})}function vr(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ot="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",mr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",It={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function _r(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?It:i;return function(l,s,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},It,o),modifiersData:{},elements:{reference:l,popper:s},attributes:{},styles:{}},v=[],T=!1,p={state:c,setOptions:function(w){var M=typeof w=="function"?w(c.options):w;f(),c.options=Object.assign({},o,c.options,M),c.scrollParents={reference:ne(l)?ye(l):l.contextElement?ye(l.contextElement):[],popper:ye(s)};var P=ur(vr([].concat(r,c.options.modifiers)));if(c.orderedModifiers=P.filter(function(y){return y.enabled}),process.env.NODE_ENV!=="production"){var m=hr([].concat(P,c.options.modifiers),function(y){var x=y.name;return x});if(fr(m),j(c.options.placement)===Ue){var _=c.orderedModifiers.find(function(y){var x=y.name;return x==="flip"});_||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var g=z(s),O=g.marginTop,I=g.marginRight,L=g.marginBottom,N=g.marginLeft;[O,I,L,N].some(function(y){return parseFloat(y)})&&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(" "))}return h(),p.update()},forceUpdate:function(){if(!T){var w=c.elements,M=w.reference,P=w.popper;if(!Lt(M,P)){process.env.NODE_ENV!=="production"&&console.error(Ot);return}c.rects={reference:lr(M,Te(P),c.options.strategy==="fixed"),popper:Xe(P)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(y){return c.modifiersData[y.name]=Object.assign({},y.data)});for(var m=0,_=0;_<c.orderedModifiers.length;_++){if(process.env.NODE_ENV!=="production"&&(m+=1,m>100)){console.error(mr);break}if(c.reset===!0){c.reset=!1,_=-1;continue}var g=c.orderedModifiers[_],O=g.fn,I=g.options,L=I===void 0?{}:I,N=g.name;typeof O=="function"&&(c=O({state:c,options:L,name:N,instance:p})||c)}}},update:dr(function(){return new Promise(function(E){p.forceUpdate(),E(c)})}),destroy:function(){f(),T=!0}};if(!Lt(l,s))return process.env.NODE_ENV!=="production"&&console.error(Ot),p;p.setOptions(u).then(function(E){!T&&u.onFirstUpdate&&u.onFirstUpdate(E)});function h(){c.orderedModifiers.forEach(function(E){var w=E.name,M=E.options,P=M===void 0?{}:M,m=E.effect;if(typeof m=="function"){var _=m({state:c,name:w,instance:p,options:P}),g=function(){};v.push(_||g)}})}function f(){v.forEach(function(E){return E()}),v=[]}return p}}var Er=[Hn,tr,Cn,Pn,Jn,Yn,ir,Un,Xn],Nt=_r({defaultModifiers:Er});function Ae(t,e,n,r){e?(t.classList.remove(r),t.classList.add(n)):(t.classList.add(r),t.classList.remove(n))}let K;function Ut(){document.removeEventListener("click",K.globalOnClick),document.removeEventListener("keyup",K.globalOnKeypress),K=null}function nt(){const t=document.querySelectorAll(`${b(d.UTAH_DESIGN_SYSTEM)} ${b(d.POPUP_WRAPPER)}`);Array.from(t).filter(e=>!e.classList.contains(d.POPUP__HIDDEN)).forEach(e=>{const n=e.getAttribute("id");if(n){const r=document.querySelector(`[aria-controls="${n}"]`);r&&r.setAttribute("aria-expanded","false")}Ae(e,!1,d.POPUP__VISIBLE,d.POPUP__HIDDEN)})}function gr(){K&&Ut(),K={},K.globalOnClick=nt,document.addEventListener("click",K.globalOnClick),K.globalOnKeypress=t=>{t.key==="Escape"&&nt()},document.addEventListener("keyup",K.globalOnKeypress)}function br(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function Me(t,e,n,r,i){e.setAttribute("aria-expanded","false"),e.setAttribute("aria-haspopup",r);function o(){(!(i!=null&&i.isPerformPopup)||i!=null&&i.isPerformPopup&&i.isPerformPopup())&&(Nt(e,n,{placement:(i==null?void 0:i.popupPlacement)||Fe.BOTTOM,modifiers:[{name:"offset",options:{offset:[0,11]}}]}),Ae(n,!0,d.POPUP__VISIBLE,d.POPUP__HIDDEN),e.setAttribute("aria-expanded","true"))}function a(){(!(i!=null&&i.isPerformPopup)||i.isPerformPopup())&&(Ae(n,!1,d.POPUP__VISIBLE,d.POPUP__HIDDEN),e.setAttribute("aria-expanded","false"))}if(t.addEventListener("focusin",()=>o()),t.addEventListener("focusout",()=>a()),i!=null&&i.shouldFocusOnHover){let s=NaN,u=NaN;t.addEventListener("mouseenter",()=>{clearTimeout(u),clearTimeout(s),s=window.setTimeout(o,200)}),t.addEventListener("mouseleave",()=>{clearTimeout(u),clearTimeout(s),u=window.setTimeout(a,200)})}let l=!1;e.onmousedown=s=>{var u;s.stopPropagation(),(!(i!=null&&i.isPerformPopup)||i.isPerformPopup())&&(l=((u=s.currentTarget)==null?void 0:u.getAttribute("aria-expanded"))==="true")},i!=null&&i.preventOnClickHandling||(e.onclick=s=>{var u;(!(i!=null&&i.isPerformPopup)||i.isPerformPopup())&&(s.stopPropagation(),s.preventDefault(),l&&e.getAttribute("aria-expanded")==="true"?(Ae(n,!1,d.POPUP__VISIBLE,d.POPUP__HIDDEN),e.setAttribute("aria-expanded","false"),(u=document.activeElement)==null||u.blur(),l=!1):(br()&&nt(),e.setAttribute("aria-expanded","true"),Nt(e,n,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,10]}}]}),Ae(n,!0,d.POPUP__VISIBLE,d.POPUP__HIDDEN),l=!0)),i!=null&&i.onClick&&i.onClick(s)})}function oe(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&(15>>t)/4).toString(16))}const Tr=`<div class="popup__wrapper popup__wrapper--hidden">
67
+ <div class="popup__content">
68
+ <div class="popup__arrow" data-popper-arrow></div>
69
+ </div>
70
+ </div>
71
+ `;function St(t,e){const n=t.getAttribute("id");if(!n)throw new Error("renderPopup: labelledByElement does not have an `id` attribute");const r=oe();t.setAttribute("aria-controls",r);const i=U(Tr);if(i.setAttribute("id",r),i.setAttribute("aria-labelledby",n),e!=null&&e.removePopupArrow){const o=i.querySelector(b(d.POPUP_ARROW));if(!o)throw new Error("renderPopup(): popup arrow missing (I wanted to remove it!!)");o.remove()}return i}const wr=`<span class="utds-icon-before-chevron-right vertical-menu__chevron" aria-hidden="true"></span>
72
+ `,Dt=`<span class="utds-new-tab-link-a11y">
73
+ <span class="visually-hidden">opens in a new tab</span>
74
+ <span class="utds-icon-after-external-link" aria-hidden="true"></span>
75
+ </span>
76
+ `,yr=`<ul class="vertical-menu" role="menu" />
77
+ `,Pr=`<li class="vertical-menu__item">
78
+ <span class="vertical-menu__title">
79
+ <span class="vertical-menu__plain-title"></span>
80
+ <a href="#" class="vertical-menu__link-title">
81
+ <span class="vertical-menu__link-text"></span>
82
+ </a>
83
+ <button class="vertical-menu__button-title">
84
+ <span class="vertical-menu__link-text"></span>
85
+ </button>
86
+ </span>
87
+ <span class="vertical-menu__divider" />
88
+ </li>
89
+ `;function Re(t,e,n){var i;let r=!1;return t&&(Array.isArray(t)?r=t.some(o=>Re(o,e,n)):(r=n(t),r||(r=!!((i=e==null?void 0:e.filter(o=>t[o]))!=null&&i.some(o=>Re(t[o],e,n)))))),r}function Ar(t){const e=t.closest("li");if(!e)throw console.error("element",t),new Error("toggleChildMenuExpansion: parent not found for child");e.querySelectorAll(":scope > ul").forEach(n=>{var o;const r=(o=n.closest("li"))==null?void 0:o.querySelector(b(d.POPUP_MENU__BUTTON_TITLE));if(!r)throw new Error("toggleChildMenuExpansion: button not found");const i=r.querySelector(`:scope > ${b(d.POPUP_MENU__CHEVRON)}`);if(!i)throw new Error("toggleChildMenuExpansion: chevron not found");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))})}function Mr(t){return e=>{e.preventDefault(),e.stopPropagation(),Ar(t)}}function xt(){const t=U(wr);return t.classList.add(d.IS_CLOSED),t}function Or(t,e,n){var v,T;const r=U(Pr),i=r.querySelector(b(d.POPUP_MENU__TITLE));if(!i)throw new Error("renderPopupMenuItem: menuItemTitleWrapper not found");const o=r.querySelector(b(d.POPUP_MENU__BUTTON_TITLE));if(!o)throw new Error("renderPopupMenuItem: menuButton not found");const a=r.querySelector(b(d.POPUP_MENU__LINK_TITLE));if(!a)throw new Error("renderPopupMenuItem: aHref not found");const l=r.querySelector(b(d.POPUP_MENU__PLAIN_TITLE));if(!l)throw new Error("renderPopupMenuItem: plainTitle not found");const s=r.querySelector(b(d.POPUP_MENU__DIVIDER));if(!s)throw new Error("renderPopupMenuItem: menuDivider not found");const u=r.querySelector(`button ${b(d.POPUP_MENU__LINK_TEXT)}`);if(!u)throw new Error("renderPopupMenuItem: titleSpanButton not found");const c=r.querySelector(`a ${b(d.POPUP_MENU__LINK_TEXT)}`);if(!c)throw new Error("renderPopupMenuItem: titleSpanLink not found");if(e.actionMenu){let p;switch(n.childrenMenuType){case W.FLYOUT:{p=xt(),o.appendChild(p),o.setAttribute("id",oe());const h=He({menuItems:e.actionMenu,title:e.title},o,{...n,removePopupArrow:!0});r.appendChild(h),Me(r,o,h,"menu",{popupPlacement:Fe.RIGHT_START,preventOnClickHandling:!0,shouldFocusOnHover:!0}),a.remove(),l.remove();break}case W.INLINE:{const h=rt(e,e.actionMenu,n),f=oe();h.setAttribute("id",f),h.classList.add(d.VISUALLY_HIDDEN),r.appendChild(h),o.onclick=Mr(o),o.setAttribute("aria-expanded","false"),o.setAttribute("aria-controls",f),p=xt(),o.appendChild(p),a.remove(),l.remove(),r.addEventListener("focusin",E=>{var w,M,P,m;for(let _=(w=E.target)==null?void 0:w.closest("ul");_;_=(M=_.parentElement)==null?void 0:M.closest("ul"))_.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))});break}case W.MEGA_MENU:{const h=rt(e,e.actionMenu,n),f=oe();h.setAttribute("id",f),r.appendChild(h),a.remove(),o.remove(),l.appendChild(document.createTextNode(e.title));break}default:throw new Error(`renderPopupMenuItem: childrenMenuType unknown '${e.actionMenu}'`)}s.remove()}else if(e.actionFunction)o.onclick=e.actionFunction,a.remove(),s.remove(),l.remove();else if(e.actionUrl)a.setAttribute("href",e.actionUrl.url),o.remove(),s.remove(),l.remove();else if(e.actionFunctionUrl)a.setAttribute("href",e.actionFunctionUrl.url),a.onclick=p=>{var h,f;(h=e.actionFunctionUrl)!=null&&h.skipHandleEvent||(p.stopPropagation(),p.preventDefault()),(f=e.actionFunctionUrl)==null||f.actionFunction(p)},o.remove(),s.remove(),l.remove();else if(e.isDivider)i.remove(),r.setAttribute("aria-hidden","true"),r.setAttribute("role","separator");else throw console.error(e),new Error("renderPopupMenuItem: popupMenuItem must have either actionMenu, actionFunction, actionUrl, or isDivider (popupMenuItem.title)");if(!e.isDivider&&(u.appendChild(document.createTextNode(e.title)),c.appendChild(document.createTextNode(e.title)),(v=e.actionUrl)!=null&&v.openInNewTab||(T=e.actionFunctionUrl)!=null&&T.openInNewTab)){a.setAttribute("target","_blank");const p=U(Dt);u.appendChild(p),c.appendChild(p)}return(e.isSelected||e.actionMenu&&Re(e.actionMenu,["actionMenu"],p=>!!p.isSelected))&&(o.classList.add(d.MENU_ITEM__SELECTED),a.classList.add(d.MENU_ITEM__SELECTED)),$(t,r),r}function rt(t,e,n){const r=U(yr);return e.forEach(i=>Or(r,i,n)),r}function He(t,e,n){const r=St(e,{removePopupArrow:n.removePopupArrow}),i=r.querySelector(b(d.POPUP_CONTENT_WRAPPER));if(!i)throw new Error("renderPopupMenu: contentWrapper not found");const o=rt(t,t.menuItems,n);return o.setAttribute("aria-label",t.title),i.appendChild(o),r}const Ir=`<div class="utds-header-action-item">
90
+ <button type="button" class="icon-button utds-header-action-item__icon-button">
91
+ <div class="utds-header-action-item__title visually-hidden"></div>
92
+ </button>
93
+ </div>
94
+ `,Lr=`<div class="utds-badge__wrapper">
95
+ <span class="utds-badge__value"></span>
96
+ <span class="utds-badge__label visually-hidden"></span>
97
+ </div>
98
+ `;function Nr(t){let e=null;if(t.badge){e=U(Lr),e.classList.add(d.BADGE_WRAPPER__ACTION_ITEM);const n=e.querySelector(b(d.BADGE__LABEL));if(!n)throw new Error("renderActionItemBadge: badgeLabel not found");if(n.appendChild(document.createTextNode(t.badge.label)),t.badge.value||t.badge.value===0){const r=e.querySelector(b(d.BADGE__VALUE));if(!r)throw new Error("renderActionItemBadge: badgeValue not found");r.appendChild(document.createTextNode(`${t.badge.value}`))}else e.classList.add(d.BADGE_WRAPPER__SMALL);t.badge.className&&e.classList.add(t.badge.className)}return e}function Ur(t){const e=U(Ir),n=document.createTextNode(t.title),r=e instanceof HTMLCollection?e[0]:e;t.showTitle&&r.classList.add(d.ACTION_ITEM__ICON_BUTTON_TITLE);const i=r.querySelector(b(d.ACTION_ITEM__TITLE));if(!i)throw new Error("renderActionItem: titleDiv not found");$(i,n),t.showTitle?i.classList.remove(d.VISUALLY_HIDDEN):i.classList.add(d.VISUALLY_HIDDEN);const o=e.querySelector(b(d.ACTION_ITEM__ICON_BUTTON));if(!o)throw new Error("renderActionItem: iconButton not found");t.className&&o.classList.add(t.className);const a=Nr(t);a&&o.appendChild(a);const l=U(t.icon);if(l.setAttribute("role","presentation"),$(o,l),!(o instanceof HTMLElement))throw new Error("renderActionItem: iconButton is not an HTMLElement");if(t.actionFunction)o.onclick=t.actionFunction;else if(t.actionDom){const s=oe();o.setAttribute("id",s);const u=St(o),c=u.querySelector(b(d.POPUP_CONTENT_WRAPPER));if(!c)throw new Error("renderPopupMenu: contentWrapper not found");c.appendChild(t.actionDom),e.appendChild(u),Me(r,o,u,"dialog",void 0)}else if(t.actionPopupMenu){const s=oe();o.setAttribute("id",s);const u=He(t.actionPopupMenu,o,{childrenMenuType:W.INLINE});$(e,u),Me(r,o,u,"menu",void 0)}else throw console.error(t),new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");return e}function Sr(){var n,r;const{actionItems:t}=S();let e=null;return t!=null&&t.length&&(e=_e(un),(r=(n=S().actionItems)==null?void 0:n.map(i=>Ur(i)))==null||r.forEach(i=>$(e,i))),e}const Be={PROFILE:"https://id.utah.gov",SIGN_IN:`https://id.utah.gov/login?goto=${window.location}`,SIGN_OUT:`https://id.utah.gov/logout?goto=${window.location}`,USER_INFO:"https://id.utah.gov/api/userInfo"};function Dr(t){let e=NaN,n=null,r=null;return{promise:new Promise((o,a)=>{e=setTimeout(()=>{e=NaN,o()},t),n=o,r=a}),clearTimeout:o=>{e&&(clearTimeout(e),e=NaN,o(n,r))}}}const X={isDefinitive:null,lastError:null,userInfo:null};function Ct(t){var e,n,r;t.isDefinitive&&(Ht(t),(r=(n=(e=S())==null?void 0:e.utahId)==null?void 0:n.onAuthChanged)==null||r.call(n,t))}let Rt=!0;const xr=500;async function it(){var e,n;let t=null;if(X.isDefinitive===!1)t=Promise.resolve(X);else if(Rt)t=Dr(xr).promise.then(()=>{Rt=!1,it()});else{const r=S();if(r.utahId===!1)t=Promise.resolve({isDefinitive:!0,lastError:"Utah ID is off",userInfo:null});else if(r.utahId===!0||((e=r.utahId)==null?void 0:e.currentUser)===void 0)X.isDefinitive=!1,t=fetch(Be.USER_INFO,{credentials:"include"}).then(i=>i.json()).then(i=>{if(i.status===200)X.lastError=null,X.userInfo=i.data;else throw new Error(i.err)}).catch(i=>{X.lastError=i,X.userInfo=null}).finally(()=>{X.isDefinitive=!0,Ct(X)});else{const i={isDefinitive:!0,lastError:null,userInfo:(n=r.utahId)==null?void 0:n.currentUser};t=Promise.resolve(i),Ct(i)}}return t}function Cr(){return X}const Rr=`<div class="utds-utah-id-wrapper">
99
+ <button class="utds-utah-id__button button--solid" id="utds-utah-id-button" type="button">UtahID Sign In</button>
100
+ </div>
101
+ `;let B=null,A=null,ve=null;function Ht(t){var e;if(A=t,B){if(B.innerHTML="",A!=null&&A.userInfo&&((e=A.userInfo)!=null&&e.authenticated)){const n=document.createElement("span");n.appendChild(document.createTextNode("UtahID Account:")),n.classList.add(d.VISUALLY_HIDDEN),B.appendChild(n),B.appendChild(document.createTextNode(`Hello, ${A.userInfo.first||""}`))}else B.appendChild(document.createTextNode("UtahID Sign In"));Bt()}}function Bt(){var t;B&&ve&&(!!(A!=null&&A.isDefinitive)&&!!((t=A==null?void 0:A.userInfo)!=null&&t.authenticated)?(B.setAttribute("aria-haspopup","menu"),B.setAttribute("aria-expanded","false"),ve.removeAttribute("aria-hidden")):(B.removeAttribute("aria-haspopup"),B.removeAttribute("aria-expanded"),ve.setAttribute("aria-hidden","true")))}function Hr(){var l;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)||[];i.length&&i.push({isDivider:!0,title:"--divider--"});const o={menuItems:[...i,{actionUrl:e?void 0:{url:Be.PROFILE,openInNewTab:!0},actionFunction:e||void 0,className:"external-link",title:"UtahID Profile"},{actionUrl:r?void 0:{url:Be.SIGN_OUT},actionFunction:r||void 0,title:"Sign Out"}],title:"Utah Id Menu"},a=U(Rr);if(!a)throw new Error("UtahId: utahIdWrapper not found");if(B=a.querySelector(b(d.UTAH_ID__BUTTON)),!B)throw new Error("UtahId: utahIdButton not found");return ve=He(o,B,{childrenMenuType:W.INLINE}),a.appendChild(ve),Bt(),Me(a,B,ve,"menu",{isPerformPopup:()=>{var s;return!!(A!=null&&A.isDefinitive)&&!!((s=A==null?void 0:A.userInfo)!=null&&s.authenticated)},onClick:s=>{var u;(!(A!=null&&A.isDefinitive)||!((u=A==null?void 0:A.userInfo)!=null&&u.authenticated))&&(n?n(s):(s.preventDefault(),s.stopPropagation(),window.location.href=Be.SIGN_IN))}}),it(),Ht(Cr()),a}const Br=`<div class="utds-citizen-experience-wrapper"></div>
102
+ `;function kr(){const t=U(Br),e=Sr();return e&&$(t,e),S().utahId!==!1&&$(t,Hr()),t}const Vr=`<h1 class="utds-logo-wrapper"></h1>
103
+ `;function Wr(){var n;const t=U(ln);t.classList.add(`utds-header--${((n=S().size)==null?void 0:n.toLowerCase())||te.MEDIUM}`);const e=U(Vr);return t.appendChild(e),$(e,sn()),$(e,_e(cn)),$(e,rn()),$(t,kr()),t}const $r=`<li class="menu-item">
104
+ <span class="menu-item__title">
105
+ <button class="menu-item__button-title" type="button"></button>
106
+ <a class="menu-item__link-title"></a>
107
+ <span class="menu-chiclet"></span>
108
+ </span>
109
+ </li>
110
+ `,qr=`<div class="utah-design-system main-menu__outer">
111
+ <div class="main-menu__wrapper">
112
+ <nav class="horizontal-menu main-menu__nav">
113
+ <h2 class="main-menu__title visually-hidden"></h2>
114
+ <ul class="main-menu__menu-top"></ul>
115
+ </nav>
116
+ <button type="button" class="button icon-button icon-button--borderless main-menu__search">
117
+ <div>
118
+ <span class="utds-icon-before-search" aria-hidden="true"></span>
119
+ <span class="visually-hidden">search</span>
120
+ </div>
121
+ </button>
122
+ </div>
123
+ </div>
124
+ `;function Fr(){const t=S();let e=null;if(t.mainMenu){e=U(qr);const n=e.querySelector(b(d.MAIN_MENU__NAV));if(!n)throw new Error("renderMainMenu(): mainMenu not created");const r=n.querySelector(b(d.MAIN_MENU__TITLE));if(!r)throw new Error("renderMainMenu(): titleTag not found");const i="main-menu__nav";n.setAttribute("aria-labelledby",i),r.setAttribute("id",i),r.innerHTML=t.mainMenu.title;const o=n.querySelector(b(d.MAIN_MENU__MENU_TOP));if(!o)throw new Error("renderMainMenu(): mainMenuTop not found");t.mainMenu.menuItems.forEach(a=>{var v,T;const l=U($r);o.appendChild(l);const s=l.querySelector(b(d.MENU_ITEM__TITLE));if(!s)throw new Error(`renderMainMenu(): sub menu title not found for ${a.title}`);const u=s.querySelector(b(d.MENU_ITEM__BUTTON_TITLE));if(!u)throw new Error(`renderMainMenu(): button title not found for ${a.title}`);u.setAttribute("id",`${d.MENU_ITEM__BUTTON_TITLE}__${a.title}-${oe()}`);const c=s.querySelector(b(d.MENU_ITEM__LINK_TITLE));if(!c)throw new Error(`renderMainMenu(): link title not found for ${a.title}`);if((a.isSelected||a.actionMenu&&Re(a.actionMenu,["actionMenu"],p=>!!p.isSelected))&&(u.classList.add(d.MENU_ITEM__SELECTED),c.classList.add(d.MENU_ITEM__SELECTED)),a.actionMenu){u.innerHTML=a.title,c.remove();const p={menuItems:a.actionMenu,title:a.title},h=He(p,u,{childrenMenuType:a.childrenMenuType||W.FLYOUT});l.appendChild(h),Me(l,u,h,"menu",{shouldFocusOnHover:!0});let f;switch(a.childrenMenuType){case W.INLINE:f=d.MENU_ITEM__INLINE;break;case W.MEGA_MENU:f=d.MENU_ITEM__MEGA_MENU;break;case W.FLYOUT:default:f=d.MENU_ITEM__FLY_OUT;break}l.classList.add(f)}else if(a.actionFunction)u.innerHTML=a.title,u.onclick=a.actionFunction,c.remove();else if(a.actionFunctionUrl)c.innerHTML=a.title,c.setAttribute("href",a.actionFunctionUrl.url),c.onclick=p=>{var h,f;(h=a.actionFunctionUrl)!=null&&h.skipHandleEvent||(p.stopPropagation(),p.preventDefault()),(f=a.actionFunctionUrl)==null||f.actionFunction(p)},u.remove();else if(a.actionUrl)c.innerHTML=a.title,c.setAttribute("href",a.actionUrl.url),u.remove();else throw new Error(`renderMainMenu(): menuItem is missing an action: ${a.title}`);((v=a.actionUrl)!=null&&v.openInNewTab||(T=a.actionFunctionUrl)!=null&&T.openInNewTab)&&(c.setAttribute("target","_blank"),c.appendChild(U(Dt)))})}return e}function Gr(){const t=Xt.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`);let e=document.getElementById(d.CSS_HEADER_MEDIA_TAG_ID);e||(e=document.createElement("style"),e.id=d.CSS_HEADER_MEDIA_TAG_ID),e.innerHTML=t,document.body.appendChild(e)}function kt(){if(!document.querySelector(b([d.UTAH_DESIGN_SYSTEM,d.HEADER]))){const e=Wr();document.body.insertBefore(e,document.body.firstChild);const n=Fr();n&&e.after(n),gr(),setTimeout(()=>document.dispatchEvent(new Event(Ge.HEADER_LOADED)),0),Gr(),it()}}function jr(){var t,e;(t=document.querySelector(b([d.UTAH_DESIGN_SYSTEM,d.HEADER])))==null||t.remove(),(e=document.querySelector(b([d.UTAH_DESIGN_SYSTEM,d.MAIN_MENU__OUTER])))==null||e.remove(),Ut(),setTimeout(()=>document.dispatchEvent(new Event(Ge.HEADER_UNLOADED)),0)}const zr=Zt.version.replace(/\./g,"");console.log(`Utah Header v${zr}`),D.baseSettings=ct,D.childrenMenuTypes=W,D.events=Ge,D.getUtahHeaderSettings=S,D.loadHeader=kt,D.popupPlacement=Fe,D.removeHeader=jr,D.renderDOM=_e,D.setUtahHeaderSettings=en,D.sizes=te,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@utahdts/utah-design-system-header",
3
+ "version": "0.1.0",
4
+ "description": "Utah Header for the Utah Design System",
5
+ "main": "dist/utah-design-system-header.umd.js",
6
+ "module": "dist/utah-design-system-header.es.js",
7
+ "files": [
8
+ "src/css",
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "test": "vitest run",
13
+ "build": "vite build",
14
+ "watch": "vite build --watch",
15
+ "sass-build": "sass --no-source-map ./src/css/index.scss ./src/css/build/utah-design-system-header.css",
16
+ "test-publish": "npm publish --dry-run"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/utahdts/utah-design-system.git"
21
+ },
22
+ "license": "Apache-2.0",
23
+ "bugs": {
24
+ "url": "https://github.com/utahdts/utah-design-system/issues"
25
+ },
26
+ "homepage": "https://github.com/utahdts/utah-design-system#readme",
27
+ "dependencies": {
28
+ "@popperjs/core": "2.11.6"
29
+ },
30
+ "devDependencies": {
31
+ "eslint": "8.35.0",
32
+ "eslint-config-airbnb": "19.0.4",
33
+ "eslint-plugin-import": "2.27.5",
34
+ "eslint-plugin-jsx-a11y": "6.7.1",
35
+ "sass": "1.58.3",
36
+ "vite": "4.1.4",
37
+ "vite-plugin-eslint": "1.8.1",
38
+ "vitest": "0.29.1"
39
+ },
40
+ "type": "module"
41
+ }
@@ -0,0 +1,44 @@
1
+ .utds {
2
+ &-action-items-wrapper {
3
+ display: flex;
4
+ gap: var(--spacing);
5
+ margin-right: var(--spacing);
6
+ }
7
+ &-header-action-item {
8
+ display: flex;
9
+ align-items: center;
10
+ position: relative;
11
+ &__icon-button {
12
+ &.icon-button {
13
+ border: 2px solid transparent;
14
+ position: relative;
15
+ &:hover {
16
+ background: var(--hover-gray-color);
17
+ color: black;
18
+ svg {
19
+ fill: black;
20
+ }
21
+ }
22
+ }
23
+ &--has-title {
24
+ .icon-button {
25
+ padding: 0 var(--spacing-s);
26
+ flex-direction: row-reverse;
27
+ }
28
+ }
29
+ svg {
30
+ width: 20px;
31
+ height: 20px;
32
+ fill: var(--gray-color);
33
+ }
34
+ &.icon-waffle {
35
+ .utds-icon-before-waffle::before{
36
+ font-size: 17px;
37
+ }
38
+ }
39
+ }
40
+ &__title {
41
+ margin-left: var(--spacing-xs);
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,34 @@
1
+ .utds-badge {
2
+ &__wrapper {
3
+ align-items: center;
4
+ background-color: var(--danger-color);
5
+ border-radius: var(--radius-circle);
6
+ box-sizing: border-box;
7
+ color: white;
8
+ display: flex;
9
+ font-size: var(--font-size-2xs);
10
+ font-weight: var(--font-weight-semi-bold);
11
+ height: 15px;
12
+ justify-content: center;
13
+ line-height: var(--font-size-2xs);
14
+ min-width: 15px;
15
+ padding: 1px 2px;
16
+ position: absolute;
17
+ right: 0;
18
+ top: 0;
19
+
20
+ &--action-item {
21
+ right: -2px;
22
+ top: -2px
23
+ }
24
+
25
+ &--small {
26
+ height: 9px;
27
+ min-width: unset;
28
+ right: 2px;
29
+ top: 2px;
30
+ width: 9px;
31
+ }
32
+
33
+ }
34
+ }
@@ -0,0 +1,13 @@
1
+ .utds-citizen-experience-wrapper {
2
+ display: flex;
3
+ justify-content: flex-end;
4
+ flex: 1;
5
+ }
6
+ .utds-utah-id {
7
+ &-wrapper {
8
+
9
+ }
10
+ &__sign-in {
11
+
12
+ }
13
+ }
@@ -0,0 +1,64 @@
1
+ .utds {
2
+ &-logo-wrapper {
3
+ position: relative;
4
+ height: 100%;
5
+ display: flex;
6
+ align-items: center;
7
+ }
8
+ &-logo-vert-line {
9
+ height: 85%;
10
+ width: 1px;
11
+ background-color: #707070;
12
+ margin: 0 var(--spacing-xs) 0 var(--spacing);
13
+ display: block;
14
+ }
15
+ &-title-wrapper {
16
+ font-size: var(--font-size-3xl);
17
+ font-weight: 600;
18
+ color: var(--gray-medium-color);
19
+ display: flex;
20
+ align-items: center;
21
+ flex: 1;
22
+ height: 100%;
23
+ gap: var(--spacing-xs);
24
+ text-decoration: none;
25
+ border-radius: var(--radius-small);
26
+ padding: 0 var(--spacing-xs);
27
+ &__logo {
28
+ height: 100%;
29
+ width: auto;
30
+ max-width: 100%;
31
+ max-height: 100%;
32
+ display: flex;
33
+ align-items: center;
34
+
35
+ svg, img {
36
+ height: 100%;
37
+ width: auto;
38
+ max-width: 100%;
39
+ max-height: 100%;
40
+ }
41
+ img {
42
+ max-width: none;
43
+ }
44
+ }
45
+ &__title {
46
+ line-height: .8;
47
+ color: var(--gray-medium-color);
48
+ }
49
+ }
50
+ }
51
+ .utah-logo-svg {
52
+ height: 100%;
53
+ position: relative;
54
+ margin-bottom: -4px;
55
+ svg {
56
+ height: 100%;
57
+ width: auto;
58
+ fill: var(--primary-color);
59
+ font-family: SourceSansPro-Regular, 'Source Sans Pro';
60
+ font-weight: normal;
61
+ font-size: 14px;
62
+ display: block;
63
+ }
64
+ }
@@ -0,0 +1 @@
1
+ @use "../../../library/css/6-components/base-components/popups/popups";
@@ -0,0 +1,21 @@
1
+ .utds {
2
+ &-header {
3
+ padding: var(--spacing-s) var(--spacing-l);
4
+ border-bottom: 1px solid #d7d7d7 !important;
5
+ width: 100%;
6
+ justify-content: flex-start;
7
+ height: 78px;
8
+ position: relative;
9
+ box-sizing: border-box;
10
+ display: flex;
11
+ align-items: center;
12
+
13
+ &--large {
14
+ height: 84px;
15
+ }
16
+
17
+ &--small {
18
+ height: 60px;
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,2 @@
1
+ @use '../../../library/css/6-components/base-components/navigation/vertical-menu';
2
+