"),l=this._render("dropdown"),c=W('
'),d=this.input.getAttribute("class")||"",u=s.mode;var h;J(r,s.wrapperClass,d,u),J(a,s.controlClass),B(r,a),J(l,s.dropdownClass,u),s.copyClassesToDropdown&&J(l,d),J(c,s.dropdownContentClass),B(l,c),W(s.dropdownParent||r).appendChild(l),K(s.controlInput)?(h=W(s.controlInput),V(["autocorrect","autocapitalize","autocomplete","spellcheck"],t=>{n.getAttribute(t)&&it(h,{[t]:n.getAttribute(t)})}),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):s.controlInput?(h=W(s.controlInput),this.focus_node=h):(h=W("
"),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,s=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown";it(s,{id:u}),it(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const h=H(c,t.inputId+"-ts-control"),p="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",f=document.querySelector(p),g=t.focus.bind(t);if(f){q(f,"click",g),it(f,{for:h});const e=H(f,t.inputId+"-ts-label");it(c,{"aria-labelledby":e}),it(s,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");J([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&it(l,{multiple:"multiple"}),e.placeholder&&it(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+r(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=F(e.load,e.loadThrottle)),q(n,"mousemove",()=>{t.ignoreHover=!1}),q(n,"mouseenter",e=>{var i=Z(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)},{capture:!0}),q(n,"click",e=>{const i=Z(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),M(e,!0))}),q(a,"click",e=>{var n=Z(e.target,"[data-ts-item]",a);n&&t.onItemSelect(e,n)?M(e,!0):""==i.value&&(t.onClick(),M(e,!0))}),q(c,"keydown",e=>t.onKeyDown(e)),q(i,"keypress",e=>t.onKeyPress(e)),q(i,"input",e=>t.onInput(e)),q(c,"blur",e=>t.onBlur(e)),q(c,"focus",e=>t.onFocus(e)),q(i,"paste",e=>t.onPaste(e));const m=e=>{const s=e.composedPath()[0];if(!o.contains(s)&&!n.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==i&&t.isOpen?e.stopPropagation():M(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};q(document,"mousedown",m),q(window,"scroll",v,d),q(window,"resize",v,d),this._destroy=()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),f&&f.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,q(l,"invalid",()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())}),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():l.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),J(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),V(e,t=>{this.registerOptionGroup(t)})}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'",option:(t,i)=>"
"+i(t[e])+"
",item:(t,i)=>"
"+i(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+" …
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?at(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){U(this.input,"input"),U(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?M(t):e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);V(i,t=>{$(t)&&(this.options[t]?e.addItem(t):e.createItem(t))})}},0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void M(t)):void 0}M(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&M(t);else{switch(t.keyCode){case 65:if(R(ot,t)&&""==e.control_input.value)return M(t),void e.selectAll();break;case 27:return e.isOpen&&(M(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void M(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void M(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),M(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&M(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),M(t)),e.settings.create&&e.createItem()&&M(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!R(ot,t)&&M(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null))(()=>{this.refreshTimeout=null,this._onInput()},this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void M(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,()=>{n.settings.closeAfterSelect&&n.close()}):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(M(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;J(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||Y(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,U(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){j(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(i=e&&e.type.toLowerCase())&&R("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(r=s,s=o,o=r),n=s;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);M(e)}else"click"===i&&R(ot,e)||"keydown"===i&&R("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&Y(i,"last-active"),J(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),Y(t,"active")}clearActiveItems(){Y(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,it(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),it(t,{"aria-selected":"true"}),J(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,s=i.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+s;r+o>n+s?this.scroll(r-n+o,e):r
{t.setActiveItemClass(e)}))}inputState(){var t=this;t.control.contains(t.control_input)&&(it(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&it(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout(()=>{t.ignoreFocus=!1,t.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,s=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(s,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter(t=>{let e=$(t.id);return!(e&&-1!==n.items.indexOf(e))})),e}refreshOptions(t=!0){var e,i,n,s,o,r,a,l,c,d;const u={},h=[];var p=this,f=p.inputValue();const g=f===p.lastQuery||""==f&&null==p.lastQuery;var m=p.search(f),v=null,_=p.settings.shouldOpen||!1,b=p.dropdown_content;g&&(v=p.activeOption)&&(c=v.closest("[data-group]")),s=m.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(_=!0);const y=(t,e)=>{let i=u[t];if(void 0!==i){let t=h[i];if(void 0!==t)return[i,t.fragment]}let n=document.createDocumentFragment();return i=h.length,h.push({fragment:n,order:e,optgroup:t}),[i,n]};for(e=0;e0&&(d=d.cloneNode(!0),it(d,{id:a.$id+"-clone-"+i,"aria-selected":null}),d.classList.add("ts-cloned"),Y(d,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===o.toString()&&(v=d)),l.appendChild(d),""!=o&&(u[o]=n)}}var w;p.settings.lockOptgroupOrder&&h.sort((t,e)=>t.order-e.order),a=document.createDocumentFragment(),V(h,t=>{let e=t.fragment,i=t.optgroup;if(!e||!e.children.length)return;let n=p.optgroups[i];if(void 0!==n){let t=document.createDocumentFragment(),i=p.render("optgroup_header",n);B(t,i),B(t,e);let s=p.render("optgroup",{group:n,options:t});B(a,s)}else B(a,e)}),b.innerHTML="",B(b,a),p.settings.highlight&&(w=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}),m.query.length&&m.tokens.length&&V(m.tokens,t=>{st(b,t.regex)}));var O=t=>{let e=p.render(t,{input:f});return e&&(_=!0,b.insertBefore(e,b.firstChild)),e};if(p.loading?O("loading"):p.settings.shouldLoad.call(p,f)?0===m.items.length&&O("no_results"):O("not_loading"),(l=p.canCreate(f))&&(d=O("option_create")),p.hasOptions=m.items.length>0||l,_){if(m.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let t=0;d&&!p.settings.addPrecedence&&(t=1),v=p.selectable()[t]}}else d&&(v=d);t&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=$(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){V(t,t=>{this.addOption(t,e)})}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=$(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,s;const o=$(t),r=$(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=i.getOption(o),c=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);nt(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}c&&(-1!==(s=i.items.indexOf(o))&&i.items.splice(s,1,r),n=i._render("item",e),c.classList.contains("active")&&J(n,"active"),nt(c,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=P(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};V(this.options,(t,n)=>{e(t,n)&&(i[n]=t)}),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=$(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n;if(!t)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=$(t);return null!==e?this.control.querySelector(`[data-value="${z(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const s=(n=n.filter(t=>-1===i.items.indexOf(t)))[n.length-1];n.forEach(t=>{i.isPending=t!==s,i.addItem(t,e)})}addItem(t,e){j(this,e?[]:["change","dropdown_close"],()=>{var i,n;const s=this,o=s.settings.mode,r=$(t);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(e),"multi"!==o||!s.isFull())){if(i=s._render("item",s.options[r]),s.control.contains(i)&&(i=i.cloneNode(!0)),n=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(i),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(r),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,i),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!n&&s.isFull())&&(s.inputState(),s.refreshState())}})}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,s;const o=t.dataset.value;n=et(t),t.remove(),t.classList.contains("active")&&(s=i.activeItems.indexOf(t),i.activeItems.splice(s,1),Y(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n{}){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,s=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,r=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=$(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(s),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,r):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||r(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;var s;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("readonly",t.isReadOnly),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",(s=t.options,0===Object.keys(s).length)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length;function a(t,i,n){return t||(t=W(''+D(n)+" ")),t!=s&&e.input.append(t),o.push(t),(t!=s||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach(t=>{t.selected=!1}),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach(t=>{i=e.options[t],n=i[e.settings.labelField]||"",o.includes(i.$option)?a(e.input.querySelector(`option[value="${z(t)}"]:not(:checked)`),t,n):i.$option=a(i.$option,t,n)})}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,it(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),Q(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),Q(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,it(e.focus_node,{"aria-expanded":"false"}),Q(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;Q(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();V(i,t=>{e.removeItem(t,!0)}),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,s,o,r=this;e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=tt(r.activeItems,e),n=et(s),e>0&&n++,V(r.activeItems,t=>a.push(t));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(n=t[r.caretPos]),void 0!==n&&a.push(n)}if(!r.shouldDelete(a,t))return!1;for(M(t,!0),void 0!==n&&r.setCaret(n);a.length;)r.removeItem(a.pop());return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map(t=>t.dataset.value);return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,s=this;s.rtl&&(t*=-1),s.inputValue().length||(R(ot,e)||R("shiftKey",e)?(n=(i=s.getLastActive(t))?i.classList.contains("active")?s.getAdjacent(i,t,"item"):i:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(n.classList.contains("active")&&s.removeActiveItem(i),s.setActiveItemClass(n)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?tt(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,Y(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=s.settings.render[t].call(this,e,D)))return null;if(n=W(n),"option"===t||"option_create"===t?e[s.settings.disabledField]?it(n,{"aria-disabled":"true"}):it(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[s.settings.optgroupValueField],it(n,{"data-group":i}),e.group[s.settings.disabledField]&&it(n,{"data-disabled":""})),"option"===t||"item"===t){const i=P(e[s.settings.valueField]);it(n,{"data-value":i}),"item"===t?(J(n,s.settings.itemClass),it(n,{"data-ts-item":""})):(J(n,s.settings.optionClass),it(n,{role:"option",id:e.$id}),e.$div=n,s.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){V(this.options,t=>{t.$div&&(t.$div.remove(),delete t.$div)})}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,s=n[e];n[e]=function(){var e,o;return"after"===t&&(e=s.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=s.apply(n,arguments)),e)}}}return ct.define("change_listener",function(){q(this.input,"change",()=>{this.sync()})}),ct.define("checkbox_options",function(t){var e=this,i=e.onOptionSelect;e.settings.hideSelected=!1;const n=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var s=function(t,e){e?(t.checked=!0,n.uncheckedClassNames&&t.classList.remove(...n.uncheckedClassNames),n.checkedClassNames&&t.classList.add(...n.checkedClassNames)):(t.checked=!1,n.checkedClassNames&&t.classList.remove(...n.checkedClassNames),n.uncheckedClassNames&&t.classList.add(...n.uncheckedClassNames))},o=function(t){setTimeout(()=>{var e=t.querySelector("input."+n.className);e instanceof HTMLInputElement&&s(e,t.classList.contains("selected"))},1)};e.hook("after","setupTemplates",()=>{var t=e.settings.render.option;e.settings.render.option=(i,o)=>{var r=W(t.call(e,i,o)),a=document.createElement("input");n.className&&a.classList.add(n.className),a.addEventListener("click",function(t){M(t)}),a.type="checkbox";const l=$(i[e.settings.valueField]);return s(a,!!(l&&e.items.indexOf(l)>-1)),r.prepend(a),r}}),e.on("item_remove",t=>{var i=e.getOption(t);i&&(i.classList.remove("selected"),o(i))}),e.on("item_add",t=>{var i=e.getOption(t);i&&o(i)}),e.hook("instead","onOptionSelect",(t,n)=>{if(n.classList.contains("selected"))return n.classList.remove("selected"),e.removeItem(n.dataset.value),e.refreshOptions(),void M(t,!0);i.call(e,t,n),o(n)})}),ct.define("clear_button",function(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`⨯
`},t);e.on("initialize",()=>{var t=W(i.html(i));t.addEventListener("click",t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())}),e.control.appendChild(t)})}),ct.define("drag_drop",function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,i=t.unlock;let n,s=!0;t.hook("after","setupTemplates",()=>{var e=t.settings.render.item;t.settings.render.item=(i,o)=>{const r=W(e.call(t,i,o));it(r,{draggable:"true"});const a=t=>{t.preventDefault(),r.classList.add("ts-drag-over"),l(r,n)},l=(t,e)=>{var i,n,s;void 0!==e&&(((t,e)=>{do{var i;if(t==(e=null==(i=e)?void 0:i.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,r)?(n=e,null==(s=(i=t).parentNode)||s.insertBefore(n,i.nextSibling)):((t,e)=>{var i;null==(i=t.parentNode)||i.insertBefore(e,t)})(t,e))};return q(r,"mousedown",t=>{s||M(t),t.stopPropagation()}),q(r,"dragstart",t=>{n=r,setTimeout(()=>{r.classList.add("ts-dragging")},0)}),q(r,"dragenter",a),q(r,"dragover",a),q(r,"dragleave",()=>{r.classList.remove("ts-drag-over")}),q(r,"dragend",()=>{var e;document.querySelectorAll(".ts-drag-over").forEach(t=>t.classList.remove("ts-drag-over")),null==(e=n)||e.classList.remove("ts-dragging"),n=void 0;var i=[];t.control.querySelectorAll("[data-value]").forEach(t=>{if(t.dataset.value){let e=t.dataset.value;e&&i.push(e)}}),t.setValue(i)}),r}}),t.hook("instead","lock",()=>(s=!1,e.call(t))),t.hook("instead","unlock",()=>(s=!0,i.call(t)))}),ct.define("dropdown_header",function(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>''},t);e.on("initialize",()=>{var t=W(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",t=>{M(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})}),ct.define("caret_position",function(){var t=this;t.hook("instead","setCaret",e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach((i,n)=>{n{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const n=et(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),Y(i,"last-active")}else t.setCaret(t.caretPos+e)})}),ct.define("dropdown_input",function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",()=>{t.focus_node=t.control,J(t.control_input,"dropdown-input");const e=W('');e.append(t.control_input),t.dropdown.insertBefore(e,t.dropdown.firstChild);const i=W('
');i.placeholder=t.settings.placeholder||"",t.control.append(i)}),t.on("initialize",()=>{t.control_input.addEventListener("keydown",e=>{switch(e.keyCode){case 27:return t.isOpen&&(M(e,!0),t.close()),void t.clearActiveItems();case 9:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)}),t.on("blur",()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex}),t.on("dropdown_open",()=>{t.control_input.focus()});const e=t.onBlur;t.hook("instead","onBlur",i=>{if(!i||i.relatedTarget!=t.control_input)return e.call(t)}),q(t.control_input,"blur",()=>t.onBlur()),t.hook("before","close",()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})})})}),ct.define("input_autogrow",function(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),i=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);for(const t of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])e.style[t]=i.style[t];var n=()=>{e.textContent=i.value,i.style.width=e.clientWidth+"px"};n(),t.on("update item_add item_remove",n),q(i,"input",n),q(i,"keyup",n),q(i,"blur",n),q(i,"update",n)})}),ct.define("no_backspace_delete",function(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",i=>!!t.activeItems.length&&e.call(t,i))}),ct.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),ct.define("optgroup_columns",function(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",i=>{var n,s,o,r;if(!t.isOpen||37!==i.keyCode&&39!==i.keyCode)return e.call(t,i);t.ignoreHover=!0,r=Z(t.activeOption,"[data-group]"),n=et(t.activeOption,"[data-selectable]"),r&&(r=37===i.keyCode?r.previousSibling:r.nextSibling)&&(s=(o=r.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,n)])&&t.setActiveOption(s)})}),ct.define("remove_button",function(t){const e=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},t);var i=this;if(e.append){var n='
'+e.label+" ";i.hook("after","setupTemplates",()=>{var t=i.settings.render.item;i.settings.render.item=(e,s)=>{var o=W(t.call(i,e,s)),r=W(n);return o.appendChild(r),q(r,"mousedown",t=>{M(t,!0)}),q(r,"click",t=>{i.isLocked||(M(t,!0),i.isLocked||i.shouldDelete([o],t)&&(i.removeItem(o),i.refreshOptions(!1),i.inputState()))}),o}})}}),ct.define("restore_on_backspace",function(t){const e=this,i=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",function(t){if(e.isFocused&&""===e.control_input.value.trim()){var n=e.options[t];n&&e.setTextboxValue(i.text.call(e,n))}})}),ct.define("virtual_scroll",function(){const t=this,e=t.canLoad,i=t.clearActiveOption,n=t.loadCallback;var s,o,r={},a=!1,l=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(s.clientHeight/(s.scrollHeight-s.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const c=e=>!("number"==typeof t.settings.maxOptions&&s.children.length>=t.settings.maxOptions||!(e in r)||!r[e]),d=(e,i)=>t.items.indexOf(i)>=0||l.indexOf(i)>=0;t.setNextUrl=(t,e)=>{r[t]=e},t.getUrl=e=>{if(e in r){const t=r[e];return r[e]=!1,t}return t.clearPagination(),t.settings.firstUrl.call(t,e)},t.clearPagination=()=>{r={}},t.hook("instead","clearActiveOption",()=>{if(!a)return i.call(t)}),t.hook("instead","canLoad",i=>i in r?c(i):e.call(t,i)),t.hook("instead","loadCallback",(e,i)=>{if(a){if(o){const i=e[0];void 0!==i&&(o.dataset.value=i[t.settings.valueField])}}else t.clearOptions(d);n.call(t,e,i),a=!1}),t.hook("after","refreshOptions",()=>{const e=t.lastValue;var i;c(e)?(i=t.render("loading_more",{query:e}))&&(i.setAttribute("data-selectable",""),o=i):e in r&&!s.querySelector(".no-results")&&(i=t.render("no_more_results",{query:e})),i&&(J(i,t.settings.optionClass),s.append(i))}),t.on("initialize",()=>{l=Object.keys(t.options),s=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'
Loading more results ...
',no_more_results:()=>'
No more results
'},t.settings.render),s.addEventListener("scroll",()=>{t.settings.shouldLoadMore.call(t)&&c(t.lastValue)&&(a||(a=!0,t.load.call(t,t.lastValue)))})})}),ct}()}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=i(414),e=i.n(t);class n{constructor(t,e=!0,i=[],n=5e3){this.ctx=t,this.iframes=e,this.exclude=i,this.iframesTimeout=n}static matches(t,e){const i="string"==typeof e?[e]:e,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;if(n){let e=!1;return i.every(i=>!n.call(t,i)||(e=!0,!1)),e}return!1}getContexts(){let t,e=[];return t=void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[],t.forEach(t=>{const i=e.filter(e=>e.contains(t)).length>0;-1!==e.indexOf(t)||i||e.push(t)}),e}getIframeContents(t,e,i=()=>{}){let n;try{const e=t.contentWindow;if(n=e.document,!e||!n)throw new Error("iframe inaccessible")}catch(t){i()}n&&e(n)}isIframeBlank(t){const e="about:blank",i=t.getAttribute("src").trim();return t.contentWindow.location.href===e&&i!==e&&i}observeIframeLoad(t,e,i){let n=!1,s=null;const o=()=>{if(!n){n=!0,clearTimeout(s);try{this.isIframeBlank(t)||(t.removeEventListener("load",o),this.getIframeContents(t,e,i))}catch(t){i()}}};t.addEventListener("load",o),s=setTimeout(o,this.iframesTimeout)}onIframeReady(t,e,i){try{"complete"===t.contentWindow.document.readyState?this.isIframeBlank(t)?this.observeIframeLoad(t,e,i):this.getIframeContents(t,e,i):this.observeIframeLoad(t,e,i)}catch(t){i()}}waitForIframes(t,e){let i=0;this.forEachIframe(t,()=>!0,t=>{i++,this.waitForIframes(t.querySelector("html"),()=>{--i||e()})},t=>{t||e()})}forEachIframe(t,e,i,s=()=>{}){let o=t.querySelectorAll("iframe"),r=o.length,a=0;o=Array.prototype.slice.call(o);const l=()=>{--r<=0&&s(a)};r||l(),o.forEach(t=>{n.matches(t,this.exclude)?l():this.onIframeReady(t,n=>{e(t)&&(a++,i(n)),l()},l)})}createIterator(t,e,i){return document.createNodeIterator(t,e,i,!1)}createInstanceOnIframe(t){return new n(t.querySelector("html"),this.iframes)}compareNodeIframe(t,e,i){if(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING){if(null===e)return!0;if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}getIteratorNode(t){const e=t.previousNode();let i;return i=(null===e||t.nextNode())&&t.nextNode(),{prevNode:e,node:i}}checkIframeFilter(t,e,i,n){let s=!1,o=!1;return n.forEach((t,e)=>{t.val===i&&(s=e,o=t.handled)}),this.compareNodeIframe(t,e,i)?(!1!==s||o?!1===s||o||(n[s].handled=!0):n.push({val:i,handled:!0}),!0):(!1===s&&n.push({val:i,handled:!1}),!1)}handleOpenIframes(t,e,i,n){t.forEach(t=>{t.handled||this.getIframeContents(t.val,t=>{this.createInstanceOnIframe(t).forEachNode(e,i,n)})})}iterateThroughNodes(t,e,i,n,s){const o=this.createIterator(e,t,n);let r,a,l=[],c=[],d=()=>(({prevNode:a,node:r}=this.getIteratorNode(o)),r);for(;d();)this.iframes&&this.forEachIframe(e,t=>this.checkIframeFilter(r,a,t,l),e=>{this.createInstanceOnIframe(e).forEachNode(t,t=>c.push(t),n)}),c.push(r);c.forEach(t=>{i(t)}),this.iframes&&this.handleOpenIframes(l,t,i,n),s()}forEachNode(t,e,i,n=()=>{}){const s=this.getContexts();let o=s.length;o||n(),s.forEach(s=>{const r=()=>{this.iterateThroughNodes(t,s,e,i,()=>{--o<=0&&n()})};this.iframes?this.waitForIframes(s,r):r()})}}class s{constructor(t){this.ctx=t,this.ie=!1;const e=window.navigator.userAgent;(e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(t){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},t)}get opt(){return this._opt}get iterator(){return new n(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(t,e="debug"){const i=this.opt.log;this.opt.debug&&"object"==typeof i&&"function"==typeof i[e]&&i[e](`mark.js: ${t}`)}escapeStr(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(t){return"disabled"!==this.opt.wildcards&&(t=this.setupWildcardsRegExp(t)),t=this.escapeStr(t),Object.keys(this.opt.synonyms).length&&(t=this.createSynonymsRegExp(t)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),this.opt.diacritics&&(t=this.createDiacriticsRegExp(t)),t=this.createMergedBlanksRegExp(t),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.createJoinersRegExp(t)),"disabled"!==this.opt.wildcards&&(t=this.createWildcardsRegExp(t)),t=this.createAccuracyRegExp(t)}createSynonymsRegExp(t){const e=this.opt.synonyms,i=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let s in e)if(e.hasOwnProperty(s)){const o=e[s],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==r&&""!==a&&(t=t.replace(new RegExp(`(${this.escapeStr(r)}|${this.escapeStr(a)})`,`gm${i}`),n+`(${this.processSynomyms(r)}|`+`${this.processSynomyms(a)})`+n))}return t}processSynomyms(t){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),t}setupWildcardsRegExp(t){return(t=t.replace(/(?:\\)*\?/g,t=>"\\"===t.charAt(0)?"?":"")).replace(/(?:\\)*\*/g,t=>"\\"===t.charAt(0)?"*":"")}createWildcardsRegExp(t){let e="withSpaces"===this.opt.wildcards;return t.replace(/\u0001/g,e?"[\\S\\s]?":"\\S?").replace(/\u0002/g,e?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(t){return t.replace(/[^(|)\\]/g,(t,e,i)=>{let n=i.charAt(e+1);return/[(|)\\]/.test(n)||""===n?t:t+"\0"})}createJoinersRegExp(t){let e=[];const i=this.opt.ignorePunctuation;return Array.isArray(i)&&i.length&&e.push(this.escapeStr(i.join(""))),this.opt.ignoreJoiners&&e.push("\\u00ad\\u200b\\u200c\\u200d"),e.length?t.split(/\u0000+/).join(`[${e.join("")}]*`):t}createDiacriticsRegExp(t){const e=this.opt.caseSensitive?"":"i",i=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return t.split("").forEach(s=>{i.every(i=>{if(-1!==i.indexOf(s)){if(n.indexOf(i)>-1)return!1;t=t.replace(new RegExp(`[${i}]`,`gm${e}`),`[${i}]`),n.push(i)}return!0})}),t}createMergedBlanksRegExp(t){return t.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(t){let e=this.opt.accuracy,i="string"==typeof e?e:e.value,n="string"==typeof e?[]:e.limiters,s="";switch(n.forEach(t=>{s+=`|${this.escapeStr(t)}`}),i){case"partially":default:return`()(${t})`;case"complementary":return s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")),`()([^${s}]*${t}[^${s}]*)`;case"exactly":return`(^|\\s${s})(${t})(?=$|\\s${s})`}}getSeparatedKeywords(t){let e=[];return t.forEach(t=>{this.opt.separateWordSearch?t.split(" ").forEach(t=>{t.trim()&&-1===e.indexOf(t)&&e.push(t)}):t.trim()&&-1===e.indexOf(t)&&e.push(t)}),{keywords:e.sort((t,e)=>e.length-t.length),length:e.length}}isNumeric(t){return Number(parseFloat(t))==t}checkRanges(t){if(!Array.isArray(t)||"[object Object]"!==Object.prototype.toString.call(t[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(t),[];const e=[];let i=0;return t.sort((t,e)=>t.start-e.start).forEach(t=>{let{start:n,end:s,valid:o}=this.callNoMatchOnInvalidRanges(t,i);o&&(t.start=n,t.length=s-n,e.push(t),i=s)}),e}callNoMatchOnInvalidRanges(t,e){let i,n,s=!1;return t&&void 0!==t.start?(i=parseInt(t.start,10),n=i+parseInt(t.length,10),this.isNumeric(t.start)&&this.isNumeric(t.length)&&n-e>0&&n-i>0?s=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(t)}`),this.opt.noMatch(t))):(this.log(`Ignoring invalid range: ${JSON.stringify(t)}`),this.opt.noMatch(t)),{start:i,end:n,valid:s}}checkWhitespaceRanges(t,e,i){let n,s=!0,o=i.length,r=e-o,a=parseInt(t.start,10)-r;return a=a>o?o:a,n=a+parseInt(t.length,10),n>o&&(n=o,this.log(`End range automatically set to the max value of ${o}`)),a<0||n-a<0||a>o||n>o?(s=!1,this.log(`Invalid range: ${JSON.stringify(t)}`),this.opt.noMatch(t)):""===i.substring(a,n).replace(/\s+/g,"")&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:a,end:n,valid:s}}getTextNodes(t){let e="",i=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,t=>{i.push({start:e.length,end:(e+=t.textContent).length,node:t})},t=>this.matchesExclude(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{t({value:e,nodes:i})})}matchesExclude(t){return n.matches(t,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(t,e,i){const n=this.opt.element?this.opt.element:"mark",s=t.splitText(e),o=s.splitText(i-e);let r=document.createElement(n);return r.setAttribute("data-markjs","true"),this.opt.className&&r.setAttribute("class",this.opt.className),r.textContent=s.textContent,s.parentNode.replaceChild(r,s),o}wrapRangeInMappedTextNode(t,e,i,n,s){t.nodes.every((o,r)=>{const a=t.nodes[r+1];if(void 0===a||a.start>e){if(!n(o.node))return!1;const a=e-o.start,l=(i>o.end?o.end:i)-o.start,c=t.value.substr(0,o.start),d=t.value.substr(l+o.start);if(o.node=this.wrapRangeInTextNode(o.node,a,l),t.value=c+d,t.nodes.forEach((e,i)=>{i>=r&&(t.nodes[i].start>0&&i!==r&&(t.nodes[i].start-=l),t.nodes[i].end-=l)}),i-=l,s(o.node.previousSibling,o.start),!(i>o.end))return!1;e=o.end}return!0})}wrapMatches(t,e,i,n,s){const o=0===e?0:e+1;this.getTextNodes(e=>{e.nodes.forEach(e=>{let s;for(e=e.node;null!==(s=t.exec(e.textContent))&&""!==s[o];){if(!i(s[o],e))continue;let r=s.index;if(0!==o)for(let t=1;t
{let r;for(;null!==(r=t.exec(e.value))&&""!==r[o];){let s=r.index;if(0!==o)for(let t=1;ti(r[o],t),(e,i)=>{t.lastIndex=i,n(e)})}s()})}wrapRangeFromIndex(t,e,i,n){this.getTextNodes(s=>{const o=s.value.length;t.forEach((t,n)=>{let{start:r,end:a,valid:l}=this.checkWhitespaceRanges(t,o,s.value);l&&this.wrapRangeInMappedTextNode(s,r,a,i=>e(i,t,s.value.substring(r,a),n),e=>{i(e,t)})}),n()})}unwrapMatches(t){const e=t.parentNode;let i=document.createDocumentFragment();for(;t.firstChild;)i.appendChild(t.removeChild(t.firstChild));e.replaceChild(i,t),this.ie?this.normalizeTextNode(e):e.normalize()}normalizeTextNode(t){if(t){if(3===t.nodeType)for(;t.nextSibling&&3===t.nextSibling.nodeType;)t.nodeValue+=t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);else this.normalizeTextNode(t.firstChild);this.normalizeTextNode(t.nextSibling)}}markRegExp(t,e){this.opt=e,this.log(`Searching with expression "${t}"`);let i=0,n="wrapMatches";this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](t,this.opt.ignoreGroups,(t,e)=>this.opt.filter(e,t,i),t=>{i++,this.opt.each(t)},()=>{0===i&&this.opt.noMatch(t),this.opt.done(i)})}mark(t,e){this.opt=e;let i=0,n="wrapMatches";const{keywords:s,length:o}=this.getSeparatedKeywords("string"==typeof t?[t]:t),r=this.opt.caseSensitive?"":"i",a=t=>{let e=new RegExp(this.createRegExp(t),`gm${r}`),l=0;this.log(`Searching with expression "${e}"`),this[n](e,1,(e,n)=>this.opt.filter(n,t,i,l),t=>{l++,i++,this.opt.each(t)},()=>{0===l&&this.opt.noMatch(t),s[o-1]===t?this.opt.done(i):a(s[s.indexOf(t)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),0===o?this.opt.done(i):a(s[0])}markRanges(t,e){this.opt=e;let i=0,n=this.checkRanges(t);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(t,e,i,n)=>this.opt.filter(t,e,i,n),(t,e)=>{i++,this.opt.each(t,e)},()=>{this.opt.done(i)})):this.opt.done(i)}unmark(t){this.opt=t;let e=this.opt.element?this.opt.element:"*";e+="[data-markjs]",this.opt.className&&(e+=`.${this.opt.className}`),this.log(`Removal selector "${e}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,t=>{this.unwrapMatches(t)},t=>{const i=n.matches(t,e),s=this.matchesExclude(t);return!i||s?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}function o(t){const e=new s(t);return this.mark=(t,i)=>(e.mark(t,i),this),this.markRegExp=(t,i)=>(e.markRegExp(t,i),this),this.markRanges=(t,i)=>(e.markRanges(t,i),this),this.unmark=t=>(e.unmark(t),this),this}var r=i(766),a=i.n(r);function l(t){return l="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},l(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 d(t){for(var e=1;e'.concat(t.getAttribute("data-ea-i18n-no-results-found")," ")}},plugins:{dropdown_input:{}}};return null===t.getAttribute("required")&&null===t.getAttribute("disabled")&&(e.plugins.clear_button={title:""}),null!==t.getAttribute("multiple")&&(e.plugins.remove_button={title:""}),null!==t.getAttribute("data-ea-autocomplete-endpoint-url")&&(e.plugins.virtual_scroll={}),"true"===t.getAttribute("data-ea-autocomplete-allow-item-create")&&(e.create=!0),e}function b(t){var e=g(m,this,E).call(this,g(m,this,_).call(this,t),{maxOptions:null});if(g(m,this,x).call(this,t)){var i=g(m,this,k).call(this,t,!1),n=i.options,s=i.optgroups;e=g(m,this,E).call(this,e,{options:n,optgroups:s,optgroupField:"optgroup",lockOptgroupOrder:!0,valueField:"value",labelField:"text",searchField:["text"]})}return g(m,this,O).call(this,t,e)}function y(t){var e=g(m,this,E).call(this,g(m,this,_).call(this,t),{valueField:"value",labelField:"label_raw",searchField:["label_text"],maxOptions:null,render:{item:function(t,e){return"".concat(t.label_raw,"
")},option:function(t,e){return"".concat(t.label_raw,"
")}}});if(g(m,this,x).call(this,t)){var i=g(m,this,k).call(this,t,!0),n=i.options,s=i.optgroups;e=g(m,this,E).call(this,e,{options:n,optgroups:s,optgroupField:"optgroup",lockOptgroupOrder:!0})}else e.options=g(m,this,C).call(this,t,!0);return g(m,this,O).call(this,t,e)}function w(t,e){var i="true"===t.getAttribute("data-ea-autocomplete-render-items-as-html"),n=g(m,this,E).call(this,g(m,this,_).call(this,t),{valueField:"entityId",labelField:"entityAsString",searchField:["entityAsString"],firstUrl:function(t){return"".concat(e,"&query=").concat(encodeURIComponent(t))},load:function(t,e){var i=this,n=this.getUrl(t);fetch(n).then(function(t){return t.json()}).then(function(n){i.setNextUrl(t,n.next_page),e(n.results)}).catch(function(){return e()})},preload:"focus",maxOptions:null,score:function(t){return function(t){return 1}},render:{option:function(t,e){return"".concat(i?t.entityAsString:e(t.entityAsString),"
")},item:function(t,e){return"".concat(i?t.entityAsString:e(t.entityAsString),"
")},loading_more:function(e,i){return''.concat(t.getAttribute("data-ea-i18n-loading-more-results"),"
")},no_more_results:function(e,i){return''.concat(t.getAttribute("data-ea-i18n-no-more-results"),"
")},no_results:function(e,i){return''.concat(t.getAttribute("data-ea-i18n-no-results-found"),"
")}}});return g(m,this,O).call(this,t,n)}function O(t,e){t.dispatchEvent(new CustomEvent("ea.autocomplete.pre-connect",{detail:{config:e,prefix:"autocomplete"},bubbles:!0}));var i=new(a())(t,e);return t.dispatchEvent(new CustomEvent("ea.autocomplete.connect",{detail:{tomSelect:i,config:e,prefix:"autocomplete"},bubbles:!0})),i}function A(t){return t.replace(/(<([^>]+)>)/gi,"")}function E(t,e){return d(d({},t),e)}function x(t){for(var e=0;e1&&void 0!==arguments[1]&&arguments[1];if(null===t||""===t)return null;try{var i=new URL(t,window.location.origin);return["http:","https:","mailto:","tel:"].includes(i.protocol)?e&&i.origin!==window.location.origin?null:t:null}catch(t){return null}}function L(t){return L="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},L(t)}function N(t,e){for(var i=0;i ',fetch(e.getAttribute("href")).then(function(t){return t.text()}).then(function(e){s.innerHTML=e,q(z,t,X).call(t),q(z,t,it).call(t)}).catch(function(t){console.error(t)}),n.preventDefault()});var s=function(t){t.closest("form").querySelectorAll('input[name^="filters['.concat(t.dataset.filterProperty,']"]')).forEach(function(t){t.remove()}),t.remove()};document.querySelector("#modal-clear-button").addEventListener("click",function(){i.querySelectorAll(".filter-field").forEach(function(t){s(t)}),i.querySelector("form").submit()}),document.querySelector("#modal-apply-button").addEventListener("click",function(){i.querySelectorAll(".filter-checkbox:not(:checked)").forEach(function(t){s(t.closest(".filter-field"))}),i.querySelector("form").submit()})}}}function Y(){var t=null,e=document.querySelector(".form-batch-checkbox-all");if(null!==e){var i=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox');e.addEventListener("change",function(){i.forEach(function(t){t.checked=e.checked,t.dispatchEvent(new Event("change"))})});var n=document.querySelector(".deselect-batch-button");null!==n&&n.addEventListener("click",function(){e.checked=!1,e.dispatchEvent(new Event("change"))}),i.forEach(function(n,s){n.dataset.rowIndex=s,n.addEventListener("click",function(e){if(t&&e.shiftKey){var n=Number.parseInt(t.dataset.rowIndex),s=Number.parseInt(e.target.dataset.rowIndex),o=e.target.checked,r=Math.min(n,s),a=Math.max(n,s);i.forEach(function(t,e){r<=e&&e<=a&&(t.checked=o,t.dispatchEvent(new Event("change")))})}t=e.target}),n.addEventListener("change",function(){var t=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),i=n.closest("tr"),s=n.closest(".content");n.checked?i.classList.add("selected-row"):(i.classList.remove("selected-row"),e.checked=!1);var o=0!==t.length,r=document.querySelector(".content-header-title > .title"),a=s.querySelector(".datagrid-filters"),l=s.querySelector(".global-actions"),c=s.querySelector(".batch-actions");null!==r&&I(r,o),null!==a&&I(a,o),null!==l&&I(l,o),null!==c&&I(c,!o)})});var s=document.querySelector("#batch-action-confirmation-title"),o=null==s?void 0:s.textContent;document.querySelectorAll("[data-action-batch]").forEach(function(t){t.addEventListener("click",function(t){t.preventDefault();var e=t.currentTarget,i=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),n=function(){e.setAttribute("disabled","disabled");var t={batchActionName:e.getAttribute("data-action-name"),entityFqcn:e.getAttribute("data-entity-fqcn"),batchActionUrl:e.getAttribute("data-action-url"),batchActionCsrfToken:e.getAttribute("data-action-csrf-token")};i.forEach(function(e,i){t["batchActionEntityIds[".concat(i,"]")]=e.value});var n=document.createElement("form");for(var s in n.setAttribute("method","POST"),n.setAttribute("action",e.getAttribute("data-action-url")),t){var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",s),o.setAttribute("value",t[s]),n.appendChild(o)}document.body.appendChild(n),n.submit()};if(e.hasAttribute("data-action-batch-no-confirm"))n();else{var r=e.textContent.trim()||e.getAttribute("title"),a=e.getAttribute("data-batch-action-confirm-message"),l=null!=a?a:o;s.textContent=l.replace("%action_name%",r).replace("%num_items%",i.length.toString()),document.querySelector("#modal-batch-action-button").addEventListener("click",n)}})})}}function X(){var t=new v;document.querySelectorAll('[data-ea-widget="ea-autocomplete"]').forEach(function(e){t.create(e)})}function G(){var t=document.querySelector("#action-confirmation-title"),e=document.querySelector("#modal-action-confirmation-button"),i=null==t?void 0:t.textContent,n=null==e?void 0:e.textContent,s={default:"btn-secondary",primary:"btn-primary",success:"btn-success",warning:"btn-warning",danger:"btn-danger"},o=Object.values(s);document.querySelectorAll('[data-action-confirmation="true"]').forEach(function(r){r.addEventListener("click",function(a){var l;a.preventDefault();var c=r.textContent.trim()||r.getAttribute("title"),d=r.getAttribute("data-action-entity-name")||"",u=r.getAttribute("data-action-entity-id")||"",h=r.getAttribute("data-action-confirmation-message"),p=null!=h?h:i;t.textContent=p.replace("%action_name%",c).replace("%entity_name%",d).replace("%entity_id%",u);var f=r.getAttribute("data-action-confirmation-button");e.textContent=null!=f?f:n;var g=r.getAttribute("data-action-variant")||"danger",m=s[g]||"btn-danger";(l=e.classList).remove.apply(l,o),e.classList.add(m),e.addEventListener("click",function(){var t=r.getAttribute("formaction");if(t){var e=document.querySelector("#action-confirmation-form");return e.setAttribute("action",t),void e.submit()}var i=r.getAttribute("data-ea-action-form-id");if(i)document.getElementById(i).submit();else{var n=r.closest("form");if(null!=n&&n.hasAttribute("action"))n.submit();else{var s=r.getAttribute("href");s&&(window.location.href=s)}}},{once:!0})})})}function Z(){var t,e=document.querySelectorAll("tr[data-default-action-url]");if(0!==e.length){e.forEach(function(t){return t.classList.add("ea-clickable-row")});var i=(null===(t=e[0].closest("table"))||void 0===t?void 0:t.getAttribute("data-default-action-trigger"))||"single",n=["a","button","input","select","textarea",".form-check",".dropdown",".actions","[data-bs-toggle]",".btn",".modal"],s=function(t){for(var e=t;e&&e!==document.body;){if(n.some(function(t){return e.matches(t)}))return!0;e=e.parentElement}return!1},o=function(t,e){if(!t.classList.contains("selected-row")){var i=t.dataset.defaultActionUrl;i&&function(t){var e=document.createElement("a");e.href=t,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)}(i)}};e.forEach(function(t){t.addEventListener("double"===i?"dblclick":"click",function(e){s(e.target)||function(t){if("double"===i)return!1;var e=window.getSelection();return null!==e&&0!==e.toString().length&&0!==e.rangeCount&&t.contains(e.getRangeAt(0).commonAncestorContainer)}(t)||o(t)}),t.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||s(e.target)&&e.target!==t||(e.preventDefault(),o(t))})})}}function tt(){document.querySelectorAll('[data-bs-toggle="popover"]').forEach(function(t){new(e().Popover)(t)})}function et(){document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(function(t){new(e().Tooltip)(t)})}function it(){document.querySelectorAll(".filter-checkbox").forEach(function(t){t.addEventListener("change",function(){var e=t.nextElementSibling,i=t.nextElementSibling.getAttribute("aria-expanded");(t.checked&&"false"===i||!t.checked&&"true"===i)&&e.click()})}),document.querySelectorAll("form[data-ea-filters-form-id]").forEach(function(t){t.addEventListener("change",function(t){if(!t.target.classList.contains("filter-checkbox")){var e=t.target.closest(".filter-field").querySelector(".filter-checkbox");e.checked||(e.checked=!0)}})}),document.querySelectorAll("[data-ea-comparison-id]").forEach(function(t){t.addEventListener("change",function(t){var e=t.currentTarget,i=e.dataset.eaComparisonId;if(void 0!==i){var n=document.querySelector('[data-ea-value2-of-comparison-id="'.concat(i,'"]'));null!==n&&I(n,"between"!==e.value)}})})}function nt(){document.querySelectorAll("[data-ea-action-form-id]").forEach(function(t){t.addEventListener("click",function(e){if(!t.hasAttribute("data-action-confirmation")){e.preventDefault();var i=t.getAttribute("data-ea-action-form-id");document.getElementById(i).submit()}})}),document.querySelectorAll("[data-ea-action-url]").forEach(function(t){t.addEventListener("click",function(e){if(!t.hasAttribute("data-action-confirmation")){e.preventDefault();var i=T(t.getAttribute("data-ea-action-url"));null!==i&&(window.location=i)}})})}})()})();
\ No newline at end of file
diff --git a/public/app.3d13b0df.js b/public/app.3d13b0df.js
new file mode 100644
index 0000000000..5294c4999c
--- /dev/null
+++ b/public/app.3d13b0df.js
@@ -0,0 +1,2 @@
+/*! For license information please see app.3d13b0df.js.LICENSE.txt */
+(()=>{var t={414(t){t.exports=function(){"use strict";const t=new Map,e={set(e,n,i){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(n)||0===s.size?s.set(n,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,n)=>t.has(e)&&t.get(e).get(n)||null,remove(e,n){if(!t.has(e))return;const i=t.get(e);i.delete(n),0===i.size&&t.delete(e)}},n=1e6,i=1e3,s="transitionend",o=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),r=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),a=t=>{do{t+=Math.floor(Math.random()*n)}while(document.getElementById(t));return t},l=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const s=Number.parseFloat(e),o=Number.parseFloat(n);return s||o?(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*i):0},c=t=>{t.dispatchEvent(new Event(s))},d=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>d(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(o(t)):null,h=t=>{if(!d(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},g=()=>{},m=t=>{t.offsetHeight},v=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],b=t=>{"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of _)t()}),_.push(t)):t()},y=()=>"rtl"===document.documentElement.dir,w=t=>{b(()=>{const e=v();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}})},O=(t,e=[],n=t)=>"function"==typeof t?t.call(...e):n,A=(t,e,n=!0)=>{if(!n)return void O(t);const i=5,o=l(e)+i;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(s,a),O(t))};e.addEventListener(s,a),setTimeout(()=>{r||c(e)},o)},E=(t,e,n,i)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!n&&i?t[s-1]:t[0]:(o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},x=/[^.]*(?=\..*)\.|.*/,S=/\..*/,C=/::\d+$/,k={};let I=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(t,e){return e&&`${e}::${I++}`||t.uidEvent||I++}function $(t){const e=N(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function P(t,e){return function n(i){return B(i,{delegateTarget:t}),n.oneOff&&z.off(t,i.type,e),e.apply(t,[i])}}function D(t,e,n){return function i(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return B(s,{delegateTarget:r}),i.oneOff&&z.off(t,s.type,e,n),n.apply(r,[s])}}function F(t,e,n=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===n)}function j(t,e,n){const i="string"==typeof e,s=i?n:e||n;let o=H(t);return L.has(o)||(o=t),[i,s,o]}function M(t,e,n,i,s){if("string"!=typeof e||!t)return;let[o,r,a]=j(e,n,i);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=$(t),c=l[a]||(l[a]={}),d=F(c,r,o?n:null);if(d)return void(d.oneOff=d.oneOff&&s);const u=N(r,e.replace(x,"")),h=o?D(t,n,r):P(t,r);h.delegationSelector=o?n:null,h.callable=r,h.oneOff=s,h.uidEvent=u,c[u]=h,t.addEventListener(a,h,o)}function q(t,e,n,i,s){const o=F(e[n],i,s);o&&(t.removeEventListener(n,o,Boolean(s)),delete e[n][o.uidEvent])}function R(t,e,n,i){const s=e[n]||{};for(const[o,r]of Object.entries(s))o.includes(i)&&q(t,e,n,r.callable,r.delegationSelector)}function H(t){return t=t.replace(S,""),T[t]||t}const z={on(t,e,n,i){M(t,e,n,i,!1)},one(t,e,n,i){M(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[s,o,r]=j(e,n,i),a=r!==e,l=$(t),c=l[r]||{},d=e.startsWith(".");if(void 0===o){if(d)for(const n of Object.keys(l))R(t,l,n,e.slice(1));for(const[n,i]of Object.entries(c)){const s=n.replace(C,"");a&&!e.includes(s)||q(t,l,r,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;q(t,l,r,o,s?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=v();let s=null,o=!0,r=!0,a=!1;e!==H(e)&&i&&(s=i.Event(e,n),i(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=B(new Event(e,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function B(t,e={}){for(const[n,i]of Object.entries(e))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}function V(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function W(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const K={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${W(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${W(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),e[n]=V(t.dataset[i])}return e},getDataAttribute:(t,e)=>V(t.getAttribute(`data-bs-${W(e)}`))};class U{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=d(e)?K.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...d(e)?K.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,i]of Object.entries(e)){const e=t[n],s=d(e)?"element":r(e);if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${s}" but expected type "${i}".`)}}}const Q="5.3.8";class J extends U{constructor(t,n){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(n),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),z.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){A(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return e.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return Q}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Y=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e?e.split(",").map(t=>o(t)).join(","):null},X={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!p(t)&&h(t))},getSelectorFromElement(t){const e=Y(t);return e&&X.findOne(e)?e:null},getElementFromSelector(t){const e=Y(t);return e?X.findOne(e):null},getMultipleElementsFromSelector(t){const e=Y(t);return e?X.find(e):[]}},G=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;z.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),p(this))return;const s=X.getElementFromSelector(this)||this.closest(`.${i}`);t.getOrCreateInstance(s)[e]()})},Z="alert",tt=".bs.alert",et=`close${tt}`,nt=`closed${tt}`,it="fade",st="show";class ot extends J{static get NAME(){return Z}close(){if(z.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(st);const t=this._element.classList.contains(it);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),z.trigger(this._element,nt),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=ot.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}G(ot,"close"),w(ot);const rt="button",at="active",lt='[data-bs-toggle="button"]',ct="click.bs.button.data-api";class dt extends J{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each(function(){const e=dt.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}z.on(document,ct,lt,t=>{t.preventDefault();const e=t.target.closest(lt);dt.getOrCreateInstance(e).toggle()}),w(dt);const ut="swipe",ht=".bs.swipe",pt=`touchstart${ht}`,ft=`touchmove${ht}`,gt=`touchend${ht}`,mt=`pointerdown${ht}`,vt=`pointerup${ht}`,_t="touch",bt="pen",yt="pointer-event",wt=40,Ot={endCallback:null,leftCallback:null,rightCallback:null},At={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Et extends U{constructor(t,e){super(),this._element=t,t&&Et.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ot}static get DefaultType(){return At}static get NAME(){return ut}dispose(){z.off(this._element,ht)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),O(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=wt)return;const e=t/this._deltaX;this._deltaX=0,e&&O(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(z.on(this._element,mt,t=>this._start(t)),z.on(this._element,vt,t=>this._end(t)),this._element.classList.add(yt)):(z.on(this._element,pt,t=>this._start(t)),z.on(this._element,ft,t=>this._move(t)),z.on(this._element,gt,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===bt||t.pointerType===_t)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const xt="carousel",St=".bs.carousel",Ct=".data-api",kt="ArrowLeft",It="ArrowRight",Tt=500,Lt="next",Nt="prev",$t="left",Pt="right",Dt=`slide${St}`,Ft=`slid${St}`,jt=`keydown${St}`,Mt=`mouseenter${St}`,qt=`mouseleave${St}`,Rt=`dragstart${St}`,Ht=`load${St}${Ct}`,zt=`click${St}${Ct}`,Bt="carousel",Vt="active",Wt="slide",Kt="carousel-item-end",Ut="carousel-item-start",Qt="carousel-item-next",Jt="carousel-item-prev",Yt=".active",Xt=".carousel-item",Gt=Yt+Xt,Zt=".carousel-item img",te=".carousel-indicators",ee="[data-bs-slide], [data-bs-slide-to]",ne='[data-bs-ride="carousel"]',ie={[kt]:Pt,[It]:$t},se={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},oe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class re extends J{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=X.findOne(te,this._element),this._addEventListeners(),this._config.ride===Bt&&this.cycle()}static get Default(){return se}static get DefaultType(){return oe}static get NAME(){return xt}next(){this._slide(Lt)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Nt)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?z.one(this._element,Ft,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void z.one(this._element,Ft,()=>this.to(t));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?Lt:Nt;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&z.on(this._element,jt,t=>this._keydown(t)),"hover"===this._config.pause&&(z.on(this._element,Mt,()=>this.pause()),z.on(this._element,qt,()=>this._maybeEnableCycle())),this._config.touch&&Et.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of X.find(Zt,this._element))z.on(t,Rt,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder($t)),rightCallback:()=>this._slide(this._directionToOrder(Pt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Tt+this._config.interval))}};this._swipeHelper=new Et(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ie[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=X.findOne(Yt,this._indicatorsElement);e.classList.remove(Vt),e.removeAttribute("aria-current");const n=X.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(Vt),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===Lt,s=e||E(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=e=>z.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(r(Dt).defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?Ut:Kt,c=i?Qt:Jt;s.classList.add(c),m(s),n.classList.add(l),s.classList.add(l);const d=()=>{s.classList.remove(l,c),s.classList.add(Vt),n.classList.remove(Vt,c,l),this._isSliding=!1,r(Ft)};this._queueCallback(d,n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(Wt)}_getActive(){return X.findOne(Gt,this._element)}_getItems(){return X.find(Xt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return y()?t===$t?Nt:Lt:t===$t?Lt:Nt}_orderToDirection(t){return y()?t===Nt?$t:Pt:t===Nt?Pt:$t}static jQueryInterface(t){return this.each(function(){const e=re.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)})}}z.on(document,zt,ee,function(t){const e=X.getElementFromSelector(this);if(!e||!e.classList.contains(Bt))return;t.preventDefault();const n=re.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===K.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),z.on(window,Ht,()=>{const t=X.find(ne);for(const e of t)re.getOrCreateInstance(e)}),w(re);const ae="collapse",le=".bs.collapse",ce=`show${le}`,de=`shown${le}`,ue=`hide${le}`,he=`hidden${le}`,pe=`click${le}.data-api`,fe="show",ge="collapse",me="collapsing",ve="collapsed",_e=`:scope .${ge} .${ge}`,be="collapse-horizontal",ye="width",we="height",Oe=".collapse.show, .collapse.collapsing",Ae='[data-bs-toggle="collapse"]',Ee={parent:null,toggle:!0},xe={parent:"(null|element)",toggle:"boolean"};class Se extends J{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=X.find(Ae);for(const t of n){const e=X.getSelectorFromElement(t),n=X.find(e).filter(t=>t===this._element);null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ee}static get DefaultType(){return xe}static get NAME(){return ae}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(Oe).filter(t=>t!==this._element).map(t=>Se.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(z.trigger(this._element,ce).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(ge),this._element.classList.add(me),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(me),this._element.classList.add(ge,fe),this._element.style[e]="",z.trigger(this._element,de)},i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(n,this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(z.trigger(this._element,ue).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,m(this._element),this._element.classList.add(me),this._element.classList.remove(ge,fe);for(const t of this._triggerArray){const e=X.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(me),this._element.classList.add(ge),z.trigger(this._element,he)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(fe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(be)?ye:we}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Ae);for(const e of t){const t=X.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=X.find(_e,this._config.parent);return X.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle(ve,!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const n=Se.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}})}}z.on(document,pe,Ae,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of X.getMultipleElementsFromSelector(this))Se.getOrCreateInstance(t,{toggle:!1}).toggle()}),w(Se);var Ce="top",ke="bottom",Ie="right",Te="left",Le="auto",Ne=[Ce,ke,Ie,Te],$e="start",Pe="end",De="clippingParents",Fe="viewport",je="popper",Me="reference",qe=Ne.reduce(function(t,e){return t.concat([e+"-"+$e,e+"-"+Pe])},[]),Re=[].concat(Ne,[Le]).reduce(function(t,e){return t.concat([e,e+"-"+$e,e+"-"+Pe])},[]),He="beforeRead",ze="read",Be="afterRead",Ve="beforeMain",We="main",Ke="afterMain",Ue="beforeWrite",Qe="write",Je="afterWrite",Ye=[He,ze,Be,Ve,We,Ke,Ue,Qe,Je];function Xe(t){return t?(t.nodeName||"").toLowerCase():null}function Ge(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ze(t){return t instanceof Ge(t).Element||t instanceof Element}function tn(t){return t instanceof Ge(t).HTMLElement||t instanceof HTMLElement}function en(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ge(t).ShadowRoot||t instanceof ShadowRoot)}function nn(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];tn(s)&&Xe(s)&&(Object.assign(s.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})}function sn(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});tn(i)&&Xe(i)&&(Object.assign(i.style,o),Object.keys(s).forEach(function(t){i.removeAttribute(t)}))})}}const on={name:"applyStyles",enabled:!0,phase:"write",fn:nn,effect:sn,requires:["computeStyles"]};function rn(t){return t.split("-")[0]}var an=Math.max,ln=Math.min,cn=Math.round;function dn(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function un(){return!/^((?!chrome|android).)*safari/i.test(dn())}function hn(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),s=1,o=1;e&&tn(t)&&(s=t.offsetWidth>0&&cn(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&cn(i.height)/t.offsetHeight||1);var r=(Ze(t)?Ge(t):window).visualViewport,a=!un()&&n,l=(i.left+(a&&r?r.offsetLeft:0))/s,c=(i.top+(a&&r?r.offsetTop:0))/o,d=i.width/s,u=i.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function pn(t){var e=hn(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function fn(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&en(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function gn(t){return Ge(t).getComputedStyle(t)}function mn(t){return["table","td","th"].indexOf(Xe(t))>=0}function vn(t){return((Ze(t)?t.ownerDocument:t.document)||window.document).documentElement}function _n(t){return"html"===Xe(t)?t:t.assignedSlot||t.parentNode||(en(t)?t.host:null)||vn(t)}function bn(t){return tn(t)&&"fixed"!==gn(t).position?t.offsetParent:null}function yn(t){var e=/firefox/i.test(dn());if(/Trident/i.test(dn())&&tn(t)&&"fixed"===gn(t).position)return null;var n=_n(t);for(en(n)&&(n=n.host);tn(n)&&["html","body"].indexOf(Xe(n))<0;){var i=gn(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function wn(t){for(var e=Ge(t),n=bn(t);n&&mn(n)&&"static"===gn(n).position;)n=bn(n);return n&&("html"===Xe(n)||"body"===Xe(n)&&"static"===gn(n).position)?e:n||yn(t)||e}function On(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function An(t,e,n){return an(t,ln(e,n))}function En(t,e,n){var i=An(t,e,n);return i>n?n:i}function xn(){return{top:0,right:0,bottom:0,left:0}}function Sn(t){return Object.assign({},xn(),t)}function Cn(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}var kn=function(t,e){return Sn("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Cn(t,Ne))};function In(t){var e,n=t.state,i=t.name,s=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=rn(n.placement),l=On(a),c=[Te,Ie].indexOf(a)>=0?"height":"width";if(o&&r){var d=kn(s.padding,n),u=pn(o),h="y"===l?Ce:Te,p="y"===l?ke:Ie,f=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],g=r[l]-n.rects.reference[l],m=wn(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,_=f/2-g/2,b=d[h],y=v-u[c]-d[p],w=v/2-u[c]/2+_,O=An(b,w,y),A=l;n.modifiersData[i]=((e={})[A]=O,e.centerOffset=O-w,e)}}function Tn(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&fn(e.elements.popper,i)&&(e.elements.arrow=i)}const Ln={name:"arrow",enabled:!0,phase:"main",fn:In,effect:Tn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nn(t){return t.split("-")[1]}var $n={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pn(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:cn(n*s)/s||0,y:cn(i*s)/s||0}}function Dn(t){var e,n=t.popper,i=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,u=t.isFixed,h=r.x,p=void 0===h?0:h,f=r.y,g=void 0===f?0:f,m="function"==typeof d?d({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=r.hasOwnProperty("x"),_=r.hasOwnProperty("y"),b=Te,y=Ce,w=window;if(c){var O=wn(n),A="clientHeight",E="clientWidth";O===Ge(n)&&"static"!==gn(O=vn(n)).position&&"absolute"===a&&(A="scrollHeight",E="scrollWidth"),(s===Ce||(s===Te||s===Ie)&&o===Pe)&&(y=ke,g-=(u&&O===w&&w.visualViewport?w.visualViewport.height:O[A])-i.height,g*=l?1:-1),s!==Te&&(s!==Ce&&s!==ke||o!==Pe)||(b=Ie,p-=(u&&O===w&&w.visualViewport?w.visualViewport.width:O[E])-i.width,p*=l?1:-1)}var x,S=Object.assign({position:a},c&&$n),C=!0===d?Pn({x:p,y:g},Ge(n)):{x:p,y:g};return p=C.x,g=C.y,l?Object.assign({},S,((x={})[y]=_?"0":"",x[b]=v?"0":"",x.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",x)):Object.assign({},S,((e={})[y]=_?g+"px":"",e[b]=v?p+"px":"",e.transform="",e))}function Fn(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=void 0===i||i,o=n.adaptive,r=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:rn(e.placement),variation:Nn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Dn(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Dn(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const jn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fn,data:{}};var Mn={passive:!0};function qn(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,o=void 0===s||s,r=i.resize,a=void 0===r||r,l=Ge(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",n.update,Mn)}),a&&l.addEventListener("resize",n.update,Mn),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",n.update,Mn)}),a&&l.removeEventListener("resize",n.update,Mn)}}const Rn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qn,data:{}};var Hn={left:"right",right:"left",bottom:"top",top:"bottom"};function zn(t){return t.replace(/left|right|bottom|top/g,function(t){return Hn[t]})}var Bn={start:"end",end:"start"};function Vn(t){return t.replace(/start|end/g,function(t){return Bn[t]})}function Wn(t){var e=Ge(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Kn(t){return hn(vn(t)).left+Wn(t).scrollLeft}function Un(t,e){var n=Ge(t),i=vn(t),s=n.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=un();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Kn(t),y:l}}function Qn(t){var e,n=vn(t),i=Wn(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=an(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=an(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Kn(t),l=-i.scrollTop;return"rtl"===gn(s||n).direction&&(a+=an(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Jn(t){var e=gn(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function Yn(t){return["html","body","#document"].indexOf(Xe(t))>=0?t.ownerDocument.body:tn(t)&&Jn(t)?t:Yn(_n(t))}function Xn(t,e){var n;void 0===e&&(e=[]);var i=Yn(t),s=i===(null==(n=t.ownerDocument)?void 0:n.body),o=Ge(i),r=s?[o].concat(o.visualViewport||[],Jn(i)?i:[]):i,a=e.concat(r);return s?a:a.concat(Xn(_n(r)))}function Gn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Zn(t,e){var n=hn(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function ti(t,e,n){return e===Fe?Gn(Un(t,n)):Ze(e)?Zn(e,n):Gn(Qn(vn(t)))}function ei(t){var e=Xn(_n(t)),n=["absolute","fixed"].indexOf(gn(t).position)>=0&&tn(t)?wn(t):t;return Ze(n)?e.filter(function(t){return Ze(t)&&fn(t,n)&&"body"!==Xe(t)}):[]}function ni(t,e,n,i){var s="clippingParents"===e?ei(t):[].concat(e),o=[].concat(s,[n]),r=o[0],a=o.reduce(function(e,n){var s=ti(t,n,i);return e.top=an(s.top,e.top),e.right=ln(s.right,e.right),e.bottom=ln(s.bottom,e.bottom),e.left=an(s.left,e.left),e},ti(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ii(t){var e,n=t.reference,i=t.element,s=t.placement,o=s?rn(s):null,r=s?Nn(s):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(o){case Ce:e={x:a,y:n.y-i.height};break;case ke:e={x:a,y:n.y+n.height};break;case Ie:e={x:n.x+n.width,y:l};break;case Te:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=o?On(o):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case $e:e[c]=e[c]-(n[d]/2-i[d]/2);break;case Pe:e[c]=e[c]+(n[d]/2-i[d]/2)}}return e}function si(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=void 0===i?t.placement:i,o=n.strategy,r=void 0===o?t.strategy:o,a=n.boundary,l=void 0===a?De:a,c=n.rootBoundary,d=void 0===c?Fe:c,u=n.elementContext,h=void 0===u?je:u,p=n.altBoundary,f=void 0!==p&&p,g=n.padding,m=void 0===g?0:g,v=Sn("number"!=typeof m?m:Cn(m,Ne)),_=h===je?Me:je,b=t.rects.popper,y=t.elements[f?_:h],w=ni(Ze(y)?y:y.contextElement||vn(t.elements.popper),l,d,r),O=hn(t.elements.reference),A=ii({reference:O,element:b,placement:s}),E=Gn(Object.assign({},b,A)),x=h===je?E:O,S={top:w.top-x.top+v.top,bottom:x.bottom-w.bottom+v.bottom,left:w.left-x.left+v.left,right:x.right-w.right+v.right},C=t.modifiersData.offset;if(h===je&&C){var k=C[s];Object.keys(S).forEach(function(t){var e=[Ie,ke].indexOf(t)>=0?1:-1,n=[Ce,ke].indexOf(t)>=0?"y":"x";S[t]+=k[n]*e})}return S}function oi(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Re:l,d=Nn(i),u=d?a?qe:qe.filter(function(t){return Nn(t)===d}):Ne,h=u.filter(function(t){return c.indexOf(t)>=0});0===h.length&&(h=u);var p=h.reduce(function(e,n){return e[n]=si(t,{placement:n,boundary:s,rootBoundary:o,padding:r})[rn(n)],e},{});return Object.keys(p).sort(function(t,e){return p[t]-p[e]})}function ri(t){if(rn(t)===Le)return[];var e=zn(t);return[Vn(t),e,Vn(e)]}function ai(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,o=void 0===s||s,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,g=n.allowedAutoPlacements,m=e.options.placement,v=rn(m),_=l||(v!==m&&f?ri(m):[zn(m)]),b=[m].concat(_).reduce(function(t,n){return t.concat(rn(n)===Le?oi(e,{placement:n,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):n)},[]),y=e.rects.reference,w=e.rects.popper,O=new Map,A=!0,E=b[0],x=0;x
=0,T=I?"width":"height",L=si(e,{placement:S,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),N=I?k?Ie:Te:k?ke:Ce;y[T]>w[T]&&(N=zn(N));var $=zn(N),P=[];if(o&&P.push(L[C]<=0),a&&P.push(L[N]<=0,L[$]<=0),P.every(function(t){return t})){E=S,A=!1;break}O.set(S,P)}if(A)for(var D=function(t){var e=b.find(function(e){var n=O.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return E=e,"break"},F=f?3:1;F>0&&"break"!==D(F);F--);e.placement!==E&&(e.modifiersData[i]._skip=!0,e.placement=E,e.reset=!0)}}const li={name:"flip",enabled:!0,phase:"main",fn:ai,requiresIfExists:["offset"],data:{_skip:!1}};function ci(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function di(t){return[Ce,Ie,ke,Te].some(function(e){return t[e]>=0})}function ui(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=si(e,{elementContext:"reference"}),a=si(e,{altBoundary:!0}),l=ci(r,i),c=ci(a,s,o),d=di(l),u=di(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const hi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ui};function pi(t,e,n){var i=rn(t),s=[Te,Ce].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Te,Ie].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function fi(t){var e=t.state,n=t.options,i=t.name,s=n.offset,o=void 0===s?[0,0]:s,r=Re.reduce(function(t,n){return t[n]=pi(n,e.rects,o),t},{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}const gi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fi};function mi(t){var e=t.state,n=t.name;e.modifiersData[n]=ii({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const vi={name:"popperOffsets",enabled:!0,phase:"read",fn:mi,data:{}};function _i(t){return"x"===t?"y":"x"}function bi(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,o=void 0===s||s,r=n.altAxis,a=void 0!==r&&r,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,u=n.padding,h=n.tether,p=void 0===h||h,f=n.tetherOffset,g=void 0===f?0:f,m=si(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=rn(e.placement),_=Nn(e.placement),b=!_,y=On(v),w=_i(y),O=e.modifiersData.popperOffsets,A=e.rects.reference,E=e.rects.popper,x="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,S="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(O){if(o){var I,T="y"===y?Ce:Te,L="y"===y?ke:Ie,N="y"===y?"height":"width",$=O[y],P=$+m[T],D=$-m[L],F=p?-E[N]/2:0,j=_===$e?A[N]:E[N],M=_===$e?-E[N]:-A[N],q=e.elements.arrow,R=p&&q?pn(q):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:xn(),z=H[T],B=H[L],V=An(0,A[N],R[N]),W=b?A[N]/2-F-V-z-S.mainAxis:j-V-z-S.mainAxis,K=b?-A[N]/2+F+V+B+S.mainAxis:M+V+B+S.mainAxis,U=e.elements.arrow&&wn(e.elements.arrow),Q=U?"y"===y?U.clientTop||0:U.clientLeft||0:0,J=null!=(I=null==C?void 0:C[y])?I:0,Y=$+K-J,X=An(p?ln(P,$+W-J-Q):P,$,p?an(D,Y):D);O[y]=X,k[y]=X-$}if(a){var G,Z="x"===y?Ce:Te,tt="x"===y?ke:Ie,et=O[w],nt="y"===w?"height":"width",it=et+m[Z],st=et-m[tt],ot=-1!==[Ce,Te].indexOf(v),rt=null!=(G=null==C?void 0:C[w])?G:0,at=ot?it:et-A[nt]-E[nt]-rt+S.altAxis,lt=ot?et+A[nt]+E[nt]-rt-S.altAxis:st,ct=p&&ot?En(at,et,lt):An(p?at:it,et,p?lt:st);O[w]=ct,k[w]=ct-et}e.modifiersData[i]=k}}const yi={name:"preventOverflow",enabled:!0,phase:"main",fn:bi,requiresIfExists:["offset"]};function wi(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Oi(t){return t!==Ge(t)&&tn(t)?wi(t):Wn(t)}function Ai(t){var e=t.getBoundingClientRect(),n=cn(e.width)/t.offsetWidth||1,i=cn(e.height)/t.offsetHeight||1;return 1!==n||1!==i}function Ei(t,e,n){void 0===n&&(n=!1);var i=tn(e),s=tn(e)&&Ai(e),o=vn(e),r=hn(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==Xe(e)||Jn(o))&&(a=Oi(e)),tn(e)?((l=hn(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Kn(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function xi(t){var e=new Map,n=new Set,i=[];function s(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&s(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||s(t)}),i}function Si(t){var e=xi(t);return Ye.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}function Ci(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function ki(t){var e=t.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{});return Object.keys(e).map(function(t){return e[t]})}var Ii={placement:"bottom",modifiers:[],strategy:"absolute"};function Ti(){for(var t=arguments.length,e=new Array(t),n=0;nNumber.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(K.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...O(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const n=X.find(ls,this._menu).filter(t=>h(t));n.length&&E(n,e,t===zi,!n.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=bs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t.button===Bi||"keyup"===t.type&&t.key!==Ri)return;const e=X.find(ss);for(const n of e){const e=bs.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),s=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===Ri||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n=t.key===qi,i=[Hi,zi].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const s=this.matches(is)?this:X.prev(this,is)[0]||X.next(this,is)[0]||X.findOne(is,t.delegateTarget.parentNode),o=bs.getOrCreateInstance(s);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}z.on(document,Ji,is,bs.dataApiKeydownHandler),z.on(document,Ji,os,bs.dataApiKeydownHandler),z.on(document,Qi,bs.clearMenus),z.on(document,Yi,bs.clearMenus),z.on(document,Qi,is,function(t){t.preventDefault(),bs.getOrCreateInstance(this).toggle()}),w(bs);const ys="backdrop",ws="fade",Os="show",As=`mousedown.bs.${ys}`,Es={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},xs={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ss extends U{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Es}static get DefaultType(){return xs}static get NAME(){return ys}show(t){if(!this._config.isVisible)return void O(t);this._append();const e=this._getElement();this._config.isAnimated&&m(e),e.classList.add(Os),this._emulateAnimation(()=>{O(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Os),this._emulateAnimation(()=>{this.dispose(),O(t)})):O(t)}dispose(){this._isAppended&&(z.off(this._element,As),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(ws),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),z.on(t,As,()=>{O(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){A(t,this._getElement(),this._config.isAnimated)}}const Cs="focustrap",ks=".bs.focustrap",Is=`focusin${ks}`,Ts=`keydown.tab${ks}`,Ls="Tab",Ns="forward",$s="backward",Ps={autofocus:!0,trapElement:null},Ds={autofocus:"boolean",trapElement:"element"};class Fs extends U{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ps}static get DefaultType(){return Ds}static get NAME(){return Cs}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),z.off(document,ks),z.on(document,Is,t=>this._handleFocusin(t)),z.on(document,Ts,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,z.off(document,ks))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=X.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===$s?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){t.key===Ls&&(this._lastTabNavDirection=t.shiftKey?$s:Ns)}}const js=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ms=".sticky-top",qs="padding-right",Rs="margin-right";class Hs{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,qs,e=>e+t),this._setElementAttributes(js,qs,e=>e+t),this._setElementAttributes(Ms,Rs,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,qs),this._resetElementAttributes(js,qs),this._resetElementAttributes(Ms,Rs)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth(),s=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(s))}px`)};this._applyManipulationCallback(t,s)}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&K.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){const n=t=>{const n=K.getDataAttribute(t,e);null!==n?(K.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)};this._applyManipulationCallback(t,n)}_applyManipulationCallback(t,e){if(d(t))e(t);else for(const n of X.find(t,this._element))e(n)}}const zs="modal",Bs=".bs.modal",Vs="Escape",Ws=`hide${Bs}`,Ks=`hidePrevented${Bs}`,Us=`hidden${Bs}`,Qs=`show${Bs}`,Js=`shown${Bs}`,Ys=`resize${Bs}`,Xs=`click.dismiss${Bs}`,Gs=`mousedown.dismiss${Bs}`,Zs=`keydown.dismiss${Bs}`,to=`click${Bs}.data-api`,eo="modal-open",no="fade",io="show",so="modal-static",oo=".modal.show",ro=".modal-dialog",ao=".modal-body",lo='[data-bs-toggle="modal"]',co={backdrop:!0,focus:!0,keyboard:!0},uo={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ho extends J{constructor(t,e){super(t,e),this._dialog=X.findOne(ro,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Hs,this._addEventListeners()}static get Default(){return co}static get DefaultType(){return uo}static get NAME(){return zs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||z.trigger(this._element,Qs,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(eo),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(z.trigger(this._element,Ws).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(io),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){z.off(window,Bs),z.off(this._dialog,Bs),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ss({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Fs({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=X.findOne(ao,this._dialog);e&&(e.scrollTop=0),m(this._element),this._element.classList.add(io);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,z.trigger(this._element,Js,{relatedTarget:t})};this._queueCallback(n,this._dialog,this._isAnimated())}_addEventListeners(){z.on(this._element,Zs,t=>{t.key===Vs&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),z.on(window,Ys,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),z.on(this._element,Gs,t=>{z.one(this._element,Xs,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(eo),this._resetAdjustments(),this._scrollBar.reset(),z.trigger(this._element,Us)})}_isAnimated(){return this._element.classList.contains(no)}_triggerBackdropTransition(){if(z.trigger(this._element,Ks).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(so)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(so),this._queueCallback(()=>{this._element.classList.remove(so),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=y()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=y()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const n=ho.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}})}}z.on(document,to,lo,function(t){const e=X.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),z.one(e,Qs,t=>{t.defaultPrevented||z.one(e,Us,()=>{h(this)&&this.focus()})});const n=X.findOne(oo);n&&ho.getInstance(n).hide(),ho.getOrCreateInstance(e).toggle(this)}),G(ho),w(ho);const po="offcanvas",fo=".bs.offcanvas",go=".data-api",mo=`load${fo}${go}`,vo="Escape",_o="show",bo="showing",yo="hiding",wo="offcanvas-backdrop",Oo=".offcanvas.show",Ao=`show${fo}`,Eo=`shown${fo}`,xo=`hide${fo}`,So=`hidePrevented${fo}`,Co=`hidden${fo}`,ko=`resize${fo}`,Io=`click${fo}${go}`,To=`keydown.dismiss${fo}`,Lo='[data-bs-toggle="offcanvas"]',No={backdrop:!0,keyboard:!0,scroll:!1},$o={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Po extends J{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return No}static get DefaultType(){return $o}static get NAME(){return po}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(z.trigger(this._element,Ao,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Hs).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(bo);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(_o),this._element.classList.remove(bo),z.trigger(this._element,Eo,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(z.trigger(this._element,xo).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(yo),this._backdrop.hide();const t=()=>{this._element.classList.remove(_o,yo),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Hs).reset(),z.trigger(this._element,Co)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():z.trigger(this._element,So)},e=Boolean(this._config.backdrop);return new Ss({className:wo,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Fs({trapElement:this._element})}_addEventListeners(){z.on(this._element,To,t=>{t.key===vo&&(this._config.keyboard?this.hide():z.trigger(this._element,So))})}static jQueryInterface(t){return this.each(function(){const e=Po.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}z.on(document,Io,Lo,function(t){const e=X.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;z.one(e,Co,()=>{h(this)&&this.focus()});const n=X.findOne(Oo);n&&n!==e&&Po.getInstance(n).hide(),Po.getOrCreateInstance(e).toggle(this)}),z.on(window,mo,()=>{for(const t of X.find(Oo))Po.getOrCreateInstance(t).show()}),z.on(window,ko,()=>{for(const t of X.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Po.getOrCreateInstance(t).hide()}),G(Po),w(Po);const Do={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Fo=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),jo=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Mo=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!Fo.has(n)||Boolean(jo.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(n))};function qo(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const t of s){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[n]||[]);for(const e of i)Mo(e,s)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}const Ro="TemplateFactory",Ho={allowList:Do,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},zo={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Bo={entry:"(string|element|function|null)",selector:"(string|element)"};class Vo extends U{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ho}static get DefaultType(){return zo}static get NAME(){return Ro}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},Bo)}_setContent(t,e,n){const i=X.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?d(e)?this._putElementInTemplate(u(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?qo(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return O(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Wo="tooltip",Ko=new Set(["sanitize","allowList","sanitizeFn"]),Uo="fade",Qo="show",Jo=".tooltip-inner",Yo=".modal",Xo="hide.bs.modal",Go="hover",Zo="focus",tr="click",er="manual",nr="hide",ir="hidden",sr="show",or="shown",rr="inserted",ar="click",lr="focusin",cr="focusout",dr="mouseenter",ur="mouseleave",hr={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},pr={allowList:Do,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class gr extends J{constructor(t,e){if(void 0===Di)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return pr}static get DefaultType(){return fr}static get NAME(){return Wo}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),z.off(this._element.closest(Yo),Xo,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=z.trigger(this._element,this.constructor.eventName(sr)),e=(f(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),z.trigger(this._element,this.constructor.eventName(rr))),this._popper=this._createPopper(n),n.classList.add(Qo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))z.on(t,"mouseover",g);const s=()=>{z.trigger(this._element,this.constructor.eventName(or)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(z.trigger(this._element,this.constructor.eventName(nr)).defaultPrevented)return;if(this._getTipElement().classList.remove(Qo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))z.off(t,"mouseover",g);this._activeTrigger[tr]=!1,this._activeTrigger[Zo]=!1,this._activeTrigger[Go]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),z.trigger(this._element,this.constructor.eventName(ir)))};this._queueCallback(t,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Uo,Qo),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=a(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(Uo),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Vo({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Jo]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Uo)}_isShown(){return this.tip&&this.tip.classList.contains(Qo)}_createPopper(t){const e=O(this._config.placement,[this,t,this._element]),n=hr[e.toUpperCase()];return Pi(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return O(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...O(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)z.on(this._element,this.constructor.eventName(ar),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[tr]=!(e._isShown()&&e._activeTrigger[tr]),e.toggle()});else if(e!==er){const t=e===Go?this.constructor.eventName(dr):this.constructor.eventName(lr),n=e===Go?this.constructor.eventName(ur):this.constructor.eventName(cr);z.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Zo:Go]=!0,e._enter()}),z.on(this._element,n,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Zo:Go]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},z.on(this._element.closest(Yo),Xo,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=K.getDataAttributes(this._element);for(const t of Object.keys(e))Ko.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,n]of Object.entries(this._config))this.constructor.Default[e]!==n&&(t[e]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=gr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}w(gr);const mr="popover",vr=".popover-header",_r=".popover-body",br={...gr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},yr={...gr.DefaultType,content:"(null|string|element|function)"};class wr extends gr{static get Default(){return br}static get DefaultType(){return yr}static get NAME(){return mr}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[vr]:this._getTitle(),[_r]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}w(wr);const Or="scrollspy",Ar=".bs.scrollspy",Er=`activate${Ar}`,xr=`click${Ar}`,Sr=`load${Ar}.data-api`,Cr="dropdown-item",kr="active",Ir='[data-bs-spy="scroll"]',Tr="[href]",Lr=".nav, .list-group",Nr=".nav-link",$r=`${Nr}, .nav-item > ${Nr}, .list-group-item`,Pr=".dropdown",Dr=".dropdown-toggle",Fr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},jr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Mr extends J{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Fr}static get DefaultType(){return jr}static get NAME(){return Or}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(z.off(this._config.target,xr),z.on(this._config.target,xr,Tr,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(n(o),!i)return}else s||t||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=X.find(Tr,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=X.findOne(decodeURI(e.hash),this._element);h(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(kr),this._activateParents(t),z.trigger(this._element,Er,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Cr))X.findOne(Dr,t.closest(Pr)).classList.add(kr);else for(const e of X.parents(t,Lr))for(const t of X.prev(e,$r))t.classList.add(kr)}_clearActiveClass(t){t.classList.remove(kr);const e=X.find(`${Tr}.${kr}`,t);for(const t of e)t.classList.remove(kr)}static jQueryInterface(t){return this.each(function(){const e=Mr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}z.on(window,Sr,()=>{for(const t of X.find(Ir))Mr.getOrCreateInstance(t)}),w(Mr);const qr="tab",Rr=".bs.tab",Hr=`hide${Rr}`,zr=`hidden${Rr}`,Br=`show${Rr}`,Vr=`shown${Rr}`,Wr=`click${Rr}`,Kr=`keydown${Rr}`,Ur=`load${Rr}`,Qr="ArrowLeft",Jr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Gr="Home",Zr="End",ta="active",ea="fade",na="show",ia="dropdown",sa=".dropdown-toggle",oa=".dropdown-menu",ra=`:not(${sa})`,aa='.list-group, .nav, [role="tablist"]',la=".nav-item, .list-group-item",ca='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',da=`.nav-link${ra}, .list-group-item${ra}, [role="tab"]${ra}, ${ca}`,ua=`.${ta}[data-bs-toggle="tab"], .${ta}[data-bs-toggle="pill"], .${ta}[data-bs-toggle="list"]`;class ha extends J{constructor(t){super(t),this._parent=this._element.closest(aa),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),z.on(this._element,Kr,t=>this._keydown(t)))}static get NAME(){return qr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?z.trigger(e,Hr,{relatedTarget:t}):null;z.trigger(t,Br,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(ta),this._activate(X.getElementFromSelector(t));const n=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),z.trigger(t,Vr,{relatedTarget:e})):t.classList.add(na)};this._queueCallback(n,t,t.classList.contains(ea))}_deactivate(t,e){if(!t)return;t.classList.remove(ta),t.blur(),this._deactivate(X.getElementFromSelector(t));const n=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),z.trigger(t,zr,{relatedTarget:e})):t.classList.remove(na)};this._queueCallback(n,t,t.classList.contains(ea))}_keydown(t){if(![Qr,Jr,Yr,Xr,Gr,Zr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!p(t));let n;if([Gr,Zr].includes(t.key))n=e[t.key===Gr?0:e.length-1];else{const i=[Jr,Xr].includes(t.key);n=E(e,t.target,i,!0)}n&&(n.focus({preventScroll:!0}),ha.getOrCreateInstance(n).show())}_getChildren(){return X.find(da,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=X.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains(ia))return;const i=(t,i)=>{const s=X.findOne(t,n);s&&s.classList.toggle(i,e)};i(sa,ta),i(oa,na),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(ta)}_getInnerElement(t){return t.matches(da)?t:X.findOne(da,t)}_getOuterElement(t){return t.closest(la)||t}static jQueryInterface(t){return this.each(function(){const e=ha.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}z.on(document,Wr,ca,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||ha.getOrCreateInstance(this).show()}),z.on(window,Ur,()=>{for(const t of X.find(ua))ha.getOrCreateInstance(t)}),w(ha);const pa="toast",fa=".bs.toast",ga=`mouseover${fa}`,ma=`mouseout${fa}`,va=`focusin${fa}`,_a=`focusout${fa}`,ba=`hide${fa}`,ya=`hidden${fa}`,wa=`show${fa}`,Oa=`shown${fa}`,Aa="fade",Ea="hide",xa="show",Sa="showing",Ca={animation:"boolean",autohide:"boolean",delay:"number"},ka={animation:!0,autohide:!0,delay:5e3};class Ia extends J{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return ka}static get DefaultType(){return Ca}static get NAME(){return pa}show(){if(z.trigger(this._element,wa).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Aa);const t=()=>{this._element.classList.remove(Sa),z.trigger(this._element,Oa),this._maybeScheduleHide()};this._element.classList.remove(Ea),m(this._element),this._element.classList.add(xa,Sa),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(z.trigger(this._element,ba).defaultPrevented)return;const t=()=>{this._element.classList.add(Ea),this._element.classList.remove(Sa,xa),z.trigger(this._element,ya)};this._element.classList.add(Sa),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(xa),super.dispose()}isShown(){return this._element.classList.contains(xa)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){z.on(this._element,ga,t=>this._onInteraction(t,!0)),z.on(this._element,ma,t=>this._onInteraction(t,!1)),z.on(this._element,va,t=>this._onInteraction(t,!0)),z.on(this._element,_a,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=Ia.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}return G(Ia),w(Ia),{Alert:ot,Button:dt,Carousel:re,Collapse:Se,Dropdown:bs,Modal:ho,Offcanvas:Po,Popover:wr,ScrollSpy:Mr,Tab:ha,Toast:Ia,Tooltip:gr}}()},538(t,e,n){"use strict";n.r(e)},766(t){t.exports=function(){"use strict";function t(t,e){t.split(/\s+/).forEach(t=>{e(t)})}class e{constructor(){this._events={}}on(e,n){t(e,t=>{const e=this._events[t]||[];e.push(n),this._events[t]=e})}off(e,n){var i=arguments.length;0!==i?t(e,t=>{if(1===i)return void delete this._events[t];const e=this._events[t];void 0!==e&&(e.splice(e.indexOf(n),1),this._events[t]=e)}):this._events={}}trigger(e,...n){var i=this;t(e,t=>{const e=i._events[t];void 0!==e&&e.forEach(t=>{t.apply(i,n)})})}}const n=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==a(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",i=t=>{if(!o(t))return t.join("");let e="",n=0;const i=()=>{n>1&&(e+="{"+n+"}")};return t.forEach((s,o)=>{s!==t[o-1]?(i(),e+=s,n=1):n++}),i(),e},s=t=>{let e=Array.from(t);return n(e)},o=t=>new Set(t).size!==t.length,r=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),a=t=>t.reduce((t,e)=>Math.max(t,l(e)),0),l=t=>Array.from(t).length,c=t=>{if(1===t.length)return[[t]];let e=[];const n=t.substring(1);return c(n).forEach(function(n){let i=n.slice(0);i[0]=t.charAt(0)+i[0],e.push(i),i=n.slice(0),i.unshift(t.charAt(0)),e.push(i)}),e},d=[[0,65535]];let u,h;const p={},f={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in f){let e=f[t]||"";for(let n=0;nt.normalize(e),v=t=>Array.from(t).reduce((t,e)=>t+_(e),""),_=t=>(t=m(t).toLowerCase().replace(g,t=>p[t]||""),m(t,"NFC")),b=t=>{const e={},n=(t,n)=>{const i=e[t]||new Set,o=new RegExp("^"+s(i)+"$","iu");n.match(o)||(i.add(r(n)),e[t]=i)};for(let e of function*(t){for(const[e,n]of t)for(let t=e;t<=n;t++){let e=String.fromCharCode(t),n=v(e);n!=e.toLowerCase()&&(n.length>3||0!=n.length&&(yield{folded:n,composed:e,code_point:t}))}}(t))n(e.folded,e.folded),n(e.folded,e.composed);return e},y=t=>{const e=b(t),i={};let o=[];for(let t in e){let n=e[t];n&&(i[t]=s(n)),t.length>1&&o.push(r(t))}o.sort((t,e)=>e.length-t.length);const a=n(o);return h=new RegExp("^"+a,"u"),i},w=(t,e=1)=>(e=Math.max(e,t.length-1),n(c(t).map(t=>((t,e=1)=>{let n=0;return t=t.map(t=>(u[t]&&(n+=t.length),u[t]||t)),n>=e?i(t):""})(t,e)))),O=(t,e=!0)=>{let s=t.length>1?1:0;return n(t.map(t=>{let n=[];const o=e?t.length():t.length()-1;for(let e=0;e{for(const n of e){if(n.start!=t.start||n.end!=t.end)continue;if(n.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const i=t=>{for(const n of e){if(n.start===t.start&&n.substr===t.substr)return!1;if(1!=t.length&&1!=n.length){if(t.startn.start)return!0;if(n.startt.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class E{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let n=new E,i=JSON.parse(JSON.stringify(this.parts)),s=i.pop();for(const t of i)n.add(t);let o=e.substr.substring(0,t-s.start),r=o.length;return n.add({start:s.start,end:s.start+r,length:r,substr:o}),n}}const x=t=>{void 0===u&&(u=y(d)),t=v(t);let e="",n=[new E];for(let i=0;i0){a=a.sort((t,e)=>t.length()-e.length());for(let t of a)A(t,n)||n.push(t)}else if(i>0&&1==l.size&&!l.has("3")){e+=O(n,!1);let t=new E;const i=n[0];i&&t.add(i.last()),n=[t]}}return e+=O(n,!0),e},S=(t,e)=>{if(t)return t[e]},C=(t,e)=>{if(t){for(var n,i=e.split(".");(n=i.shift())&&(t=t[n]););return t}},k=(t,e,n)=>{var i,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(i=e.string.length/t.length,0===s&&(i+=.5),i*n)):0},I=(t,e)=>{var n=t[e];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(t[e]=[n])},T=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},L=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=v(e+"").toLowerCase())?1:e>t?-1:0;class N{items;settings;constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const i=[],s=t.split(/\s+/);var o;return n&&(o=new RegExp("^("+Object.keys(n).map(r).join("|")+"):(.*)$")),s.forEach(t=>{let n,s=null,a=null;o&&(n=t.match(o))&&(s=n[1],t=n[2]),t.length>0&&(a=this.settings.diacritics?x(t)||null:r(t),a&&e&&(a="\\b"+a)),i.push({string:t,regex:a?new RegExp(a,"iu"):null,field:s})}),i}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const i=t.options.fields,s=t.weights,o=i.length,r=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const n=i[0].field;return k(r(e,n),t,s[n]||1)}:function(t,e){var n=0;if(t.field){const i=r(e,t.field);!t.regex&&i?n+=1/o:n+=k(i,t,1)}else T(s,(i,s)=>{n+=k(r(e,s),t,i)});return n/o};return 1===n?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var i,s=0;for(let n of e){if((i=a(n,t))<=0)return 0;s+=i}return s/n}:function(t){var i=0;return T(e,e=>{i+=a(e,t)}),i/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n=[];const i=this,s=t.options,o=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof o)return o.bind(this);const r=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&n.push(e);if(t.query){e=!0;for(let t of n)if("$score"===t.field){e=!1;break}e&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter(t=>"$score"!==t.field);return n.length?function(t,e){var i,s;for(let o of n)if(s=o.field,i=("desc"===o.direction?-1:1)*L(r(s,t),r(s,e)))return i;return 0}:null}prepareSearch(t,e){const n={};var i=Object.assign({},e);if(I(i,"sort"),I(i,"sort_empty"),i.fields){I(i,"fields");const t=[];i.fields.forEach(e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1}),i.fields=t}return{options:i,query:t.toLowerCase().trim(),tokens:this.tokenize(t,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?C:S}}search(t,e){var n,i,s=this;i=this.prepareSearch(t,e),e=i.options,t=i.query;const o=e.score||s._getScoreFunction(i);t.length?T(s.items,(t,s)=>{n=o(t),(!1===e.filter||n>0)&&i.items.push({score:n,id:s})}):T(s.items,(t,e)=>{i.items.push({score:1,id:e})});const r=s._getSortFunction(i);return r&&i.items.sort(r),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i}}const $=t=>null==t?null:P(t),P=t=>"boolean"==typeof t?t?"1":"0":t+"",D=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),F=(t,e)=>{var n;return function(i,s){var o=this;n&&(o.loading=Math.max(o.loading-1,0),clearTimeout(n)),n=setTimeout(function(){n=null,o.loadedSearches[i]=!0,t.call(o,i,s)},e)}},j=(t,e,n)=>{var i,s=t.trigger,o={};for(i of(t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return s.apply(t,arguments);o[n]=arguments},n.apply(t,[]),t.trigger=s,e))i in o&&s.apply(t,o[i])},M=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},q=(t,e,n,i)=>{t.addEventListener(e,n,i)},R=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),H=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),z=t=>t.replace(/[\\"']/g,"\\$&"),B=(t,e)=>{e&&t.append(e)},V=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},W=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(K(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},K=t=>"string"==typeof t&&t.indexOf("<")>-1,U=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},Q=(t,e)=>{Object.assign(t.style,e)},J=(t,...e)=>{var n=X(e);(t=G(t)).map(t=>{n.map(e=>{t.classList.add(e)})})},Y=(t,...e)=>{var n=X(e);(t=G(t)).map(t=>{n.map(e=>{t.classList.remove(e)})})},X=t=>{var e=[];return V(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},G=t=>(Array.isArray(t)||(t=[t]),t),Z=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},tt=(t,e=0)=>e>0?t[t.length-1]:t[0],et=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},nt=(t,e)=>{V(e,(e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)})},it=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},st=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>3===t.nodeType?(t=>{var n=t.data.match(e);if(n&&t.data.length>0){var i=document.createElement("span");i.className="highlight";var s=t.splitText(n.index);s.splitText(n[0].length);var o=s.cloneNode(!0);return i.appendChild(o),it(s,i),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach(t=>{n(t)})})(t),0);n(t)},ot="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var rt={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:' ',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};function at(t,e){var n=Object.assign({},rt,e),i=n.dataAttr,s=n.labelField,o=n.valueField,r=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,d=t.tagName.toLowerCase(),u=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!u&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(u=e.textContent)}var h={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(()=>{var e,d=h.options,u={},p=1;let f=0;var g=t=>{var e=Object.assign({},t.dataset),n=i&&e[i];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},m=(t,e)=>{var i=$(t.value);if(null!=i&&(i||n.allowEmptyOption)){if(u.hasOwnProperty(i)){if(e){var l=u[i][a];l?Array.isArray(l)?l.push(e):u[i][a]=[l,e]:u[i][a]=e}}else{var c=g(t);c[s]=c[s]||t.textContent,c[o]=c[o]||i,c[r]=c[r]||t.disabled,c[a]=c[a]||e,c.$option=t,c.$order=c.$order||++f,u[i]=c,d.push(c)}t.selected&&h.items.push(i)}};h.maxItems=t.hasAttribute("multiple")?null:1,V(t.children,t=>{var n,i,s;"optgroup"===(e=t.tagName.toLowerCase())?((s=g(n=t))[l]=s[l]||n.getAttribute("label")||"",s[c]=s[c]||p++,s[r]=s[r]||n.disabled,s.$order=s.$order||++f,h.optgroups.push(s),i=s[c],V(n.children,t=>{m(t,i)})):"option"===e&&m(t)})})():(()=>{const e=t.getAttribute(i);if(e)h.options=JSON.parse(e),V(h.options,t=>{h.items.push(t[o])});else{var r=t.value.trim()||"";if(!n.allowEmptyOption&&!r.length)return;const e=r.split(n.delimiter);V(e,t=>{const e={};e[s]=t,e[o]=t,h.options.push(e)}),h.items=e}})(),Object.assign({},rt,h,e)}var lt=0;class ct extends(function(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const i=this,s=[];if(Array.isArray(t))t.forEach(t=>{"string"==typeof t?s.push(t):(i.plugins.settings[t.name]=t.options,s.push(t.name))});else if(t)for(e in t)t.hasOwnProperty(e)&&(i.plugins.settings[e]=t[e],s.push(e));for(;n=s.shift();)i.require(n)}loadPlugin(e){var n=this,i=n.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=s.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}(e)){constructor(t,e){var n;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,lt++;var i=W(t);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const s=at(i,e);this.settings=s,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=H(i,"tomselect-"+lt),this.isRequired=i.required,this.sifter=new N(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=t=>o.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=W(""),a=W("
"),l=this._render("dropdown"),c=W('
'),d=this.input.getAttribute("class")||"",u=s.mode;var h;J(r,s.wrapperClass,d,u),J(a,s.controlClass),B(r,a),J(l,s.dropdownClass,u),s.copyClassesToDropdown&&J(l,d),J(c,s.dropdownContentClass),B(l,c),W(s.dropdownParent||r).appendChild(l),K(s.controlInput)?(h=W(s.controlInput),V(["autocorrect","autocapitalize","autocomplete","spellcheck"],t=>{i.getAttribute(t)&&nt(h,{[t]:i.getAttribute(t)})}),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):s.controlInput?(h=W(s.controlInput),this.focus_node=h):(h=W("
"),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,s=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown";nt(s,{id:u}),nt(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const h=H(c,t.inputId+"-ts-control"),p="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",f=document.querySelector(p),g=t.focus.bind(t);if(f){q(f,"click",g),nt(f,{for:h});const e=H(f,t.inputId+"-ts-label");nt(c,{"aria-labelledby":e}),nt(s,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");J([o,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&nt(l,{multiple:"multiple"}),e.placeholder&&nt(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+r(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=F(e.load,e.loadThrottle)),q(i,"mousemove",()=>{t.ignoreHover=!1}),q(i,"mouseenter",e=>{var n=Z(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)},{capture:!0}),q(i,"click",e=>{const n=Z(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),M(e,!0))}),q(a,"click",e=>{var i=Z(e.target,"[data-ts-item]",a);i&&t.onItemSelect(e,i)?M(e,!0):""==n.value&&(t.onClick(),M(e,!0))}),q(c,"keydown",e=>t.onKeyDown(e)),q(n,"keypress",e=>t.onKeyPress(e)),q(n,"input",e=>t.onInput(e)),q(c,"blur",e=>t.onBlur(e)),q(c,"focus",e=>t.onFocus(e)),q(n,"paste",e=>t.onPaste(e));const m=e=>{const s=e.composedPath()[0];if(!o.contains(s)&&!i.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==n&&t.isOpen?e.stopPropagation():M(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};q(document,"mousedown",m),q(window,"scroll",v,d),q(window,"resize",v,d),this._destroy=()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),f&&f.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,q(l,"invalid",()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())}),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():l.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),J(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),V(e,t=>{this.registerOptionGroup(t)})}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'",option:(t,n)=>"
"+n(t[e])+"
",item:(t,n)=>"
"+n(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+" …
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?at(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){U(this.input,"input"),U(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?M(t):e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);V(n,t=>{$(t)&&(this.options[t]?e.addItem(t):e.createItem(t))})}},0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void M(t)):void 0}M(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&M(t);else{switch(t.keyCode){case 65:if(R(ot,t)&&""==e.control_input.value)return M(t),void e.selectAll();break;case 27:return e.isOpen&&(M(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void M(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void M(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),M(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&M(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),M(t)),e.settings.create&&e.createItem()&&M(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!R(ot,t)&&M(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null))(()=>{this.refreshTimeout=null,this._onInput()},this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void M(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,()=>{i.settings.closeAfterSelect&&i.close()}):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(M(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;J(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||Y(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,U(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){j(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&R("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(r=s,s=o,o=r),i=s;i<=o;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);M(e)}else"click"===n&&R(ot,e)||"keydown"===n&&R("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&Y(n,"last-active"),J(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),Y(t,"active")}clearActiveItems(){Y(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,nt(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),nt(t,{"aria-selected":"true"}),J(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,s=n.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-n.getBoundingClientRect().top+s;r+o>i+s?this.scroll(r-i+o,e):r
{t.setActiveItemClass(e)}))}inputState(){var t=this;t.control.contains(t.control_input)&&(nt(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&nt(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout(()=>{t.ignoreFocus=!1,t.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,s=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,e=i.sifter.search(t,Object.assign(s,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter(t=>{let e=$(t.id);return!(e&&-1!==i.items.indexOf(e))})),e}refreshOptions(t=!0){var e,n,i,s,o,r,a,l,c,d;const u={},h=[];var p=this,f=p.inputValue();const g=f===p.lastQuery||""==f&&null==p.lastQuery;var m=p.search(f),v=null,_=p.settings.shouldOpen||!1,b=p.dropdown_content;g&&(v=p.activeOption)&&(c=v.closest("[data-group]")),s=m.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(_=!0);const y=(t,e)=>{let n=u[t];if(void 0!==n){let t=h[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e0&&(d=d.cloneNode(!0),nt(d,{id:a.$id+"-clone-"+n,"aria-selected":null}),d.classList.add("ts-cloned"),Y(d,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===o.toString()&&(v=d)),l.appendChild(d),""!=o&&(u[o]=i)}}var w;p.settings.lockOptgroupOrder&&h.sort((t,e)=>t.order-e.order),a=document.createDocumentFragment(),V(h,t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=p.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);B(t,n),B(t,e);let s=p.render("optgroup",{group:i,options:t});B(a,s)}else B(a,e)}),b.innerHTML="",B(b,a),p.settings.highlight&&(w=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}),m.query.length&&m.tokens.length&&V(m.tokens,t=>{st(b,t.regex)}));var O=t=>{let e=p.render(t,{input:f});return e&&(_=!0,b.insertBefore(e,b.firstChild)),e};if(p.loading?O("loading"):p.settings.shouldLoad.call(p,f)?0===m.items.length&&O("no_results"):O("not_loading"),(l=p.canCreate(f))&&(d=O("option_create")),p.hasOptions=m.items.length>0||l,_){if(m.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let t=0;d&&!p.settings.addPrecedence&&(t=1),v=p.selectable()[t]}}else d&&(v=d);t&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=$(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){V(t,t=>{this.addOption(t,e)})}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=$(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,s;const o=$(t),r=$(e[n.settings.valueField]);if(null===o)return;const a=n.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=n.getOption(o),c=n.getItem(o);if(e.$order=e.$order||a.$order,delete n.options[o],n.uncacheValue(r),n.options[r]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);it(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}c&&(-1!==(s=n.items.indexOf(o))&&n.items.splice(s,1,r),i=n._render("item",e),c.classList.contains("active")&&J(i,"active"),it(c,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=P(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};V(this.options,(t,i)=>{e(t,i)&&(n[i]=t)}),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=$(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i;if(!t)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=$(t);return null!==e?this.control.querySelector(`[data-value="${z(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const s=(i=i.filter(t=>-1===n.items.indexOf(t)))[i.length-1];i.forEach(t=>{n.isPending=t!==s,n.addItem(t,e)})}addItem(t,e){j(this,e?[]:["change","dropdown_close"],()=>{var n,i;const s=this,o=s.settings.mode,r=$(t);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(e),"multi"!==o||!s.isFull())){if(n=s._render("item",s.options[r]),s.control.contains(n)&&(n=n.cloneNode(!0)),i=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(n),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(r),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,n),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!i&&s.isFull())&&(s.inputState(),s.refreshState())}})}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,s;const o=t.dataset.value;i=et(t),t.remove(),t.classList.contains("active")&&(s=n.activeItems.indexOf(t),n.activeItems.splice(s,1),Y(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(o)&&n.removeOption(o,e),i{}){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,s=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return e(),!1;i.lock();var o=!1,r=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=$(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(s),i.addItem(n),e(t),o=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,r):{[i.settings.labelField]:t,[i.settings.valueField]:t},o||r(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;var s;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",(s=t.options,0===Object.keys(s).length)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length;function a(t,n,i){return t||(t=W(''+D(i)+" ")),t!=s&&e.input.append(t),o.push(t),(t!=s||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach(t=>{t.selected=!1}),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach(t=>{n=e.options[t],i=n[e.settings.labelField]||"",o.includes(n.$option)?a(e.input.querySelector(`option[value="${z(t)}"]:not(:checked)`),t,i):n.$option=a(n.$option,t,i)})}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,nt(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),Q(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),Q(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,nt(e.focus_node,{"aria-expanded":"false"}),Q(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;Q(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();V(n,t=>{e.removeItem(t,!0)}),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,s,o,r=this;e=t&&8===t.keyCode?-1:1,n={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=tt(r.activeItems,e),i=et(s),e>0&&i++,V(r.activeItems,t=>a.push(t));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[r.caretPos-1]:e>0&&n.start===r.inputValue().length&&(i=t[r.caretPos]),void 0!==i&&a.push(i)}if(!r.shouldDelete(a,t))return!1;for(M(t,!0),void 0!==i&&r.setCaret(i);a.length;)r.removeItem(a.pop());return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map(t=>t.dataset.value);return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,e))}advanceSelection(t,e){var n,i,s=this;s.rtl&&(t*=-1),s.inputValue().length||(R(ot,e)||R("shiftKey",e)?(i=(n=s.getLastActive(t))?n.classList.contains("active")?s.getAdjacent(n,t,"item"):n:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(i.classList.contains("active")&&s.removeActiveItem(n),s.setActiveItemClass(i)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?tt(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,Y(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=s.settings.render[t].call(this,e,D)))return null;if(i=W(i),"option"===t||"option_create"===t?e[s.settings.disabledField]?nt(i,{"aria-disabled":"true"}):nt(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[s.settings.optgroupValueField],nt(i,{"data-group":n}),e.group[s.settings.disabledField]&&nt(i,{"data-disabled":""})),"option"===t||"item"===t){const n=P(e[s.settings.valueField]);nt(i,{"data-value":n}),"item"===t?(J(i,s.settings.itemClass),nt(i,{"data-ts-item":""})):(J(i,s.settings.optionClass),nt(i,{role:"option",id:e.$id}),e.$div=i,s.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){V(this.options,t=>{t.$div&&(t.$div.remove(),delete t.$div)})}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,s=i[e];i[e]=function(){var e,o;return"after"===t&&(e=s.apply(i,arguments)),o=n.apply(i,arguments),"instead"===t?o:("before"===t&&(e=s.apply(i,arguments)),e)}}}return ct.define("change_listener",function(){q(this.input,"change",()=>{this.sync()})}),ct.define("checkbox_options",function(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var s=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},o=function(t){setTimeout(()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&s(e,t.classList.contains("selected"))},1)};e.hook("after","setupTemplates",()=>{var t=e.settings.render.option;e.settings.render.option=(n,o)=>{var r=W(t.call(e,n,o)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",function(t){M(t)}),a.type="checkbox";const l=$(n[e.settings.valueField]);return s(a,!!(l&&e.items.indexOf(l)>-1)),r.prepend(a),r}}),e.on("item_remove",t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),o(n))}),e.on("item_add",t=>{var n=e.getOption(t);n&&o(n)}),e.hook("instead","onOptionSelect",(t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void M(t,!0);n.call(e,t,i),o(i)})}),ct.define("clear_button",function(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`⨯
`},t);e.on("initialize",()=>{var t=W(n.html(n));t.addEventListener("click",t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())}),e.control.appendChild(t)})}),ct.define("drag_drop",function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,s=!0;t.hook("after","setupTemplates",()=>{var e=t.settings.render.item;t.settings.render.item=(n,o)=>{const r=W(e.call(t,n,o));nt(r,{draggable:"true"});const a=t=>{t.preventDefault(),r.classList.add("ts-drag-over"),l(r,i)},l=(t,e)=>{var n,i,s;void 0!==e&&(((t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,r)?(i=e,null==(s=(n=t).parentNode)||s.insertBefore(i,n.nextSibling)):((t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)})(t,e))};return q(r,"mousedown",t=>{s||M(t),t.stopPropagation()}),q(r,"dragstart",t=>{i=r,setTimeout(()=>{r.classList.add("ts-dragging")},0)}),q(r,"dragenter",a),q(r,"dragover",a),q(r,"dragleave",()=>{r.classList.remove("ts-drag-over")}),q(r,"dragend",()=>{var e;document.querySelectorAll(".ts-drag-over").forEach(t=>t.classList.remove("ts-drag-over")),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach(t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}}),t.setValue(n)}),r}}),t.hook("instead","lock",()=>(s=!1,e.call(t))),t.hook("instead","unlock",()=>(s=!0,n.call(t)))}),ct.define("dropdown_header",function(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>''},t);e.on("initialize",()=>{var t=W(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",t=>{M(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})}),ct.define("caret_position",function(){var t=this;t.hook("instead","setCaret",e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach((n,i)=>{i{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=et(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),Y(n,"last-active")}else t.setCaret(t.caretPos+e)})}),ct.define("dropdown_input",function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",()=>{t.focus_node=t.control,J(t.control_input,"dropdown-input");const e=W('');e.append(t.control_input),t.dropdown.insertBefore(e,t.dropdown.firstChild);const n=W('
');n.placeholder=t.settings.placeholder||"",t.control.append(n)}),t.on("initialize",()=>{t.control_input.addEventListener("keydown",e=>{switch(e.keyCode){case 27:return t.isOpen&&(M(e,!0),t.close()),void t.clearActiveItems();case 9:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)}),t.on("blur",()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex}),t.on("dropdown_open",()=>{t.control_input.focus()});const e=t.onBlur;t.hook("instead","onBlur",n=>{if(!n||n.relatedTarget!=t.control_input)return e.call(t)}),q(t.control_input,"blur",()=>t.onBlur()),t.hook("before","close",()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})})})}),ct.define("input_autogrow",function(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),n=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);for(const t of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])e.style[t]=n.style[t];var i=()=>{e.textContent=n.value,n.style.width=e.clientWidth+"px"};i(),t.on("update item_add item_remove",i),q(n,"input",i),q(n,"keyup",i),q(n,"blur",i),q(n,"update",i)})}),ct.define("no_backspace_delete",function(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",n=>!!t.activeItems.length&&e.call(t,n))}),ct.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),ct.define("optgroup_columns",function(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",n=>{var i,s,o,r;if(!t.isOpen||37!==n.keyCode&&39!==n.keyCode)return e.call(t,n);t.ignoreHover=!0,r=Z(t.activeOption,"[data-group]"),i=et(t.activeOption,"[data-selectable]"),r&&(r=37===n.keyCode?r.previousSibling:r.nextSibling)&&(s=(o=r.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,i)])&&t.setActiveOption(s)})}),ct.define("remove_button",function(t){const e=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},t);var n=this;if(e.append){var i='
'+e.label+" ";n.hook("after","setupTemplates",()=>{var t=n.settings.render.item;n.settings.render.item=(e,s)=>{var o=W(t.call(n,e,s)),r=W(i);return o.appendChild(r),q(r,"mousedown",t=>{M(t,!0)}),q(r,"click",t=>{n.isLocked||(M(t,!0),n.isLocked||n.shouldDelete([o],t)&&(n.removeItem(o),n.refreshOptions(!1),n.inputState()))}),o}})}}),ct.define("restore_on_backspace",function(t){const e=this,n=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",function(t){if(e.isFocused&&""===e.control_input.value.trim()){var i=e.options[t];i&&e.setTextboxValue(n.text.call(e,i))}})}),ct.define("virtual_scroll",function(){const t=this,e=t.canLoad,n=t.clearActiveOption,i=t.loadCallback;var s,o,r={},a=!1,l=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(s.clientHeight/(s.scrollHeight-s.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const c=e=>!("number"==typeof t.settings.maxOptions&&s.children.length>=t.settings.maxOptions||!(e in r)||!r[e]),d=(e,n)=>t.items.indexOf(n)>=0||l.indexOf(n)>=0;t.setNextUrl=(t,e)=>{r[t]=e},t.getUrl=e=>{if(e in r){const t=r[e];return r[e]=!1,t}return t.clearPagination(),t.settings.firstUrl.call(t,e)},t.clearPagination=()=>{r={}},t.hook("instead","clearActiveOption",()=>{if(!a)return n.call(t)}),t.hook("instead","canLoad",n=>n in r?c(n):e.call(t,n)),t.hook("instead","loadCallback",(e,n)=>{if(a){if(o){const n=e[0];void 0!==n&&(o.dataset.value=n[t.settings.valueField])}}else t.clearOptions(d);i.call(t,e,n),a=!1}),t.hook("after","refreshOptions",()=>{const e=t.lastValue;var n;c(e)?(n=t.render("loading_more",{query:e}))&&(n.setAttribute("data-selectable",""),o=n):e in r&&!s.querySelector(".no-results")&&(n=t.render("no_more_results",{query:e})),n&&(J(n,t.settings.optionClass),s.append(n))}),t.on("initialize",()=>{l=Object.keys(t.options),s=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'
Loading more results ...
',no_more_results:()=>'
No more results
'},t.settings.render),s.addEventListener("scroll",()=>{t.settings.shouldLoadMore.call(t)&&c(t.lastValue)&&(a||(a=!0,t.load.call(t,t.lastValue)))})})}),ct}()}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=n(414),e=n.n(t);class i{constructor(t,e=!0,n=[],i=5e3){this.ctx=t,this.iframes=e,this.exclude=n,this.iframesTimeout=i}static matches(t,e){const n="string"==typeof e?[e]:e,i=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;if(i){let e=!1;return n.every(n=>!i.call(t,n)||(e=!0,!1)),e}return!1}getContexts(){let t,e=[];return t=void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[],t.forEach(t=>{const n=e.filter(e=>e.contains(t)).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}getIframeContents(t,e,n=()=>{}){let i;try{const e=t.contentWindow;if(i=e.document,!e||!i)throw new Error("iframe inaccessible")}catch(t){n()}i&&e(i)}isIframeBlank(t){const e="about:blank",n=t.getAttribute("src").trim();return t.contentWindow.location.href===e&&n!==e&&n}observeIframeLoad(t,e,n){let i=!1,s=null;const o=()=>{if(!i){i=!0,clearTimeout(s);try{this.isIframeBlank(t)||(t.removeEventListener("load",o),this.getIframeContents(t,e,n))}catch(t){n()}}};t.addEventListener("load",o),s=setTimeout(o,this.iframesTimeout)}onIframeReady(t,e,n){try{"complete"===t.contentWindow.document.readyState?this.isIframeBlank(t)?this.observeIframeLoad(t,e,n):this.getIframeContents(t,e,n):this.observeIframeLoad(t,e,n)}catch(t){n()}}waitForIframes(t,e){let n=0;this.forEachIframe(t,()=>!0,t=>{n++,this.waitForIframes(t.querySelector("html"),()=>{--n||e()})},t=>{t||e()})}forEachIframe(t,e,n,s=()=>{}){let o=t.querySelectorAll("iframe"),r=o.length,a=0;o=Array.prototype.slice.call(o);const l=()=>{--r<=0&&s(a)};r||l(),o.forEach(t=>{i.matches(t,this.exclude)?l():this.onIframeReady(t,i=>{e(t)&&(a++,n(i)),l()},l)})}createIterator(t,e,n){return document.createNodeIterator(t,e,n,!1)}createInstanceOnIframe(t){return new i(t.querySelector("html"),this.iframes)}compareNodeIframe(t,e,n){if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===e)return!0;if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}getIteratorNode(t){const e=t.previousNode();let n;return n=(null===e||t.nextNode())&&t.nextNode(),{prevNode:e,node:n}}checkIframeFilter(t,e,n,i){let s=!1,o=!1;return i.forEach((t,e)=>{t.val===n&&(s=e,o=t.handled)}),this.compareNodeIframe(t,e,n)?(!1!==s||o?!1===s||o||(i[s].handled=!0):i.push({val:n,handled:!0}),!0):(!1===s&&i.push({val:n,handled:!1}),!1)}handleOpenIframes(t,e,n,i){t.forEach(t=>{t.handled||this.getIframeContents(t.val,t=>{this.createInstanceOnIframe(t).forEachNode(e,n,i)})})}iterateThroughNodes(t,e,n,i,s){const o=this.createIterator(e,t,i);let r,a,l=[],c=[],d=()=>(({prevNode:a,node:r}=this.getIteratorNode(o)),r);for(;d();)this.iframes&&this.forEachIframe(e,t=>this.checkIframeFilter(r,a,t,l),e=>{this.createInstanceOnIframe(e).forEachNode(t,t=>c.push(t),i)}),c.push(r);c.forEach(t=>{n(t)}),this.iframes&&this.handleOpenIframes(l,t,n,i),s()}forEachNode(t,e,n,i=()=>{}){const s=this.getContexts();let o=s.length;o||i(),s.forEach(s=>{const r=()=>{this.iterateThroughNodes(t,s,e,n,()=>{--o<=0&&i()})};this.iframes?this.waitForIframes(s,r):r()})}}class s{constructor(t){this.ctx=t,this.ie=!1;const e=window.navigator.userAgent;(e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(t){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},t)}get opt(){return this._opt}get iterator(){return new i(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(t,e="debug"){const n=this.opt.log;this.opt.debug&&"object"==typeof n&&"function"==typeof n[e]&&n[e](`mark.js: ${t}`)}escapeStr(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(t){return"disabled"!==this.opt.wildcards&&(t=this.setupWildcardsRegExp(t)),t=this.escapeStr(t),Object.keys(this.opt.synonyms).length&&(t=this.createSynonymsRegExp(t)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),this.opt.diacritics&&(t=this.createDiacriticsRegExp(t)),t=this.createMergedBlanksRegExp(t),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.createJoinersRegExp(t)),"disabled"!==this.opt.wildcards&&(t=this.createWildcardsRegExp(t)),t=this.createAccuracyRegExp(t)}createSynonymsRegExp(t){const e=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",i=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let s in e)if(e.hasOwnProperty(s)){const o=e[s],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==r&&""!==a&&(t=t.replace(new RegExp(`(${this.escapeStr(r)}|${this.escapeStr(a)})`,`gm${n}`),i+`(${this.processSynomyms(r)}|`+`${this.processSynomyms(a)})`+i))}return t}processSynomyms(t){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),t}setupWildcardsRegExp(t){return(t=t.replace(/(?:\\)*\?/g,t=>"\\"===t.charAt(0)?"?":"")).replace(/(?:\\)*\*/g,t=>"\\"===t.charAt(0)?"*":"")}createWildcardsRegExp(t){let e="withSpaces"===this.opt.wildcards;return t.replace(/\u0001/g,e?"[\\S\\s]?":"\\S?").replace(/\u0002/g,e?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(t){return t.replace(/[^(|)\\]/g,(t,e,n)=>{let i=n.charAt(e+1);return/[(|)\\]/.test(i)||""===i?t:t+"\0"})}createJoinersRegExp(t){let e=[];const n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&e.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&e.push("\\u00ad\\u200b\\u200c\\u200d"),e.length?t.split(/\u0000+/).join(`[${e.join("")}]*`):t}createDiacriticsRegExp(t){const e=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let i=[];return t.split("").forEach(s=>{n.every(n=>{if(-1!==n.indexOf(s)){if(i.indexOf(n)>-1)return!1;t=t.replace(new RegExp(`[${n}]`,`gm${e}`),`[${n}]`),i.push(n)}return!0})}),t}createMergedBlanksRegExp(t){return t.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(t){let e=this.opt.accuracy,n="string"==typeof e?e:e.value,i="string"==typeof e?[]:e.limiters,s="";switch(i.forEach(t=>{s+=`|${this.escapeStr(t)}`}),n){case"partially":default:return`()(${t})`;case"complementary":return s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")),`()([^${s}]*${t}[^${s}]*)`;case"exactly":return`(^|\\s${s})(${t})(?=$|\\s${s})`}}getSeparatedKeywords(t){let e=[];return t.forEach(t=>{this.opt.separateWordSearch?t.split(" ").forEach(t=>{t.trim()&&-1===e.indexOf(t)&&e.push(t)}):t.trim()&&-1===e.indexOf(t)&&e.push(t)}),{keywords:e.sort((t,e)=>e.length-t.length),length:e.length}}isNumeric(t){return Number(parseFloat(t))==t}checkRanges(t){if(!Array.isArray(t)||"[object Object]"!==Object.prototype.toString.call(t[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(t),[];const e=[];let n=0;return t.sort((t,e)=>t.start-e.start).forEach(t=>{let{start:i,end:s,valid:o}=this.callNoMatchOnInvalidRanges(t,n);o&&(t.start=i,t.length=s-i,e.push(t),n=s)}),e}callNoMatchOnInvalidRanges(t,e){let n,i,s=!1;return t&&void 0!==t.start?(n=parseInt(t.start,10),i=n+parseInt(t.length,10),this.isNumeric(t.start)&&this.isNumeric(t.length)&&i-e>0&&i-n>0?s=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(t)}`),this.opt.noMatch(t))):(this.log(`Ignoring invalid range: ${JSON.stringify(t)}`),this.opt.noMatch(t)),{start:n,end:i,valid:s}}checkWhitespaceRanges(t,e,n){let i,s=!0,o=n.length,r=e-o,a=parseInt(t.start,10)-r;return a=a>o?o:a,i=a+parseInt(t.length,10),i>o&&(i=o,this.log(`End range automatically set to the max value of ${o}`)),a<0||i-a<0||a>o||i>o?(s=!1,this.log(`Invalid range: ${JSON.stringify(t)}`),this.opt.noMatch(t)):""===n.substring(a,i).replace(/\s+/g,"")&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:a,end:i,valid:s}}getTextNodes(t){let e="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,t=>{n.push({start:e.length,end:(e+=t.textContent).length,node:t})},t=>this.matchesExclude(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{t({value:e,nodes:n})})}matchesExclude(t){return i.matches(t,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(t,e,n){const i=this.opt.element?this.opt.element:"mark",s=t.splitText(e),o=s.splitText(n-e);let r=document.createElement(i);return r.setAttribute("data-markjs","true"),this.opt.className&&r.setAttribute("class",this.opt.className),r.textContent=s.textContent,s.parentNode.replaceChild(r,s),o}wrapRangeInMappedTextNode(t,e,n,i,s){t.nodes.every((o,r)=>{const a=t.nodes[r+1];if(void 0===a||a.start>e){if(!i(o.node))return!1;const a=e-o.start,l=(n>o.end?o.end:n)-o.start,c=t.value.substr(0,o.start),d=t.value.substr(l+o.start);if(o.node=this.wrapRangeInTextNode(o.node,a,l),t.value=c+d,t.nodes.forEach((e,n)=>{n>=r&&(t.nodes[n].start>0&&n!==r&&(t.nodes[n].start-=l),t.nodes[n].end-=l)}),n-=l,s(o.node.previousSibling,o.start),!(n>o.end))return!1;e=o.end}return!0})}wrapMatches(t,e,n,i,s){const o=0===e?0:e+1;this.getTextNodes(e=>{e.nodes.forEach(e=>{let s;for(e=e.node;null!==(s=t.exec(e.textContent))&&""!==s[o];){if(!n(s[o],e))continue;let r=s.index;if(0!==o)for(let t=1;t
{let r;for(;null!==(r=t.exec(e.value))&&""!==r[o];){let s=r.index;if(0!==o)for(let t=1;tn(r[o],t),(e,n)=>{t.lastIndex=n,i(e)})}s()})}wrapRangeFromIndex(t,e,n,i){this.getTextNodes(s=>{const o=s.value.length;t.forEach((t,i)=>{let{start:r,end:a,valid:l}=this.checkWhitespaceRanges(t,o,s.value);l&&this.wrapRangeInMappedTextNode(s,r,a,n=>e(n,t,s.value.substring(r,a),i),e=>{n(e,t)})}),i()})}unwrapMatches(t){const e=t.parentNode;let n=document.createDocumentFragment();for(;t.firstChild;)n.appendChild(t.removeChild(t.firstChild));e.replaceChild(n,t),this.ie?this.normalizeTextNode(e):e.normalize()}normalizeTextNode(t){if(t){if(3===t.nodeType)for(;t.nextSibling&&3===t.nextSibling.nodeType;)t.nodeValue+=t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);else this.normalizeTextNode(t.firstChild);this.normalizeTextNode(t.nextSibling)}}markRegExp(t,e){this.opt=e,this.log(`Searching with expression "${t}"`);let n=0,i="wrapMatches";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),this[i](t,this.opt.ignoreGroups,(t,e)=>this.opt.filter(e,t,n),t=>{n++,this.opt.each(t)},()=>{0===n&&this.opt.noMatch(t),this.opt.done(n)})}mark(t,e){this.opt=e;let n=0,i="wrapMatches";const{keywords:s,length:o}=this.getSeparatedKeywords("string"==typeof t?[t]:t),r=this.opt.caseSensitive?"":"i",a=t=>{let e=new RegExp(this.createRegExp(t),`gm${r}`),l=0;this.log(`Searching with expression "${e}"`),this[i](e,1,(e,i)=>this.opt.filter(i,t,n,l),t=>{l++,n++,this.opt.each(t)},()=>{0===l&&this.opt.noMatch(t),s[o-1]===t?this.opt.done(n):a(s[s.indexOf(t)+1])})};this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),0===o?this.opt.done(n):a(s[0])}markRanges(t,e){this.opt=e;let n=0,i=this.checkRanges(t);i&&i.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(i)),this.wrapRangeFromIndex(i,(t,e,n,i)=>this.opt.filter(t,e,n,i),(t,e)=>{n++,this.opt.each(t,e)},()=>{this.opt.done(n)})):this.opt.done(n)}unmark(t){this.opt=t;let e=this.opt.element?this.opt.element:"*";e+="[data-markjs]",this.opt.className&&(e+=`.${this.opt.className}`),this.log(`Removal selector "${e}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,t=>{this.unwrapMatches(t)},t=>{const n=i.matches(t,e),s=this.matchesExclude(t);return!n||s?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}function o(t){const e=new s(t);return this.mark=(t,n)=>(e.mark(t,n),this),this.markRegExp=(t,n)=>(e.markRegExp(t,n),this),this.markRanges=(t,n)=>(e.markRanges(t,n),this),this.unmark=t=>(e.unmark(t),this),this}var r=n(766),a=n.n(r);function l(t){return l="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},l(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function d(t){for(var e=1;e'.concat(t.getAttribute("data-ea-i18n-no-results-found")," ")}},plugins:{dropdown_input:{}}};return null===t.getAttribute("required")&&null===t.getAttribute("disabled")&&(e.plugins.clear_button={title:""}),null!==t.getAttribute("multiple")&&(e.plugins.remove_button={title:""}),null!==t.getAttribute("data-ea-autocomplete-endpoint-url")&&(e.plugins.virtual_scroll={}),"true"===t.getAttribute("data-ea-autocomplete-allow-item-create")&&(e.create=!0),e}function b(t){var e=g(m,this,E).call(this,g(m,this,_).call(this,t),{maxOptions:null});if(g(m,this,x).call(this,t)){var n=g(m,this,k).call(this,t,!1),i=n.options,s=n.optgroups;e=g(m,this,E).call(this,e,{options:i,optgroups:s,optgroupField:"optgroup",lockOptgroupOrder:!0,valueField:"value",labelField:"text",searchField:["text"]})}return g(m,this,O).call(this,t,e)}function y(t){var e=g(m,this,E).call(this,g(m,this,_).call(this,t),{valueField:"value",labelField:"label_raw",searchField:["label_text"],maxOptions:null,render:{item:function(t,e){return"".concat(t.label_raw,"
")},option:function(t,e){return"".concat(t.label_raw,"
")}}});if(g(m,this,x).call(this,t)){var n=g(m,this,k).call(this,t,!0),i=n.options,s=n.optgroups;e=g(m,this,E).call(this,e,{options:i,optgroups:s,optgroupField:"optgroup",lockOptgroupOrder:!0})}else e.options=g(m,this,C).call(this,t,!0);return g(m,this,O).call(this,t,e)}function w(t,e){var n="true"===t.getAttribute("data-ea-autocomplete-render-items-as-html"),i=g(m,this,E).call(this,g(m,this,_).call(this,t),{valueField:"entityId",labelField:"entityAsString",searchField:["entityAsString"],firstUrl:function(t){return"".concat(e,"&query=").concat(encodeURIComponent(t))},load:function(t,e){var n=this,i=this.getUrl(t);fetch(i).then(function(t){return t.json()}).then(function(i){n.setNextUrl(t,i.next_page),e(i.results)}).catch(function(){return e()})},preload:"focus",maxOptions:null,score:function(t){return function(t){return 1}},render:{option:function(t,e){return"".concat(n?t.entityAsString:e(t.entityAsString),"
")},item:function(t,e){return"".concat(n?t.entityAsString:e(t.entityAsString),"
")},loading_more:function(e,n){return''.concat(t.getAttribute("data-ea-i18n-loading-more-results"),"
")},no_more_results:function(e,n){return''.concat(t.getAttribute("data-ea-i18n-no-more-results"),"
")},no_results:function(e,n){return''.concat(t.getAttribute("data-ea-i18n-no-results-found"),"
")}}});return g(m,this,O).call(this,t,i)}function O(t,e){t.dispatchEvent(new CustomEvent("ea.autocomplete.pre-connect",{detail:{config:e,prefix:"autocomplete"},bubbles:!0}));var n=new(a())(t,e);return t.dispatchEvent(new CustomEvent("ea.autocomplete.connect",{detail:{tomSelect:n,config:e,prefix:"autocomplete"},bubbles:!0})),n}function A(t){return t.replace(/(<([^>]+)>)/gi,"")}function E(t,e){return d(d({},t),e)}function x(t){for(var e=0;e1&&void 0!==arguments[1]&&arguments[1];if(null===t||""===t)return null;try{var n=new URL(t,window.location.origin);return["http:","https:","mailto:","tel:"].includes(n.protocol)?e&&n.origin!==window.location.origin?null:t:null}catch(t){return null}}function L(t){return L="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},L(t)}function N(t,e){for(var n=0;n ',fetch(e.getAttribute("href")).then(function(t){return t.text()}).then(function(e){s.innerHTML=e,q(V,t,Z).call(t),q(V,t,st).call(t)}).catch(function(t){console.error(t)}),i.preventDefault()});var s=function(t){t.closest("form").querySelectorAll('input[name^="filters['.concat(t.dataset.filterProperty,']"]')).forEach(function(t){t.remove()}),t.remove()};document.querySelector("#modal-clear-button").addEventListener("click",function(){n.querySelectorAll(".filter-field").forEach(function(t){s(t)}),n.querySelector("form").submit()}),document.querySelector("#modal-apply-button").addEventListener("click",function(){n.querySelectorAll(".filter-checkbox:not(:checked)").forEach(function(t){s(t.closest(".filter-field"))}),n.querySelector("form").submit()})}}}function G(){var t=null,e=document.querySelector(".form-batch-checkbox-all");if(null!==e){var n=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox');e.addEventListener("change",function(){n.forEach(function(t){t.checked=e.checked,t.dispatchEvent(new Event("change"))})});var i=document.querySelector(".deselect-batch-button");null!==i&&i.addEventListener("click",function(){e.checked=!1,e.dispatchEvent(new Event("change"))}),n.forEach(function(i,s){i.dataset.rowIndex=s,i.addEventListener("click",function(e){if(t&&e.shiftKey){var i=Number.parseInt(t.dataset.rowIndex),s=Number.parseInt(e.target.dataset.rowIndex),o=e.target.checked,r=Math.min(i,s),a=Math.max(i,s);n.forEach(function(t,e){r<=e&&e<=a&&(t.checked=o,t.dispatchEvent(new Event("change")))})}t=e.target}),i.addEventListener("change",function(){var t=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),n=i.closest("tr"),s=i.closest(".content");i.checked?n.classList.add("selected-row"):(n.classList.remove("selected-row"),e.checked=!1);var o=0!==t.length,r=document.querySelector(".content-header-title > .title"),a=s.querySelector(".datagrid-filters"),l=s.querySelector(".global-actions"),c=s.querySelector(".batch-actions");null!==r&&I(r,o),null!==a&&I(a,o),null!==l&&I(l,o),null!==c&&I(c,!o)})});var s=document.querySelector("#modal-batch-action .modal-body-content h4"),o=null==s?void 0:s.textContent;document.querySelectorAll("[data-action-batch]").forEach(function(t){t.addEventListener("click",function(t){t.preventDefault();var e=t.currentTarget,n=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),i=function(){e.setAttribute("disabled","disabled");var t={batchActionName:e.getAttribute("data-action-name"),entityFqcn:e.getAttribute("data-entity-fqcn"),batchActionUrl:e.getAttribute("data-action-url"),batchActionCsrfToken:e.getAttribute("data-action-csrf-token")};n.forEach(function(e,n){t["batchActionEntityIds[".concat(n,"]")]=e.value});var i=document.createElement("form");for(var s in i.setAttribute("method","POST"),i.setAttribute("action",e.getAttribute("data-action-url")),t){var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",s),o.setAttribute("value",t[s]),i.appendChild(o)}document.body.appendChild(i),i.submit()};if(e.hasAttribute("data-action-batch-no-confirm"))i();else{var r,a=e.textContent.trim()||e.getAttribute("title"),l=e.getAttribute("data-batch-action-confirm-message"),c=null!=l?l:o;s.textContent=c.replace("%action_name%",a).replace("%num_items%",n.length.toString());var d=document.querySelector("#modal-batch-action-button"),u=e.getAttribute("data-action-variant")||"danger",h=R[u]||"btn-danger";(r=d.classList).remove.apply(r,H),d.classList.add(h),d.addEventListener("click",i,{once:!0})}})})}}function Z(){var t=new v;document.querySelectorAll('[data-ea-widget="ea-autocomplete"]').forEach(function(e){t.create(e)})}function tt(){var t=document.querySelector("#action-confirmation-title"),e=document.querySelector("#action-confirmation-content"),n=document.querySelector("#modal-action-confirmation-button"),i=null==t?void 0:t.textContent,s=null==n?void 0:n.textContent;document.querySelectorAll('[data-action-confirmation="true"]').forEach(function(o){o.addEventListener("click",function(r){var a;r.preventDefault();var l=o.textContent.trim()||o.getAttribute("title"),c=o.getAttribute("data-action-entity-name")||"",d=o.getAttribute("data-action-entity-id")||"",u=o.getAttribute("data-action-confirmation-message"),h=null!=u?u:i;t.textContent=h.replace("%action_name%",l).replace("%entity_name%",c).replace("%entity_id%",d);var p=o.getAttribute("data-action-confirmation-content");e&&(p?(e.textContent=p.replace("%action_name%",l).replace("%entity_name%",c).replace("%entity_id%",d),e.classList.remove("d-none")):(e.textContent="",e.classList.add("d-none")));var f=o.getAttribute("data-action-confirmation-button");n.textContent=null!=f?f:s;var g=o.getAttribute("data-action-variant")||"danger",m=R[g]||"btn-danger";(a=n.classList).remove.apply(a,H),n.classList.add(m),n.addEventListener("click",function(){var t=o.getAttribute("formaction");if(t){var e=document.querySelector("#action-confirmation-form");return e.setAttribute("action",t),void e.submit()}var n=o.getAttribute("data-ea-action-form-id");if(n)document.getElementById(n).submit();else{var i=o.closest("form");if(null!=i&&i.hasAttribute("action"))i.submit();else{var s=o.getAttribute("href");s&&(window.location.href=s)}}},{once:!0})})})}function et(){var t,e=document.querySelectorAll("tr[data-default-action-url]");if(0!==e.length){e.forEach(function(t){return t.classList.add("ea-clickable-row")});var n=(null===(t=e[0].closest("table"))||void 0===t?void 0:t.getAttribute("data-default-action-trigger"))||"single",i=["a","button","input","select","textarea",".form-check",".dropdown",".actions","[data-bs-toggle]",".btn",".modal"],s=function(t){for(var e=t;e&&e!==document.body;){if(i.some(function(t){return e.matches(t)}))return!0;e=e.parentElement}return!1},o=function(t,e){if(!t.classList.contains("selected-row")){var n=t.dataset.defaultActionUrl;n&&function(t){var e=document.createElement("a");e.href=t,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)}(n)}};e.forEach(function(t){t.addEventListener("double"===n?"dblclick":"click",function(e){s(e.target)||function(t){if("double"===n)return!1;var e=window.getSelection();return null!==e&&0!==e.toString().length&&0!==e.rangeCount&&t.contains(e.getRangeAt(0).commonAncestorContainer)}(t)||o(t)}),t.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||s(e.target)&&e.target!==t||(e.preventDefault(),o(t))})})}}function nt(){document.querySelectorAll('[data-bs-toggle="popover"]').forEach(function(t){new(e().Popover)(t)})}function it(){document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(function(t){new(e().Tooltip)(t)})}function st(){document.querySelectorAll(".filter-checkbox").forEach(function(t){t.addEventListener("change",function(){var e=t.nextElementSibling,n=t.nextElementSibling.getAttribute("aria-expanded");(t.checked&&"false"===n||!t.checked&&"true"===n)&&e.click()})}),document.querySelectorAll("form[data-ea-filters-form-id]").forEach(function(t){t.addEventListener("change",function(t){if(!t.target.classList.contains("filter-checkbox")){var e=t.target.closest(".filter-field").querySelector(".filter-checkbox");e.checked||(e.checked=!0)}})}),document.querySelectorAll("[data-ea-comparison-id]").forEach(function(t){t.addEventListener("change",function(t){var e=t.currentTarget,n=e.dataset.eaComparisonId;if(void 0!==n){var i=document.querySelector('[data-ea-value2-of-comparison-id="'.concat(n,'"]'));null!==i&&I(i,"between"!==e.value)}})})}function ot(){document.querySelectorAll("[data-ea-action-form-id]").forEach(function(t){t.addEventListener("click",function(e){if(!t.hasAttribute("data-action-confirmation")){e.preventDefault();var n=t.getAttribute("data-ea-action-form-id");document.getElementById(n).submit()}})}),document.querySelectorAll("[data-ea-action-url]").forEach(function(t){t.addEventListener("click",function(e){if(!t.hasAttribute("data-action-confirmation")){e.preventDefault();var n=T(t.getAttribute("data-ea-action-url"));null!==n&&(window.location=n)}})})}})()})();
\ No newline at end of file
diff --git a/public/app.302b82dd.js.LICENSE.txt b/public/app.3d13b0df.js.LICENSE.txt
similarity index 100%
rename from public/app.302b82dd.js.LICENSE.txt
rename to public/app.3d13b0df.js.LICENSE.txt
diff --git a/public/entrypoints.json b/public/entrypoints.json
index 00c20938ba..dd44877b84 100644
--- a/public/entrypoints.json
+++ b/public/entrypoints.json
@@ -2,10 +2,10 @@
"entrypoints": {
"app": {
"css": [
- "/app.5892cfa7.css"
+ "/app.066a0e62.css"
],
"js": [
- "/app.302b82dd.js"
+ "/app.3d13b0df.js"
]
},
"form": {
diff --git a/public/manifest.json b/public/manifest.json
index 76efacd6d1..667f1c506b 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -1,6 +1,6 @@
{
- "app.css": "app.5892cfa7.css",
- "app.js": "app.302b82dd.js",
+ "app.css": "app.066a0e62.css",
+ "app.js": "app.3d13b0df.js",
"form.js": "form.bd28918c.js",
"page-layout.js": "page-layout.6e9fe55d.js",
"page-color-scheme.js": "page-color-scheme.75224563.js",
diff --git a/src/Factory/ActionFactory.php b/src/Factory/ActionFactory.php
index 8954a4593c..ae1081b96d 100644
--- a/src/Factory/ActionFactory.php
+++ b/src/Factory/ActionFactory.php
@@ -271,6 +271,14 @@ private function processAction(string $pageName, ActionDto $actionDto, ?EntityDt
if ($actionDto->hasConfirmation()) {
$confirmationMessage = $actionDto->getConfirmationMessage();
+ // the DELETE action shows a richer, dedicated confirmation by default: a
+ // specific title and a description ("there is no undo…"). A custom delete
+ // confirmation message (or any other action) keeps the generic behavior.
+ $useDefaultDeleteConfirmation = Action::DELETE === $actionDto->getName() && true === $confirmationMessage;
+ if ($useDefaultDeleteConfirmation) {
+ $confirmationMessage = t('delete_modal.title', [], 'EasyAdminBundle');
+ }
+
$actionDto->addHtmlAttributes([
'data-bs-toggle' => 'modal',
'data-bs-target' => '#modal-action-confirmation',
@@ -288,6 +296,11 @@ private function processAction(string $pageName, ActionDto $actionDto, ?EntityDt
);
}
+ // add confirmation description attribute (shown below the title)
+ if ($useDefaultDeleteConfirmation) {
+ $actionDto->setHtmlAttribute('data-action-confirmation-content', t('delete_modal.content', [], 'EasyAdminBundle'));
+ }
+
// add confirmation button label attribute
$buttonLabel = $actionDto->getConfirmationButtonLabel();
if (null !== $buttonLabel) {
@@ -327,6 +340,8 @@ private function processAction(string $pageName, ActionDto $actionDto, ?EntityDt
} else {
$batchActionAttributes['data-bs-toggle'] = 'modal';
$batchActionAttributes['data-bs-target'] = '#modal-batch-action';
+ // so the modal confirmation button can mirror the variant/color of the action that opened it
+ $batchActionAttributes['data-action-variant'] = $actionDto->getVariant()->value;
// if the confirmation config is not a boolean, it's a string or TranslatableInterface with the custom confirmation message
if (true !== $confirmationConfig) {
diff --git a/templates/components/Modal.html.twig b/templates/components/Modal.html.twig
new file mode 100644
index 0000000000..2a8f737f8d
--- /dev/null
+++ b/templates/components/Modal.html.twig
@@ -0,0 +1,67 @@
+{#
+This component creates modal windows using Bootstrap modal JavaScript logic
+but with a modern look and feel inspired by libraries like shadcn.
+
+To open/close the modal use the `
` and
+`` helpers.
+
+Usage examples:
+
+ # a confirmation dialog opened by a trigger button
+ Delete
+
+
+
+ Cancel
+ Delete
+
+
+
+ # custom body content and a wider window
+
+ Any markup you need goes here.
+
+ Close
+
+
+
+ # confirmation style with an icon stacked on top
+
+
+ No
+ Yes
+
+
+#}
+
+{% props
+ title = null, # the main text shown in the modal window
+ description = null, # the smaller optional text shown below the title
+ size = null, # window width; values: `sm` 320px, default 380px, `lg` 512px, `xl` 800px
+ icon = null, # name of the optional icon shown at the top left of the window
+ topIcon = null, # name of the optional icon shown on top of the modal contents
+ headerClass = '', # custom CSS class(es) added to the modal header HTML element
+ bodyClass = '', # custom CSS class(es) added to the modal body HTML element
+ footerClass = '' # custom CSS class(es) added to the modal footer HTML element
+%}
+{% set modalIcon = topIcon ?? icon %}
+
+
+
+ {% if block('header') is not empty %}
+
+ {% endif %}
+
+ {% if modalIcon %}
{% endif %}
+
+ {% if title %}
{{ title|raw }} {% endif %}
+ {% if description %}
{{ description|raw }}
{% endif %}
+ {% block body %}{% endblock %}
+
+
+ {% if block('footer') is not empty %}
+
+ {% endif %}
+
+
+
diff --git a/templates/components/Modal/Close.html.twig b/templates/components/Modal/Close.html.twig
new file mode 100644
index 0000000000..72905a8cee
--- /dev/null
+++ b/templates/components/Modal/Close.html.twig
@@ -0,0 +1,10 @@
+{#
+ Button that closes the Modal it lives in. Wraps `` and adds the
+ Bootstrap `data-bs-dismiss="modal"` attribute, so callers don't have to remember
+ it. The label goes in the default slot; any other Button prop (variant, icon,
+ size, …) is forwarded.
+
+ Usage (inside a footer block): Cancel
+#}
+{% props type = 'button' %}
+{{ block(outerBlocks.content) }}
diff --git a/templates/components/Modal/Trigger.html.twig b/templates/components/Modal/Trigger.html.twig
new file mode 100644
index 0000000000..e7fb8a9de3
--- /dev/null
+++ b/templates/components/Modal/Trigger.html.twig
@@ -0,0 +1,10 @@
+{#
+ Button that opens a Modal. Wraps `` and adds the Bootstrap
+ attributes needed to open the target modal, so callers don't have to remember
+ `data-bs-toggle`/`data-bs-target`. The label goes in the default slot; any other
+ Button prop (variant, icon, size, …) is forwarded.
+
+ Usage: Open
+#}
+{% props target, type = 'button' %}
+{{ block(outerBlocks.content) }}
diff --git a/templates/crud/field/code_editor.html.twig b/templates/crud/field/code_editor.html.twig
index 63b0f298a3..3b9ed905cc 100644
--- a/templates/crud/field/code_editor.html.twig
+++ b/templates/crud/field/code_editor.html.twig
@@ -10,7 +10,7 @@