primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 44.3 kB
JavaScript
this.primevue=this.primevue||{},this.primevue.multiselect=function(e,t,n,i,o,l,s,r,a,c,u,d,p,h,f){"use strict";function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=m(t),v=m(n),y=m(i),g=m(o),O=m(l),x=m(s),I=m(r),k=m(a),S=m(c),V=m(d),C=m(p),w={root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}},L=h.useStyle("\n.p-multiselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n}\n\n.p-multiselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.p-multiselect-label-container {\n overflow: hidden;\n flex: 1 1 auto;\n cursor: pointer;\n}\n\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n\n.p-multiselect-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.p-multiselect-item {\n cursor: pointer;\n display: flex;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n\n.p-multiselect-item-group {\n cursor: auto;\n}\n\n.p-multiselect-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.p-multiselect-filter-container {\n position: relative;\n flex: 1 1 auto;\n}\n\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n\n.p-multiselect-close {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n\n.p-fluid .p-multiselect {\n display: flex;\n}\n",{name:"multiselect",manual:!0});function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return(t=B(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e){var t=T(e,"string");return"symbol"===F(t)?t:String(t)}function T(e,t){if("object"!==F(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==F(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M(e){return j(e)||H(e)||$(e)||K()}function K(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function H(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function j(e){if(Array.isArray(e))return A(e)}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var N={name:"MultiSelect",extends:{name:"BaseMultiSelect",extends:C.default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,inputId:{type:String,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},closeButtonProps:{type:null,default:null},dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},appendTo:{type:String,default:"body"},display:{type:String,default:"comma"},selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},checkboxIcon:{type:String,default:void 0},closeIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},selectAll:{type:Boolean,default:null},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance,n=e.props;return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===n.display,"p-disabled":n.disabled,"p-focus":t.focused,"p-inputwrapper-filled":n.modelValue&&n.modelValue.length,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-overlay-open":t.overlayVisible}]},labelContainer:"p-multiselect-label-container",label:function(e){var t=e.props;return["p-multiselect-label",{"p-placeholder":e.instance.label===t.placeholder,"p-multiselect-label-empty":!(t.placeholder||t.modelValue&&0!==t.modelValue.length)}]},token:"p-multiselect-token",tokenLabel:"p-multiselect-token-label",removeTokenIcon:"p-multiselect-token-icon",trigger:"p-multiselect-trigger",loadingIcon:"p-multiselect-trigger-icon",dropdownIcon:"p-multiselect-trigger-icon",panel:function(e){var t=e.instance;return["p-multiselect-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},header:"p-multiselect-header",headerCheckboxContainer:function(e){var t=e.instance;return["p-checkbox p-component",{"p-checkbox-checked":t.allSelected,"p-checkbox-focused":t.headerCheckboxFocused}]},headerCheckbox:function(e){var t=e.instance;return["p-checkbox-box",{"p-highlight":t.allSelected,"p-focus":t.headerCheckboxFocused}]},headerCheckboxIcon:"p-checkbox-icon",filterContainer:"p-multiselect-filter-container",filterInput:"p-multiselect-filter p-inputtext p-component",filterIcon:"p-multiselect-filter-icon",closeButton:"p-multiselect-close p-link",closeIcon:"p-multiselect-close-icon",wrapper:"p-multiselect-items-wrapper",list:"p-multiselect-items p-component",itemGroup:"p-multiselect-item-group",item:function(e){var t=e.instance,n=e.option,i=e.index,o=e.getItemOptions;return["p-multiselect-item",{"p-highlight":t.isSelected(n),"p-focus":t.focusedOptionIndex===t.getOptionIndex(i,o),"p-disabled":t.isOptionDisabled(n)}]},checkboxContainer:"p-checkbox p-component",checkbox:function(e){return["p-checkbox-box",{"p-highlight":e.instance.isSelected(e.option)}]},checkboxIcon:"p-checkbox-icon",emptyMessage:"p-multiselect-empty-message"},inlineStyles:w,loadStyle:L.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter","selectall-change"],outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,startRangeIndex:-1,searchTimeout:null,searchValue:"",selectOnFocus:!1,focusOnHover:!1,data:function(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||u.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||u.UniqueComponentId(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(u.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?u.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?u.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?u.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getHeaderCheckboxPTOptions:function(e){return this.ptm(e,{context:{selected:this.allSelected,focused:this.headerCheckboxFocused}})},getCheckboxPTOptions:function(e,t,n,i){return this.ptm(i,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!(!this.maxSelectionLimitReached||this.isSelected(e))||!!this.optionDisabled&&u.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return u.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return u.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&u.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.overlayVisible=!1,t.focusedOptionIndex=-1,t.searchValue="",t.resetFilterOnHide&&(t.filterValue=null),e&&u.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){var t=this;if(this.disabled)e.preventDefault();else{var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if("KeyA"===e.code&&n){var i=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,i),e.preventDefault();break}!n&&u.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e),e.preventDefault())}}},onContainerClick:function(e){this.disabled||this.loading||this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide(!0):this.show(!0))},onFirstHiddenFocus:function(e){var t=e.relatedTarget===this.$refs.focusInput?u.DomHandler.getFirstFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;u.DomHandler.focus(t)},onLastHiddenFocus:function(e){var t=e.relatedTarget===this.$refs.focusInput?u.DomHandler.getLastFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;u.DomHandler.focus(t)},onCloseClick:function(){this.hide(!0)},onHeaderCheckboxFocus:function(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur:function(){this.headerCheckboxFocused=!1},onOptionSelect:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.disabled&&!this.isOptionDisabled(t)){var l=null;l=this.isSelected(t)?this.modelValue.filter((function(e){return!u.ObjectUtils.equals(e,n.getOptionValue(t),n.equalityKey)})):[].concat(M(this.modelValue||[]),[this.getOptionValue(t)]),this.updateModel(e,l),-1!==i&&(this.focusedOptionIndex=i),o&&u.DomHandler.focus(this.$refs.focusInput)}},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionSelectRange:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===n&&(n=this.findNearestSelectedOptionIndex(i,!0)),-1===i&&(i=this.findNearestSelectedOptionIndex(n)),-1!==n&&-1!==i){var o=Math.min(n,i),l=Math.max(n,i),s=this.visibleOptions.slice(o,l+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,s)}},onFilterChange:function(e){var t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0)}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){I.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){var t=e.currentTarget;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){t.setSelectionRange(0,e.shiftKey?t.value.length:0),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();e.shiftKey&&n&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show()}e.preventDefault()},onEndKey:function(e){var t=e.currentTarget;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var n=t.value.length;t.setSelectionRange(e.shiftKey?0:n,n),this.focusedOptionIndex=-1}else{var i=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();e.shiftKey&&i&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o),!this.overlayVisible&&this.show()}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?-1!==this.focusedOptionIndex&&(e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])):this.onArrowDownKey(e),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(this.overlayVisible&&this.hasFocusableElements()?(u.DomHandler.focus(e.shiftKey?this.$refs.lastHiddenFocusableElementOnOverlay:this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},onOverlayEnter:function(e){u.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),u.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&u.DomHandler.focus(this.$refs.filterInput)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){u.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?u.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=u.DomHandler.getOuterWidth(this.$el)+"px",u.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new u.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!u.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue:function(e){var t=this,n=(this.optionGroupLabel?this.flatOptions(this.options):this.options||[]).find((function(n){return!t.isOptionGroup(n)&&u.ObjectUtils.equals(t.getOptionValue(n),e,t.equalityKey)}));return n?this.getOptionLabel(n):null},getSelectedItemsLabel:function(){var e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll:function(e){var t=this;if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{var n=this.allSelected?[]:this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,n)}this.headerCheckboxFocused=!0},removeOption:function(e,t){var n=this,i=this.modelValue.filter((function(e){return!u.ObjectUtils.equals(e,t,n.equalityKey)}));this.updateModel(e,i)},clearFilter:function(){this.filterValue=null},hasFocusableElements:function(){return u.DomHandler.getFocusableElements(this.overlay,':not([data-p-hidden-focusable="true"])').length>0},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,n=this.getOptionValue(e);return(this.modelValue||[]).some((function(e){return u.ObjectUtils.equals(e,n,t.equalityKey)}))},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return u.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,n=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return n>-1?n+e+1:e},findPrevOptionIndex:function(e){var t=this,n=e>0?u.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return n>-1?n:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?u.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,n=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return n>-1?n+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,n=this.hasSelectedOption&&e>0?u.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return n>-1?n:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e){var t=this;this.searchValue=(this.searchValue||"")+e.key;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return t.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return t.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return t.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){t.searchValue="",t.searchTimeout=null}),500)},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,n=u.DomHandler.findSingle(this.list,'li[id="'.concat(t,'"]'));n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption){this.focusedOptionIndex=this.findFirstFocusedOptionIndex();var e=this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]);this.updateModel(null,[e])}},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,n,i){e.push({optionGroup:n,group:!0,index:i});var o=t.getOptionGroupChildren(n);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this,n=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var i=e.FilterService.filter(n,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var o=[];return(this.options||[]).forEach((function(e){var n=t.getOptionGroupChildren(e).filter((function(e){return i.includes(e)}));n.length>0&&o.push(P(P({},e),{},E({},"string"==typeof t.optionGroupChildren?t.optionGroupChildren:"items",M(n))))})),this.flatOptions(o)}return i}return n},label:function(){var e;if(this.modelValue&&this.modelValue.length){if(u.ObjectUtils.isNotEmpty(this.maxSelectedLabels)&&this.modelValue.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(var t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},chipSelectedItems:function(){return u.ObjectUtils.isNotEmpty(this.maxSelectedLabels)&&this.modelValue&&this.modelValue.length>this.maxSelectedLabels?this.modelValue.slice(0,this.maxSelectedLabels):this.modelValue},allSelected:function(){var e=this;return null!==this.selectAll?this.selectAll:u.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.visibleOptions.every((function(t){return e.isOptionGroup(t)||e.isOptionDisabled(t)||e.isSelected(t)}))},hasSelectedOption:function(){return u.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},maxSelectionLimitReached:function(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},filterResultMessageText:function(){return u.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.modelValue.length):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},toggleAllAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria[this.allSelected?"selectAll":"unselectAll"]:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:S.default},components:{VirtualScroller:V.default,Portal:k.default,TimesIcon:O.default,SearchIcon:y.default,TimesCircleIcon:x.default,ChevronDownIcon:v.default,SpinnerIcon:g.default,CheckIcon:b.default}};function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){return(t=q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e){var t=_(e,"string");return"symbol"===U(t)?t:String(t)}function _(e,t){if("object"!==U(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==U(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var W=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],Z=["onClick"],J=["checked","aria-label"],Q=["value","placeholder","aria-owns","aria-activedescendant"],X=["aria-label"],Y=["id"],ee=["id"],te=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"];return N.render=function(e,t,n,i,o,l){var s=f.resolveComponent("TimesCircleIcon"),r=f.resolveComponent("SpinnerIcon"),a=f.resolveComponent("VirtualScroller"),c=f.resolveComponent("Portal"),u=f.resolveDirective("ripple");return f.openBlock(),f.createElementBlock("div",f.mergeProps({ref:"container",class:e.cx("root"),onClick:t[15]||(t[15]=function(){return l.onContainerClick&&l.onContainerClick.apply(l,arguments)})},e.ptm("root"),{"data-pc-name":"multiselect"}),[f.createElementVNode("div",f.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[f.createElementVNode("input",f.mergeProps({ref:"focusInput",id:e.inputId,type:"text",readonly:"",disabled:e.disabled,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[1]||(t[1]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[2]||(t[2]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)})},G(G({},e.inputProps),e.ptm("hiddenInput"))),null,16,W)],16),f.createElementVNode("div",f.mergeProps({class:e.cx("labelContainer")},e.ptm("labelContainer")),[f.createElementVNode("div",f.mergeProps({class:e.cx("label")},e.ptm("label")),[f.renderSlot(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return["comma"===e.display?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createTextVNode(f.toDisplayString(l.label||"empty"),1)],64)):"chip"===e.display?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(l.chipSelectedItems,(function(t){return f.openBlock(),f.createElementBlock("div",f.mergeProps({key:l.getLabelByValue(t),class:e.cx("token")},e.ptm("token")),[f.renderSlot(e.$slots,"chip",{value:t},(function(){return[f.createElementVNode("span",f.mergeProps({class:e.cx("tokenLabel")},e.ptm("tokenLabel")),f.toDisplayString(l.getLabelByValue(t)),17)]})),e.disabled?f.createCommentVNode("",!0):f.renderSlot(e.$slots,"removetokenicon",{key:0,class:f.normalizeClass(e.cx("removeTokenIcon")),onClick:function(e){return l.removeOption(e,t)}},(function(){return[e.removeTokenIcon?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:0,class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:f.withModifiers((function(e){return l.removeOption(e,t)}),["stop"])},e.ptm("removeTokenIcon")),null,16,Z)):(f.openBlock(),f.createBlock(s,f.mergeProps({key:1,class:e.cx("removeTokenIcon"),onClick:f.withModifiers((function(e){return l.removeOption(e,t)}),["stop"])},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16)})),128)),e.modelValue&&0!==e.modelValue.length?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createTextVNode(f.toDisplayString(e.placeholder||"empty"),1)],64))],64)):f.createCommentVNode("",!0)]}))],16)],16),f.createElementVNode("div",f.mergeProps({class:e.cx("trigger")},e.ptm("trigger")),[e.loading?f.renderSlot(e.$slots,"loadingicon",{key:0,class:f.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(f.openBlock(),f.createBlock(r,f.mergeProps({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):f.renderSlot(e.$slots,"dropdownicon",{key:1,class:f.normalizeClass(e.cx("dropdownIcon"))},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),f.mergeProps({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),f.createVNode(c,{appendTo:e.appendTo},{default:f.withCtx((function(){return[f.createVNode(f.Transition,{name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},{default:f.withCtx((function(){return[o.overlayVisible?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:0,ref:l.overlayRef,style:e.panelStyle,class:[e.cx("panel"),e.panelClass],onClick:t[13]||(t[13]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)}),onKeydown:t[14]||(t[14]=function(){return l.onOverlayKeyDown&&l.onOverlayKeyDown.apply(l,arguments)})},G(G({},e.panelProps),e.ptm("panel"))),[f.createElementVNode("span",f.mergeProps({ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[3]||(t[3]=function(){return l.onFirstHiddenFocus&&l.onFirstHiddenFocus.apply(l,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),f.renderSlot(e.$slots,"header",{value:e.modelValue,options:l.visibleOptions}),e.showToggleAll&&null==e.selectionLimit||e.filter?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[e.showToggleAll&&null==e.selectionLimit?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:0,class:e.cx("headerCheckboxContainer"),onClick:t[6]||(t[6]=function(){return l.onToggleAll&&l.onToggleAll.apply(l,arguments)})},e.ptm("headerCheckboxContainer")),[f.createElementVNode("div",f.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[f.createElementVNode("input",f.mergeProps({type:"checkbox",readonly:"",checked:l.allSelected,"aria-label":l.toggleAllAriaLabel,onFocus:t[4]||(t[4]=function(){return l.onHeaderCheckboxFocus&&l.onHeaderCheckboxFocus.apply(l,arguments)}),onBlur:t[5]||(t[5]=function(){return l.onHeaderCheckboxBlur&&l.onHeaderCheckboxBlur.apply(l,arguments)})},e.ptm("headerCheckbox")),null,16,J)],16),f.createElementVNode("div",f.mergeProps({class:e.cx("headerCheckbox")},l.getHeaderCheckboxPTOptions("headerCheckbox")),[f.renderSlot(e.$slots,"headercheckboxicon",{allSelected:l.allSelected,class:f.normalizeClass(e.cx("headerCheckboxIcon"))},(function(){return[f.withDirectives((f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.checkboxIcon?"span":"CheckIcon"),f.mergeProps({class:[e.cx("headerCheckboxIcon"),z({},e.checkboxIcon,l.allSelected)]},l.getHeaderCheckboxPTOptions("headerCheckboxIcon")),null,16,["class"])),[[f.vShow,l.allSelected]])]}))],16)],16)):f.createCommentVNode("",!0),e.filter?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:1,class:e.cx("filterContainer")},e.ptm("filterContainer")),[f.createElementVNode("input",f.mergeProps({ref:"filterInput",type:"text",value:o.filterValue,onVnodeMounted:t[7]||(t[7]=function(){return l.onFilterUpdated&&l.onFilterUpdated.apply(l,arguments)}),class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":l.focusedOptionId,onKeydown:t[8]||(t[8]=function(){return l.onFilterKeyDown&&l.onFilterKeyDown.apply(l,arguments)}),onBlur:t[9]||(t[9]=function(){return l.onFilterBlur&&l.onFilterBlur.apply(l,arguments)}),onInput:t[10]||(t[10]=function(){return l.onFilterChange&&l.onFilterChange.apply(l,arguments)})},G(G({},e.filterInputProps),e.ptm("filterInput"))),null,16,Q),f.renderSlot(e.$slots,"filtericon",{class:f.normalizeClass(e.cx("filterIcon"))},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),f.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16)):f.createCommentVNode("",!0),e.filter?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:2,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.filterResultMessageText),17)):f.createCommentVNode("",!0),f.withDirectives((f.openBlock(),f.createElementBlock("button",f.mergeProps({class:e.cx("closeButton"),"aria-label":l.closeAriaLabel,onClick:t[11]||(t[11]=function(){return l.onCloseClick&&l.onCloseClick.apply(l,arguments)}),type:"button"},G(G({},e.closeButtonProps),e.ptm("closeButton"))),[f.renderSlot(e.$slots,"closeicon",{class:f.normalizeClass(e.cx("closeIcon"))},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),f.mergeProps({class:[e.cx("closeIcon"),e.closeIcon]},e.ptm("closeIcon")),null,16,["class"]))]}))],16,X)),[[u]])],16)):f.createCommentVNode("",!0),f.createElementVNode("div",f.mergeProps({class:e.cx("wrapper"),style:{"max-height":l.virtualScrollerDisabled?e.scrollHeight:""}},e.ptm("wrapper")),[f.createVNode(a,f.mergeProps({ref:l.virtualScrollerRef},e.virtualScrollerOptions,{items:l.visibleOptions,style:{height:e.scrollHeight},tabindex:-1,disabled:l.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),f.createSlots({content:f.withCtx((function(t){var n=t.styleClass,i=t.contentRef,s=t.items,r=t.getItemOptions,a=t.contentStyle,c=t.itemSize;return[f.createElementVNode("ul",f.mergeProps({ref:function(e){return l.listRef(e,i)},id:o.id+"_list",class:[e.cx("list"),n],style:a,role:"listbox","aria-multiselectable":"true"},e.ptm("list")),[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(s,(function(t,n){return f.openBlock(),f.createElementBlock(f.Fragment,{key:l.getOptionRenderKey(t,l.getOptionIndex(n,r))},[l.isOptionGroup(t)?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:0,id:o.id+"_"+l.getOptionIndex(n,r),style:{height:c?c+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[f.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,index:l.getOptionIndex(n,r)},(function(){return[f.createTextVNode(f.toDisplayString(l.getOptionGroupLabel(t.optionGroup)),1)]}))],16,ee)):f.withDirectives((f.openBlock(),f.createElementBlock("li",f.mergeProps({key:1,id:o.id+"_"+l.getOptionIndex(n,r),style:{height:c?c+"px":void 0},class:e.cx("item",{option:t,index:n,getItemOptions:r}),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":l.isSelected(t),"aria-disabled":l.isOptionDisabled(t),"aria-setsize":l.ariaSetSize,"aria-posinset":l.getAriaPosInset(l.getOptionIndex(n,r)),onClick:function(e){return l.onOptionSelect(e,t,l.getOptionIndex(n,r),!0)},onMousemove:function(e){return l.onOptionMouseMove(e,l.getOptionIndex(n,r))}},l.getCheckboxPTOptions(t,r,n,"item"),{"data-p-highlight":l.isSelected(t),"data-p-focused":o.focusedOptionIndex===l.getOptionIndex(n,r),"data-p-disabled":l.isOptionDisabled(t)}),[f.createElementVNode("div",f.mergeProps({class:e.cx("checkboxContainer")},e.ptm("checkboxContainer")),[f.createElementVNode("div",f.mergeProps({class:e.cx("checkbox",{option:t})},l.getCheckboxPTOptions(t,r,n,"checkbox")),[f.renderSlot(e.$slots,"itemcheckboxicon",{selected:l.isSelected(t),class:f.normalizeClass(e.cx("checkboxIcon"))},(function(){return[f.withDirectives((f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.checkboxIcon?"span":"CheckIcon"),f.mergeProps({class:[e.cx("checkboxIcon"),z({},e.checkboxIcon,l.isSelected(t))]},l.getCheckboxPTOptions(t,r,n,"checkboxIcon")),null,16,["class"])),[[f.vShow,l.isSelected(t)]])]}))],16)],16),f.renderSlot(e.$slots,"option",{option:t,index:l.getOptionIndex(n,r)},(function(){return[f.createElementVNode("span",f.normalizeProps(f.guardReactiveProps(e.ptm("option"))),f.toDisplayString(l.getOptionLabel(t)),17)]}))],16,te)),[[u]])],64)})),128)),o.filterValue&&(!s||s&&0===s.length)?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[f.renderSlot(e.$slots,"emptyfilter",{},(function(){return[f.createTextVNode(f.toDisplayString(l.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[f.renderSlot(e.$slots,"empty",{},(function(){return[f.createTextVNode(f.toDisplayString(l.emptyMessageText),1)]}))],16)):f.createCommentVNode("",!0)],16,Y)]})),_:2},[e.$slots.loader?{name:"loader",fn:f.withCtx((function(t){return[f.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["items","style","disabled","pt"])],16),f.renderSlot(e.$slots,"footer",{value:e.modelValue,options:l.visibleOptions}),!e.options||e.options&&0===e.options.length?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.emptyMessageText),17)):f.createCommentVNode("",!0),f.createElementVNode("span",f.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.selectedMessageText),17),f.createElementVNode("span",f.mergeProps({ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[12]||(t[12]=function(){return l.onLastHiddenFocus&&l.onLastHiddenFocus.apply(l,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16)):f.createCommentVNode("",!0)]})),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},N}(primevue.api,primevue.icons.check,primevue.icons.chevrondown,primevue.icons.search,primevue.icons.spinner,primevue.icons.times,primevue.icons.timescircle,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,primevue.basecomponent,primevue.usestyle,Vue);