(()=>{var e={142:(e,t,s)=>{"use strict";var i=s(697),o=s(423),n=s(938),a=function(e,t){t=t||{},this._tabbables=null,this._excludeHidden=t.excludeHidden,this._firstTabbableElement=t.firstFocusElement,this._lastTabbableElement=null,this._relatedTarget=null,this.el=e,this._handleOnFocus=this._handleOnFocus.bind(this)},r=a.prototype;r.start=function(e){this.updateTabbables(),o(this.el,null,this._excludeHidden);let t=document.activeElement;this._firstTabbableElement?this.el.contains(document.activeElement)||e||(this._firstTabbableElement.focus(),t=this._firstTabbableElement):console.warn("this._firstTabbableElement is null, CircularTab needs at least one tabbable element."),this._relatedTarget=t,document.addEventListener("focus",this._handleOnFocus,!0)},r.stop=function(){n(this.el),document.removeEventListener("focus",this._handleOnFocus,!0)},r.updateTabbables=function(){this._tabbables=i.getTabbableElements(this.el,this._excludeHidden),this._firstTabbableElement=this._firstTabbableElement||this._tabbables[0],this._lastTabbableElement=this._tabbables[this._tabbables.length-1]},r._handleOnFocus=function(e){if(this.el.contains(e.target))this._relatedTarget=e.target;else{if(e.preventDefault(),this.updateTabbables(),this._relatedTarget===this._lastTabbableElement||null===this._relatedTarget)return this._firstTabbableElement.focus(),void(this._relatedTarget=this._firstTabbableElement);if(this._relatedTarget===this._firstTabbableElement&&this._lastTabbableElement)return this._lastTabbableElement.focus(),void(this._relatedTarget=this._lastTabbableElement)}},r.destroy=function(){this.stop(),this.el=null,this._tabbables=null,this._firstTabbableElement=null,this._lastTabbableElement=null,this._relatedTarget=null,this._handleOnFocus=null},e.exports=a},697:(e,t,s)=>{"use strict";var i=s(73),o=function(){this.focusableSelectors=i.selectors},n=o.prototype;n.isFocusableElement=function(e,t,s){return!(t&&!this._isDisplayed(e)||(i.nodeName[e.nodeName]?e.disabled:e.contentEditable&&(s=s||parseFloat(e.getAttribute("tabindex")),isNaN(s))))},n.isTabbableElement=function(e,t){if(t&&!this._isDisplayed(e))return!1;var s=e.getAttribute("tabindex");return s=parseFloat(s),isNaN(s)?this.isFocusableElement(e,t,s):s>=0},n._isDisplayed=function(e){var t=e.getBoundingClientRect();return(0!==t.top||0!==t.left||0!==t.width||0!==t.height)&&"hidden"!==window.getComputedStyle(e).visibility},n.getTabbableElements=function(e,t){for(var s=e.querySelectorAll(this.focusableSelectors),i=s.length,o=[],n=0;n{"use strict";var i=s(563),o=s(697),n="data-original-",a="tabindex",r=function(e,t){var s=e.getAttribute(n+t);s||(s=e.getAttribute(t)||"",e.setAttribute(n+t,s))};e.exports=function(e,t){if(o.isFocusableElement(e,t))r(e,a),e.setAttribute(a,"-1");else for(var s=o.getTabbableElements(e,t),n=s.length;n--;)r(s[n],a),s[n].setAttribute(a,"-1");r(e,i.HIDDEN),e.setAttribute(i.HIDDEN,"true")}},423:(e,t,s)=>{"use strict";var i=s(815);e.exports=function e(t,s,o){s=s||document.body;for(var n=t,a=t;n=n.previousElementSibling;)i(n,o);for(;a=a.nextElementSibling;)i(a,o);t.parentElement&&t.parentElement!==s&&e(t.parentElement,s,o)}},401:e=>{"use strict";e.exports=function(e,t){let s;s=e instanceof NodeList?e:[].concat(e),t=Array.isArray(t)?t:[].concat(t),s.forEach((e=>{t.forEach((t=>{e.removeAttribute(t)}))}))}},173:(e,t,s)=>{"use strict";var i=s(401),o=s(563),n="data-original-",a="tabindex",r=function(e,t){var s=e.getAttribute(n+t);null!==s&&(""===s?i(e,t):e.setAttribute(t,s),i(e,n+t))};e.exports=function(e){r(e,a),r(e,o.HIDDEN);for(var t=e.querySelectorAll(`[${n+a}]`),s=t.length;s--;)r(t[s],a)}},938:(e,t,s)=>{"use strict";var i=s(173);e.exports=function e(t,s){s=s||document.body;for(var o=t,n=t;o=o.previousElementSibling;)i(o);for(;n=n.nextElementSibling;)i(n);t.parentElement&&t.parentElement!==s&&e(t.parentElement,s)}},563:e=>{"use strict";e.exports={AUTOCOMPLETE:"aria-autocomplete",CHECKED:"aria-checked",DISABLED:"aria-disabled",EXPANDED:"aria-expanded",HASPOPUP:"aria-haspopup",HIDDEN:"aria-hidden",INVALID:"aria-invalid",LABEL:"aria-label",LEVEL:"aria-level",MULTILINE:"aria-multiline",MULTISELECTABLE:"aria-multiselectable",ORIENTATION:"aria-orientation",PRESSED:"aria-pressed",READONLY:"aria-readonly",REQUIRED:"aria-required",SELECTED:"aria-selected",SORT:"aria-sort",VALUEMAX:"aria-valuemax",VALUEMIN:"aria-valuemin",VALUENOW:"aria-valuenow",VALUETEXT:"aria-valuetext",ATOMIC:"aria-atomic",BUSY:"aria-busy",LIVE:"aria-live",RELEVANT:"aria-relevant",DROPEFFECT:"aria-dropeffect",GRABBED:"aria-grabbed",ACTIVEDESCENDANT:"aria-activedescendant",CONTROLS:"aria-controls",DESCRIBEDBY:"aria-describedby",FLOWTO:"aria-flowto",LABELLEDBY:"aria-labelledby",OWNS:"aria-owns",POSINSET:"aria-posinset",SETSIZE:"aria-setsize"}},73:e=>{"use strict";e.exports={selectors:["input","select","textarea","button","optgroup","option","menuitem","fieldset","object","a[href]","[tabindex]","[contenteditable]"].join(","),nodeName:{INPUT:"input",SELECT:"select",TEXTAREA:"textarea",BUTTON:"button",OPTGROUP:"optgroup",OPTION:"option",MENUITEM:"menuitem",FIELDSET:"fieldset",OBJECT:"object",A:"a"}}},44:e=>{"use strict";e.exports=function(e){return!(!e||!e.nodeType)}},350:(e,t,s)=>{"use strict";e.exports={EventEmitterMicro:s(10)}},10:e=>{"use strict";function t(){this._events={}}let s=t.prototype;s.on=function(e,t){return this._events[e]=this._events[e]||[],this._events[e].unshift(t),t},s.once=function(e,t){let s=this;return this.on(e,(function i(o){s.off(e,i),void 0!==o?t(o):t()}))},s.off=function(e,t){if(!this.has(e))return;if(1===arguments.length)return this._events[e]=null,void delete this._events[e];let s=this._events[e].indexOf(t);-1!==s&&this._events[e].splice(s,1)},s.trigger=function(e,t){if(this.has(e))for(let s=this._events[e].length-1;s>=0;s--)void 0!==t?this._events[e][s](t):this._events[e][s]()},s.has=function(e){return e in this._events!=0&&0!==this._events[e].length},s.destroy=function(){for(let e in this._events)this._events[e]=null;this._events=null},e.exports=t},144:(e,t,s)=>{const i=s(10),o=s(897),n="keydown",a="keyup";e.exports=class extends i{constructor(e){super(),this._keysDown={},this._DOMKeyDown=this._DOMKeyDown.bind(this),this._DOMKeyUp=this._DOMKeyUp.bind(this),this._context=e||document,this._context.addEventListener(n,this._DOMKeyDown,!0),this._context.addEventListener(a,this._DOMKeyUp,!0)}onDown(e,t){return this.on(n+":"+e,t)}onceDown(e,t){return this.once(n+":"+e,t)}offDown(e,t){return this.off(n+":"+e,t)}onUp(e,t){return this.on(a+":"+e,t)}onceUp(e,t){return this.once(a+":"+e,t)}offUp(e,t){return this.off(a+":"+e,t)}isDown(e){return e+="",this._keysDown[e]||!1}isUp(e){return!this.isDown(e)}destroy(){return this._context.removeEventListener(n,this._DOMKeyDown,!0),this._context.removeEventListener(a,this._DOMKeyUp,!0),this._keysDown=null,this._context=null,super.destroy(),this}_DOMKeyDown(e){var t=this._normalizeKeyboardEvent(e),s=t.keyCode+="";this._trackKeyDown(s),this.trigger(n+":"+s,t)}_DOMKeyUp(e){var t=this._normalizeKeyboardEvent(e),s=t.keyCode+="";this._trackKeyUp(s),this.trigger(a+":"+s,t)}_normalizeKeyboardEvent(e){return new o(e)}_trackKeyUp(e){this._keysDown[e]&&(this._keysDown[e]=!1)}_trackKeyDown(e){this._keysDown[e]||(this._keysDown[e]=!0)}}},840:(e,t,s)=>{"use strict";const i=s(144);e.exports=new i},897:(e,t,s)=>{"use strict";const i=s(481),o=["keyLocation","keyIdentifier"],n="keyCode";e.exports=class{constructor(e){this.originalEvent=e;for(let t in e)-1===o.indexOf(t)&&"function"!=typeof e[t]&&(this[t]=e[t]);this[n]||(this[n]=this._getKeyCode()),this.location=void 0!==this.originalEvent.location?this.originalEvent.location:this.originalEvent.keyLocation}preventDefault(){if("function"==typeof this.originalEvent.preventDefault)return this.originalEvent.preventDefault();this.originalEvent.returnValue=!1}stopPropagation(){return this.originalEvent.stopPropagation()}_getKeyCode(){return i[this.code]||-1}}},481:e=>{"use strict";e.exports={Backspace:8,Tab:9,Enter:13,NumpadEnter:13,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,CapsLock:20,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Delete:46,Digit0:48,Digit1:49,Digit2:50,Digit3:51,Digit4:52,Digit5:53,Digit6:54,Digit7:55,Digit8:56,Digit9:57,KeyA:65,KeyB:66,KeyC:67,KeyD:68,KeyE:69,KeyF:70,KeyG:71,KeyH:72,KeyI:73,KeyJ:74,KeyK:75,KeyL:76,KeyM:77,KeyN:78,KeyO:79,KeyP:80,KeyQ:81,KeyR:82,KeyS:83,KeyT:84,KeyU:85,KeyV:86,KeyW:87,KeyX:88,KeyY:89,KeyZ:90,Numpad0:96,Numpad1:97,Numpad2:98,Numpad3:99,Numpad4:100,Numpad5:101,Numpad6:102,Numpad7:103,Numpad8:104,Numpad9:105,NumpadMultiply:106,NumpadAdd:107,NumpadSubtract:109,NumpadDecimal:110,NumpadDivide:111,NumpadEqual:187,Backquote:192,BracketLeft:219,BracketRight:221,Backslash:220,Semicolon:186,Quote:222,Space:32,Equal:187,Comma:188,Minus:189,Period:190,Slash:191}},754:e=>{"use strict";e.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CONTROL:17,ALT:18,COMMAND:91,CAPSLOCK:20,ESCAPE:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ASTERISK:106,NUMPAD_PLUS:107,NUMPAD_DASH:109,NUMPAD_DOT:110,NUMPAD_SLASH:111,NUMPAD_EQUALS:187,TICK:192,LEFT_BRACKET:219,RIGHT_BRACKET:221,BACKSLASH:220,SEMICOLON:186,APOSTROPHE:222,SPACEBAR:32,CLEAR:12,COMMA:188,DOT:190,SLASH:191}},375:(e,t,s)=>{"use strict";s.d(t,{Z:()=>_});var i=s(10),o=s.n(i),n=s(44),a=s.n(n),r=s(754);const l={PageOverlay:{ClassNames:["modal-page-overlay"]},FullBleed:{ClassNames:["modal-full-bleed"]},Open:{Document:{ClassNames:["has-modal"]},Container:{ClassNames:["modal-open"]}},Close:{Selector:"[data-modal-close]"},Elements:{container:{Attributes:{class:"modal"},Template:''},contentContainer:{Selector:"[data-modal-element-content-container]"},closeButton:{Attributes:{class:"modal-close-button","data-modal-close":"","aria-label":"Close"},ParentSelector:"[data-modal-close-button-parent]",Template:''},closeIcon:{Attributes:{class:"modal-close-icon","data-modal-close":""}}},DialogRole:{Selector:"[data-modal-element-overlay]",Attributes:{"aria-modal":"true",role:"dialog",tabindex:"-1","aria-hidden":"true"}},Keyboard:{close:{keys:[s.n(r)().ESCAPE]},open:{keys:[]}},Events:{CONTENT_APPENDED:"contentappended",RENDERED:"rendered",WILLOPEN:"willopen",OPEN:"open",WILLCLOSE:"willclose",CLOSE:"close",CONTENT_REMOVED:"contentremoved"}};var h=s(946),d=s.n(h);const c={beforeCreate(){document.body._animInfo?(this.anim=document.body._animInfo.group.anim,this._setViewport(this.anim.model.pageMetrics)):(this.viewportEmitterMicro=new(d()),this.viewportEmitterMicro.CHANGE_EVENTS=d().CHANGE_EVENTS,this._setViewport(this.viewportEmitterMicro))},onBreakpointChange(e){this._setViewport(e),this._setPreviousViewport(e)},onOpen(){this.opened=!0},onClose(){this.opened=!1},_setViewport(e){this._viewport=this.anim?this._getValidViewport(e.breakpoint):this._getValidViewport(e.viewport)},_setPreviousViewport(e){this._previousViewport=this.anim?this._getValidViewport(e.previousBreakpoint):this._getValidViewport(e.oldViewport)},_getValidViewport(e){const t={X:"L",L:"L",M:"M",S:"S"};if(!Object.keys(t).includes(e))throw`The viewport ${e} is not valid. Valid viewports are: ${Object.keys(t)}`;return t[e]||""}},m={created(){this._createModalElements()},beforeMount(){this._setDialogAriaLabel(),this.appendModalElements()},destroy(){document.body.removeChild(this.elements.container),this._releaseEvents();for(let e in this)Object.prototype.hasOwnProperty.call(this,e)&&(this[e]=null)},getModalElementKey(e){let t;for(const s in e.dataset)if(s.includes("modalElement")){const e=s.substring(12);t=e[0].toLowerCase()+e.slice(1)}return t},appendContentElement(){this.appendContent(this.elements.content,this.elements.contentContainer),this.trigger(this.model.Events.CONTENT_APPENDED)},appendModalElements(){document.body.appendChild(this.elements.container),this.trigger(this.model.Events.RENDERED)},_createModalElements(){this._createTemplates(),this._createElementsFromTemplate();for(const e in this.templates)this._setChildElements(this.elements[e]);this._setDialogRoleElement(),this._setElementAttributes(),this.appendContentElement()},_createTemplates(){for(const e in this.model.Elements){const t=this.model.Elements[e].Template;t&&!this.templates[e]&&(this.templates[e]=t)}},_createElementsFromTemplate(){for(const e in this.templates)this.elements[e]=(new DOMParser).parseFromString(this.templates[e],"text/html").body.childNodes[0]},_setChildElements(e){[...e.children].forEach((e=>{this.getModalElementKey(e)&&(this.elements[this.getModalElementKey(e)]=e),this._setChildElements(e)}))},_setDialogRoleElement(){this.dialogRoleElement||(this.dialogRoleElement=this.elements.container.querySelector(this.model.DialogRole.Selector)||this.elements.container);for(const e in this.model.DialogRole.Attributes)this.dialogRoleElement.setAttribute(e,this.model.DialogRole.Attributes[e])},_setElementAttributes(){let e={},t={};for(const t in this.model.Elements)this.model.Elements[t].Attributes&&(e[t]=this.model.Elements[t].Attributes);for(const s in e){t[s]=Object.assign({},e[s],this.options.attributes[s]);for(const s in this.options.attributes)"undefined"!==t[s]&&(t[s]=Object.assign({},e[s],this.options.attributes[s]))}for(const e in t)for(const s in t[e]){let i=t[e][s];if(!this.elements[e])return;"class"===s?(Array.isArray(i)&&(i=i.join(" ")),this.elements[e].className=`${this.elements[e].className} ${i}`.trim()):this.elements[e].setAttribute(s,i)}},_setDialogAriaLabel(){if(this.elements.content&&this.elements.content.dataset.modalDialogLabel){let e=this.elements.content.dataset.modalDialogLabel;this.dialogRoleElement.setAttribute("aria-label",e)}else this.dialogRoleElement.hasAttribute("aria-label")||this.dialogRoleElement.hasAttribute("aria-labelledby")||this.dialogRoleElement.setAttribute("aria-label","Modal")}},p={created(){this.options.gum||this._isVue||(this.anim?(this.anim.on(this.anim.model.PageEvents.ON_RESIZE_IMMEDIATE,this.onResizeImmediate),this.anim.on(this.anim.model.PageEvents.ON_RESIZE_DEBOUNCED,this.onResizeDebounced),this.anim.on(this.anim.model.PageEvents.ON_BREAKPOINT_CHANGE,this.onBreakpointChange)):(window.addEventListener("resize",this.onResizeImmediate),this.viewportEmitterMicro.on(this.viewportEmitterMicro.CHANGE_EVENTS.VIEWPORT,this.onBreakpointChange)),this._mountedRaf=requestAnimationFrame(this.mounted))},onResizeImmediate(){this.anim||(window.clearTimeout(this._resizeTimeout),this._resizeTimeout=window.setTimeout(this.onResizeDebounced,250))},destroy(){cancelAnimationFrame(this._mountedRaf),this.anim?(this.anim.off(this.anim.model.PageEvents.ON_RESIZE_IMMEDIATE,this.onResizeImmediate),this.anim.off(this.anim.model.PageEvents.ON_RESIZE_DEBOUNCED,this.onResizeDebounced),this.anim.off(this.anim.model.PageEvents.ON_BREAKPOINT_CHANGE,this.onBreakpointChange)):(window.removeEventListener("resize",this.onResizeImmediate),this.viewportEmitterMicro.off(this.viewportEmitterMicro.CHANGE_EVENTS.VIEWPORT,this.onBreakpointChange))}},u=["beforeCreate","created","beforeMount","mounted","onWillOpen","onOpen","onWillClose","onClose","onResizeImmediate","onBreakpointChange","onResizeDebounced","destroy"],E={attributes:{}};class b extends(o()){constructor(e,t=E){super(t),this.elements={},this.elements.content=e,this.options=t,this.opened=!1,this.model=Object.assign({},JSON.parse(JSON.stringify(l))),this.templates={},u.forEach((e=>{this[e]=(...t)=>{this[`__${e}`]&&this[`__${e}`].forEach((e=>e.apply(this,t)))}})),this._bindEvents(),["beforeCreate","created","beforeMount"].forEach((e=>this[e](t)))}appendContent(e,t){a()(e)&&(t=t&&a()(t)?t:this.elements.contentContainer).appendChild(e)}removeContent(e){e?(this.elements.container.contains(e)&&e.remove(),this.trigger(this.model.Events.CONTENT_REMOVED)):this._emptyContent()}scrollToModalTop(){this.elements.container.scrollTop=0}_emptyContent(){this.elements.contentContainer.innerHTML=""}_bindEvents(){this.on(this.model.Events.WILLOPEN,this.onWillOpen),this.on(this.model.Events.OPEN,this.onOpen),this.on(this.model.Events.WILLCLOSE,this.onWillClose),this.on(this.model.Events.CLOSE,this.onClose)}_releaseEvents(){this.off(this.model.Events.WILLOPEN,this.onWillOpen),this.off(this.model.Events.OPEN,this.onOpen),this.off(this.model.Events.WILLCLOSE,this.onwillClose),this.off(this.model.Events.CLOSE,this.onClose)}static withMixins(...e){const t=class extends b{},s=t.prototype;return[c,...e,p,m].forEach((e=>{for(const t in e)u.includes(t)?(s[`__${t}`]=s[`__${t}`]||[],s[`__${t}`].push(e[t])):s[t]=e[t]})),t}}const _=b},405:(e,t,s)=>{const i=s(840);e.exports={beforeCreate(){this._keysToOpen=this.model.Keyboard.open.keys,this._keysToClose=this.model.Keyboard.close.keys,this._enabledKeysToOpen=[],this._enabledKeysToClose=[]},onWillOpen(){this._keysToOpen.forEach(this.disableKeyToOpen,this),this._keysToClose.forEach(this.enableKeyToClose,this)},onWillClose(){this._keysToOpen.forEach(this.enableKeyToOpen,this),this._keysToClose.forEach(this.disableKeyToClose,this)},destroy(){this._keysToOpen.forEach(this.disableKeyToOpen,this),this._keysToClose.forEach(this.disableKeyToClose,this)},addKeyToOpen(e){-1===this._keysToOpen.indexOf(e)&&(this._keysToOpen.push(e),this.enableKeyToOpen(e))},addKeyToClose(e){-1===this._keysToClose.indexOf(e)&&(this._keysToClose.push(e),this.enableKeyToClose(e))},removeKeyToOpen(e){const t=this._keysToOpen.indexOf(e);-1!==t&&(this._keysToOpen.splice(t,1),this.disableKeyToOpen(e))},removeAllKeysToOpen(){this._keysToOpen.forEach(this.disableKeyToOpen,this),this._keysToOpen.splice(0,this._keysToOpen.length)},removeKeyToClose(e){const t=this._keysToClose.indexOf(e);-1!==t&&(this._keysToClose.splice(t,1),this.disableKeyToClose(e))},removeAllKeysToClose(){this._keysToClose.forEach(this.disableKeyToClose,this),this._keysToClose.splice(0,this._keysToClose.length)},enableKeyToOpen(e){-1===this._enabledKeysToOpen.indexOf(e)&&(i.onUp(e,this.open,this),this._enabledKeysToOpen.push(e))},enableKeyToClose(e){-1===this._enabledKeysToClose.indexOf(e)&&(i.onUp(e,this.close,this),this._enabledKeysToClose.push(e))},disableKeyToOpen(e){const t=this._enabledKeysToOpen.indexOf(e);-1!==t&&(i.offUp(e,this.open,this),this._enabledKeysToOpen.splice(t,1))},disableKeyToClose(e){const t=this._enabledKeysToClose.indexOf(e);-1!==t&&(i.offUp(e,this.close,this),this._enabledKeysToClose.splice(t,1))}}},255:(e,t,s)=>{"use strict";s.r(t),s.d(t,{Close:()=>i,CloseBundle:()=>b,CloseButton:()=>o,Focus:()=>h,FullBleed:()=>d,FullBleedBundle:()=>_,Keyboard:()=>m(),Open:()=>p,PageOverlay:()=>u,PageOverlayBundle:()=>f,ScrollPosition:()=>E});const i={created(){this.close=this.close.bind(this)},onWillOpen(){this._attachCloseEvents()},onClose(){this._removeCloseEvents(),document.documentElement.classList.remove(...this.model.Open.Document.ClassNames),this.elements.container.classList.remove(...this.model.Open.Container.ClassNames)},mounted(){this.close.elements=Array.from(document.querySelectorAll(this.model.Close.Selector))},destroy(){this.close()},close(e){this.opened&&(e&&"click"===e.type&&!this.close.elements.includes(e.target)||(this.trigger(this.model.Events.WILLCLOSE),this.trigger(this.model.Events.CLOSE)))},_removeCloseEvents(){this.elements.container&&this.elements.container.removeEventListener("click",this.close)},_attachCloseEvents(){this.elements.container&&this.elements.container.addEventListener("click",this.close)}},o={created(){this.onCloseButtonClick=this.onCloseButtonClick.bind(this)},beforeMount(){this._setCloseAriaLabel(),this.appendCloseButton()},mounted(){this.elements.closeButton.addEventListener("click",this.onCloseButtonClick)},destroy(){this.elements.closeButton.removeEventListener("click",this.onCloseButtonClick)},appendCloseButton(){(this.elements.container.querySelector(this.model.Elements.closeButton.ParentSelector)||this.elements.container).appendChild(this.elements.closeButton)},onCloseButtonClick(e){this.close(e)},_setCloseAriaLabel(){if(this.elements.content&&this.elements.content.dataset.modalCloseLabel){let e=this.elements.content.dataset.modalCloseLabel;this.elements.closeButton.setAttribute("aria-label",e)}}};var n=s(142),a=s.n(n),r=s(697),l=s.n(r);const h={created(){this.scrollToModalTop=this.scrollToModalTop.bind(this)},mounted(){l().getTabbableElements(this.dialogRoleElement).length&&(this._circularTab=new(a())(this.dialogRoleElement))},onOpen(){this._giveModalFocus()},onWillClose(){this._removeModalFocus()},destroy(){clearTimeout(this._focusTimeout),this._removeModalFocus(),this._circularTab&&this._circularTab.destroy()},_giveModalFocus(){this.dialogRoleElement.removeAttribute("aria-hidden"),this.elements.container.classList.add("modal-touch-lock"),this._activeElement=document.activeElement,this._circularTab&&this._circularTab.start(!0),this.elements.container.addEventListener("scroll",this.scrollToModalTop),this._focusTimeout=setTimeout((()=>{this.dialogRoleElement.focus({preventScroll:!0}),requestAnimationFrame((()=>{this.elements.container.removeEventListener("scroll",this.scrollToModalTop),this.elements.container.classList.remove("modal-touch-lock")}))}),300)},_removeModalFocus(){this._circularTab&&this._circularTab.stop(),this.dialogRoleElement.setAttribute("aria-hidden","true"),this.elements.container.removeEventListener("scroll",this.scrollToModalTop),this._activeElement&&(this._activeElement.focus(),this._activeElement=null)}},d={beforeCreate(){this.model.Open.Document.ClassNames.push("has-modal-full-bleed")},beforeMount(){this.elements.container.classList.add(...this.model.FullBleed.ClassNames)},destroy(){this.elements.container.classList.remove(...this.model.FullBleed.ClassNames)}};var c=s(405),m=s.n(c);const p={created(){this.open=this.open.bind(this)},onWillOpen(){document.documentElement.classList.add(...this.model.Open.Document.ClassNames),this.elements.container.classList.add(...this.model.Open.Container.ClassNames),this.scrollToModalTop()},open(){this.opened||(this.trigger(this.model.Events.WILLOPEN),this.trigger(this.model.Events.OPEN))}},u={beforeCreate(){this.model.Open.Document.ClassNames.push("has-modal-page-overlay"),this._scrollBarWidth=0},beforeMount(){this.elements.container.classList.add(...this.model.PageOverlay.ClassNames)},mounted(){this._saveScrollBarWidth()},onResizeDebounced(){this.opened||this._saveScrollBarWidth()},onWillOpen(){document.documentElement.style.setProperty("--modal-scrollbar-buffer",this._scrollBarWidth)},onClose(){document.documentElement.style.removeProperty("--modal-scrollbar-buffer")},destroy(){this.elements.container.classList.remove(...this.model.PageOverlay.ClassNames)},_saveScrollBarWidth(){this._scrollBarWidth=window.innerWidth-document.body.clientWidth+"px"}},E={created(){this._scrollX=0,this._scrollY=0},onWillOpen(){this._saveScrollPosition()},onClose(){this._restoreScrollPosition()},_saveScrollPosition(){this._scrollX=document.documentElement.scrollLeft,this._scrollY=document.documentElement.scrollTop},_restoreScrollPosition(){window.scrollTo(this._scrollX,this._scrollY)}},b=[i,o],_=[...b,h,m(),p,d,E],f=[...b,h,m(),p,u,E]},946:(e,t,s)=>{"use strict";const i=s(350).EventEmitterMicro,o=[{name:"S",mediaQuery:"only screen and (max-width: 734px)"},{name:"M",mediaQuery:"only screen and (min-width: 735px) and (max-width: 1068px)"},{name:"L",mediaQuery:"only screen and (min-width: 1069px) and (max-width: 1440px)"},{name:"X",mediaQuery:"only screen and (min-width: 1441px)"}],n="only screen and (-webkit-min-device-pixel-ratio: 1.5), screen and (min-resolution: 1.5dppx), screen and (min-resolution: 144dpi)",a="only screen and (orientation: portrait)";class r extends i{constructor(e={}){super(),this.BREAKPOINTS=e.breakpoints||o,this._setupProperties(),this._onRetinaChange=this._onRetinaChange.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this.listenersAdded={orientation:!1,retina:!1,viewport:!1}}static get CHANGE_EVENTS(){return{ORIENTATION:"change:orientation",RETINA:"change:retina",VIEWPORT:"change:viewport"}}on(){this._setupListeners(arguments[0]),super.on.apply(this,arguments)}_onRetinaChange(){this.trigger(r.CHANGE_EVENTS.RETINA,this)}_onOrientationChange(){this.trigger(r.CHANGE_EVENTS.ORIENTATION,this)}_setupProperties(){Object.defineProperty(this,"retina",{get:()=>window.matchMedia(n).matches}),Object.defineProperty(this,"orientation",{get:()=>window.matchMedia(a).matches?"portrait":"landscape"}),this.viewport=this.getBreakpoint()}_setupListeners(e){if(e!==r.CHANGE_EVENTS.RETINA||this.listenersAdded.retina||(window.matchMedia(n).addListener(this._onRetinaChange),this.listenersAdded.retina=!0),e!==r.CHANGE_EVENTS.ORIENTATION||this.listenersAdded.orientation||(window.matchMedia(a).addListener(this._onOrientationChange),this.listenersAdded.orientation=!0),e===r.CHANGE_EVENTS.VIEWPORT&&!this.listenersAdded.viewport){for(let e=0;e{e.matches&&(this.oldViewport=this.viewport,this.viewport=t.name,this.trigger(r.CHANGE_EVENTS.VIEWPORT,this))}))}this.listenersAdded.viewport=!0}}getBreakpoint(){for(let e=0;e{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=s(946);const t={ref:{},events:[],useViewportListeners:!1},i=["destroy"],o=["onViewportChange","onOrientationChange","onRetinaChange","onScreenChange"];class n{constructor(s,...n){this.options=Object.assign({},t,s),this.hasEventsBeenAdded=!1,this.isDestroyed=!1,this.queue=[],this.events=[...new Set(this.options[this.options.lifeCycles?"lifeCycles":"events"].concat(i))],this.mixinsList=[{destroy:this.destroyBefore.bind(this)},...n.flat().map((e=>e.default&&e.default()||"function"==typeof e&&e()||e)),{destroy:this.destroyAfter.bind(this)}],this.options.ref._viewport&&(this.options.viewportID=this.options.ref._viewport._id,this.options.useViewportListeners=!0),this.options.useViewportListeners&&(this.events=[...new Set(this.events.concat(o))],this.options.ref._viewport=this.options.ref._viewport||new e(this.options.viewportID,{breakpoints:this.options.viewportBreakpoints}),this.options.ref._viewport.on("change:viewport",(e=>this.options.ref.onViewportChange(e)&&this.options.ref.onScreenChange(e)&&this.checkEnabledMixins())),this.options.ref._viewport.on("change:orientation",(e=>this.options.ref.onOrientationChange(e)&&this.options.ref.onScreenChange(e))),this.options.ref._viewport.on("change:retina",(e=>this.options.ref.onRetinaChange(e)&&this.options.ref.onScreenChange(e))));const a={set:(e,t,s)=>{if(this.__isEvent(t)&&this.hasEventsBeenAdded)throw new Error(`Cannot reassign an event: ${t}`);return e[t]=s,!0}};this.ref=new Proxy(s.ref,a),this.update(),this.checkEnabledMixins()}__isEvent(e){return this.events.includes(e)}destroyBefore(){this.options.useViewportListeners&&(this.options.ref._viewport.off("change:viewport"),this.options.ref._viewport.off("change:orientation"),this.options.ref._viewport.off("change:retina"),this.options.ref._viewport=null)}destroyAfter(){for(let e in this.ref)Object.prototype.hasOwnProperty.call(this.ref,e)&&Object.keys(this.methodList).includes(e)&&(this.ref[e]=()=>{})}update(){this.methodList={};for(let e of this.events)this.methodList[e]=(...t)=>this.__triggerEvent(e,t);for(let e of this.mixinsList)for(let t in e)"function"!=typeof e[t]||this.__isEvent(t)||(this.methodList[t]=(...e)=>this.__triggerMethod(t,e));return this.hasEventsBeenAdded=!1,Object.assign(this.ref,this.methodList),this.hasEventsBeenAdded=!0,this.ref}addEvents(...e){this.events=[...new Set(this.events.concat(e))],this.update()}checkEnabledMixins(){const e=[],t=[];for(let s of this.mixinsList){const i=!this.options.useViewportListeners||!s._viewports||s._viewports.includes(this.ref._viewport.viewport);switch(!0){case!1===s._isEnabled&&i:e.push(s);break;case!0===s._isEnabled&&!i:t.push(s);break;default:s._isEnabled=i}}for(let e of t.reverse())e.destroy&&e.destroy.call(this.ref),e._isEnabled=!1;for(let t of e){t._isEnabled=!0;for(let e of this.options.setupEvents)t[e]&&t[e].call(this.ref)}}get enabledMixins(){return this.mixinsList.filter((e=>e._isEnabled))}destroy(){this.__triggerEvent("destroy")}complete(){}__triggerEvent(e,t=[]){if(!this.isDestroyed){for("destroy"==e&&(this.isDestroyed=!0,this.hasEventsBeenAdded=!1),this.queue.unshift(e);this.queue.length;){const e=this.queue[0],s=this.enabledMixins.reduce(((t,s)=>(s[e]&&t.push(s[e]),t)),[]);this.queue.shift();for(let e=0;e(s[e]&&(t=s[e]),t)),(()=>{})).call(this.ref,...t)}}const a={Indeterminate:{Template:'
\n \n
'},Show:{Visible:{Attributes:{class:["progress-indicator-visible"]}}}},r={destroy(){this.el.removeChild(this.progressIndicator),this.mixins.destroy()},_setElementAttributes(e,t){for(let s in t){let i=t[s];if(!e||!i)return;"class"===s?e.classList.add(...[i].flat().filter((e=>e))):e.setAttribute(s,i)}},_removeElementAttributes(e,t){for(let s in t){let i=t[s];if(!e||!i)return;"class"===s?e.classList.remove(...[i].flat().filter((e=>e))):e.removeAttribute(s,i)}}},l={created(){this.progressIndicator=(new DOMParser).parseFromString(this.template,"text/html").body.childNodes[0],this._setElementAttributes(this.progressIndicator,this.options.attributes)},mounted(){this.el.appendChild(this.progressIndicator)}},h={attributes:{}};class d{constructor(e,t=h){const s={ref:this,lifeCycles:["beforeCreate","created","beforeMount","mounted","onShow","onHide","destroy"]};Object.assign(this,{el:e,isVisible:!1,mixins:new n(s,l,...t.mixins,r),model:JSON.parse(JSON.stringify(a)),options:t}),void 0===this.options.autoInitLifeCycles&&(this.options.autoInitLifeCycles=!0),this.options.autoInitLifeCycles&&this.beforeCreate().created().beforeMount().mounted()}}const c=[{beforeCreate(){this.template=this.model.Indeterminate.Template}},{onShow(){this._setElementAttributes(this.progressIndicator,this.model.Show.Visible.Attributes),this.options.loadingElement&&this.options.loadingElement.setAttribute("aria-hidden",!0),this.isVisible=!0},show(){this.onShow()}},{onHide(){this._removeElementAttributes(this.progressIndicator,this.model.Show.Visible.Attributes),this.options.loadingElement&&this.options.loadingElement.removeAttribute("aria-hidden"),this.isVisible=!1},destroy(){this.hide()},hide(){this.onHide()}}],m=s(375).Z,{PageOverlayBundle:p,FullBleedBundle:u}=s(255);document.addEventListener("DOMContentLoaded",(function(){const e={};Array.from(document.getElementsByClassName("ac-modal")).forEach((t=>{const s=new(m.withMixins(..."fullBleed"==t.dataset.variant?u:p))(t,{attributes:{overlay:{"aria-labelledby":"modal-headline"},container:{class:`seedkit-component-standalone modal-crossfade modal-curtain-blur ${"wide"==t.dataset.width?"modal-wide":""} ${"link"==t.dataset.type?"modal-no-padding":""}`}}}),i=t.getAttribute("id");e[i]=s})),Array.from(document.getElementsByClassName("ac-modal-trigger")).forEach((t=>{t.addEventListener("click",(()=>{const s=t.getAttribute("data-modal-target"),i=e[s];i&&i.open()}))})),Array.from(document.getElementsByClassName("ac-progress-indicator")).forEach((e=>{new d(e,{mixins:[c],attributes:{class:["progress-indicator-immediate","progress-indicator-curtain"]}}).show()}))})) // Adding a hack within this minified code to allow us to refresh modals that are dynamically loaded (e.g. via AJAX) window.refreshModals = function() { const e = {}; const elementsToUpdate = []; // The '.ac-modal-trigger + .ac-modal' selector means that there is a modal trigger immediately followed by a modal in the DOM. This indicates that these modals are not yet initialized and we should initialize them since initialized modals are moved to the end of document.body Array.from(document.querySelectorAll(".ac-modal-trigger + .ac-modal")).forEach((t => { // If applicable, clean up any old modals that are disconnected from their trigger due to dynamically loaded content const $oldModalToDelete = document.querySelector(`body .modal #${t.getAttribute("id")}`); if ($oldModalToDelete) { const $root = $oldModalToDelete.closest('.modal.seedkit-component-standalone'); if ($root) { $root.remove(); } } elementsToUpdate.push(t); })); elementsToUpdate.forEach((t => { const $trigger = t.closest('.seedkit-component-standalone').querySelector('.ac-modal-trigger'); // Initialize the modal (should match minified logic above) const s = new(m.withMixins(..."fullBleed" == t.dataset.variant ? u : p))(t, { attributes: { overlay: { "aria-labelledby": "modal-headline" }, container: { class: `seedkit-component-standalone modal-crossfade modal-curtain-blur ${"wide"==t.dataset.width?"modal-wide":""} ${"link"==t.dataset.type?"modal-no-padding":""}` } } }), i = t.getAttribute("id"); e[i] = s // Finally, initialize the trigger (should match minified logic above) $trigger.addEventListener("click", (() => { const s = $trigger.getAttribute("data-modal-target"), i = e[s]; i && i.open() // Rebind custom logic from ac-modal-custom.js onModalTriggerClick($trigger, t) })) })); } })()})();