import{aa as J,ad as Q,ah as X,ac as Y,ai as M,aj as R,ak as Z,am as B,al as L,az as _,ax as H,ap as D,c1 as ee,aA as x,aB as m,aC as te,a as p,o as d,e as I,E as v,a2 as g,B as r,G,f as K,w,b as E,a7 as ie,t as y,U as ne,F as C,r as se,C as oe,h as V}from"./dVzHJMF1.js";import{s as le}from"./CBbadgK0.js";import{s as re}from"./CM8mMzv6.js";import ae from"./DP0doleY.js";import de from"./BAtzogEJ.js";import ue from"./B7Hqpkvs.js";import ce from"./r1Y5hC84.js";import{s as pe}from"./KcBrPYTF.js";import"./DiwqsPB4.js";var he=({dt:t})=>`
.p-listbox {
    background: ${t("listbox.background")};
    color: ${t("listbox.color")};
    border: 1px solid ${t("listbox.border.color")};
    border-radius: ${t("listbox.border.radius")};
    transition: background ${t("listbox.transition.duration")}, color ${t("listbox.transition.duration")}, border-color ${t("listbox.transition.duration")},
            box-shadow ${t("listbox.transition.duration")}, outline-color ${t("listbox.transition.duration")};
    outline-color: transparent;
    box-shadow: ${t("listbox.shadow")};
}

.p-listbox.p-disabled {
    opacity: 1;
    background: ${t("listbox.disabled.background")};
    color: ${t("listbox.disabled.color")};
}

.p-listbox.p-disabled .p-listbox-option {
    color: ${t("listbox.disabled.color")};
}

.p-listbox.p-invalid {
    border-color: ${t("listbox.invalid.border.color")};
}

.p-listbox-header {
    padding: ${t("listbox.list.header.padding")};
}

.p-listbox-filter {
    width: 100%;
}

.p-listbox-list-container {
    overflow: auto;
}

.p-listbox-list {
    list-style-type: none;
    margin: 0;
    padding: ${t("listbox.list.padding")};
    outline: 0 none;
    display: flex;
    flex-direction: column;
    gap: ${t("listbox.list.gap")};
}

.p-listbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: ${t("listbox.option.padding")};
    border: 0 none;
    border-radius: ${t("listbox.option.border.radius")};
    color: ${t("listbox.option.color")};
    transition: background ${t("listbox.transition.duration")}, color ${t("listbox.transition.duration")}, border-color ${t("listbox.transition.duration")},
            box-shadow ${t("listbox.transition.duration")}, outline-color ${t("listbox.transition.duration")};
}

.p-listbox-striped li:nth-child(even of .p-listbox-option) {
    background: ${t("listbox.option.striped.background")};
}

.p-listbox .p-listbox-list .p-listbox-option.p-listbox-option-selected {
    background: ${t("listbox.option.selected.background")};
    color: ${t("listbox.option.selected.color")};
}

.p-listbox:not(.p-disabled) .p-listbox-option.p-listbox-option-selected.p-focus {
    background: ${t("listbox.option.selected.focus.background")};
    color: ${t("listbox.option.selected.focus.color")};
}

.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled).p-focus {
    background: ${t("listbox.option.focus.background")};
    color: ${t("listbox.option.focus.color")};
}

.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled):hover {
    background: ${t("listbox.option.focus.background")};
    color: ${t("listbox.option.focus.color")};
}

.p-listbox-option-blank-icon {
    flex-shrink: 0;
}

.p-listbox-option-check-icon {
    position: relative;
    flex-shrink: 0;
    margin-inline-start: ${t("listbox.checkmark.gutter.start")};
    margin-inline-end: ${t("listbox.checkmark.gutter.end")};
    color: ${t("listbox.checkmark.color")};
}

.p-listbox-option-group {
    margin: 0;
    padding: ${t("listbox.option.group.padding")};
    color: ${t("listbox.option.group.color")};
    background: ${t("listbox.option.group.background")};
    font-weight: ${t("listbox.option.group.font.weight")};
}

.p-listbox-empty-message {
    padding: ${t("listbox.empty.message.padding")};
}
`,fe={root:function(e){var i=e.instance,s=e.props;return["p-listbox p-component",{"p-listbox-striped":s.striped,"p-disabled":s.disabled,"p-invalid":i.$invalid}]},header:"p-listbox-header",pcFilter:"p-listbox-filter",listContainer:"p-listbox-list-container",list:"p-listbox-list",optionGroup:"p-listbox-option-group",option:function(e){var i=e.instance,s=e.props,o=e.option,n=e.index,a=e.getItemOptions;return["p-listbox-option",{"p-listbox-option-selected":i.isSelected(o)&&s.highlightOnSelect,"p-focus":i.focusedOptionIndex===i.getOptionIndex(n,a),"p-disabled":i.isOptionDisabled(o)}]},optionCheckIcon:"p-listbox-option-check-icon",optionBlankIcon:"p-listbox-option-blank-icon",emptyMessage:"p-listbox-empty-message"},be=J.extend({name:"listbox",style:he,classes:fe}),ge={name:"BaseListbox",extends:pe,props:{options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,scrollHeight:{type:String,default:"14rem"},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!1},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{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},filterIcon:{type:String,default:void 0},striped:{type:Boolean,default:!1},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:be,provide:function(){return{$pcListbox:this,$parentInstance:this}}};function $(t){return xe(t)||ye(t)||me(t)||Oe()}function Oe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function me(t,e){if(t){if(typeof t=="string")return A(t,e);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?A(t,e):void 0}}function ye(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function xe(t){if(Array.isArray(t))return A(t)}function A(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}var Ie={name:"Listbox",extends:ge,inheritAttrs:!1,emits:["change","focus","blur","filter","item-dblclick","option-dblclick"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",data:function(){return{filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{options:function(){this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel()},methods:{getOptionIndex:function(e,i){return this.virtualScrollerDisabled?e:i&&i(e).index},getOptionLabel:function(e){return this.optionLabel?x(e,this.optionLabel):typeof e=="string"?e:null},getOptionValue:function(e){return this.optionValue?x(e,this.optionValue):e},getOptionRenderKey:function(e,i){return(this.dataKey?x(e,this.dataKey):this.getOptionLabel(e))+"_"+i},getPTOptions:function(e,i,s,o){return this.ptm(o,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(s,i),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?x(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return x(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return x(e,this.optionGroupChildren)},getAriaPosInset:function(e){var i=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(s){return i.isOptionGroup(s)}).length:e)+1},onFirstHiddenFocus:function(){D(this.list);var e=H(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=ee(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){var i=e.relatedTarget;if(i===this.list){var s=H(this.$el,':not([data-p-hidden-focusable="true"])');D(s),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else D(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.findSelectedOptionIndex(),this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var i=this,s=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"NumpadEnter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&e.code==="KeyA"&&s){var o=this.visibleOptions.filter(function(n){return i.isValidOption(n)}).map(function(n){return i.getOptionValue(n)});this.updateModel(e,o),e.preventDefault();break}!s&&_(e.key)&&(this.searchOptions(e,e.key),e.preventDefault());break}},onOptionSelect:function(e,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;this.disabled||this.isOptionDisabled(i)||(this.multiple?this.onOptionSelectMultiple(e,i):this.onOptionSelectSingle(e,i),this.optionTouched=!1,s!==-1&&(this.focusedOptionIndex=s))},onOptionMouseDown:function(e,i){this.changeFocusedOptionIndex(e,i)},onOptionMouseMove:function(e,i){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e,i)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionDblClick:function(e,i){this.$emit("item-dblclick",{originalEvent:e,value:i}),this.$emit("option-dblclick",{originalEvent:e,value:i})},onOptionSelectSingle:function(e,i){var s=this.isSelected(i),o=!1,n=null,a=this.optionTouched?!1:this.metaKeySelection;if(a){var f=e&&(e.metaKey||e.ctrlKey);s?f&&(n=null,o=!0):(n=this.getOptionValue(i),o=!0)}else n=s?null:this.getOptionValue(i),o=!0;o&&this.updateModel(e,n)},onOptionSelectMultiple:function(e,i){var s=this.isSelected(i),o=null,n=this.optionTouched?!1:this.metaKeySelection;if(n){var a=e.metaKey||e.ctrlKey;s?o=a?this.removeOption(i):[this.getOptionValue(i)]:(o=a?this.d_value||[]:[],o=[].concat($(o),[this.getOptionValue(i)]))}else o=s?this.removeOption(i):[].concat($(this.d_value||[]),[this.getOptionValue(i)]);this.updateModel(e,o)},onOptionSelectRange:function(e){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(s===-1&&(s=this.findNearestSelectedOptionIndex(o,!0)),o===-1&&(o=this.findNearestSelectedOptionIndex(s)),s!==-1&&o!==-1){var n=Math.min(s,o),a=Math.max(s,o),f=this.visibleOptions.slice(n,a+1).filter(function(b){return i.isValidOption(b)}).map(function(b){return i.getOptionValue(b)});this.updateModel(e,f)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value,filterValue:this.visibleOptions}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);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":case"NumpadEnter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break}},onArrowDownKey:function(e){var i=this.focusedOptionIndex!==-1?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,i),this.changeFocusedOptionIndex(e,i),e.preventDefault()},onArrowUpKey:function(e){var i=this.focusedOptionIndex!==-1?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i),e.preventDefault()},onArrowLeftKey:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i){var s=e.currentTarget;e.shiftKey?s.setSelectionRange(0,e.target.selectionStart):(s.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else{var o=e.metaKey||e.ctrlKey,n=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&o&&this.onOptionSelectRange(e,n,this.startRangeIndex),this.changeFocusedOptionIndex(e,n)}e.preventDefault()},onEndKey:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i){var s=e.currentTarget;if(e.shiftKey)s.setSelectionRange(e.target.selectionStart,s.value.length);else{var o=s.value.length;s.setSelectionRange(o,o),this.focusedOptionIndex=-1}}else{var n=e.metaKey||e.ctrlKey,a=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,a),this.changeFocusedOptionIndex(e,a)}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.focusedOptionIndex!==-1&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]))},onSpaceKey:function(e){e.preventDefault(),this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){var i;return this.isValidOption(e)&&typeof this.getOptionLabel(e)=="string"&&((i=this.getOptionLabel(e))===null||i===void 0?void 0:i.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)))},isValidOption:function(e){return M(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isEquals:function(e,i){return B(e,i,this.equalityKey)},isSelected:function(e){var i=this,s=this.getOptionValue(e);return this.multiple?(this.d_value||[]).some(function(o){return i.isEquals(o,s)}):this.isEquals(this.d_value,s)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(i){return e.isValidOption(i)})},findLastOptionIndex:function(){var e=this;return L(this.visibleOptions,function(i){return e.isValidOption(i)})},findNextOptionIndex:function(e){var i=this,s=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(o){return i.isValidOption(o)}):-1;return s>-1?s+e+1:e},findPrevOptionIndex:function(e){var i=this,s=e>0?L(this.visibleOptions.slice(0,e),function(o){return i.isValidOption(o)}):-1;return s>-1?s:e},findSelectedOptionIndex:function(){var e=this;if(this.$filled)if(this.multiple){for(var i=function(){var a=e.d_value[o],f=e.visibleOptions.findIndex(function(b){return e.isValidSelectedOption(b)&&e.isEquals(a,e.getOptionValue(b))});if(f>-1)return{v:f}},s,o=this.d_value.length-1;o>=0;o--)if(s=i(),s)return s.v}else return this.visibleOptions.findIndex(function(n){return e.isValidSelectedOption(n)});return-1},findFirstSelectedOptionIndex:function(){var e=this;return this.$filled?this.visibleOptions.findIndex(function(i){return e.isValidSelectedOption(i)}):-1},findLastSelectedOptionIndex:function(){var e=this;return this.$filled?L(this.visibleOptions,function(i){return e.isValidSelectedOption(i)}):-1},findNextSelectedOptionIndex:function(e){var i=this,s=this.$filled&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(o){return i.isValidSelectedOption(o)}):-1;return s>-1?s+e+1:-1},findPrevSelectedOptionIndex:function(e){var i=this,s=this.$filled&&e>0?L(this.visibleOptions.slice(0,e),function(o){return i.isValidSelectedOption(o)}):-1;return s>-1?s:-1},findNearestSelectedOptionIndex:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=-1;return this.$filled&&(i?(s=this.findPrevSelectedOptionIndex(e),s=s===-1?this.findNextSelectedOptionIndex(e):s):(s=this.findNextSelectedOptionIndex(e),s=s===-1?this.findPrevSelectedOptionIndex(e):s)),s>-1?s: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,i){var s=this;this.searchValue=(this.searchValue||"")+i;var o=-1;M(this.searchValue)&&(this.focusedOptionIndex!==-1?(o=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function(n){return s.isOptionMatched(n)}),o=o===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(function(n){return s.isOptionMatched(n)}):o+this.focusedOptionIndex):o=this.visibleOptions.findIndex(function(n){return s.isOptionMatched(n)}),o===-1&&this.focusedOptionIndex===-1&&(o=this.findFirstFocusedOptionIndex()),o!==-1&&this.changeFocusedOptionIndex(e,o)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){s.searchValue="",s.searchTimeout=null},500)},removeOption:function(e){var i=this;return this.d_value.filter(function(s){return!B(s,i.getOptionValue(e),i.equalityKey)})},changeFocusedOptionIndex:function(e,i){this.focusedOptionIndex!==i&&(this.focusedOptionIndex=i,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[i]))},scrollInView:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var s=i!==-1?"".concat(e.$id,"_").concat(i):e.focusedOptionId,o=Z(e.list,'li[id="'.concat(s,'"]'));o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(i!==-1?i:e.focusedOptionIndex)})},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.$filled&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,i){this.writeValue(i,e),this.$emit("change",{originalEvent:e,value:i})},listRef:function(e,i){this.list=e,i&&i(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{optionsListFlat:function(){return this.filterValue?R.filter(this.options,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):this.options},optionsListGroup:function(){var e=this,i=[];return(this.options||[]).forEach(function(s){var o=e.getOptionGroupChildren(s)||[],n=e.filterValue?R.filter(o,e.searchFields,e.filterValue,e.filterMatchMode,e.filterLocale):o;n!=null&&n.length&&i.push.apply(i,[{optionGroup:s,group:!0}].concat($(n)))}),i},visibleOptions:function(){return this.optionGroupLabel?this.optionsListGroup:this.optionsListFlat},hasSelectedOption:function(){return M(this.d_value)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return M(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.$filled?this.selectionMessageText.replaceAll("{0}",this.multiple?this.d_value.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return this.focusedOptionIndex!==-1?"".concat(this.$id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(i){return!e.isOptionGroup(i)}).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions},containerDataP:function(){return Y({invalid:this.$invalid,disabled:this.disabled})}},directives:{ripple:X},components:{InputText:ue,VirtualScroller:ce,InputIcon:de,IconField:ae,SearchIcon:re,CheckIcon:Q,BlankIcon:le}},ve=["id","data-p"],Se=["tabindex"],Fe=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],ke=["id"],Me=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","onDblclick","data-p-selected","data-p-focused","data-p-disabled"],Le=["tabindex"];function Ke(t,e,i,s,o,n){var a=m("InputText"),f=m("SearchIcon"),b=m("InputIcon"),P=m("IconField"),N=m("CheckIcon"),U=m("BlankIcon"),q=m("VirtualScroller"),z=te("ripple");return d(),p("div",r({id:t.$id,class:t.cx("root"),onFocusout:e[7]||(e[7]=function(){return n.onFocusout&&n.onFocusout.apply(n,arguments)}),"data-p":n.containerDataP},t.ptmi("root")),[I("span",r({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:t.disabled?-1:t.tabindex,onFocus:e[0]||(e[0]=function(){return n.onFirstHiddenFocus&&n.onFirstHiddenFocus.apply(n,arguments)})},t.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,Se),t.$slots.header?(d(),p("div",{key:0,class:G(t.cx("header"))},[g(t.$slots,"header",{value:t.d_value,options:n.visibleOptions})],2)):v("",!0),t.filter?(d(),p("div",r({key:1,class:t.cx("header")},t.ptm("header")),[K(P,{unstyled:t.unstyled,pt:t.ptm("pcFilterContainer")},{default:w(function(){return[K(a,{modelValue:o.filterValue,"onUpdate:modelValue":e[1]||(e[1]=function(h){return o.filterValue=h}),type:"text",class:G(t.cx("pcFilter")),placeholder:t.filterPlaceholder,role:"searchbox",autocomplete:"off",disabled:t.disabled,unstyled:t.unstyled,"aria-owns":t.$id+"_list","aria-activedescendant":n.focusedOptionId,tabindex:!t.disabled&&!o.focused?t.tabindex:-1,onInput:n.onFilterChange,onBlur:n.onFilterBlur,onKeydown:n.onFilterKeyDown,pt:t.ptm("pcFilter")},null,8,["modelValue","class","placeholder","disabled","unstyled","aria-owns","aria-activedescendant","tabindex","onInput","onBlur","onKeydown","pt"]),K(b,{unstyled:t.unstyled,pt:t.ptm("pcFilterIconContainer")},{default:w(function(){return[g(t.$slots,"filtericon",{},function(){return[t.filterIcon?(d(),p("span",r({key:0,class:t.filterIcon},t.ptm("filterIcon")),null,16)):(d(),E(f,ie(r({key:1},t.ptm("filterIcon"))),null,16))]})]}),_:3},8,["unstyled","pt"])]}),_:3},8,["unstyled","pt"]),I("span",r({role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),y(n.filterResultMessageText),17)],16)):v("",!0),I("div",r({class:t.cx("listContainer"),style:[{"max-height":n.virtualScrollerDisabled?t.scrollHeight:""},t.listStyle]},t.ptm("listContainer")),[K(q,r({ref:n.virtualScrollerRef},t.virtualScrollerOptions,{items:n.visibleOptions,style:[{height:t.scrollHeight},t.listStyle],tabindex:-1,disabled:n.virtualScrollerDisabled,pt:t.ptm("virtualScroller")}),ne({content:w(function(h){var T=h.styleClass,j=h.contentRef,S=h.items,c=h.getItemOptions,W=h.contentStyle,F=h.itemSize;return[I("ul",r({ref:function(u){return n.listRef(u,j)},id:t.$id+"_list",class:[t.cx("list"),T],style:W,tabindex:-1,role:"listbox","aria-multiselectable":t.multiple,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-activedescendant":o.focused?n.focusedOptionId:void 0,"aria-disabled":t.disabled,onFocus:e[3]||(e[3]=function(){return n.onListFocus&&n.onListFocus.apply(n,arguments)}),onBlur:e[4]||(e[4]=function(){return n.onListBlur&&n.onListBlur.apply(n,arguments)}),onKeydown:e[5]||(e[5]=function(){return n.onListKeyDown&&n.onListKeyDown.apply(n,arguments)})},t.ptm("list")),[(d(!0),p(C,null,se(S,function(l,u){return d(),p(C,{key:n.getOptionRenderKey(l,n.getOptionIndex(u,c))},[n.isOptionGroup(l)?(d(),p("li",r({key:0,id:t.$id+"_"+n.getOptionIndex(u,c),style:{height:F?F+"px":void 0},class:t.cx("optionGroup"),role:"option",ref_for:!0},t.ptm("optionGroup")),[g(t.$slots,"optiongroup",{option:l.optionGroup,index:n.getOptionIndex(u,c)},function(){return[V(y(n.getOptionGroupLabel(l.optionGroup)),1)]})],16,ke)):oe((d(),p("li",r({key:1,id:t.$id+"_"+n.getOptionIndex(u,c),style:{height:F?F+"px":void 0},class:t.cx("option",{option:l,index:u,getItemOptions:c}),role:"option","aria-label":n.getOptionLabel(l),"aria-selected":n.isSelected(l),"aria-disabled":n.isOptionDisabled(l),"aria-setsize":n.ariaSetSize,"aria-posinset":n.getAriaPosInset(n.getOptionIndex(u,c)),onClick:function(O){return n.onOptionSelect(O,l,n.getOptionIndex(u,c))},onMousedown:function(O){return n.onOptionMouseDown(O,n.getOptionIndex(u,c))},onMousemove:function(O){return n.onOptionMouseMove(O,n.getOptionIndex(u,c))},onTouchend:e[2]||(e[2]=function(k){return n.onOptionTouchEnd()}),onDblclick:function(O){return n.onOptionDblClick(O,l)},ref_for:!0},n.getPTOptions(l,c,u,"option"),{"data-p-selected":!t.checkmark&&n.isSelected(l),"data-p-focused":o.focusedOptionIndex===n.getOptionIndex(u,c),"data-p-disabled":n.isOptionDisabled(l)}),[t.checkmark?(d(),p(C,{key:0},[n.isSelected(l)?(d(),E(N,r({key:0,class:t.cx("optionCheckIcon"),ref_for:!0},t.ptm("optionCheckIcon")),null,16,["class"])):(d(),E(U,r({key:1,class:t.cx("optionBlankIcon"),ref_for:!0},t.ptm("optionBlankIcon")),null,16,["class"]))],64)):v("",!0),g(t.$slots,"option",{option:l,selected:n.isSelected(l),index:n.getOptionIndex(u,c)},function(){return[V(y(n.getOptionLabel(l)),1)]})],16,Me)),[[z]])],64)}),128)),o.filterValue&&(!S||S&&S.length===0)?(d(),p("li",r({key:0,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage")),[g(t.$slots,"emptyfilter",{},function(){return[V(y(n.emptyFilterMessageText),1)]})],16)):!t.options||t.options&&t.options.length===0?(d(),p("li",r({key:1,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage")),[g(t.$slots,"empty",{},function(){return[V(y(n.emptyMessageText),1)]})],16)):v("",!0)],16,Fe)]}),_:2},[t.$slots.loader?{name:"loader",fn:w(function(h){var T=h.options;return[g(t.$slots,"loader",{options:T})]}),key:"0"}:void 0]),1040,["items","style","disabled","pt"])],16),g(t.$slots,"footer",{value:t.d_value,options:n.visibleOptions}),!t.options||t.options&&t.options.length===0?(d(),p("span",r({key:2,role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),y(n.emptyMessageText),17)):v("",!0),I("span",r({role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),y(n.selectedMessageText),17),I("span",r({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:t.disabled?-1:t.tabindex,onFocus:e[6]||(e[6]=function(){return n.onLastHiddenFocus&&n.onLastHiddenFocus.apply(n,arguments)})},t.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,Le)],16,ve)}Ie.render=Ke;export{Ie as default};
