import{a as ae}from"./chunk-JDPXEXOT.js";import{$ as oe,Ea as Le,G as Ve,Ga as Fe,Ha as ze,I as z,Ia as De,J as F,K as me,M as _e,Na as Ke,P as ke,Va as Re,W as Ee,Xa as Qe,Z as ie,_ as H,ea as ne,fa as $e,ia as Me,s as te,t as E,wa as le,za as Ae}from"./chunk-PXYMNTRT.js";import{$ as ge,Ab as S,Bb as b,Db as x,Eb as l,Ec as J,Fb as xe,Fc as Oe,Gb as be,Gc as X,Hc as Se,Ib as C,Ic as Y,Ja as ye,Jb as V,Kb as g,L as he,Lb as f,M as U,Mc as ee,N as pe,Na as s,Oa as se,Ob as q,Pb as A,Qb as B,Rb as ue,S as D,Ua as R,Ub as Ce,Vb as ve,Wb as we,Xb as W,Yb as Ie,Za as G,Zb as k,_a as ce,_b as P,aa as c,ba as u,bb as N,db as j,ea as K,eb as d,ka as v,kc as $,la as fe,lb as y,mb as r,nb as Z,oc as h,pb as Q,pc as L,qb as O,qc as de,sc as Te,vb as m,wb as _,xb as M,yb as I,zb as T}from"./chunk-F6M2T5MC.js";var Ze=["removeicon"],We=["*"];function Je(t,a){if(t&1){let e=b();m(0,"img",4),x("error",function(o){c(e);let n=l();return u(n.imageError(o))}),_()}if(t&2){let e=l();r("src",e.image,ye)("alt",e.alt)}}function Xe(t,a){if(t&1&&M(0,"span",6),t&2){let e=l(2);O(e.icon),r("ngClass","p-chip-icon"),y("data-pc-section","icon")}}function Ye(t,a){if(t&1&&d(0,Xe,1,4,"span",5),t&2){let e=l();r("ngIf",e.icon)}}function et(t,a){if(t&1&&(m(0,"div",7),A(1),_()),t&2){let e=l();y("data-pc-section","label"),s(),B(e.label)}}function tt(t,a){if(t&1){let e=b();m(0,"span",11),x("click",function(o){c(e);let n=l(3);return u(n.close(o))})("keydown",function(o){c(e);let n=l(3);return u(n.onKeydown(o))}),_()}if(t&2){let e=l(3);O(e.removeIcon),r("ngClass","p-chip-remove-icon"),y("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function it(t,a){if(t&1){let e=b();m(0,"TimesCircleIcon",12),x("click",function(o){c(e);let n=l(3);return u(n.close(o))})("keydown",function(o){c(e);let n=l(3);return u(n.onKeydown(o))}),_()}if(t&2){let e=l(3);O("p-chip-remove-icon"),y("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function ot(t,a){if(t&1&&(I(0),d(1,tt,1,5,"span",9)(2,it,1,4,"TimesCircleIcon",10),T()),t&2){let e=l(2);s(),r("ngIf",e.removeIcon),s(),r("ngIf",!e.removeIcon)}}function nt(t,a){}function lt(t,a){t&1&&d(0,nt,0,0,"ng-template")}function at(t,a){if(t&1){let e=b();m(0,"span",13),x("click",function(o){c(e);let n=l(2);return u(n.close(o))})("keydown",function(o){c(e);let n=l(2);return u(n.onKeydown(o))}),d(1,lt,1,0,null,14),_()}if(t&2){let e=l(2);y("data-pc-section","removeicon")("aria-label",e.removeAriaLabel),s(),r("ngTemplateOutlet",e.removeIconTemplate||e._removeIconTemplate)}}function rt(t,a){if(t&1&&(I(0),d(1,ot,3,2,"ng-container",3)(2,at,2,3,"span",8),T()),t&2){let e=l();s(),r("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),s(),r("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}var pt=({dt:t})=>`
.p-chip {
    display: inline-flex;
    align-items: center;
    background: ${t("chip.background")};
    color: ${t("chip.color")};
    border-radius: ${t("chip.border.radius")};
    padding: ${t("chip.padding.y")} ${t("chip.padding.x")};
    gap: ${t("chip.gap")};
}

.p-chip-icon {
    color: ${t("chip.icon.color")};
    font-size: ${t("chip.icon.font.size")};
    width: ${t("chip.icon.size")};
    height: ${t("chip.icon.size")};
}

.p-chip-image {
    border-radius: 50%;
    width: ${t("chip.image.width")};
    height: ${t("chip.image.height")};
    margin-left: calc(-1 * ${t("chip.padding.y")});
}

.p-chip:has(.p-chip-remove-icon) {
    padding-inline-end: ${t("chip.padding.y")};
}

.p-chip:has(.p-chip-image) {
    padding-top: calc(${t("chip.padding.y")} / 2);
    padding-bottom: calc(${t("chip.padding.y")} / 2);
}

.p-chip-remove-icon {
    cursor: pointer;
    font-size: ${t("chip.remove.icon.font.size")};
    width: ${t("chip.remove.icon.size")};
    height: ${t("chip.remove.icon.size")};
    color: ${t("chip.remove.icon.color")};
    border-radius: 50%;
    transition: outline-color ${t("chip.transition.duration")}, box-shadow ${t("chip.transition.duration")};
    outline-color: transparent;
}

.p-chip-remove-icon:focus-visible {
    box-shadow: ${t("chip.remove.icon.focus.ring.shadow")};
    outline: ${t("chip.remove.icon.focus.ring.width")} ${t("chip.remove.icon.focus.ring.style")} ${t("chip.remove.icon.focus.ring.color")};
    outline-offset: ${t("chip.remove.icon.focus.ring.offset")};
}
`,st={root:"p-chip p-component",image:"p-chip-image",icon:"p-chip-icon",label:"p-chip-label",removeIcon:"p-chip-remove-icon"},qe=(()=>{class t extends ne{name="chip";theme=pt;classes=st;static \u0275fac=(()=>{let e;return function(o){return(e||(e=K(t)))(o||t)}})();static \u0275prov=U({token:t,factory:t.\u0275fac})}return t})();var Be=(()=>{class t extends le{label;icon;image;alt;style;styleClass;removable=!1;removeIcon;onRemove=new v;onImageError=new v;visible=!0;get removeAriaLabel(){return this.config.getTranslation(oe.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(e){this._chipProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([i,o])=>this[`_${i}`]!==o&&(this[`_${i}`]=o))}_chipProps;_componentStyle=D(qe);removeIconTemplate;templates;_removeIconTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"removeicon":this._removeIconTemplate=e.template;break;default:this._removeIconTemplate=e.template;break}})}ngOnChanges(e){if(super.ngOnChanges(e),e.chipProps&&e.chipProps.currentValue){let{currentValue:i}=e.chipProps;i.label!==void 0&&(this.label=i.label),i.icon!==void 0&&(this.icon=i.icon),i.image!==void 0&&(this.image=i.image),i.alt!==void 0&&(this.alt=i.alt),i.style!==void 0&&(this.style=i.style),i.styleClass!==void 0&&(this.styleClass=i.styleClass),i.removable!==void 0&&(this.removable=i.removable),i.removeIcon!==void 0&&(this.removeIcon=i.removeIcon)}}containerClass(){let e="p-chip p-component";return this.styleClass&&(e+=` ${this.styleClass}`),e}close(e){this.visible=!1,this.onRemove.emit(e)}onKeydown(e){(e.key==="Enter"||e.key==="Backspace")&&this.close(e)}imageError(e){this.onImageError.emit(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=K(t)))(o||t)}})();static \u0275cmp=G({type:t,selectors:[["p-chip"]],contentQueries:function(i,o,n){if(i&1&&(C(n,Ze,4),C(n,ie,4)),i&2){let p;g(p=f())&&(o.removeIconTemplate=p.first),g(p=f())&&(o.templates=p)}},hostVars:9,hostBindings:function(i,o){i&2&&(y("data-pc-name","chip")("aria-label",o.label)("data-pc-section","root"),Q(o.style),O(o.containerClass()),Z("display",!o.visible&&"none"))},inputs:{label:"label",icon:"icon",image:"image",alt:"alt",style:"style",styleClass:"styleClass",removable:[2,"removable","removable",h],removeIcon:"removeIcon",chipProps:"chipProps"},outputs:{onRemove:"onRemove",onImageError:"onImageError"},features:[W([qe]),j,N,ge],ngContentSelectors:We,decls:6,vars:4,consts:[["iconTemplate",""],["class","p-chip-image",3,"src","alt","error",4,"ngIf","ngIfElse"],["class","p-chip-label",4,"ngIf"],[4,"ngIf"],[1,"p-chip-image",3,"error","src","alt"],[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],[1,"p-chip-label"],["tabindex","0","class","p-chip-remove-icon","role","button",3,"click","keydown",4,"ngIf"],["tabindex","0","role","button",3,"class","ngClass","click","keydown",4,"ngIf"],["tabindex","0","role","button",3,"class","click","keydown",4,"ngIf"],["tabindex","0","role","button",3,"click","keydown","ngClass"],["tabindex","0","role","button",3,"click","keydown"],["tabindex","0","role","button",1,"p-chip-remove-icon",3,"click","keydown"],[4,"ngTemplateOutlet"]],template:function(i,o){if(i&1&&(xe(),be(0),d(1,Je,1,2,"img",1)(2,Ye,1,1,"ng-template",null,0,$)(4,et,2,2,"div",2)(5,rt,3,2,"ng-container",3)),i&2){let n=q(3);s(),r("ngIf",o.image)("ngIfElse",n),s(3),r("ngIf",o.label),s(),r("ngIf",o.removable)}},dependencies:[ee,J,X,Y,ae,H],encapsulation:2,changeDetection:0})}return t})();var ct=["item"],ut=["empty"],dt=["header"],mt=["footer"],_t=["selecteditem"],ht=["group"],gt=["loader"],ft=["removeicon"],yt=["loadingicon"],xt=["clearicon"],bt=["dropdownicon"],Ct=["container"],vt=["focusInput"],wt=["multiIn"],It=["multiContainer"],Tt=["ddBtn"],Ot=["items"],St=["scroller"],Vt=["overlay"],kt=t=>({"p-autocomplete-chip-item":!0,"p-focus":t}),He=t=>({$implicit:t}),Et=(t,a)=>({class:"p-autocomplete-chip-icon",removeCallback:t,index:a}),re=t=>({height:t}),Ue=(t,a)=>({$implicit:t,options:a}),$t=t=>({options:t}),Mt=()=>({}),At=(t,a)=>({$implicit:t,index:a});function Lt(t,a){if(t&1){let e=b();m(0,"input",19,3),x("input",function(o){c(e);let n=l();return u(n.onInput(o))})("keydown",function(o){c(e);let n=l();return u(n.onKeyDown(o))})("change",function(o){c(e);let n=l();return u(n.onInputChange(o))})("focus",function(o){c(e);let n=l();return u(n.onInputFocus(o))})("blur",function(o){c(e);let n=l();return u(n.onInputBlur(o))})("paste",function(o){c(e);let n=l();return u(n.onInputPaste(o))})("keyup",function(o){c(e);let n=l();return u(n.onInputKeyUp(o))}),_()}if(t&2){let e,i=l();O(i.inputStyleClass),r("pAutoFocus",i.autofocus)("ngClass","p-autocomplete-input")("ngStyle",i.inputStyle)("type",i.type)("variant",i.variant)("autocomplete",i.autocomplete)("required",i.required)("name",i.name)("pSize",i.size)("tabindex",i.disabled?-1:i.tabindex)("readonly",i.readonly)("disabled",i.disabled)("fluid",i.hasFluid),y("value",i.inputValue())("id",i.inputId)("placeholder",i.placeholder)("maxlength",i.maxlength)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledBy)("aria-required",i.required)("aria-expanded",(e=i.overlayVisible)!==null&&e!==void 0?e:!1)("aria-controls",i.overlayVisible?i.id+"_list":null)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)}}function Ft(t,a){if(t&1){let e=b();m(0,"TimesIcon",22),x("click",function(){c(e);let o=l(2);return u(o.clear())}),_()}t&2&&(r("styleClass","p-autocomplete-clear-icon"),y("aria-hidden",!0))}function zt(t,a){}function Dt(t,a){t&1&&d(0,zt,0,0,"ng-template")}function Kt(t,a){if(t&1){let e=b();m(0,"span",23),x("click",function(){c(e);let o=l(2);return u(o.clear())}),d(1,Dt,1,0,null,24),_()}if(t&2){let e=l(2);y("aria-hidden",!0),s(),r("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function Rt(t,a){if(t&1&&(I(0),d(1,Ft,1,2,"TimesIcon",20)(2,Kt,2,2,"span",21),T()),t&2){let e=l();s(),r("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),s(),r("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function Qt(t,a){t&1&&S(0)}function qt(t,a){if(t&1){let e=b();m(0,"span",33),x("click",function(o){c(e);let n=l(3).index,p=l(2);return u(p.readonly?"":p.removeOption(o,n))}),M(1,"TimesCircleIcon",34),_()}t&2&&(s(),r("styleClass","p-autocomplete-chip-icon"),y("aria-hidden",!0))}function Bt(t,a){t&1&&(I(0),d(1,qt,2,2,"ng-template",null,6,$),T())}function Pt(t,a){if(t&1){let e=b();m(0,"p-chip",32),x("onRemove",function(o){c(e);let n=l().index,p=l(2);return u(p.readonly?"":p.removeOption(o,n))}),d(1,Bt,3,0,"ng-container",15),_()}if(t&2){let e=l().$implicit,i=l(2);r("label",i.getOptionLabel(e))("removable",!0),s(),r("ngIf",!i.removeIconTemplate&&!i._removeIconTemplate)}}function Ht(t,a){}function Ut(t,a){t&1&&d(0,Ht,0,0,"ng-template")}function Gt(t,a){if(t&1&&(m(0,"span"),d(1,Ut,1,0,null,30),_()),t&2){let e=l().index,i=l(2);s(),r("ngTemplateOutlet",i.removeIconTemplate||i._removeIconTemplate)("ngTemplateOutletContext",P(2,Et,i.removeOption.bind(i),e))}}function Nt(t,a){if(t&1&&(m(0,"li",29,5),d(2,Qt,1,0,"ng-container",30)(3,Pt,2,3,"p-chip",31)(4,Gt,2,5,"span",15),_()),t&2){let e=a.$implicit,i=a.index,o=l(2);r("ngClass",k(10,kt,o.focusedMultipleOptionIndex()===i)),y("id",o.id+"_multiple_option_"+i)("aria-label",o.getOptionLabel(e))("aria-setsize",o.modelValue().length)("aria-posinset",i+1)("aria-selected",!0),s(2),r("ngTemplateOutlet",o.selectedItemTemplate||o._selectedItemTemplate)("ngTemplateOutletContext",k(12,He,e)),s(),r("ngIf",!o.selectedItemTemplate&&!o._selectedItemTemplate),s(),r("ngIf",o.removeIconTemplate||o._removeIconTemplate)}}function jt(t,a){if(t&1){let e=b();m(0,"ul",25,4),x("focus",function(o){c(e);let n=l();return u(n.onMultipleContainerFocus(o))})("blur",function(o){c(e);let n=l();return u(n.onMultipleContainerBlur(o))})("keydown",function(o){c(e);let n=l();return u(n.onMultipleContainerKeyDown(o))}),d(2,Nt,5,14,"li",26),m(3,"li",27)(4,"input",28,3),x("input",function(o){c(e);let n=l();return u(n.onInput(o))})("keydown",function(o){c(e);let n=l();return u(n.onKeyDown(o))})("change",function(o){c(e);let n=l();return u(n.onInputChange(o))})("focus",function(o){c(e);let n=l();return u(n.onInputFocus(o))})("blur",function(o){c(e);let n=l();return u(n.onInputBlur(o))})("paste",function(o){c(e);let n=l();return u(n.onInputPaste(o))})("keyup",function(o){c(e);let n=l();return u(n.onInputKeyUp(o))}),_()()()}if(t&2){let e,i=l();r("ngClass",i.inputMultipleClass)("tabindex",-1),y("aria-orientation","horizontal")("aria-activedescendant",i.focused?i.focusedMultipleOptionId:void 0),s(2),r("ngForOf",i.modelValue()),s(2),O(i.inputStyleClass),r("pAutoFocus",i.autofocus)("ngClass",i.inputClass)("ngStyle",i.inputStyle)("autocomplete",i.autocomplete)("required",i.required)("tabindex",i.disabled?-1:i.tabindex)("readonly",i.readonly)("disabled",i.disabled),y("type",i.type)("id",i.inputId)("name",i.name)("placeholder",i.filled?null:i.placeholder)("maxlength",i.maxlength)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledBy)("aria-required",i.required)("aria-expanded",(e=i.overlayVisible)!==null&&e!==void 0?e:!1)("aria-controls",i.overlayVisible?i.id+"_list":null)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)}}function Zt(t,a){t&1&&M(0,"SpinnerIcon",37),t&2&&(r("styleClass","p-autocomplete-loader")("spin",!0),y("aria-hidden",!0))}function Wt(t,a){}function Jt(t,a){t&1&&d(0,Wt,0,0,"ng-template")}function Xt(t,a){if(t&1&&(m(0,"span",38),d(1,Jt,1,0,null,24),_()),t&2){let e=l(2);y("aria-hidden",!0),s(),r("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Yt(t,a){if(t&1&&(I(0),d(1,Zt,1,3,"SpinnerIcon",35)(2,Xt,2,2,"span",36),T()),t&2){let e=l();s(),r("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),s(),r("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function ei(t,a){if(t&1&&M(0,"span",41),t&2){let e=l(2);r("ngClass",e.dropdownIcon),y("aria-hidden",!0)}}function ti(t,a){t&1&&M(0,"ChevronDownIcon")}function ii(t,a){}function oi(t,a){t&1&&d(0,ii,0,0,"ng-template")}function ni(t,a){if(t&1&&(I(0),d(1,ti,1,0,"ChevronDownIcon",15)(2,oi,1,0,null,24),T()),t&2){let e=l(2);s(),r("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),s(),r("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function li(t,a){if(t&1){let e=b();m(0,"button",39,7),x("click",function(o){c(e);let n=l();return u(n.handleDropdownClick(o))}),d(2,ei,1,2,"span",40)(3,ni,3,2,"ng-container",15),_()}if(t&2){let e=l();r("disabled",e.disabled),y("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex),s(2),r("ngIf",e.dropdownIcon),s(),r("ngIf",!e.dropdownIcon)}}function ai(t,a){t&1&&S(0)}function ri(t,a){t&1&&S(0)}function pi(t,a){if(t&1&&d(0,ri,1,0,"ng-container",30),t&2){let e=a.$implicit,i=a.options;l(2);let o=q(6);r("ngTemplateOutlet",o)("ngTemplateOutletContext",P(2,Ue,e,i))}}function si(t,a){t&1&&S(0)}function ci(t,a){if(t&1&&d(0,si,1,0,"ng-container",30),t&2){let e=a.options,i=l(4);r("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",k(2,$t,e))}}function ui(t,a){t&1&&(I(0),d(1,ci,1,4,"ng-template",null,10,$),T())}function di(t,a){if(t&1){let e=b();m(0,"p-scroller",46,9),x("onLazyLoad",function(o){c(e);let n=l(2);return u(n.onLazyLoad.emit(o))}),d(2,pi,1,5,"ng-template",null,2,$)(4,ui,3,0,"ng-container",15),_()}if(t&2){let e=l(2);Q(k(8,re,e.scrollHeight)),r("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),s(4),r("ngIf",e.loaderTemplate||e._loaderTemplate)}}function mi(t,a){t&1&&S(0)}function _i(t,a){if(t&1&&(I(0),d(1,mi,1,0,"ng-container",30),T()),t&2){l();let e=q(6),i=l();s(),r("ngTemplateOutlet",e)("ngTemplateOutletContext",P(3,Ue,i.visibleOptions(),Ie(2,Mt)))}}function hi(t,a){if(t&1&&(m(0,"span"),A(1),_()),t&2){let e=l(2).$implicit,i=l(3);s(),B(i.getOptionGroupLabel(e.optionGroup))}}function gi(t,a){t&1&&S(0)}function fi(t,a){if(t&1&&(I(0),m(1,"li",50),d(2,hi,2,1,"span",15)(3,gi,1,0,"ng-container",30),_(),T()),t&2){let e=l(),i=e.$implicit,o=e.index,n=l().options,p=l(2);s(),r("ngStyle",k(5,re,n.itemSize+"px")),y("id",p.id+"_"+p.getOptionIndex(o,n)),s(),r("ngIf",!p.groupTemplate),s(),r("ngTemplateOutlet",p.groupTemplate)("ngTemplateOutletContext",k(7,He,i.optionGroup))}}function yi(t,a){if(t&1&&(m(0,"span"),A(1),_()),t&2){let e=l(2).$implicit,i=l(3);s(),B(i.getOptionLabel(e))}}function xi(t,a){t&1&&S(0)}function bi(t,a){if(t&1){let e=b();I(0),m(1,"li",51),x("click",function(o){c(e);let n=l().$implicit,p=l(3);return u(p.onOptionSelect(o,n))})("mouseenter",function(o){c(e);let n=l().index,p=l().options,w=l(2);return u(w.onOptionMouseEnter(o,w.getOptionIndex(n,p)))}),d(2,yi,2,1,"span",15)(3,xi,1,0,"ng-container",30),_(),T()}if(t&2){let e=l(),i=e.$implicit,o=e.index,n=l().options,p=l(2);s(),r("ngStyle",k(12,re,n.itemSize+"px"))("ngClass",p.optionClass(i,o,n)),y("id",p.id+"_"+p.getOptionIndex(o,n))("aria-label",p.getOptionLabel(i))("aria-selected",p.isSelected(i))("aria-disabled",p.isOptionDisabled(i))("data-p-focused",p.focusedOptionIndex()===p.getOptionIndex(o,n))("aria-setsize",p.ariaSetSize)("aria-posinset",p.getAriaPosInset(p.getOptionIndex(o,n))),s(),r("ngIf",!p.itemTemplate&&!p._itemTemplate),s(),r("ngTemplateOutlet",p.itemTemplate||p._itemTemplate)("ngTemplateOutletContext",P(14,At,i,n.getOptions?n.getOptions(o):o))}}function Ci(t,a){if(t&1&&d(0,fi,4,9,"ng-container",15)(1,bi,4,17,"ng-container",15),t&2){let e=a.$implicit,i=l(3);r("ngIf",i.isOptionGroup(e)),s(),r("ngIf",!i.isOptionGroup(e))}}function vi(t,a){if(t&1&&(I(0),A(1),T()),t&2){let e=l(4);s(),ue(" ",e.searchResultMessageText," ")}}function wi(t,a){t&1&&S(0,null,12)}function Ii(t,a){if(t&1&&(m(0,"li",52),d(1,vi,2,1,"ng-container",53)(2,wi,2,0,"ng-container",24),_()),t&2){let e=l().options,i=l(2);r("ngStyle",k(4,re,e.itemSize+"px")),s(),r("ngIf",!i.emptyTemplate&&!i._emptyTemplate)("ngIfElse",i.empty),s(),r("ngTemplateOutlet",i.emptyTemplate||i._emptyTemplate)}}function Ti(t,a){if(t&1&&(m(0,"ul",47,11),d(2,Ci,2,2,"ng-template",48)(3,Ii,3,6,"li",49),_()),t&2){let e=a.$implicit,i=a.options,o=l(2);Q(i.contentStyle),r("ngClass",i.contentStyleClass),y("id",o.id+"_list")("aria-label",o.listLabel),s(2),r("ngForOf",e),s(),r("ngIf",!e||e&&e.length===0&&o.showEmptyMessage)}}function Oi(t,a){t&1&&S(0)}function Si(t,a){if(t&1&&(m(0,"div",42),d(1,ai,1,0,"ng-container",24),m(2,"div",43),d(3,di,5,10,"p-scroller",44)(4,_i,2,6,"ng-container",15),_(),d(5,Ti,4,7,"ng-template",null,8,$)(7,Oi,1,0,"ng-container",24),_(),m(8,"span",45),A(9),_()),t&2){let e=l();O(e.panelStyleClass),r("ngClass",e.panelClass)("ngStyle",e.panelStyle),s(),r("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),s(),Z("max-height",e.virtualScroll?"auto":e.scrollHeight),s(),r("ngIf",e.virtualScroll),s(),r("ngIf",!e.virtualScroll),s(3),r("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),s(2),ue(" ",e.selectedMessageText," ")}}var Vi=({dt:t})=>`
.p-autocomplete {
    display: inline-flex;
}

.p-autocomplete-loader {
    position: absolute;
    top: 50%;
    margin-top: -0.5rem;
    inset-inline-end: ${t("autocomplete.padding.x")};
}

.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {
    inset-inline-end: calc(${t("autocomplete.dropdown.width")} + ${t("autocomplete.padding.x")});
}

.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {
    flex: 1 1 auto;
    width: 1%;
}

.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,
.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

.p-autocomplete-dropdown {
    cursor: pointer;
    display: inline-flex;
    user-select: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: ${t("autocomplete.dropdown.width")};
    border-start-end-radius: ${t("autocomplete.dropdown.border.radius")};
    border-end-end-radius: ${t("autocomplete.dropdown.border.radius")};
    background: ${t("autocomplete.dropdown.background")};
    border: 1px solid ${t("autocomplete.dropdown.border.color")};
    border-inline-start: 0 none;
    color: ${t("autocomplete.dropdown.color")};
    transition: background ${t("autocomplete.transition.duration")}, color ${t("autocomplete.transition.duration")}, border-color ${t("autocomplete.transition.duration")}, outline-color ${t("autocomplete.transition.duration")}, box-shadow ${t("autocomplete.transition.duration")};
    outline-color: transparent;
}

.p-autocomplete-dropdown:not(:disabled):hover {
    background: ${t("autocomplete.dropdown.hover.background")};
    border-color: ${t("autocomplete.dropdown.hover.border.color")};
    color: ${t("autocomplete.dropdown.hover.color")};
}

.p-autocomplete-dropdown:not(:disabled):active {
    background: ${t("autocomplete.dropdown.active.background")};
    border-color: ${t("autocomplete.dropdown.active.border.color")};
    color: ${t("autocomplete.dropdown.active.color")};
}

.p-autocomplete-dropdown:focus-visible {
    box-shadow: ${t("autocomplete.dropdown.focus.ring.shadow")};
    outline: ${t("autocomplete.dropdown.focus.ring.width")} ${t("autocomplete.dropdown.focus.ring.style")} ${t("autocomplete.dropdown.focus.ring.color")};
    outline-offset: ${t("autocomplete.dropdown.focus.ring.offset")};
}

.p-autocomplete .p-autocomplete-overlay {
    min-width: 100%;
}

.p-autocomplete-overlay {
    background: ${t("autocomplete.overlay.background")};
    color: ${t("autocomplete.overlay.color")};
    border: 1px solid ${t("autocomplete.overlay.border.color")};
    border-radius: ${t("autocomplete.overlay.border.radius")};
    box-shadow: ${t("autocomplete.overlay.shadow")};
}

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

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

.p-autocomplete-option {
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: ${t("autocomplete.option.padding")};
    border: 0 none;
    color: ${t("autocomplete.option.color")};
    background: transparent;
    transition: background ${t("autocomplete.transition.duration")}, color ${t("autocomplete.transition.duration")}, border-color ${t("autocomplete.transition.duration")};
    border-radius: ${t("autocomplete.option.border.radius")};
}

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

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

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

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

.p-autocomplete-input-multiple {
    margin: 0;
    list-style-type: none;
    cursor: text;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: calc(${t("autocomplete.padding.y")} / 2) ${t("autocomplete.padding.x")};
    gap: calc(${t("autocomplete.padding.y")} / 2);
    color: ${t("autocomplete.color")};
    background: ${t("autocomplete.background")};
    border: 1px solid ${t("autocomplete.border.color")};
    border-radius: ${t("autocomplete.border.radius")};
    width: 100%;
    transition: background ${t("autocomplete.transition.duration")}, color ${t("autocomplete.transition.duration")}, border-color ${t("autocomplete.transition.duration")}, outline-color ${t("autocomplete.transition.duration")}, box-shadow ${t("autocomplete.transition.duration")};
    outline-color: transparent;
    box-shadow: ${t("autocomplete.shadow")};
}

.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {
    border-color: ${t("autocomplete.hover.border.color")};
}

.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
    border-color: ${t("autocomplete.focus.border.color")};
    box-shadow: ${t("autocomplete.focus.ring.shadow")};
    outline: ${t("autocomplete.focus.ring.width")} ${t("autocomplete.focus.ring.style")} ${t("autocomplete.focus.ring.color")};
    outline-offset: ${t("autocomplete.focus.ring.offset")};
}

.p-autocomplete.p-invalid .p-autocomplete-input-multiple {
    border-color: ${t("autocomplete.invalid.border.color")};
}

.p-variant-filled.p-autocomplete-input-multiple {
    background: ${t("autocomplete.filled.background")};
}

.p-autocomplete:not(.p-disabled):hover .p-variant-filled.p-autocomplete-input-multiple {
    background: ${t("autocomplete.filled.hover.background")};
}

.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple  {
    background: ${t("autocomplete.filled.focus.background")};
}

.p-autocomplete.p-disabled {
    opacity: 1;
}

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

.p-autocomplete-chip.p-chip {
    padding-block-start: calc(${t("autocomplete.padding.y")} / 2);
    padding-block-end: calc(${t("autocomplete.padding.y")} / 2);
    border-radius: ${t("autocomplete.chip.border.radius")};
}

.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {
    padding-inline-start: calc(${t("autocomplete.padding.y")} / 2);
    padding-inline-end: calc(${t("autocomplete.padding.y")} / 2);
}

.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {
    background: ${t("autocomplete.chip.focus.background")};
    color: ${t("autocomplete.chip.focus.color")};
}

.p-autocomplete-input-chip {
    flex: 1 1 auto;
    display: inline-flex;
    padding-block-start: calc(${t("autocomplete.padding.y")} / 2);
    padding-block-end: calc(${t("autocomplete.padding.y")} / 2);
}

.p-autocomplete-input-chip input {
    border: 0 none;
    outline: 0 none;
    background: transparent;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    font-family: inherit;
    font-feature-settings: inherit;
    font-size: 1rem;
    color: inherit;
}

.p-autocomplete-input-chip input::placeholder {
    color: ${t("autocomplete.placeholder.color")};
}

.p-autocomplete-empty-message {
    padding: ${t("autocomplete.empty.message.padding")};
}

.p-autocomplete-fluid {
    display: flex;
}

.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {
    width: 1%;
}

.p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown {
    width: ${t("autocomplete.dropdown.sm.width")};
}

.p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown .p-icon {
    font-size: ${t("form.field.sm.font.size")};
    width: ${t("form.field.sm.font.size")};
    height: ${t("form.field.sm.font.size")};
}

.p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown {
    width: ${t("autocomplete.dropdown.lg.width")};
}

.p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown .p-icon {
    font-size: ${t("form.field.lg.font.size")};
    width: ${t("form.field.lg.font.size")};
    height: ${t("form.field.lg.font.size")};
}

.p-autocomplete-clear-icon {
    position: absolute;
    top: 50%;
    margin-top: -0.5rem;
    cursor: pointer;
    right: ${t("autocomplete.padding.x")};
    color: ${t("autocomplete.dropdown.color")};
}

.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-clear-icon {
    right: calc(${t("autocomplete.padding.x")} + ${t("autocomplete.dropdown.width")});
}
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input,
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple,
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input,
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-multiple
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input,
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple {
    border-color: ${t("autocomplete.invalid.border.color")};
}
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
p-autoComplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple,
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
p-auto-complete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple,
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
p-autocomplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
    border-color: ${t("autocomplete.focus.border.color")};
}
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder,
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder,
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder {
    color: ${t("autocomplete.invalid.placeholder.color")};
}

p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder,
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder,
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder {
    color: ${t("autocomplete.invalid.placeholder.color")};
}`,ki={root:{position:"relative"}},Ei={root:({instance:t})=>({"p-autocomplete p-component p-inputwrapper":!0,"p-disabled":t.disabled,"p-focus":t.focused,"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused&&!t.disabled||t.autofocus||t.overlayVisible,"p-autocomplete-open":t.overlayVisible,"p-autocomplete-clearable":t.showClear&&!t.disabled,"p-autocomplete-fluid":t.hasFluid}),pcInput:"p-autocomplete-input",inputMultiple:({instance:t})=>({"p-autocomplete-input-multiple":!0,"p-variant-filled":(t.variant??(t.config.inputStyle()||t.config.inputVariant()))==="filled"}),chipItem:({instance:t,i:a})=>["p-autocomplete-chip-item",{"p-focus":t.focusedMultipleOptionIndex===a}],pcChip:"p-autocomplete-chip",chipIcon:"p-autocomplete-chip-icon",inputChip:"p-autocomplete-input-chip",loader:"p-autocomplete-loader",dropdown:"p-autocomplete-dropdown",overlay:"p-autocomplete-overlay p-component",list:"p-autocomplete-list",optionGroup:"p-autocomplete-option-group",option:({instance:t,option:a,i:e,getItemOptions:i})=>({"p-autocomplete-option":!0,"p-autocomplete-option-selected":t.isSelected(a),"p-focus":t.focusedOptionIndex===t.getOptionIndex(e,i),"p-disabled":t.isOptionDisabled(a)}),emptyMessage:"p-autocomplete-empty-message"},Pe=(()=>{class t extends ne{name="autocomplete";theme=Vi;classes=Ei;inlineStyles=ki;static \u0275fac=(()=>{let e;return function(o){return(e||(e=K(t)))(o||t)}})();static \u0275prov=U({token:t,factory:t.\u0275fac})}return t})();var $i={provide:Me,useExisting:he(()=>Ge),multi:!0},Ge=(()=>{class t extends le{overlayService;zone;minLength=1;delay=300;style;panelStyle;styleClass;panelStyleClass;inputStyle;inputId;inputStyleClass;placeholder;readonly;disabled;scrollHeight="200px";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;maxlength;name;required;size;appendTo;autoHighlight;forceSelection;type="text";autoZIndex=!0;baseZIndex=0;ariaLabel;dropdownAriaLabel;ariaLabelledBy;dropdownIcon;unique=!0;group;completeOnFocus=!1;showClear=!1;field;dropdown;showEmptyMessage=!0;dropdownMode="blank";multiple;tabindex;dataKey;emptyMessage;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";autofocus;autocomplete="off";optionGroupChildren="items";optionGroupLabel="label";overlayOptions;get suggestions(){return this._suggestions()}set suggestions(e){this._suggestions.set(e),this.handleSuggestionsChange()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.log("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}optionLabel;optionValue;id;searchMessage;emptySelectionMessage;selectionMessage;autoOptionFocus=!1;selectOnFocus;searchLocale;optionDisabled;focusOnHover=!0;typeahead=!0;variant;fluid=!1;completeMethod=new v;onSelect=new v;onUnselect=new v;onFocus=new v;onBlur=new v;onDropdownClick=new v;onClear=new v;onKeyUp=new v;onShow=new v;onHide=new v;onLazyLoad=new v;containerEL;inputEL;multiInputEl;multiContainerEL;dropdownButton;itemsViewChild;scroller;overlayViewChild;_itemSize;itemsWrapper;itemTemplate;emptyTemplate;headerTemplate;footerTemplate;selectedItemTemplate;groupTemplate;loaderTemplate;removeIconTemplate;loadingIconTemplate;clearIconTemplate;dropdownIconTemplate;primeng=D($e);value;_suggestions=R(null);onModelChange=()=>{};onModelTouched=()=>{};timeout;overlayVisible;suggestionsUpdated;highlightOption;highlightOptionChanged;focused=!1;_filled;get filled(){return this._filled}set filled(e){this._filled=e}loading;scrollHandler;listId;searchTimeout;dirty=!1;_itemTemplate;_groupTemplate;_selectedItemTemplate;_headerTemplate;_emptyTemplate;_footerTemplate;_loaderTemplate;_removeIconTemplate;_loadingIconTemplate;_clearIconTemplate;_dropdownIconTemplate;modelValue=R(null);focusedMultipleOptionIndex=R(-1);focusedOptionIndex=R(-1);_componentStyle=D(Pe);visibleOptions=de(()=>this.group?this.flatOptions(this._suggestions()):this._suggestions()||[]);inputValue=de(()=>{let e=this.modelValue(),i=this.optionValueSelected?(this.suggestions||[]).find(o=>F(o,this.optionValue)===e):e;if(z(e))if(typeof e=="object"||this.optionValueSelected){let o=this.getOptionLabel(i);return o??e}else return e;else return""});get focusedMultipleOptionId(){return this.focusedMultipleOptionIndex()!==-1?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex()}`:null}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}get rootClass(){return this._componentStyle.classes.root({instance:this})}get inputMultipleClass(){return this._componentStyle.classes.inputMultiple({instance:this})}get panelClass(){return{"p-autocomplete-overlay p-component":!0,"p-input-filled":this.config.inputStyle()==="filled"||this.config.inputVariant()==="filled","p-ripple-disabled":this.config.ripple()===!1}}get inputClass(){return{"p-autocomplete-input":!this.multiple,"p-autocomplete-dd-input":this.dropdown}}get searchResultMessageText(){return z(this.visibleOptions())&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions().length):this.emptySearchMessageText}get searchMessageText(){return this.searchMessage||this.config.translation.searchMessage||""}get emptySearchMessageText(){return this.emptyMessage||this.config.translation.emptySearchMessage||""}get selectionMessageText(){return this.selectionMessage||this.config.translation.selectionMessage||""}get emptySelectionMessageText(){return this.emptySelectionMessage||this.config.translation.emptySelectionMessage||""}get selectedMessageText(){return this.hasSelectedOption()?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue().length:"1"):this.emptySelectionMessageText}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}get listLabel(){return this.config.getTranslation(oe.ARIA).listLabel}get virtualScrollerDisabled(){return!this.virtualScroll}get optionValueSelected(){return typeof this.modelValue()=="string"&&this.optionValue}chipItemClass(e){return this._componentStyle.classes.chipItem({instance:this,i:e})}optionClass(e,i,o){return{"p-autocomplete-option":!0,"p-autocomplete-option-selected":this.isSelected(e),"p-focus":this.focusedOptionIndex()===this.getOptionIndex(i,o),"p-disabled":this.isOptionDisabled(e)}}constructor(e,i){super(),this.overlayService=e,this.zone=i,Te(()=>{this.filled=z(this.modelValue())})}ngOnInit(){super.ngOnInit(),this.id=this.id||ke("pn_id_"),this.cd.detectChanges()}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"group":this._groupTemplate=e.template;break;case"selecteditem":this._selectedItemTemplate=e.template;break;case"selectedItem":this._selectedItemTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"removetokenicon":this._removeIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}ngAfterViewChecked(){this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1),this.suggestionsUpdated=!1})}handleSuggestionsChange(){if(this.loading){this._suggestions()?.length>0||this.showEmptyMessage||this.emptyTemplate?this.show():this.hide();let e=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(e),this.suggestionsUpdated=!0,this.loading=!1,this.cd.markForCheck()}}flatOptions(e){return(e||[]).reduce((i,o,n)=>{i.push({optionGroup:o,group:!0,index:n});let p=this.getOptionGroupChildren(o);return p&&p.forEach(w=>i.push(w)),i},[])}isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findLastOptionIndex(){return _e(this.visibleOptions(),e=>this.isValidOption(e))}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let i=e<this.visibleOptions().length-1?this.visibleOptions().slice(e+1).findIndex(o=>this.isValidOption(o)):-1;return i>-1?i+e+1:e}findPrevOptionIndex(e){let i=e>0?_e(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.optionDisabled?F(e,this.optionDisabled):!1}isSelected(e){return this.multiple?this.unique?this.modelValue()?.find(i=>me(i,this.getOptionValue(e),this.equalityKey())):!1:me(this.modelValue(),this.getOptionValue(e),this.equalityKey())}isOptionMatched(e,i){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===i.toLocaleLowerCase(this.searchLocale)}isInputClicked(e){return e.target===this.inputEL.nativeElement}isDropdownClicked(e){return this.dropdownButton?.nativeElement?e.target===this.dropdownButton.nativeElement||this.dropdownButton.nativeElement.contains(e.target):!1}equalityKey(){return this.dataKey}onContainerClick(e){this.disabled||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||(!this.overlayViewChild||!this.overlayViewChild.overlayViewChild?.nativeElement.contains(e.target))&&E(this.inputEL.nativeElement)}handleDropdownClick(e){let i;this.overlayVisible?this.hide(!0):(E(this.inputEL.nativeElement),i=this.inputEL.nativeElement.value,this.dropdownMode==="blank"?this.search(e,"","dropdown"):this.dropdownMode==="current"&&this.search(e,i,"dropdown")),this.onDropdownClick.emit({originalEvent:e,query:i})}onInput(e){if(this.typeahead){this.searchTimeout&&clearTimeout(this.searchTimeout);let i=e.target.value;this.maxlength!==null&&(i=i.split("").slice(0,this.maxlength).join("")),!this.multiple&&!this.forceSelection&&this.updateModel(i),i.length===0&&!this.multiple?(this.onClear.emit(),setTimeout(()=>{this.hide()},this.delay/2)):i.length>=this.minLength?(this.focusedOptionIndex.set(-1),this.searchTimeout=setTimeout(()=>{this.search(e,i,"input")},this.delay)):this.hide()}}onInputChange(e){if(this.forceSelection){let i=!1;if(this.visibleOptions()){let o=this.visibleOptions().find(n=>this.isOptionMatched(n,this.inputEL.nativeElement.value||""));o!==void 0&&(i=!0,!this.isSelected(o)&&this.onOptionSelect(e,o))}i||(this.inputEL.nativeElement.value="",!this.multiple&&this.updateModel(null))}}onInputFocus(e){if(this.disabled)return;!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onMultipleContainerFocus(e){this.disabled||(this.focused=!0)}onMultipleContainerBlur(e){this.focusedMultipleOptionIndex.set(-1),this.focused=!1}onMultipleContainerKeyDown(e){if(this.disabled){e.preventDefault();return}switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e);break;default:break}}onInputBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex.set(-1),this.onModelTouched(),this.onBlur.emit(e)}onInputPaste(e){this.onKeyDown(e)}onInputKeyUp(e){this.onKeyUp.emit(e)}onKeyDown(e){if(this.disabled){e.preventDefault();return}switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(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":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e);break;case"ShiftLeft":case"ShiftRight":break;default:break}}onArrowDownKey(e){if(!this.overlayVisible)return;let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),e.preventDefault(),e.stopPropagation()}}get hasFluid(){let i=this.el.nativeElement.closest("p-fluid");return this.fluid||!!i}onArrowLeftKey(e){let i=e.currentTarget;this.focusedOptionIndex.set(-1),this.multiple&&(Ve(i.value)&&this.hasSelectedOption()?(E(this.multiContainerEL.nativeElement),this.focusedMultipleOptionIndex.set(this.modelValue().length)):e.stopPropagation())}onArrowRightKey(e){this.focusedOptionIndex.set(-1),this.multiple&&e.stopPropagation()}onHomeKey(e){let{currentTarget:i}=e,o=i.value.length;i.setSelectionRange(0,e.shiftKey?o:0),this.focusedOptionIndex.set(-1),e.preventDefault()}onEndKey(e){let{currentTarget:i}=e,o=i.value.length;i.setSelectionRange(e.shiftKey?0:o,o),this.focusedOptionIndex.set(-1),e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){this.typeahead||this.multiple&&(this.updateModel([...this.modelValue()||[],e.target.value]),this.inputEL.nativeElement.value=""),this.overlayVisible?(this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.hide()):this.onArrowDownKey(e),e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e){this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide()}onBackspaceKey(e){if(this.multiple){if(z(this.modelValue())&&!this.inputEL.nativeElement.value){let i=this.modelValue()[this.modelValue().length-1],o=this.modelValue().slice(0,-1);this.updateModel(o),this.onUnselect.emit({originalEvent:e,value:i})}e.stopPropagation()}!this.multiple&&this.showClear&&this.findSelectedOptionIndex()!=-1&&this.clear()}onArrowLeftKeyOnMultiple(e){let i=this.focusedMultipleOptionIndex()<1?0:this.focusedMultipleOptionIndex()-1;this.focusedMultipleOptionIndex.set(i)}onArrowRightKeyOnMultiple(e){let i=this.focusedMultipleOptionIndex();i++,this.focusedMultipleOptionIndex.set(i),i>this.modelValue().length-1&&(this.focusedMultipleOptionIndex.set(-1),E(this.inputEL.nativeElement))}onBackspaceKeyOnMultiple(e){this.focusedMultipleOptionIndex()!==-1&&this.removeOption(e,this.focusedMultipleOptionIndex())}onOptionSelect(e,i,o=!0){let n=this.getOptionValue(i);this.multiple?(this.inputEL.nativeElement.value="",this.isSelected(i)||this.updateModel([...this.modelValue()||[],n])):this.updateModel(n),this.onSelect.emit({originalEvent:e,value:i}),o&&this.hide(!0)}onOptionMouseEnter(e,i){this.focusOnHover&&this.changeFocusedOptionIndex(e,i)}search(e,i,o){i!=null&&(o==="input"&&i.trim().length===0||(this.loading=!0,this.completeMethod.emit({originalEvent:e,query:i})))}removeOption(e,i){e.stopPropagation();let o=this.modelValue()[i],n=this.modelValue().filter((p,w)=>w!==i);this.updateModel(n),this.onUnselect.emit({originalEvent:e,value:o}),E(this.inputEL.nativeElement)}updateModel(e){this.value=e,this.modelValue.set(e),this.onModelChange(e),this.updateInputValue(),this.cd.markForCheck()}updateInputValue(){this.inputEL&&this.inputEL.nativeElement&&(this.multiple?this.inputEL.nativeElement.value="":this.inputEL.nativeElement.value=this.inputValue())}autoUpdateModel(){if((this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption()){let e=this.findFirstFocusedOptionIndex();this.focusedOptionIndex.set(e),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)}}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let o=te(this.itemsViewChild.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}changeFocusedOptionIndex(e,i){this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions()[i],!1))}show(e=!1){this.dirty=!0,this.overlayVisible=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),e&&E(this.inputEL.nativeElement),e&&E(this.inputEL.nativeElement),this.onShow.emit(),this.cd.markForCheck()}hide(e=!1){let i=()=>{this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex.set(-1),e&&E(this.inputEL.nativeElement),this.onHide.emit(),this.cd.markForCheck()};setTimeout(()=>{i()},0)}clear(){this.updateModel(null),this.inputEL.nativeElement.value="",this.onClear.emit()}writeValue(e){this.value=e,this.modelValue.set(e),this.updateInputValue(),this.cd.markForCheck()}hasSelectedOption(){return z(this.modelValue())}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}getOptionLabel(e){return this.field||this.optionLabel?F(e,this.field||this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?F(e,this.optionValue):e&&e.value!=null?e.value:e}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getOptionGroupLabel(e){return this.optionGroupLabel?F(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?F(e,this.optionGroupChildren):e.items}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"&&(this.itemsWrapper=te(this.overlayViewChild.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-autocomplete-panel"),this.virtualScroll&&(this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.scroller.viewInit()),this.visibleOptions()&&this.visibleOptions().length))if(this.virtualScroll){let i=this.modelValue()?this.focusedOptionIndex():-1;i!==-1&&this.scroller?.scrollToIndex(i)}else{let i=te(this.itemsWrapper,".p-autocomplete-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"center"})}}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(se(Ee),se(fe))};static \u0275cmp=G({type:t,selectors:[["p-autoComplete"],["p-autocomplete"],["p-auto-complete"]],contentQueries:function(i,o,n){if(i&1&&(C(n,ct,5),C(n,ut,5),C(n,dt,5),C(n,mt,5),C(n,_t,5),C(n,ht,5),C(n,gt,5),C(n,ft,5),C(n,yt,5),C(n,xt,5),C(n,bt,5),C(n,ie,4)),i&2){let p;g(p=f())&&(o.itemTemplate=p.first),g(p=f())&&(o.emptyTemplate=p.first),g(p=f())&&(o.headerTemplate=p.first),g(p=f())&&(o.footerTemplate=p.first),g(p=f())&&(o.selectedItemTemplate=p.first),g(p=f())&&(o.groupTemplate=p.first),g(p=f())&&(o.loaderTemplate=p.first),g(p=f())&&(o.removeIconTemplate=p.first),g(p=f())&&(o.loadingIconTemplate=p.first),g(p=f())&&(o.clearIconTemplate=p.first),g(p=f())&&(o.dropdownIconTemplate=p.first),g(p=f())&&(o.templates=p)}},viewQuery:function(i,o){if(i&1&&(V(Ct,5),V(vt,5),V(wt,5),V(It,5),V(Tt,5),V(Ot,5),V(St,5),V(Vt,5)),i&2){let n;g(n=f())&&(o.containerEL=n.first),g(n=f())&&(o.inputEL=n.first),g(n=f())&&(o.multiInputEl=n.first),g(n=f())&&(o.multiContainerEL=n.first),g(n=f())&&(o.dropdownButton=n.first),g(n=f())&&(o.itemsViewChild=n.first),g(n=f())&&(o.scroller=n.first),g(n=f())&&(o.overlayViewChild=n.first)}},inputs:{minLength:[2,"minLength","minLength",L],delay:[2,"delay","delay",L],style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",readonly:[2,"readonly","readonly",h],disabled:[2,"disabled","disabled",h],scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",h],virtualScroll:[2,"virtualScroll","virtualScroll",h],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",L],virtualScrollOptions:"virtualScrollOptions",maxlength:[2,"maxlength","maxlength",e=>L(e,null)],name:"name",required:[2,"required","required",h],size:"size",appendTo:"appendTo",autoHighlight:[2,"autoHighlight","autoHighlight",h],forceSelection:[2,"forceSelection","forceSelection",h],type:"type",autoZIndex:[2,"autoZIndex","autoZIndex",h],baseZIndex:[2,"baseZIndex","baseZIndex",L],ariaLabel:"ariaLabel",dropdownAriaLabel:"dropdownAriaLabel",ariaLabelledBy:"ariaLabelledBy",dropdownIcon:"dropdownIcon",unique:[2,"unique","unique",h],group:[2,"group","group",h],completeOnFocus:[2,"completeOnFocus","completeOnFocus",h],showClear:[2,"showClear","showClear",h],field:"field",dropdown:[2,"dropdown","dropdown",h],showEmptyMessage:[2,"showEmptyMessage","showEmptyMessage",h],dropdownMode:"dropdownMode",multiple:[2,"multiple","multiple",h],tabindex:[2,"tabindex","tabindex",L],dataKey:"dataKey",emptyMessage:"emptyMessage",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autofocus:[2,"autofocus","autofocus",h],autocomplete:"autocomplete",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",overlayOptions:"overlayOptions",suggestions:"suggestions",itemSize:"itemSize",optionLabel:"optionLabel",optionValue:"optionValue",id:"id",searchMessage:"searchMessage",emptySelectionMessage:"emptySelectionMessage",selectionMessage:"selectionMessage",autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",h],selectOnFocus:[2,"selectOnFocus","selectOnFocus",h],searchLocale:[2,"searchLocale","searchLocale",h],optionDisabled:"optionDisabled",focusOnHover:[2,"focusOnHover","focusOnHover",h],typeahead:[2,"typeahead","typeahead",h],variant:"variant",fluid:[2,"fluid","fluid",h]},outputs:{completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect",onFocus:"onFocus",onBlur:"onBlur",onDropdownClick:"onDropdownClick",onClear:"onClear",onKeyUp:"onKeyUp",onShow:"onShow",onHide:"onHide",onLazyLoad:"onLazyLoad"},features:[W([$i,Pe]),j,N],decls:11,vars:15,consts:[["container",""],["overlay",""],["content",""],["focusInput",""],["multiContainer",""],["token",""],["removeicon",""],["ddBtn",""],["buildInItems",""],["scroller",""],["loader",""],["items",""],["empty",""],[2,"position","relative",3,"click","ngClass","ngStyle"],["pInputText","","aria-autocomplete","list","role","combobox",3,"pAutoFocus","ngClass","ngStyle","class","type","variant","autocomplete","required","name","pSize","tabindex","readonly","disabled","fluid","input","keydown","change","focus","blur","paste","keyup",4,"ngIf"],[4,"ngIf"],["role","listbox",3,"ngClass","tabindex","focus","blur","keydown",4,"ngIf"],["type","button","class","p-autocomplete-dropdown","pRipple","",3,"disabled","click",4,"ngIf"],[3,"visibleChange","onAnimationStart","onHide","visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions"],["pInputText","","aria-autocomplete","list","role","combobox",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","ngClass","ngStyle","type","variant","autocomplete","required","name","pSize","tabindex","readonly","disabled","fluid"],[3,"styleClass","click",4,"ngIf"],["class","p-autocomplete-clear-icon",3,"click",4,"ngIf"],[3,"click","styleClass"],[1,"p-autocomplete-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["role","listbox",3,"focus","blur","keydown","ngClass","tabindex"],["role","option",3,"ngClass",4,"ngFor","ngForOf"],["role","option",1,"p-autocomplete-input-chip"],["role","combobox","aria-autocomplete","list",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","ngClass","ngStyle","autocomplete","required","tabindex","readonly","disabled"],["role","option",3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["styleClass","p-autocomplete-chip",3,"label","removable","onRemove",4,"ngIf"],["styleClass","p-autocomplete-chip",3,"onRemove","label","removable"],[1,"p-autocomplete-chip-icon",3,"click"],[3,"styleClass"],[3,"styleClass","spin",4,"ngIf"],["class","p-autocomplete-loader pi-spin ",4,"ngIf"],[3,"styleClass","spin"],[1,"p-autocomplete-loader","pi-spin"],["type","button","pRipple","",1,"p-autocomplete-dropdown",3,"click","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"ngClass","ngStyle"],[1,"p-autocomplete-list-container"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["role","status","aria-live","polite",1,"p-hidden-accessible"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["role","listbox",1,"p-autocomplete-list",3,"ngClass"],["ngFor","",3,"ngForOf"],["class","p-autocomplete-empty-message","role","option",3,"ngStyle",4,"ngIf"],["role","option",1,"p-autocomplete-option-group",3,"ngStyle"],["pRipple","","role","option",3,"click","mouseenter","ngStyle","ngClass"],["role","option",1,"p-autocomplete-empty-message",3,"ngStyle"],[4,"ngIf","ngIfElse"]],template:function(i,o){if(i&1){let n=b();m(0,"div",13,0),x("click",function(w){return c(n),u(o.onContainerClick(w))}),d(2,Lt,2,25,"input",14)(3,Rt,3,2,"ng-container",15)(4,jt,6,26,"ul",16)(5,Yt,3,2,"ng-container",15)(6,li,4,5,"button",17),m(7,"p-overlay",18,1),we("visibleChange",function(w){return c(n),ve(o.overlayVisible,w)||(o.overlayVisible=w),u(w)}),x("onAnimationStart",function(w){return c(n),u(o.onOverlayAnimationStart(w))})("onHide",function(){return c(n),u(o.hide())}),d(9,Si,10,11,"ng-template",null,2,$),_()()}i&2&&(O(o.styleClass),r("ngClass",o.rootClass)("ngStyle",o.style),s(2),r("ngIf",!o.multiple),s(),r("ngIf",o.filled&&!o.disabled&&o.showClear&&!o.loading),s(),r("ngIf",o.multiple),s(),r("ngIf",o.loading),s(),r("ngIf",o.dropdown),s(),Ce("visible",o.overlayVisible),r("options",o.overlayOptions)("target","@parent")("appendTo",o.appendTo)("showTransitionOptions",o.showTransitionOptions)("hideTransitionOptions",o.hideTransitionOptions))},dependencies:[ee,J,Oe,X,Y,Se,Re,Ke,De,Qe,Ae,ae,Fe,ze,Le,Be,H],encapsulation:2,changeDetection:0})}return t})(),Co=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ce({type:t});static \u0275inj=pe({imports:[Ge,H]})}return t})();export{Ge as a,Co as b};
