import{O as te,P as re,S as ce,T as ae,U as y,W as se}from"./chunk-BJVL6ZJ5.js";import{$ as N,Aa as j,Ab as K,Da as s,Hb as v,Jb as c,Kb as O,Lb as Q,Mb as H,Mc as F,Mg as ne,Na as T,Ng as ie,Ob as D,Og as oe,Pb as A,Sa as z,Ta as k,Tb as Z,Ua as _,Wb as $,Wc as W,Xb as m,Yb as q,Yc as X,Z as L,Zb as G,_c as Y,ba as x,cb as f,fd as ee,ga as l,ha as d,ia as w,kc as U,mb as a,na as E,nb as g,ob as h,pb as R,qb as B,rb as V,sa as u,sb as S,tb as M,ub as P,xc as J,zb as C}from"./chunk-NY4TI4KT.js";import{i as p}from"./chunk-IQVXR75E.js";var fe=["data-p-icon","times-circle"],pe=(()=>{let r=class r extends se{pathId;onInit(){this.pathId="url(#"+te()+")"}};p(r,"\u0275fac",(()=>{let i;return function(o){return(i||(i=u(r)))(o||r)}})()),p(r,"\u0275cmp",T({type:r,selectors:[["","data-p-icon","times-circle"]],features:[k],attrs:fe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(w(),B(0,"g"),S(1,"path",0),V(),B(2,"defs")(3,"clipPath",1),S(4,"rect",2),V()()),n&2&&(f("clip-path",o.pathId),s(3),K("id",o.pathId))},encapsulation:2}));let t=r;return t})();var le=`
    .p-chip {
        display: inline-flex;
        align-items: center;
        background: dt('chip.background');
        color: dt('chip.color');
        border-radius: dt('chip.border.radius');
        padding-block: dt('chip.padding.y');
        padding-inline: dt('chip.padding.x');
        gap: dt('chip.gap');
    }

    .p-chip-icon {
        color: dt('chip.icon.color');
        font-size: dt('chip.icon.size');
        width: dt('chip.icon.size');
        height: dt('chip.icon.size');
    }

    .p-chip-image {
        border-radius: 50%;
        width: dt('chip.image.width');
        height: dt('chip.image.height');
        margin-inline-start: calc(-1 * dt('chip.padding.y'));
    }

    .p-chip:has(.p-chip-remove-icon) {
        padding-inline-end: dt('chip.padding.y');
    }

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

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

    .p-chip-remove-icon:focus-visible {
        box-shadow: dt('chip.remove.icon.focus.ring.shadow');
        outline: dt('chip.remove.icon.focus.ring.width') dt('chip.remove.icon.focus.ring.style') dt('chip.remove.icon.focus.ring.color');
        outline-offset: dt('chip.remove.icon.focus.ring.offset');
    }
`;var ge=["removeicon"],he=["*"];function ue(t,r){if(t&1){let e=C();g(0,"img",4),v("error",function(n){l(e);let o=c();return d(o.imageError(n))}),h()}if(t&2){let e=c();m(e.cx("image")),a("pBind",e.ptm("image"))("src",e.image,j)("alt",e.alt)}}function Ce(t,r){if(t&1&&R(0,"span",6),t&2){let e=c(2);m(e.icon),a("pBind",e.ptm("icon"))("ngClass",e.cx("icon"))}}function ve(t,r){if(t&1&&_(0,Ce,1,4,"span",5),t&2){let e=c();a("ngIf",e.icon)}}function ye(t,r){if(t&1&&(g(0,"div",7),q(1),h()),t&2){let e=c();m(e.cx("label")),a("pBind",e.ptm("label")),s(),G(e.label)}}function be(t,r){if(t&1){let e=C();g(0,"span",11),v("click",function(n){l(e);let o=c(3);return d(o.close(n))})("keydown",function(n){l(e);let o=c(3);return d(o.onKeydown(n))}),h()}if(t&2){let e=c(3);m(e.removeIcon),a("pBind",e.ptm("removeIcon"))("ngClass",e.cx("removeIcon")),f("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel)}}function Ie(t,r){if(t&1){let e=C();w(),g(0,"svg",12),v("click",function(n){l(e);let o=c(3);return d(o.close(n))})("keydown",function(n){l(e);let o=c(3);return d(o.onKeydown(n))}),h()}if(t&2){let e=c(3);m(e.cx("removeIcon")),a("pBind",e.ptm("removeIcon")),f("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel)}}function xe(t,r){if(t&1&&(M(0),_(1,be,1,6,"span",9)(2,Ie,1,5,"svg",10),P()),t&2){let e=c(2);s(),a("ngIf",e.removeIcon),s(),a("ngIf",!e.removeIcon)}}function we(t,r){}function Te(t,r){t&1&&_(0,we,0,0,"ng-template")}function ke(t,r){if(t&1){let e=C();g(0,"span",13),v("click",function(n){l(e);let o=c(2);return d(o.close(n))})("keydown",function(n){l(e);let o=c(2);return d(o.onKeydown(n))}),_(1,Te,1,0,null,14),h()}if(t&2){let e=c(2);m(e.cx("removeIcon")),a("pBind",e.ptm("removeIcon")),f("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel),s(),a("ngTemplateOutlet",e.removeIconTemplate||e._removeIconTemplate)}}function Ee(t,r){if(t&1&&(M(0),_(1,xe,3,2,"ng-container",3)(2,ke,2,6,"span",8),P()),t&2){let e=c();s(),a("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),s(),a("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}var Be={root:({instance:t})=>({display:!t.visible&&"none"})},Ve={root:({instance:t})=>["p-chip p-component",{"p-disabled":t.disabled}],image:"p-chip-image",icon:"p-chip-icon",label:"p-chip-label",removeIcon:"p-chip-remove-icon"},de=(()=>{let r=class r extends re{name="chip";style=le;classes=Ve;inlineStyles=Be};p(r,"\u0275fac",(()=>{let i;return function(o){return(i||(i=u(r)))(o||r)}})()),p(r,"\u0275prov",L({token:r,factory:r.\u0275fac}));let t=r;return t})();var me=new N("CHIP_INSTANCE"),nt=(()=>{let r=class r extends ae{componentName="Chip";$pcChip=x(me,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=x(y,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}label;icon;image;alt;styleClass;disabled=!1;removable=!1;removeIcon;onRemove=new E;onImageError=new E;visible=!0;get removeAriaLabel(){return this.config.getTranslation(oe.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(i){this._chipProps=i,i&&typeof i=="object"&&Object.entries(i).forEach(([n,o])=>this[`_${n}`]!==o&&(this[`_${n}`]=o))}_chipProps;_componentStyle=x(de);removeIconTemplate;templates;_removeIconTemplate;onAfterContentInit(){this.templates.forEach(i=>{i.getType()==="removeicon"?this._removeIconTemplate=i.template:this._removeIconTemplate=i.template})}onChanges(i){if(i.chipProps&&i.chipProps.currentValue){let{currentValue:n}=i.chipProps;n.label!==void 0&&(this.label=n.label),n.icon!==void 0&&(this.icon=n.icon),n.image!==void 0&&(this.image=n.image),n.alt!==void 0&&(this.alt=n.alt),n.styleClass!==void 0&&(this.styleClass=n.styleClass),n.removable!==void 0&&(this.removable=n.removable),n.removeIcon!==void 0&&(this.removeIcon=n.removeIcon)}}close(i){this.visible=!1,this.onRemove.emit(i)}onKeydown(i){(i.key==="Enter"||i.key==="Backspace")&&this.close(i)}imageError(i){this.onImageError.emit(i)}get dataP(){return this.cn({removable:this.removable})}};p(r,"\u0275fac",(()=>{let i;return function(o){return(i||(i=u(r)))(o||r)}})()),p(r,"\u0275cmp",T({type:r,selectors:[["p-chip"]],contentQueries:function(n,o,b){if(n&1&&H(b,ge,4)(b,ne,4),n&2){let I;D(I=A())&&(o.removeIconTemplate=I.first),D(I=A())&&(o.templates=I)}},hostVars:6,hostBindings:function(n,o){n&2&&(f("aria-label",o.label)("data-p",o.dataP),$(o.sx("root")),m(o.cn(o.cx("root"),o.styleClass)))},inputs:{label:"label",icon:"icon",image:"image",alt:"alt",styleClass:"styleClass",disabled:[2,"disabled","disabled",F],removable:[2,"removable","removable",F],removeIcon:"removeIcon",chipProps:"chipProps"},outputs:{onRemove:"onRemove",onImageError:"onImageError"},features:[U([de,{provide:me,useExisting:r},{provide:ce,useExisting:r}]),z([y]),k],ngContentSelectors:he,decls:6,vars:4,consts:[["iconTemplate",""],[3,"pBind","class","src","alt","error",4,"ngIf","ngIfElse"],[3,"pBind","class",4,"ngIf"],[4,"ngIf"],[3,"error","pBind","src","alt"],[3,"pBind","class","ngClass",4,"ngIf"],[3,"pBind","ngClass"],[3,"pBind"],["role","button",3,"pBind","class","click","keydown",4,"ngIf"],["role","button",3,"pBind","class","ngClass","click","keydown",4,"ngIf"],["data-p-icon","times-circle","role","button",3,"pBind","class","click","keydown",4,"ngIf"],["role","button",3,"click","keydown","pBind","ngClass"],["data-p-icon","times-circle","role","button",3,"click","keydown","pBind"],["role","button",3,"click","keydown","pBind"],[4,"ngTemplateOutlet"]],template:function(n,o){if(n&1&&(O(),Q(0),_(1,ue,1,5,"img",1)(2,ve,1,1,"ng-template",null,0,J)(4,ye,2,4,"div",2)(5,Ee,3,2,"ng-container",3)),n&2){let b=Z(3);s(),a("ngIf",o.image)("ngIfElse",b),s(3),a("ngIf",o.label),s(),a("ngIf",o.removable)}},dependencies:[ee,W,X,Y,pe,ie,y],encapsulation:2,changeDetection:0}));let t=r;return t})();export{pe as a,nt as b};
/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/
//# sourceMappingURL=chunk-J3MTDSU3.js.map
