import{r as t,c as e,h as i,g as n}from"./p-5308bbce.js";import{c as s,g as r}from"./p-64765a81.js";var o=s((function(t,e){ /*! choices.js v10.2.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ (function e(i,n){t.exports=n()})(window,(function(){return function(){var t={282:function(t,e,i){Object.defineProperty(e,"__esModule",{value:true});e.clearChoices=e.activateChoices=e.filterChoices=e.addChoice=void 0;var n=i(883);var s=function(t){var e=t.value,i=t.label,s=t.id,r=t.groupId,o=t.disabled,c=t.elementId,a=t.customProperties,u=t.placeholder,h=t.keyCode;return{type:n.ACTION_TYPES.ADD_CHOICE,value:e,label:i,id:s,groupId:r,disabled:o,elementId:c,customProperties:a,placeholder:u,keyCode:h}};e.addChoice=s;var r=function(t){return{type:n.ACTION_TYPES.FILTER_CHOICES,results:t}};e.filterChoices=r;var o=function(t){if(t===void 0){t=true}return{type:n.ACTION_TYPES.ACTIVATE_CHOICES,active:t}};e.activateChoices=o;var c=function(){return{type:n.ACTION_TYPES.CLEAR_CHOICES}};e.clearChoices=c},783:function(t,e,i){Object.defineProperty(e,"__esModule",{value:true});e.addGroup=void 0;var n=i(883);var s=function(t){var e=t.value,i=t.id,s=t.active,r=t.disabled;return{type:n.ACTION_TYPES.ADD_GROUP,value:e,id:i,active:s,disabled:r}};e.addGroup=s},464:function(t,e,i){Object.defineProperty(e,"__esModule",{value:true});e.highlightItem=e.removeItem=e.addItem=void 0;var n=i(883);var s=function(t){var e=t.value,i=t.label,s=t.id,r=t.choiceId,o=t.groupId,c=t.customProperties,a=t.placeholder,u=t.keyCode;return{type:n.ACTION_TYPES.ADD_ITEM,value:e,label:i,id:s,choiceId:r,groupId:o,customProperties:c,placeholder:a,keyCode:u}};e.addItem=s;var r=function(t,e){return{type:n.ACTION_TYPES.REMOVE_ITEM,id:t,choiceId:e}};e.removeItem=r;var o=function(t,e){return{type:n.ACTION_TYPES.HIGHLIGHT_ITEM,id:t,highlighted:e}};e.highlightItem=o},137:function(t,e,i){Object.defineProperty(e,"__esModule",{value:true});e.setIsLoading=e.resetTo=e.clearAll=void 0;var n=i(883);var s=function(){return{type:n.ACTION_TYPES.CLEAR_ALL}};e.clearAll=s;var r=function(t){return{type:n.ACTION_TYPES.RESET_TO,state:t}};e.resetTo=r;var o=function(t){return{type:n.ACTION_TYPES.SET_IS_LOADING,isLoading:t}};e.setIsLoading=o},373:function(t,e,i){var n=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,s=e.length,r;n=0?this._store.getGroupById(s):null;this._store.dispatch((0,u.highlightItem)(i,true));if(e){this.passedElement.triggerEvent(f.EVENTS.highlightItem,{id:i,value:o,label:a,groupValue:h&&h.value?h.value:null})}return this};t.prototype.unhighlightItem=function(t){if(!t||!t.id){return this}var e=t.id,i=t.groupId,n=i===void 0?-1:i,s=t.value,r=s===void 0?"":s,o=t.label,c=o===void 0?"":o;var a=n>=0?this._store.getGroupById(n):null;this._store.dispatch((0,u.highlightItem)(e,false));this.passedElement.triggerEvent(f.EVENTS.highlightItem,{id:e,value:r,label:c,groupValue:a&&a.value?a.value:null});return this};t.prototype.highlightAll=function(){var t=this;this._store.items.forEach((function(e){return t.highlightItem(e)}));return this};t.prototype.unhighlightAll=function(){var t=this;this._store.items.forEach((function(e){return t.unhighlightItem(e)}));return this};t.prototype.removeActiveItemsByValue=function(t){var e=this;this._store.activeItems.filter((function(e){return e.value===t})).forEach((function(t){return e._removeItem(t)}));return this};t.prototype.removeActiveItems=function(t){var e=this;this._store.activeItems.filter((function(e){var i=e.id;return i!==t})).forEach((function(t){return e._removeItem(t)}));return this};t.prototype.removeHighlightedItems=function(t){var e=this;if(t===void 0){t=false}this._store.highlightedActiveItems.forEach((function(i){e._removeItem(i);if(t){e._triggerChange(i.value)}}));return this};t.prototype.showDropdown=function(t){var e=this;if(this.dropdown.isActive){return this}requestAnimationFrame((function(){e.dropdown.show();e.containerOuter.open(e.dropdown.distanceFromTopWindow);if(!t&&e._canSearch){e.input.focus()}e.passedElement.triggerEvent(f.EVENTS.showDropdown,{})}));return this};t.prototype.hideDropdown=function(t){var e=this;if(!this.dropdown.isActive){return this}requestAnimationFrame((function(){e.dropdown.hide();e.containerOuter.close();if(!t&&e._canSearch){e.input.removeActiveDescendant();e.input.blur()}e.passedElement.triggerEvent(f.EVENTS.hideDropdown,{})}));return this};t.prototype.getValue=function(t){if(t===void 0){t=false}var e=this._store.activeItems.reduce((function(e,i){var n=t?i.value:i;e.push(n);return e}),[]);return this._isSelectOneElement?e[0]:e};t.prototype.setValue=function(t){var e=this;if(!this.initialised){return this}t.forEach((function(t){return e._setChoiceOrItem(t)}));return this};t.prototype.setChoiceByValue=function(t){var e=this;if(!this.initialised||this._isTextElement){return this}var i=Array.isArray(t)?t:[t];i.forEach((function(t){return e._findAndSelectChoiceByValue(t)}));return this};t.prototype.setChoices=function(t,e,i,n){var s=this;if(t===void 0){t=[]}if(e===void 0){e="value"}if(i===void 0){i="label"}if(n===void 0){n=false}if(!this.initialised){throw new ReferenceError("setChoices was called on a non-initialized instance of Choices")}if(!this._isSelectElement){throw new TypeError("setChoices can't be used with INPUT based Choices")}if(typeof e!=="string"||!e){throw new TypeError("value parameter must be a name of 'value' field in passed objects")}if(n){this.clearChoices()}if(typeof t==="function"){var r=t(this);if(typeof Promise==="function"&&r instanceof Promise){return new Promise((function(t){return requestAnimationFrame(t)})).then((function(){return s._handleLoadingState(true)})).then((function(){return r})).then((function(t){return s.setChoices(t,e,i,n)})).catch((function(t){if(!s.config.silent){console.error(t)}})).then((function(){return s._handleLoadingState(false)})).then((function(){return s}))}if(!Array.isArray(r)){throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof r))}return this.setChoices(r,e,i,false)}if(!Array.isArray(t)){throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices")}this.containerOuter.removeLoadingState();this._startLoading();t.forEach((function(t){if(t.choices){s._addGroup({id:t.id?parseInt("".concat(t.id),10):null,group:t,valueKey:e,labelKey:i})}else{var n=t;s._addChoice({value:n[e],label:n[i],isSelected:!!n.selected,isDisabled:!!n.disabled,placeholder:!!n.placeholder,customProperties:n.customProperties})}}));this._stopLoading();return this};t.prototype.clearChoices=function(){this._store.dispatch((0,c.clearChoices)());return this};t.prototype.clearStore=function(){this._store.dispatch((0,h.clearAll)());return this};t.prototype.clearInput=function(){var t=!this._isSelectOneElement;this.input.clear(t);if(!this._isTextElement&&this._canSearch){this._isSearching=false;this._store.dispatch((0,c.activateChoices)(true))}return this};t.prototype._render=function(){if(this._store.isLoading()){return}this._currentState=this._store.state;var t=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items;var e=this._isSelectElement;var i=this._currentState.items!==this._prevState.items;if(!t){return}if(e){this._renderChoices()}if(i){this._renderItems()}this._prevState=this._currentState};t.prototype._renderChoices=function(){var t=this;var e=this._store,i=e.activeGroups,n=e.activeChoices;var s=document.createDocumentFragment();this.choiceList.clear();if(this.config.resetScrollPosition){requestAnimationFrame((function(){return t.choiceList.scrollToTop()}))}if(i.length>=1&&!this._isSearching){var r=n.filter((function(t){return t.placeholder===true&&t.groupId===-1}));if(r.length>=1){s=this._createChoicesFragment(r,s)}s=this._createGroupsFragment(i,n,s)}else if(n.length>=1){s=this._createChoicesFragment(n,s)}if(s.childNodes&&s.childNodes.length>0){var o=this._store.activeItems;var c=this._canAddItem(o,this.input.value);if(c.response){this.choiceList.append(s);this._highlightChoice()}else{var a=this._getTemplate("notice",c.notice);this.choiceList.append(a)}}else{var u=void 0;var a=void 0;if(this._isSearching){a=typeof this.config.noResultsText==="function"?this.config.noResultsText():this.config.noResultsText;u=this._getTemplate("notice",a,"no-results")}else{a=typeof this.config.noChoicesText==="function"?this.config.noChoicesText():this.config.noChoicesText;u=this._getTemplate("notice",a,"no-choices")}this.choiceList.append(u)}};t.prototype._renderItems=function(){var t=this._store.activeItems||[];this.itemList.clear();var e=this._createItemsFragment(t);if(e.childNodes){this.itemList.append(e)}};t.prototype._createGroupsFragment=function(t,e,i){var n=this;if(i===void 0){i=document.createDocumentFragment()}var s=function(t){return e.filter((function(e){if(n._isSelectOneElement){return e.groupId===t.id}return e.groupId===t.id&&(n.config.renderSelectedChoices==="always"||!e.selected)}))};if(this.config.shouldSort){t.sort(this.config.sorter)}t.forEach((function(t){var e=s(t);if(e.length>=1){var r=n._getTemplate("choiceGroup",t);i.appendChild(r);n._createChoicesFragment(e,i,true)}}));return i};t.prototype._createChoicesFragment=function(t,e,i){var s=this;if(e===void 0){e=document.createDocumentFragment()}if(i===void 0){i=false}var r=this.config,o=r.renderSelectedChoices,c=r.searchResultLimit,a=r.renderChoiceLimit;var u=this._isSearching?v.sortByScore:this.config.sorter;var h=function(t){var i=o==="auto"?s._isSelectOneElement||!t.selected:true;if(i){var n=s._getTemplate("choice",t,s.config.itemSelectText);e.appendChild(n)}};var l=t;if(o==="auto"&&!this._isSelectOneElement){l=t.filter((function(t){return!t.selected}))}var f=l.reduce((function(t,e){if(e.placeholder){t.placeholderChoices.push(e)}else{t.normalChoices.push(e)}return t}),{placeholderChoices:[],normalChoices:[]}),d=f.placeholderChoices,p=f.normalChoices;if(this.config.shouldSort||this._isSearching){p.sort(u)}var b=l.length;var m=this._isSelectOneElement?n(n([],d,true),p,true):p;if(this._isSearching){b=c}else if(a&&a>0&&!i){b=a}for(var g=0;g=n){var o=s?this._searchChoices(t):0;this.passedElement.triggerEvent(f.EVENTS.search,{value:t,resultCount:o})}else if(r){this._isSearching=false;this._store.dispatch((0,c.activateChoices)(true))}};t.prototype._canAddItem=function(t,e){var i=true;var n=typeof this.config.addItemText==="function"?this.config.addItemText(e):this.config.addItemText;if(!this._isSelectOneElement){var s=(0,v.existsInArray)(t,e);if(this.config.maxItemCount>0&&this.config.maxItemCount<=t.length){i=false;n=typeof this.config.maxItemText==="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText}if(!this.config.duplicateItemsAllowed&&s&&i){i=false;n=typeof this.config.uniqueItemText==="function"?this.config.uniqueItemText(e):this.config.uniqueItemText}if(this._isTextElement&&this.config.addItems&&i&&typeof this.config.addItemFilter==="function"&&!this.config.addItemFilter(e)){i=false;n=typeof this.config.customAddItemText==="function"?this.config.customAddItemText(e):this.config.customAddItemText}}return{response:i,notice:n}};t.prototype._searchChoices=function(t){var e=typeof t==="string"?t.trim():t;var i=typeof this._currentValue==="string"?this._currentValue.trim():this._currentValue;if(e.length<1&&e==="".concat(i," ")){return 0}var s=this._store.searchableChoices;var r=e;var a=Object.assign(this.config.fuseOptions,{keys:n([],this.config.searchFields,true),includeMatches:true});var u=new o.default(s,a);var h=u.search(r);this._currentValue=e;this._highlightPosition=0;this._isSearching=true;this._store.dispatch((0,c.filterChoices)(h));return h.length};t.prototype._addEventListeners=function(){var t=document.documentElement;t.addEventListener("touchend",this._onTouchEnd,true);this.containerOuter.element.addEventListener("keydown",this._onKeyDown,true);this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,true);t.addEventListener("click",this._onClick,{passive:true});t.addEventListener("touchmove",this._onTouchMove,{passive:true});this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:true});if(this._isSelectOneElement){this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:true});this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:true})}this.input.element.addEventListener("keyup",this._onKeyUp,{passive:true});this.input.element.addEventListener("focus",this._onFocus,{passive:true});this.input.element.addEventListener("blur",this._onBlur,{passive:true});if(this.input.element.form){this.input.element.form.addEventListener("reset",this._onFormReset,{passive:true})}this.input.addEventListeners()};t.prototype._removeEventListeners=function(){var t=document.documentElement;t.removeEventListener("touchend",this._onTouchEnd,true);this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,true);this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,true);t.removeEventListener("click",this._onClick);t.removeEventListener("touchmove",this._onTouchMove);this.dropdown.element.removeEventListener("mouseover",this._onMouseOver);if(this._isSelectOneElement){this.containerOuter.element.removeEventListener("focus",this._onFocus);this.containerOuter.element.removeEventListener("blur",this._onBlur)}this.input.element.removeEventListener("keyup",this._onKeyUp);this.input.element.removeEventListener("focus",this._onFocus);this.input.element.removeEventListener("blur",this._onBlur);if(this.input.element.form){this.input.element.form.removeEventListener("reset",this._onFormReset)}this.input.removeEventListeners()};t.prototype._onKeyDown=function(t){var e=t.keyCode;var i=this._store.activeItems;var n=this.input.isFocussed;var s=this.dropdown.isActive;var r=this.itemList.hasChildren();var o=String.fromCharCode(e);var c=/[^\x00-\x1F]/.test(o);var a=f.KEY_CODES.BACK_KEY,u=f.KEY_CODES.DELETE_KEY,h=f.KEY_CODES.ENTER_KEY,l=f.KEY_CODES.A_KEY,d=f.KEY_CODES.ESC_KEY,v=f.KEY_CODES.UP_KEY,p=f.KEY_CODES.DOWN_KEY,b=f.KEY_CODES.PAGE_UP_KEY,m=f.KEY_CODES.PAGE_DOWN_KEY;if(!this._isTextElement&&!s&&c){this.showDropdown();if(!this.input.isFocussed){this.input.value+=t.key.toLowerCase()}}switch(e){case l:return this._onSelectKey(t,r);case h:return this._onEnterKey(t,i,s);case d:return this._onEscapeKey(s);case v:case b:case p:case m:return this._onDirectionKey(t,s);case u:case a:return this._onDeleteKey(t,i,n)}};t.prototype._onKeyUp=function(t){var e=t.target,i=t.keyCode;var n=this.input.value;var s=this._store.activeItems;var r=this._canAddItem(s,n);var o=f.KEY_CODES.BACK_KEY,a=f.KEY_CODES.DELETE_KEY;if(this._isTextElement){var u=r.notice&&n;if(u){var h=this._getTemplate("notice",r.notice);this.dropdown.element.innerHTML=h.outerHTML;this.showDropdown(true)}else{this.hideDropdown(true)}}else{var l=i===o||i===a;var d=l&&e&&!e.value;var v=!this._isTextElement&&this._isSearching;var p=this._canSearch&&r.response;if(d&&v){this._isSearching=false;this._store.dispatch((0,c.activateChoices)(true))}else if(p){this._handleSearch(this.input.rawValue)}}this._canSearch=this.config.searchEnabled};t.prototype._onSelectKey=function(t,e){var i=t.ctrlKey,n=t.metaKey;var s=i||n;if(s&&e){this._canSearch=false;var r=this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement;if(r){this.highlightAll()}}};t.prototype._onEnterKey=function(t,e,i){var n=t.target;var s=f.KEY_CODES.ENTER_KEY;var r=n&&n.hasAttribute("data-button");if(this._isTextElement&&n&&n.value){var o=this.input.value;var c=this._canAddItem(e,o);if(c.response){this.hideDropdown(true);this._addItem({value:o});this._triggerChange(o);this.clearInput()}}if(r){this._handleButtonAction(e,n);t.preventDefault()}if(i){var a=this.dropdown.getChild(".".concat(this.config.classNames.highlightedState));if(a){if(e[0]){e[0].keyCode=s}this._handleChoiceAction(e,a)}t.preventDefault()}else if(this._isSelectOneElement){this.showDropdown();t.preventDefault()}};t.prototype._onEscapeKey=function(t){if(t){this.hideDropdown(true);this.containerOuter.focus()}};t.prototype._onDirectionKey=function(t,e){var i=t.keyCode,n=t.metaKey;var s=f.KEY_CODES.DOWN_KEY,r=f.KEY_CODES.PAGE_UP_KEY,o=f.KEY_CODES.PAGE_DOWN_KEY;if(e||this._isSelectOneElement){this.showDropdown();this._canSearch=false;var c=i===s||i===o?1:-1;var a=n||i===o||i===r;var u="[data-choice-selectable]";var h=void 0;if(a){if(c>0){h=this.dropdown.element.querySelector("".concat(u,":last-of-type"))}else{h=this.dropdown.element.querySelector(u)}}else{var l=this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState));if(l){h=(0,v.getAdjacentEl)(l,u,c)}else{h=this.dropdown.element.querySelector(u)}}if(h){if(!(0,v.isScrolledIntoView)(h,this.choiceList.element,c)){this.choiceList.scrollToChildElement(h,c)}this._highlightChoice(h)}t.preventDefault()}};t.prototype._onDeleteKey=function(t,e,i){var n=t.target;if(!this._isSelectOneElement&&!n.value&&i){this._handleBackspace(e);t.preventDefault()}};t.prototype._onTouchMove=function(){if(this._wasTap){this._wasTap=false}};t.prototype._onTouchEnd=function(t){var e=(t||t.touches[0]).target;var i=this._wasTap&&this.containerOuter.element.contains(e);if(i){var n=e===this.containerOuter.element||e===this.containerInner.element;if(n){if(this._isTextElement){this.input.focus()}else if(this._isSelectMultipleElement){this.showDropdown()}}t.stopPropagation()}this._wasTap=true};t.prototype._onMouseDown=function(t){var e=t.target;if(!(e instanceof HTMLElement)){return}if(g&&this.choiceList.element.contains(e)){var i=this.choiceList.element.firstElementChild;var n=this._direction==="ltr"?t.offsetX>=i.offsetWidth:t.offsetX0;if(n){this.unhighlightAll()}this.containerOuter.removeFocusState();this.hideDropdown(true)}};t.prototype._onFocus=function(t){var e;var i=this;var n=t.target;var s=n&&this.containerOuter.element.contains(n);if(!s){return}var r=(e={},e[f.TEXT_TYPE]=function(){if(n===i.input.element){i.containerOuter.addFocusState()}},e[f.SELECT_ONE_TYPE]=function(){i.containerOuter.addFocusState();if(n===i.input.element){i.showDropdown(true)}},e[f.SELECT_MULTIPLE_TYPE]=function(){if(n===i.input.element){i.showDropdown(true);i.containerOuter.addFocusState()}},e);r[this.passedElement.element.type]()};t.prototype._onBlur=function(t){var e;var i=this;var n=t.target;var s=n&&this.containerOuter.element.contains(n);if(s&&!this._isScrollingOnIe){var r=this._store.activeItems;var o=r.some((function(t){return t.highlighted}));var c=(e={},e[f.TEXT_TYPE]=function(){if(n===i.input.element){i.containerOuter.removeFocusState();if(o){i.unhighlightAll()}i.hideDropdown(true)}},e[f.SELECT_ONE_TYPE]=function(){i.containerOuter.removeFocusState();if(n===i.input.element||n===i.containerOuter.element&&!i._canSearch){i.hideDropdown(true)}},e[f.SELECT_MULTIPLE_TYPE]=function(){if(n===i.input.element){i.containerOuter.removeFocusState();i.hideDropdown(true);if(o){i.unhighlightAll()}}},e);c[this.passedElement.element.type]()}else{this._isScrollingOnIe=false;this.input.element.focus()}};t.prototype._onFormReset=function(){this._store.dispatch((0,h.resetTo)(this._initialState))};t.prototype._highlightChoice=function(t){var e=this;if(t===void 0){t=null}var i=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(!i.length){return}var n=t;var s=Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState)));s.forEach((function(t){t.classList.remove(e.config.classNames.highlightedState);t.setAttribute("aria-selected","false")}));if(n){this._highlightPosition=i.indexOf(n)}else{if(i.length>this._highlightPosition){n=i[this._highlightPosition]}else{n=i[i.length-1]}if(!n){n=i[0]}}n.classList.add(this.config.classNames.highlightedState);n.setAttribute("aria-selected","true");this.passedElement.triggerEvent(f.EVENTS.highlightChoice,{el:n});if(this.dropdown.isActive){this.input.setActiveDescendant(n.id);this.containerOuter.setActiveDescendant(n.id)}};t.prototype._addItem=function(t){var e=t.value,i=t.label,n=i===void 0?null:i,s=t.choiceId,r=s===void 0?-1:s,o=t.groupId,c=o===void 0?-1:o,a=t.customProperties,h=a===void 0?{}:a,l=t.placeholder,d=l===void 0?false:l,v=t.keyCode,p=v===void 0?-1:v;var b=typeof e==="string"?e.trim():e;var m=this._store.items;var g=n||b;var _=r||-1;var x=c>=0?this._store.getGroupById(c):null;var y=m?m.length+1:1;if(this.config.prependValue){b=this.config.prependValue+b.toString()}if(this.config.appendValue){b+=this.config.appendValue.toString()}this._store.dispatch((0,u.addItem)({value:b,label:g,id:y,choiceId:_,groupId:c,customProperties:h,placeholder:d,keyCode:p}));if(this._isSelectOneElement){this.removeActiveItems(y)}this.passedElement.triggerEvent(f.EVENTS.addItem,{id:y,value:b,label:g,customProperties:h,groupValue:x&&x.value?x.value:null,keyCode:p})};t.prototype._removeItem=function(t){var e=t.id,i=t.value,n=t.label,s=t.customProperties,r=t.choiceId,o=t.groupId;var c=o&&o>=0?this._store.getGroupById(o):null;if(!e||!r){return}this._store.dispatch((0,u.removeItem)(e,r));this.passedElement.triggerEvent(f.EVENTS.removeItem,{id:e,value:i,label:n,customProperties:s,groupValue:c&&c.value?c.value:null})};t.prototype._addChoice=function(t){var e=t.value,i=t.label,n=i===void 0?null:i,s=t.isSelected,r=s===void 0?false:s,o=t.isDisabled,a=o===void 0?false:o,u=t.groupId,h=u===void 0?-1:u,l=t.customProperties,f=l===void 0?{}:l,d=t.placeholder,v=d===void 0?false:d,p=t.keyCode,b=p===void 0?-1:p;if(typeof e==="undefined"||e===null){return}var m=this._store.choices;var g=n||e;var _=m?m.length+1:1;var x="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(_);this._store.dispatch((0,c.addChoice)({id:_,groupId:h,elementId:x,value:e,label:g,disabled:a,customProperties:f,placeholder:v,keyCode:b}));if(r){this._addItem({value:e,label:g,choiceId:_,customProperties:f,placeholder:v,keyCode:b})}};t.prototype._addGroup=function(t){var e=this;var i=t.group,n=t.id,s=t.valueKey,r=s===void 0?"value":s,o=t.labelKey,c=o===void 0?"label":o;var u=(0,v.isType)("Object",i)?i.choices:Array.from(i.getElementsByTagName("OPTION"));var h=n||Math.floor((new Date).valueOf()*Math.random());var l=i.disabled?i.disabled:false;if(u){this._store.dispatch((0,a.addGroup)({value:i.label,id:h,active:true,disabled:l}));var f=function(t){var i=t.disabled||t.parentNode&&t.parentNode.disabled;e._addChoice({value:t[r],label:(0,v.isType)("Object",t)?t[c]:t.innerHTML,isSelected:t.selected,isDisabled:i,groupId:h,customProperties:t.customProperties,placeholder:t.placeholder})};u.forEach(f)}else{this._store.dispatch((0,a.addGroup)({value:i.label,id:i.id,active:false,disabled:i.disabled}))}};t.prototype._getTemplate=function(t){var e;var i=[];for(var s=1;s0?this.element.scrollTop+o-s:t.offsetTop;requestAnimationFrame((function(){i._animateScroll(c,e)}))};t.prototype._scrollDown=function(t,e,i){var n=(i-t)/e;var s=n>1?n:1;this.element.scrollTop=t+s};t.prototype._scrollUp=function(t,e,i){var n=(t-i)/e;var s=n>1?n:1;this.element.scrollTop=t-s};t.prototype._animateScroll=function(t,e){var i=this;var s=n.SCROLLING_SPEED;var r=this.element.scrollTop;var o=false;if(e>0){this._scrollDown(r,s,t);if(rt){o=true}}if(o){requestAnimationFrame((function(){i._animateScroll(t,e)}))}};return t}();e["default"]=s},730:function(t,e,i){Object.defineProperty(e,"__esModule",{value:true});var n=i(799);var s=function(){function t(t){var e=t.element,i=t.classNames;this.element=e;this.classNames=i;if(!(e instanceof HTMLInputElement)&&!(e instanceof HTMLSelectElement)){throw new TypeError("Invalid element passed")}this.isDisabled=false}Object.defineProperty(t.prototype,"isActive",{get:function(){return this.element.dataset.choice==="active"},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"dir",{get:function(){return this.element.dir},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this.element.value},set:function(t){this.element.value=t},enumerable:false,configurable:true});t.prototype.conceal=function(){this.element.classList.add(this.classNames.input);this.element.hidden=true;this.element.tabIndex=-1;var t=this.element.getAttribute("style");if(t){this.element.setAttribute("data-choice-orig-style",t)}this.element.setAttribute("data-choice","active")};t.prototype.reveal=function(){this.element.classList.remove(this.classNames.input);this.element.hidden=false;this.element.removeAttribute("tabindex");var t=this.element.getAttribute("data-choice-orig-style");if(t){this.element.removeAttribute("data-choice-orig-style");this.element.setAttribute("style",t)}else{this.element.removeAttribute("style")}this.element.removeAttribute("data-choice");this.element.value=this.element.value};t.prototype.enable=function(){this.element.removeAttribute("disabled");this.element.disabled=false;this.isDisabled=false};t.prototype.disable=function(){this.element.setAttribute("disabled","");this.element.disabled=true;this.isDisabled=true};t.prototype.triggerEvent=function(t,e){(0,n.dispatchEvent)(this.element,t,e)};return t}();e["default"]=s},541:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]};return t(e,i)};return function(e,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function n(){this.constructor=e}e.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});var r=s(i(730));var o=function(t){n(e,t);function e(e){var i=e.element,n=e.classNames,s=e.delimiter;var r=t.call(this,{element:i,classNames:n})||this;r.delimiter=s;return r}Object.defineProperty(e.prototype,"value",{get:function(){return this.element.value},set:function(t){this.element.setAttribute("value",t);this.element.value=t},enumerable:false,configurable:true});return e}(r.default);e["default"]=o},982:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]};return t(e,i)};return function(e,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function n(){this.constructor=e}e.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});var r=s(i(730));var o=function(t){n(e,t);function e(e){var i=e.element,n=e.classNames,s=e.template;var r=t.call(this,{element:i,classNames:n})||this;r.template=s;return r}Object.defineProperty(e.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"optionGroups",{get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"options",{get:function(){return Array.from(this.element.options)},set:function(t){var e=this;var i=document.createDocumentFragment();var n=function(t){var n=e.template(t);i.appendChild(n)};t.forEach((function(t){return n(t)}));this.appendDocFragment(i)},enumerable:false,configurable:true});e.prototype.appendDocFragment=function(t){this.element.innerHTML="";this.element.appendChild(t)};return e}(r.default);e["default"]=o},883:function(t,e){Object.defineProperty(e,"__esModule",{value:true});e.SCROLLING_SPEED=e.SELECT_MULTIPLE_TYPE=e.SELECT_ONE_TYPE=e.TEXT_TYPE=e.KEY_CODES=e.ACTION_TYPES=e.EVENTS=void 0;e.EVENTS={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem",highlightChoice:"highlightChoice",unhighlightItem:"unhighlightItem"};e.ACTION_TYPES={ADD_CHOICE:"ADD_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM",CLEAR_ALL:"CLEAR_ALL",RESET_TO:"RESET_TO",SET_IS_LOADING:"SET_IS_LOADING"};e.KEY_CODES={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34};e.TEXT_TYPE="text";e.SELECT_ONE_TYPE="select-one";e.SELECT_MULTIPLE_TYPE="select-multiple";e.SCROLLING_SPEED=4},789:function(t,e,i){Object.defineProperty(e,"__esModule",{value:true});e.DEFAULT_CONFIG=e.DEFAULT_CLASSNAMES=void 0;var n=i(799);e.DEFAULT_CLASSNAMES={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"};e.DEFAULT_CONFIG={items:[],choices:[],silent:false,renderChoiceLimit:-1,maxItemCount:-1,addItems:true,addItemFilter:null,removeItems:true,removeItemButton:false,editItems:false,allowHTML:true,duplicateItemsAllowed:true,delimiter:",",paste:true,searchEnabled:true,searchChoices:true,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:true,shouldSort:true,shouldSortItems:false,sorter:n.sortByAlpha,placeholder:true,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(t){return'Press Enter to add "'.concat((0,n.sanitise)(t),'"')},maxItemText:function(t){return"Only ".concat(t," values can be added")},valueComparer:function(t,e){return t===e},fuseOptions:{includeScore:true},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:e.DEFAULT_CLASSNAMES}},18:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},978:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},948:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},359:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},285:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},533:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},187:function(t,e,i){var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){if(n===undefined)n=i;var s=Object.getOwnPropertyDescriptor(e,i);if(!s||("get"in s?!e.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return e[i]}}}Object.defineProperty(t,n,s)}:function(t,e,i,n){if(n===undefined)n=i;t[n]=e[i]});var s=this&&this.__exportStar||function(t,e){for(var i in t)if(i!=="default"&&!Object.prototype.hasOwnProperty.call(e,i))n(e,t,i)};Object.defineProperty(e,"__esModule",{value:true});s(i(18),e);s(i(978),e);s(i(948),e);s(i(359),e);s(i(285),e);s(i(533),e);s(i(287),e);s(i(132),e);s(i(837),e);s(i(598),e);s(i(369),e);s(i(37),e);s(i(47),e);s(i(923),e);s(i(876),e)},287:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},132:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},837:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},598:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},37:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},369:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},47:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},923:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},876:function(t,e){Object.defineProperty(e,"__esModule",{value:true})},799:function(t,e){Object.defineProperty(e,"__esModule",{value:true});e.parseCustomProperties=e.diff=e.cloneObject=e.existsInArray=e.dispatchEvent=e.sortByScore=e.sortByAlpha=e.strToEl=e.sanitise=e.isScrolledIntoView=e.getAdjacentEl=e.wrap=e.isType=e.getType=e.generateId=e.generateChars=e.getRandomNumber=void 0;var i=function(t,e){return Math.floor(Math.random()*(e-t)+t)};e.getRandomNumber=i;var n=function(t){return Array.from({length:t},(function(){return(0,e.getRandomNumber)(0,36).toString(36)})).join("")};e.generateChars=n;var s=function(t,i){var n=t.id||t.name&&"".concat(t.name,"-").concat((0,e.generateChars)(2))||(0,e.generateChars)(4);n=n.replace(/(:|\.|\[|\]|,)/g,"");n="".concat(i,"-").concat(n);return n};e.generateId=s;var r=function(t){return Object.prototype.toString.call(t).slice(8,-1)};e.getType=r;var o=function(t,i){return i!==undefined&&i!==null&&(0,e.getType)(i)===t};e.isType=o;var c=function(t,e){if(e===void 0){e=document.createElement("div")}if(t.parentNode){if(t.nextSibling){t.parentNode.insertBefore(e,t.nextSibling)}else{t.parentNode.appendChild(e)}}return e.appendChild(t)};e.wrap=c;var a=function(t,e,i){if(i===void 0){i=1}var n="".concat(i>0?"next":"previous","ElementSibling");var s=t[n];while(s){if(s.matches(e)){return s}s=s[n]}return s};e.getAdjacentEl=a;var u=function(t,e,i){if(i===void 0){i=1}if(!t){return false}var n;if(i>0){n=e.scrollTop+e.offsetHeight>=t.offsetTop+t.offsetHeight}else{n=t.offsetTop>=e.scrollTop}return n};e.isScrolledIntoView=u;var h=function(t){if(typeof t!=="string"){return t}return t.replace(/&/g,"&").replace(/>/g,">").replace(/-1){return t.map((function(t){var e=t;if(e.id===parseInt("".concat(o.choiceId),10)){e.selected=true}return e}))}return t}case"REMOVE_ITEM":{var c=n;if(c.choiceId&&c.choiceId>-1){return t.map((function(t){var e=t;if(e.id===parseInt("".concat(c.choiceId),10)){e.selected=false}return e}))}return t}case"FILTER_CHOICES":{var a=n;return t.map((function(t){var e=t;e.active=a.results.some((function(t){var i=t.item,n=t.score;if(i.id===e.id){e.score=n;return true}return false}));return e}))}case"ACTIVATE_CHOICES":{var u=n;return t.map((function(t){var e=t;e.active=u.active;return e}))}case"CLEAR_CHOICES":{return e.defaultState}default:{return t}}}e["default"]=n},871:function(t,e){var i=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,s=e.length,r;n0?"treeitem":"option");Object.assign(x.dataset,{choice:"",id:f,value:d,selectText:i});if(m){x.classList.add(h);x.dataset.choiceDisabled="";x.setAttribute("aria-disabled","true")}else{x.classList.add(a);x.dataset.choiceSelectable=""}return x},input:function(t,e){var i=t.classNames,n=i.input,s=i.inputCloned;var r=Object.assign(document.createElement("input"),{type:"search",name:"search_terms",className:"".concat(n," ").concat(s),autocomplete:"off",autocapitalize:"off",spellcheck:false});r.setAttribute("role","textbox");r.setAttribute("aria-autocomplete","list");r.setAttribute("aria-label",e);return r},dropdown:function(t){var e=t.classNames,i=e.list,n=e.listDropdown;var s=document.createElement("div");s.classList.add(i,n);s.setAttribute("aria-expanded","false");return s},notice:function(t,e,i){var n;var s=t.allowHTML,r=t.classNames,o=r.item,c=r.itemChoice,a=r.noResults,u=r.noChoices;if(i===void 0){i=""}var h=[o,c];if(i==="no-choices"){h.push(u)}else if(i==="no-results"){h.push(a)}return Object.assign(document.createElement("div"),(n={},n[s?"innerHTML":"innerText"]=e,n.className=h.join(" "),n))},option:function(t){var e=t.label,i=t.value,n=t.customProperties,s=t.active,r=t.disabled;var o=new Option(e,i,false,s);if(n){o.dataset.customProperties="".concat(n)}o.disabled=!!r;return o}};e["default"]=i},996:function(t){var e=function t(e){return i(e)&&!n(e)};function i(t){return!!t&&typeof t==="object"}function n(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||o(t)}var s=typeof Symbol==="function"&&Symbol.for;var r=s?Symbol.for("react.element"):60103;function o(t){return t.$$typeof===r}function c(t){return Array.isArray(t)?[]:{}}function a(t,e){return e.clone!==false&&e.isMergeableObject(t)?b(c(t),t,e):t}function u(t,e,i){return t.concat(e).map((function(t){return a(t,i)}))}function h(t,e){if(!e.customMerge){return b}var i=e.customMerge(t);return typeof i==="function"?i:b}function l(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}function f(t){return Object.keys(t).concat(l(t))}function d(t,e){try{return e in t}catch(t){return false}}function v(t,e){return d(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function p(t,e,i){var n={};if(i.isMergeableObject(t)){f(t).forEach((function(e){n[e]=a(t[e],i)}))}f(e).forEach((function(s){if(v(t,s)){return}if(d(t,s)&&i.isMergeableObject(e[s])){n[s]=h(s,i)(t[s],e[s],i)}else{n[s]=a(e[s],i)}}));return n}function b(t,i,n){n=n||{};n.arrayMerge=n.arrayMerge||u;n.isMergeableObject=n.isMergeableObject||e;n.cloneUnlessOtherwiseSpecified=a;var s=Array.isArray(i);var r=Array.isArray(t);var o=s===r;if(!o){return a(i,n)}else if(s){return n.arrayMerge(t,i,n)}else{return p(t,i,n)}}b.all=function t(e,i){if(!Array.isArray(e)){throw new Error("first argument should be an array")}return e.reduce((function(t,e){return b(t,e,i)}),{})};var m=b;t.exports=m},221:function(t,e,i){i.r(e);i.d(e,{default:function(){return _t}});function n(t){return!Array.isArray?v(t)==="[object Array]":Array.isArray(t)}const s=1/0;function r(t){if(typeof t=="string"){return t}let e=t+"";return e=="0"&&1/t==-s?"-0":e}function o(t){return t==null?"":r(t)}function c(t){return typeof t==="string"}function a(t){return typeof t==="number"}function u(t){return t===true||t===false||l(t)&&v(t)=="[object Boolean]"}function h(t){return typeof t==="object"}function l(t){return h(t)&&t!==null}function f(t){return t!==undefined&&t!==null}function d(t){return!t.trim().length}function v(t){return t==null?t===undefined?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const p="Incorrect 'index' type";const b=t=>`Invalid value for key ${t}`;const m=t=>`Pattern length exceeds max of ${t}.`;const g=t=>`Missing ${t} property in key`;const _=t=>`Property 'weight' in key '${t}' must be a positive integer`;const x=Object.prototype.hasOwnProperty;class y{constructor(t){this._keys=[];this._keyMap={};let e=0;t.forEach((t=>{let i=w(t);e+=i.weight;this._keys.push(i);this._keyMap[i.id]=i;e+=i.weight}));this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function w(t){let e=null;let i=null;let s=null;let r=1;let o=null;if(c(t)||n(t)){s=t;e=O(t);i=j(t)}else{if(!x.call(t,"name")){throw new Error(g("name"))}const n=t.name;s=n;if(x.call(t,"weight")){r=t.weight;if(r<=0){throw new Error(_(n))}}e=O(n);i=j(n);o=t.getFn}return{path:e,id:i,weight:r,src:s,getFn:o}}function O(t){return n(t)?t:t.split(".")}function j(t){return n(t)?t.join("."):t}function I(t,e){let i=[];let s=false;const r=(t,e,h)=>{if(!f(t)){return}if(!e[h]){i.push(t)}else{let l=e[h];const d=t[l];if(!f(d)){return}if(h===e.length-1&&(c(d)||a(d)||u(d))){i.push(o(d))}else if(n(d)){s=true;for(let t=0,i=d.length;tt.score===e.score?t.idx{this._keysMap[t.id]=e}))}create(){if(this.isCreated||!this.docs.length){return}this.isCreated=true;if(c(this.docs[0])){this.docs.forEach(((t,e)=>{this._addString(t,e)}))}else{this.docs.forEach(((t,e)=>{this._addObject(t,e)}))}this.norm.clear()}add(t){const e=this.size();if(c(t)){this._addString(t,e)}else{this._addObject(t,e)}}removeAt(t){this.records.splice(t,1);for(let e=t,i=this.size();e{let r=e.getFn?e.getFn(t):this.getFn(t,e.path);if(!f(r)){return}if(n(r)){let t=[];const e=[{nestedArrIndex:-1,value:r}];while(e.length){const{nestedArrIndex:i,value:s}=e.pop();if(!f(s)){continue}if(c(s)&&!d(s)){let e={v:s,i,n:this.norm.get(s)};t.push(e)}else if(n(s)){s.forEach(((t,i)=>{e.push({nestedArrIndex:i,value:t})}))}else;}i.$[s]=t}else if(c(r)&&!d(r)){let t={v:r,n:this.norm.get(r)};i.$[s]=t}}));this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function N(t,e,{getFn:i=S.getFn,fieldNormWeight:n=S.fieldNormWeight}={}){const s=new T({getFn:i,fieldNormWeight:n});s.setKeys(t.map(w));s.setSources(e);s.create();return s}function D(t,{getFn:e=S.getFn,fieldNormWeight:i=S.fieldNormWeight}={}){const{keys:n,records:s}=t;const r=new T({getFn:e,fieldNormWeight:i});r.setKeys(n);r.setIndexRecords(s);return r}function $(t,{errors:e=0,currentLocation:i=0,expectedLocation:n=0,distance:s=S.distance,ignoreLocation:r=S.ignoreLocation}={}){const o=e/t.length;if(r){return o}const c=Math.abs(n-i);if(!s){return c?1:o}return o+c/s}function P(t=[],e=S.minMatchCharLength){let i=[];let n=-1;let s=-1;let r=0;for(let o=t.length;r=e){i.push([n,s])}n=-1}}if(t[r-1]&&r-n>=e){i.push([n,r-1])}return i}const R=32;function F(t,e,i,{location:n=S.location,distance:s=S.distance,threshold:r=S.threshold,findAllMatches:o=S.findAllMatches,minMatchCharLength:c=S.minMatchCharLength,includeMatches:a=S.includeMatches,ignoreLocation:u=S.ignoreLocation}={}){if(e.length>R){throw new Error(m(R))}const h=e.length;const l=t.length;const f=Math.max(0,Math.min(n,l));let d=r;let v=f;const p=c>1||a;const b=p?Array(l):[];let g;while((g=t.indexOf(e,v))>-1){let t=$(e,{currentLocation:g,expectedLocation:f,distance:s,ignoreLocation:u});d=Math.min(t,d);v=g+h;if(p){let t=0;while(t=a;r-=1){let o=r-1;let c=i[t.charAt(o)];if(p){b[o]=+!!c}g[r]=(g[r+1]<<1|1)&c;if(n){g[r]|=(_[r+1]|_[r])<<1|1|_[r+1]}if(g[r]&w){x=$(e,{errors:n,currentLocation:o,expectedLocation:f,distance:s,ignoreLocation:u});if(x<=d){d=x;v=o;if(v<=f){break}a=Math.max(1,2*f-v)}}}const O=$(e,{errors:n+1,currentLocation:f,expectedLocation:f,distance:s,ignoreLocation:u});if(O>d){break}_=g}const O={isMatch:v>=0,score:Math.max(.001,x)};if(p){const t=P(b,c);if(!t.length){O.isMatch=false}else if(a){O.indices=t}}return O}function H(t){let e={};for(let i=0,n=t.length;i{this.chunks.push({pattern:t,alphabet:H(t),startIndex:e})};const h=this.pattern.length;if(h>R){let t=0;const e=h%R;const i=h-e;while(t{const{isMatch:v,score:p,indices:b}=F(t,e,f,{location:n+d,distance:s,threshold:r,findAllMatches:o,minMatchCharLength:c,includeMatches:i,ignoreLocation:a});if(v){l=true}h+=p;if(v&&b){u=[...u,...b]}}));let f={isMatch:l,score:l?h/this.chunks.length:1};if(l&&i){f.indices=u}return f}}class G{constructor(t){this.pattern=t}static isMultiMatch(t){return U(t,this.multiRegex)}static isSingleMatch(t){return U(t,this.singleRegex)}search(){}}function U(t,e){const i=t.match(e);return i?i[1]:null}class V extends G{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class W extends G{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=t.indexOf(this.pattern);const i=e===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class J extends G{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class K extends G{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Z extends G{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class B extends G{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Y extends G{constructor(t,{location:e=S.location,threshold:i=S.threshold,distance:n=S.distance,includeMatches:s=S.includeMatches,findAllMatches:r=S.findAllMatches,minMatchCharLength:o=S.minMatchCharLength,isCaseSensitive:c=S.isCaseSensitive,ignoreLocation:a=S.ignoreLocation}={}){super(t);this._bitapSearch=new z(t,{location:e,threshold:i,distance:n,includeMatches:s,findAllMatches:r,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class q extends G{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0;let i;const n=[];const s=this.pattern.length;while((i=t.indexOf(this.pattern,e))>-1){e=i+s;n.push([i,e-1])}const r=!!n.length;return{isMatch:r,score:r?0:1,indices:n}}}const Q=[V,q,J,K,B,Z,W,Y];const X=Q.length;const tt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const et="|";function it(t,e={}){return t.split(et).map((t=>{let i=t.trim().split(tt).filter((t=>t&&!!t.trim()));let n=[];for(let t=0,s=i.length;t!!(t[at.AND]||t[at.OR]);const lt=t=>!!t[ut.PATH];const ft=t=>!n(t)&&h(t)&&!ht(t);const dt=t=>({[at.AND]:Object.keys(t).map((e=>({[e]:t[e]})))});function vt(t,e,{auto:i=true}={}){const s=t=>{let r=Object.keys(t);const o=lt(t);if(!o&&r.length>1&&!ht(t)){return s(dt(t))}if(ft(t)){const n=o?t[ut.PATH]:r[0];const s=o?t[ut.PATTERN]:t[n];if(!c(s)){throw new Error(b(n))}const a={keyId:j(n),pattern:s};if(i){a.searcher=ct(s,e)}return a}let a={children:[],operator:r[0]};r.forEach((e=>{const i=t[e];if(n(i)){i.forEach((t=>{a.children.push(s(t))}))}}));return a};if(!ht(t)){t=dt(t)}return s(t)}function pt(t,{ignoreFieldNorm:e=S.ignoreFieldNorm}){t.forEach((t=>{let i=1;t.matches.forEach((({key:t,norm:n,score:s})=>{const r=t?t.weight:null;i*=Math.pow(s===0&&r?Number.EPSILON:s,(r||1)*(e?1:n))}));t.score=i}))}function bt(t,e){const i=t.matches;e.matches=[];if(!f(i)){return}i.forEach((t=>{if(!f(t.indices)||!t.indices.length){return}const{indices:i,value:n}=t;let s={indices:i,value:n};if(t.key){s.key=t.key.src}if(t.idx>-1){s.refIndex=t.idx}e.matches.push(s)}))}function mt(t,e){e.score=t.score}function gt(t,e,{includeMatches:i=S.includeMatches,includeScore:n=S.includeScore}={}){const s=[];if(i)s.push(bt);if(n)s.push(mt);return t.map((t=>{const{idx:i}=t;const n={item:e[i],refIndex:i};if(s.length){s.forEach((e=>{e(t,n)}))}return n}))}class _t{constructor(t,e={},i){this.options={...S,...e};this._keyStore=new y(this.options.keys);this.setCollection(t,i)}setCollection(t,e){this._docs=t;if(e&&!(e instanceof T)){throw new Error(p)}this._myIndex=e||N(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){if(!f(t)){return}this._docs.push(t);this._myIndex.add(t)}remove(t=(()=>false)){const e=[];for(let i=0,n=this._docs.length;i-1){u=u.slice(0,e)}return gt(u,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(t){const e=ct(t,this.options);const{records:i}=this._myIndex;const n=[];i.forEach((({v:t,i,n:s})=>{if(!f(t)){return}const{isMatch:r,score:o,indices:c}=e.searchIn(t);if(r){n.push({item:t,idx:i,matches:[{score:o,value:t,norm:s,indices:c}]})}}));return n}_searchLogical(t){const e=vt(t,this.options);const i=(t,e,n)=>{if(!t.children){const{keyId:i,searcher:s}=t;const r=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(e,i),searcher:s});if(r&&r.length){return[{idx:n,item:e,matches:r}]}return[]}const s=[];for(let r=0,o=t.children.length;r{if(f(t)){let o=i(e,t,n);if(o.length){if(!s[n]){s[n]={idx:n,item:t,matches:[]};r.push(s[n])}o.forEach((({matches:t})=>{s[n].matches.push(...t)}))}}}));return r}_searchObjectList(t){const e=ct(t,this.options);const{keys:i,records:n}=this._myIndex;const s=[];n.forEach((({$:t,i:n})=>{if(!f(t)){return}let r=[];i.forEach(((i,n)=>{r.push(...this._findMatches({key:i,value:t[n],searcher:e}))}));if(r.length){s.push({idx:n,item:t,matches:r})}}));return s}_findMatches({key:t,value:e,searcher:i}){if(!f(e)){return[]}let s=[];if(n(e)){e.forEach((({v:e,i:n,n:r})=>{if(!f(e)){return}const{isMatch:o,score:c,indices:a}=i.searchIn(e);if(o){s.push({score:c,key:t,value:e,idx:n,norm:r,indices:a})}}))}else{const{v:n,n:r}=e;const{isMatch:o,score:c,indices:a}=i.searchIn(n);if(o){s.push({score:c,key:t,value:n,norm:r,indices:a})}}return s}}_t.version="6.6.2";_t.createIndex=N;_t.parseIndex=D;_t.config=S;{_t.parseQuery=vt}{ot(st)}},791:function(t,e,i){i.r(e);i.d(e,{__DO_NOT_USE__ActionTypes:function(){return f},applyMiddleware:function(){return y},bindActionCreators:function(){return _},combineReducers:function(){return m},compose:function(){return x},createStore:function(){return v},legacy_createStore:function(){return p}});function n(t){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function s(t,e){if(n(t)!=="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==undefined){var s=i.call(t,e||"default");if(n(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function r(t){var e=s(t,"string");return n(e)==="symbol"?e:String(e)}function o(t,e,i){e=r(e);if(e in t){Object.defineProperty(t,e,{value:i,enumerable:true,configurable:true,writable:true})}else{t[e]=i}return t}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function a(t){for(var e=1;e{const s=t[n];if(e(s,n,t)){i[n]=s}return i}),{})}function u(t){return typeof t!=="undefined"}const h=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}.ifx-select-container{background-color:#FFFFFF;box-sizing:border-box;font-family:var(--ifx-font-family);}.ifx-select-container.small-select{height:36px}.ifx-select-container.medium-select{height:40px}.ifx-select-container:hover{cursor:pointer}.ifx-select-container .ifx-label-wrapper{font-size:1rem;line-height:1.5rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%;overflow:hidden}.ifx-select-container .ifx-error-message-wrapper{color:#CD002F;font-size:0.75rem;line-height:1rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%;overflow:hidden}.ifx-select-container .ifx-choices__wrapper{box-sizing:border-box;position:relative;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;font-weight:400;font-style:normal}.ifx-select-container .ifx-choices__wrapper.small-select{height:36px;line-height:20px;padding:8px 12px;font-size:0.875rem;line-height:1.25rem}.ifx-select-container .ifx-choices__wrapper.medium-select{height:40px;line-height:24px;padding:8px 16px;font-size:1rem;line-height:1.5rem}.ifx-select-container .ifx-choices__wrapper.disabled{background:#EEEDED;color:#575352;border-color:#575352;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-select-container .ifx-choices__wrapper.error{border-color:#CD002F}.ifx-select-container .ifx-choices__wrapper:hover:not(.focus,:focus){border-color:#575352}.ifx-select-container .ifx-choices__wrapper.active{border-color:#0A8276 !important}.ifx-select-container .ifx-choices__wrapper.active .ifx-choices__icon-wrapper-up{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-select-container .ifx-choices__wrapper.active .ifx-choices__icon-wrapper-down{display:none}.ifx-select-container .ifx-choices__wrapper:focus-visible:not(.active):not(:active){outline:none}.ifx-select-container .ifx-choices__wrapper:focus-visible:not(.active):not(:active)::before{content:"";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:2px}.ifx-select-container .ifx-choices__wrapper:focus:not(.active,:active):not(.disabled)::before{content:"";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%)}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-up{display:none}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-up:hover{cursor:pointer}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-down{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-select-container .ifx-choices__wrapper .ifx-choices__icon-wrapper-down:hover{cursor:pointer}.ifx-select-container .choices{width:100%}.ifx-select-container .choices:focus{outline:none}.choices .ifx-select-container.is-focused{outline:none}.ifx-select-container .choices:last-child{margin-bottom:0}.ifx-select-container .choices.is-disabled .choices__inner,.ifx-select-container .choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-select-container .choices.is-disabled .choices__item{cursor:not-allowed;color:#575352}.ifx-select-container .choices [hidden]{display:none !important}.ifx-select-container .choices[data-type*=select-one]{cursor:pointer}.ifx-select-container .choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:8px 16px;border-bottom:1px solid #8D8786;background-color:#ffffff;margin:0;font-style:normal;font-weight:400}.ifx-select-container .choices[data-type*=select-one] .choices__input.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-select-container .choices[data-type*=select-one] .choices__input.medium-select{font-size:1rem;line-height:1.5rem}.ifx-select-container .choices[data-type*=select-one] .choices__single-button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:0.5}.ifx-select-container .choices[data-type*=select-one] .choices__single-button:hover,.ifx-select-container .choices[data-type*=select-one] .choices__single-button:focus{opacity:1}.ifx-select-container .choices[data-type*=select-one] .choices__single-button:focus{box-shadow:0px 0px 0px 2px #0A8276}.ifx-select-container .choices[data-type*=select-one] .choices__item[data-value=""] .choices__single-button{display:none}.ifx-select-container .choices[data-type*=select-one].is-open:after{margin-top:-7.5px}.ifx-select-container .choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.ifx-select-container .choices[data-type*=select-one][dir=rtl] .choices__single-button{right:auto;left:0;margin-left:25px;margin-right:0}.ifx-select-container .choices[data-type*=select-multiple]{cursor:pointer}.ifx-select-container .choices[data-type*=select-multiple] .choices__input{display:block;width:100%;margin:0}.ifx-select-container .choices[data-type*=select-multiple] .choices__inner,.ifx-select-container .choices[data-type*=text] .choices__inner{cursor:text}.ifx-select-container .choices[data-type*=select-multiple] .choices__button,.ifx-select-container .choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin-top:0;margin-right:-4px;margin-bottom:0;margin-left:8px;padding-left:16px;border-left:1px solid #0A8276;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:0.75;border-radius:0}.ifx-select-container .choices[data-type*=select-multiple] .choices__button:hover,.ifx-select-container .choices[data-type*=select-multiple] .choices__button:focus,.ifx-select-container .choices[data-type*=text] .choices__button:hover,.ifx-select-container .choices[data-type*=text] .choices__button:focus{opacity:1}.ifx-select-container .choices__inner{overflow:hidden}.ifx-select-container .is-focused .choices__inner,.ifx-select-container .is-open .choices__inner{border-color:#b7b7b7}.ifx-select-container .is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.ifx-select-container .is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.ifx-select-container .choices__list{margin:0;padding-left:0;list-style:none}.ifx-select-container .choices__list--single .choices__item{width:100%;display:flex;justify-content:space-between}.ifx-select-container .disabled>.choices__list--single .choices__item[data-value=""]{color:#8D8786;}.ifx-select-container .choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:0.75rem;line-height:1rem;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#0A8276;border:1px solid #0A8276;color:#FFFFFF;word-break:break-all;box-sizing:border-box}.ifx-select-container .choices__list--multiple .choices__item[data-deletable]{padding-right:5px}.ifx-select-container [dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.ifx-select-container .choices__list--multiple .choices__item.is-highlighted{background-color:#EEEDED;border:1px solid #0A8276}.ifx-select-container .choices__list--dropdown{visibility:hidden;box-sizing:border-box;position:absolute;width:100%;background-color:#fff;top:100%;margin-top:-1px;overflow:hidden;word-break:break-all;will-change:visibility;box-shadow:0px 0px 16px rgba(29, 29, 29, 0.12);border-radius:1px;margin-top:8px;z-index:1000;left:0}.ifx-select-container .choices__list--dropdown.is-active{visibility:visible}.ifx-select-container .is-open .choices__list--dropdown{border-color:#b7b7b7}.ifx-select-container .is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:0.25rem 0.25rem 0 0}.ifx-select-container .choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.ifx-select-container .choices__list--dropdown .choices__item{position:relative;padding:8px 16px;gap:8px;align-items:center;display:flex;justify-content:space-between;font-style:normal;font-weight:400}.ifx-select-container .choices__list--dropdown .choices__item.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-select-container .choices__list--dropdown .choices__item.medium-select{font-size:1rem;line-height:1.5rem}.ifx-select-container .choices__list--dropdown .choices__item.selected{color:#0A8276}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item{text-align:right}@media (min-width: 640px){.ifx-select-container .choices__list--dropdown .choices__item--selectable:after{font-size:0.75rem;line-height:1rem;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}.ifx-select-container [dir=rtl] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px}}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#EEEDED}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted.selected{color:#0A8276}.ifx-select-container .choices__list--dropdown .choices__item--selectable:hover{background-color:#EEEDED}.ifx-select-container .choices__list--dropdown .choices__item--selectable:hover.selected{color:#0A8276}.ifx-select-container .choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:0.5}.ifx-select-container .choices__item{cursor:default}.ifx-select-container .choices__item--selectable{cursor:pointer}.ifx-select-container .choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}.ifx-select-container .choices__heading{font-weight:600;font-size:0.75rem;line-height:1rem;padding:10px;border-bottom:1px solid #f7f7f7;color:#1D1D1D}.ifx-select-container .choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.ifx-select-container .choices__button:focus{outline:none}.ifx-select-container .choices__single-button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer;visibility:hidden}.ifx-select-container .choices__single-button:focus{outline:none}.ifx-select-container .choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:0.875rem;line-height:1.25rem;margin-bottom:5px;border:0;border-radius:0;max-width:100%}.ifx-select-container .choices__input--cloned{background-color:transparent}.ifx-select-container .choices__input::-ms-clear{display:none;width:0;height:0}.ifx-select-container .choices__input::-ms-reveal{display:none;width:0;height:0}.ifx-select-container .choices__input::-webkit-search-decoration,.ifx-select-container .choices__input::-webkit-search-cancel-button,.ifx-select-container .choices__input::-webkit-search-results-button,.ifx-select-container .choices__input::-webkit-search-results-decoration{display:none}.ifx-select-container .choices__input:focus{outline:0}.ifx-select-container [dir=rtl] .choices__input{padding-right:2px;padding-left:0}.ifx-select-container .choices__placeholder{opacity:0.5}';const l=class{constructor(i){t(this,i);this.ifxSelect=e(this,"ifxSelect",7);this.ifxInput=e(this,"ifxInput",7);this.type="single";this.value=undefined;this.name=undefined;this.items=undefined;this.choices=undefined;this.renderChoiceLimit=undefined;this.maxItemCount=undefined;this.addItems=undefined;this.removeItems=undefined;this.removeItemButton=undefined;this.editItems=undefined;this.duplicateItemsAllowed=undefined;this.delimiter=undefined;this.paste=undefined;this.searchEnabled=undefined;this.searchChoices=undefined;this.searchFields=undefined;this.searchFloor=undefined;this.searchResultLimit=undefined;this.position=undefined;this.resetScrollPosition=undefined;this.shouldSort=undefined;this.shouldSortItems=undefined;this.sorter=undefined;this.placeholder=undefined;this.placeholderValue=undefined;this.searchPlaceholderValue=undefined;this.prependValue=undefined;this.appendValue=undefined;this.renderSelectedChoices=undefined;this.loadingText=undefined;this.noResultsText=undefined;this.noChoicesText=undefined;this.itemSelectText=undefined;this.addItemText=undefined;this.maxItemText=undefined;this.uniqueItemText=undefined;this.classNames=undefined;this.fuseOptions=undefined;this.addItemFilter=undefined;this.customAddItemText=undefined;this.callbackOnInit=undefined;this.callbackOnCreateTemplates=undefined;this.valueComparer=undefined;this.ifxError=false;this.ifxErrorMessage="Error";this.ifxLabel="";this.ifxDisabled=false;this.ifxPlaceholderValue="Placeholder";this.ifxOptions=undefined;this.ifxSize="medium (40px)";this.ifxSelectedOption=null}async handleChange(){this.ifxSelect.emit(this.choice.getValue());this.ifxSelectedOption=this.choice.getValue();this.setPreSelected(this.ifxSelectedOption.value);this.closeDropdownMenu()}async highlightItem(t,e){this.choice.highlightItem(t,e);return this}async unhighlightItem(t){this.choice.unhighlightItem(t);return this}async highlightAll(){this.choice.highlightAll();return this}async unhighlightAll(){this.choice.unhighlightAll();return this}async removeActiveItemsByValue(t){this.choice.removeActiveItemsByValue(t);return this}async removeActiveItems(t){this.choice.removeActiveItems(t);return this}async removeHighlightedItems(t){this.choice.removeHighlightedItems(t);return this}async showDropdown(t){this.choice.showDropdown(t);return this}async hideDropdown(t){this.choice.hideDropdown(t);return this}async getValue(t){return this.choice.getValue(t)}async setValue(t){this.choice.setValue(t);return this}async setChoiceByValue(t){this.choice.setChoiceByValue(t);return this}isJSONParseable(t){try{JSON.parse(t);return true}catch(t){return false}}async setChoices(t,e,i,n){let s;if(typeof t==="string"){try{if(!this.isJSONParseable(t)){t=t.replace(/'/g,'"').replace(/"false"/g,"false").replace(/"true"/g,"true")}s=[...JSON.parse(t)]}catch(t){console.error("Failed to parse choices:",t)}}else if(Array.isArray(t)||typeof t==="object"){s=[...t]}else{console.error("Unexpected value for choices:",this.ifxOptions)}this.choice.setChoices(s,e,i,n);return this}async clearChoices(){this.choice.clearChoices();return this}async clearStore(){this.choice.clearStore();return this}async clearInput(){this.choice.clearInput();return this}async enable(){this.choice.enable();return this}async disable(){this.choice.disable();return this}async ajax(t){this.choice.ajax(t);return this}componentDidLoad(){this.init();this.addEventListenersToHandleCustomFocusAndActiveState()}componentDidUpdate(){this.init()}disconnectedCallback(){this.destroy()}render(){const t={"data-selector":"root",name:this.name||null};const e=`ifx-choices__wrapper ${this.getSizeClass()}`;this.destroy();switch(this.type){case"single":this.element=i("div",{class:`ifx-select-container`},this.ifxLabel?i("div",{class:"ifx-label-wrapper"},i("span",null,this.ifxLabel)):null,i("div",{class:`${e} \n ${this.ifxDisabled?"disabled":""} \n ${this.ifxError?"error":""}`,onClick:this.ifxDisabled?undefined:()=>this.toggleDropdown(),onKeyDown:t=>this.handleKeyDown(t)},i("select",Object.assign({},t,{"data-trigger":true,onChange:()=>this.handleChange()}),this.createSelectOptions(this.ifxOptions)),i("div",{class:"ifx-choices__icon-wrapper-up"},i("ifx-icon",{key:"icon-up",icon:"chevronup-16"})),i("div",{class:"ifx-choices__icon-wrapper-down"},i("ifx-icon",{key:"icon-down",icon:"chevron-down-16"}))),this.ifxError?i("div",{class:"ifx-error-message-wrapper"},i("span",null,this.ifxErrorMessage)):null);break}return this.element}toggleDropdown(){const t=this.root.querySelector(".ifx-choices__wrapper");if(t.classList.contains("active")||this.choice.dropdown.isActive){this.hideDropdown();t.classList.remove("active")}else{this.choice.showDropdown();t.classList.add("active")}const e=this.root.querySelector(".choices");e.classList.add("is-focused")}handleKeyDown(t){if(this.ifxDisabled)return;const e=t.target.classList.contains("choices__input");if(e&&t.code==="Space"){return}if(t.code==="Enter"||t.code==="Space"&&!e){this.toggleDropdown()}if(t.code==="Space"&&!e){t.preventDefault()}}handleClassList(t,e,i){t===null||t===void 0?void 0:t.classList[e](i)}closeDropdownMenu(){const t=this.root.querySelector(".ifx-choices__wrapper");this.handleClassList(t,"remove","active")}handleOutsideClick(t){const e=t.composedPath();const i=this.root.querySelector(".ifx-choices__wrapper");if(!e.includes(this.root)){this.handleClassList(i,"remove","active")}}getSizeClass(){return`${this.ifxSize}`==="s"?"small-select":"medium-select"}init(){const t={type:this.type,allowHTML:true,items:this.items,choices:this.choices,renderChoiceLimit:this.renderChoiceLimit,maxItemCount:this.maxItemCount,addItems:this.addItems,removeItems:this.removeItems,removeItemButton:this.removeItemButton,editItems:this.editItems,duplicateItemsAllowed:this.duplicateItemsAllowed,delimiter:this.delimiter,paste:this.paste,searchEnabled:this.searchEnabled,searchChoices:this.searchChoices,searchFields:this.searchFields,searchFloor:this.searchFloor,searchResultLimit:this.searchResultLimit,position:this.position,resetScrollPosition:this.resetScrollPosition,shouldSort:false,shouldSortItems:this.shouldSortItems,sorter:this.sorter,placeholder:this.placeholder,searchPlaceholderValue:this.searchPlaceholderValue,prependValue:this.prependValue,appendValue:this.appendValue,renderSelectedChoices:this.renderSelectedChoices,loadingText:this.loadingText,noResultsText:this.noResultsText,noChoicesText:this.noChoicesText,itemSelectText:this.itemSelectText,addItemText:this.addItemText,maxItemText:this.maxItemText,uniqueItemText:this.uniqueItemText,classNames:this.classNames,fuseOptions:this.fuseOptions,callbackOnInit:this.callbackOnInit,callbackOnCreateTemplates:this.callbackOnCreateTemplates,valueComparer:this.valueComparer,addItemFilter:this.addItemFilter,customAddItemText:this.customAddItemText};const e=a(t,u);this.ifxSelectedOption=null;const i=this.root.querySelector('[data-selector="root"]');if(i instanceof HTMLInputElement||i instanceof HTMLSelectElement){const t=this;if(this.type==="single"){this.choice=new c(i,Object.assign({},e,{callbackOnCreateTemplates:function(e){return{item:({classNames:i},n)=>{var s,r,o,c,a,u,h;let l="";if(n.placeholder&&!((s=t.ifxSelectedOption)===null||s===void 0?void 0:s.value)){return e(`\n
\n ${n.label===undefined?this.ifxPlaceholderValue:n.label}\n ${l}\n
\n `)}else{return e(`\n
\n ${((u=t.ifxSelectedOption)===null||u===void 0?void 0:u.label)!==undefined?(h=t.ifxSelectedOption)===null||h===void 0?void 0:h.label:t.choice.getValue().label}\n \x3c!-- Add your remove button here if needed --\x3e\n
\n `)}},input:({classNames:i})=>e(`\n \n `),choice:({classNames:i},n)=>{var s,r,o,c;return e(`\n
\n ${n.label}\n ${n.selected||((o=t.ifxSelectedOption)===null||o===void 0?void 0:o.value)===n.value||((c=t.getPreSelected(t))===null||c===void 0?void 0:c.value)===n.value?'':""}\n
\n `)}}}}));this.setChoices(this.ifxOptions,"value","label",true);t.addSearchEventListener(t,this.choice)}else if(this.type==="multiple"){this.choice=new c(i,Object.assign({},e,{removeItemButton:true,callbackOnCreateTemplates:function(e){return{choice:({classNames:t},i)=>e(`\n
0?'role="treeitem"':'role="option"'}">\n ${i.label}\n
\n `),input:({classNames:i})=>e(`\n \n `)}}}));this.setChoices(this.ifxOptions,"value","label",true)}else{this.choice=new c(i,Object.assign({},e,{removeItemButton:true}))}if(this.ifxDisabled){this.choice.disable()}else{this.choice.enable()}}}addEventListenersToHandleCustomFocusAndActiveState(){const t=this.root.querySelector(".ifx-choices__wrapper");if(!t){console.error(".ifx-choices__wrapper not found");return}t.tabIndex=0;t.addEventListener("focus",(function(){if(!this.classList.contains("disabled")){this.classList.add("focus")}}));t.addEventListener("blur",(function(){this.classList.remove("focus")}))}addSearchEventListener(t,e){e.passedElement.element.addEventListener("search",(function(e){t.ifxInput.emit(e.detail.value)}),false);return e}destroy(){if(this.element){this.element=null}if(this.choice){this.choice.destroy();this.choice=null}}getPreSelected(t){const e=Array.isArray(t.ifxOptions)?t.ifxOptions.find((t=>t.selected===true)):JSON.parse(t.ifxOptions).find((t=>t.selected===true));if(e){return e}else return null}setPreSelected(t){const e=Array.isArray(this.ifxOptions)?this.ifxOptions.map((t=>Object.assign(Object.assign({},t),{selected:false}))):JSON.parse(this.ifxOptions).map((t=>Object.assign(Object.assign({},t),{selected:false})));const i=e.map((e=>{if(e.value===t){return Object.assign(Object.assign({},e),{selected:true})}return e}));this.ifxOptions=[...i]}createSelectOptions(t){var e;if(this.value!=="undefined"||((e=this.ifxSelectedOption)===null||e===void 0?void 0:e.value)!==""){let e;if(this.isJSONParseable(t)){e=[...JSON.parse(t)]}else if(Array.isArray(t)||typeof t==="object"){e=[...t]}const n=e===null||e===void 0?void 0:e.find((t=>{var e;return t.value===this.value||((e=this.ifxSelectedOption)===null||e===void 0?void 0:e.value)}));if(n){return[i("option",{value:n.value},n.label)]}}return this.placeholder!=="false"?[i("option",{value:""},this.ifxPlaceholderValue)]:[i("option",{value:""})]}get root(){return n(this)}};l.style=h;export{l as ifx_select}; //# sourceMappingURL=p-602ec7ef.entry.js.map