UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

2 lines 66.8 kB
/*! DSFR v1.12.1 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ !function(){"use strict";var t="fr",e="dsfr",i=window[e],n=i.internals.ns.selector("accordion"),s=i.internals.ns.selector("collapse"),o={GROUP:i.internals.ns.selector("accordions-group"),ACCORDION:n,COLLAPSE:n+" > "+s+", "+n+" > *:not("+n+"):not("+s+") > "+s+", "+n+" > *:not("+n+"):not("+s+") > *:not("+n+"):not("+s+") > "+s,COLLAPSE_LEGACY:n+" "+s,BUTTON:n+"__btn"},r=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={collapsePrimary:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Accordion"},i.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(o.BUTTON)}))[0]},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),a=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"AccordionsGroup"},e.prototype.validate=function(e){var n=e.node.matches(i.internals.legacy.isLegacy?o.COLLAPSE_LEGACY:o.COLLAPSE);return t.prototype.validate.call(this,e)&&n},Object.defineProperties(e,n),e}(i.core.CollapsesGroup);i.accordion={Accordion:r,AccordionSelector:o,AccordionsGroup:a},i.internals.register(i.accordion.AccordionSelector.GROUP,i.accordion.AccordionsGroup),i.internals.register(i.accordion.AccordionSelector.ACCORDION,i.accordion.Accordion);var c={EQUISIZED_BUTTON:i.internals.ns.selector("btns-group--equisized")+" "+i.internals.ns.selector("btn"),EQUISIZED_GROUP:i.internals.ns.selector("btns-group--equisized")};i.button={ButtonSelector:c},i.internals.register(i.button.ButtonSelector.EQUISIZED_BUTTON,i.core.Equisized),i.internals.register(i.button.ButtonSelector.EQUISIZED_GROUP,i.core.EquisizedsGroup);var l=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"CardDownload"},e.prototype.init=function(){var t=this;this.addAscent(i.core.AssessEmission.UPDATE,(function(e){t.descend(i.core.AssessEmission.UPDATE,e)})),this.addAscent(i.core.AssessEmission.ADDED,(function(){t.descend(i.core.AssessEmission.ADDED)}))},Object.defineProperties(e,n),e}(i.core.Instance),p={DOWNLOAD:i.internals.ns.selector("card--download"),DOWNLOAD_DETAIL:i.internals.ns.selector("card--download")+" "+i.internals.ns.selector("card__end")+" "+i.internals.ns.selector("card__detail")};i.card={CardSelector:p,CardDownload:l},i.internals.register(i.card.CardSelector.DOWNLOAD,i.card.CardDownload),i.internals.register(i.card.CardSelector.DOWNLOAD_DETAIL,i.core.AssessDetail);var h={INPUT:i.internals.ns.selector("checkbox-group")+' input[type="checkbox"]'},u={CHANGE:i.internals.ns.emission("checkbox","change"),RETRIEVE:i.internals.ns.emission("checkbox","retrieve")},d=function(t){function e(){t.call(this),this._handlingChange=this.handleChange.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isChecked:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"CheckboxInput"},e.prototype.init=function(){this.node.addEventListener("change",this._handlingChange),this.addDescent(u.RETRIEVE,this._handlingChange),this.handleChange()},i.isChecked.get=function(){return this.node.checked},e.prototype.handleChange=function(){this.ascend(u.CHANGE,this.node)},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance);i.checkbox={CheckboxSelector:h,CheckboxEmission:u,CheckboxInput:d},i.internals.register(i.checkbox.CheckboxSelector.INPUT,i.checkbox.CheckboxInput);var f={SEGMENTED:i.internals.ns.selector("segmented"),SEGMENTED_ELEMENTS:i.internals.ns.selector("segmented__elements"),SEGMENTED_ELEMENT:i.internals.ns.selector("segmented__element input"),SEGMENTED_LEGEND:i.internals.ns.selector("segmented__legend")},g={ADDED:i.internals.ns.emission("segmented","added"),REMOVED:i.internals.ns.emission("segmented","removed")},_=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Segmented"},e.prototype.init=function(){this.elements=this.node.querySelector(f.SEGMENTED_ELEMENTS),this.legend=this.node.querySelector(f.SEGMENTED_LEGEND),this.addAscent(g.ADDED,this.resize.bind(this)),this.addAscent(g.REMOVED,this.resize.bind(this)),this._isLegendInline=this.legend&&this.legend.classList.contains(i.prefix+"-segmented__legend--inline"),this.isResizing=!0},e.prototype.resize=function(){var t=i.prefix+"-segmented--vertical",e=i.prefix+"-segmented__legend--inline";this.removeClass(t),this._isLegendInline&&(this.legend.classList.add(e),(this.node.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth+this.legend.offsetWidth+16>this.node.parentNode.offsetWidth)&&this.legend.classList.remove(e)),this.elements.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth>this.node.parentNode.offsetWidth?this.addClass(t):this.removeClass(t)},Object.defineProperties(e,n),e}(i.core.Instance),b=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"SegmentedElement"},e.prototype.init=function(){this.ascend(g.ADDED)},e.prototype.dispose=function(){this.ascend(g.REMOVED)},Object.defineProperties(e,i),e}(i.core.Instance);i.segmented={SegmentedSelector:f,SegmentedEmission:g,SegmentedElement:b,Segmented:_},i.internals.register(i.segmented.SegmentedSelector.SEGMENTED,i.segmented.Segmented),i.internals.register(i.segmented.SegmentedSelector.SEGMENTED_ELEMENT,i.segmented.SegmentedElement);var m={BREADCRUMB:i.internals.ns.selector("breadcrumb"),BUTTON:i.internals.ns.selector("breadcrumb__button")},y=function(t){function e(){t.call(this),this.count=0,this.focusing=this.focus.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0},links:{configurable:!0},collapse:{configurable:!0},collapsePrimary:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Breadcrumb"},e.prototype.init=function(){this.getCollapse(),this.isResizing=!0},n.proxy.get=function(){var e=this;return Object.assign.call(this,t.prototype.proxy,{focus:e.focus.bind(e),disclose:e.collapse.disclose.bind(e.collapse)})},e.prototype.getCollapse=function(){var t=this.collapse;t?t.listen(i.core.DisclosureEvent.DISCLOSE,this.focusing):this.addAscent(i.core.DisclosureEmission.ADDED,this.getCollapse.bind(this))},e.prototype.resize=function(){var t=this.collapse,e=this.links;t&&e.length&&(this.isBreakpoint(i.core.Breakpoints.MD)?t.buttonHasFocus&&e[0].focus():e.indexOf(document.activeElement)>-1&&t.focus())},n.links.get=function(){return[].concat(this.querySelectorAll("a[href]"))},n.collapse.get=function(){return this.element.getDescendantInstances(i.core.Collapse.instanceClassName,null,!0)[0]},e.prototype.focus=function(){this.count=0,this._focus()},e.prototype._focus=function(){var t=this.links[0];t&&(t.focus(),this.request(this.verify.bind(this)))},e.prototype.verify=function(){if(this.count++,!(this.count>100)){var t=this.links[0];t&&document.activeElement!==t&&this._focus()}},n.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(m.BUTTON)}))[0]},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance);i.breadcrumb={BreadcrumbSelector:m,Breadcrumb:y},i.internals.register(i.breadcrumb.BreadcrumbSelector.BREADCRUMB,i.breadcrumb.Breadcrumb);var E={TOOLTIP:i.internals.ns.selector("tooltip"),SHOWN:i.internals.ns.selector("tooltip--shown"),BUTTON:i.internals.ns.selector("btn--tooltip")},v=1,T=2,S=function(t){function e(){t.call(this),this._state=0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={state:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TooltipReferent"},e.prototype.init=function(){if(t.prototype.init.call(this),this.listen("focusin",this.focusIn.bind(this)),this.listen("focusout",this.focusOut.bind(this)),!this.matches(E.BUTTON)){var e=this.mouseover.bind(this);this.listen("mouseover",e),this.placement.listen("mouseover",e);var n=this.mouseout.bind(this);this.listen("mouseout",n),this.placement.listen("mouseout",n)}this.addEmission(i.core.RootEmission.KEYDOWN,this._keydown.bind(this)),this.listen("click",this._click.bind(this)),this.addEmission(i.core.RootEmission.CLICK,this._clickOut.bind(this))},e.prototype._click=function(){this.focus()},e.prototype._clickOut=function(t){this.node.contains(t)||this.blur()},e.prototype._keydown=function(t){if(t===i.core.KeyCodes.ESCAPE)this.blur(),this.close()},e.prototype.close=function(){this.state=0},n.state.get=function(){return this._state},n.state.set=function(t){this._state!==t&&(this.isShown=t>0,this._state=t)},e.prototype.focusIn=function(){this.state|=v},e.prototype.focusOut=function(){this.state&=~v},e.prototype.mouseover=function(){this.state|=T},e.prototype.mouseout=function(){this.state&=~T},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.PlacementReferent),A=function(e){return t+"-"+e};A.selector=function(t,e){return void 0===e&&(e="."),""+e+A(t)},(A.attr=function(t){return"data-"+A(t)}).selector=function(t,e){var i=A.attr(t);return void 0!==e&&(i+='="'+e+'"'),"["+i+"]"},A.event=function(t){return e+"."+t},A.emission=function(t,e){return"emission:"+t+"."+e};var O={SHOW:A.event("show"),HIDE:A.event("hide")},N="hidden",C="shown",P="hiding",I=function(t){function e(){t.call(this,i.core.PlacementMode.AUTO,[i.core.PlacementPosition.TOP,i.core.PlacementPosition.BOTTOM],[i.core.PlacementAlign.CENTER,i.core.PlacementAlign.START,i.core.PlacementAlign.END]),this.modifier="",this._state=N}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isShown:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Tooltip"},e.prototype.init=function(){t.prototype.init.call(this),this.register('[aria-describedby="'+this.id+'"]',S),this.listen("transitionend",this.transitionEnd.bind(this))},e.prototype.transitionEnd=function(){this._state===P&&(this._state=N,this.isShown=!1)},n.isShown.get=function(){return t.prototype.isShown},n.isShown.set=function(e){if(this.isEnabled)switch(!0){case e:this._state=C,this.addClass(E.SHOWN),this.dispatch(O.SHOW),t.prototype.isShown=!0;break;case this.isShown&&!e&&this._state===C:this._state=P,this.removeClass(E.SHOWN);break;case this.isShown&&!e&&this._state===N:this.dispatch(O.HIDE),t.prototype.isShown=!1}},e.prototype.render=function(){t.prototype.render.call(this);var e=this.referentRect.center-this.rect.center,i=.5*this.rect.width-8;e<-i&&(e=-i),e>i&&(e=i),this.setProperty("--arrow-x",e.toFixed(2)+"px")},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Placement);i.tooltip={Tooltip:I,TooltipSelector:E,TooltipEvent:O},i.internals.register(i.tooltip.TooltipSelector.TOOLTIP,i.tooltip.Tooltip);var L=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isChecked:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ToggleInput"},i.isChecked.get=function(){return this.node.checked},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),D=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0},input:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ToggleStatusLabel"},e.prototype.init=function(){this.register('input[id="'+this.getAttribute("for")+'"]',L),this.update(),this.isSwappingFont=!0},i.proxy.get=function(){return Object.assign.call(this,t.prototype.proxy,{update:this.update.bind(this)})},i.input.get=function(){return this.getRegisteredInstances("ToggleInput")[0]},e.prototype.update=function(){this.node.style.removeProperty("--toggle-status-width");var t=this.input.isChecked,e=getComputedStyle(this.node,":before"),i=parseFloat(e.width);this.input.node.checked=!t;var n=getComputedStyle(this.node,":before"),s=parseFloat(n.width);s>i&&(i=s),this.input.node.checked=t,this.node.style.setProperty("--toggle-status-width",i/16+"rem")},e.prototype.swapFont=function(t){this.update()},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),R={STATUS_LABEL:""+i.internals.ns.selector("toggle__label")+i.internals.ns.attr.selector("checked-label")+i.internals.ns.attr.selector("unchecked-label")};i.toggle={ToggleStatusLabel:D,ToggleSelector:R},i.internals.register(i.toggle.ToggleSelector.STATUS_LABEL,i.toggle.ToggleStatusLabel);var w=i.internals.ns.selector("sidemenu__item"),x=i.internals.ns.selector("collapse"),k={LIST:i.internals.ns.selector("sidemenu__list"),COLLAPSE:w+" > "+x+", "+w+" > *:not("+w+"):not("+x+") > "+x+", "+w+" > *:not("+w+"):not("+x+") > *:not("+w+"):not("+x+") > "+x,COLLAPSE_LEGACY:w+" "+x,ITEM:i.internals.ns.selector("sidemenu__item"),BUTTON:i.internals.ns.selector("sidemenu__btn")},j=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"SidemenuList"},e.prototype.validate=function(e){return t.prototype.validate.call(this,e)&&e.node.matches(i.internals.legacy.isLegacy?k.COLLAPSE_LEGACY:k.COLLAPSE)},Object.defineProperties(e,n),e}(i.core.CollapsesGroup),M=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={collapsePrimary:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"SidemenuItem"},i.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(k.BUTTON)}))[0]},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance);i.sidemenu={SidemenuList:j,SidemenuItem:M,SidemenuSelector:k},i.internals.register(i.sidemenu.SidemenuSelector.LIST,i.sidemenu.SidemenuList),i.internals.register(i.sidemenu.SidemenuSelector.ITEM,i.sidemenu.SidemenuItem);var G={MODAL:i.internals.ns.selector("modal"),SCROLL_DIVIDER:i.internals.ns.selector("scroll-divider"),BODY:i.internals.ns.selector("modal__body"),TITLE:i.internals.ns.selector("modal__title")},H=function(t){function e(){t.call(this,i.core.DisclosureType.OPENED)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ModalButton"},Object.defineProperties(e,n),e}(i.core.DisclosureButton),U={CONCEALING_BACKDROP:i.internals.ns.attr("concealing-backdrop")},W=function(t){function e(){t.call(this,i.core.DisclosureType.OPENED,G.MODAL,H,"ModalsGroup"),this._isActive=!1,this.scrolling=this.resize.bind(this,!1),this.resizing=this.resize.bind(this,!0)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={body:{configurable:!0},isDialog:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Modal"},e.prototype.init=function(){t.prototype.init.call(this),this._isDialog="DIALOG"===this.node.tagName,this.isScrolling=!1,this.listenClick(),this.addEmission(i.core.RootEmission.KEYDOWN,this._keydown.bind(this))},e.prototype._keydown=function(t){if(t===i.core.KeyCodes.ESCAPE)this._escape()},e.prototype._escape=function(){switch(document.activeElement?document.activeElement.tagName:void 0){case"INPUT":case"LABEL":case"TEXTAREA":case"SELECT":case"AUDIO":case"VIDEO":break;default:this.isDisclosed&&(this.conceal(),this.focus())}},e.prototype.retrieved=function(){this._ensureAccessibleName()},n.body.get=function(){return this.element.getDescendantInstances("ModalBody","Modal")[0]},e.prototype.handleClick=function(t){t.target===this.node&&"false"!==this.getAttribute(U.CONCEALING_BACKDROP)&&this.conceal()},e.prototype.disclose=function(e){return!!t.prototype.disclose.call(this,e)&&(this.body&&this.body.activate(),this.isScrollLocked=!0,this.setAttribute("aria-modal","true"),this.setAttribute("open","true"),this._isDialog||this.activateModal(),!0)},e.prototype.conceal=function(e,i){return!!t.prototype.conceal.call(this,e,i)&&(this.isScrollLocked=!1,this.removeAttribute("aria-modal"),this.removeAttribute("open"),this.body&&this.body.deactivate(),this._isDialog||this.deactivateModal(),!0)},n.isDialog.get=function(){return this._isDialog},n.isDialog.set=function(t){this._isDialog=t},e.prototype.activateModal=function(){this._isActive||(this._isActive=!0,this._hasDialogRole="dialog"===this.getAttribute("role"),this._hasDialogRole||this.setAttribute("role","dialog"))},e.prototype.deactivateModal=function(){this._isActive&&(this._isActive=!1,this._hasDialogRole||this.removeAttribute("role"))},e.prototype._setAccessibleName=function(t,e){var i=this.retrieveNodeId(t,e);this.warn("add reference to "+e+" for accessible name (aria-labelledby)"),this.setAttribute("aria-labelledby",i)},e.prototype._ensureAccessibleName=function(){if(!this.hasAttribute("aria-labelledby")&&!this.hasAttribute("aria-label")){this.warn("missing accessible name");var t=this.node.querySelector(G.TITLE),e=this.primaryButtons[0];switch(!0){case null!==t:this._setAccessibleName(t,"title");break;case void 0!==e:this.warn("missing required title, fallback to primary button"),this._setAccessibleName(e,"primary")}}},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Disclosure),B=['[tabindex="0"]',"a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details","iframe"].join(),F=['[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'].join(),z=function(t,e){if(!(t instanceof Element))return!1;var i=window.getComputedStyle(t);if(!i)return!1;if("hidden"===i.visibility)return!1;for(void 0===e&&(e=t);e.contains(t);){if("none"===i.display)return!1;t=t.parentElement}return!0},V=function(t,e){this.element=null,this.activeElement=null,this.onTrap=t,this.onUntrap=e,this.waiting=this.wait.bind(this),this.handling=this.handle.bind(this),this.focusing=this.maintainFocus.bind(this),this.current=null},q={trapped:{configurable:!0},focusables:{configurable:!0}};q.trapped.get=function(){return null!==this.element},V.prototype.trap=function(t){this.trapped&&this.untrap(),this.element=t,this.isTrapping=!0,this.wait(),this.onTrap&&this.onTrap()},V.prototype.wait=function(){z(this.element)?this.trapping():window.requestAnimationFrame(this.waiting)},V.prototype.trapping=function(){if(this.isTrapping){this.isTrapping=!1;var t=this.focusables;t.length&&-1===t.indexOf(document.activeElement)&&t[0].focus(),this.element.setAttribute("aria-modal",!0),window.addEventListener("keydown",this.handling),document.body.addEventListener("focus",this.focusing,!0)}},V.prototype.stun=function(t){for(var e=0,i=t.children;e<i.length;e+=1){var n=i[e];n!==this.element&&(n.contains(this.element)?this.stun(n):this.stunneds.push(new K(n)))}},V.prototype.maintainFocus=function(t){if(!this.element.contains(t.target)){var e=this.focusables;if(0===e.length)return;var i=e[0];t.preventDefault(),i.focus()}},V.prototype.handle=function(t){if(9===t.keyCode){var e=this.focusables;if(0!==e.length){var i=e[0],n=e[e.length-1],s=e.indexOf(document.activeElement);t.shiftKey?!this.element.contains(document.activeElement)||s<1?(t.preventDefault(),n.focus()):(document.activeElement.tabIndex>0||e[s-1].tabIndex>0)&&(t.preventDefault(),e[s-1].focus()):this.element.contains(document.activeElement)&&s!==e.length-1&&-1!==s?document.activeElement.tabIndex>0&&(t.preventDefault(),e[s+1].focus()):(t.preventDefault(),i.focus())}}},q.focusables.get=function(){var t=this,e=i.internals.dom.querySelectorAllArray(this.element,B),n=i.internals.dom.querySelectorAllArray(document.documentElement,'input[type="radio"]');if(n.length){for(var s={},o=0,r=n;o<r.length;o+=1){var a=r[o],c=a.getAttribute("name");void 0===s[c]&&(s[c]=new X(c)),s[c].push(a)}e=e.filter((function(t){if("input"!==t.tagName.toLowerCase()||"radio"!==t.getAttribute("type").toLowerCase())return!0;var e=t.getAttribute("name");return s[e].keep(t)}))}var l=i.internals.dom.querySelectorAllArray(this.element,F);l.sort((function(t,e){return t.tabIndex-e.tabIndex}));var p=e.filter((function(t){return-1===l.indexOf(t)}));return l.concat(p).filter((function(e){return"-1"!==e.tabIndex&&z(e,t.element)}))},V.prototype.untrap=function(){this.trapped&&(this.isTrapping=!1,this.element.removeAttribute("aria-modal"),window.removeEventListener("keydown",this.handling),document.body.removeEventListener("focus",this.focusing,!0),this.element=null,this.onUntrap&&this.onUntrap())},V.prototype.dispose=function(){this.untrap()},Object.defineProperties(V.prototype,q);var K=function(t){this.element=t,this.inert=t.getAttribute("inert"),this.element.setAttribute("inert","")};K.prototype.unstun=function(){null===this.inert?this.element.removeAttribute("inert"):this.element.setAttribute("inert",this.inert)};var X=function(t){this.name=t,this.buttons=[]};X.prototype.push=function(t){this.buttons.push(t),(t===document.activeElement||t.checked||void 0===this.selected)&&(this.selected=t)},X.prototype.keep=function(t){return this.selected===t};var Y=function(t){function e(){t.call(this,"Modal",!1),this.focusTrap=new V}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"ModalsGroup"},e.prototype.apply=function(e,i){t.prototype.apply.call(this,e,i),null===this.current?this.focusTrap.untrap():this.focusTrap.trap(this.current.node)},Object.defineProperties(e,i),e}(i.core.DisclosuresGroup),J=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ModalBody"},e.prototype.init=function(){this.listen("scroll",this.divide.bind(this))},e.prototype.activate=function(){this.isResizing=!0,this.resize()},e.prototype.deactivate=function(){this.isResizing=!1},e.prototype.divide=function(){this.node.scrollHeight>this.node.clientHeight?this.node.offsetHeight+this.node.scrollTop>=this.node.scrollHeight?this.removeClass(G.SCROLL_DIVIDER):this.addClass(G.SCROLL_DIVIDER):this.removeClass(G.SCROLL_DIVIDER)},e.prototype.resize=function(){this.adjust(),this.request(this.adjust.bind(this))},e.prototype.adjust=function(){var t=32*(this.isBreakpoint(i.core.Breakpoints.MD)?2:1);this.isLegacy?this.style.maxHeight=window.innerHeight-t+"px":this.style.setProperty("--modal-max-height",window.innerHeight-t+"px"),this.divide()},Object.defineProperties(e,n),e}(i.core.Instance);i.modal={Modal:W,ModalButton:H,ModalBody:J,ModalsGroup:Y,ModalSelector:G},i.internals.register(i.modal.ModalSelector.MODAL,i.modal.Modal),i.internals.register(i.modal.ModalSelector.BODY,i.modal.ModalBody),i.internals.register(i.core.RootSelector.ROOT,i.modal.ModalsGroup);var Q={TOGGLE:i.internals.ns.emission("password","toggle"),ADJUST:i.internals.ns.emission("password","adjust")},Z=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={width:{configurable:!0},isChecked:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"PasswordToggle"},e.prototype.init=function(){this.listenClick(),this.ascend(Q.ADJUST,this.width),this.isSwappingFont=!0,this._isChecked=this.isChecked},i.width.get=function(){var t=getComputedStyle(this.node.parentNode);return parseInt(t.width)},i.isChecked.get=function(){return this.node.checked},i.isChecked.set=function(t){this._isChecked=t,this.ascend(Q.TOGGLE,t)},e.prototype.handleClick=function(){this.isChecked=!this._isChecked},e.prototype.swapFont=function(t){this.ascend(Q.ADJUST,this.width)},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),$=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Password"},e.prototype.init=function(){this.addAscent(Q.TOGGLE,this.toggle.bind(this)),this.addAscent(Q.ADJUST,this.adjust.bind(this))},e.prototype.toggle=function(t){this.descend(Q.TOGGLE,t)},e.prototype.adjust=function(t){this.descend(Q.ADJUST,t)},Object.defineProperties(e,i),e}(i.core.Instance),tt={PASSWORD:i.internals.ns.selector("password"),INPUT:i.internals.ns.selector("password__input"),LABEL:i.internals.ns.selector("password__label"),TOOGLE:i.internals.ns.selector("password__checkbox")+' input[type="checkbox"]'},et=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isRevealed:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"PasswordInput"},e.prototype.init=function(){this.addDescent(Q.TOGGLE,this.toggle.bind(this)),this._isRevealed="password"===this.hasAttribute("type"),this.listen("keydown",this.capslock.bind(this)),this.listen("keyup",this.capslock.bind(this))},e.prototype.toggle=function(t){this.isRevealed=t,this.setAttribute("type",t?"text":"password")},n.isRevealed.get=function(){return this._isRevealed},e.prototype.capslock=function(t){t&&"function"!=typeof t.getModifierState||(t.getModifierState("CapsLock")?this.node.parentNode.setAttribute(i.internals.ns.attr("capslock"),""):this.node.parentNode.removeAttribute(i.internals.ns.attr("capslock")))},n.isRevealed.set=function(t){this._isRevealed=t,this.setAttribute("type",t?"text":"password")},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance),it=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"PasswordLabel"},e.prototype.init=function(){this.addDescent(Q.ADJUST,this.adjust.bind(this))},e.prototype.adjust=function(t){var e=Math.ceil(t/16);this.node.style.paddingRight=e+"rem"},Object.defineProperties(e,i),e}(i.core.Instance);i.password={Password:$,PasswordToggle:Z,PasswordSelector:tt,PasswordInput:et,PasswordLabel:it},i.internals.register(i.password.PasswordSelector.INPUT,i.password.PasswordInput),i.internals.register(i.password.PasswordSelector.PASSWORD,i.password.Password),i.internals.register(i.password.PasswordSelector.TOOGLE,i.password.PasswordToggle),i.internals.register(i.password.PasswordSelector.LABEL,i.password.PasswordLabel);var nt=i.internals.ns.selector("nav__item"),st=i.internals.ns.selector("collapse"),ot={NAVIGATION:i.internals.ns.selector("nav"),COLLAPSE:nt+" > "+st+", "+nt+" > *:not("+nt+"):not("+st+") > "+st+", "+nt+" > *:not("+nt+"):not("+st+") > *:not("+nt+"):not("+st+") > "+st,COLLAPSE_LEGACY:nt+" "+st,ITEM:nt,ITEM_RIGHT:nt+"--align-right",MENU:i.internals.ns.selector("menu"),BUTTON:i.internals.ns.selector("nav__btn"),TRANSLATE_BUTTON:i.internals.ns.selector("translate__btn")},rt=function(t){function e(){t.call(this),this._isRightAligned=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isRightAligned:{configurable:!0},collapsePrimary:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"NavigationItem"},e.prototype.init=function(){this.addAscent(i.core.DisclosureEmission.ADDED,this.calculate.bind(this)),this.addAscent(i.core.DisclosureEmission.REMOVED,this.calculate.bind(this)),this.isResizing=!0,this.calculate()},e.prototype.resize=function(){this.calculate()},e.prototype.calculate=function(){var t=this.element.getDescendantInstances(i.core.Collapse.instanceClassName,null,!0)[0];if(t&&this.isBreakpoint(i.core.Breakpoints.LG)&&t.element.node.matches(ot.MENU)){var e=this.element.node.parentElement.getBoundingClientRect().right,n=t.element.node.getBoundingClientRect().width,s=this.element.node.getBoundingClientRect().left;this.isRightAligned=s+n>e}else this.isRightAligned=!1},n.isRightAligned.get=function(){return this._isRightAligned},n.isRightAligned.set=function(t){this._isRightAligned!==t&&(this._isRightAligned=t,t?i.internals.dom.addClass(this.element.node,ot.ITEM_RIGHT):i.internals.dom.removeClass(this.element.node,ot.ITEM_RIGHT))},n.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&(t.hasClass(ot.BUTTON)||t.hasClass(ot.TRANSLATE_BUTTON))}))[0]},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance),at={NONE:-1,INSIDE:0,OUTSIDE:1},ct=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={index:{configurable:!0},canUngroup:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Navigation"},e.prototype.init=function(){t.prototype.init.call(this),this.clicked=!1,this.out=!1,this.addEmission(i.core.RootEmission.CLICK,this._handleRootClick.bind(this)),this.listen("mousedown",this.handleMouseDown.bind(this)),this.listenClick({capture:!0}),this.isResizing=!0},e.prototype.validate=function(e){return t.prototype.validate.call(this,e)&&e.element.node.matches(i.internals.legacy.isLegacy?ot.COLLAPSE_LEGACY:ot.COLLAPSE)},e.prototype.handleMouseDown=function(t){this.isBreakpoint(i.core.Breakpoints.LG)&&-1!==this.index&&this.current&&(this.position=this.current.node.contains(t.target)?at.INSIDE:at.OUTSIDE,this.requestPosition())},e.prototype.handleClick=function(t){!t.target.matches("a, button")||t.target.matches("[aria-controls]")||t.target.matches(i.core.DisclosureSelector.PREVENT_CONCEAL)||(this.index=-1)},e.prototype._handleRootClick=function(t){this.isBreakpoint(i.core.Breakpoints.LG)&&(this.node.contains(t)||(this.out=!0,this.requestPosition()))},e.prototype.requestPosition=function(){this.isRequesting||(this.isRequesting=!0,this.request(this.getPosition.bind(this)))},e.prototype.getPosition=function(){if(this.out)switch(this.position){case at.OUTSIDE:this.index=-1;break;case at.INSIDE:this.current&&!this.current.node.contains(document.activeElement)&&this.current.focus();break;default:this.index>-1&&!this.current.hasFocus&&(this.index=-1)}this.request(this.requested.bind(this))},e.prototype.requested=function(){this.position=at.NONE,this.out=!1,this.isRequesting=!1},n.index.get=function(){return t.prototype.index},n.index.set=function(e){-1===e&&this.current&&this.current.hasFocus&&this.current.focus(),t.prototype.index=e},n.canUngroup.get=function(){return!this.isBreakpoint(i.core.Breakpoints.LG)},e.prototype.resize=function(){this.update()},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.CollapsesGroup);i.navigation={Navigation:ct,NavigationItem:rt,NavigationMousePosition:at,NavigationSelector:ot},i.internals.register(i.navigation.NavigationSelector.NAVIGATION,i.navigation.Navigation),i.internals.register(i.navigation.NavigationSelector.ITEM,i.navigation.NavigationItem);var lt=function(t){function e(){t.call(this,i.core.DisclosureType.SELECT)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={list:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabButton"},e.prototype.handleClick=function(e){t.prototype.handleClick.call(this,e),this.focus()},e.prototype.apply=function(e){t.prototype.apply.call(this,e),this.isPrimary&&(this.setAttribute("tabindex",e?"0":"-1"),e&&this.list&&this.list.focalize(this))},n.list.get=function(){return this.element.getAscendantInstance("TabsList","TabsGroup")},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.DisclosureButton),pt={TAB:i.internals.ns.selector("tabs__tab"),GROUP:i.internals.ns.selector("tabs"),PANEL:i.internals.ns.selector("tabs__panel"),LIST:i.internals.ns.selector("tabs__list"),SHADOW:i.internals.ns.selector("tabs__shadow"),SHADOW_LEFT:i.internals.ns.selector("tabs__shadow--left"),SHADOW_RIGHT:i.internals.ns.selector("tabs__shadow--right"),PANEL_START:i.internals.ns.selector("tabs__panel--direction-start"),PANEL_END:i.internals.ns.selector("tabs__panel--direction-end")},ht="direction-start",ut="direction-end",dt="none",ft=function(t){function e(){t.call(this,i.core.DisclosureType.SELECT,pt.PANEL,lt,"TabsGroup"),this._direction=dt,this._isPreventingTransition=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={direction:{configurable:!0},isPreventingTransition:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabPanel"},n.direction.get=function(){return this._direction},n.direction.set=function(t){if(t!==this._direction){switch(this._direction){case ht:this.removeClass(pt.PANEL_START);break;case ut:this.removeClass(pt.PANEL_END);break;case dt:break;default:return}switch(this._direction=t,this._direction){case ht:this.addClass(pt.PANEL_START);break;case ut:this.addClass(pt.PANEL_END)}}},n.isPreventingTransition.get=function(){return this._isPreventingTransition},n.isPreventingTransition.set=function(t){this._isPreventingTransition!==t&&(t?this.addClass(i.internals.motion.TransitionSelector.NONE):this.removeClass(i.internals.motion.TransitionSelector.NONE),this._isPreventingTransition=!0===t)},e.prototype.translate=function(t,e){this.isPreventingTransition=e,this.direction=t},e.prototype.reset=function(){this.group&&this.group.retrieve(!0)},e.prototype._electPrimaries=function(e){var i=this;return this.group&&this.group.list?t.prototype._electPrimaries.call(this,e).filter((function(t){return i.group.list.node.contains(t.node)})):[]},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Disclosure),gt="tab_keys_left",_t="tab_keys_right",bt="tab_keys_home",mt="tab_keys_end",yt={PRESS_KEY:i.internals.ns.emission("tab","press_key"),LIST_HEIGHT:i.internals.ns.emission("tab","list_height")},Et=function(t){function e(){t.call(this,"TabPanel")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={list:{configurable:!0},buttonHasFocus:{configurable:!0},isPreventingTransition:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabsGroup"},e.prototype.init=function(){t.prototype.init.call(this),this.listen("transitionend",this.transitionend.bind(this)),this.addAscent(yt.PRESS_KEY,this.pressKey.bind(this)),this.addAscent(yt.LIST_HEIGHT,this.setListHeight.bind(this)),this.isRendering=!0},e.prototype.getIndex=function(e){void 0===e&&(e=0),t.prototype.getIndex.call(this,e)},n.list.get=function(){return this.element.getDescendantInstances("TabsList","TabsGroup",!0)[0]},e.prototype.setListHeight=function(t){this.listHeight=t},e.prototype.transitionend=function(t){this.isPreventingTransition=!0},n.buttonHasFocus.get=function(){return this.members.some((function(t){return t.buttonHasFocus}))},e.prototype.pressKey=function(t){switch(t){case gt:this.pressLeft();break;case _t:this.pressRight();break;case bt:this.pressHome();break;case mt:this.pressEnd()}},e.prototype.pressRight=function(){this.buttonHasFocus&&(this.index<this.length-1?this.index++:this.index=0,this.focus())},e.prototype.pressLeft=function(){this.buttonHasFocus&&(this.index>0?this.index--:this.index=this.length-1,this.focus())},e.prototype.pressHome=function(){this.buttonHasFocus&&(this.index=0,this.focus())},e.prototype.pressEnd=function(){this.buttonHasFocus&&(this.index=this.length-1,this.focus())},e.prototype.focus=function(){this.current&&this.current.focus()},e.prototype.apply=function(){for(var t=0;t<this._index;t++)this.members[t].translate(ht);this.current&&this.current.translate(dt);for(var e=this._index+1;e<this.length;e++)this.members[e].translate(ut);this.isPreventingTransition=!1},n.isPreventingTransition.get=function(){return this._isPreventingTransition},n.isPreventingTransition.set=function(t){this._isPreventingTransition!==t&&(t?this.addClass(i.internals.motion.TransitionSelector.NONE):this.removeClass(i.internals.motion.TransitionSelector.NONE),this._isPreventingTransition=!0===t)},e.prototype.render=function(){if(null!==this.current){this.node.scrollTop=0,this.node.scrollLeft=0;var t=Math.round(this.current.node.offsetHeight);this.panelHeight!==t&&(this.panelHeight=t,this.style.setProperty("--tabs-height",this.panelHeight+this.listHeight+"px"))}},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.DisclosuresGroup),vt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isScrolling:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabsList"},e.prototype.init=function(){this.listen("scroll",this.scroll.bind(this)),this.listenKey(i.core.KeyCodes.RIGHT,this.ascend.bind(this,yt.PRESS_KEY,_t),!0,!0),this.listenKey(i.core.KeyCodes.LEFT,this.ascend.bind(this,yt.PRESS_KEY,gt),!0,!0),this.listenKey(i.core.KeyCodes.HOME,this.ascend.bind(this,yt.PRESS_KEY,bt),!0,!0),this.listenKey(i.core.KeyCodes.END,this.ascend.bind(this,yt.PRESS_KEY,mt),!0,!0),this.isResizing=!0},e.prototype.focalize=function(t){var e=t.getRect(),i=this.getRect(),n=this.node.scrollLeft;e.left<i.left?this.node.scrollTo(n-i.left+e.left-16,0):e.right>i.right&&this.node.scrollTo(n-i.right+e.right+16,0)},n.isScrolling.get=function(){return this._isScrolling},n.isScrolling.set=function(t){this._isScrolling!==t&&(this._isScrolling=t,this.apply())},e.prototype.apply=function(){this._isScrolling?(this.addClass(pt.SHADOW),this.scroll()):(this.removeClass(pt.SHADOW_RIGHT),this.removeClass(pt.SHADOW_LEFT),this.removeClass(pt.SHADOW))},e.prototype.scroll=function(){var t=this.node.scrollLeft,e=t<=16,i=this.node.scrollWidth-this.node.clientWidth-16,n=Math.abs(t)>=i,s="rtl"===document.documentElement.getAttribute("dir"),o=s?pt.SHADOW_RIGHT:pt.SHADOW_LEFT,r=s?pt.SHADOW_LEFT:pt.SHADOW_RIGHT;e?this.removeClass(o):this.addClass(o),n?this.removeClass(r):this.addClass(r)},e.prototype.resize=function(){this.isScrolling=this.node.scrollWidth>this.node.clientWidth+16;var t=this.getRect().height;this.setProperty("--tabs-list-height",t+"px"),this.ascend(yt.LIST_HEIGHT,t)},e.prototype.dispose=function(){this.isScrolling=!1},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance);i.tab={TabPanel:ft,TabButton:lt,TabsGroup:Et,TabsList:vt,TabSelector:pt,TabEmission:yt},i.internals.register(i.tab.TabSelector.PANEL,i.tab.TabPanel),i.internals.register(i.tab.TabSelector.GROUP,i.tab.TabsGroup),i.internals.register(i.tab.TabSelector.LIST,i.tab.TabsList);var Tt={DISMISS:i.internals.ns.event("dismiss")},St=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"TagDismissible"},e.prototype.init=function(){this.listenClick()},e.prototype.handleClick=function(){switch(this.focusClosest(),i.mode){case i.Modes.ANGULAR:case i.Modes.REACT:case i.Modes.VUE:this.request(this.verify.bind(this));break;default:this.remove()}this.dispatch(Tt.DISMISS)},e.prototype.verify=function(){document.body.contains(this.node)&&this.warn("a TagDismissible has just been dismissed and should be removed from the dom. In "+i.mode+" mode, the api doesn't handle dom modification. An event "+Tt.DISMISS+" is dispatched by the element to trigger the removal")},Object.defineProperties(e,n),e}(i.core.Instance),At={PRESSABLE:i.internals.ns.selector("tag")+"[aria-pressed]",DISMISSIBLE:""+i.internals.ns.selector("tag--dismiss")};i.tag={TagDismissible:St,TagSelector:At,TagEvent:Tt},i.internals.register(i.tag.TagSelector.PRESSABLE,i.core.Toggle),i.internals.register(i.tag.TagSelector.DISMISSIBLE,i.tag.TagDismissible);var Ot=i.internals.ns.selector("transcription"),Nt={TRANSCRIPTION:Ot,BUTTON:Ot+"__btn"},Ct=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={collapsePrimary:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Transcription"},i.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(Nt.BUTTON)}))[0]},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance);i.transcription={Transcription:Ct,TranscriptionSelector:Nt},i.internals.register(i.transcription.TranscriptionSelector.TRANSCRIPTION,i.transcription.Transcription);var Pt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"TileDownload"},e.prototype.init=function(){var t=this;this.addAscent(i.core.AssessEmission.UPDATE,(function(e){t.descend(i.core.AssessEmission.UPDATE,e)})),this.addAscent(i.core.AssessEmission.ADDED,(function(){t.descend(i.core.AssessEmission.ADDED)}))},Object.defineProperties(e,n),e}(i.core.Instance),It={DOWNLOAD:i.internals.ns.selector("tile--download"),DOWNLOAD_DETAIL:i.internals.ns.selector("tile--download")+" "+i.internals.ns.selector("tile__detail")};i.tile={TileSelector:It,TileDownload:Pt},i.internals.register(i.tile.TileSelector.DOWNLOAD,i.tile.TileDownload),i.internals.register(i.tile.TileSelector.DOWNLOAD_DETAIL,i.core.AssessDetail);var Lt={RANGE:i.internals.ns.selector("range"),RANGE_SM:i.internals.ns.selector("range--sm"),RANGE_STEP:i.internals.ns.selector("range--step"),RANGE_DOUBLE:i.internals.ns.selector("range--double"),RANGE_DOUBLE_STEP:i.internals.ns.selector("range--double")+i.internals.ns.selector("range--step"),RANGE_INPUT:i.internals.ns.selector("range input[type=range]:nth-of-type(1)"),RANGE_INPUT2:i.internals.ns.selector("range--double")+" input[type=range]:nth-of-type(2)",RANGE_OUTPUT:i.internals.ns.selector("range__output"),RANGE_MIN:i.internals.ns.selector("range__min"),RANGE_MAX:i.internals.ns.selector("range__max"),RANGE_PREFIX:i.internals.ns.attr("prefix"),RANGE_SUFFIX:i.internals.ns.attr("suffix")},Dt={VALUE:i.internals.ns.emission("range","value"),VALUE2:i.internals.ns.emission("range","value2"),OUTPUT:i.internals.ns.emission("range","output"),CONSTRAINTS:i.internals.ns.emission("range","constraints"),MIN:i.internals.ns.emission("range","min"),MAX:i.internals.ns.emission("range","max"),STEP:i.internals.ns.emission("range","step"),PREFIX:i.internals.ns.emission("range","prefix"),SUFFIX:i.internals.ns.emission("range","suffix"),DISABLED:i.internals.ns.emission("range","disabled"),ENABLE_POINTER:i.internals.ns.emission("range","enable_pointer")},Rt=function(){this._width=0,this._min=0,this._max=0,this._value=0,this._thumbSize=24,this._innerWidth=0,this._prefix="",this._suffix="",this._background={}},wt={width:{configurable:!0},isSm:{configurable:!0},textValue:{configurable:!0},value:{configurable:!0},outputX:{configurable:!0},min:{configurable:!0},textMin:{configurable:!0},max:{configurable:!0},textMax:{configurable:!0},step:{configurable:!0},output:{configurable:!0},progress:{configurable:!0}};Rt.prototype.configure=function(t){t&&(this._prefix=t._prefix,this._suffix=t._suffix,this._width=t.width,this.setConstraints(t._constraints),this.value=t.value,this.update())},Rt.prototype.setPrefix=function(t){this._prefix=null!==t?t:""},Rt.prototype.setSuffix=function(t){this._suffix=null!==t?t:""},Rt.prototype._decorate=function(t){return""+this._prefix+t+this._suffix},wt.width.get=function(){return this._width},wt.width.set=function(t){this._width=t},wt.isSm.get=function(){return this._isSm},wt.isSm.set=function(t){this._isSm!==t&&(this._isSm=t,this.setThumbSize(t?16:24),this.update())},Rt.prototype.setThumbSize=function(t,e){void 0===e&&(e=1),this._thumbSize=t,this._innerPadding=t*e},wt.textValue.get=function(){return this._decorate(this._value)},wt.value.get=function(){return this._value},wt.value.set=function(t){this._value=t},wt.outputX.get=function(){return this._outputX},Rt.prototype.setConstraints=function(t){this._constraints=t,this._min=t.min,this._max=t.max,this._step=t.step,this._rangeWidth=t.rangeWidth},wt.min.get=function(){return this._min},wt.textMin.get=function(){return this._decorate(this._min)},wt.max.get=function(){return this._max},wt.textMax.get=function(){return this._decorate(this._max)},wt.step.get=function(){return this._step},wt.output.get=function(){return{text:this.textValue,transform:"translateX("+this._translateX+"px) translateX(-"+this._centerPercent+"%)"}},Rt.prototype._getRatio=function(t){return(t-this._min)/this._rangeWidth},wt.progress.get=function(){return this._progress},Rt.prototype.update=function(){this._update()},Rt.prototype._update=function(){this._innerWidth=this._width-this._innerPadding;var t=this._getRatio(this._value);this._translateX=t*this._width,this._centerPercent=100*t,this._progress={right:(this._innerWidth*t+.5*this._innerPadding).toFixed(2)+"px"}},Object.defineProperties(Rt.prototype,wt);var xt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={stepWidth:{configurable:!0}};return i.stepWidth.get=function(){return this._stepWidth.toFixed(3)+"px"},e.prototype._update=function(){t.prototype._update.call(this);var e=this._rangeWidth/this._step;for(this._stepWidth=this._innerWidth/e,(this._stepWidth<1||!isFinite(this._stepWidth))&&(this._stepWidth=4);this._stepWidth<4;)this._stepWidth*=2},Object.defineProperties(e.prototype,i),e}(Rt),kt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={value2:{configurable:!0},textValue:{configurable:!0}};return i.value2.get=function(){return this._value},i.value2.set=function(t){this._value2!==t&&(this._value2=t,this.update())},i.textValue.get=function(){return this._decorate(this._value)+" - "+this._decorate(this._value2)},e.prototype.setThumbSize=function(e){t.prototype.setThumbSize.call(this,e,2)},e.prototype._update=function(){t.prototype._update.call(this);var e=this._getRatio(.5*(this._value+this._value2));this._translateX=e*this._width,this._centerPercent=100*e;var i=this._getRatio(this._value),n=this._getRatio(this._value2);this._progress={left:(this._innerWidth*i+.25*this._innerPadding).toFixed(2)+"px",right:(this._innerWidth*n+.75*this._innerPadding).toFixed(2)+"px"}},Object.defineProperties(e.prototype,i),e}(Rt),jt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={stepWidth:{configurable:!0}};return i.stepWidth.get=function(){return this._stepWidth.toFixed(3)+"px"},e.prototype._update=function(){t.prototype._update.call(this);var e=this._rangeWidth/this._step;this._stepWidth=this._innerWidth/e,this._stepWidth<4&&(this._stepWidth*=Math.ceil(4/this._stepWidth))},Object.defineProperties(e.prototype,i),e}(kt),Mt="step",Gt="double",Ht="double-step",Ut="default",Wt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Range"},e.prototype.init=function(){this._retrieveType(),this._retrieveSize(),this.isLegacy?(this.isResizing=!0,this.isMouseMoving=!0):(this._observer=new ResizeObserver(this.resize.bind(this)),this._observer.observe(this.node)),this.addAscent(Dt.CONSTRAINTS,this.setConstraints.bind(this)),this.addAscent(Dt.VALUE,this.setValue.bind(this)),this.addAscent(Dt.VALUE2,this.setValue2.bind(this)),this.getAttribute(Lt.RANGE_PREFIX)&&this.setPrefix(this.getAttribute(Lt.RANGE_PREFIX)),this.getAttribute(Lt.RANGE_SUFFIX)&&this.setSuffix(this.getAttribute(Lt.RANGE_SUFFIX)),this.update()},e.prototype._retrieveType=function(){switch(!0){case this.matches(Lt.RANGE_DOUBLE_STEP):case this.matches(Lt.RANGE_DOUBLE):this.type=Gt;break;case this.matches(Lt.RANGE_STEP):this.type=Mt;break;default:this.type=Ut}},i.type.set=function(t){if(this._type!==t){this._type=t;var e=this._model;switch(this._type){case Ht:thi