!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));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","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,r,o,n,c)=>(()=>{"use strict";var a,l={8381(e,t,i){i.r(t),i.d(t,{Checkbox:()=>s}),i(1821);var s,r=i(2900),o=i(7704),n=i(9609),c=i(4084),a=i(7161),l=i(429),d=i(4973),h=function(e,t,i,s){var r,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 c=e.length-1;c>=0;c--)(r=e[c])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends((0,o.yC)(a.LitElement)){constructor(){super(...arguments),this.autofocus=!1,this._checked=!1,this._indeterminate=!1,this._disabled=!1,this.label="",this.tabIndex=0}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this.requestUpdate("checked",t)}get indeterminate(){return this._indeterminate}set indeterminate(e){const t=this._indeterminate;this._indeterminate=e,this.requestUpdate("indeterminate",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}static get styles(){return[c.A,d.A]}toggleCheckbox(){this.checked=!this.checked}isCheckboxActive(){return this.disabled||this.indeterminate}handleClick(e){this.isCheckboxActive()?e.stopPropagation():(this.toggleCheckbox(),this.handleChange(e))}handleKeyDown(e){const{code:t}=e;t!==r.Uz.Space&&t!==r.Uz.Enter||(e.preventDefault(),this.isCheckboxActive()?e.stopPropagation():(this.toggleCheckbox(),this.handleChange(e)))}handleChange(e){this.dispatchEvent(new CustomEvent("checkbox-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,checked:this.checked}}))}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","checkbox"),this.label&&this.setAttribute("aria-label",this.label)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}willUpdate(e){var t;null===(t=super.willUpdate)||void 0===t||t.call(this,e),e.has("indeterminate")&&this.indeterminate&&(this.checked=!1),(e.has("checked")||e.has("indeterminate"))&&(this.indeterminate?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",`${this.checked}`)),e.has("disabled")&&this.setAttribute("aria-disabled",`${this.disabled}`)}updated(e){super.updated(e),e.has("indeterminate")&&(this.input.indeterminate=this.indeterminate)}get checkboxIconName(){return this.checked?"check-bold":this.indeterminate?"minus-bold":null}checkboxIconTemplate(){const e=this.checkboxIconName;return e?a.html`<md-icon name="${e}" iconSet="momentumDesign" size="16"></md-icon>`:a.nothing}checkboxBoxTemplate(){return a.html` <div part="checkbox-box" class="checkbox-box">${this.checkboxIconTemplate()}</div> `}render(){return a.html`
        <input
          class="checkbox-input"
          type="checkbox"
          part="checkbox-input"
          ?checked=${this.checked}
          ?disabled=${this.disabled}
          ?autofocus=${this.autofocus}
          aria-hidden="true"
        />
        <label part="checkbox-label" class="checkbox-label">
          ${this.checkboxBoxTemplate()}
          <slot></slot>
        </label>
      `}};h([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"autofocus",void 0),h([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"checked",null),h([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"indeterminate",null),h([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),h([(0,l.property)({type:String})],t.prototype,"label",void 0),h([(0,l.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),h([(0,l.query)(".checkbox-input")],t.prototype,"input",void 0),t=h([(0,n.w)("md-checkbox")],t),e.ELEMENT=t}(s||(s={}))},2022(e){e.exports=o},554(e){e.exports=n},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=r},318(e){e.exports=s},5314(e){e.exports=c}},d={};function h(e){var t=d[e];if(void 0!==t)return t.exports;var i=d[e]={exports:{}};return l[e](i,i.exports,h),i.exports}h.m=l,a=[],h.O=(e,t,i,s)=>{if(!t){var r=1/0;for(l=0;l<a.length;l++){for(var[t,i,s]=a[l],o=!0,n=0;n<t.length;n++)(!1&s||r>=s)&&Object.keys(h.O).every(e=>h.O[e](t[n]))?t.splice(n--,1):(o=!1,s<r&&(r=s));if(o){a.splice(l--,1);var c=i();void 0!==c&&(e=c)}}return e}s=s||0;for(var l=a.length;l>0&&a[l-1][2]>s;l--)a[l]=a[l-1];a[l]=[t,i,s]},h.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return h.d(t,{a:t}),t},h.d=(e,t)=>{for(var i in t)h.o(t,i)&&!h.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),h.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={7455:0};h.O.j=t=>0===e[t];var t=(t,i)=>{var s,r,[o,n,c]=i,a=0;if(o.some(t=>0!==e[t])){for(s in n)h.o(n,s)&&(h.m[s]=n[s]);if(c)var l=c(h)}for(t&&t(i);a<o.length;a++)r=o[a],h.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return h.O(l)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=h.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2900,7704,4973],()=>h(8381));return h.O(u)})());