@momentum-ui/web-components 2.26.9 → 2.26.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/109.js CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[109],{20109:(e,t,s)=>{var r,i=s(31890),o=s(26272),n=s(41488),a=s(23968),p=s(24977),c=function(e,t,s,r){var i,o=arguments.length,n=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(n=(o<3?i(n):o>3?i(t,s,n):i(t,s))||n);return o>3&&n&&Object.defineProperty(t,s,n),n};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.message="",this.messageType=void 0,this.id="",this.ariaLive="off"}get inputMessageClassMap(){return{[`md-${this.messageType}`]:!!this.messageType}}static get styles(){return[o.A,p.A]}getIconName(){switch(this.messageType){case"success":return"check-circle-badge-filled";case"error":return"error-legacy-badge-filled";case"warning":return"warning-badge-filled";case"priority":return"info-badge-filled";default:return""}}render(){return n.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[109],{20109:(e,t,s)=>{var r,i=s(31890),n=s(26272),o=s(41488),a=s(23968),p=s(24977),c=s(40333),l=function(e,t,s,r){var i,n=arguments.length,o=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n<3?i(o):n>3?i(t,s,o):i(t,s))||o);return n>3&&o&&Object.defineProperty(t,s,o),o};!function(e){let t=class extends o.LitElement{constructor(){super(...arguments),this.message="",this.messageType=void 0,this.id="",this.ariaLive="off"}get inputMessageClassMap(){return{[`md-${this.messageType}`]:!!this.messageType}}static get styles(){return[n.A,p.A]}getIconName(){switch(this.messageType){case"success":return"check-circle-badge-filled";case"error":return"error-legacy-badge-filled";case"warning":return"warning-badge-filled";case"priority":return"info-badge-filled";default:return""}}render(){return o.html`
2
2
  <div
3
3
  class="md-input__message ${(0,a.classMap)(this.inputMessageClassMap)}"
4
4
  id=${this.id}
5
5
  aria-live=${this.ariaLive}
6
6
  role="alert"
7
7
  >
8
- <md-icon name="${this.getIconName()}" size="14" iconSet="momentumDesign"></md-icon>
8
+ ${this.messageType?o.html`<md-icon name="${this.getIconName()}" size="14" iconSet="momentumDesign"></md-icon>`:c.nothing}
9
9
  <slot>${this.message}</slot>
10
10
  </div>
11
- `}};c([(0,n.property)({type:String})],t.prototype,"message",void 0),c([(0,n.property)({type:String})],t.prototype,"messageType",void 0),c([(0,n.property)({type:String})],t.prototype,"id",void 0),c([(0,n.property)({type:String})],t.prototype,"ariaLive",void 0),t=c([(0,i.w)("md-help-text")],t),e.ELEMENT=t}(r||(r={}))}}]);
11
+ `}};l([(0,o.property)({type:String})],t.prototype,"message",void 0),l([(0,o.property)({type:String})],t.prototype,"messageType",void 0),l([(0,o.property)({type:String})],t.prototype,"id",void 0),l([(0,o.property)({type:String})],t.prototype,"ariaLive",void 0),t=l([(0,i.w)("md-help-text")],t),e.ELEMENT=t}(r||(r={}))}}]);
package/dist/1598.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1598],{11598:(o,e,r)=>{r.d(e,{A:()=>d});const d=r(41488).css`:host(:focus){box-shadow:none;outline:0}:host(md-checkbox){border-radius:.125rem;cursor:pointer;display:inline-flex;position:relative;vertical-align:middle}:host(md-checkbox) .checkbox-input{height:calc(1rem + .25rem);position:absolute;visibility:hidden;width:100%;padding-inline-start:calc(.25rem);padding-inline-end:calc(.25rem)}:host(md-checkbox) .checkbox-box{background:var(--checkbox-bg-color);color:var(--checkbox-icon-color);border:.0625rem solid var(--checkbox-border-color);border-radius:.125rem;height:1rem;width:1rem;position:relative;display:flex;align-items:center;justify-content:center}:host(md-checkbox) .checkbox-label{cursor:pointer;display:inline-flex;position:relative;width:100%;z-index:1;align-items:center;gap:.5rem;min-height:calc(1rem + 4px)}:host([focus-visible]:not([disabled])) .checkbox-box{box-shadow:0 0 0 .125rem var(--md-focus-inner-color),0 0 0 .25rem var(--md-focus-middle-color),0 0 0 .3125rem var(--md-focus-outer-color)}:host(:hover:not([disabled])) .checkbox-box{background:var(--checkbox-hover-bg-color);border:.0625rem solid var(--checkbox-hover-border-color)}:host(:active:not([disabled])) .checkbox-box{background:var(--checkbox-pressed-bg-color);border:.0625rem solid var(--checkbox-pressed-border-color)}:host([disabled]) .checkbox-label{cursor:not-allowed}:host([disabled]) .checkbox-box{color:var(--checkbox-disabled-text-color);border-color:var(--checkbox-disabled-border-color);background-color:var(--checkbox-disabled-bg-color)}:host([aria-checked=true]) .checkbox-box,:host([indeterminate]) .checkbox-box{background:var(--checkbox-selected-bg-color);border:.0625rem solid var(--checkbox-selected-border-color)}:host([aria-checked=true][disabled]) .checkbox-box,:host([indeterminate][disabled]) .checkbox-box{background:var(--checkbox-disabled-selected-bg-color);border-color:var(--checkbox-disabled-border-color);color:var(--checkbox-disabled-text-color)}:host([aria-checked=true][disabled]) .checkbox-label,:host([indeterminate][disabled]) .checkbox-label{color:var(--checkbox-disabled-text-color)}:host([aria-checked=true]:hover:not([disabled])) .checkbox-box,:host([indeterminate]:hover:not([disabled])) .checkbox-box{background:var(--checkbox-selected-hover-bg-color);border-color:var(--checkbox-selected-hover-border-color)}:host([aria-checked=true]:active:not([disabled])) .checkbox-box,:host([indeterminate]:active:not([disabled])) .checkbox-box{background:var(--checkbox-selected-pressed-bg-color);border-color:var(--checkbox-selected-pressed-border-color)}@media(forced-colors:active){:host([focus-visible]:not([disabled])){outline:2px solid Highlight;box-shadow:none}}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-checkbox:not(:last-child)){margin-bottom:calc(.25rem*2)}:host([alignment=horizontal]) div{display:flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-checkbox:not(:last-child)){margin-right:calc(.25rem*10)}:host{--radio-label-text-color:var(--radio-input-text-color)}:host(md-radio) .md-radio-wrapper{position:relative;max-height:1.375rem;display:inline-flex;gap:.5rem;align-items:center;max-width:100%}:host(md-radio) .md-radio-input{position:absolute;top:0;left:0;height:1rem;width:1rem;opacity:0;cursor:pointer;margin:0;padding:0;border:0}:host(md-radio) .md-radio-icon{border:.0625rem solid var(--radio-input-border-color);border-top-left-radius:50%;border-top-right-radius:50%;border-bottom-left-radius:50%;border-bottom-right-radius:50%;background-color:var(--radio-input-bg-color);height:1rem;width:1rem;display:inline-flex;cursor:pointer;flex-shrink:0;flex-grow:0;align-items:center;justify-content:center;position:relative}:host(md-radio) .md-radio-label{color:var(--md-primary-text-color);cursor:pointer;font-size:14px;line-height:1.375rem;padding-inline-end:.5rem;position:relative;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:100%}:host(:focus){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])) .md-radio-icon{box-shadow:0 0 0 .125rem var(--md-focus-inner-color),0 0 0 .25rem var(--md-focus-middle-color),0 0 0 .3125rem var(--md-focus-outer-color)}:host(:hover:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-hover-border-color);background-color:var(--radio-input-hover-bg-color)}:host(:active:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-pressed-border-color);background-color:var(--radio-input-pressed-bg-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .md-radio-input{cursor:not-allowed}:host([disabled]) .md-radio-label{cursor:not-allowed;color:var(--radio-input-disabled-text-color)}:host([disabled]) .md-radio-icon{cursor:not-allowed;border-color:var(--radio-input-disabled-border-color);background-color:var(--radio-input-disabled-bg-color)}:host([checked]) .md-radio-icon{border-color:var(--radio-input-selected-border-color);background-color:var(--radio-input-selected-bg-color)}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;background-color:var(--radio-input-icon-color);border-radius:50%}:host([checked]:hover:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-hover-border-color);background-color:var(--radio-input-selected-hover-bg-color)}:host([checked]:active:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-pressed-border-color);background-color:var(--radio-input-selected-pressed-bg-color)}:host([checked][disabled]) .md-radio-icon{border-color:var(--radio-input-selected-disabled-border-color);background-color:var(--radio-input-selected-disabled-bg-color)}:host([checked][disabled]) .md-radio-icon:before{background-color:var(--radio-input-selected-disabled-border-color)}@media(forced-colors:active){:host(md-radio) .md-radio-icon{border:1px solid CanvasText}:host(:active:not([disabled])) .md-radio-label:before,:host(:hover:not([disabled])) .md-radio-icon{border:none;outline:2px solid Highlight;outline-offset:-1px}:host([checked]) .md-radio-icon{background-color:Highlight;border:none;outline:0}:host([checked]:hover:not([disabled])) .md-radio-icon{background-color:Highlight}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:12px;transform:translate(-50%,-50%);width:8px;height:8px;background-color:Canvas;border-radius:50%}:host([focus-visible]:not([disabled])){outline:2px solid Highlight;outline-offset:-1px}}:host(md-radiogroup){display:flex}:host(md-radio){border-radius:.25rem;display:inline!important}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-radio){margin-bottom:calc(.25rem*2)}:host([alignment=horizontal]) div{display:inline-flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-radio){margin-inline-end:calc(.25rem*8)}:host([disabled]) div ::slotted(md-radio){pointer-events:none}:host(md-label) .md-label{color:var(--label-color,#000);font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:var(--font-size-body-midsize,.875rem);line-height:1.25rem;display:flex;align-items:center}:host(md-label) .md-label.right{float:none!important;text-align:right}:host(md-label) .md-label.inline{margin:0 0 1rem 0;padding:.50390625rem 0}:host(md-label) .md-label small{text-transform:capitalize}:host(md-label) .md-label span{font-size:inherit}:host(md-label) .md-secondary-label{color:var(--label-secondary,#545454);display:flex;flex-grow:1;font-size:var(--font-size-body-midsize,.875rem);line-height:1.125rem;padding:.25rem 1rem 0}:host(.md-input__label.disabled) label,:host(.md-input__secondary-label.disabled) label{cursor:not-allowed}:host(.md-input__label.disabled.newMomentum) label,:host(.md-input__secondary-label.disabled.newMomentum) label{color:var(--input-default-new-disabled-color)!important}`}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1598],{11598:(o,e,r)=>{r.d(e,{A:()=>d});const d=r(41488).css`:host(:focus){box-shadow:none;outline:0}:host(md-checkbox){border-radius:.125rem;cursor:pointer;display:inline-flex;position:relative;vertical-align:middle}:host(md-checkbox) .checkbox-input{height:calc(1rem + .25rem);position:absolute;visibility:hidden;width:100%;padding-inline-start:calc(.25rem);padding-inline-end:calc(.25rem)}:host(md-checkbox) .checkbox-box{background:var(--checkbox-bg-color);color:var(--checkbox-icon-color);border:.0625rem solid var(--checkbox-border-color);border-radius:.125rem;height:1rem;width:1rem;position:relative;display:flex;align-items:center;justify-content:center}:host(md-checkbox) .checkbox-label{cursor:pointer;display:inline-flex;position:relative;width:100%;z-index:1;align-items:center;gap:.5rem;min-height:calc(1rem + 4px)}:host([focus-visible]:not([disabled])) .checkbox-box{box-shadow:0 0 0 .125rem var(--md-focus-inner-color),0 0 0 .25rem var(--md-focus-middle-color),0 0 0 .3125rem var(--md-focus-outer-color)}:host(:hover:not([disabled])) .checkbox-box{background:var(--checkbox-hover-bg-color);border:.0625rem solid var(--checkbox-hover-border-color)}:host(:active:not([disabled])) .checkbox-box{background:var(--checkbox-pressed-bg-color);border:.0625rem solid var(--checkbox-pressed-border-color)}:host([disabled]) .checkbox-label{cursor:not-allowed}:host([disabled]) .checkbox-box{color:var(--checkbox-disabled-text-color);border-color:var(--checkbox-disabled-border-color);background-color:var(--checkbox-disabled-bg-color)}:host([aria-checked=true]) .checkbox-box,:host([indeterminate]) .checkbox-box{background:var(--checkbox-selected-bg-color);border:.0625rem solid var(--checkbox-selected-border-color)}:host([aria-checked=true][disabled]) .checkbox-box,:host([indeterminate][disabled]) .checkbox-box{background:var(--checkbox-disabled-selected-bg-color);border-color:var(--checkbox-disabled-border-color);color:var(--checkbox-disabled-text-color)}:host([aria-checked=true][disabled]) .checkbox-label,:host([indeterminate][disabled]) .checkbox-label{color:var(--checkbox-disabled-text-color)}:host([aria-checked=true]:hover:not([disabled])) .checkbox-box,:host([indeterminate]:hover:not([disabled])) .checkbox-box{background:var(--checkbox-selected-hover-bg-color);border-color:var(--checkbox-selected-hover-border-color)}:host([aria-checked=true]:active:not([disabled])) .checkbox-box,:host([indeterminate]:active:not([disabled])) .checkbox-box{background:var(--checkbox-selected-pressed-bg-color);border-color:var(--checkbox-selected-pressed-border-color)}@media(forced-colors:active){:host([focus-visible]:not([disabled])){outline:2px solid Highlight;box-shadow:none}}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-checkbox:not(:last-child)){margin-bottom:calc(.25rem*2)}:host([alignment=horizontal]) div{display:flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-checkbox:not(:last-child)){margin-right:calc(.25rem*10)}:host{--radio-label-text-color:var(--radio-input-text-color)}:host(md-radio) .md-radio-wrapper{position:relative;max-height:1.375rem;display:inline-flex;gap:.5rem;align-items:center;max-width:100%}:host(md-radio) .md-radio-input{position:absolute;top:0;left:0;height:1rem;width:1rem;opacity:0;cursor:pointer;margin:0;padding:0;border:0}:host(md-radio) .md-radio-icon{border:.0625rem solid var(--radio-input-border-color);border-top-left-radius:50%;border-top-right-radius:50%;border-bottom-left-radius:50%;border-bottom-right-radius:50%;background-color:var(--radio-input-bg-color);height:1rem;width:1rem;display:inline-flex;cursor:pointer;flex-shrink:0;flex-grow:0;align-items:center;justify-content:center;position:relative}:host(md-radio) .md-radio-label{color:var(--md-primary-text-color);cursor:pointer;font-size:14px;line-height:1.375rem;padding-inline-end:.5rem;position:relative;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:100%}:host(md-radio) .md-radio-help-text--hide{display:none}:host(md-radio) .help-text-radio{padding-top:0;padding-left:1.5rem}:host(:focus){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])) .md-radio-icon{box-shadow:0 0 0 .125rem var(--md-focus-inner-color),0 0 0 .25rem var(--md-focus-middle-color),0 0 0 .3125rem var(--md-focus-outer-color)}:host(:hover:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-hover-border-color);background-color:var(--radio-input-hover-bg-color)}:host(:active:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-pressed-border-color);background-color:var(--radio-input-pressed-bg-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .md-radio-input{cursor:not-allowed}:host([disabled]) .md-radio-label{cursor:not-allowed;color:var(--radio-input-disabled-text-color)}:host([disabled]) .md-radio-icon{cursor:not-allowed;border-color:var(--radio-input-disabled-border-color);background-color:var(--radio-input-disabled-bg-color)}:host([checked]) .md-radio-icon{border-color:var(--radio-input-selected-border-color);background-color:var(--radio-input-selected-bg-color)}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;background-color:var(--radio-input-icon-color);border-radius:50%}:host([checked]:hover:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-hover-border-color);background-color:var(--radio-input-selected-hover-bg-color)}:host([checked]:active:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-pressed-border-color);background-color:var(--radio-input-selected-pressed-bg-color)}:host([checked][disabled]) .md-radio-icon{border-color:var(--radio-input-selected-disabled-border-color);background-color:var(--radio-input-selected-disabled-bg-color)}:host([checked][disabled]) .md-radio-icon:before{background-color:var(--radio-input-selected-disabled-border-color)}@media(forced-colors:active){:host(md-radio) .md-radio-icon{border:1px solid CanvasText}:host(:active:not([disabled])) .md-radio-label:before,:host(:hover:not([disabled])) .md-radio-icon{border:none;outline:2px solid Highlight;outline-offset:-1px}:host([checked]) .md-radio-icon{background-color:Highlight;border:none;outline:0}:host([checked]:hover:not([disabled])) .md-radio-icon{background-color:Highlight}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:12px;transform:translate(-50%,-50%);width:8px;height:8px;background-color:Canvas;border-radius:50%}:host([focus-visible]:not([disabled])){outline:2px solid Highlight;outline-offset:-1px}}:host(md-radiogroup){display:flex}:host(md-radio){border-radius:.25rem;display:inline!important}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-radio){margin-bottom:calc(.25rem*2)}:host([alignment=horizontal]) div{display:inline-flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-radio){margin-inline-end:calc(.25rem*8)}:host([disabled]) div ::slotted(md-radio){pointer-events:none}:host(md-label) .md-label{color:var(--label-color,#000);font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:var(--font-size-body-midsize,.875rem);line-height:1.25rem;display:flex;align-items:center}:host(md-label) .md-label.right{float:none!important;text-align:right}:host(md-label) .md-label.inline{margin:0 0 1rem 0;padding:.50390625rem 0}:host(md-label) .md-label small{text-transform:capitalize}:host(md-label) .md-label span{font-size:inherit}:host(md-label) .md-secondary-label{color:var(--label-secondary,#545454);display:flex;flex-grow:1;font-size:var(--font-size-body-midsize,.875rem);line-height:1.125rem;padding:.25rem 1rem 0}:host(.md-input__label.disabled) label,:host(.md-input__secondary-label.disabled) label{cursor:not-allowed}:host(.md-input__label.disabled.newMomentum) label,:host(.md-input__secondary-label.disabled.newMomentum) label{color:var(--input-default-new-disabled-color)!important}`}}]);
package/dist/2547.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[2547],{4928:(t,e,i)=>{i(20109),i(61200);var s,o=i(90195),l=i(3001),n=i(31890),r=i(66677),h=i(26272),a=i(41488),d=i(40333),p=i(23968),u=i(97822),c=i(22818),m=i(8229),b=i(86635),g=i(97103),f=i(46795),x=function(t,e,i,s){var o,l=arguments.length,n=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(l<3?o(n):l>3?o(e,i,n):o(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n},v=function(t,e,i,s){return new(i||(i=Promise))(function(o,l){function n(t){try{h(s.next(t))}catch(t){l(t)}}function r(t){try{h(s.throw(t))}catch(t){l(t)}}function h(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,r)}h((s=s.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,l.yC)(a.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e;const i=this._focusedIndex;if(this.checkForVirtualScroll()){let i;i=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const s=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===i):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),s&&(null==s||s.toggleAttribute("focused",!0))}else if(this.lists){const e=this.lists[i];e&&e.toggleAttribute("focused",!1);const s=this.lists[t];s&&s.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",i)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return v(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,g.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[h.A,f.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return a.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[2547],{4928:(t,e,i)=>{i(20109),i(61200);var s,o=i(90195),l=i(3001),n=i(31890),r=i(66677),h=i(26272),a=i(41488),d=i(40333),p=i(23968),u=i(97822),c=i(22818),m=i(8229),b=i(86635),g=i(97103),f=i(46795),x=function(t,e,i,s){var o,l=arguments.length,n=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(l<3?o(n):l>3?o(e,i,n):o(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n},v=function(t,e,i,s){return new(i||(i=Promise))(function(o,l){function n(t){try{h(s.next(t))}catch(t){l(t)}}function r(t){try{h(s.throw(t))}catch(t){l(t)}}function h(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,r)}h((s=s.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,l.yC)(a.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e;const i=this._focusedIndex;if(this.checkForVirtualScroll()){let i;i=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const s=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===i):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),s&&(null==s||s.toggleAttribute("focused",!0))}else if(this.lists){const e=this.lists[i];e&&e.toggleAttribute("focused",!1);const s=this.lists[t];s&&s.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",i)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?String(t[this.optionValue]):t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?String(t[this.optionId]):t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return v(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,g.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[h.A,f.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return a.html`
2
2
  <md-icon
3
3
  name=${t}
4
4
  class=${e}
package/dist/6067.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6067],{76067:(o,r,e)=>{e.d(r,{A:()=>d});const d=e(41488).css`:host{--radio-label-text-color:var(--radio-input-text-color)}:host(md-radio) .md-radio-wrapper{position:relative;max-height:1.375rem;display:inline-flex;gap:.5rem;align-items:center;max-width:100%}:host(md-radio) .md-radio-input{position:absolute;top:0;left:0;height:1rem;width:1rem;opacity:0;cursor:pointer;margin:0;padding:0;border:0}:host(md-radio) .md-radio-icon{border:.0625rem solid var(--radio-input-border-color);border-top-left-radius:50%;border-top-right-radius:50%;border-bottom-left-radius:50%;border-bottom-right-radius:50%;background-color:var(--radio-input-bg-color);height:1rem;width:1rem;display:inline-flex;cursor:pointer;flex-shrink:0;flex-grow:0;align-items:center;justify-content:center;position:relative}:host(md-radio) .md-radio-label{color:var(--md-primary-text-color);cursor:pointer;font-size:14px;line-height:1.375rem;padding-inline-end:.5rem;position:relative;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:100%}:host(:focus){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])) .md-radio-icon{box-shadow:0 0 0 .125rem var(--md-focus-inner-color),0 0 0 .25rem var(--md-focus-middle-color),0 0 0 .3125rem var(--md-focus-outer-color)}:host(:hover:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-hover-border-color);background-color:var(--radio-input-hover-bg-color)}:host(:active:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-pressed-border-color);background-color:var(--radio-input-pressed-bg-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .md-radio-input{cursor:not-allowed}:host([disabled]) .md-radio-label{cursor:not-allowed;color:var(--radio-input-disabled-text-color)}:host([disabled]) .md-radio-icon{cursor:not-allowed;border-color:var(--radio-input-disabled-border-color);background-color:var(--radio-input-disabled-bg-color)}:host([checked]) .md-radio-icon{border-color:var(--radio-input-selected-border-color);background-color:var(--radio-input-selected-bg-color)}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;background-color:var(--radio-input-icon-color);border-radius:50%}:host([checked]:hover:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-hover-border-color);background-color:var(--radio-input-selected-hover-bg-color)}:host([checked]:active:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-pressed-border-color);background-color:var(--radio-input-selected-pressed-bg-color)}:host([checked][disabled]) .md-radio-icon{border-color:var(--radio-input-selected-disabled-border-color);background-color:var(--radio-input-selected-disabled-bg-color)}:host([checked][disabled]) .md-radio-icon:before{background-color:var(--radio-input-selected-disabled-border-color)}@media(forced-colors:active){:host(md-radio) .md-radio-icon{border:1px solid CanvasText}:host(:active:not([disabled])) .md-radio-label:before,:host(:hover:not([disabled])) .md-radio-icon{border:none;outline:2px solid Highlight;outline-offset:-1px}:host([checked]) .md-radio-icon{background-color:Highlight;border:none;outline:0}:host([checked]:hover:not([disabled])) .md-radio-icon{background-color:Highlight}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:12px;transform:translate(-50%,-50%);width:8px;height:8px;background-color:Canvas;border-radius:50%}:host([focus-visible]:not([disabled])){outline:2px solid Highlight;outline-offset:-1px}}:host(md-radiogroup){display:flex}:host(md-radio){border-radius:.25rem;display:inline!important}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-radio){margin-bottom:calc(.25rem*2)}:host([alignment=horizontal]) div{display:inline-flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-radio){margin-inline-end:calc(.25rem*8)}:host([disabled]) div ::slotted(md-radio){pointer-events:none}`}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6067],{76067:(o,r,e)=>{e.d(r,{A:()=>d});const d=e(41488).css`:host{--radio-label-text-color:var(--radio-input-text-color)}:host(md-radio) .md-radio-wrapper{position:relative;max-height:1.375rem;display:inline-flex;gap:.5rem;align-items:center;max-width:100%}:host(md-radio) .md-radio-input{position:absolute;top:0;left:0;height:1rem;width:1rem;opacity:0;cursor:pointer;margin:0;padding:0;border:0}:host(md-radio) .md-radio-icon{border:.0625rem solid var(--radio-input-border-color);border-top-left-radius:50%;border-top-right-radius:50%;border-bottom-left-radius:50%;border-bottom-right-radius:50%;background-color:var(--radio-input-bg-color);height:1rem;width:1rem;display:inline-flex;cursor:pointer;flex-shrink:0;flex-grow:0;align-items:center;justify-content:center;position:relative}:host(md-radio) .md-radio-label{color:var(--md-primary-text-color);cursor:pointer;font-size:14px;line-height:1.375rem;padding-inline-end:.5rem;position:relative;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:100%}:host(md-radio) .md-radio-help-text--hide{display:none}:host(md-radio) .help-text-radio{padding-top:0;padding-left:1.5rem}:host(:focus){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])) .md-radio-icon{box-shadow:0 0 0 .125rem var(--md-focus-inner-color),0 0 0 .25rem var(--md-focus-middle-color),0 0 0 .3125rem var(--md-focus-outer-color)}:host(:hover:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-hover-border-color);background-color:var(--radio-input-hover-bg-color)}:host(:active:not([disabled])) .md-radio-icon{border:.0625rem solid var(--radio-input-pressed-border-color);background-color:var(--radio-input-pressed-bg-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .md-radio-input{cursor:not-allowed}:host([disabled]) .md-radio-label{cursor:not-allowed;color:var(--radio-input-disabled-text-color)}:host([disabled]) .md-radio-icon{cursor:not-allowed;border-color:var(--radio-input-disabled-border-color);background-color:var(--radio-input-disabled-bg-color)}:host([checked]) .md-radio-icon{border-color:var(--radio-input-selected-border-color);background-color:var(--radio-input-selected-bg-color)}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;background-color:var(--radio-input-icon-color);border-radius:50%}:host([checked]:hover:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-hover-border-color);background-color:var(--radio-input-selected-hover-bg-color)}:host([checked]:active:not([disabled])) .md-radio-icon{border-color:var(--radio-input-selected-pressed-border-color);background-color:var(--radio-input-selected-pressed-bg-color)}:host([checked][disabled]) .md-radio-icon{border-color:var(--radio-input-selected-disabled-border-color);background-color:var(--radio-input-selected-disabled-bg-color)}:host([checked][disabled]) .md-radio-icon:before{background-color:var(--radio-input-selected-disabled-border-color)}@media(forced-colors:active){:host(md-radio) .md-radio-icon{border:1px solid CanvasText}:host(:active:not([disabled])) .md-radio-label:before,:host(:hover:not([disabled])) .md-radio-icon{border:none;outline:2px solid Highlight;outline-offset:-1px}:host([checked]) .md-radio-icon{background-color:Highlight;border:none;outline:0}:host([checked]:hover:not([disabled])) .md-radio-icon{background-color:Highlight}:host([checked]) .md-radio-icon:before{content:"";position:absolute;top:50%;left:12px;transform:translate(-50%,-50%);width:8px;height:8px;background-color:Canvas;border-radius:50%}:host([focus-visible]:not([disabled])){outline:2px solid Highlight;outline-offset:-1px}}:host(md-radiogroup){display:flex}:host(md-radio){border-radius:.25rem;display:inline!important}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-radio){margin-bottom:calc(.25rem*2)}:host([alignment=horizontal]) div{display:inline-flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-radio){margin-inline-end:calc(.25rem*8)}:host([disabled]) div ::slotted(md-radio){pointer-events:none}`}}]);
package/dist/6408.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6408],{96408:(e,t,i)=>{i(20109),i(61200),i(6396),i(12176);var s,a=i(90195),o=i(31890),n=i(32972),r=i(26272),l=(i(32022),i(41488)),p=i(40333),d=i(23968),h=i(97822),u=i(22818),m=i(8229),c=i(21572),y=function(e,t,i,s){var a,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="input",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.role="",this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.displayCharacterCount=!1,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){this.input.select()}focus(){this.input.focus()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==a.Uz.Space&&t!==a.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}inputTemplate(){var e;return this.multiline?l.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6408],{96408:(e,t,i)=>{i(20109),i(61200),i(6396),i(12176);var s,o=i(90195),a=i(31890),n=i(32972),r=i(26272),l=(i(32022),i(41488)),p=i(40333),d=i(23968),h=i(97822),u=i(22818),m=i(8229),c=i(21572),y=function(e,t,i,s){var o,a=arguments.length,n=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(a<3?o(n):a>3?o(t,i,n):o(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="input",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.role="",this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==o.Uz.Space&&t!==o.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}inputTemplate(){var e;return this.multiline?l.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
@@ -104,11 +104,12 @@
104
104
  >
105
105
  </md-icon>
106
106
  </button>
107
- `:p.nothing}characterCountLabelTemplate(){return this.maxLength&&this.displayCharacterCount&&!this.disabled&&!this.readOnly?l.html`<div class="md-input__character-count-label-container">
108
- <span class="md-input__character-count-label ${(0,d.classMap)({error:this.value.length>=this.maxLength})}"
109
- >${this.value.length}/${this.maxLength}</span
107
+ `:p.nothing}characterCountLabelTemplate(){return!this.maxSuggestedLength||this.disabled||this.readOnly?p.nothing:l.html`<div class="md-input__character-count-label-container">
108
+ <span
109
+ class="md-input__character-count-label ${(0,d.classMap)({error:this.value.length>this.maxSuggestedLength})}"
110
+ >${this.value.length}/${this.maxSuggestedLength}</span
110
111
  >
111
- </div> `:p.nothing}secondaryLabelTemplate(){return this.secondaryLabel?l.html`
112
+ </div> `}secondaryLabelTemplate(){return this.secondaryLabel?l.html`
112
113
  <md-label
113
114
  class="md-input__secondary-label ${(0,d.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
114
115
  secondaryLabel
@@ -153,4 +154,4 @@
153
154
  ${this.characterCountLabelTemplate()}
154
155
  </div>
155
156
  </div>
156
- `}};y([(0,l.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,l.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,l.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,l.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,l.property)({type:String})],i.prototype,"id",void 0),y([(0,l.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,l.property)({type:String})],i.prototype,"label",void 0),y([(0,l.property)({type:String})],i.prototype,"helpText",void 0),y([(0,l.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,l.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,l.property)({type:String})],i.prototype,"role",void 0),y([(0,l.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,l.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,l.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,l.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,l.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,l.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,l.property)({type:String})],i.prototype,"shape",void 0),y([(0,l.property)({type:String})],i.prototype,"type",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,l.property)({type:Object})],i.prototype,"control",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,l.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,l.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"displayCharacterCount",void 0),y([(0,l.query)(".md-input")],i.prototype,"input",void 0),y([(0,l.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,l.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,l.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
157
+ `}};y([(0,l.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,l.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,l.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,l.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,l.property)({type:String})],i.prototype,"id",void 0),y([(0,l.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,l.property)({type:String})],i.prototype,"label",void 0),y([(0,l.property)({type:String})],i.prototype,"helpText",void 0),y([(0,l.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,l.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,l.property)({type:String})],i.prototype,"role",void 0),y([(0,l.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,l.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,l.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,l.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,l.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,l.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,l.property)({type:String})],i.prototype,"shape",void 0),y([(0,l.property)({type:String})],i.prototype,"type",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,l.property)({type:Object})],i.prototype,"control",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,l.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,l.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,l.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,l.query)(".md-input")],i.prototype,"input",void 0),y([(0,l.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,l.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,l.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
@@ -1,4 +1,4 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/repeat","lit-virtualizer"],e);else{var i="object"==typeof exports?e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer")):e(t["lit-element"],t["lit-html/directives/class-map"],t["lit-html/directives/style-map"],t["lit-html"],t["lit-html/directives/if-defined"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["lit-html/directives/repeat"],t["lit-virtualizer"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i,s,o,l,n,r,a,h)=>(()=>{"use strict";var d,p={4928:(t,e,i)=>{i.r(e),i.d(e,{ComboBox:()=>s}),i(20109),i(61200);var s,o=i(90195),l=i(3001),n=i(31890),r=i(66677),a=i(26272),h=i(41488),d=i(40333),p=i(23968),u=i(97822),c=i(22818),m=i(8229),b=i(86635),g=i(97103),f=i(46795),x=function(t,e,i,s){var o,l=arguments.length,n=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(l<3?o(n):l>3?o(e,i,n):o(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n},v=function(t,e,i,s){return new(i||(i=Promise))(function(o,l){function n(t){try{a(s.next(t))}catch(t){l(t)}}function r(t){try{a(s.throw(t))}catch(t){l(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,r)}a((s=s.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,l.yC)(h.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e;const i=this._focusedIndex;if(this.checkForVirtualScroll()){let i;i=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const s=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===i):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),s&&(null==s||s.toggleAttribute("focused",!0))}else if(this.lists){const e=this.lists[i];e&&e.toggleAttribute("focused",!1);const s=this.lists[t];s&&s.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",i)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return v(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,g.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[a.A,f.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return h.html`
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html"),require("lit-html/directives/style-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html","lit-html/directives/style-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/repeat","lit-virtualizer"],e);else{var i="object"==typeof exports?e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html"),require("lit-html/directives/style-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer")):e(t["lit-element"],t["lit-html/directives/class-map"],t["lit-html"],t["lit-html/directives/style-map"],t["lit-html/directives/if-defined"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["lit-html/directives/repeat"],t["lit-virtualizer"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i,s,o,l,n,r,a,h)=>(()=>{"use strict";var d,p={4928:(t,e,i)=>{i.r(e),i.d(e,{ComboBox:()=>s}),i(20109),i(61200);var s,o=i(90195),l=i(3001),n=i(31890),r=i(66677),a=i(26272),h=i(41488),d=i(40333),p=i(23968),u=i(97822),c=i(22818),m=i(8229),b=i(86635),g=i(97103),f=i(46795),x=function(t,e,i,s){var o,l=arguments.length,n=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(l<3?o(n):l>3?o(e,i,n):o(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n},v=function(t,e,i,s){return new(i||(i=Promise))(function(o,l){function n(t){try{a(s.next(t))}catch(t){l(t)}}function r(t){try{a(s.throw(t))}catch(t){l(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,r)}a((s=s.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,l.yC)(h.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e;const i=this._focusedIndex;if(this.checkForVirtualScroll()){let i;i=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const s=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===i):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),s&&(null==s||s.toggleAttribute("focused",!0))}else if(this.lists){const e=this.lists[i];e&&e.toggleAttribute("focused",!1);const s=this.lists[t];s&&s.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",i)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?String(t[this.optionValue]):t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?String(t[this.optionId]):t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return v(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,g.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[a.A,f.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return h.html`
2
2
  <md-icon
3
3
  name=${t}
4
4
  class=${e}
@@ -215,4 +215,4 @@
215
215
  </div>
216
216
  `:d.nothing}
217
217
  ${this.messagesTemplate()} ${this.helpTextTemplate()}
218
- `}};x([(0,h.property)({type:String})],i.prototype,"label",void 0),x([(0,h.property)({type:Array})],i.prototype,"options",void 0),x([(0,h.property)({type:Array,attribute:"custom-options"})],i.prototype,"customOptions",void 0),x([(0,h.property)({type:String})],i.prototype,"placeholder",void 0),x([(0,h.property)({type:Boolean,attribute:"is-multi"})],i.prototype,"isMulti",void 0),x([(0,h.property)({type:Boolean,attribute:"use-virtual-scroll"})],i.prototype,"useVirtualScroll",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"ordered",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"expanded",void 0),x([(0,h.property)({type:Array,reflect:!0})],i.prototype,"groupExpandedList",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),x([(0,h.property)({type:Boolean,attribute:"no-clear-icon"})],i.prototype,"noClearIcon",void 0),x([(0,h.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),x([(0,h.property)({type:Array})],i.prototype,"selectedOptions",void 0),x([(0,h.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),x([(0,h.property)({type:String,attribute:"option-id",reflect:!0})],i.prototype,"optionId",void 0),x([(0,h.property)({type:String,attribute:"option-value",reflect:!0})],i.prototype,"optionValue",void 0),x([(0,h.property)({type:Boolean,attribute:"with-custom-content"})],i.prototype,"isCustomContent",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),x([(0,h.property)({type:String})],i.prototype,"shape",void 0),x([(0,h.property)({type:Array})],i.prototype,"value",void 0),x([(0,h.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),x([(0,h.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],i.prototype,"allowCustomValue",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),x([(0,h.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),x([(0,h.property)({type:String,attribute:"no-options-i18n"})],i.prototype,"optionsTextLocalization",void 0),x([(0,h.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"invalid",void 0),x([(0,h.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],i.prototype,"invalidText",void 0),x([(0,h.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),x([(0,h.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),x([(0,h.internalProperty)()],i.prototype,"ariaLabelForComboBox",void 0),x([(0,h.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),x([(0,h.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),x([(0,h.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),x([(0,h.property)({type:String,attribute:"all-i18n"})],i.prototype,"allTextLocalization",void 0),x([(0,h.property)({type:String,attribute:"select-all-i18n"})],i.prototype,"selectAllTextLocalization",void 0),x([(0,h.property)({type:String,attribute:"selected-all-i18n"})],i.prototype,"selectedTextLocalization",void 0),x([(0,h.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],i.prototype,"allowSelectAll",void 0),x([(0,h.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],i.prototype,"showCustomError",void 0),x([(0,h.property)({type:Boolean,attribute:"show-loader",reflect:!0})],i.prototype,"showLoader",void 0),x([(0,h.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],i.prototype,"showSelectedCount",void 0),x([(0,h.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"newMomentum",void 0),x([(0,h.property)({type:Boolean,attribute:"show-filter-icon"})],i.prototype,"showFilterIcon",void 0),x([(0,h.property)({type:Boolean,attribute:"prevent-filter"})],i.prototype,"preventFilter",void 0),x([(0,h.property)({type:Boolean,attribute:"is-dropdown-arrow"})],i.prototype,"isDropdownArrow",void 0),x([(0,h.property)({type:String})],i.prototype,"comboboxId",void 0),x([(0,h.property)({type:String})],i.prototype,"helpText",void 0),x([(0,h.property)({type:Array})],i.prototype,"messageArr",void 0),x([(0,h.property)({type:String})],i.prototype,"htmlId",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),x([(0,h.internalProperty)()],i.prototype,"isOptGroup",void 0),x([(0,h.internalProperty)()],i.prototype,"isSelectAllChecked",void 0),x([(0,h.query)(".group")],i.prototype,"group",void 0),x([(0,h.query)(".md-combobox-listbox")],i.prototype,"input",void 0),x([(0,h.query)(".md-combobox-button")],i.prototype,"button",void 0),x([(0,h.query)("div#md-combobox-listbox")],i.prototype,"listBox",void 0),x([(0,h.query)(".virtual-scroll")],i.prototype,"virtualizer",void 0),x([(0,h.queryAll)("div.md-combobox-option")],i.prototype,"lists",void 0),x([(0,h.queryAll)(".group-label")],i.prototype,"labels",void 0),x([(0,h.queryAll)(".md-combobox-selected-item")],i.prototype,"selected",void 0),i=x([(0,n.w)("md-combobox")],i),t.ELEMENT=i}(s||(s={}))},8229:t=>{t.exports=i},22818:t=>{t.exports=a},23968:t=>{t.exports=e},32022:t=>{t.exports=l},40333:t=>{t.exports=s},41488:e=>{e.exports=t},60554:t=>{t.exports=n},85314:t=>{t.exports=r},86635:t=>{t.exports=h},97822:t=>{t.exports=o}},u={};function c(t){var e=u[t];if(void 0!==e)return e.exports;var i=u[t]={exports:{}};return p[t].call(i.exports,i,i.exports,c),i.exports}c.m=p,d=[],c.O=(t,e,i,s)=>{if(!e){var o=1/0;for(a=0;a<d.length;a++){for(var[e,i,s]=d[a],l=!0,n=0;n<e.length;n++)(!1&s||o>=s)&&Object.keys(c.O).every(t=>c.O[t](e[n]))?e.splice(n--,1):(l=!1,s<o&&(o=s));if(l){d.splice(a--,1);var r=i();void 0!==r&&(t=r)}}return t}s=s||0;for(var a=d.length;a>0&&d[a-1][2]>s;a--)d[a]=d[a-1];d[a]=[e,i,s]},c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var i in e)c.o(e,i)&&!c.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={2169:0,2547:0};c.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[l,n,r]=i,a=0;if(l.some(e=>0!==t[e])){for(s in n)c.o(n,s)&&(c.m[s]=n[s]);if(r)var h=r(c)}for(e&&e(i);a<l.length;a++)o=l[a],c.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return c.O(h)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var m=c.O(void 0,[8493,7103,1890,6272,6325,9217,6283,2176,6798,5830,1200,8889,8373,4624,300,591,768,3001,4977,109,6795,3820,5433],()=>c(4928));return c.O(m)})());
218
+ `}};x([(0,h.property)({type:String})],i.prototype,"label",void 0),x([(0,h.property)({type:Array})],i.prototype,"options",void 0),x([(0,h.property)({type:Array,attribute:"custom-options"})],i.prototype,"customOptions",void 0),x([(0,h.property)({type:String})],i.prototype,"placeholder",void 0),x([(0,h.property)({type:Boolean,attribute:"is-multi"})],i.prototype,"isMulti",void 0),x([(0,h.property)({type:Boolean,attribute:"use-virtual-scroll"})],i.prototype,"useVirtualScroll",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"ordered",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"expanded",void 0),x([(0,h.property)({type:Array,reflect:!0})],i.prototype,"groupExpandedList",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),x([(0,h.property)({type:Boolean,attribute:"no-clear-icon"})],i.prototype,"noClearIcon",void 0),x([(0,h.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),x([(0,h.property)({type:Array})],i.prototype,"selectedOptions",void 0),x([(0,h.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),x([(0,h.property)({type:String,attribute:"option-id",reflect:!0})],i.prototype,"optionId",void 0),x([(0,h.property)({type:String,attribute:"option-value",reflect:!0})],i.prototype,"optionValue",void 0),x([(0,h.property)({type:Boolean,attribute:"with-custom-content"})],i.prototype,"isCustomContent",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),x([(0,h.property)({type:String})],i.prototype,"shape",void 0),x([(0,h.property)({type:Array})],i.prototype,"value",void 0),x([(0,h.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),x([(0,h.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],i.prototype,"allowCustomValue",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),x([(0,h.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),x([(0,h.property)({type:String,attribute:"no-options-i18n"})],i.prototype,"optionsTextLocalization",void 0),x([(0,h.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"invalid",void 0),x([(0,h.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],i.prototype,"invalidText",void 0),x([(0,h.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),x([(0,h.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),x([(0,h.internalProperty)()],i.prototype,"ariaLabelForComboBox",void 0),x([(0,h.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),x([(0,h.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),x([(0,h.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),x([(0,h.property)({type:String,attribute:"all-i18n"})],i.prototype,"allTextLocalization",void 0),x([(0,h.property)({type:String,attribute:"select-all-i18n"})],i.prototype,"selectAllTextLocalization",void 0),x([(0,h.property)({type:String,attribute:"selected-all-i18n"})],i.prototype,"selectedTextLocalization",void 0),x([(0,h.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],i.prototype,"allowSelectAll",void 0),x([(0,h.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],i.prototype,"showCustomError",void 0),x([(0,h.property)({type:Boolean,attribute:"show-loader",reflect:!0})],i.prototype,"showLoader",void 0),x([(0,h.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],i.prototype,"showSelectedCount",void 0),x([(0,h.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"newMomentum",void 0),x([(0,h.property)({type:Boolean,attribute:"show-filter-icon"})],i.prototype,"showFilterIcon",void 0),x([(0,h.property)({type:Boolean,attribute:"prevent-filter"})],i.prototype,"preventFilter",void 0),x([(0,h.property)({type:Boolean,attribute:"is-dropdown-arrow"})],i.prototype,"isDropdownArrow",void 0),x([(0,h.property)({type:String})],i.prototype,"comboboxId",void 0),x([(0,h.property)({type:String})],i.prototype,"helpText",void 0),x([(0,h.property)({type:Array})],i.prototype,"messageArr",void 0),x([(0,h.property)({type:String})],i.prototype,"htmlId",void 0),x([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),x([(0,h.internalProperty)()],i.prototype,"isOptGroup",void 0),x([(0,h.internalProperty)()],i.prototype,"isSelectAllChecked",void 0),x([(0,h.query)(".group")],i.prototype,"group",void 0),x([(0,h.query)(".md-combobox-listbox")],i.prototype,"input",void 0),x([(0,h.query)(".md-combobox-button")],i.prototype,"button",void 0),x([(0,h.query)("div#md-combobox-listbox")],i.prototype,"listBox",void 0),x([(0,h.query)(".virtual-scroll")],i.prototype,"virtualizer",void 0),x([(0,h.queryAll)("div.md-combobox-option")],i.prototype,"lists",void 0),x([(0,h.queryAll)(".group-label")],i.prototype,"labels",void 0),x([(0,h.queryAll)(".md-combobox-selected-item")],i.prototype,"selected",void 0),i=x([(0,n.w)("md-combobox")],i),t.ELEMENT=i}(s||(s={}))},8229:t=>{t.exports=s},22818:t=>{t.exports=a},23968:t=>{t.exports=e},32022:t=>{t.exports=l},40333:t=>{t.exports=i},41488:e=>{e.exports=t},60554:t=>{t.exports=n},85314:t=>{t.exports=r},86635:t=>{t.exports=h},97822:t=>{t.exports=o}},u={};function c(t){var e=u[t];if(void 0!==e)return e.exports;var i=u[t]={exports:{}};return p[t].call(i.exports,i,i.exports,c),i.exports}c.m=p,d=[],c.O=(t,e,i,s)=>{if(!e){var o=1/0;for(a=0;a<d.length;a++){for(var[e,i,s]=d[a],l=!0,n=0;n<e.length;n++)(!1&s||o>=s)&&Object.keys(c.O).every(t=>c.O[t](e[n]))?e.splice(n--,1):(l=!1,s<o&&(o=s));if(l){d.splice(a--,1);var r=i();void 0!==r&&(t=r)}}return t}s=s||0;for(var a=d.length;a>0&&d[a-1][2]>s;a--)d[a]=d[a-1];d[a]=[e,i,s]},c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var i in e)c.o(e,i)&&!c.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={2169:0,2547:0};c.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[l,n,r]=i,a=0;if(l.some(e=>0!==t[e])){for(s in n)c.o(n,s)&&(c.m[s]=n[s]);if(r)var h=r(c)}for(e&&e(i);a<l.length;a++)o=l[a],c.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return c.O(h)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var m=c.O(void 0,[8493,7103,1890,6272,6325,9217,6283,2176,6798,5830,1200,8889,8373,4624,300,591,768,3001,4977,109,6795,3820,5433],()=>c(4928));return c.O(m)})());
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/repeat","lit-virtualizer","country-codes-list","country-flags-svg","lit-html/directives/repeat.js"],t);else{var o="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/repeat.js")):t(e["lit-element"],e["lit-html/directives/class-map"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/repeat"],e["lit-virtualizer"],e["country-codes-list"],e["country-flags-svg"],e["lit-html/directives/repeat.js"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,(e,t,o,r,i,l,n,s,a,d,u,p,c)=>(()=>{"use strict";var m,h={6963:e=>{e.exports=c},8229:e=>{e.exports=o},13060:e=>{e.exports=u},18224:(e,t,o)=>{o.r(t),o.d(t,{CountryCodePicker:()=>r}),o(4928);var r,i=o(31890),l=o(26272),n=o(13060),s=o(65875),a=o(41488),d=o(40333),u=o(23968),p=o(6963),c=o(96953),m=function(e,t,o,r){var i,l=arguments.length,n=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(l<3?i(n):l>3?i(t,o,n):i(t,o))||n);return l>3&&n&&Object.defineProperty(t,o,n),n};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.codePlaceholder="+1",this.countryCallingCode="",this.showFlags=!1,this.pill=!1,this.disabled=!1,this.ariaLabel="",this.clearAriaLabel="Clear Country Code",this.id="",this.newMomentum=!1,this.isDropdownArrow=!0,this.countryCode="US",this.codeList=[]}connectedCallback(){super.connectedCallback(),this.codeList=(0,n.customArray)({name:"{countryNameEn}",value:"{countryCallingCode}",code:"{countryCode}"}),""===this.id&&(this.id=`md-country-code-picker-${Math.random().toString(36).substring(2,6)}`)}getCountryFlag(e){return a.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html"),require("lit-html/directives/style-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html","lit-html/directives/style-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/repeat","lit-virtualizer","country-codes-list","country-flags-svg","lit-html/directives/repeat.js"],t);else{var o="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html"),require("lit-html/directives/style-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/repeat.js")):t(e["lit-element"],e["lit-html/directives/class-map"],e["lit-html"],e["lit-html/directives/style-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/repeat"],e["lit-virtualizer"],e["country-codes-list"],e["country-flags-svg"],e["lit-html/directives/repeat.js"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,(e,t,o,r,i,l,n,s,a,d,u,p,c)=>(()=>{"use strict";var m,h={6963:e=>{e.exports=c},8229:e=>{e.exports=r},13060:e=>{e.exports=u},18224:(e,t,o)=>{o.r(t),o.d(t,{CountryCodePicker:()=>r}),o(4928);var r,i=o(31890),l=o(26272),n=o(13060),s=o(65875),a=o(41488),d=o(40333),u=o(23968),p=o(6963),c=o(96953),m=function(e,t,o,r){var i,l=arguments.length,n=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(l<3?i(n):l>3?i(t,o,n):i(t,o))||n);return l>3&&n&&Object.defineProperty(t,o,n),n};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.codePlaceholder="+1",this.countryCallingCode="",this.showFlags=!1,this.pill=!1,this.disabled=!1,this.ariaLabel="",this.clearAriaLabel="Clear Country Code",this.id="",this.newMomentum=!1,this.isDropdownArrow=!0,this.countryCode="US",this.codeList=[]}connectedCallback(){super.connectedCallback(),this.codeList=(0,n.customArray)({name:"{countryNameEn}",value:"{countryCallingCode}",code:"{countryCode}"}),""===this.id&&(this.id=`md-country-code-picker-${Math.random().toString(36).substring(2,6)}`)}getCountryFlag(e){return a.html`
2
2
  <span class="flag-svg-wrapper">
3
3
  <img src="${(0,s.findFlagUrlByIso2Code)(e)}" />
4
4
  </span>
@@ -36,4 +36,4 @@
36
36
  ${(0,p.repeat)(this.codeList,e=>e.name,(e,t)=>this.countryCodeOptionTemplate(e,t))}
37
37
  </md-combobox>
38
38
  </div>
39
- `}};m([(0,a.property)({type:String,reflect:!0})],t.prototype,"codePlaceholder",void 0),m([(0,a.property)({type:String,attribute:"country-calling-code"})],t.prototype,"countryCallingCode",void 0),m([(0,a.property)({type:Boolean,attribute:"show-flags"})],t.prototype,"showFlags",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"pill",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"disabled",void 0),m([(0,a.property)({type:String})],t.prototype,"ariaLabel",void 0),m([(0,a.property)({type:String})],t.prototype,"clearAriaLabel",void 0),m([(0,a.property)({type:String})],t.prototype,"id",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"newMomentum",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"isDropdownArrow",void 0),m([(0,a.internalProperty)()],t.prototype,"countryCode",void 0),m([(0,a.internalProperty)()],t.prototype,"codeList",void 0),m([(0,a.query)("md-combobox")],t.prototype,"combobox",void 0),t=m([(0,i.w)("md-country-code-picker")],t),e.ELEMENT=t}(r||(r={}))},22818:e=>{e.exports=a},23968:e=>{e.exports=t},32022:e=>{e.exports=l},40333:e=>{e.exports=r},41488:t=>{t.exports=e},60554:e=>{e.exports=n},65875:e=>{e.exports=p},85314:e=>{e.exports=s},86635:e=>{e.exports=d},97822:e=>{e.exports=i}},y={};function v(e){var t=y[e];if(void 0!==t)return t.exports;var o=y[e]={exports:{}};return h[e].call(o.exports,o,o.exports,v),o.exports}v.m=h,m=[],v.O=(e,t,o,r)=>{if(!t){var i=1/0;for(a=0;a<m.length;a++){for(var[t,o,r]=m[a],l=!0,n=0;n<t.length;n++)(!1&r||i>=r)&&Object.keys(v.O).every(e=>v.O[e](t[n]))?t.splice(n--,1):(l=!1,r<i&&(i=r));if(l){m.splice(a--,1);var s=o();void 0!==s&&(e=s)}}return e}r=r||0;for(var a=m.length;a>0&&m[a-1][2]>r;a--)m[a]=m[a-1];m[a]=[t,o,r]},v.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return v.d(t,{a:t}),t},v.d=(e,t)=>{for(var o in t)v.o(t,o)&&!v.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6753:0};v.O.j=t=>0===e[t];var t=(t,o)=>{var r,i,[l,n,s]=o,a=0;if(l.some(t=>0!==e[t])){for(r in n)v.o(n,r)&&(v.m[r]=n[r]);if(s)var d=s(v)}for(t&&t(o);a<l.length;a++)i=l[a],v.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return v.O(d)},o=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var g=v.O(void 0,[8493,7103,1890,6272,6325,9217,6283,2176,6798,5830,1200,8889,8373,4624,300,591,768,3001,4977,109,6795,3820,5433,2547,6953],()=>v(18224));return v.O(g)})());
39
+ `}};m([(0,a.property)({type:String,reflect:!0})],t.prototype,"codePlaceholder",void 0),m([(0,a.property)({type:String,attribute:"country-calling-code"})],t.prototype,"countryCallingCode",void 0),m([(0,a.property)({type:Boolean,attribute:"show-flags"})],t.prototype,"showFlags",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"pill",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"disabled",void 0),m([(0,a.property)({type:String})],t.prototype,"ariaLabel",void 0),m([(0,a.property)({type:String})],t.prototype,"clearAriaLabel",void 0),m([(0,a.property)({type:String})],t.prototype,"id",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"newMomentum",void 0),m([(0,a.property)({type:Boolean})],t.prototype,"isDropdownArrow",void 0),m([(0,a.internalProperty)()],t.prototype,"countryCode",void 0),m([(0,a.internalProperty)()],t.prototype,"codeList",void 0),m([(0,a.query)("md-combobox")],t.prototype,"combobox",void 0),t=m([(0,i.w)("md-country-code-picker")],t),e.ELEMENT=t}(r||(r={}))},22818:e=>{e.exports=a},23968:e=>{e.exports=t},32022:e=>{e.exports=l},40333:e=>{e.exports=o},41488:t=>{t.exports=e},60554:e=>{e.exports=n},65875:e=>{e.exports=p},85314:e=>{e.exports=s},86635:e=>{e.exports=d},97822:e=>{e.exports=i}},y={};function v(e){var t=y[e];if(void 0!==t)return t.exports;var o=y[e]={exports:{}};return h[e].call(o.exports,o,o.exports,v),o.exports}v.m=h,m=[],v.O=(e,t,o,r)=>{if(!t){var i=1/0;for(a=0;a<m.length;a++){for(var[t,o,r]=m[a],l=!0,n=0;n<t.length;n++)(!1&r||i>=r)&&Object.keys(v.O).every(e=>v.O[e](t[n]))?t.splice(n--,1):(l=!1,r<i&&(i=r));if(l){m.splice(a--,1);var s=o();void 0!==s&&(e=s)}}return e}r=r||0;for(var a=m.length;a>0&&m[a-1][2]>r;a--)m[a]=m[a-1];m[a]=[t,o,r]},v.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return v.d(t,{a:t}),t},v.d=(e,t)=>{for(var o in t)v.o(t,o)&&!v.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6753:0};v.O.j=t=>0===e[t];var t=(t,o)=>{var r,i,[l,n,s]=o,a=0;if(l.some(t=>0!==e[t])){for(r in n)v.o(n,r)&&(v.m[r]=n[r]);if(s)var d=s(v)}for(t&&t(o);a<l.length;a++)i=l[a],v.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return v.O(d)},o=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var g=v.O(void 0,[8493,7103,1890,6272,6325,9217,6283,2176,6798,5830,1200,8889,8373,4624,300,591,768,3001,4977,109,6795,3820,5433,2547,6953],()=>v(18224));return v.O(g)})());
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/repeat","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","luxon"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("luxon")):t(e["lit-element"],e["lit-html/directives/class-map"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e["@popperjs/core/lib/popper-lite"],e.luxon);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,(e,t,i,o,r,a,l,s,p,d,n,u,m,c,h,v)=>(()=>{"use strict";var f,y={4863:e=>{e.exports=h},8229:e=>{e.exports=i},17518:e=>{e.exports=p},22818:e=>{e.exports=d},22962:e=>{e.exports=n},23968:e=>{e.exports=t},32022:e=>{e.exports=a},40333:e=>{e.exports=o},41488:t=>{t.exports=e},60554:e=>{e.exports=l},65796:e=>{e.exports=v},68250:e=>{e.exports=m},69371:e=>{e.exports=c},84157:e=>{e.exports=u},85314:e=>{e.exports=s},85416:(e,t,i)=>{i.r(t),i.d(t,{DateTimePicker:()=>o}),i(96408),i(11323);var o,r=i(31890),a=i(81625),l=i(26272),s=i(41488),p=i(97822),d=i(65796),n=i(90195),u=i(33663),m=function(e,t,i,o){var r,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,i,l):r(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends s.LitElement{constructor(){super(...arguments),this.maxDate=void 0,this.minDate=void 0,this.weekStart="Sunday",this.ariaLabel="",this.twoDigitAutoTab=!1,this.shouldCloseOnSelect=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=n.R5.SECOND,this.dateValue=void 0,this.timeValue="00:00:00-08:00",this.value=void 0,this.disableDateValidation=!1,this.locale=void 0,this.placeholder=void 0,this.useISOFormat=!0,this.disabled=!1,this.positioningStrategy=void 0,this.showDefaultNowDate=!0,this.compactInput=void 0,this.controlButtons=void 0,this.fullDateTime=void 0,this.selectedTimeObject=void 0,this.selectedDateObject=(0,a.tB)(),this.handleDateChange=e=>{var t,i;this.selectedDateObject=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.data,this.dateValue=null===(i=this.selectedDateObject)||void 0===i?void 0:i.toISODate(),this.combineDateAndTimeValues(this.dateValue,this.timeValue)},this.handleTimeChange=e=>{var t,i,o;this.selectedTimeObject=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.data,this.timeValue=null===(i=this.selectedTimeObject)||void 0===i?void 0:i.startOf("second").toISOTime({suppressMilliseconds:!0}),(null===(o=this.controlButtons)||void 0===o?void 0:o.apply)||this.combineDateAndTimeValues(this.dateValue,this.timeValue)},this.handleDateTimeInputChange=e=>{var t;this.value=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value},this.parseValueForVisuals=e=>{e&&(this.dateValue=e.split("T")[0],this.timeValue=e.split("T")[1])},this.updateDateTimeObject=()=>{this.value?this.fullDateTime=d.DateTime.fromISO(this.value,{locale:this.locale}):this.fullDateTime=d.DateTime.fromISO("",{locale:this.locale}),this.dispatchEvent(new CustomEvent("date-time-change",{bubbles:!0,composed:!0,detail:{dateTimeString:this.value,dateTime:this.fullDateTime,locale:this.locale,twentyFourHourFormat:this.twentyFourHourFormat}}))},this.combineDateAndTimeValues=(e,t)=>{e&&(this.value=t?`${e}T${t}`:e)}}firstUpdated(e){var t;if(super.firstUpdated(e),!this.value&&this.showDefaultNowDate){const e=null===(t=this.selectedDateObject)||void 0===t?void 0:t.toISODate();this.combineDateAndTimeValues(e,this.timeValue)}}updated(e){var t;super.updated(e),e.has("value")&&(this.value&&this.parseValueForVisuals(this.value),this.updateDateTimeObject()),this.dateValue&&this.timeValue&&!(null===(t=this.controlButtons)||void 0===t?void 0:t.apply)&&(e.has("dateValue")||e.has("timeValue"))&&this.combineDateAndTimeValues(this.dateValue,this.timeValue),this.value&&e.has("locale")&&(this.fullDateTime=d.DateTime.fromISO(this.value,{locale:this.locale}))}get placeholderValue(){return this.placeholder?this.placeholder:"YYYY-MM-DDTHH:MM:SS-HH:MM"}static get styles(){return[l.A,u.A]}get displayValue(){if(!this.useISOFormat&&this.fullDateTime&&this.fullDateTime.isValid)return this.fullDateTime.toLocaleString(d.DateTime.DATETIME_MED,{locale:this.locale})}render(){var e;return s.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html"),require("lit-html/directives/style-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html","lit-html/directives/style-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/repeat","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","luxon"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html"),require("lit-html/directives/style-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("luxon")):t(e["lit-element"],e["lit-html/directives/class-map"],e["lit-html"],e["lit-html/directives/style-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e["@popperjs/core/lib/popper-lite"],e.luxon);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,(e,t,i,o,r,a,l,s,p,d,n,u,m,c,h,v)=>(()=>{"use strict";var f,y={4863:e=>{e.exports=h},8229:e=>{e.exports=o},17518:e=>{e.exports=p},22818:e=>{e.exports=d},22962:e=>{e.exports=n},23968:e=>{e.exports=t},32022:e=>{e.exports=a},40333:e=>{e.exports=i},41488:t=>{t.exports=e},60554:e=>{e.exports=l},65796:e=>{e.exports=v},68250:e=>{e.exports=m},69371:e=>{e.exports=c},84157:e=>{e.exports=u},85314:e=>{e.exports=s},85416:(e,t,i)=>{i.r(t),i.d(t,{DateTimePicker:()=>o}),i(96408),i(11323);var o,r=i(31890),a=i(81625),l=i(26272),s=i(41488),p=i(97822),d=i(65796),n=i(90195),u=i(33663),m=function(e,t,i,o){var r,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,i,l):r(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends s.LitElement{constructor(){super(...arguments),this.maxDate=void 0,this.minDate=void 0,this.weekStart="Sunday",this.ariaLabel="",this.twoDigitAutoTab=!1,this.shouldCloseOnSelect=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=n.R5.SECOND,this.dateValue=void 0,this.timeValue="00:00:00-08:00",this.value=void 0,this.disableDateValidation=!1,this.locale=void 0,this.placeholder=void 0,this.useISOFormat=!0,this.disabled=!1,this.positioningStrategy=void 0,this.showDefaultNowDate=!0,this.compactInput=void 0,this.controlButtons=void 0,this.fullDateTime=void 0,this.selectedTimeObject=void 0,this.selectedDateObject=(0,a.tB)(),this.handleDateChange=e=>{var t,i;this.selectedDateObject=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.data,this.dateValue=null===(i=this.selectedDateObject)||void 0===i?void 0:i.toISODate(),this.combineDateAndTimeValues(this.dateValue,this.timeValue)},this.handleTimeChange=e=>{var t,i,o;this.selectedTimeObject=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.data,this.timeValue=null===(i=this.selectedTimeObject)||void 0===i?void 0:i.startOf("second").toISOTime({suppressMilliseconds:!0}),(null===(o=this.controlButtons)||void 0===o?void 0:o.apply)||this.combineDateAndTimeValues(this.dateValue,this.timeValue)},this.handleDateTimeInputChange=e=>{var t;this.value=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value},this.parseValueForVisuals=e=>{e&&(this.dateValue=e.split("T")[0],this.timeValue=e.split("T")[1])},this.updateDateTimeObject=()=>{this.value?this.fullDateTime=d.DateTime.fromISO(this.value,{locale:this.locale}):this.fullDateTime=d.DateTime.fromISO("",{locale:this.locale}),this.dispatchEvent(new CustomEvent("date-time-change",{bubbles:!0,composed:!0,detail:{dateTimeString:this.value,dateTime:this.fullDateTime,locale:this.locale,twentyFourHourFormat:this.twentyFourHourFormat}}))},this.combineDateAndTimeValues=(e,t)=>{e&&(this.value=t?`${e}T${t}`:e)}}firstUpdated(e){var t;if(super.firstUpdated(e),!this.value&&this.showDefaultNowDate){const e=null===(t=this.selectedDateObject)||void 0===t?void 0:t.toISODate();this.combineDateAndTimeValues(e,this.timeValue)}}updated(e){var t;super.updated(e),e.has("value")&&(this.value&&this.parseValueForVisuals(this.value),this.updateDateTimeObject()),this.dateValue&&this.timeValue&&!(null===(t=this.controlButtons)||void 0===t?void 0:t.apply)&&(e.has("dateValue")||e.has("timeValue"))&&this.combineDateAndTimeValues(this.dateValue,this.timeValue),this.value&&e.has("locale")&&(this.fullDateTime=d.DateTime.fromISO(this.value,{locale:this.locale}))}get placeholderValue(){return this.placeholder?this.placeholder:"YYYY-MM-DDTHH:MM:SS-HH:MM"}static get styles(){return[l.A,u.A]}get displayValue(){if(!this.useISOFormat&&this.fullDateTime&&this.fullDateTime.isValid)return this.fullDateTime.toLocaleString(d.DateTime.DATETIME_MED,{locale:this.locale})}render(){var e;return s.html`
2
2
  <md-datepicker
3
3
  includes-time
4
4
  ?disabled=${this.disabled}