import{cJ as I,bF as Uu,aY as S,cK as A,bQ as af,gS as Kr,g,cM as Z,L as qp,cN as kt$1,aL as Ye$1,cO as Ju,hy as iT,cP as V0e,gR as Wt$1,hL as C0e,gU as im,gV as sT,hM as xi,hI as jz,hu as wi,cR as ce,cS as F0e,dT as ie,b as Pa,cT as Ln,cU as mn$1,cV as j0e,U as cl,V as w3,hc as RA,cX as x3,cd as R3,fe as A3,d0 as Ii,h9 as us,he as co,hf as nn$1,cZ as Sr,hN as ae,h8 as Ht$1,hJ as Kn,hO as Xe$1,ha as rr,gK as qo,cf as I0,R as tl,O as J$,k as k2,_ as _0,s as sp,n as Mx,F as Fp,u as ub,a3 as B0,z as zB,N as Nx,cs as Lp,ah as c$,bP as D,d1 as ge,d2 as Pj,fh as FV,cE as BV,d3 as lx,d4 as gb,d5 as yb,eO as Hp,hb as H0e,d as $I,o as bV,G as GI,bY as fb,bZ as kp,a6 as KV,d6 as yx,cy as vb,eB as eC,D as D$,a4 as l$,e as Pp,cG as V0,aj as IV,cC as d$,ce as u$,fg as f$,ak as wx,p as e$,bT as _xe,ar as _pe,hP as i,J as Jn,q as qn,l as ln$1,t as GH,b_ as vx,W as WH}from'./main-BiUBeaMj.js';var Pe=`
    .p-autocomplete {
        display: inline-flex;
    }

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

    .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {
        inset-inline-end: calc(dt('autocomplete.dropdown.width') + dt('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: dt('autocomplete.dropdown.width');
        border-start-end-radius: dt('autocomplete.dropdown.border.radius');
        border-end-end-radius: dt('autocomplete.dropdown.border.radius');
        background: dt('autocomplete.dropdown.background');
        border: 1px solid dt('autocomplete.dropdown.border.color');
        border-inline-start: 0 none;
        color: dt('autocomplete.dropdown.color');
        transition:
            background dt('autocomplete.transition.duration'),
            color dt('autocomplete.transition.duration'),
            border-color dt('autocomplete.transition.duration'),
            outline-color dt('autocomplete.transition.duration'),
            box-shadow dt('autocomplete.transition.duration');
        outline-color: transparent;
    }

    .p-autocomplete-dropdown:not(:disabled):hover {
        background: dt('autocomplete.dropdown.hover.background');
        border-color: dt('autocomplete.dropdown.hover.border.color');
        color: dt('autocomplete.dropdown.hover.color');
    }

    .p-autocomplete-dropdown:not(:disabled):active {
        background: dt('autocomplete.dropdown.active.background');
        border-color: dt('autocomplete.dropdown.active.border.color');
        color: dt('autocomplete.dropdown.active.color');
    }

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

    .p-autocomplete-overlay {
        position: absolute;
        top: 0;
        left: 0;
        background: dt('autocomplete.overlay.background');
        color: dt('autocomplete.overlay.color');
        border: 1px solid dt('autocomplete.overlay.border.color');
        border-radius: dt('autocomplete.overlay.border.radius');
        box-shadow: dt('autocomplete.overlay.shadow');
        min-width: 100%;
    }

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

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

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

    .p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {
        background: dt('autocomplete.option.focus.background');
        color: dt('autocomplete.option.focus.color');
    }

    .p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled):hover {
        background: dt('autocomplete.option.focus.background');
        color: dt('autocomplete.option.focus.color');
    }

    .p-autocomplete-option-selected {
        background: dt('autocomplete.option.selected.background');
        color: dt('autocomplete.option.selected.color');
    }

    .p-autocomplete-option-selected.p-focus {
        background: dt('autocomplete.option.selected.focus.background');
        color: dt('autocomplete.option.selected.focus.color');
    }

    .p-autocomplete-option-group {
        margin: 0;
        padding: dt('autocomplete.option.group.padding');
        color: dt('autocomplete.option.group.color');
        background: dt('autocomplete.option.group.background');
        font-weight: dt('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(dt('autocomplete.padding.y') / 2) dt('autocomplete.padding.x');
        gap: calc(dt('autocomplete.padding.y') / 2);
        color: dt('autocomplete.color');
        background: dt('autocomplete.background');
        border: 1px solid dt('autocomplete.border.color');
        border-radius: dt('autocomplete.border.radius');
        width: 100%;
        transition:
            background dt('autocomplete.transition.duration'),
            color dt('autocomplete.transition.duration'),
            border-color dt('autocomplete.transition.duration'),
            outline-color dt('autocomplete.transition.duration'),
            box-shadow dt('autocomplete.transition.duration');
        outline-color: transparent;
        box-shadow: dt('autocomplete.shadow');
    }

    .p-autocomplete-input-multiple.p-disabled {
        opacity: 1;
        background: dt('autocomplete.disabled.background');
        color: dt('autocomplete.disabled.color');
    }

    .p-autocomplete-input-multiple:not(.p-disabled):hover {
        border-color: dt('autocomplete.hover.border.color');
    }

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

    .p-autocomplete.p-invalid .p-autocomplete-input-multiple {
        border-color: dt('autocomplete.invalid.border.color');
    }

    .p-variant-filled.p-autocomplete-input-multiple {
        background: dt('autocomplete.filled.background');
    }

    .p-autocomplete-input-multiple.p-variant-filled:not(.p-disabled):hover {
        background: dt('autocomplete.filled.hover.background');
    }

    .p-autocomplete.p-focus .p-autocomplete-input-multiple.p-variant-filled:not(.p-disabled) {
        background: dt('autocomplete.filled.focus.background');
    }

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

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

    .p-autocomplete-chip-item.p-focus .p-autocomplete-chip {
        background: dt('autocomplete.chip.focus.background');
        color: dt('autocomplete.chip.focus.color');
    }

    .p-autocomplete-input-chip {
        flex: 1 1 auto;
        display: inline-flex;
        padding-block-start: calc(dt('autocomplete.padding.y') / 2);
        padding-block-end: calc(dt('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: dt('autocomplete.placeholder.color');
    }

    .p-autocomplete.p-invalid .p-autocomplete-input-chip input::placeholder {
        color: dt('autocomplete.invalid.placeholder.color');
    }

    .p-autocomplete-empty-message {
        padding: dt('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: dt('autocomplete.dropdown.sm.width');
    }

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

    .p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown {
        width: dt('autocomplete.dropdown.lg.width');
    }

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

    .p-autocomplete-clear-icon {
        position: absolute;
        top: 50%;
        margin-top: -0.5rem;
        cursor: pointer;
        color: dt('form.field.icon.color');
        inset-inline-end: dt('autocomplete.padding.x');
    }

    .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-clear-icon {
        inset-inline-end: calc(dt('autocomplete.padding.x') + dt('autocomplete.dropdown.width'));
    }

    .p-autocomplete:has(.p-autocomplete-clear-icon) .p-autocomplete-input {
        padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
    }

    .p-inputgroup .p-autocomplete-dropdown {
        border-radius: 0;
    }

    .p-inputgroup > .p-autocomplete:last-child:has(.p-autocomplete-dropdown) > .p-autocomplete-input {
        border-start-end-radius: 0;
        border-end-end-radius: 0;
    }

    .p-inputgroup > .p-autocomplete:last-child .p-autocomplete-dropdown {
        border-start-end-radius: dt('autocomplete.dropdown.border.radius');
        border-end-end-radius: dt('autocomplete.dropdown.border.radius');
    }
`;var We=["item"],Ze=["empty"],Je=["header"],Xe=["footer"],Ye=["selecteditem"],et=["group"],tt=["loader"],nt=["removeicon"],it=["loadingicon"],ot=["clearicon"],lt=["dropdownicon"],at=["focusInput"],pt=["multiIn"],rt=["multiContainer"],st=["ddBtn"],ct=["items"],ut=["scroller"],dt=["overlay"],mt=i=>({i}),Ue=i=>({$implicit:i}),ht=(i,p,e)=>({removeCallback:i,index:p,class:e}),U$1=i=>({height:i}),Ne=(i,p)=>({$implicit:i,options:p}),_t=i=>({options:i}),gt=()=>({}),ft=(i,p,e)=>({option:i,i:p,scrollerOptions:e}),yt=(i,p)=>({$implicit:i,index:p});function xt(i,p){if(i&1){let e=k2();sp(0,"input",18,2),Fp("input",function(n){$I(e);let o=bV();return GI(o.onInput(n));})("keydown",function(n){$I(e);let o=bV();return GI(o.onKeyDown(n));})("change",function(n){$I(e);let o=bV();return GI(o.onInputChange(n));})("focus",function(n){$I(e);let o=bV();return GI(o.onInputFocus(n));})("blur",function(n){$I(e);let o=bV();return GI(o.onInputBlur(n));})("paste",function(n){$I(e);let o=bV();return GI(o.onInputPaste(n));})("keyup",function(n){$I(e);let o=bV();return GI(o.onInputKeyUp(n));}),ub();}if(i&2){let e=bV();BV(e.cn(e.cx("pcInputText"),e.inputStyleClass)),B0("pAutoFocus",e.autofocus)("pt",e.ptm("pcInputText"))("ngStyle",e.inputStyle)("variant",e.$variant())("invalid",e.invalid())("pSize",e.size())("fluid",e.hasFluid)("pInputTextUnstyled",e.unstyled()),Lp("type",e.type)("value",e.inputValue())("id",e.inputId)("autocomplete",e.autocomplete)("placeholder",e.placeholder)("name",e.name())("minlength",e.minlength())("min",e.min())("max",e.max())("pattern",e.pattern())("size",e.inputSize())("maxlength",e.maxlength())("tabindex",e.$disabled()?-1:e.tabindex)("required",e.required()?"":void 0)("readonly",e.readonly?"":void 0)("disabled",e.$disabled()?"":void 0)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required())("aria-expanded",e.overlayVisible??false)("aria-controls",e.overlayVisible?e.id+"_list":null)("aria-activedescendant",e.focused?e.focusedOptionId:void 0);}}function bt(i,p){if(i&1){let e=k2();eC(),sp(0,"svg",21),Fp("click",function(){$I(e);let n=bV(2);return GI(n.clear());}),ub();}if(i&2){let e=bV(2);BV(e.cx("clearIcon")),B0("pBind",e.ptm("clearIcon")),Lp("aria-hidden",true);}}function vt(i,p){}function It(i,p){i&1&&_0(0,vt,0,0,"ng-template");}function wt(i,p){if(i&1){let e=k2();sp(0,"span",22),Fp("click",function(){$I(e);let n=bV(2);return GI(n.clear());}),_0(1,It,1,0,null,23),ub();}if(i&2){let e=bV(2);BV(e.cx("clearIcon")),B0("pBind",e.ptm("clearIcon")),Lp("aria-hidden",true),zB(),B0("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate);}}function Ct(i,p){if(i&1&&(fb(0),_0(1,bt,1,4,"svg",19)(2,wt,2,5,"span",20),kp()),i&2){let e=bV();zB(),B0("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),zB(),B0("ngIf",e.clearIconTemplate||e._clearIconTemplate);}}function Ot(i,p){i&1&&V0(0);}function Tt(i,p){if(i&1){let e=k2();sp(0,"span",22),Fp("click",function(n){$I(e);let o=bV(2).index,l=bV(2);return GI(!l.readonly&&!l.$disabled()?l.removeOption(n,o):"");}),eC(),Pp(1,"svg",31),ub();}if(i&2){let e=bV(4);BV(e.cx("chipIcon")),B0("pBind",e.ptm("chipIcon")),zB(),BV(e.cx("chipIcon")),Lp("aria-hidden",true);}}function St(i,p){}function Vt(i,p){i&1&&_0(0,St,0,0,"ng-template");}function Et(i,p){if(i&1&&(sp(0,"span",32),_0(1,Vt,1,0,null,29),ub()),i&2){let e=bV(2).index,t=bV(2);B0("pBind",t.ptm("chipIcon")),Lp("aria-hidden",true),zB(),B0("ngTemplateOutlet",t.removeIconTemplate||t._removeIconTemplate)("ngTemplateOutletContext",f$(4,ht,t.removeOption.bind(t),e,t.cx("chipIcon")));}}function kt(i,p){if(i&1&&_0(0,Tt,2,6,"span",20)(1,Et,2,8,"span",30),i&2){let e=bV(3);B0("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),zB(),B0("ngIf",e.removeIconTemplate||e._removeIconTemplate);}}function Mt(i,p){if(i&1){let e=k2();sp(0,"li",26,5)(2,"p-chip",28),Fp("onRemove",function(n){let o=$I(e).index,l=bV(2);return GI(l.readonly?"":l.removeOption(n,o));}),_0(3,Ot,1,0,"ng-container",29)(4,kt,2,2,"ng-template",null,6,D$),ub()();}if(i&2){let e=p.$implicit,t=p.index,n=bV(2);BV(n.cx("chipItem",l$(17,mt,t))),B0("pBind",n.ptm("chipItem")),Lp("id",n.id+"_multiple_option_"+t)("aria-label",n.getOptionLabel(e))("aria-setsize",n.modelValue().length)("aria-posinset",t+1)("aria-selected",true),zB(2),BV(n.cx("pcChip")),B0("pt",n.ptm("pcChip"))("label",!n.selectedItemTemplate&&!n._selectedItemTemplate&&n.getOptionLabel(e))("disabled",n.$disabled())("removable",true)("unstyled",n.unstyled()),zB(),B0("ngTemplateOutlet",n.selectedItemTemplate||n._selectedItemTemplate)("ngTemplateOutletContext",l$(19,Ue,e));}}function At(i,p){if(i&1){let e=k2();sp(0,"ul",24,3),Fp("focus",function(n){$I(e);let o=bV();return GI(o.onMultipleContainerFocus(n));})("blur",function(n){$I(e);let o=bV();return GI(o.onMultipleContainerBlur(n));})("keydown",function(n){$I(e);let o=bV();return GI(o.onMultipleContainerKeyDown(n));}),_0(2,Mt,6,21,"li",25),sp(3,"li",26)(4,"input",27,4),Fp("input",function(n){$I(e);let o=bV();return GI(o.onInput(n));})("keydown",function(n){$I(e);let o=bV();return GI(o.onKeyDown(n));})("change",function(n){$I(e);let o=bV();return GI(o.onInputChange(n));})("focus",function(n){$I(e);let o=bV();return GI(o.onInputFocus(n));})("blur",function(n){$I(e);let o=bV();return GI(o.onInputBlur(n));})("paste",function(n){$I(e);let o=bV();return GI(o.onInputPaste(n));})("keyup",function(n){$I(e);let o=bV();return GI(o.onInputKeyUp(n));}),ub()()();}if(i&2){let e=bV();BV(e.cx("inputMultiple")),B0("pBind",e.ptm("inputMultiple"))("tabindex",-1),Lp("data-p",e.inputMultipleDataP)("aria-orientation","horizontal")("aria-activedescendant",e.focused?e.focusedMultipleOptionId:void 0),zB(2),B0("ngForOf",e.modelValue()),zB(),BV(e.cx("inputChip")),B0("pBind",e.ptm("inputChip")),zB(),BV(e.cx("pcInputText")),B0("pAutoFocus",e.autofocus)("pBind",e.ptm("input"))("ngStyle",e.inputStyle),Lp("type",e.type)("id",e.inputId)("autocomplete",e.autocomplete)("name",e.name())("minlength",e.minlength())("maxlength",e.maxlength())("size",e.size())("min",e.min())("max",e.max())("pattern",e.pattern())("placeholder",e.$filled()?null:e.placeholder)("tabindex",e.$disabled()?-1:e.tabindex)("required",e.required()?"":void 0)("readonly",e.readonly?"":void 0)("disabled",e.$disabled()?"":void 0)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required())("aria-expanded",e.overlayVisible??false)("aria-controls",e.overlayVisible?e.id+"_list":null)("aria-activedescendant",e.focused?e.focusedOptionId:void 0);}}function Lt(i,p){if(i&1&&(eC(),Pp(0,"svg",35)),i&2){let e=bV(2);BV(e.cx("loader")),B0("pBind",e.ptm("loader"))("spin",true),Lp("aria-hidden",true);}}function Ft(i,p){}function Bt(i,p){i&1&&_0(0,Ft,0,0,"ng-template");}function Dt(i,p){if(i&1&&(sp(0,"span",32),_0(1,Bt,1,0,null,23),ub()),i&2){let e=bV(2);BV(e.cx("loader")),B0("pBind",e.ptm("loader")),Lp("aria-hidden",true),zB(),B0("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate);}}function Kt(i,p){if(i&1&&(fb(0),_0(1,Lt,1,5,"svg",33)(2,Dt,2,5,"span",34),kp()),i&2){let e=bV();zB(),B0("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),zB(),B0("ngIf",e.loadingIconTemplate||e._loadingIconTemplate);}}function zt(i,p){if(i&1&&Pp(0,"span",38),i&2){let e=bV(2);B0("ngClass",e.dropdownIcon),Lp("aria-hidden",true);}}function $t(i,p){if(i&1&&(eC(),Pp(0,"svg",40)),i&2){let e=bV(3);B0("pBind",e.ptm("dropdown"));}}function Rt(i,p){}function qt(i,p){i&1&&_0(0,Rt,0,0,"ng-template");}function Ht(i,p){if(i&1&&(fb(0),_0(1,$t,1,1,"svg",39)(2,qt,1,0,null,23),kp()),i&2){let e=bV(2);zB(),B0("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),zB(),B0("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate);}}function Pt(i,p){if(i&1){let e=k2();sp(0,"button",36,7),Fp("click",function(n){$I(e);let o=bV();return GI(o.handleDropdownClick(n));}),_0(2,zt,1,2,"span",37)(3,Ht,3,2,"ng-container",14),ub();}if(i&2){let e=bV();BV(e.cx("dropdown")),B0("pBind",e.ptm("dropdown"))("disabled",e.$disabled()),Lp("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex),zB(2),B0("ngIf",e.dropdownIcon),zB(),B0("ngIf",!e.dropdownIcon);}}function Gt(i,p){i&1&&V0(0);}function Qt(i,p){i&1&&V0(0);}function Ut(i,p){if(i&1&&_0(0,Qt,1,0,"ng-container",29),i&2){let e=p.$implicit,t=p.options;bV(2);let n=IV(6);B0("ngTemplateOutlet",n)("ngTemplateOutletContext",d$(2,Ne,e,t));}}function Nt(i,p){i&1&&V0(0);}function jt(i,p){if(i&1&&_0(0,Nt,1,0,"ng-container",29),i&2){let e=p.options,t=bV(4);B0("ngTemplateOutlet",t.loaderTemplate||t._loaderTemplate)("ngTemplateOutletContext",l$(2,_t,e));}}function Wt(i,p){i&1&&(fb(0),_0(1,jt,1,4,"ng-template",null,10,D$),kp());}function Zt(i,p){if(i&1){let e=k2();sp(0,"p-scroller",45,9),Fp("onLazyLoad",function(n){$I(e);let o=bV(2);return GI(o.onLazyLoad.emit(n));}),_0(2,Ut,1,5,"ng-template",null,1,D$)(4,Wt,3,0,"ng-container",14),ub();}if(i&2){let e=bV(2);FV(l$(10,U$1,e.scrollHeight)),B0("tabindex",-1)("pt",e.ptm("virtualScroller"))("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",true)("lazy",e.lazy)("options",e.virtualScrollOptions),zB(4),B0("ngIf",e.loaderTemplate||e._loaderTemplate);}}function Jt(i,p){i&1&&V0(0);}function Xt(i,p){if(i&1&&(fb(0),_0(1,Jt,1,0,"ng-container",29),kp()),i&2){bV();let e=IV(6),t=bV();zB(),B0("ngTemplateOutlet",e)("ngTemplateOutletContext",d$(3,Ne,t.visibleOptions(),u$(2,gt)));}}function Yt(i,p){if(i&1&&(sp(0,"span"),KV(1),ub()),i&2){let e=bV(2).$implicit,t=bV(3);zB(),wx(t.getOptionGroupLabel(e.optionGroup));}}function en(i,p){i&1&&V0(0);}function tn(i,p){if(i&1&&(fb(0),sp(1,"li",49),_0(2,Yt,2,1,"span",14)(3,en,1,0,"ng-container",29),ub(),kp()),i&2){let e=bV(),t=e.$implicit,n=e.index,o=bV().options,l=bV(2);zB(),BV(l.cx("optionGroup")),B0("pBind",l.ptm("optionGroup"))("ngStyle",l$(8,U$1,o.itemSize+"px")),Lp("id",l.id+"_"+l.getOptionIndex(n,o)),zB(),B0("ngIf",!l.groupTemplate),zB(),B0("ngTemplateOutlet",l.groupTemplate)("ngTemplateOutletContext",l$(10,Ue,t.optionGroup));}}function nn(i,p){if(i&1&&(sp(0,"span"),KV(1),ub()),i&2){let e=bV(2).$implicit,t=bV(3);zB(),wx(t.getOptionLabel(e));}}function on(i,p){i&1&&V0(0);}function ln(i,p){if(i&1){let e=k2();fb(0),sp(1,"li",50),Fp("click",function(n){$I(e);let o=bV().$implicit,l=bV(3);return GI(l.onOptionSelect(n,o));})("mouseenter",function(n){$I(e);let o=bV().index,l=bV().options,f=bV(2);return GI(f.onOptionMouseEnter(n,f.getOptionIndex(o,l)));}),_0(2,nn,2,1,"span",14)(3,on,1,0,"ng-container",29),ub(),kp();}if(i&2){let e=bV(),t=e.$implicit,n=e.index,o=bV().options,l=bV(2);zB(),BV(l.cx("option",f$(15,ft,t,n,o))),B0("pBind",l.getPTOptions(t,o,n,"option"))("ngStyle",l$(19,U$1,o.itemSize+"px")),Lp("id",l.id+"_"+l.getOptionIndex(n,o))("aria-label",l.getOptionLabel(t))("aria-selected",l.isSelected(t))("data-p-selected",l.isSelected(t))("aria-disabled",l.isOptionDisabled(t))("data-p-focused",l.focusedOptionIndex()===l.getOptionIndex(n,o))("aria-setsize",l.ariaSetSize)("aria-posinset",l.getAriaPosInset(l.getOptionIndex(n,o))),zB(),B0("ngIf",!l.itemTemplate&&!l._itemTemplate),zB(),B0("ngTemplateOutlet",l.itemTemplate||l._itemTemplate)("ngTemplateOutletContext",d$(21,yt,t,o.getOptions?o.getOptions(n):n));}}function an(i,p){if(i&1&&_0(0,tn,4,12,"ng-container",14)(1,ln,4,24,"ng-container",14),i&2){let e=p.$implicit,t=bV(3);B0("ngIf",t.isOptionGroup(e)),zB(),B0("ngIf",!t.isOptionGroup(e));}}function pn(i,p){if(i&1&&(fb(0),KV(1),kp()),i&2){let e=bV(4);zB(),vb(" ",e.searchResultMessageText," ");}}function rn(i,p){i&1&&V0(0,null,12);}function sn(i,p){if(i&1&&(sp(0,"li",49),_0(1,pn,2,1,"ng-container",51)(2,rn,2,0,"ng-container",23),ub()),i&2){let e=bV().options,t=bV(2);BV(t.cx("emptyMessage")),B0("pBind",t.ptm("emptyMessage"))("ngStyle",l$(7,U$1,e.itemSize+"px")),zB(),B0("ngIf",!t.emptyTemplate&&!t._emptyTemplate)("ngIfElse",t.empty),zB(),B0("ngTemplateOutlet",t.emptyTemplate||t._emptyTemplate);}}function cn(i,p){if(i&1&&(sp(0,"ul",46,11),_0(2,an,2,2,"ng-template",47)(3,sn,3,9,"li",48),ub()),i&2){let e=p.$implicit,t=p.options,n=bV(2);FV(t.contentStyle),BV(n.cn(n.cx("list"),t.contentStyleClass)),B0("pBind",n.ptm("list")),Lp("id",n.id+"_list")("aria-label",n.listLabel),zB(2),B0("ngForOf",e),zB(),B0("ngIf",!e||e&&e.length===0&&n.showEmptyMessage);}}function un(i,p){i&1&&V0(0);}function dn(i,p){if(i&1&&(sp(0,"div",41),_0(1,Gt,1,0,"ng-container",23),sp(2,"div",42),_0(3,Zt,5,12,"p-scroller",43)(4,Xt,2,6,"ng-container",14),ub(),_0(5,cn,4,9,"ng-template",null,8,D$)(7,un,1,0,"ng-container",23),ub(),sp(8,"span",44),KV(9),ub()),i&2){let e=bV();BV(e.cn(e.cx("overlay"),e.panelStyleClass)),B0("pBind",e.ptm("overlay"))("ngStyle",e.panelStyle),zB(),B0("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),zB(),BV(e.cx("listContainer")),yx("max-height",e.virtualScroll?"auto":e.scrollHeight),B0("pBind",e.ptm("listContainer"))("tabindex",-1),zB(),B0("ngIf",e.virtualScroll),zB(),B0("ngIf",!e.virtualScroll),zB(3),B0("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),zB(2),vb(" ",e.selectedMessageText," ");}}var mn=`
${Pe}

/* For PrimeNG */
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: dt('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: dt('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: dt('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: dt('autocomplete.invalid.placeholder.color');
}
`,hn={root:{position:"relative"}},_n={root:({instance:i})=>["p-autocomplete p-component p-inputwrapper",{"p-invalid":i.invalid(),"p-focus":i.focused,"p-inputwrapper-filled":i.$filled(),"p-inputwrapper-focus":i.focused&&!i.$disabled()||i.autofocus||i.overlayVisible,"p-autocomplete-open":i.overlayVisible,"p-autocomplete-clearable":i.showClear&&!i.$disabled(),"p-autocomplete-fluid":i.hasFluid}],pcInputText:"p-autocomplete-input",inputMultiple:({instance:i})=>["p-autocomplete-input-multiple",{"p-disabled":i.$disabled(),"p-variant-filled":i.$variant()==="filled"}],chipItem:({instance:i,i:p})=>["p-autocomplete-chip-item",{"p-focus":i.focusedMultipleOptionIndex()===p}],pcChip:"p-autocomplete-chip",chipIcon:"p-autocomplete-chip-icon",inputChip:"p-autocomplete-input-chip",loader:"p-autocomplete-loader",dropdown:"p-autocomplete-dropdown",overlay:({instance:i})=>["p-autocomplete-overlay p-component-overlay p-component",{"p-input-filled":i.$variant()==="filled","p-ripple-disabled":i.config.ripple()===false}],listContainer:"p-autocomplete-list-container",list:"p-autocomplete-list",optionGroup:"p-autocomplete-option-group",option:({instance:i,option:p,i:e,scrollerOptions:t})=>({"p-autocomplete-option":true,"p-autocomplete-option-selected":i.isSelected(p),"p-focus":i.focusedOptionIndex()===i.getOptionIndex(e,t),"p-disabled":i.isOptionDisabled(p)}),emptyMessage:"p-autocomplete-empty-message",clearIcon:"p-autocomplete-clear-icon"},Ge=(()=>{class i extends I{name="autocomplete";style=mn;classes=_n;inlineStyles=hn;static ɵfac=(()=>{let e;return function(n){return(e||(e=Uu(i)))(n||i);};})();static ɵprov=S({token:i,factory:i.ɵfac});}return i;})();var Qe=new A("AUTOCOMPLETE_INSTANCE"),gn={provide:D,useExisting:af(()=>je),multi:true},je=(()=>{class i extends Kr{overlayService;zone;componentName="AutoComplete";$pcAutoComplete=g(Qe,{optional:true,skipSelf:true})??void 0;bindDirectiveInstance=g(Z,{self:true});minLength=1;minQueryLength;delay=300;panelStyle;styleClass;panelStyleClass;inputStyle;inputId;inputStyleClass;placeholder;readonly;scrollHeight="200px";lazy=false;virtualScroll;virtualScrollItemSize;virtualScrollOptions;autoHighlight;forceSelection;type="text";autoZIndex=true;baseZIndex=0;ariaLabel;dropdownAriaLabel;ariaLabelledBy;dropdownIcon;unique=true;group;completeOnFocus=false;showClear=false;dropdown;showEmptyMessage=true;dropdownMode="blank";multiple;addOnTab=false;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();}optionLabel;optionValue;id;searchMessage;emptySelectionMessage;selectionMessage;autoOptionFocus=false;selectOnFocus;searchLocale;optionDisabled;focusOnHover=true;typeahead=true;addOnBlur=false;separator;appendTo=qp(void 0);motionOptions=qp(void 0);completeMethod=new kt$1();onSelect=new kt$1();onUnselect=new kt$1();onAdd=new kt$1();onFocus=new kt$1();onBlur=new kt$1();onDropdownClick=new kt$1();onClear=new kt$1();onInputKeydown=new kt$1();onKeyUp=new kt$1();onShow=new kt$1();onHide=new kt$1();onLazyLoad=new kt$1();inputEL;multiInputEl;multiContainerEL;dropdownButton;itemsViewChild;scroller;overlayViewChild;itemsWrapper;itemTemplate;emptyTemplate;headerTemplate;footerTemplate;selectedItemTemplate;groupTemplate;loaderTemplate;removeIconTemplate;loadingIconTemplate;clearIconTemplate;dropdownIconTemplate;onHostClick(e){this.onContainerClick(e);}value;_suggestions=Ye$1(null);timeout;overlayVisible;suggestionsUpdated;highlightOption;highlightOptionChanged;focused=false;loading;scrollHandler;listId;searchTimeout;dirty=false;_itemTemplate;_groupTemplate;_selectedItemTemplate;_headerTemplate;_emptyTemplate;_footerTemplate;_loaderTemplate;_removeIconTemplate;_loadingIconTemplate;_clearIconTemplate;_dropdownIconTemplate;focusedMultipleOptionIndex=Ye$1(-1);focusedOptionIndex=Ye$1(-1);_componentStyle=g(Ge);$appendTo=Ju(()=>this.appendTo()||this.config.overlayAppendTo());visibleOptions=Ju(()=>this.group?this.flatOptions(this._suggestions()):this._suggestions()||[]);inputValue=Ju(()=>{let e=this.modelValue(),t=this.optionValueSelected?(this.suggestions||[]).find(n=>sT(n,e,this.equalityKey())):e;if(iT(e)){if(typeof e=="object"||this.optionValueSelected){let n=this.getOptionLabel(t);return n??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 searchResultMessageText(){return iT(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(V0e.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});}constructor(e,t){super(),this.overlayService=e,this.zone=t;}onInit(){this.id=this.id||Wt$1("pn_id_"),this.cd.detectChanges();}templates;onAfterContentInit(){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;}});}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"])),this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay();},1),this.suggestionsUpdated=false;});}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=true,this.loading=false,this.cd.markForCheck();}}flatOptions(e){return(e||[]).reduce((t,n,o)=>{t.push({optionGroup:n,group:true,index:o});let l=this.getOptionGroupChildren(n);return l&&l.forEach(f=>t.push(f)),t;},[]);}isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group;}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e));}findLastOptionIndex(){return C0e(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 t=e<this.visibleOptions().length-1?this.visibleOptions().slice(e+1).findIndex(n=>this.isValidOption(n)):-1;return t>-1?t+e+1:e;}findPrevOptionIndex(e){let t=e>0?C0e(this.visibleOptions().slice(0,e),n=>this.isValidOption(n)):-1;return t>-1?t: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?im(e,this.optionDisabled):false;}isSelected(e){return this.multiple?this.unique?this.modelValue()?.some(t=>sT(t,e,this.equalityKey())):false:sT(this.modelValue(),e,this.equalityKey());}isOptionMatched(e,t){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===t.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):false;}equalityKey(){return this.optionValue?void 0:this.dataKey;}onContainerClick(e){this.$disabled()||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||(!this.overlayViewChild||!this.overlayViewChild.overlayViewChild?.nativeElement.contains(e.target))&&xi(this.inputEL?.nativeElement);}handleDropdownClick(e){let t;this.overlayVisible?this.hide(true):(xi(this.inputEL?.nativeElement),t=this.inputEL?.nativeElement?.value,this.dropdownMode==="blank"?this.search(e,"","dropdown"):this.dropdownMode==="current"&&this.search(e,t,"dropdown")),this.onDropdownClick.emit({originalEvent:e,query:t});}onInput(e){if(this.typeahead){let t=this.minQueryLength||this.minLength;this.searchTimeout&&clearTimeout(this.searchTimeout);let n=e.target.value;this.maxlength()!==null&&(n=n.split("").slice(0,this.maxlength()).join("")),!this.multiple&&!this.forceSelection&&this.updateModel(n),n.length===0&&!this.multiple?(this.onClear.emit(),setTimeout(()=>{this.hide();},this.delay/2)):n.length>=t?(this.focusedOptionIndex.set(-1),this.searchTimeout=setTimeout(()=>{this.search(e,n,"input");},this.delay)):this.hide();}}onInputChange(e){this.updateInputWithForceSelection(e);}onInputFocus(e){if(this.$disabled())return;!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=true,this.focused=true;let t=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(t),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e);}onMultipleContainerFocus(e){this.$disabled()||(this.focused=true);}onMultipleContainerBlur(e){this.focusedMultipleOptionIndex.set(-1),this.focused=false;}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;}}onInputBlur(e){if(this.dirty=false,this.focused=false,this.focusedOptionIndex.set(-1),this.addOnBlur&&this.multiple&&!this.typeahead){let t=(this.multiInputEl?.nativeElement?.value||e.target.value||"").trim();t&&!this.isSelected(t)&&(this.updateModel([...(this.modelValue()||[]),t]),this.onAdd.emit({originalEvent:e,value:t}),this.multiInputEl?.nativeElement?this.multiInputEl.nativeElement.value="":e.target.value="");}this.onModelTouched(),this.onBlur.emit(e);}onInputPaste(e){if(this.separator&&this.multiple&&!this.typeahead){let t=(e.clipboardData||window.clipboardData)?.getData("Text");if(t){let n=t.split(this.separator),o=[...(this.modelValue()||[])];if(n.forEach(l=>{let f=l.trim();f&&!this.isSelected(f)&&o.push(f);}),o.length>(this.modelValue()||[]).length){let l=o.slice((this.modelValue()||[]).length);this.updateModel(o),l.forEach(f=>{this.onAdd.emit({originalEvent:e,value:f});}),this.multiInputEl?.nativeElement?this.multiInputEl.nativeElement.value="":e.target.value="",e.preventDefault();}}}else this.onKeyDown(e);}onInputKeyUp(e){this.onKeyUp.emit(e);}onKeyDown(e){if(this.$disabled()){e.preventDefault();return;}switch(this.onInputKeydown.emit(e),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:this.handleSeparatorKey(e);break;}}handleSeparatorKey(e){if(this.separator&&this.multiple&&!this.typeahead&&(this.separator===e.key||typeof this.separator=="string"&&e.key===this.separator||this.separator instanceof RegExp&&e.key.match(this.separator))){let t=(this.multiInputEl?.nativeElement?.value||e.target.value||"").trim();t&&!this.isSelected(t)&&(this.updateModel([...(this.modelValue()||[]),t]),this.onAdd.emit({originalEvent:e,value:t}),this.multiInputEl?.nativeElement?this.multiInputEl.nativeElement.value="":e.target.value="",e.preventDefault());}}onArrowDownKey(e){if(!this.overlayVisible)return;let t=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),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 t=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault(),e.stopPropagation();}}onArrowLeftKey(e){let t=e.currentTarget;this.focusedOptionIndex.set(-1),this.multiple&&(jz(t.value)&&this.hasSelectedOption()?(xi(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:t}=e,n=t.value.length;t.setSelectionRange(0,e.shiftKey?n:0),this.focusedOptionIndex.set(-1),e.preventDefault();}onEndKey(e){let{currentTarget:t}=e,n=t.value.length;t.setSelectionRange(e.shiftKey?0:n,n),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){if(!this.typeahead&&!this.forceSelection&&this.multiple){let t=e.target.value?.trim();t&&!this.isSelected(t)&&(this.updateModel([...(this.modelValue()||[]),t]),this.onAdd.emit({originalEvent:e,value:t}),this.inputEL?.nativeElement&&(this.inputEL.nativeElement.value=""));}if(this.overlayVisible)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.hide();else return;e.preventDefault();}onEscapeKey(e){this.overlayVisible&&this.hide(true),e.preventDefault();}onTabKey(e){if(this.focusedOptionIndex()!==-1){this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]);return;}if(this.multiple&&!this.typeahead){let t=(this.multiInputEl?.nativeElement?.value||this.inputEL?.nativeElement?.value||"").trim();if(this.addOnTab&&t&&!this.isSelected(t)){this.updateModel([...(this.modelValue()||[]),t]),this.onAdd.emit({originalEvent:e,value:t}),this.multiInputEl?.nativeElement?this.multiInputEl.nativeElement.value="":this.inputEL?.nativeElement&&(this.inputEL.nativeElement.value=""),this.updateInputValue(),e.preventDefault(),this.overlayVisible&&this.hide();return;}}this.overlayVisible&&this.hide();}onBackspaceKey(e){if(this.multiple){if(iT(this.modelValue())&&!this.inputEL?.nativeElement?.value){let t=this.modelValue()[this.modelValue().length-1],n=this.modelValue().slice(0,-1);this.updateModel(n),this.onUnselect.emit({originalEvent:e,value:t});}e.stopPropagation();}}onArrowLeftKeyOnMultiple(e){let t=this.focusedMultipleOptionIndex()<1?0:this.focusedMultipleOptionIndex()-1;this.focusedMultipleOptionIndex.set(t);}onArrowRightKeyOnMultiple(e){let t=this.focusedMultipleOptionIndex();t++,this.focusedMultipleOptionIndex.set(t),t>this.modelValue().length-1&&(this.focusedMultipleOptionIndex.set(-1),xi(this.inputEL?.nativeElement));}onBackspaceKeyOnMultiple(e){this.focusedMultipleOptionIndex()!==-1&&this.removeOption(e,this.focusedMultipleOptionIndex());}onOptionSelect(e,t,n=true){this.multiple?(this.inputEL?.nativeElement&&(this.inputEL.nativeElement.value=""),this.isSelected(t)||this.updateModel([...(this.modelValue()||[]),t])):this.updateModel(t),this.onSelect.emit({originalEvent:e,value:t}),n&&this.hide(true);}onOptionMouseEnter(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t);}search(e,t,n){t!=null&&(n==="input"&&t.trim().length===0||(this.loading=true,this.completeMethod.emit({originalEvent:e,query:t})));}removeOption(e,t){e.stopPropagation();let n=this.modelValue()[t],o=this.modelValue().filter((l,f)=>f!==t);this.updateModel(o),this.onUnselect.emit({originalEvent:e,value:n}),xi(this.inputEL?.nativeElement);}updateModel(e){let t=null;e&&(t=this.multiple?e.map(n=>this.getOptionValue(n)):this.getOptionValue(e)),this.value=t,this.writeModelValue(e),this.onModelChange(t),this.updateInputValue(),this.cd.markForCheck();}updateInputValue(){this.inputEL&&this.inputEL.nativeElement&&(this.multiple?this.inputEL.nativeElement.value="":this.inputEL.nativeElement.value=this.inputValue());}updateInputWithForceSelection(e){let t=this.inputEL?.nativeElement,n=!t?.value&&iT(this.modelValue());if(!this.forceSelection||this.overlayVisible||!t?.value&&!n)return;let o=this.minQueryLength??this.minLength;if(!n&&t.value.length<o)return;let l=this.visibleOptions()?.find(f=>this.isOptionMatched(f,t.value));if(!l){t.value="",this.multiple||this.clear();return;}l&&!this.isSelected(l)&&this.onOptionSelect(e,l);}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()],false);}}scrollInView(e=-1){let t=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let n=wi(this.itemsViewChild.nativeElement,`li[id="${t}"]`);n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex());},0);}}changeFocusedOptionIndex(e,t){this.focusedOptionIndex()!==t&&(this.focusedOptionIndex.set(t),this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions()[t],false));}show(e=false){this.dirty=true,this.overlayVisible=true;let t=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(t),e&&xi(this.inputEL?.nativeElement),e&&xi(this.inputEL?.nativeElement),this.onShow.emit(),this.cd.markForCheck();}hide(e=false){let t=()=>{this.dirty=e,this.overlayVisible=false,this.focusedOptionIndex.set(-1),e&&xi(this.inputEL?.nativeElement),this.onHide.emit(),this.updateInputWithForceSelection(null),this.cd.markForCheck();};setTimeout(()=>{t();},0);}clear(){this.updateModel(null),this.inputEL?.nativeElement&&(this.inputEL.nativeElement.value=""),this.onClear.emit();}hasSelectedOption(){return iT(this.modelValue());}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(t=>this.isOptionGroup(t)).length:e)+1;}getOptionLabel(e){return this.optionLabel?im(e,this.optionLabel):e&&e.label!=null?e.label:e;}getOptionValue(e){return this.optionValue?im(e,this.optionValue):e&&e.value!=null?e.value:e;}getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t.getItemOptions(e).index;}getOptionGroupLabel(e){return this.optionGroupLabel?im(e,this.optionGroupLabel):e&&e.label!=null?e.label:e;}getOptionGroupChildren(e){return this.optionGroupChildren?im(e,this.optionGroupChildren):e.items;}getPTOptions(e,t,n,o){return this.ptm(o,{context:{option:e,index:this.getOptionIndex(n,t),selected:this.isSelected(e),focused:this.focusedOptionIndex()===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}});}onOverlayBeforeEnter(){if(this.itemsWrapper=wi(this.overlayViewChild.overlayViewChild?.nativeElement,this.virtualScroll?'[data-pc-name="virtualscroller"]':'[data-pc-name="pcoverlay"]'),this.virtualScroll&&(this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.scroller?.viewInit()),this.visibleOptions()&&this.visibleOptions().length)if(this.virtualScroll){let e=this.modelValue()?this.focusedOptionIndex():-1;e!==-1&&this.scroller?.scrollToIndex(e);}else{let e=wi(this.itemsWrapper,'[data-pc-section="option"][data-p-selected="true"]');e&&e.scrollIntoView({block:"nearest",inline:"center"});}}get containerDataP(){return this.cn({fluid:this.hasFluid});}get overlayDataP(){return this.cn({[`overlay-${this.$appendTo()}`]:true});}get inputMultipleDataP(){return this.cn({invalid:this.invalid(),disabled:this.$disabled(),focus:this.focused,fluid:this.hasFluid,filled:this.$variant()==="filled",empty:!this.$filled(),[this.size()]:this.size()});}writeControlValue(e,t){if(this.multiple){let n=(e||[]).map(o=>this.visibleOptions().find(f=>sT(o,f,this.equalityKey()))??o);t(jz(e)?e:n);}else{let n=this.visibleOptions().find(o=>sT(e,o,this.equalityKey()));t(jz(n)?e:n);}this.value=e,this.updateInputValue(),this.cd.markForCheck();}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null);}static ɵfac=function(t){return new(t||i)(ce(F0e),ce(ie));};static ɵcmp=Pa({type:i,selectors:[["p-autoComplete"],["p-autocomplete"],["p-auto-complete"]],contentQueries:function(t,n,o){if(t&1&&Hp(o,We,5)(o,Ze,5)(o,Je,5)(o,Xe,5)(o,Ye,5)(o,et,5)(o,tt,5)(o,nt,5)(o,it,5)(o,ot,5)(o,lt,5)(o,H0e,4),t&2){let l;gb(l=yb())&&(n.itemTemplate=l.first),gb(l=yb())&&(n.emptyTemplate=l.first),gb(l=yb())&&(n.headerTemplate=l.first),gb(l=yb())&&(n.footerTemplate=l.first),gb(l=yb())&&(n.selectedItemTemplate=l.first),gb(l=yb())&&(n.groupTemplate=l.first),gb(l=yb())&&(n.loaderTemplate=l.first),gb(l=yb())&&(n.removeIconTemplate=l.first),gb(l=yb())&&(n.loadingIconTemplate=l.first),gb(l=yb())&&(n.clearIconTemplate=l.first),gb(l=yb())&&(n.dropdownIconTemplate=l.first),gb(l=yb())&&(n.templates=l);}},viewQuery:function(t,n){if(t&1&&lx(at,5)(pt,5)(rt,5)(st,5)(ct,5)(ut,5)(dt,5),t&2){let o;gb(o=yb())&&(n.inputEL=o.first),gb(o=yb())&&(n.multiInputEl=o.first),gb(o=yb())&&(n.multiContainerEL=o.first),gb(o=yb())&&(n.dropdownButton=o.first),gb(o=yb())&&(n.itemsViewChild=o.first),gb(o=yb())&&(n.scroller=o.first),gb(o=yb())&&(n.overlayViewChild=o.first);}},hostVars:5,hostBindings:function(t,n){t&1&&Fp("click",function(l){return n.onHostClick(l);}),t&2&&(Lp("data-p",n.containerDataP),FV(n.sx("root")),BV(n.cn(n.cx("root"),n.styleClass)));},inputs:{minLength:[2,"minLength","minLength",J$],minQueryLength:[2,"minQueryLength","minQueryLength",J$],delay:[2,"delay","delay",J$],panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",readonly:[2,"readonly","readonly",tl],scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",tl],virtualScroll:[2,"virtualScroll","virtualScroll",tl],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",J$],virtualScrollOptions:"virtualScrollOptions",autoHighlight:[2,"autoHighlight","autoHighlight",tl],forceSelection:[2,"forceSelection","forceSelection",tl],type:"type",autoZIndex:[2,"autoZIndex","autoZIndex",tl],baseZIndex:[2,"baseZIndex","baseZIndex",J$],ariaLabel:"ariaLabel",dropdownAriaLabel:"dropdownAriaLabel",ariaLabelledBy:"ariaLabelledBy",dropdownIcon:"dropdownIcon",unique:[2,"unique","unique",tl],group:[2,"group","group",tl],completeOnFocus:[2,"completeOnFocus","completeOnFocus",tl],showClear:[2,"showClear","showClear",tl],dropdown:[2,"dropdown","dropdown",tl],showEmptyMessage:[2,"showEmptyMessage","showEmptyMessage",tl],dropdownMode:"dropdownMode",multiple:[2,"multiple","multiple",tl],addOnTab:[2,"addOnTab","addOnTab",tl],tabindex:[2,"tabindex","tabindex",J$],dataKey:"dataKey",emptyMessage:"emptyMessage",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autofocus:[2,"autofocus","autofocus",tl],autocomplete:"autocomplete",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",overlayOptions:"overlayOptions",suggestions:"suggestions",optionLabel:"optionLabel",optionValue:"optionValue",id:"id",searchMessage:"searchMessage",emptySelectionMessage:"emptySelectionMessage",selectionMessage:"selectionMessage",autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",tl],selectOnFocus:[2,"selectOnFocus","selectOnFocus",tl],searchLocale:[2,"searchLocale","searchLocale",tl],optionDisabled:"optionDisabled",focusOnHover:[2,"focusOnHover","focusOnHover",tl],typeahead:[2,"typeahead","typeahead",tl],addOnBlur:[2,"addOnBlur","addOnBlur",tl],separator:"separator",appendTo:[1,"appendTo"],motionOptions:[1,"motionOptions"]},outputs:{completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect",onAdd:"onAdd",onFocus:"onFocus",onBlur:"onBlur",onDropdownClick:"onDropdownClick",onClear:"onClear",onInputKeydown:"onInputKeydown",onKeyUp:"onKeyUp",onShow:"onShow",onHide:"onHide",onLazyLoad:"onLazyLoad"},features:[c$([gn,Ge,{provide:Qe,useExisting:i},{provide:ge,useExisting:i}]),Pj([Z]),I0],decls:9,vars:14,consts:[["overlay",""],["content",""],["focusInput",""],["multiContainer",""],["focusInput","","multiIn",""],["token",""],["removeicon",""],["ddBtn",""],["buildInItems",""],["scroller",""],["loader",""],["items",""],["empty",""],["pInputText","","aria-autocomplete","list","role","combobox",3,"pAutoFocus","pt","class","ngStyle","variant","invalid","pSize","fluid","pInputTextUnstyled","input","keydown","change","focus","blur","paste","keyup",4,"ngIf"],[4,"ngIf"],["role","listbox",3,"pBind","class","tabindex","focus","blur","keydown",4,"ngIf"],["type","button","pRipple","",3,"pBind","class","disabled","click",4,"ngIf"],[3,"visibleChange","onBeforeEnter","onHide","hostAttrSelector","visible","options","target","appendTo","unstyled","pt","motionOptions"],["pInputText","","aria-autocomplete","list","role","combobox",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","pt","ngStyle","variant","invalid","pSize","fluid","pInputTextUnstyled"],["data-p-icon","times",3,"pBind","class","click",4,"ngIf"],[3,"pBind","class","click",4,"ngIf"],["data-p-icon","times",3,"click","pBind"],[3,"click","pBind"],[4,"ngTemplateOutlet"],["role","listbox",3,"focus","blur","keydown","pBind","tabindex"],["role","option",3,"pBind","class",4,"ngFor","ngForOf"],["role","option",3,"pBind"],["role","combobox","aria-autocomplete","list",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","pBind","ngStyle"],[3,"onRemove","pt","label","disabled","removable","unstyled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"pBind",4,"ngIf"],["data-p-icon","times-circle"],[3,"pBind"],["data-p-icon","spinner",3,"pBind","class","spin",4,"ngIf"],[3,"pBind","class",4,"ngIf"],["data-p-icon","spinner",3,"pBind","spin"],["type","button","pRipple","",3,"click","pBind","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","chevron-down",3,"pBind",4,"ngIf"],["data-p-icon","chevron-down",3,"pBind"],[3,"pBind","ngStyle"],[3,"pBind","tabindex"],[3,"tabindex","pt","items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["role","status","aria-live","polite",1,"p-hidden-accessible"],[3,"onLazyLoad","tabindex","pt","items","itemSize","autoSize","lazy","options"],["role","listbox",3,"pBind"],["ngFor","",3,"ngForOf"],["role","option",3,"pBind","class","ngStyle",4,"ngIf"],["role","option",3,"pBind","ngStyle"],["pRipple","","role","option",3,"click","mouseenter","pBind","ngStyle"],[4,"ngIf","ngIfElse"]],template:function(t,n){if(t&1){let o=k2();_0(0,xt,2,32,"input",13)(1,Ct,3,2,"ng-container",14)(2,At,7,37,"ul",15)(3,Kt,3,2,"ng-container",14)(4,Pt,4,8,"button",16),sp(5,"p-overlay",17,0),Mx("visibleChange",function(f){return $I(o),e$(n.overlayVisible,f)||(n.overlayVisible=f),GI(f);}),Fp("onBeforeEnter",function(){return n.onOverlayBeforeEnter();})("onHide",function(){return n.hide();}),_0(7,dn,10,15,"ng-template",null,1,D$),ub();}t&2&&(B0("ngIf",!n.multiple),zB(),B0("ngIf",n.$filled()&&!n.$disabled()&&n.showClear&&!n.loading),zB(),B0("ngIf",n.multiple),zB(),B0("ngIf",n.loading),zB(),B0("ngIf",n.dropdown),zB(),B0("hostAttrSelector",n.$attrSelector),Nx("visible",n.overlayVisible),B0("options",n.overlayOptions)("target","@parent")("appendTo",n.$appendTo())("unstyled",n.unstyled())("pt",n.ptm("pcOverlay"))("motionOptions",n.motionOptions()),Lp("data-p",n.overlayDataP));},dependencies:[cl,w3,RA,x3,R3,A3,Ii,us,co,nn$1,Sr,ae,Ht$1,Kn,Xe$1,j0e,rr,qo,Z],encapsulation:2});}return i;})(),Zn=(()=>{class i{static ɵfac=function(t){return new(t||i)();};static ɵmod=Ln({type:i});static ɵinj=mn$1({imports:[je,j0e,j0e]});}return i;})();/**i18n:fad79908930cbb4c308e7550a5fe49bb3841dbb330066a6429aebaa006173605*/var U=(()=>{class t{inputId=qp.required();small=qp(false,{transform:tl});selectedItems=_pe([]);placeholder=_pe("Skriv inn en ny emneknagg");separator;ngOnInit(){i()&&(this.separator=",",this.placeholder.set("Bruk komma (,) for \xE5 legge til en emneknagg"));}propagateChange=e=>{};writeValue(e){this.selectedItems.set(e);}registerOnChange(e){this.propagateChange=e;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedItems());}static ɵfac=function(a){return new(a||t)();};static ɵcmp=Pa({type:t,selectors:[["my-select-tags"]],inputs:{inputId:[1,"inputId"],small:[1,"small"],selectedItems:[1,"selectedItems"],placeholder:[1,"placeholder"]},outputs:{selectedItems:"selectedItemsChange",placeholder:"placeholderChange"},features:[c$([{provide:D,useExisting:af(()=>t),multi:true}])],decls:1,vars:7,consts:[["multiple","true",1,"w-100",3,"ngModelChange","ngModel","placeholder","inputId","separator","typeahead"]],template:function(a,o){a&1&&(sp(0,"p-autoComplete",0),Mx("ngModelChange",function(l){return e$(o.selectedItems,l)||(o.selectedItems=l),l;}),Fp("ngModelChange",function(){return o.onModelChange();}),ub(),GH()),a&2&&(vx("small",o.small()),Nx("ngModel",o.selectedItems),B0("placeholder",o.placeholder())("inputId",o.inputId())("separator",o.separator)("typeahead",false),WH());},dependencies:[Zn,je,Jn,qn,ln$1],encapsulation:2,changeDetection:1});}return t;})();var j=t=>{if(!t.value)return null;let n=_xe(t.value);return n.every(e=>n.indexOf(e)===n.lastIndexOf(e))?null:{unique:{reason:"invalid"}};};/**i18n:fad79908930cbb4c308e7550a5fe49bb3841dbb330066a6429aebaa006173605*/export{U,Zn as Z,je as a,j};//# sourceMappingURL=chunk-DgsNRGqZ.js.map