var e,t,i={8381(e,t,i){i.d(t,{S:()=>s}),i(1821);var s,o=i(2900),r=i(7704),a=i(9609),c=i(4084),n=i(2927),h=i(8899),d=i(4973),l=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};!function(e){let t=class extends((0,r.yC)(n.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!==o.Uz.Space&&t!==o.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?n.html`<md-icon name="${e}" iconSet="momentumDesign" size="16"></md-icon>`:n.nothing}checkboxBoxTemplate(){return n.html` <div part="checkbox-box" class="checkbox-box">${this.checkboxIconTemplate()}</div> `}render(){return n.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>
      `}};l([(0,h.property)({type:Boolean,reflect:!0})],t.prototype,"autofocus",void 0),l([(0,h.property)({type:Boolean,reflect:!0})],t.prototype,"checked",null),l([(0,h.property)({type:Boolean,reflect:!0})],t.prototype,"indeterminate",null),l([(0,h.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),l([(0,h.property)({type:String})],t.prototype,"label",void 0),l([(0,h.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),l([(0,h.query)(".checkbox-input")],t.prototype,"input",void 0),t=l([(0,a.w)("md-checkbox")],t),e.ELEMENT=t}(s||(s={}))}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,o),r.exports}o.m=i,e=[],o.O=(t,i,s,r)=>{if(!i){var a=1/0;for(d=0;d<e.length;d++){for(var[i,s,r]=e[d],c=!0,n=0;n<i.length;n++)(!1&r||a>=r)&&Object.keys(o.O).every(e=>o.O[e](i[n]))?i.splice(n--,1):(c=!1,r<a&&(a=r));if(c){e.splice(d--,1);var h=s();void 0!==h&&(t=h)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[i,s,r]},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{o as __webpack_require__};t={7455:0},o.C=e=>{var i,s,{__webpack_esm_ids__:r,__webpack_esm_modules__:a,__webpack_esm_runtime__:c}=e,n=0;for(i in a)o.o(a,i)&&(o.m[i]=a[i]);for(c&&c(o);n<r.length;n++)s=r[n],o.o(t,s)&&t[s]&&t[s][0](),t[r[n]]=0;o.O()},o.O.j=e=>0===t[e];import*as r from"../9609.js";o.C(r);import*as a from"../4084.js";o.C(a);import*as c from"../4955.js";o.C(c);import*as n from"../3517.js";o.C(n);import*as h from"../1156.js";o.C(h);import*as d from"../3305.js";o.C(d);import*as l from"../4739.js";o.C(l);import*as p from"../7154.js";o.C(p);import*as m from"../9773.js";o.C(m);import*as b from"../5983.js";o.C(b);import*as u from"../7755.js";o.C(u);import*as k from"../1821.js";o.C(k);import*as f from"../2364.js";o.C(f);import*as C from"../4980.js";o.C(C);import*as x from"../5308.js";o.C(x);import*as v from"../9938.js";o.C(v);import*as y from"../9500.js";o.C(y);import*as j from"../4781.js";o.C(j);import*as _ from"../5201.js";o.C(_);import*as g from"../5584.js";o.C(g);import*as w from"../8227.js";o.C(w);import*as O from"../2900.js";o.C(O);import*as E from"../7704.js";o.C(E);import*as A from"../1280.js";o.C(A);import*as U from"../4973.js";o.C(U);var $=o.O(void 0,[9609,4084,4955,3517,1156,3305,4739,7154,9773,5983,7755,1821,2364,4980,5308,9938,9500,4781,5201,5584,8227,2900,7704,1280,4973],()=>o(8381));const I=($=o.O($)).S;export{I as Checkbox};