!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"]);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,r)=>(()=>{"use strict";var a,s={5983(t,e,i){i.r(e),i.d(e,{Button:()=>x,buttonAriaLive:()=>g,buttonColor:()=>m,buttonRoles:()=>b,buttonSize:()=>y,buttonTag:()=>u,buttonType:()=>v,buttonVariant:()=>f});var o=i(6616),r=(i(9773),i(9609)),a=i(7154),s=i(4084),n=i(7161),d=i(429),l=i(5125),p=i(291),h=i(680),c=function(t,e,i,o){var r,a=arguments.length,s=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,i,s):r(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s};const y=["20","24","28","32","36","40","44","52","56","72","68","84","size-none",20,24,28,32,36,40,44,52,56,68,72,68,84],u=["button","input","a"],v=["button","reset","submit"],b=["button","checkbox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","switch","tab"],f=["primary","secondary","red","green","ghost","ghostInheritTextColor","white","darkGrey","promotional","tab","available","unavailable","engaged","idle","inverted-primary","inverted-secondary","inverted-ghost","dropdown","secondary-negative","secondary-positive","secondary-accent"],m=["blue","red","green","orange","yellow","mint","purple","pink","cyan","white","dark-gray","duck-egg","violet","color-none",""],g=["","off","polite","assertive"];var x;!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this._active=!1,this._tabIndex=0,this.ariaLabel="",this.ariaLabelledBy="",this.ariaLive="",this.ariaExpanded="",this.ariaHaspopup="false",this.ariaPressed="",this.circle=!1,this.rounded=!1,this.color="",this.containerLarge=!1,this.disabled=!1,this.href="",this.id="",this.value="",this.keyboardKey="",this.label="",this.loading=!1,this.outline=!1,this.hasRemoveStyle=!1,this.size="32",this.tag="button",this.type="button",this.role="button",this.variant="secondary",this.width="",this.maxWidth="",this.activityType="",this.iconActive=!1,this.isActive=!1,this.autofocus=!1,this.renderWidth=()=>this.width?`width: ${this.width};`:n.nothing,this.renderMaxWidth=()=>this.maxWidth?`max-width: ${this.maxWidth};`:n.nothing,this.getStyles=()=>{if(this.width||this.maxWidth)return n.html`
          <style>
            :host .md-button--${this.size} {
              ${this.renderWidth()};
              ${this.renderMaxWidth()};
            }
          </style>
        `},this.iconTemplate=()=>this.loading?n.html` <md-spinner size="16"></md-spinner> `:n.html` <slot name="icon"></slot> `,this.textTemplate=()=>this.circle&&this.hasIcon?n.nothing:n.html` <slot name="text"></slot> `}get active(){return this._active}set active(t){const e=this._active;this._active=t,this.requestUpdate("active",e)}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}firstUpdated(t){super.firstUpdated(t),this.autofocus&&requestAnimationFrame(()=>{this.manageAutoFocus()})}manageAutoFocus(t){(null!=t?t:this).focus()}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}blur(){var t;null===(t=this.button)||void 0===t||t.blur()}handleKeyDown(t){if(this.disabled)return;const{code:e}=t;(0,a.o)(e)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleClick(t){var e;this.disabled||(null===(e=this.clickFunction)||void 0===e||e.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})))}static get styles(){return[s.A,h.A,o.A]}get buttonClassMap(){return{"md-button--circle":this.circle,"md-button--rounded":this.rounded,"md-button--none":this.hasRemoveStyle,"md-button--outline":this.outline,active:this.active&&!this.disabled,disabled:this.disabled&&!this.active,isActive:this.isActive,[`md-button--${this.size}`]:!this.hasRemoveStyle,[`md-button--${this.color}`]:!this.hasRemoveStyle&&!!this.color,[`md-activity__${this.activityType}`]:!!this.activityType,"md-activity":!!this.activityType,"md-button--icon":this.iconActive,"md-button--onlyicon":this.hasIcon&&!this.slottedText,"md-button--placeholder-text":!0===this.isPlaceholderText}}get slottedText(){var t;return null===(t=this.querySelector("[slot=text]"))||void 0===t?void 0:t.textContent}get hasIcon(){return null!==this.querySelector("[slot=icon]")||this.loading}childrenTemplate(){return n.html`
        <span part="button-children" class="md-button__children">
          ${this.iconTemplate()} ${this.textTemplate()}
          <slot></slot>
        </span>
        <slot name="notification"></slot>
      `}get computedAriaExpand(){return"true"===this.ariaExpanded?"true":"false"===this.ariaExpanded?"false":void 0}buttonTemplate(t){return"button"===t?n.html`
          <button
            part="button"
            id=${this.id}
            class="md-button ${(0,l.classMap)(this.buttonClassMap)}"
            @click=${t=>this.handleClick(t)}
            @keydown=${t=>this.handleKeyDown(t)}
            tabindex=${(0,p.ifDefined)(this.tabIndex||void 0)}
            aria-label=${(0,p.ifDefined)(this.ariaLabel||void 0)}
            aria-labelledby=${(0,p.ifDefined)(this.ariaLabelledBy||void 0)}
            aria-live=${(0,p.ifDefined)(this.ariaLive||void 0)}
            aria-expanded=${(0,p.ifDefined)(this.computedAriaExpand)}
            aria-haspopup=${(0,p.ifDefined)("false"===this.ariaHaspopup?void 0:this.ariaHaspopup)}
            aria-pressed=${(0,p.ifDefined)(this.ariaPressed||void 0)}
            aria-disabled=${(0,p.ifDefined)(this.disabled||this.loading||void 0)}
            aria-describedby=${(0,p.ifDefined)(this.ariaDescribedBy||void 0)}
            type=${this.type}
            role=${(0,p.ifDefined)("button"===this.role?void 0:this.role)}
          >
            ${this.childrenTemplate()}
          </button>
        `:"input"===t?n.html`
          <input
            part="button"
            id=${this.id}
            class="md-button ${(0,l.classMap)(this.buttonClassMap)}"
            @click=${t=>this.handleClick(t)}
            @keydown=${t=>this.handleKeyDown(t)}
            role=${this.role}
            tabindex=${(0,p.ifDefined)(this.tabIndex||void 0)}
            aria-pressed=${"true"===this.ariaPressed}
            aria-label=${(0,p.ifDefined)(this.ariaLabel||void 0)}
            aria-labelledby=${(0,p.ifDefined)(this.ariaLabelledBy||void 0)}
            aria-live=${(0,p.ifDefined)(this.ariaLive||void 0)}
            type=${this.type}
            alt=${this.label}
            value=${this.value}
            aria-disabled=${(0,p.ifDefined)(this.disabled||this.loading||void 0)}
          />
        `:"a"===t?n.html`
          <a
            part="button"
            id=${this.id}
            class="md-button ${(0,l.classMap)(this.buttonClassMap)}"
            @click=${t=>this.handleClick(t)}
            @keydown=${t=>this.handleKeyDown(t)}
            role=${this.role}
            tabindex=${(0,p.ifDefined)(this.tabIndex||void 0)}
            aria-pressed=${"true"===this.ariaPressed?"true":"false"}
            aria-label=${(0,p.ifDefined)(this.ariaLabel||void 0)}
            aria-labelledby=${(0,p.ifDefined)(this.ariaLabelledBy||void 0)}
            aria-live=${(0,p.ifDefined)(this.ariaLive||void 0)}
            aria-disabled=${(0,p.ifDefined)(this.disabled||this.loading||void 0)}
            href=${this.href}
          >
            ${this.childrenTemplate()}
          </a>
        `:n.nothing}get buttonContainerClassMap(){return{"md-button__container":this.containerLarge,"md-button__container--small":!this.containerLarge}}render(){return n.html`
        ${this.getStyles()}
        ${this.label?n.html`
              <div part="button-container" class=${(0,l.classMap)(this.buttonContainerClassMap)}>
                ${this.buttonTemplate(this.tag)}
                <div part="button-label" class="md-button__label">${this.label}</div>
              </div>
            `:n.html` ${this.buttonTemplate(this.tag)} `}
      `}};c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"active",null),c([(0,d.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),c([(0,d.property)({type:String})],e.prototype,"ariaLabel",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaLabelledBy",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaLive",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaExpanded",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaHaspopup",void 0),c([(0,d.property)({type:String})],e.prototype,"ariaPressed",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"circle",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"rounded",void 0),c([(0,d.property)({type:String})],e.prototype,"color",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"containerLarge",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,d.property)({type:String})],e.prototype,"href",void 0),c([(0,d.property)({type:String})],e.prototype,"id",void 0),c([(0,d.property)({type:String})],e.prototype,"value",void 0),c([(0,d.property)({type:String})],e.prototype,"keyboardKey",void 0),c([(0,d.property)({type:String})],e.prototype,"label",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"loading",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"outline",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"hasRemoveStyle",void 0),c([(0,d.property)({type:String})],e.prototype,"size",void 0),c([(0,d.property)({type:String})],e.prototype,"tag",void 0),c([(0,d.property)({type:String})],e.prototype,"type",void 0),c([(0,d.property)({type:String})],e.prototype,"role",void 0),c([(0,d.property)({type:String})],e.prototype,"variant",void 0),c([(0,d.property)({type:String})],e.prototype,"width",void 0),c([(0,d.property)({type:String})],e.prototype,"maxWidth",void 0),c([(0,d.property)({type:String})],e.prototype,"activityType",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"iconActive",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"isActive",void 0),c([(0,d.property)({type:String,attribute:"aria-describedby"})],e.prototype,"ariaDescribedBy",void 0),c([(0,d.property)({attribute:!1})],e.prototype,"clickFunction",void 0),c([(0,d.property)({type:Boolean,attribute:"is-placeholder-text"})],e.prototype,"isPlaceholderText",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),c([(0,d.query)(".md-button")],e.prototype,"button",void 0),e=c([(0,r.w)("md-button")],e),t.ELEMENT=e}(x||(x={}))},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=r},318(t){t.exports=o}},n={};function d(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return s[t](i,i.exports,d),i.exports}d.m=s,a=[],d.O=(t,e,i,o)=>{if(!e){var r=1/0;for(p=0;p<a.length;p++){for(var[e,i,o]=a[p],s=!0,n=0;n<e.length;n++)(!1&o||r>=o)&&Object.keys(d.O).every(t=>d.O[t](e[n]))?e.splice(n--,1):(s=!1,o<r&&(r=o));if(s){a.splice(p--,1);var l=i();void 0!==l&&(t=l)}}return t}o=o||0;for(var p=a.length;p>0&&a[p-1][2]>o;p--)a[p]=a[p-1];a[p]=[e,i,o]},d.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return d.d(e,{a:e}),e},d.d=(t,e)=>{for(var i in e)d.o(e,i)&&!d.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},d.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),d.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={5156:0,5983:0};d.O.j=e=>0===t[e];var e=(e,i)=>{var o,r,[a,s,n]=i,l=0;if(a.some(e=>0!==t[e])){for(o in s)d.o(s,o)&&(d.m[o]=s[o]);if(n)var p=n(d)}for(e&&e(i);l<a.length;l++)r=a[l],d.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return d.O(p)},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 l=d.O(void 0,[9609,4084,3305,4739,7154,9773,519],()=>d(5983));return d.O(l)})());