text: var AuthorOptionElement=function(){"use strict";window.hasOwnProperty("AuthorBaseElement")||(console.error('[ERROR] <author-option> Required dependency "AuthorBaseElement" not found.'),console.info("AuthorBaseElement is available at https://github.com/author-elements/base"));class e extends(AuthorBaseElement(HTMLElement)){constructor(){super('<template><style>@charset "UTF-8"; :host{contain:content;display:flex;flex-direction:column;max-width:100%}:host *,:host :after,:host :before{box-sizing:border-box}:host([hidden]){display:none!important}author-option{contain:content;display:flex;flex-direction:column;max-width:100%}author-option *,author-option :after,author-option :before{box-sizing:border-box}author-option[hidden]{display:none!important}</style><slot name="afterbegin"></slot><slot name="beforeoption"></slot><slot></slot><slot name="afteroption"></slot><slot name="beforeend"></slot></template>'),this.UTIL.defineAttributes({disabled:!1,hidden:!1,hover:!1,id:"",label:"",selected:!1,value:""}),this.UTIL.defineProperties({defaultSelected:!1,form:{readonly:!0,private:!0},index:{readonly:!0,get:()=>this.parentNode.options.findIndex(e=>e.displayElement===this)}}),this.UTIL.definePrivateMethods({mouseButtonIsDown:e=>{return(void 0!==e.buttons?e.buttons:e.nativeEvent.which)>=1},mousemoveHandler:e=>this.emit("option.hovered",this.index),mouseoutHandler:e=>this.hover=!1,mouseoverHandler:e=>{let t=this.PRIVATE.mouseButtonIsDown(e);this.parentNode.multiple&&t?this.PRIVATE.select(!0,e.metaKey,e.ctrlKey,t):this.hover=!0},parentStateChangeHandler:e=>{let{name:t,value:o}=e.detail;switch(t){case"multiple":return this.PRIVATE.setMode(o?"select-multiple":"select-one")}},setMode:e=>{switch(e){case"select-multiple":return this.off("mouseup",this.PRIVATE.selectionHandler),this.on("mousedown",this.PRIVATE.selectionHandler);case"select-one":return this.on("mouseup",this.PRIVATE.selectionHandler),this.off("mousedown",this.PRIVATE.selectionHandler)}},select:(e=!1,t=!1,o=!1,s=!1)=>{let{index:n}=this;this.emit("option.selected",{index:n,shiftKey:e,metaKey:t,ctrlKey:o,mousedown:s},this.parentNode)},selectionHandler:e=>{let{shiftKey:t,metaKey:o,ctrlKey:s}=e;this.PRIVATE.select(t,o,s)}}),this.UTIL.registerListeners(this,{connected:()=>{this.parentNode.on("state.change",this.PRIVATE.parentStateChangeHandler),this.parentNode.multiple&&this.PRIVATE.setMode("select-multiple")},disconnected:()=>{this.off("mousedown",this.PRIVATE.selectionHandler),this.parentNode.off("state.change",this.PRIVATE.parentStateChangeHandler)},mouseover:this.PRIVATE.mouseoverHandler,mousemove:this.PRIVATE.mousemoveHandler,mouseout:this.PRIVATE.mouseoutHandler,mouseup:this.PRIVATE.selectionHandler})}static get observedAttributes(){return["disabled","hidden","hover","label","selected","value"]}get text(){return this.innerHTML}set text(e){this.innerHTML=e}remove(){this.parentNode.options.splice(this.index,1),super.remove()}}return customElements.define("author-option",e),e}();
  //# sourceMappingURL=author-option.min.js.map
  