/*! For license information please see virtual-select.js.LICENSE.txt */
(()=>{var e={4078:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var i=o(8081),n=o.n(i),s=o(3645),r=o.n(s)()(n());r.push([e.id,"/*!\n * Tooltip v1.0.16\n * https://sa-si-dev.github.io/tooltip\n * Licensed under MIT (https://github.com/sa-si-dev/tooltip/blob/master/LICENSE)\n */\n.tooltip-comp{font-family:sans-serif;font-size:14px;line-height:20px;color:#fff;background-color:#212121;position:absolute;top:0;left:0;max-width:300px;padding:5px 10px;opacity:0;pointer-events:none;word-break:break-word;text-align:left;border-radius:2px}.tooltip-comp-arrow{position:absolute;z-index:1;width:16px;height:16px;overflow:hidden}.tooltip-comp-arrow::before{content:'';position:absolute;top:8px;left:8px;width:16px;height:16px;background-color:#212121;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.tooltip-comp-content{position:relative;z-index:2}.tooltip-comp.hide-arrow-icon .tooltip-comp-arrow{display:none}.tooltip-comp.position-bottom .tooltip-comp-arrow{margin-left:-8px;left:0;top:-15px}.tooltip-comp.position-top .tooltip-comp-arrow{margin-left:-8px;left:0;bottom:-15px}.tooltip-comp.position-right .tooltip-comp-arrow{margin-top:-8px;top:0;left:-15px}.tooltip-comp.position-left .tooltip-comp-arrow{margin-top:-8px;top:0;right:-15px}\n\n",""]);const a=r},716:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var i=o(8081),n=o.n(i),s=o(3645),r=o.n(s)()(n());r.push([e.id,'/*!\n * Virtual Select v1.0.45\n * https://sa-si-dev.github.io/virtual-select\n * Licensed under MIT (https://github.com/sa-si-dev/virtual-select/blob/master/LICENSE)\n */\n@keyframes vscomp-animation-spin{to{transform:rotateZ(360deg)}}.vscomp-popup-active{overflow:hidden !important}.vscomp-ele{display:inline-block;max-width:250px;width:100%}.vscomp-wrapper{color:#333;display:inline-flex;flex-wrap:wrap;font-family:sans-serif;font-size:14px;position:relative;text-align:left;width:100%}.vscomp-wrapper *,.vscomp-wrapper *::before,.vscomp-wrapper *::after{box-sizing:border-box}.vscomp-wrapper:focus{outline:none}.vscomp-dropbox-wrapper{left:0;position:absolute;top:0}.vscomp-toggle-button{align-items:center;background-color:#fff;border:1px solid #ddd;cursor:pointer;display:flex;padding:7px 30px 7px 10px;position:relative;width:100%}.vscomp-value{height:20px;line-height:20px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vscomp-arrow{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;width:30px}.vscomp-arrow::after{transform:rotate(45deg);border:1px solid rgba(0,0,0,0);border-bottom-color:#111;border-right-color:#111;content:"";height:8px;margin-top:-6px;width:8px}.vscomp-clear-icon{height:12px;position:relative;width:12px}.vscomp-clear-icon::before,.vscomp-clear-icon::after{background-color:#999;content:"";height:12px;left:5px;position:absolute;top:0;width:2px}.vscomp-clear-icon::before{transform:rotate(45deg)}.vscomp-clear-icon::after{transform:rotate(-45deg)}.vscomp-clear-icon:hover::before,.vscomp-clear-icon:hover::after{background:#333}.vscomp-clear-button{align-items:center;border-radius:50%;display:none;height:24px;justify-content:center;margin-top:-12px;position:absolute;right:30px;top:50%;width:24px}.vscomp-clear-button:hover{background:#ccc}.vscomp-clear-button:hover .vscomp-clear-icon::before,.vscomp-clear-button:hover .vscomp-clear-icon::after{background-color:#333}.vscomp-dropbox-close-button{align-items:center;background-color:#fff;border-radius:50%;bottom:-48px;cursor:pointer;display:none;height:40px;justify-content:center;left:50%;margin-left:-20px;position:absolute;width:40px}.vscomp-value-tag.more-value-count{white-space:nowrap}.vscomp-dropbox-container{width:100%;z-index:2}.vscomp-dropbox{background-color:#fff;width:100%}.vscomp-options-container{max-height:210px;overflow:auto;position:relative}.vscomp-options-bottom-freezer{bottom:0;height:2px;left:0;position:absolute;right:0}.vscomp-option{align-items:center;cursor:pointer;display:flex;flex-wrap:wrap;height:40px;padding:0 15px;position:relative}.vscomp-option.selected{background-color:#eee}.vscomp-option.focused{background-color:#ccc}.vscomp-option.disabled{cursor:default;opacity:.5}.vscomp-option.group-title .vscomp-option-text{cursor:default;opacity:.6}.vscomp-option.group-title.selected{background-color:rgba(0,0,0,0)}.vscomp-option.group-option{padding-left:30px}.vscomp-new-option-icon{height:30px;position:absolute;right:0;top:0;width:30px}.vscomp-new-option-icon::before{border:15px solid #512da8;border-bottom-color:rgba(0,0,0,0);border-left-color:rgba(0,0,0,0);content:"";position:absolute;right:0;top:0}.vscomp-new-option-icon::after{align-items:center;color:#fff;content:"+";display:flex;font-size:18px;height:15px;justify-content:center;position:absolute;right:1px;top:0;width:15px}.vscomp-option-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.vscomp-option-description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#666;font-size:13px;line-height:15px;width:100%}.vscomp-search-container{align-items:center;border-bottom:1px solid #ddd;display:flex;height:40px;padding:0 5px 0 15px;position:relative}.vscomp-search-label,.vscomp-live-region,.vscomp-dropbox-container-top,.vscomp-dropbox-container-bottom{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.vscomp-search-input{background-color:rgba(0,0,0,0);border:0;color:inherit;font-size:15px;height:38px;padding:10px 0;width:calc(100% - 30px)}.vscomp-search-input:focus{outline:none}.vscomp-search-clear{align-items:center;color:#999;cursor:pointer;display:flex;font-size:25px;height:30px;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;visibility:hidden;width:30px}.vscomp-search-clear:hover{color:inherit}.vscomp-no-options,.vscomp-no-search-results{align-items:center;display:none;justify-content:center;padding:20px 10px}.vscomp-options-loader{display:none;padding:20px 0;text-align:center}.vscomp-options-loader::before{animation:vscomp-animation-spin .8s infinite linear;background-color:#fff;border-radius:50%;box-shadow:-4px -5px 3px -3px rgba(0,0,0,.3);content:"";display:inline-block;height:40px;opacity:.7;width:40px}.vscomp-ele[disabled]{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vscomp-ele[disabled] .vscomp-wrapper{opacity:.7;pointer-events:none}.vscomp-wrapper .checkbox-icon{display:inline-flex;height:15px;margin-right:10px;position:relative;width:15px}.vscomp-wrapper .checkbox-icon::after{transition-duration:.2s;border:2px solid #888;content:"";display:inline-block;height:100%;width:100%}.vscomp-wrapper .checkbox-icon.checked::after{transform:rotate(45deg) translate(1px, -4px);border-color:#512da8;border-left-color:rgba(0,0,0,0);border-top-color:rgba(0,0,0,0);width:50%}.vscomp-wrapper.show-as-popup .vscomp-dropbox-container{align-items:center;background-color:rgba(0,0,0,.5);display:flex;height:100vh;justify-content:center;left:0;opacity:1;overflow:auto;padding:0 10px;position:fixed;top:0;width:100vw}.vscomp-wrapper.show-as-popup .vscomp-dropbox{margin-top:-24px;max-height:calc(80% - 48px);max-width:500px;position:relative;width:80%}.vscomp-wrapper.show-as-popup .vscomp-dropbox-close-button{display:flex}.vscomp-wrapper.popup-position-left .vscomp-dropbox-container{justify-content:flex-start}.vscomp-wrapper.popup-position-right .vscomp-dropbox-container{justify-content:flex-end}.vscomp-wrapper.has-select-all .vscomp-toggle-all-button{align-items:center;cursor:pointer;display:flex}.vscomp-wrapper.has-select-all .vscomp-search-input,.vscomp-wrapper.has-select-all .vscomp-toggle-all-label{width:calc(100% - 55px)}.vscomp-wrapper.has-select-all .vscomp-toggle-all-label{display:none}.vscomp-wrapper:not(.has-search-input) .vscomp-toggle-all-button{width:100%}.vscomp-wrapper:not(.has-search-input) .vscomp-toggle-all-label{display:inline-block}.vscomp-wrapper.multiple .vscomp-option .vscomp-option-text{width:calc(100% - 25px)}.vscomp-wrapper.multiple .vscomp-option .vscomp-option-description{padding-left:25px}.vscomp-wrapper.multiple .vscomp-option.selected .checkbox-icon::after{transform:rotate(45deg) translate(1px, -4px);border-color:#512da8;border-left-color:rgba(0,0,0,0);border-top-color:rgba(0,0,0,0);width:50%}.vscomp-wrapper.focused .vscomp-toggle-button,.vscomp-wrapper:focus .vscomp-toggle-button{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.vscomp-wrapper.closed .vscomp-dropbox-container,.vscomp-wrapper.closed.vscomp-dropbox-wrapper{display:none}.vscomp-wrapper:not(.has-value) .vscomp-value{opacity:.5}.vscomp-wrapper.has-clear-button.has-value .vscomp-clear-button{display:flex}.vscomp-wrapper.has-clear-button .vscomp-toggle-button{padding-right:54px}.vscomp-wrapper.has-no-options .vscomp-options-container,.vscomp-wrapper.has-no-search-results .vscomp-options-container{display:none}.vscomp-wrapper.has-no-options .vscomp-no-options{display:flex}.vscomp-wrapper.has-no-search-results .vscomp-no-search-results{display:flex}.vscomp-wrapper.has-search-value .vscomp-search-clear{visibility:visible}.vscomp-wrapper.has-no-options .vscomp-toggle-all-button{opacity:.5;pointer-events:none}.vscomp-wrapper.keep-always-open .vscomp-toggle-button{padding-right:24px}.vscomp-wrapper.keep-always-open .vscomp-clear-button{right:5px}.vscomp-wrapper.keep-always-open .vscomp-arrow{display:none}.vscomp-wrapper.keep-always-open .vscomp-dropbox-container{position:relative;z-index:1}.vscomp-wrapper.keep-always-open .vscomp-dropbox{transition-duration:0s;border:1px solid #ddd;box-shadow:none}.vscomp-wrapper.keep-always-open.focused,.vscomp-wrapper.keep-always-open:focus,.vscomp-wrapper.keep-always-open:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.vscomp-wrapper.server-searching .vscomp-options-list{display:none}.vscomp-wrapper.server-searching .vscomp-options-loader{display:block}.vscomp-wrapper.has-error .vscomp-toggle-button{border-color:#b00020}.vscomp-wrapper.show-value-as-tags .vscomp-toggle-button{padding:4px 22px 0 10px}.vscomp-wrapper.show-value-as-tags .vscomp-value{display:flex;flex-wrap:wrap;height:auto;min-height:28px;overflow:auto;text-overflow:unset;white-space:normal}.vscomp-wrapper.show-value-as-tags .vscomp-value-tag{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;align-items:center;border:1px solid #ddd;border-radius:20px;display:inline-flex;font-size:12px;line-height:16px;margin:0 4px 4px 0;max-width:100%;padding:2px 3px 2px 8px}.vscomp-wrapper.show-value-as-tags .vscomp-value-tag.more-value-count{padding-right:8px}.vscomp-wrapper.show-value-as-tags .vscomp-value-tag-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 20px)}.vscomp-wrapper.show-value-as-tags .vscomp-value-tag-clear-button{align-items:center;display:flex;height:20px;justify-content:center;width:20px}.vscomp-wrapper.show-value-as-tags .vscomp-value-tag-clear-button .vscomp-clear-icon{transform:scale(0.8)}.vscomp-wrapper.show-value-as-tags .vscomp-arrow{height:34px}.vscomp-wrapper.show-value-as-tags .vscomp-clear-button{margin-top:0;top:5px}.vscomp-wrapper.show-value-as-tags.has-value .vscomp-arrow{display:none}.vscomp-wrapper.show-value-as-tags.has-value .vscomp-clear-button{right:2px}.vscomp-wrapper.show-value-as-tags:not(.has-value) .vscomp-toggle-button{padding-bottom:2px}.vscomp-wrapper.show-value-as-tags:not(.has-value) .vscomp-value{align-items:center;padding-bottom:3px}.vscomp-wrapper.text-direction-rtl{direction:rtl}.vscomp-wrapper.text-direction-rtl .vscomp-toggle-button{padding:7px 10px 7px 30px}.vscomp-wrapper.text-direction-rtl .vscomp-arrow{left:0;right:auto}.vscomp-wrapper.text-direction-rtl .vscomp-clear-button{left:30px;right:auto !important}.vscomp-wrapper.text-direction-rtl .checkbox-icon{margin-left:10px;margin-right:0}.vscomp-wrapper.text-direction-rtl .checkbox-icon.checked::after{transform:rotate(45deg) translate(-4px, 1px)}.vscomp-wrapper.text-direction-rtl .vscomp-search-container{padding:0 15px 0 5px}.vscomp-wrapper.text-direction-rtl .vscomp-toggle-all-label{text-align:right}.vscomp-wrapper.text-direction-rtl .vscomp-option{text-align:right}.vscomp-wrapper.text-direction-rtl .vscomp-option.group-option{padding-right:30px}.vscomp-wrapper.text-direction-rtl .vscomp-new-option-icon{left:0;right:auto}.vscomp-wrapper.text-direction-rtl .vscomp-new-option-icon::before{border-left-color:#512da8;border-right-color:rgba(0,0,0,0)}.vscomp-wrapper.text-direction-rtl .vscomp-new-option-icon::after{left:1px;right:auto}.vscomp-wrapper.text-direction-rtl.multiple .vscomp-option.selected .checkbox-icon::after{transform:rotate(45deg) translate(-4px, 1px)}.vscomp-wrapper.text-direction-rtl.has-clear-button .vscomp-toggle-button{padding-left:54px}.vscomp-wrapper.text-direction-rtl.keep-always-open .vscomp-toggle-button{padding-left:24px}.vscomp-wrapper.text-direction-rtl.keep-always-open .vscomp-clear-button{left:5px}.vscomp-wrapper.text-direction-rtl.show-value-as-tags .vscomp-toggle-button{padding:4px 10px 0 22px}.vscomp-wrapper.text-direction-rtl.show-value-as-tags .vscomp-value-tag{margin:0 0 4px 4px;padding:2px 8px 2px 3px}.vscomp-wrapper.text-direction-rtl.show-value-as-tags .vscomp-value-tag.more-value-count{padding-left:8px}.vscomp-wrapper.text-direction-rtl.show-value-as-tags.has-value .vscomp-clear-button{left:2px}\n/*!\n * Popover v1.0.13\n * https://sa-si-dev.github.io/popover\n * Licensed under MIT (https://github.com/sa-si-dev/popover/blob/master/LICENSE)\n */\n.pop-comp-wrapper{display:none;position:absolute;top:0;left:0;opacity:0;color:#000;background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);text-align:left;flex-wrap:wrap;z-index:1}.pop-comp-arrow{position:absolute;z-index:1;width:16px;height:16px;overflow:hidden;pointer-events:none}.pop-comp-arrow::before{content:"";position:absolute;top:8px;left:8px;width:16px;height:16px;background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.pop-comp-content{position:relative;z-index:2}.pop-comp-wrapper.position-bottom>.pop-comp-arrow{margin-left:-8px;left:0;top:-15px}.pop-comp-wrapper.position-bottom>.pop-comp-arrow::before{box-shadow:0px 0px 2px 0 rgba(0,0,0,.14)}.pop-comp-wrapper.position-top>.pop-comp-arrow{margin-left:-8px;left:0;bottom:-15px}.pop-comp-wrapper.position-right>.pop-comp-arrow{margin-top:-8px;top:0;left:-15px}.pop-comp-wrapper.position-left>.pop-comp-arrow{margin-top:-8px;top:0;right:-15px}.pop-comp-disable-events{pointer-events:none}\n',""]);const a=r},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",i=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),i&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),i&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,i,n,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(r[l]=!0)}for(var p=0;p<e.length;p++){var c=[].concat(e[p]);i&&r[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},3379:e=>{"use strict";var t=[];function o(e){for(var o=-1,i=0;i<t.length;i++)if(t[i].identifier===e){o=i;break}return o}function i(e,i){for(var s={},r=[],a=0;a<e.length;a++){var l=e[a],p=i.base?l[0]+i.base:l[0],c=s[p]||0,u="".concat(p," ").concat(c);s[p]=c+1;var h=o(u),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(d);else{var v=n(d,i);i.byIndex=a,t.splice(a,0,{identifier:u,updater:v,references:1})}r.push(u)}return r}function n(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,n){var s=i(e=e||[],n=n||{});return function(e){e=e||[];for(var r=0;r<s.length;r++){var a=o(s[r]);t[a].references--}for(var l=i(e,n),p=0;p<s.length;p++){var c=o(s[p]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}s=l}}},569:e=>{"use strict";var t={};e.exports=function(e,o){var i=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(o)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,o)=>{"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var i="";o.supports&&(i+="@supports (".concat(o.supports,") {")),o.media&&(i+="@media ".concat(o.media," {"));var n=void 0!==o.layer;n&&(i+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),i+=o.css,n&&(i+="}"),o.media&&(i+="}"),o.supports&&(i+="}");var s=o.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9805:()=>{!function(){"use strict";function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=e[o];return i}var o=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o;return(o=[{key:"addClass",value:function(o,i){o&&(i=i.split(" "),t.getElements(o).forEach((function(t){var o;(o=t.classList).add.apply(o,e(i))})))}},{key:"removeClass",value:function(o,i){o&&(i=i.split(" "),t.getElements(o).forEach((function(t){var o;(o=t.classList).remove.apply(o,e(i))})))}},{key:"getElements",value:function(e){if(e)return void 0===e.forEach&&(e=[e]),e}},{key:"getMoreVisibleSides",value:function(e){if(!e)return{};var t=e.getBoundingClientRect(),o=window.innerWidth,i=window.innerHeight,n=t.left,s=t.top;return{horizontal:n>o-n-t.width?"left":"right",vertical:s>i-s-t.height?"top":"bottom"}}},{key:"getAbsoluteCoords",value:function(e){if(e){var t=e.getBoundingClientRect(),o=window.pageXOffset,i=window.pageYOffset;return{width:t.width,height:t.height,top:t.top+i,right:t.right+o,bottom:t.bottom+i,left:t.left+o}}}},{key:"getCoords",value:function(e){return e?e.getBoundingClientRect():{}}},{key:"getData",value:function(e,t,o){if(e){var i=e?e.dataset[t]:"";return"number"===o?i=parseFloat(i)||0:"true"===i?i=!0:"false"===i&&(i=!1),i}}},{key:"setData",value:function(e,t,o){e&&(e.dataset[t]=o)}},{key:"setStyle",value:function(e,t,o){e&&(e.style[t]=o)}},{key:"show",value:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";t.setStyle(e,"display",o)}},{key:"hide",value:function(e){t.setStyle(e,"display","none")}},{key:"getHideableParent",value:function(e){for(var t,o=e.parentElement;o;){var i=getComputedStyle(o).overflow;if(-1!==i.indexOf("scroll")||-1!==i.indexOf("auto")){t=o;break}o=o.parentElement}return t}}])&&function(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(t,o),t}(),i=["top","bottom","left","right"].map((function(e){return"position-".concat(e)})),n={top:"rotate(180deg)",left:"rotate(90deg)",right:"rotate(-90deg)"},s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this.setProps(t),this.init()}catch(e){console.warn("Couldn't initiate popper"),console.error(e)}}var t;return(t=[{key:"init",value:function(){var e=this.$popperEle;e&&this.$triggerEle&&(o.setStyle(e,"zIndex",this.zIndex),this.setPosition())}},{key:"setProps",value:function(e){var t=(e=this.setDefaultProps(e)).position?e.position.toLowerCase():"auto";if(this.$popperEle=e.$popperEle,this.$triggerEle=e.$triggerEle,this.$arrowEle=e.$arrowEle,this.margin=parseFloat(e.margin),this.offset=parseFloat(e.offset),this.enterDelay=parseFloat(e.enterDelay),this.exitDelay=parseFloat(e.exitDelay),this.showDuration=parseFloat(e.showDuration),this.hideDuration=parseFloat(e.hideDuration),this.transitionDistance=parseFloat(e.transitionDistance),this.zIndex=parseFloat(e.zIndex),this.afterShowCallback=e.afterShow,this.afterHideCallback=e.afterHide,this.hasArrow=!!this.$arrowEle,-1!==t.indexOf(" ")){var o=t.split(" ");this.position=o[0],this.secondaryPosition=o[1]}else this.position=t}},{key:"setDefaultProps",value:function(e){return Object.assign({position:"auto",margin:8,offset:5,enterDelay:0,exitDelay:0,showDuration:300,hideDuration:200,transitionDistance:10,zIndex:1},e)}},{key:"setPosition",value:function(){o.show(this.$popperEle,"inline-flex");var e,t,s,r=window.innerWidth,a=window.innerHeight,l=o.getAbsoluteCoords(this.$popperEle),p=o.getAbsoluteCoords(this.$triggerEle),c=l.width,u=l.height,h=l.top,d=l.right,v=l.bottom,f=l.left,m=p.width,b=p.height,y=p.top,g=p.right,x=p.bottom,w=p.left,S=y-h,O=w-f,k=O,E=S,C=this.position,$=this.secondaryPosition,D=m/2-c/2,T=b/2-u/2,A=this.margin,V=this.transitionDistance,P=window.scrollY-h,I=a+P,M=window.scrollX-f,L=r+M,F=this.offset;F&&(P+=F,I-=F,M+=F,L-=F),"auto"===C&&(C=o.getMoreVisibleSides(this.$triggerEle).vertical);var j={top:{top:E-u-A,left:k+D},bottom:{top:E+b+A,left:k+D},right:{top:E+T,left:k+m+A},left:{top:E+T,left:k-c-A}},H=j[C];if(E=H.top,k=H.left,$&&("top"===$?E=S:"bottom"===$?E=S+b-u:"left"===$?k=O:"right"===$&&(k=O+m-c)),k<M?"left"===C?s="right":k=M+f>g?g-f:M:k+c>L&&("right"===C?s="left":k=L+f<w?w-d:L-c),E<P?"top"===C?s="bottom":E=P+h>x?x-h:P:E+u>I&&("bottom"===C?s="top":E=I+h<y?y-v:I-u),s){var z=j[s];"top"===(C=s)||"bottom"===C?E=z.top:"left"!==C&&"right"!==C||(k=z.left)}"top"===C?(e=E+V,t=k):"right"===C?(e=E,t=k-V):"left"===C?(e=E,t=k+V):(e=E-V,t=k);var B="translate3d(".concat(t,"px, ").concat(e,"px, 0)");if(o.setStyle(this.$popperEle,"transform",B),o.setData(this.$popperEle,"fromLeft",t),o.setData(this.$popperEle,"fromTop",e),o.setData(this.$popperEle,"top",E),o.setData(this.$popperEle,"left",k),o.removeClass(this.$popperEle,i.join(" ")),o.addClass(this.$popperEle,"position-".concat(C)),this.hasArrow){var N=0,W=0,q=k+f,G=E+h,R=this.$arrowEle.offsetWidth/2,K=n[C]||"";"top"===C||"bottom"===C?(N=m/2+w-q)<R?N=R:N>c-R&&(N=c-R):"left"!==C&&"right"!==C||((W=b/2+y-G)<R?W=R:W>u-R&&(W=u-R)),o.setStyle(this.$arrowEle,"transform","translate3d(".concat(N,"px, ").concat(W,"px, 0) ").concat(K))}o.hide(this.$popperEle)}},{key:"resetPosition",value:function(){o.setStyle(this.$popperEle,"transform","none"),this.setPosition()}},{key:"show",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.resetPosition,n=t.data;clearTimeout(this.exitDelayTimeout),clearTimeout(this.hideDurationTimeout),i&&this.resetPosition(),this.enterDelayTimeout=setTimeout((function(){var t=o.getData(e.$popperEle,"left"),i=o.getData(e.$popperEle,"top"),s="translate3d(".concat(t,"px, ").concat(i,"px, 0)"),r=e.showDuration;o.show(e.$popperEle,"inline-flex"),o.getCoords(e.$popperEle),o.setStyle(e.$popperEle,"transitionDuration",r+"ms"),o.setStyle(e.$popperEle,"transform",s),o.setStyle(e.$popperEle,"opacity",1),e.showDurationTimeout=setTimeout((function(){"function"==typeof e.afterShowCallback&&e.afterShowCallback(n)}),r)}),this.enterDelay)}},{key:"hide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.data;clearTimeout(this.enterDelayTimeout),clearTimeout(this.showDurationTimeout),this.exitDelayTimeout=setTimeout((function(){if(e.$popperEle){var t=o.getData(e.$popperEle,"fromLeft"),n=o.getData(e.$popperEle,"fromTop"),s="translate3d(".concat(t,"px, ").concat(n,"px, 0)"),r=e.hideDuration;o.setStyle(e.$popperEle,"transitionDuration",r+"ms"),o.setStyle(e.$popperEle,"transform",s),o.setStyle(e.$popperEle,"opacity",0),e.hideDurationTimeout=setTimeout((function(){o.hide(e.$popperEle),"function"==typeof e.afterHideCallback&&e.afterHideCallback(i)}),r)}}),this.exitDelay)}},{key:"updatePosition",value:function(){o.setStyle(this.$popperEle,"transitionDuration","0ms"),this.resetPosition();var e=o.getData(this.$popperEle,"left"),t=o.getData(this.$popperEle,"top");o.show(this.$popperEle,"inline-flex"),o.setStyle(this.$popperEle,"transform","translate3d(".concat(e,"px, ").concat(t,"px, 0)"))}}])&&function(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t),e}();window.PopperComponent=s}(),function(){"use strict";function e(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var t=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o,i;return o=t,i=[{key:"convertToBoolean",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!0===e||"true"===e||!1!==e&&"false"!==e&&t}},{key:"convertToFloat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return void 0!==e?parseFloat(e):t}}],i&&e(o,i),t}();function o(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,i;return t=e,i=[{key:"hasEllipsis",value:function(e){return!!e&&e.scrollWidth>e.offsetWidth}},{key:"setStyle",value:function(e,t,o){e&&(e.style[t]=o)}},{key:"getScrollableParents",value:function(e){if(!e)return[];for(var t=[window],o=e.parentElement;o;){var i=getComputedStyle(o).overflow;-1===i.indexOf("scroll")&&-1===i.indexOf("auto")||t.push(o),o=o.parentElement}return t}}],i&&o(t,i),e}();!function(){if(!window.tooltipComponentInitiated){var e,o,n,s,r;window.tooltipComponentInitiated=!0;var a,l={},p=!1;c(),window.addEventListener("load",c)}function c(){p||(e=document.querySelector("body"))&&(document.addEventListener("mouseover",u),document.addEventListener("mouseout",h),document.addEventListener("touchmove",d),document.addEventListener("click",v),p=!0)}function u(p){if(!n){var c=p.target.closest("[data-tooltip]");c&&(n=c,function(){if(n){var p,c=t.convertToBoolean,u=t.convertToFloat,h=n.dataset;!(l={tooltip:h.tooltip,position:h.tooltipPosition||"auto",zIndex:u(h.tooltipZIndex,1),enterDelay:u(h.tooltipEnterDelay,0),exitDelay:u(h.tooltipExitDelay,0),fontSize:h.tooltipFontSize||"14px",margin:u(h.tooltipMargin,8),offset:u(h.tooltipOffset,5),showDuration:u(h.tooltipShowDuration,300),hideDuration:u(h.tooltipHideDuration,200),transitionDistance:u(h.tooltipTransitionDistance,10),ellipsisOnly:c(h.tooltipEllipsisOnly),allowHtml:c(h.tooltipAllowHtml),hideOnClick:c(h.tooltipHideOnClick,!0),hideArrowIcon:c(h.tooltipHideArrowIcon),alignment:h.tooltipAlignment||"left",maxWidth:h.tooltipMaxWidth||"300px",additionalClasses:h.tooltipAdditionalClasses}).tooltip||l.ellipsisOnly&&!i.hasEllipsis(n)?f():(o&&o.remove(),function(){var t="tooltip-comp";l.hideArrowIcon&&(t+=" hide-arrow-icon"),l.additionalClasses&&(t+=" "+l.additionalClasses);var n='<div class="'.concat(t,'">\n        <i class="tooltip-comp-arrow"></i>\n        <div class="tooltip-comp-content"></div>\n      </div>');e.insertAdjacentHTML("beforeend",n);var r=i.setStyle;o=document.querySelector(".tooltip-comp"),s=o.querySelector(".tooltip-comp-arrow");var a=o.querySelector(".tooltip-comp-content");l.allowHtml?a.innerHTML=l.tooltip:a.innerText=l.tooltip,r(o,"zIndex",l.zIndex),r(o,"fontSize",l.fontSize),r(o,"textAlign",l.alignment),r(o,"maxWidth",l.maxWidth)}(),p={$popperEle:o,$triggerEle:n,$arrowEle:s,position:l.position,margin:l.margin,offset:l.offset,enterDelay:l.enterDelay,exitDelay:l.exitDelay,showDuration:l.showDuration,hideDuration:l.hideDuration,transitionDistance:l.transitionDistance,zIndex:l.zIndex},(a=new PopperComponent(p)).show(),(r=i.getScrollableParents(n)).forEach((function(e){e.addEventListener("scroll",m)})))}}())}}function h(e){if(n){for(var t=e.relatedTarget;t;){if(t===n)return;t=t.parentNode}f()}}function d(){f()}function v(){l.hideOnClick&&f()}function f(){(o||n)&&(a&&a.hide(),r&&(r.forEach((function(e){e.removeEventListener("scroll",m)})),r=null),n=null)}function m(){f()}}()}()},8196:()=>{!function(){"use strict";function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=e[o];return i}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(s=function(e,t){if("object"!==o(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(s)?s:String(s)),n)}var s}var n=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,s;return n=t,s=[{key:"getString",value:function(e){return e||0===e?e.toString():""}},{key:"convertToBoolean",value:function(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&arguments.length>1&&void 0!==arguments[1]&&arguments[1]}},{key:"isEmpty",value:function(e){var t=!1;return e?Array.isArray(e)?0===e.length&&(t=!0):"object"===o(e)&&0===Object.keys(e).length&&(t=!0):t=!0,t}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"removeItemFromArray",value:function(t,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!Array.isArray(t)||!t.length)return t;var n=i?e(t):t,s=n.indexOf(o);return-1!==s&&n.splice(s,1),n}},{key:"removeArrayEmpty",value:function(e){return Array.isArray(e)&&e.length?e.filter((function(e){return!!e})):[]}},{key:"getRandomInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=Math.ceil(t),i=Math.floor(e);return Math.floor(Math.random()*(i-o-1))+o}},{key:"regexEscape",value:function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"normalizeString",value:function(e){return e.normalize("NFD").replace(/[^\w]/g,"")}},{key:"willTextOverflow",value:function(e,t){var o=document.createElement("div");o.style.position="absolute",o.style.visibility="hidden",o.style.whiteSpace="nowrap",o.style.fontSize=window.getComputedStyle(e).fontSize,o.style.fontFamily=window.getComputedStyle(e).fontFamily,o.textContent=t,document.body.appendChild(o);var i=o.clientWidth;return document.body.removeChild(o),i>e.clientWidth}},{key:"replaceDoubleQuotesWithHTML",value:function(e){return e.replace(/"/g,"&quot;")}},{key:"containsHTML",value:function(e){return/<[a-z][\s\S]*>/i.test(e)}}],s&&i(n,s),Object.defineProperty(n,"prototype",{writable:!1}),t}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function r(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return l(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=e[o];return i}function p(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e,t){if("object"!==s(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,"string");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===s(n)?n:String(n)),i)}var n}var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,o;return t=e,o=[{key:"addClass",value:function(t,o){if(t){var i=o.split(" ");e.getElements(t).forEach((function(e){var t;(t=e.classList).add.apply(t,r(i))}))}}},{key:"removeClass",value:function(t,o){if(t){var i=o.split(" ");e.getElements(t).forEach((function(e){var t;(t=e.classList).remove.apply(t,r(i))}))}}},{key:"toggleClass",value:function(t,o,i){var n;t&&(void 0!==i&&(n=Boolean(i)),e.getElements(t).forEach((function(e){e.classList.toggle(o,n)})))}},{key:"hasClass",value:function(e,t){return!!e&&e.classList.contains(t)}},{key:"hasEllipsis",value:function(e){return!!e&&e.scrollWidth>e.offsetWidth}},{key:"getData",value:function(e,t,o){if(e){var i=e?e.dataset[t]:"";return"number"===o?i=parseFloat(i)||0:"true"===i?i=!0:"false"===i&&(i=!1),i}}},{key:"setData",value:function(e,t,o){e&&(e.dataset[t]=o)}},{key:"setAttr",value:function(e,t,o){e&&e.setAttribute(t,o)}},{key:"setAttrFromEle",value:function(e,t,o,i){var n={};o.forEach((function(t){n[t]=e.getAttribute(t)})),o.forEach((function(e){var o=n[e];(o||-1!==i.indexOf(e)&&""===o)&&t.setAttribute(e,o)}))}},{key:"setStyle",value:function(e,t,o){e&&(e.style[t]=o)}},{key:"setStyles",value:function(e,t){e&&t&&Object.keys(t).forEach((function(o){e.style[o]=t[o]}))}},{key:"setAria",value:function(e,t,o){var i=t;"role"!==i&&(i="aria-".concat(i)),e.setAttribute(i,o)}},{key:"getElements",value:function(e){return e?void 0===e.forEach?[e]:e:[]}},{key:"getElementsBySelector",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=void 0!==o?o:document;return""!==t&&(e=i.querySelectorAll(t)),void 0!==e?Array.from(e):[]}},{key:"addEvent",value:function(t,o,i){t&&n.removeArrayEmpty(o.split(" ")).forEach((function(o){e.getElements(t).forEach((function(e){e.addEventListener(o,i)}))}))}},{key:"dispatchEvent",value:function(t,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t){var n=e.getElements(t);setTimeout((function(){n.forEach((function(e){e.dispatchEvent(new CustomEvent(o,{bubbles:i}))}))}),0)}}},{key:"getAttributesText",value:function(e){var t="";return e?(Object.entries(e).forEach((function(e){var o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i,n,s,r,a=[],l=!0,p=!1;try{for(s=(o=o.call(e)).next,0;!(l=(i=s.call(o)).done)&&(a.push(i.value),2!==a.length);l=!0);}catch(e){p=!0,n=e}finally{try{if(!l&&null!=o.return&&(r=o.return(),Object(r)!==r))return}finally{if(p)throw n}}return a}}(e)||a(e,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),i=o[0],n=o[1];void 0!==n&&(t+=" ".concat(i,'="').concat(n,'" '))})),t):t}},{key:"convertPropToDataAttr",value:function(e){return e?"data-".concat(e).replace(/([A-Z])/g,"-$1").toLowerCase():""}},{key:"changeTabIndex",value:function(t,o){t?e.getElements(t).forEach((function(e){e.tabIndex=o})):console.log(t,"Invalid element provided.")}},{key:"removeEvent",value:function(t,o,i){t&&e.getElements(t).forEach((function(e){e.removeEventListener(o,i)}))}}],o&&p(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function h(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach((function(t){d(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function d(e,t,o){return(t=g(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function f(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return b(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=e[o];return i}function y(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,g(i.key),i)}}function g(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,"string");if("object"!==v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}var x,w={13:"onEnterPress",38:"onUpArrowPress",40:"onDownArrowPress",46:"onBackspaceOrDeletePress",8:"onBackspaceOrDeletePress"},S=["autofocus","disabled","multiple","required"],O=["autofocus","class","disabled","id","multiple","name","placeholder","required"],k=["additionalClasses","additionalDropboxClasses","additionalDropboxContainerClasses","additionalToggleButtonClasses","aliasKey","allOptionsSelectedText","allowNewOption","alwaysShowSelectedOptionsCount","alwaysShowSelectedOptionsLabel","ariaLabelledby","ariaLabelText","ariaLabelClearButtonText","autoSelectFirstOption","clearButtonText","descriptionKey","disableAllOptionsSelectedText","disableOptionGroupCheckbox","disableSelectAll","disableValidation","dropboxWidth","dropboxWrapper","emptyValue","enableSecureText","focusSelectedOptionOnOpen","hasOptionDescription","hideClearButton","hideValueTooltipOnSelectAll","keepAlwaysOpen","labelKey","markSearchResults","maxValues","maxWidth","minValues","moreText","noOfDisplayValues","noOptionsText","noSearchResultsText","optionHeight","optionSelectedText","optionsCount","optionsSelectedText","popupDropboxBreakpoint","popupPosition","position","search","searchByStartsWith","searchDelay","searchFormLabel","searchGroup","searchNormalize","searchPlaceholderText","selectAllOnlyVisible","selectAllText","setValueAsArray","showDropboxAsPopup","showOptionsOnlyOnSearch","showSelectedOptionsFirst","showValueAsTags","silentInitialValueSet","textDirection","tooltipAlignment","tooltipFontSize","tooltipMaxWidth","updatePositionThrottle","useGroupValue","valueKey","zIndex"],E=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this.createSecureTextElements(),this.setProps(t),this.setDisabledOptions(t.disabledOptions),this.setOptions(t.options),this.render()}catch(e){console.warn("Couldn't initiate Virtual Select"),console.error(e)}}var t,o,i;return t=e,o=[{key:"render",value:function(){if(this.$ele){var e=this.uniqueId,t="vscomp-wrapper",o="vscomp-toggle-button",i=this.showValueAsTags?"":this.getTooltipAttrText(this.placeholder,!0,!0),n=this.getTooltipAttrText(this.clearButtonText),s=this.ariaLabelledby?'aria-labelledby="'.concat(this.ariaLabelledby,'"'):"",r=this.ariaLabelText?'aria-label="'.concat(this.ariaLabelText,'"'):"",a=this.ariaLabelClearButtonText?'aria-label="'.concat(this.ariaLabelClearButtonText,'"'):"",l=!1;this.additionalClasses&&(t+=" ".concat(this.additionalClasses)),this.additionalToggleButtonClasses&&(o+=" ".concat(this.additionalToggleButtonClasses)),this.multiple&&(t+=" multiple",this.disableSelectAll||(t+=" has-select-all")),this.hideClearButton||(t+=" has-clear-button"),this.keepAlwaysOpen?(t+=" keep-always-open",l=!0):t+=" closed",this.showAsPopup&&(t+=" show-as-popup"),this.hasSearch&&(t+=" has-search-input"),this.showValueAsTags&&(t+=" show-value-as-tags"),this.textDirection&&(t+=" text-direction-".concat(this.textDirection)),this.popupPosition&&(t+=" popup-position-".concat(this.popupPosition.toLowerCase()));var p='<div id="vscomp-ele-wrapper-'.concat(e,'" class="vscomp-ele-wrapper ').concat(t,'" tabindex="0"\n        role="combobox" aria-haspopup="listbox" aria-controls="vscomp-dropbox-container-').concat(e,'"\n        aria-expanded="').concat(l,'" ').concat(s," ").concat(r,'>\n        <input type="hidden" name="').concat(this.name,'" class="vscomp-hidden-input">\n        <div class="').concat(o,'">\n          <div class="vscomp-value" ').concat(i,">\n            ").concat(this.placeholder,'\n          </div>\n          <div class="vscomp-arrow"></div>\n          <div class="vscomp-clear-button toggle-button-child" ').concat(n,' \n          tabindex="0" ').concat(a,'>\n            <i class="vscomp-clear-icon"></i>\n          </div>\n        </div>\n\n        ').concat(this.renderDropbox({wrapperClasses:t}),"\n      </div>");this.$ele.innerHTML=p,this.$body=document.querySelector("body"),this.$wrapper=this.$ele.querySelector(".vscomp-wrapper"),this.hasDropboxWrapper?(this.$allWrappers=[this.$wrapper,this.$dropboxWrapper],this.$dropboxContainer=this.$dropboxWrapper.querySelector(".vscomp-dropbox-container"),c.addClass(this.$dropboxContainer,"pop-comp-wrapper")):(this.$allWrappers=[this.$wrapper],this.$dropboxContainer=this.$wrapper.querySelector(".vscomp-dropbox-container")),this.$toggleButton=this.$ele.querySelector(".vscomp-toggle-button"),this.$clearButton=this.$ele.querySelector(".vscomp-clear-button"),this.$valueText=this.$ele.querySelector(".vscomp-value"),this.$hiddenInput=this.$ele.querySelector(".vscomp-hidden-input"),this.$dropbox=this.$dropboxContainer.querySelector(".vscomp-dropbox"),this.$dropboxCloseButton=this.$dropboxContainer.querySelector(".vscomp-dropbox-close-button"),this.$dropboxContainerBottom=this.$dropboxContainer.querySelector(".vscomp-dropbox-container-bottom"),this.$dropboxContainerTop=this.$dropboxContainer.querySelector(".vscomp-dropbox-container-top"),this.$search=this.$dropboxContainer.querySelector(".vscomp-search-wrapper"),this.$optionsContainer=this.$dropboxContainer.querySelector(".vscomp-options-container"),this.$optionsList=this.$dropboxContainer.querySelector(".vscomp-options-list"),this.$options=this.$dropboxContainer.querySelector(".vscomp-options"),this.$noOptions=this.$dropboxContainer.querySelector(".vscomp-no-options"),this.$noSearchResults=this.$dropboxContainer.querySelector(".vscomp-no-search-results"),this.afterRenderWrapper()}}},{key:"renderDropbox",value:function(e){var t=e.wrapperClasses,o="self"!==this.dropboxWrapper?document.querySelector(this.dropboxWrapper):null,i="vscomp-dropbox";this.additionalDropboxClasses&&(i+=" ".concat(this.additionalDropboxClasses));var n="vscomp-dropbox-container";this.additionalDropboxContainerClasses&&(n+=" ".concat(this.additionalDropboxContainerClasses));var s='<div id="vscomp-dropbox-container-'.concat(this.uniqueId,'" role="listbox" class="').concat(n,'">\n        <div class="vscomp-dropbox-container-top" aria-hidden="true" tabindex="0">&nbsp;</div>\n        <div class="').concat(i,'">\n          <div class="vscomp-search-wrapper"></div>\n\n          <div class="vscomp-options-container">\n            <div class="vscomp-options-loader"></div>\n\n            <div class="vscomp-options-list">\n              <div class="vscomp-options"></div>\n            </div>\n          </div>\n\n          <div class="vscomp-options-bottom-freezer"></div>\n          <div class="vscomp-no-options">').concat(this.noOptionsText,'</div>\n          <div class="vscomp-no-search-results">').concat(this.noSearchResultsText,'</div>\n\n          <span class="vscomp-dropbox-close-button"><i class="vscomp-clear-icon"></i></span>\n        </div>\n        <div class="vscomp-dropbox-container-bottom" aria-hidden="true" tabindex="0">&nbsp;</div>\n      </div>');if(o){var r=document.createElement("div");return this.$dropboxWrapper=r,this.hasDropboxWrapper=!0,r.innerHTML=s,o.appendChild(r),c.addClass(r,"vscomp-dropbox-wrapper ".concat(t)),""}return this.hasDropboxWrapper=!1,s}},{key:"renderOptions",value:function(){var e,t=this,o="",i=this.getVisibleOptions(),s="",r="",a=!(!this.markSearchResults||!this.searchValue),l=this.labelRenderer,p=this.disableOptionGroupCheckbox,c=this.uniqueId,u=this.searchGroup,h="function"==typeof l,d=n.convertToBoolean,v="";if(a&&(e=new RegExp("(".concat(n.regexEscape(this.searchValue),")(?!([^<]+)?>)"),"gi")),this.multiple&&(s='<span class="checkbox-icon"></span>'),this.allowNewOption){var f=this.getTooltipAttrText("New Option");r='<span class="vscomp-new-option-icon" '.concat(f,"></span>")}i.forEach((function(i){var n,f=i.index,m="vscomp-option",b=t.getTooltipAttrText("",!0,!0),y=s,g="",x="",w="",S="",O="-1",k=d(i.isSelected),E="";if(i.classNames&&(m+=" ".concat(i.classNames)),i.isFocused&&(O="0",m+=" focused"),i.isDisabled&&(m+=" disabled",E='aria-disabled="true"'),i.isGroupTitle&&(v=i.label,m+=" group-title",p&&(y="")),k&&(m+=" selected"),i.isGroupOption){var C="";m+=" group-option",w='data-group-index="'.concat(i.groupIndex,'"'),i.customData?(v=void 0!==i.customData.group_name?"".concat(i.customData.group_name,", "):"",C=void 0!==i.customData.description?" ".concat(i.customData.description,","):"",S='aria-label="'.concat(v," ").concat(i.label,", ").concat(C,'"')):S='aria-label="'.concat(v,", ").concat(i.label,'"')}n=h?l(i):i.label,i.description&&(x='<div class="vscomp-option-description" '.concat(b,">").concat(i.description,"</div>")),i.isCurrentNew?(m+=" current-new",g+=r):!a||i.isGroupTitle&&!u||(n=n.replace(e,"<mark>$1</mark>")),o+='<div role="option" aria-selected="'.concat(k,'" id="vscomp-option-').concat(c,"-").concat(f,'"\n          class="').concat(m,'" data-value="').concat(i.value,'" data-index="').concat(f,'" data-visible-index="').concat(i.visibleIndex,'"\n          tabindex=').concat(O," ").concat(w," ").concat(E," ").concat(S,"\n        >\n          ").concat(y,'\n          <span class="vscomp-option-text" ').concat(b,">\n            ").concat(n,"\n          </span>\n          ").concat(x,"\n          ").concat(g,"\n        </div>")})),v="",this.$options.innerHTML=o,this.$visibleOptions=this.$options.querySelectorAll(".vscomp-option"),this.afterRenderOptions()}},{key:"renderSearch",value:function(){if(this.hasSearchContainer){var e="",t="";this.multiple&&!this.disableSelectAll&&(e='<span class="vscomp-toggle-all-button">\n          <span class="checkbox-icon vscomp-toggle-all-checkbox"></span>\n          <span class="vscomp-toggle-all-label">'.concat(this.selectAllText,"</span>\n        </span>")),this.hasSearch&&(t='<label for="vscomp-search-input-'.concat(this.uniqueId,'" class="vscomp-search-label"\n        id="vscomp-search-label-').concat(this.uniqueId,'"\n      >\n        ').concat(this.searchFormLabel,'\n      </label>\n      <input type="text" class="vscomp-search-input" placeholder="').concat(this.searchPlaceholderText,'"\n        id="vscomp-search-input-').concat(this.uniqueId,'">\n      <span class="vscomp-search-clear">&times;</span>'));var o='<div class="vscomp-search-container">\n        '.concat(e,"\n        ").concat(t,"\n      </div>");this.$search.innerHTML=o,this.$searchInput=this.$dropboxContainer.querySelector(".vscomp-search-input"),this.$searchClear=this.$dropboxContainer.querySelector(".vscomp-search-clear"),this.$toggleAllButton=this.$dropboxContainer.querySelector(".vscomp-toggle-all-button"),this.$toggleAllCheckbox=this.$dropboxContainer.querySelector(".vscomp-toggle-all-checkbox"),this.addEvent(this.$searchInput,"input","onSearch"),this.addEvent(this.$searchClear,"click","onSearchClear"),this.addEvent(this.$toggleAllButton,"click","onToggleAllOptions"),this.addEvent(this.$dropboxContainerBottom,"focus","onDropboxContainerTopOrBottomFocus"),this.addEvent(this.$dropboxContainerTop,"focus","onDropboxContainerTopOrBottomFocus")}}},{key:"addEvents",value:function(){this.addEvent(document,"click","onDocumentClick"),this.addEvent(this.$allWrappers,"keydown","onKeyDown"),this.addEvent(this.$toggleButton,"click","onToggleButtonClick"),this.addEvent(this.$clearButton,"click keydown","onClearButtonClick"),this.addEvent(this.$dropboxContainer,"click","onDropboxContainerClick"),this.addEvent(this.$dropboxCloseButton,"click","onDropboxCloseButtonClick"),this.addEvent(this.$optionsContainer,"scroll","onOptionsScroll"),this.addEvent(this.$options,"click","onOptionsClick"),this.addEvent(this.$options,"mouseover","onOptionsMouseOver"),this.addEvent(this.$options,"touchmove","onOptionsTouchMove"),this.addMutationObserver()}},{key:"addEvent",value:function(e,t,o){var i=this;e&&n.removeArrayEmpty(t.split(" ")).forEach((function(t){var n="".concat(o,"-").concat(t),s=i.events[n];s||(s=i[o].bind(i),i.events[n]=s),c.addEvent(e,t,s)}))}},{key:"removeEvents",value:function(){this.removeEvent(document,"click","onDocumentClick"),this.removeEvent(this.$allWrappers,"keydown","onKeyDown"),this.removeEvent(this.$toggleButton,"click","onToggleButtonClick"),this.removeEvent(this.$clearButton,"click keydown","onClearButtonClick"),this.removeEvent(this.$dropboxContainer,"click","onDropboxContainerClick"),this.removeEvent(this.$dropboxCloseButton,"click","onDropboxCloseButtonClick"),this.removeEvent(this.$optionsContainer,"scroll","onOptionsScroll"),this.removeEvent(this.$options,"click","onOptionsClick"),this.removeEvent(this.$options,"mouseover","onOptionsMouseOver"),this.removeEvent(this.$options,"touchmove","onOptionsTouchMove"),this.removeMutationObserver()}},{key:"removeEvent",value:function(e,t,o){var i=this;e&&n.removeArrayEmpty(t.split(" ")).forEach((function(t){var n="".concat(o,"-").concat(t),s=i.events[n];s&&c.removeEvent(e,t,s)}))}},{key:"onDocumentClick",value:function(e){var t=e.target.closest(".vscomp-wrapper");t!==this.$wrapper&&t!==this.$dropboxWrapper&&this.isOpened()&&this.closeDropbox()}},{key:"onKeyDown",value:function(e){var t=e.which||e.keyCode,o=w[t];if(document.activeElement===this.$searchInput&&e.shiftKey&&9===t)return e.preventDefault(),void(this.keepAlwaysOpen?this.$dropboxContainerTop.focus():this.closeDropbox());if(document.activeElement===this.$searchInput&&9===t)return e.preventDefault(),void this.focusFirstVisibleOption();if(27===t||"Escape"===e.key){var i=this.showAsPopup?this.$wrapper:this.$dropboxWrapper;if((document.activeElement===i||i.contains(document.activeElement))&&!this.keepAlwaysOpen)return void this.closeDropbox()}o&&this[o](e)}},{key:"onEnterPress",value:function(e){e.preventDefault(),this.isOpened()?this.selectFocusedOption():!1===this.$ele.disabled&&this.openDropbox()}},{key:"onDownArrowPress",value:function(e){e.preventDefault(),this.isOpened()?this.focusOption({direction:"next"}):this.openDropbox()}},{key:"onUpArrowPress",value:function(e){e.preventDefault(),this.isOpened()?this.focusOption({direction:"previous"}):this.openDropbox()}},{key:"onBackspaceOrDeletePress",value:function(e){e.target===this.$wrapper&&(e.preventDefault(),this.selectedValues.length>0&&this.reset())}},{key:"onToggleButtonClick",value:function(e){var t=e.target;t.closest(".vscomp-value-tag-clear-button")?this.removeValue(t.closest(".vscomp-value-tag")):t.closest(".toggle-button-child")||this.toggleDropbox()}},{key:"onClearButtonClick",value:function(e){"click"===e.type?this.reset():"keydown"!==e.type||"Enter"!==e.code&&"Space"!==e.code||(e.stopPropagation(),this.reset())}},{key:"onOptionsScroll",value:function(){this.setVisibleOptions()}},{key:"onOptionsClick",value:function(e){var t=e.target.closest(".vscomp-option");t&&!c.hasClass(t,"disabled")&&(c.hasClass(t,"group-title")?this.onGroupTitleClick(t):this.selectOption(t,{event:e}))}},{key:"onGroupTitleClick",value:function(e){if(e&&this.multiple&&!this.disableOptionGroupCheckbox){var t=!c.hasClass(e,"selected");this.toggleGroupTitleCheckbox(e,t),this.toggleGroupOptions(e,t)}}},{key:"onDropboxContainerClick",value:function(e){e.target.closest(".vscomp-dropbox")||this.closeDropbox()}},{key:"onDropboxCloseButtonClick",value:function(){this.closeDropbox()}},{key:"onOptionsMouseOver",value:function(e){var t=e.target.closest(".vscomp-option");t&&this.isOpened()&&(c.hasClass(t,"disabled")||c.hasClass(t,"group-title")?this.removeOptionFocus():this.focusOption({$option:t}))}},{key:"onOptionsTouchMove",value:function(){this.removeOptionFocus()}},{key:"onSearch",value:function(e){e.stopPropagation(),this.setSearchValue(e.target.value,!0)}},{key:"onSearchClear",value:function(){this.setSearchValue(""),this.focusSearchInput()}},{key:"onToggleAllOptions",value:function(){this.toggleAllOptions()}},{key:"onDropboxContainerTopOrBottomFocus",value:function(){this.closeDropbox()}},{key:"onResize",value:function(){this.setOptionsContainerHeight(!0)}},{key:"addMutationObserver",value:function(){var e=this;if(this.hasDropboxWrapper){var t=this.$ele;this.mutationObserver=new MutationObserver((function(o){var i=!1,n=!1;o.forEach((function(e){i||(i=f(e.addedNodes).some((function(e){return!(e!==t&&!e.contains(t))}))),n||(n=f(e.removedNodes).some((function(e){return!(e!==t&&!e.contains(t))})))})),n&&!i&&e.destroy()})),this.mutationObserver.observe(document.querySelector("body"),{childList:!0,subtree:!0})}}},{key:"removeMutationObserver",value:function(){this.mutationObserver.disconnect()}},{key:"beforeValueSet",value:function(e){this.toggleAllOptionsClass(!e&&void 0)}},{key:"beforeSelectNewValue",value:function(){var e=this,t=this.getNewOption(),o=t.index;this.newValues.push(t.value),this.setOptionProp(o,"isCurrentNew",!1),this.setOptionProp(o,"isNew",!0),setTimeout((function(){e.setSearchValue(""),e.focusSearchInput()}),0)}},{key:"afterRenderWrapper",value:function(){c.addClass(this.$ele,"vscomp-ele"),this.renderSearch(),this.setEleStyles(),this.setDropboxStyles(),this.setOptionsHeight(),this.setVisibleOptions(),this.setOptionsContainerHeight(),this.addEvents(),this.setEleProps(),this.keepAlwaysOpen||this.showAsPopup||this.initDropboxPopover(),this.initialSelectedValue?this.setValueMethod(this.initialSelectedValue,this.silentInitialValueSet):this.autoSelectFirstOption&&this.visibleOptions.length&&this.setValueMethod(this.visibleOptions[0].value,this.silentInitialValueSet),this.showOptionsOnlyOnSearch&&this.setSearchValue("",!1,!0),this.initialDisabled&&this.disable(),this.autofocus&&this.focus()}},{key:"afterRenderOptions",value:function(){var e=this.getVisibleOptions(),t=!this.options.length&&!this.hasServerSearch,o=!t&&!e.length;if((!this.allowNewOption||this.hasServerSearch||this.showOptionsOnlyOnSearch)&&(c.toggleClass(this.$allWrappers,"has-no-search-results",o),o?(c.setAttr(this.$noSearchResults,"tabindex","0"),c.setAttr(this.$noSearchResults,"aria-hidden","false")):(c.setAttr(this.$noSearchResults,"tabindex","-1"),c.setAttr(this.$noSearchResults,"aria-hidden","true"))),c.toggleClass(this.$allWrappers,"has-no-options",t),t?(c.setAttr(this.$noOptions,"tabindex","0"),c.setAttr(this.$noOptions,"aria-hidden","false")):(c.setAttr(this.$noOptions,"tabindex","-1"),c.setAttr(this.$noOptions,"aria-hidden","true")),this.setOptionAttr(),this.setOptionsPosition(),this.setOptionsTooltip(),document.activeElement!==this.$searchInput){var i=c.getElementsBySelector(".focused",this.$dropboxContainer)[0];void 0!==i&&i.focus()}}},{key:"afterSetOptionsContainerHeight",value:function(e){e&&this.showAsPopup&&this.setVisibleOptions()}},{key:"afterSetSearchValue",value:function(){var e=this;this.hasServerSearch?(clearInterval(this.serverSearchTimeout),this.serverSearchTimeout=setTimeout((function(){e.serverSearch()}),this.searchDelay)):this.setVisibleOptionsCount(),this.selectAllOnlyVisible&&this.toggleAllOptionsClass(),this.focusOption({focusFirst:!0})}},{key:"afterSetVisibleOptionsCount",value:function(){this.scrollToTop(),this.setOptionsHeight(),this.setVisibleOptions(),this.updatePosition()}},{key:"afterValueSet",value:function(){this.scrollToTop(),this.setSearchValue(""),this.renderOptions()}},{key:"afterSetOptions",value:function(e){e&&this.setSelectedProp(),this.setOptionsHeight(),this.setVisibleOptions(),this.showOptionsOnlyOnSearch&&this.setSearchValue("",!1,!0),e||this.reset()}},{key:"setProps",value:function(e){var t=this.setDefaultProps(e);this.setPropsFromElementAttr(t);var o=n.convertToBoolean;this.$ele=t.ele,this.dropboxWrapper=t.dropboxWrapper,this.valueKey=t.valueKey,this.labelKey=t.labelKey,this.descriptionKey=t.descriptionKey,this.aliasKey=t.aliasKey,this.optionHeightText=t.optionHeight,this.optionHeight=parseFloat(this.optionHeightText),this.multiple=o(t.multiple),this.hasSearch=o(t.search),this.searchByStartsWith=o(t.searchByStartsWith),this.searchGroup=o(t.searchGroup),this.hideClearButton=o(t.hideClearButton),this.autoSelectFirstOption=o(t.autoSelectFirstOption),this.hasOptionDescription=o(t.hasOptionDescription),this.silentInitialValueSet=o(t.silentInitialValueSet),this.allowNewOption=o(t.allowNewOption),this.markSearchResults=o(t.markSearchResults),this.showSelectedOptionsFirst=o(t.showSelectedOptionsFirst),this.disableSelectAll=o(t.disableSelectAll),this.keepAlwaysOpen=o(t.keepAlwaysOpen),this.showDropboxAsPopup=o(t.showDropboxAsPopup),this.hideValueTooltipOnSelectAll=o(t.hideValueTooltipOnSelectAll),this.showOptionsOnlyOnSearch=o(t.showOptionsOnlyOnSearch),this.selectAllOnlyVisible=o(t.selectAllOnlyVisible),this.alwaysShowSelectedOptionsCount=o(t.alwaysShowSelectedOptionsCount),this.alwaysShowSelectedOptionsLabel=o(t.alwaysShowSelectedOptionsLabel),this.disableAllOptionsSelectedText=o(t.disableAllOptionsSelectedText),this.showValueAsTags=o(t.showValueAsTags),this.disableOptionGroupCheckbox=o(t.disableOptionGroupCheckbox),this.enableSecureText=o(t.enableSecureText),this.setValueAsArray=o(t.setValueAsArray),this.disableValidation=o(t.disableValidation),this.initialDisabled=o(t.disabled),this.required=o(t.required),this.autofocus=o(t.autofocus),this.useGroupValue=o(t.useGroupValue),this.focusSelectedOptionOnOpen=o(t.focusSelectedOptionOnOpen),this.noOptionsText=t.noOptionsText,this.noSearchResultsText=t.noSearchResultsText,this.selectAllText=t.selectAllText,this.searchNormalize=t.searchNormalize,this.searchPlaceholderText=t.searchPlaceholderText,this.searchFormLabel=t.searchFormLabel,this.optionsSelectedText=t.optionsSelectedText,this.optionSelectedText=t.optionSelectedText,this.allOptionsSelectedText=t.allOptionsSelectedText,this.clearButtonText=t.clearButtonText,this.moreText=t.moreText,this.placeholder=t.placeholder,this.position=t.position,this.textDirection=t.textDirection,this.dropboxWidth=t.dropboxWidth,this.tooltipFontSize=t.tooltipFontSize,this.tooltipAlignment=t.tooltipAlignment,this.tooltipMaxWidth=t.tooltipMaxWidth,this.updatePositionThrottle=t.updatePositionThrottle,this.noOfDisplayValues=parseInt(t.noOfDisplayValues),this.zIndex=parseInt(t.zIndex),this.maxValues=parseInt(t.maxValues),this.minValues=parseInt(t.minValues),this.name=this.secureText(t.name),this.additionalClasses=t.additionalClasses,this.additionalDropboxClasses=t.additionalDropboxClasses,this.additionalDropboxContainerClasses=t.additionalDropboxContainerClasses,this.additionalToggleButtonClasses=t.additionalToggleButtonClasses,this.popupDropboxBreakpoint=t.popupDropboxBreakpoint,this.popupPosition=t.popupPosition,this.onServerSearch=t.onServerSearch,this.labelRenderer=t.labelRenderer,this.selectedLabelRenderer=t.selectedLabelRenderer,this.initialSelectedValue=0===t.selectedValue?"0":t.selectedValue,this.emptyValue=t.emptyValue,this.ariaLabelledby=t.ariaLabelledby,this.ariaLabelText=t.ariaLabelText,this.ariaLabelClearButtonText=t.ariaLabelClearButtonText,this.maxWidth=t.maxWidth,this.searchDelay=t.searchDelay,this.selectedValues=[],this.selectedOptions=[],this.newValues=[],this.events={},this.tooltipEnterDelay=200,this.searchValue="",this.searchValueOriginal="",this.isAllSelected=!1,(void 0===t.search&&this.multiple||this.allowNewOption||this.showOptionsOnlyOnSearch)&&(this.hasSearch=!0),this.hasServerSearch="function"==typeof this.onServerSearch,(this.maxValues||this.hasServerSearch||this.showOptionsOnlyOnSearch)&&(this.disableSelectAll=!0,this.disableOptionGroupCheckbox=!0),this.keepAlwaysOpen&&(this.dropboxWrapper="self"),this.showAsPopup=this.showDropboxAsPopup&&!this.keepAlwaysOpen&&window.innerWidth<=parseFloat(this.popupDropboxBreakpoint),this.hasSearchContainer=this.hasSearch||this.multiple&&!this.disableSelectAll,this.optionsCount=this.getOptionsCount(t.optionsCount),this.halfOptionsCount=Math.ceil(this.optionsCount/2),this.optionsHeight=this.getOptionsHeight(),this.uniqueId=this.getUniqueId()}},{key:"setDefaultProps",value:function(e){var t={dropboxWrapper:"self",valueKey:"value",labelKey:"label",descriptionKey:"description",aliasKey:"alias",ariaLabelText:"Options list",ariaLabelClearButtonText:"Clear button",optionsCount:5,noOfDisplayValues:50,optionHeight:"40px",noOptionsText:"No options found",noSearchResultsText:"No results found",selectAllText:"Select All",searchNormalize:!1,searchPlaceholderText:"Search...",searchFormLabel:"Search",clearButtonText:"Clear",moreText:"more...",optionsSelectedText:"options selected",optionSelectedText:"option selected",allOptionsSelectedText:"All",placeholder:"Select",position:"bottom left",zIndex:e.keepAlwaysOpen?1:2,tooltipFontSize:"14px",tooltipAlignment:"center",tooltipMaxWidth:"300px",updatePositionThrottle:100,name:"",additionalClasses:"",additionalDropboxClasses:"",additionalDropboxContainerClasses:"",additionalToggleButtonClasses:"",maxValues:0,showDropboxAsPopup:!0,popupDropboxBreakpoint:"576px",popupPosition:"center",hideValueTooltipOnSelectAll:!0,emptyValue:"",searchDelay:300,focusSelectedOptionOnOpen:!0};return e.hasOptionDescription&&(t.optionsCount=4,t.optionHeight="50px"),Object.assign(t,e)}},{key:"setPropsFromElementAttr",value:function(e){var t=e.ele;Object.keys(x).forEach((function(o){var i=t.getAttribute(o);-1===S.indexOf(o)||""!==i&&"true"!==i||(i=!0),i&&(e[x[o]]=i)}))}},{key:"setEleProps",value:function(){var t=this.$ele;t.virtualSelect=this,t.value=this.multiple?[]:"",t.name=this.name,t.disabled=!1,t.required=this.required,t.autofocus=this.autofocus,t.multiple=this.multiple,t.form=t.closest("form"),t.reset=e.reset,t.setValue=e.setValueMethod,t.setOptions=e.setOptionsMethod,t.setDisabledOptions=e.setDisabledOptionsMethod,t.setEnabledOptions=e.setEnabledOptionsMethod,t.toggleSelectAll=e.toggleSelectAll,t.isAllSelected=e.isAllSelected,t.addOption=e.addOptionMethod,t.getNewValue=e.getNewValueMethod,t.getDisplayValue=e.getDisplayValueMethod,t.getSelectedOptions=e.getSelectedOptionsMethod,t.getDisabledOptions=e.getDisabledOptionsMethod,t.open=e.openMethod,t.close=e.closeMethod,t.focus=e.focusMethod,t.enable=e.enableMethod,t.disable=e.disableMethod,t.destroy=e.destroyMethod,t.validate=e.validateMethod,t.toggleRequired=e.toggleRequiredMethod,this.hasDropboxWrapper&&(this.$dropboxWrapper.virtualSelect=this)}},{key:"setValueMethod",value:function(e,t){var o={},i={},n=[],s=this.multiple,r=e;if(r){if(Array.isArray(r)||(r=[r]),s){var a=this.maxValues;a&&r.length>a&&r.splice(a)}else r.length>1&&(r=[r[0]]);r=r.map((function(e){return e||0===e?e.toString():""})),this.useGroupValue&&(r=this.setGroupOptionsValue(r)),r.forEach((function(e,t){o[e]=!0,i[e]=t})),this.allowNewOption&&r&&this.setNewOptionsFromValue(r)}if(this.options.forEach((function(e){!0!==o[e.value]||e.isDisabled||e.isGroupTitle?e.isSelected=!1:(e.isSelected=!0,n.push(e.value))})),s)this.hasOptionGroup&&this.setGroupsSelectedProp(),n.sort((function(e,t){return i[e]-i[t]}));else{var l=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i,n,s,r,a=[],l=!0,p=!1;try{for(s=(o=o.call(e)).next,0;!(l=(i=s.call(o)).done)&&(a.push(i.value),1!==a.length);l=!0);}catch(e){p=!0,n=e}finally{try{if(!l&&null!=o.return&&(r=o.return(),Object(r)!==r))return}finally{if(p)throw n}}return a}}(e)||m(e,1)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(n);n=l[0]}this.beforeValueSet(),this.setValue(n,{disableEvent:t}),this.afterValueSet()}},{key:"setGroupOptionsValue",value:function(e){var t=[],o={},i={};return e.forEach((function(e){i[e]=!0})),this.options.forEach((function(e){var n=e.value,s=!0===i[n];e.isGroupTitle?s&&(o[e.index]=!0):(s||o[e.groupIndex])&&t.push(n)})),t}},{key:"setGroupsSelectedProp",value:function(){var e=this.isAllGroupOptionsSelected.bind(this);this.options.forEach((function(t){t.isGroupTitle&&(t.isSelected=e(t.index))}))}},{key:"setOptionsMethod",value:function(e,t){this.setOptions(e),this.afterSetOptions(t)}},{key:"setDisabledOptionsMethod",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.setDisabledOptions(e,!0),t||(this.setValueMethod(null),this.toggleAllOptionsClass()),this.setVisibleOptions()}},{key:"setDisabledOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[];if(e)if(!0===e)t&&this.options.forEach((function(e){return e.isDisabled=!0,o.push(e.value),e}));else{o=e.map((function(e){return e.toString()}));var i={};o.forEach((function(e){i[e]=!0})),t&&this.options.forEach((function(e){return e.isDisabled=!0===i[e.value],e}))}else t&&this.options.forEach((function(e){return e.isDisabled=!1,e}));this.disabledOptions=o}},{key:"setEnabledOptionsMethod",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.setEnabledOptions(e),t||(this.setValueMethod(null),this.toggleAllOptionsClass()),this.setVisibleOptions()}},{key:"setEnabledOptions",value:function(e){if(void 0!==e){var t=[];if(!0===e)this.options.forEach((function(e){return e.isDisabled=!1,e}));else{var o={};e.forEach((function(e){o[e]=!0})),this.options.forEach((function(e){var i=!0!==o[e.value];return e.isDisabled=i,i&&t.push(e.value),e}))}this.disabledOptions=t}}},{key:"setOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=[],i=this.disabledOptions.length,s=this.valueKey,r=this.labelKey,a=this.descriptionKey,l=this.aliasKey,p=this.hasOptionDescription,c=n.getString,u=n.convertToBoolean,h=this.secureText.bind(this),f=this.getAlias.bind(this),m=0,b=!1,y={},g=!1;this.disabledOptions.forEach((function(e){y[e]=!0})),Array.isArray(t)&&t.forEach((function t(x){var w;"object"!==v(x)&&(d(w={},s,x),d(w,r,x),x=w);var S=h(c(x[s])),O=h(c(x[r])),k=x.options,E=!!k,C={index:m,value:S,label:O,labelNormalized:e.searchNormalize?n.normalizeString(O).toLowerCase():O.toLowerCase(),alias:f(x[l]),isVisible:u(x.isVisible,!0),isNew:x.isNew||!1,isGroupTitle:E,classNames:x.classNames};if(g||""!==S||(g=!0),i&&(C.isDisabled=!0===y[S]),x.isGroupOption&&(C.isGroupOption=!0,C.groupIndex=x.groupIndex),p&&(C.description=h(c(x[a]))),x.customData&&(C.customData=x.customData),o.push(C),m+=1,E){var $=C.index;b=!0,k.forEach((function(e){e.isGroupOption=!0,e.groupIndex=$,t(e)}))}}));var x=o.length,w=this.$ele;w.options=o,w.length=x,this.options=o,this.visibleOptionsCount=x,this.lastOptionIndex=x-1,this.newValues=[],this.hasOptionGroup=b,this.hasEmptyValueOption=g,this.setSortedOptions()}},{key:"setServerOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.setOptionsMethod(t,!0);var o=this.selectedOptions,i=this.options,n=!1;if(o.length){var s={};n=!0,i.forEach((function(e){s[e.value]=!0})),o.forEach((function(e){!0!==s[e.value]&&(e.isVisible=!1,i.push(e))})),this.setOptionsMethod(i,!0)}this.allowNewOption&&this.searchValue&&(i.some((function(t){return t.label.toLowerCase()===e.searchValue}))||(n=!0,this.setNewOption())),n?(this.setVisibleOptionsCount(),this.multiple&&this.toggleAllOptionsClass(),this.setValueText()):this.updatePosition(),this.setVisibleOptionsCount(),c.removeClass(this.$allWrappers,"server-searching")}},{key:"setSelectedOptions",value:function(){this.selectedOptions=this.options.filter((function(e){return e.isSelected}))}},{key:"setSortedOptions",value:function(){var e=f(this.options);this.showSelectedOptionsFirst&&this.selectedValues.length&&(e=this.hasOptionGroup?this.sortOptionsGroup(e):this.sortOptions(e)),this.sortedOptions=e}},{key:"setVisibleOptions",value:function(){var e=f(this.sortedOptions),t=2*this.optionsCount,o=this.getVisibleStartIndex(),i=this.getNewOption(),n=o+t-1,s=0;i&&(i.visibleIndex=s,s+=1),e=e.filter((function(e){var t=!1;return e.isVisible&&!e.isCurrentNew&&(t=s>=o&&s<=n,e.visibleIndex=s,s+=1),t})),i&&(e=[i].concat(f(e))),this.visibleOptions=e,this.visibleOptionsCount=e.length,this.renderOptions()}},{key:"setOptionsPosition",value:function(e){var t=parseInt((e||this.getVisibleStartIndex())*this.optionHeight);this.$options.style.transform="translate3d(0, ".concat(t,"px, 0)"),c.setData(this.$options,"top",t)}},{key:"setOptionsTooltip",value:function(){var e=this,t=this.getVisibleOptions(),o=this.hasOptionDescription;t.forEach((function(t){var i=e.$dropboxContainer.querySelector('.vscomp-option[data-index="'.concat(t.index,'"]'));c.setData(i.querySelector(".vscomp-option-text"),"tooltip",t.label),o&&c.setData(i.querySelector(".vscomp-option-description"),"tooltip",t.description)}))}},{key:"setValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.disableEvent,i=void 0!==o&&o,s=t.disableValidation,r=void 0!==s&&s;this.hasEmptyValueOption&&""===e||e?Array.isArray(e)?this.selectedValues=f(e):this.selectedValues=[e]:this.selectedValues=[];var a=this.getValue();this.$ele.value=a,this.$hiddenInput.value=this.getInputValue(a),this.isMaxValuesSelected=!!(this.maxValues&&this.maxValues<=this.selectedValues.length),this.toggleAllOptionsClass(),this.setValueText(),c.toggleClass(this.$allWrappers,"has-value",n.isNotEmpty(this.selectedValues)),c.toggleClass(this.$allWrappers,"max-value-selected",this.isMaxValuesSelected),r||this.validate(),i||c.dispatchEvent(this.$ele,"change",!0)}},{key:"setValueText",value:function(){var e=this,t=this.multiple,o=this.selectedValues,i=this.noOfDisplayValues,s=this.showValueAsTags,r=this.$valueText,a=this.selectedLabelRenderer,l=[],p=[],u=o.length,h=0,d=this.isAllSelected&&!this.hasServerSearch&&!this.disableAllOptionsSelectedText&&!s;if(d&&this.hideValueTooltipOnSelectAll)r.innerHTML="".concat(this.allOptionsSelectedText," (").concat(u,")");else{this.getSelectedOptions({fullDetails:!0,keepSelectionOrder:!0}).some((function(t){if(t.isCurrentNew)return!1;if(h>=i)return!0;var o=t.label;if("function"==typeof a&&(o=a(t)),l.push(o),h+=1,s){var c=n.willTextOverflow(r.parentElement,o)?e.getTooltipAttrText(o,!1,!0):"",u='<span class="vscomp-value-tag" data-index="'.concat(t.index,'" ').concat(c,'>\n                  <span class="vscomp-value-tag-content">').concat(o,'</span>\n                  <span class="vscomp-value-tag-clear-button">\n                    <i class="vscomp-clear-icon"></i>\n                  </span>\n                </span>');p.push(u)}else p.push(o);return!1}));var v=u-i;v>0&&p.push('<span class="vscomp-value-tag more-value-count">+ '.concat(v," ").concat(this.moreText,"</span>"));var f=l.join(", ");if(""===f)r.innerHTML=this.placeholder;else if(r.innerHTML=f,t){var m=this.maxValues;if(this.alwaysShowSelectedOptionsCount||c.hasEllipsis(r)||m||s){var b='<span class="vscomp-selected-value-count">'.concat(u,"</span>");if(m&&(b+=' / <span class="vscomp-max-value-count">'.concat(m,"</span>")),d)r.innerHTML="".concat(this.allOptionsSelectedText," (").concat(u,")");else if(s)r.innerHTML=p.join(""),this.$valueTags=r.querySelectorAll(".vscomp-value-tag"),this.setValueTagAttr();else if(!this.alwaysShowSelectedOptionsLabel){var y=1===u?this.optionSelectedText:this.optionsSelectedText;r.innerHTML="".concat(b," ").concat(y)}}else p=[]}}var g="";0===u?g=this.placeholder:s||(g=p.join(", ")),s||c.setData(r,"tooltip",g),t&&(s?this.updatePosition():c.setData(r,"tooltipEllipsisOnly",0===u))}},{key:"setSearchValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e!==this.searchValueOriginal||o){t||(this.$searchInput.value=e);var i=e.replace(/\\/g,"").toLowerCase().trim();this.searchValue=i,this.searchValueOriginal=e,c.toggleClass(this.$allWrappers,"has-search-value",e),this.afterSetSearchValue()}}},{key:"setVisibleOptionsCount",value:function(){var e,t=0,o=!1,i=this.searchGroup,s=this.showOptionsOnlyOnSearch,r=this.searchByStartsWith,a=this.searchValue;a=this.searchNormalize?n.normalizeString(a):a;var l=this.isOptionVisible.bind(this);this.hasOptionGroup&&(e=this.getVisibleOptionGroupsMapping(a)),this.options.forEach((function(n){var p;n.isCurrentNew||(s&&!a?(n.isVisible=!1,p={isVisible:!1,hasExactOption:!1}):p=l({data:n,searchValue:a,hasExactOption:o,visibleOptionGroupsMapping:e,searchGroup:i,searchByStartsWith:r}),p.isVisible&&(t+=1),o||(o=p.hasExactOption))})),this.allowNewOption&&(a&&!o?(this.setNewOption(),t+=1):this.removeNewOption()),this.visibleOptionsCount=t,this.afterSetVisibleOptionsCount()}},{key:"setOptionProp",value:function(e,t,o){this.options[e]&&(this.options[e][t]=o)}},{key:"setOptionsHeight",value:function(){this.$optionsList.style.height="".concat(this.optionHeight*this.visibleOptionsCount,"px")}},{key:"setOptionsContainerHeight",value:function(e){var t;e?this.showAsPopup&&(this.optionsCount=this.getOptionsCount(),this.halfOptionsCount=Math.ceil(this.optionsCount/2),t=this.getOptionsHeight(),this.optionsHeight=t):(t=this.optionsHeight,this.keepAlwaysOpen&&(c.setStyle(this.$noOptions,"height",t),c.setStyle(this.$noSearchResults,"height",t))),c.setStyle(this.$optionsContainer,"max-height",t),this.afterSetOptionsContainerHeight(e)}},{key:"setNewOption",value:function(e){var t=e||this.searchValueOriginal.trim();if(t){var o=this.getNewOption();if(o){var i=o.index;this.setOptionProp(i,"value",this.secureText(t)),this.setOptionProp(i,"label",this.secureText(t))}else{var n={value:t,label:t};e?(n.isNew=!0,this.newValues.push(t)):n.isCurrentNew=!0,this.addOption(n)}}}},{key:"setSelectedProp",value:function(){var e={};this.selectedValues.forEach((function(t){e[t]=!0})),this.options.forEach((function(t){!0===e[t.value]&&(t.isSelected=!0)}))}},{key:"setNewOptionsFromValue",value:function(e){if(e){var t=this.setNewOption.bind(this),o={};this.options.forEach((function(e){o[e.value]=!0})),e.forEach((function(e){e&&!0!==o[e]&&t(e)}))}}},{key:"setDropboxWrapperWidth",value:function(){if(!this.showAsPopup){var e=this.dropboxWidth||"".concat(this.$wrapper.offsetWidth,"px");c.setStyle(this.$dropboxContainer,"max-width",e)}}},{key:"setEleStyles",value:function(){var e=this.maxWidth,t={};e&&(t["max-width"]=e),c.setStyles(this.$ele,t)}},{key:"setDropboxStyles",value:function(){var e=this.dropboxWidth,t={},o={"z-index":this.zIndex};e&&(this.showAsPopup?t["max-width"]=e:o.width=e),c.setStyles(this.$dropboxContainer,o),c.setStyles(this.$dropbox,t)}},{key:"setOptionAttr",value:function(){var e=this.$visibleOptions,t=this.options,o="".concat(this.optionHeight,"px"),i=c.setStyle,n=c.getData,s=c.setData;e&&e.length&&e.forEach((function(e){var r=t[n(e,"index")];i(e,"height",o),s(e,"value",r.value)}))}},{key:"setValueTagAttr",value:function(){var e=this.$valueTags;if(e&&e.length){var t=c.getData,o=c.setData,i=this.options;e.forEach((function(e){var n=t(e,"index");if(void 0!==n){var s=i[n];o(e,"value",s.value)}}))}}},{key:"setScrollTop",value:function(){var e=this.selectedValues;if(!this.showSelectedOptionsFirst&&this.focusSelectedOptionOnOpen&&0!==e.length){var t,o={};e.forEach((function(e){o[e]=!0})),this.options.some((function(e){return!!o[e.value]&&(t=e.visibleIndex,!0)})),t&&(this.$optionsContainer.scrollTop=this.optionHeight*t)}}},{key:"getVisibleOptions",value:function(){return this.visibleOptions||[]}},{key:"getValue",value:function(){return this.multiple?this.useGroupValue?this.getGroupValue():this.selectedValues:this.selectedValues[0]||""}},{key:"getGroupValue",value:function(){var e=[],t={};return this.options.forEach((function(o){if(o.isSelected){var i=o.value;o.isGroupTitle?i&&(t[o.index]=!0,e.push(i)):!0!==t[o.groupIndex]&&e.push(i)}})),e}},{key:"getInputValue",value:function(e){var t=e;return t&&t.length?this.setValueAsArray&&this.multiple&&(t=JSON.stringify(t)):t=this.emptyValue,t}},{key:"getFirstVisibleOptionIndex",value:function(){return Math.ceil(this.$optionsContainer.scrollTop/this.optionHeight)}},{key:"getVisibleStartIndex",value:function(){var e=this.getFirstVisibleOptionIndex()-this.halfOptionsCount;return e<0&&(e=0),e}},{key:"getTooltipAttrText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={"data-tooltip":(n.containsHTML(e)?n.replaceDoubleQuotesWithHTML(e):e)||"","data-tooltip-enter-delay":this.tooltipEnterDelay,"data-tooltip-z-index":this.zIndex,"data-tooltip-font-size":this.tooltipFontSize,"data-tooltip-alignment":this.tooltipAlignment,"data-tooltip-max-width":this.tooltipMaxWidth,"data-tooltip-ellipsis-only":t,"data-tooltip-allow-html":o};return c.getAttributesText(i)}},{key:"getOptionObj",value:function(e){if(e){var t=n.getString,o=this.secureText.bind(this);return{index:e.index,value:o(t(e.value)),label:o(t(e.label)),description:o(t(e.description)),alias:this.getAlias(e.alias),isCurrentNew:e.isCurrentNew||!1,isNew:e.isNew||!1,isVisible:!0}}}},{key:"getNewOption",value:function(){var e=this.options[this.lastOptionIndex];if(e&&e.isCurrentNew)return e}},{key:"getOptionIndex",value:function(e){var t;return this.options.some((function(o){return o.value===e&&(t=o.index,!0)})),t}},{key:"getNewValue",value:function(){var e={};this.newValues.forEach((function(t){e[t]=!0}));var t=this.selectedValues.filter((function(t){return!0===e[t]}));return this.multiple?t:t[0]}},{key:"getAlias",value:function(e){var t=e;return t&&(t=(t=Array.isArray(t)?t.join(","):t.toString().trim()).toLowerCase()),t||""}},{key:"getDisplayValue",value:function(){var e=[];return this.options.forEach((function(t){t.isSelected&&e.push(t.label)})),this.multiple?e:e[0]||""}},{key:"getSelectedOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fullDetails,o=void 0!==t&&t,i=e.keepSelectionOrder,n=void 0!==i&&i,s=this.valueKey,r=this.labelKey,a=this.selectedValues,l=[];if(this.options.forEach((function(e){if(e.isSelected&&!e.isGroupTitle)if(o)l.push(e);else{var t,i=(d(t={},s,e.value),d(t,r,e.label),t);e.isNew&&(i.isNew=!0),e.customData&&(i.customData=e.customData),l.push(i)}})),n){var p={};a.forEach((function(e,t){p[e]=t})),l.sort((function(e,t){return p[e.value]-p[t.value]}))}return this.multiple||o?l:l[0]}},{key:"getDisabledOptions",value:function(){var e=this.valueKey,t=this.labelKey,o=this.disabledOptions,i={},n=[];return o.forEach((function(e){i[e]=!0})),this.options.forEach((function(o){var s,r=o.value,a=o.label;i[r]&&n.push((d(s={},e,r),d(s,t,a),s))})),n}},{key:"getVisibleOptionGroupsMapping",value:function(e){var t=this.options,o={},i=this.isOptionVisible.bind(this);return(t=this.structureOptionGroup(t)).forEach((function(t){o[t.index]=t.options.some((function(t){return i({data:t,searchValue:e}).isVisible}))})),o}},{key:"getOptionsCount",value:function(e){var t;if(this.showAsPopup){var o=80*window.innerHeight/100-48;this.hasSearchContainer&&(o-=40),t=Math.floor(o/this.optionHeight)}else t=parseInt(e);return t}},{key:"getOptionsHeight",value:function(){return"".concat(this.optionsCount*this.optionHeight,"px")}},{key:"getSibling",value:function(e,t){var o="next"===t?"nextElementSibling":"previousElementSibling",i=e;do{i&&(i=i[o])}while(c.hasClass(i,"disabled")||c.hasClass(i,"group-title"));return i}},{key:"getUniqueId",value:function(){var e=n.getRandomInt(1e4);return document.querySelector("#vscomp-ele-wrapper-".concat(e))?this.getUniqueId():e}},{key:"initDropboxPopover",value:function(){var e={ele:this.$ele,target:this.$dropboxContainer,position:this.position,zIndex:this.zIndex,margin:4,transitionDistance:30,hideArrowIcon:!0,disableManualAction:!0,disableUpdatePosition:!this.hasDropboxWrapper,updatePositionThrottle:this.updatePositionThrottle,afterShow:this.afterShowPopper.bind(this),afterHide:this.afterHidePopper.bind(this)};this.dropboxPopover=new PopoverComponent(e)}},{key:"openDropbox",value:function(e){this.isSilentOpen=e,e?c.setStyle(this.$dropboxContainer,"display","inline-flex"):(c.dispatchEvent(this.$ele,"beforeOpen"),c.setAria(this.$wrapper,"expanded",!0)),this.setDropboxWrapperWidth(),c.removeClass(this.$allWrappers,"closed"),c.changeTabIndex(this.$allWrappers,0),this.dropboxPopover&&!e?this.dropboxPopover.show():this.afterShowPopper()}},{key:"afterShowPopper",value:function(){var e=this.isSilentOpen;this.isSilentOpen=!1,e||(this.moveSelectedOptionsFirst(),this.setScrollTop(),c.addClass(this.$allWrappers,"focused"),this.showAsPopup?(c.addClass(this.$body,"vscomp-popup-active"),this.isPopupActive=!0):this.focusElementOnOpen(),c.dispatchEvent(this.$ele,"afterOpen"))}},{key:"closeDropbox",value:function(e){this.isSilentClose=e,this.keepAlwaysOpen?this.removeOptionFocus():(e?c.setStyle(this.$dropboxContainer,"display",""):(c.dispatchEvent(this.$ele,"beforeClose"),c.setAria(this.$wrapper,"expanded",!1),c.setAria(this.$wrapper,"activedescendant","")),this.$wrapper.focus(),this.dropboxPopover&&!e?this.dropboxPopover.hide():this.afterHidePopper())}},{key:"afterHidePopper",value:function(){var e=this.isSilentClose;this.isSilentClose=!1,c.removeClass(this.$allWrappers,"focused"),this.removeOptionFocus(),!e&&this.isPopupActive&&(c.removeClass(this.$body,"vscomp-popup-active"),this.isPopupActive=!1),c.addClass(this.$allWrappers,"closed"),e||(c.dispatchEvent(this.$ele,"afterClose"),(this.initialSelectedValue&&0===this.initialSelectedValue.length||this.selectedValues.length>0)&&this.focus())}},{key:"moveSelectedOptionsFirst",value:function(){this.showSelectedOptionsFirst&&(this.setSortedOptions(),this.$optionsContainer.scrollTop&&this.selectedValues.length?this.scrollToTop():this.setVisibleOptions())}},{key:"toggleDropbox",value:function(){this.isOpened()?this.closeDropbox():this.openDropbox()}},{key:"updatePosition",value:function(){this.dropboxPopover&&this.isOpened()&&this.$ele.updatePosition()}},{key:"isOpened",value:function(){return!c.hasClass(this.$wrapper,"closed")}},{key:"focusSearchInput",value:function(){var e=this.$searchInput;e&&e.focus()}},{key:"focusElementOnOpen",value:function(){var e=this.$searchInput,t=!this.options.length&&!this.hasServerSearch;if(e)t&&!this.allowNewOption?(c.setAttr(e,"disabled",""),this.$noOptions.focus()):(e.removeAttribute("disabled"),e.focus());else{var o=this.$dropbox.querySelector('[tabindex="0"]');void 0!==c.getData(o,"index")?this.focusOption({direction:"next"}):o?o.focus():this.focusFirstVisibleOption()}}},{key:"focusFirstVisibleOption",value:function(){var e=this.$optionsContainer.querySelector("[data-index='".concat(this.getFirstVisibleOptionIndex(),"']"));e?(c.hasClass(e,"group-title")&&(e=this.getSibling(e,"next")),c.setAttr(e,"tabindex","0"),this.$optionsContainer.scrollTop=this.optionHeight*this.getFirstVisibleOptionIndex(),this.focusOption({focusFirst:!0}),e.focus()):(e=this.$dropbox.querySelector('[tabindex="0"]'))&&e.focus()}},{key:"focusOption",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.direction,i=t.$option,n=t.focusFirst,s=this.$dropboxContainer.querySelector(".vscomp-option.focused");if(i)e=i;else if(!s||n){var r=this.getFirstVisibleOptionIndex();e=this.$dropboxContainer.querySelector('.vscomp-option[data-visible-index="'.concat(r,'"]')),(c.hasClass(e,"disabled")||c.hasClass(e,"group-title"))&&(e=this.getSibling(e,"next"))}else e=this.getSibling(s,o);e&&e!==s&&(s&&this.toggleOptionFocusedState(s,!1),this.toggleOptionFocusedState(e,!0),this.toggleFocusedProp(c.getData(e,"index"),!0),this.moveFocusedOptionToView(e))}},{key:"moveFocusedOptionToView",value:function(e){var t=e||this.$dropboxContainer.querySelector(".vscomp-option.focused");if(t){var o,i=this.$optionsContainer.getBoundingClientRect(),n=t.getBoundingClientRect(),s=i.top,r=i.bottom,a=i.height,l=n.top,p=n.bottom,u=n.height,h=t.offsetTop,d=c.getData(this.$options,"top","number");s>l?o=h+d:r<p&&(o=h-a+u+d),void 0!==o&&(this.$optionsContainer.scrollTop=o)}}},{key:"removeOptionFocus",value:function(){var e=this.$dropboxContainer.querySelector(".vscomp-option.focused");e&&(this.toggleOptionFocusedState(e,!1),this.toggleFocusedProp(null))}},{key:"selectOption",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).event;if(e){var o=!c.hasClass(e,"selected");if(o){if(this.multiple&&this.isMaxValuesSelected)return}else if(!this.multiple)return void this.closeDropbox();var i=this.selectedValues,s=c.getData(e,"value"),r=c.getData(e,"index","number"),a=c.hasClass(e,"current-new"),l=!1,p=this.lastSelectedOptionIndex;if(this.lastSelectedOptionIndex=null,this.toggleSelectedProp(r,o),o){if(this.multiple)i.push(s),this.toggleAllOptionsClass(),this.toggleGroupOptionsParent(e),t&&t.shiftKey&&(l=!0);else{i.length&&this.toggleSelectedProp(this.getOptionIndex(i[0]),!1),i=[s];var u=this.$dropboxContainer.querySelector(".vscomp-option.selected");u&&this.toggleOptionSelectedState(u,!1),this.closeDropbox(),a||this.setSearchValue("")}this.lastSelectedOptionIndex=r,this.toggleOptionSelectedState(e)}else this.multiple&&(this.toggleOptionSelectedState(e),n.removeItemFromArray(i,s),this.toggleAllOptionsClass(!1),this.toggleGroupOptionsParent(e,!1));a&&this.beforeSelectNewValue(),this.setValue(i),l&&this.selectRangeOptions(p,r)}}},{key:"selectFocusedOption",value:function(){this.selectOption(this.$dropboxContainer.querySelector(".vscomp-option.focused"))}},{key:"selectRangeOptions",value:function(e,t){var o=this;if("number"==typeof e&&!this.maxValues){var i,n,s=this.selectedValues,r=this.hasOptionGroup,a={};if(e<t?(i=e,n=t):(i=t,n=e),this.options.forEach((function(e){if(!e.isDisabled&&!e.isGroupTitle&&e.isVisible&&!e.isSelected){var t=e.index;if(t>i&&t<n){if(r){var o=e.groupIndex;"number"==typeof o&&(a[o]=!0)}e.isSelected=!0,s.push(e.value)}}})),this.toggleAllOptionsClass(),this.setValue(s),(a=Object.keys(a)).length){var l=this.toggleGroupTitleProp.bind(this);a.forEach((function(e){l(parseInt(e))}))}setTimeout((function(){o.renderOptions()}),0)}}},{key:"toggleAllOptions",value:function(e){if(this.multiple&&!this.disableSelectAll){var t="boolean"==typeof isSelected?e:!c.hasClass(this.$toggleAllCheckbox,"checked"),o=[],i=this.selectAllOnlyVisible;this.options.forEach((function(e){var n=e;if(!n.isDisabled&&!n.isCurrentNew){var s=n.isVisible,r=n.isSelected;!t&&(!i||s||!r)||t&&i&&!s&&!r?n.isSelected=!1:(n.isSelected=!0,n.isGroupTitle||o.push(n.value))}})),this.toggleAllOptionsClass(t),this.setValue(o),this.renderOptions()}}},{key:"toggleAllOptionsClass",value:function(e){if(this.multiple){var t=!1;"boolean"==typeof e||(e=this.isAllOptionsSelected()),!e&&this.selectAllOnlyVisible&&""!==this.searchValue&&(this.visibleOptionsCount>0||""===this.searchValue)&&(t=this.isAllOptionsSelected(!0)),c.toggleClass(this.$toggleAllCheckbox,"checked",e||t),this.isAllSelected=e}}},{key:"isAllOptionsSelected",value:function(e){var t=!1;return this.options.length&&this.selectedValues.length&&(t=!this.options.some((function(t){return!t.isSelected&&!t.isDisabled&&!t.isGroupTitle&&(!e||t.isVisible)}))),t}},{key:"isAllGroupOptionsSelected",value:function(e){var t=!1;return this.options.length&&(t=!this.options.some((function(t){return!t.isSelected&&!t.isDisabled&&!t.isGroupTitle&&t.groupIndex===e}))),t}},{key:"toggleGroupOptionsParent",value:function(e,t){if(this.hasOptionGroup&&!this.disableOptionGroupCheckbox&&e){var o=c.getData(e,"groupIndex");void 0!==o&&(o=parseInt(o));var i=this.$options.querySelector('.vscomp-option[data-index="'.concat(o,'"]')),n="boolean"==typeof t?t:this.isAllGroupOptionsSelected(o);this.toggleGroupTitleCheckbox(i,n),this.toggleGroupTitleProp(o,n)}}},{key:"toggleGroupTitleProp",value:function(e,t){var o="boolean"==typeof t?t:this.isAllGroupOptionsSelected(e);this.toggleSelectedProp(e,o)}},{key:"toggleGroupOptions",value:function(e,t){var o=this;if(this.hasOptionGroup&&!this.disableOptionGroupCheckbox&&e){var i=c.getData(e,"index","number"),s=this.selectedValues,r=this.selectAllOnlyVisible,a={},l=n.removeItemFromArray;s.forEach((function(e){a[e]=!0})),this.options.forEach((function(e){if(!e.isDisabled&&e.groupIndex===i){var o=e.value;!t||r&&!e.isVisible?(e.isSelected=!1,a[o]&&l(s,o)):(e.isSelected=!0,a[o]||s.push(o))}})),this.toggleAllOptionsClass(!!t&&null),this.setValue(s),setTimeout((function(){o.renderOptions()}),0)}}},{key:"toggleGroupTitleCheckbox",value:function(e,t){if(e){var o=c.getData(e,"index","number");this.toggleSelectedProp(o,t),this.toggleOptionSelectedState(e,t)}}},{key:"toggleFocusedProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.focusedOptionIndex&&this.setOptionProp(this.focusedOptionIndex,"isFocused",!1),this.setOptionProp(e,"isFocused",t),this.focusedOptionIndex=e}},{key:"toggleSelectedProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.setOptionProp(e,"isSelected",t)}},{key:"scrollToTop",value:function(){var e=!this.isOpened();e&&this.openDropbox(!0),this.$optionsContainer.scrollTop>0&&(this.$optionsContainer.scrollTop=0),e&&this.closeDropbox(!0)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.options.forEach((function(e){e.isSelected=!1})),this.beforeValueSet(!0),this.setValue(null,{disableEvent:t,disableValidation:e}),this.afterValueSet(),e&&c.removeClass(this.$allWrappers,"has-error"),c.dispatchEvent(this.$ele,"reset")}},{key:"addOption",value:function(e,t){if(e){this.lastOptionIndex+=1;var o=this.getOptionObj(h(h({},e),{},{index:this.lastOptionIndex}));this.options.push(o),this.sortedOptions.push(o),t&&(this.visibleOptionsCount+=1,this.afterSetOptions())}}},{key:"removeOption",value:function(e){(e||0===e)&&(this.options.splice(e,1),this.lastOptionIndex-=1)}},{key:"removeNewOption",value:function(){var e=this.getNewOption();e&&this.removeOption(e.index)}},{key:"sortOptions",value:function(e){return e.sort((function(e,t){var o=e.isSelected||e.isAnySelected,i=t.isSelected||t.isAnySelected;return o||i?o&&(!i||e.index<t.index)?-1:1:0}))}},{key:"sortOptionsGroup",value:function(e){var t=this.sortOptions.bind(this),o=this.structureOptionGroup(e);return o.forEach((function(e){var o=e.options;e.isAnySelected=o.some((function(e){return e.isSelected})),e.isAnySelected&&t(o)})),t(o),this.destructureOptionGroup(o)}},{key:"isOptionVisible",value:function(e){var t=e.data,o=e.searchValue,i=e.hasExactOption,n=e.visibleOptionGroupsMapping,s=e.searchGroup,r=e.searchByStartsWith,a=t.value.toLowerCase(),l=this.searchNormalize?t.labelNormalized:t.label.toLowerCase(),p=t.description,c=t.alias,u=r?l.startsWith(o):l.includes(o);return!t.isGroupTitle||s&&u||(u=n[t.index]),r||!c||u||(u=c.includes(o)),r||!p||u||(u=p.toLowerCase().includes(o)),t.isVisible=u,i||(i=l===o||a===o),{isVisible:u,hasExactOption:i}}},{key:"structureOptionGroup",value:function(e){var t=[],o={};return e.forEach((function(e){if(e.isGroupTitle){var i=[];e.options=i,o[e.index]=i,t.push(e)}})),e.forEach((function(e){e.isGroupOption&&o[e.groupIndex].push(e)})),t}},{key:"destructureOptionGroup",value:function(e){var t=[];return e.forEach((function(e){t.push(e),t=t.concat(e.options)})),t}},{key:"serverSearch",value:function(){c.removeClass(this.$allWrappers,"has-no-search-results"),c.addClass(this.$allWrappers,"server-searching"),this.setSelectedOptions(),this.onServerSearch(this.searchValue,this)}},{key:"removeValue",value:function(e){var t=this.selectedValues,o=c.getData(e,"value");n.removeItemFromArray(t,o),this.setValueMethod(t)}},{key:"focus",value:function(){this.$wrapper.focus()}},{key:"enable",value:function(){this.$ele.disabled=!1,this.$ele.removeAttribute("disabled"),this.$hiddenInput.removeAttribute("disabled"),c.setAria(this.$wrapper,"disabled",!1),c.changeTabIndex(this.$wrapper,0)}},{key:"disable",value:function(){this.$ele.disabled=!0,this.$ele.setAttribute("disabled",""),this.$hiddenInput.setAttribute("disabled",""),c.setAria(this.$wrapper,"disabled",!0),c.changeTabIndex(this.$wrapper,-1),this.$wrapper.blur()}},{key:"validate",value:function(){if(this.disableValidation)return!0;var e=!1,t=this.selectedValues,o=this.minValues;return this.required&&(n.isEmpty(t)||this.multiple&&o&&t.length<o)&&(e=!0),c.toggleClass(this.$allWrappers,"has-error",e),!e}},{key:"destroy",value:function(){var e=this.$ele;e.virtualSelect=void 0,e.value=void 0,e.innerHTML="",this.hasDropboxWrapper&&(this.$dropboxWrapper.remove(),this.removeEvents()),this.dropboxPopover&&this.dropboxPopover.destroy(),c.removeClass(e,"vscomp-ele")}},{key:"createSecureTextElements",value:function(){this.$secureDiv=document.createElement("div"),this.$secureText=document.createTextNode(""),this.$secureDiv.appendChild(this.$secureText)}},{key:"secureText",value:function(e){return e&&this.enableSecureText?(this.$secureText.nodeValue=e,this.$secureDiv.innerHTML):e}},{key:"toggleRequired",value:function(e){this.required=n.convertToBoolean(e),this.$ele.required=this.required}},{key:"toggleOptionSelectedState",value:function(e,t){var o=t;void 0===o&&(o=!c.hasClass(e,"selected")),c.toggleClass(e,"selected",o),c.setAria(e,"selected",o)}},{key:"toggleOptionFocusedState",value:function(e,t){e&&(c.toggleClass(e,"focused",t),c.setAttr(e,"tabindex",t?"0":"-1"),document.activeElement!==this.$searchInput&&e.focus(),t&&c.setAria(this.$wrapper,"activedescendant",e.id))}}],i=[{key:"init",value:function(t){var o=t.ele;if(o){var i=!1;if("string"==typeof o){var n=(o=document.querySelectorAll(o)).length;if(0===n)return;1===n&&(i=!0)}void 0!==o.length&&void 0!==o.forEach||(o=[o],i=!0);var s=[];return o.forEach((function(o){o.virtualSelect?s.push(o.virtualSelect):(t.ele=o,"SELECT"===o.tagName&&e.setPropsFromSelect(t),s.push(new e(t)))})),i?s[0]:s}}},{key:"getAttrProps",value:function(){var e=c.convertPropToDataAttr,t={};return O.forEach((function(e){t[e]=e})),k.forEach((function(o){t[e(o)]=o})),t}},{key:"setPropsFromSelect",value:function(e){var t=e.ele,o=[],i=[],n=function e(t){var n=[];return Array.from(t.children).forEach((function(t){var s=t.value,r={value:s};"OPTGROUP"===t.tagName?(r.label=t.getAttribute("label"),r.options=e(t)):r.label=t.innerHTML,n.push(r),t.disabled&&o.push(s),t.selected&&i.push(s)})),n}(t),s=document.createElement("div");c.setAttrFromEle(t,s,Object.keys(x),S),t.parentNode.insertBefore(s,t),t.remove(),e.ele=s,e.options=n,e.disabledOptions=o,e.selectedValue=i}},{key:"onFormReset",value:function(e){var t=e.target.closest("form");t&&t.querySelectorAll(".vscomp-ele-wrapper").forEach((function(e){e.parentElement.virtualSelect.reset(!0)}))}},{key:"onFormSubmit",value:function(t){e.validate(t.target.closest("form"))||t.preventDefault()}},{key:"validate",value:function(e){if(!e)return!0;var t=!1;return e.querySelectorAll(".vscomp-ele-wrapper").forEach((function(e){var o=e.parentElement.virtualSelect.validate();t||o||(t=!0)})),!t}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.virtualSelect.reset(e,t)}},{key:"setValueMethod",value:function(){var e;(e=this.virtualSelect).setValueMethod.apply(e,arguments)}},{key:"setOptionsMethod",value:function(){var e;(e=this.virtualSelect).setOptionsMethod.apply(e,arguments)}},{key:"setDisabledOptionsMethod",value:function(){var e;(e=this.virtualSelect).setDisabledOptionsMethod.apply(e,arguments)}},{key:"setEnabledOptionsMethod",value:function(){var e;(e=this.virtualSelect).setEnabledOptionsMethod.apply(e,arguments)}},{key:"toggleSelectAll",value:function(e){this.virtualSelect.toggleAllOptions(e)}},{key:"isAllSelected",value:function(){return this.virtualSelect.isAllSelected}},{key:"addOptionMethod",value:function(e){this.virtualSelect.addOption(e,!0)}},{key:"getNewValueMethod",value:function(){return this.virtualSelect.getNewValue()}},{key:"getDisplayValueMethod",value:function(){return this.virtualSelect.getDisplayValue()}},{key:"getSelectedOptionsMethod",value:function(e){return this.virtualSelect.getSelectedOptions(e)}},{key:"getDisabledOptionsMethod",value:function(){return this.virtualSelect.getDisabledOptions()}},{key:"openMethod",value:function(){return this.virtualSelect.openDropbox()}},{key:"closeMethod",value:function(){return this.virtualSelect.closeDropbox()}},{key:"focusMethod",value:function(){return this.virtualSelect.focus()}},{key:"enableMethod",value:function(){return this.virtualSelect.enable()}},{key:"disableMethod",value:function(){return this.virtualSelect.disable()}},{key:"destroyMethod",value:function(){return this.virtualSelect.destroy()}},{key:"validateMethod",value:function(){return this.virtualSelect.validate()}},{key:"toggleRequiredMethod",value:function(e){return this.virtualSelect.toggleRequired(e)}},{key:"onResizeMethod",value:function(){document.querySelectorAll(".vscomp-ele-wrapper").forEach((function(e){e.parentElement.virtualSelect.onResize()}))}}],o&&y(t.prototype,o),i&&y(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();document.addEventListener("reset",E.onFormReset),document.addEventListener("submit",E.onFormSubmit),window.addEventListener("resize",E.onResizeMethod),x=E.getAttrProps(),window.VirtualSelect=E,"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}(),function(){"use strict";function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=e[o];return i}var o=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o;return o=[{key:"addClass",value:function(o,i){o&&(i=i.split(" "),t.getElements(o).forEach((function(t){var o;(o=t.classList).add.apply(o,e(i))})))}},{key:"removeClass",value:function(o,i){o&&(i=i.split(" "),t.getElements(o).forEach((function(t){var o;(o=t.classList).remove.apply(o,e(i))})))}},{key:"getElements",value:function(e){if(e)return void 0===e.forEach&&(e=[e]),e}},{key:"getMoreVisibleSides",value:function(e){if(!e)return{};var t=e.getBoundingClientRect(),o=window.innerWidth,i=window.innerHeight,n=t.left,s=t.top;return{horizontal:n>o-n-t.width?"left":"right",vertical:s>i-s-t.height?"top":"bottom"}}},{key:"getAbsoluteCoords",value:function(e){if(e){var t=e.getBoundingClientRect(),o=window.pageXOffset,i=window.pageYOffset;return{width:t.width,height:t.height,top:t.top+i,right:t.right+o,bottom:t.bottom+i,left:t.left+o}}}},{key:"getCoords",value:function(e){return e?e.getBoundingClientRect():{}}},{key:"getData",value:function(e,t,o){if(e){var i=e?e.dataset[t]:"";return"number"===o?i=parseFloat(i)||0:"true"===i?i=!0:"false"===i&&(i=!1),i}}},{key:"setData",value:function(e,t,o){e&&(e.dataset[t]=o)}},{key:"setStyle",value:function(e,t,o){e&&(e.style[t]=o)}},{key:"show",value:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";t.setStyle(e,"display",o)}},{key:"hide",value:function(e){t.setStyle(e,"display","none")}},{key:"getHideableParent",value:function(e){for(var t,o=e.parentElement;o;){var i=getComputedStyle(o).overflow;if(-1!==i.indexOf("scroll")||-1!==i.indexOf("auto")){t=o;break}o=o.parentElement}return t}}],o&&function(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(t,o),t}(),i=["top","bottom","left","right"].map((function(e){return"position-".concat(e)})),n={top:"rotate(180deg)",left:"rotate(90deg)",right:"rotate(-90deg)"},s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this.setProps(t),this.init()}catch(e){console.warn("Couldn't initiate popper"),console.error(e)}}var t;return t=[{key:"init",value:function(){var e=this.$popperEle;e&&this.$triggerEle&&(o.setStyle(e,"zIndex",this.zIndex),this.setPosition())}},{key:"setProps",value:function(e){var t=(e=this.setDefaultProps(e)).position?e.position.toLowerCase():"auto";if(this.$popperEle=e.$popperEle,this.$triggerEle=e.$triggerEle,this.$arrowEle=e.$arrowEle,this.margin=parseFloat(e.margin),this.offset=parseFloat(e.offset),this.enterDelay=parseFloat(e.enterDelay),this.exitDelay=parseFloat(e.exitDelay),this.showDuration=parseFloat(e.showDuration),this.hideDuration=parseFloat(e.hideDuration),this.transitionDistance=parseFloat(e.transitionDistance),this.zIndex=parseFloat(e.zIndex),this.afterShowCallback=e.afterShow,this.afterHideCallback=e.afterHide,this.hasArrow=!!this.$arrowEle,-1!==t.indexOf(" ")){var o=t.split(" ");this.position=o[0],this.secondaryPosition=o[1]}else this.position=t}},{key:"setDefaultProps",value:function(e){return Object.assign({position:"auto",margin:8,offset:5,enterDelay:0,exitDelay:0,showDuration:300,hideDuration:200,transitionDistance:10,zIndex:1},e)}},{key:"setPosition",value:function(){o.show(this.$popperEle,"inline-flex");var e,t,s,r=window.innerWidth,a=window.innerHeight,l=o.getAbsoluteCoords(this.$popperEle),p=o.getAbsoluteCoords(this.$triggerEle),c=l.width,u=l.height,h=l.top,d=l.right,v=l.bottom,f=l.left,m=p.width,b=p.height,y=p.top,g=p.right,x=p.bottom,w=p.left,S=y-h,O=w-f,k=O,E=S,C=this.position,$=this.secondaryPosition,D=m/2-c/2,T=b/2-u/2,A=this.margin,V=this.transitionDistance,P=window.scrollY-h,I=a+P,M=window.scrollX-f,L=r+M,F=this.offset;F&&(P+=F,I-=F,M+=F,L-=F),"auto"===C&&(C=o.getMoreVisibleSides(this.$triggerEle).vertical);var j={top:{top:E-u-A,left:k+D},bottom:{top:E+b+A,left:k+D},right:{top:E+T,left:k+m+A},left:{top:E+T,left:k-c-A}},H=j[C];if(E=H.top,k=H.left,$&&("top"===$?E=S:"bottom"===$?E=S+b-u:"left"===$?k=O:"right"===$&&(k=O+m-c)),k<M?"left"===C?s="right":k=M+f>g?g-f:M:k+c>L&&("right"===C?s="left":k=L+f<w?w-d:L-c),E<P?"top"===C?s="bottom":E=P+h>x?x-h:P:E+u>I&&("bottom"===C?s="top":E=I+h<y?y-v:I-u),s){var z=j[s];"top"===(C=s)||"bottom"===C?E=z.top:"left"!==C&&"right"!==C||(k=z.left)}"top"===C?(e=E+V,t=k):"right"===C?(e=E,t=k-V):"left"===C?(e=E,t=k+V):(e=E-V,t=k);var B="translate3d(".concat(parseInt(t),"px, ").concat(parseInt(e),"px, 0)");if(o.setStyle(this.$popperEle,"transform",B),o.setData(this.$popperEle,"fromLeft",t),o.setData(this.$popperEle,"fromTop",e),o.setData(this.$popperEle,"top",E),o.setData(this.$popperEle,"left",k),o.removeClass(this.$popperEle,i.join(" ")),o.addClass(this.$popperEle,"position-".concat(C)),this.hasArrow){var N=0,W=0,q=k+f,G=E+h,R=this.$arrowEle.offsetWidth/2,K=n[C]||"";"top"===C||"bottom"===C?(N=m/2+w-q)<R?N=R:N>c-R&&(N=c-R):"left"!==C&&"right"!==C||((W=b/2+y-G)<R?W=R:W>u-R&&(W=u-R)),o.setStyle(this.$arrowEle,"transform","translate3d(".concat(parseInt(N),"px, ").concat(parseInt(W),"px, 0) ").concat(K))}o.hide(this.$popperEle)}},{key:"resetPosition",value:function(){o.setStyle(this.$popperEle,"transform","none"),this.setPosition()}},{key:"show",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.resetPosition,n=t.data;clearTimeout(this.exitDelayTimeout),clearTimeout(this.hideDurationTimeout),i&&this.resetPosition(),this.enterDelayTimeout=setTimeout((function(){var t=o.getData(e.$popperEle,"left"),i=o.getData(e.$popperEle,"top"),s="translate3d(".concat(parseInt(t),"px, ").concat(parseInt(i),"px, 0)"),r=e.showDuration;o.show(e.$popperEle,"inline-flex"),o.getCoords(e.$popperEle),o.setStyle(e.$popperEle,"transitionDuration",r+"ms"),o.setStyle(e.$popperEle,"transform",s),o.setStyle(e.$popperEle,"opacity",1),e.showDurationTimeout=setTimeout((function(){"function"==typeof e.afterShowCallback&&e.afterShowCallback(n)}),r)}),this.enterDelay)}},{key:"hide",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).data;clearTimeout(this.enterDelayTimeout),clearTimeout(this.showDurationTimeout),this.exitDelayTimeout=setTimeout((function(){if(e.$popperEle){var i=parseInt(o.getData(e.$popperEle,"fromLeft")),n=parseInt(o.getData(e.$popperEle,"fromTop")),s="translate3d(".concat(i,"px, ").concat(n,"px, 0)"),r=e.hideDuration;o.setStyle(e.$popperEle,"transitionDuration",r+"ms"),o.setStyle(e.$popperEle,"transform",s),o.setStyle(e.$popperEle,"opacity",0),e.hideDurationTimeout=setTimeout((function(){o.hide(e.$popperEle),"function"==typeof e.afterHideCallback&&e.afterHideCallback(t)}),r)}}),this.exitDelay)}},{key:"updatePosition",value:function(){o.setStyle(this.$popperEle,"transitionDuration","0ms"),this.resetPosition();var e=parseInt(o.getData(this.$popperEle,"left")),t=parseInt(o.getData(this.$popperEle,"top"));o.show(this.$popperEle,"inline-flex"),o.setStyle(this.$popperEle,"transform","translate3d(".concat(e,"px, ").concat(t,"px, 0)"))}}],t&&function(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t),e}();window.PopperComponent=s}(),function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(t){var o=function(t,o){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(o)?o:o+""}var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},o=[{key:"convertToBoolean",value:function(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&arguments.length>1&&void 0!==arguments[1]&&arguments[1]}},{key:"removeArrayEmpty",value:function(e){return Array.isArray(e)&&e.length?e.filter((function(e){return!!e})):[]}},{key:"throttle",value:function(e,t){var o,i=0;return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];var a=(new Date).getTime(),l=t-(a-i);clearTimeout(o),l<=0?(i=a,e.apply(void 0,s)):o=setTimeout((function(){e.apply(void 0,s)}),l)}}}],o&&t(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,o}();function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function s(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=e[o];return i}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,o=[{key:"addClass",value:function(t,o){t&&(o=o.split(" "),e.getElements(t).forEach((function(e){var t;(t=e.classList).add.apply(t,s(o))})))}},{key:"removeClass",value:function(t,o){t&&(o=o.split(" "),e.getElements(t).forEach((function(e){var t;(t=e.classList).remove.apply(t,s(o))})))}},{key:"hasClass",value:function(e,t){return!!e&&e.classList.contains(t)}},{key:"getElement",value:function(e){return e&&("string"==typeof e?e=document.querySelector(e):void 0!==e.length&&(e=e[0])),e||null}},{key:"getElements",value:function(e){if(e)return void 0===e.forEach&&(e=[e]),e}},{key:"addEvent",value:function(t,o,i){e.addOrRemoveEvent(t,o,i,"add")}},{key:"removeEvent",value:function(t,o,i){e.addOrRemoveEvent(t,o,i,"remove")}},{key:"addOrRemoveEvent",value:function(t,o,n,s){t&&(o=i.removeArrayEmpty(o.split(" "))).forEach((function(o){(t=e.getElements(t)).forEach((function(e){"add"===s?e.addEventListener(o,n):e.removeEventListener(o,n)}))}))}},{key:"getScrollableParents",value:function(e){if(!e)return[];for(var t=[window],o=e.parentElement;o;){var i=getComputedStyle(o).overflow;-1===i.indexOf("scroll")&&-1===i.indexOf("auto")||t.push(o),o=o.parentElement}return t}},{key:"convertPropToDataAttr",value:function(e){return e?"data-popover-".concat(e).replace(/([A-Z])/g,"-$1").toLowerCase():""}}],o&&function(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o}();function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function c(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i)}}function u(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,"string");if("object"!=p(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}var h,d={27:"onEscPress"},v=["target","position","margin","offset","enterDelay","exitDelay","showDuration","hideDuration","transitionDistance","updatePositionThrottle","zIndex","hideOnOuterClick","showOnHover","hideArrowIcon","disableManualAction","disableUpdatePosition"],f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this.setProps(t),this.init()}catch(e){console.warn("Couldn't initiate Popover component"),console.error(e)}}return t=e,n=[{key:"init",value:function(t){var o=t.ele;if(o){var i=!1;if("string"==typeof o){if(!(o=document.querySelectorAll(o)))return;1===o.length&&(i=!0)}void 0===o.length&&(o=[o],i=!0);var n=[];return o.forEach((function(o){t.ele=o,e.destroy(o),n.push(new e(t))})),i?n[0]:n}}},{key:"destroy",value:function(e){if(e){var t=e.popComp;t&&t.destroy()}}},{key:"showMethod",value:function(){this.popComp.show()}},{key:"hideMethod",value:function(){this.popComp.hide()}},{key:"updatePositionMethod",value:function(){this.popComp.popper.updatePosition()}},{key:"getAttrProps",value:function(){var e=l.convertPropToDataAttr,t={};return v.forEach((function(o){t[e(o)]=o})),t}}],(o=[{key:"init",value:function(){this.$popover&&(this.setElementProps(),this.renderArrow(),this.initPopper(),this.addEvents())}},{key:"getEvents",value:function(){var e=[{$ele:document,event:"click",method:"onDocumentClick"},{$ele:document,event:"keydown",method:"onDocumentKeyDown"}];return this.disableManualAction||(e.push({$ele:this.$ele,event:"click",method:"onTriggerEleClick"}),this.showOnHover&&(e.push({$ele:this.$ele,event:"mouseenter",method:"onTriggerEleMouseEnter"}),e.push({$ele:this.$ele,event:"mouseleave",method:"onTriggerEleMouseLeave"}))),e}},{key:"addOrRemoveEvents",value:function(e){var t=this;this.getEvents().forEach((function(o){t.addOrRemoveEvent({action:e,$ele:o.$ele,events:o.event,method:o.method})}))}},{key:"addEvents",value:function(){this.addOrRemoveEvents("add")}},{key:"removeEvents",value:function(){this.addOrRemoveEvents("remove"),this.removeScrollEventListeners(),this.removeResizeEventListeners()}},{key:"addOrRemoveEvent",value:function(e){var t=this,o=e.action,n=e.$ele,s=e.events,r=e.method,a=e.throttle;n&&(s=i.removeArrayEmpty(s.split(" "))).forEach((function(e){var s="".concat(r,"-").concat(e),p=t.events[s];p||(p=t[r].bind(t),a&&(p=i.throttle(p,a)),t.events[s]=p),"add"===o?l.addEvent(n,e,p):l.removeEvent(n,e,p)}))}},{key:"addScrollEventListeners",value:function(){this.$scrollableElems=l.getScrollableParents(this.$ele),this.addOrRemoveEvent({action:"add",$ele:this.$scrollableElems,events:"scroll",method:"onAnyParentScroll",throttle:this.updatePositionThrottle})}},{key:"removeScrollEventListeners",value:function(){this.$scrollableElems&&(this.addOrRemoveEvent({action:"remove",$ele:this.$scrollableElems,events:"scroll",method:"onAnyParentScroll"}),this.$scrollableElems=null)}},{key:"addResizeEventListeners",value:function(){this.addOrRemoveEvent({action:"add",$ele:window,events:"resize",method:"onResize",throttle:this.updatePositionThrottle})}},{key:"removeResizeEventListeners",value:function(){this.addOrRemoveEvent({action:"remove",$ele:window,events:"resize",method:"onResize"})}},{key:"onAnyParentScroll",value:function(){this.popper.updatePosition()}},{key:"onResize",value:function(){this.popper.updatePosition()}},{key:"onDocumentClick",value:function(e){var t=e.target,o=t.closest(".pop-comp-ele"),i=t.closest(".pop-comp-wrapper");this.hideOnOuterClick&&o!==this.$ele&&i!==this.$popover&&this.hide()}},{key:"onDocumentKeyDown",value:function(e){var t=e.which||e.keyCode,o=d[t];o&&this[o](e)}},{key:"onEscPress",value:function(){this.hideOnOuterClick&&this.hide()}},{key:"onTriggerEleClick",value:function(){this.toggle()}},{key:"onTriggerEleMouseEnter",value:function(){this.show()}},{key:"onTriggerEleMouseLeave",value:function(){this.hide()}},{key:"setProps",value:function(e){e=this.setDefaultProps(e),this.setPropsFromElementAttr(e);var t=i.convertToBoolean;this.$ele=e.ele,this.target=e.target,this.position=e.position,this.margin=parseFloat(e.margin),this.offset=parseFloat(e.offset),this.enterDelay=parseFloat(e.enterDelay),this.exitDelay=parseFloat(e.exitDelay),this.showDuration=parseFloat(e.showDuration),this.hideDuration=parseFloat(e.hideDuration),this.transitionDistance=parseFloat(e.transitionDistance),this.updatePositionThrottle=parseFloat(e.updatePositionThrottle),this.zIndex=parseFloat(e.zIndex),this.hideOnOuterClick=t(e.hideOnOuterClick),this.showOnHover=t(e.showOnHover),this.hideArrowIcon=t(e.hideArrowIcon),this.disableManualAction=t(e.disableManualAction),this.disableUpdatePosition=t(e.disableUpdatePosition),this.beforeShowCallback=e.beforeShow,this.afterShowCallback=e.afterShow,this.beforeHideCallback=e.beforeHide,this.afterHideCallback=e.afterHide,this.events={},this.$popover=l.getElement(this.target)}},{key:"setDefaultProps",value:function(e){return Object.assign({position:"auto",margin:8,offset:5,enterDelay:0,exitDelay:0,showDuration:300,hideDuration:200,transitionDistance:10,updatePositionThrottle:100,zIndex:1,hideOnOuterClick:!0,showOnHover:!1,hideArrowIcon:!1,disableManualAction:!1,disableUpdatePosition:!1},e)}},{key:"setPropsFromElementAttr",value:function(e){var t=e.ele;for(var o in h){var i=t.getAttribute(o);i&&(e[h[o]]=i)}}},{key:"setElementProps",value:function(){var t=this.$ele;t.popComp=this,t.show=e.showMethod,t.hide=e.hideMethod,t.updatePosition=e.updatePositionMethod,l.addClass(this.$ele,"pop-comp-ele"),l.addClass(this.$popover,"pop-comp-wrapper")}},{key:"getOtherTriggerPopComp",value:function(){var e,t=this.$popover.popComp;return t&&t.$ele!==this.$ele&&(e=t),e}},{key:"initPopper",value:function(){var e={$popperEle:this.$popover,$triggerEle:this.$ele,$arrowEle:this.$arrowEle,position:this.position,margin:this.margin,offset:this.offset,enterDelay:this.enterDelay,exitDelay:this.exitDelay,showDuration:this.showDuration,hideDuration:this.hideDuration,transitionDistance:this.transitionDistance,zIndex:this.zIndex,afterShow:this.afterShow.bind(this),afterHide:this.afterHide.bind(this)};this.popper=new PopperComponent(e)}},{key:"beforeShow",value:function(){"function"==typeof this.beforeShowCallback&&this.beforeShowCallback(this)}},{key:"beforeHide",value:function(){"function"==typeof this.beforeHideCallback&&this.beforeHideCallback(this)}},{key:"show",value:function(){this.isShown()||(this.isShownForOtherTrigger()?this.showAfterOtherHide():(l.addClass(this.$popover,"pop-comp-disable-events"),this.$popover.popComp=this,this.beforeShow(),this.popper.show({resetPosition:!0}),l.addClass(this.$ele,"pop-comp-active")))}},{key:"hide",value:function(){this.isShown()&&(this.beforeHide(),this.popper.hide(),this.removeScrollEventListeners(),this.removeResizeEventListeners())}},{key:"toggle",value:function(e){void 0===e&&(e=!this.isShown()),e?this.show():this.hide()}},{key:"isShown",value:function(){return l.hasClass(this.$ele,"pop-comp-active")}},{key:"isShownForOtherTrigger",value:function(){var e=this.getOtherTriggerPopComp();return!!e&&e.isShown()}},{key:"showAfterOtherHide",value:function(){var e=this,t=this.getOtherTriggerPopComp();if(t){var o=t.exitDelay+t.hideDuration+100;setTimeout((function(){e.show()}),o)}}},{key:"afterShow",value:function(){var e=this;this.showOnHover?setTimeout((function(){l.removeClass(e.$popover,"pop-comp-disable-events")}),2e3):l.removeClass(this.$popover,"pop-comp-disable-events"),this.disableUpdatePosition||(this.addScrollEventListeners(),this.addResizeEventListeners()),"function"==typeof this.afterShowCallback&&this.afterShowCallback(this)}},{key:"afterHide",value:function(){l.removeClass(this.$ele,"pop-comp-active"),"function"==typeof this.afterHideCallback&&this.afterHideCallback(this)}},{key:"renderArrow",value:function(){if(!this.hideArrowIcon){var e=this.$popover.querySelector(".pop-comp-arrow");e||(this.$popover.insertAdjacentHTML("afterbegin",'<i class="pop-comp-arrow"></i>'),e=this.$popover.querySelector(".pop-comp-arrow")),this.$arrowEle=e}}},{key:"destroy",value:function(){this.removeEvents()}}])&&c(t.prototype,o),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o,n}();h=f.getAttrProps(),window.PopoverComponent=f}()}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={id:i,exports:{}};return e[i](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},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),o.nc=void 0,(()=>{"use strict";const e=jQuery;var t=o.n(e);Shiny;var i=o(3379),n=o.n(i),s=o(7795),r=o.n(s),a=o(569),l=o.n(a),p=o(3565),c=o.n(p),u=o(9216),h=o.n(u),d=o(4589),v=o.n(d),f=o(716),m={};m.styleTagTransform=v(),m.setAttributes=c(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=h(),n()(f.Z,m),f.Z&&f.Z.locals&&f.Z.locals,o(8196);var b=o(4078),y={};function g(e){var t,o,i=[];for(t in e)for(o=0;o<e[t].length;o++)i[o]=i[o]||{},void 0!==e[t][o]&&(i[o][t]=e[t][o]);return i}function x(e){var t;if("vector"==e.type)t=e.choices.map((e=>({label:e,value:e})));else if("transpose"==e.type)t=g(e.choices);else if("transpose_group"==e.type){for(var o=e.choices,i=0;i<o.length;i++)o[i].options=g(o[i].options);t=o}else t=e.choices;return t}y.styleTagTransform=v(),y.setAttributes=c(),y.insert=l().bind(null,"head"),y.domAPI=r(),y.insertStyleElement=h(),n()(b.Z,y),b.Z&&b.Z.locals&&b.Z.locals,o(9805);var w=new Shiny.InputBinding;t().extend(w,{find:e=>t()(e).find(".virtual-select"),getValue:e=>e.value,setValue:(e,t)=>{e.setValue(t)},subscribe:(e,o)=>{"change"==t()(e).attr("data-update")?t()(e).on("change.virtualSelectBinding",(function(e){o()})):t()(e).on("afterClose.virtualSelectBinding reset.virtualSelectBinding",(function(e){o()}))},unsubscribe:e=>{t()(e).off(".virtualSelectBinding")},receiveMessage:(e,o)=>{if(o.hasOwnProperty("label")){var i=t()("#"+e.id+"-label");!function(e,t){if(void 0!==e){if(1!==t.length)throw new Error("labelNode must be of length 1");Array.isArray(e)&&0===e.length?t.addClass("shiny-label-null"):(t.html(e),t.removeClass("shiny-label-null"))}}(o.label,i)}if(o.hasOwnProperty("options")){var n=x(o.options);e.setOptions(n)}o.hasOwnProperty("value")&&e.setValue(o.value),o.hasOwnProperty("disable")&&(o.disable?e.disable():e.enable()),o.hasOwnProperty("disabledChoices")&&e.setDisabledOptions(o.disabledChoices,!0),o.hasOwnProperty("open")&&(o.open?e.open():e.close())},initialize:e=>{var o=e.querySelector('script[data-for="'+e.id+'"]'),i=(o=JSON.parse(o.text)).config;i.options=x(o.options),i.onServerSearch&&(i.onServerSearch=window[i.onServerSearch]),i.labelRenderer&&(i.labelRenderer=window[i.labelRenderer]),i.ele=e,VirtualSelect.init(i),o.stateInput&&(t()(e).on("afterOpen",(function(t){Shiny.setInputValue(e.id+"_open",!0)})),t()(e).on("afterClose",(function(t){Shiny.setInputValue(e.id+"_open",!1)})))}}),Shiny.inputBindings.register(w,"shinyWidgets.virtualSelectBinding")})()})();