import{Ab as Q,nb as Y,xb as K}from"./chunk-YSQLW2JA.js";import{fb as B,jb as X}from"./chunk-NVJ2ZZFT.js";import{$ as S,Aa as a,Ea as R,Ff as W,Gf as u,Hf as q,If as M,Ka as P,Na as T,Oa as E,Pa as x,Q as C,Ra as j,Sa as A,Va as g,W as _,_ as z,_a as G,be as O,ca as I,d as N,fb as $,gb as b,jf as U,kf as w,l as F,nf as D,r as p,vf as m,ya as y,zc as V}from"./chunk-SKPDQO4E.js";var Z=`<div class="w-100">
  <armon-select #select [multiselect]="multiselect" [hideChips]="hideChips" [notStoreSelection]="notStoreSelection" [minSearchLength]="1"
    [maxSearchLength]="20" uniqueField="id" descriptionField="fullname" responseField="items" [searchFunction]="searchIdentities" [listFunction]="listIdentities" [listIds]="listIds"
    [customSelection]="customSelection" [customPattern]="customPattern" [customList]="customList" [placeholder]="placeholder" [skipAvailable]="true"
    (itemSelected)="onItemSelected($event)" (itemRemoved)="onItemRemoved($event)" (listIdsLoaded)="onListIdsLoaded($event)" (optionsClosed)="onOptionsClosed($event)"></armon-select>
</div>`;var H="";var rt=function(r,e,t,s){var n=arguments.length,i=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,s);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(i=(n<3?l(i):n>3?l(e,t,i):l(e,t))||i);return n>3&&i&&Object.defineProperty(e,t,i),i},J=class extends K{identityService;hasMail;constructor(e){super(),this.identityService=e,this.searchIdentities=this.searchIdentities.bind(this),this.listIdentities=this.listIdentities.bind(this)}ngOnInit(){}searchIdentities(e,t){let s=new B;return s.profileFilter=e,s.skip=t,s.take=V.REQUEST_ITEM_LIMIT,this.hasMail&&(s.hasMail=this.hasMail),this.identityService.searchIdentities(s)}listIdentities(e){let t=new X;return t.skip=0,t.userIds=e,this.hasMail&&(t.hasMail=this.hasMail),this.identityService.listIdentities(t)}static ctorParameters=()=>[{type:Y}];static propDecorators={hasMail:[{type:a}]}};J=rt([y({selector:"armon-identity-search",template:Z,standalone:!0,imports:[Q],styles:[H]})],J);function nt(r){return+r.replace("%","")}var et=r=>{let e=[];return Object.keys(r).forEach(t=>{let s=r[t],n=nt(t);isNaN(n)||e.push({key:n,value:s})}),e=e.sort((t,s)=>t.key-s.key),e},ot=r=>et(r).map(({key:e,value:t})=>({offset:`${e}%`,color:t})),at=r=>{let i=r,{from:e="#1890ff",to:t="#1890ff",direction:s="to right"}=i,n=N(i,["from","to","direction"]);if(Object.keys(n).length!==0){let l=et(n).map(({key:c,value:h})=>`${h} ${c}%`).join(", ");return`linear-gradient(${s}, ${l})`}return`linear-gradient(${s}, ${e}, ${t})`},lt=0,tt="progress",ct=new Map([["success","check"],["exception","close"]]),pt=new Map([["normal","#108ee9"],["exception","#ff5500"],["success","#87d068"]]),dt=r=>`${r}%`,o=class r{get formatter(){return this.nzFormat||dt}get status(){return this.nzStatus||this.inferredStatus}get strokeWidth(){return this.nzStrokeWidth||(this.nzType==="line"&&this.nzSize!=="small"?8:6)}get isCircleStyle(){return this.nzType==="circle"||this.nzType==="dashboard"}constructor(e,t,s){this.cdr=e,this.nzConfigService=t,this.directionality=s,this._nzModuleName=tt,this.nzShowInfo=!0,this.nzWidth=132,this.nzStrokeColor=void 0,this.nzSize="default",this.nzPercent=0,this.nzStrokeWidth=void 0,this.nzGapDegree=void 0,this.nzType="line",this.nzGapPosition="top",this.nzStrokeLinecap="round",this.nzSteps=0,this.steps=[],this.lineGradient=null,this.isGradient=!1,this.isSteps=!1,this.gradientId=lt++,this.progressCirclePath=[],this.trailPathStyle=null,this.dir="ltr",this.cachedStatus="normal",this.inferredStatus="normal",this.destroy$=new F}ngOnChanges(e){let{nzSteps:t,nzGapPosition:s,nzStrokeLinecap:n,nzStrokeColor:i,nzGapDegree:l,nzType:c,nzStatus:h,nzPercent:d,nzSuccessPercent:f,nzStrokeWidth:k}=e;h&&(this.cachedStatus=this.nzStatus||this.cachedStatus),(d||f)&&(parseInt(this.nzPercent.toString(),10)>=100?(D(this.nzSuccessPercent)&&this.nzSuccessPercent>=100||this.nzSuccessPercent===void 0)&&(this.inferredStatus="success"):this.inferredStatus=this.cachedStatus),(h||d||f||i)&&this.updateIcon(),i&&this.setStrokeColor(),(s||n||l||c||d||i||i)&&this.getCirclePaths(),(d||t||k)&&(this.isSteps=this.nzSteps>0,this.isSteps&&this.getSteps())}ngOnInit(){this.nzConfigService.getConfigChangeEventForComponent(tt).pipe(C(this.destroy$)).subscribe(()=>{this.updateIcon(),this.setStrokeColor(),this.getCirclePaths()}),this.directionality.change?.pipe(C(this.destroy$)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}updateIcon(){let e=ct.get(this.status);this.icon=e?e+(this.isCircleStyle?"-o":"-circle-fill"):""}getSteps(){let e=Math.floor(this.nzSteps*(this.nzPercent/100)),t=this.nzSize==="small"?2:14,s=[];for(let n=0;n<this.nzSteps;n++){let i;n<=e-1&&(i=this.nzStrokeColor);let l={backgroundColor:`${i}`,width:`${t}px`,height:`${this.strokeWidth}px`};s.push(l)}this.steps=s}getCirclePaths(){if(!this.isCircleStyle)return;let e=D(this.nzSuccessPercent)?[this.nzSuccessPercent,this.nzPercent]:[this.nzPercent],t=50-this.strokeWidth/2,s=this.nzGapPosition||(this.nzType==="circle"?"top":"bottom"),n=Math.PI*2*t,i=this.nzGapDegree||(this.nzType==="circle"?0:75),l=0,c=-t,h=0,d=t*-2;switch(s){case"left":l=-t,c=0,h=t*2,d=0;break;case"right":l=t,c=0,h=t*-2,d=0;break;case"bottom":c=t,d=t*2;break;default:}this.pathString=`M 50,50 m ${l},${c}
       a ${t},${t} 0 1 1 ${h},${-d}
       a ${t},${t} 0 1 1 ${-h},${d}`,this.trailPathStyle={strokeDasharray:`${n-i}px ${n}px`,strokeDashoffset:`-${i/2}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"},this.progressCirclePath=e.map((f,k)=>{let v=e.length===2&&k===0;return{stroke:this.isGradient&&!v?`url(#gradient-${this.gradientId})`:null,strokePathStyle:{stroke:this.isGradient?null:v?pt.get("success"):this.nzStrokeColor,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",strokeDasharray:`${(f||0)/100*(n-i)}px ${n}px`,strokeDashoffset:`-${i/2}px`}}}).reverse()}setStrokeColor(){let e=this.nzStrokeColor,t=this.isGradient=!!e&&typeof e!="string";t&&!this.isCircleStyle?this.lineGradient=at(e):t&&this.isCircleStyle?this.circleGradient=ot(this.nzStrokeColor):(this.lineGradient=null,this.circleGradient=[])}static{this.\u0275fac=x({minVersion:"12.0.0",version:"17.3.8",ngImport:g,type:r,deps:[{token:P},{token:W},{token:O,optional:!0}],target:I.Component})}static{this.\u0275cmp=E({minVersion:"17.0.0",version:"17.3.8",type:r,isStandalone:!0,selector:"nz-progress",inputs:{nzShowInfo:"nzShowInfo",nzWidth:"nzWidth",nzStrokeColor:"nzStrokeColor",nzSize:"nzSize",nzFormat:"nzFormat",nzSuccessPercent:"nzSuccessPercent",nzPercent:"nzPercent",nzStrokeWidth:"nzStrokeWidth",nzGapDegree:"nzGapDegree",nzStatus:"nzStatus",nzType:"nzType",nzGapPosition:"nzGapPosition",nzStrokeLinecap:"nzStrokeLinecap",nzSteps:"nzSteps"},exportAs:["nzProgress"],usesOnChanges:!0,ngImport:g,template:`
    <ng-template #progressInfoTemplate>
      @if (nzShowInfo) {
        <span class="ant-progress-text">
          @if ((status === 'exception' || status === 'success') && !nzFormat) {
            <span nz-icon [nzType]="icon"></span>
          } @else {
            <ng-container *nzStringTemplateOutlet="formatter; context: { $implicit: nzPercent }; let formatter">
              {{ formatter(nzPercent) }}
            </ng-container>
          }
        </span>
      }
    </ng-template>

    <div
      [ngClass]="'ant-progress ant-progress-status-' + status"
      [class.ant-progress-line]="nzType === 'line'"
      [class.ant-progress-small]="nzSize === 'small'"
      [class.ant-progress-default]="nzSize === 'default'"
      [class.ant-progress-show-info]="nzShowInfo"
      [class.ant-progress-circle]="isCircleStyle"
      [class.ant-progress-steps]="isSteps"
      [class.ant-progress-rtl]="dir === 'rtl'"
    >
      @if (nzType === 'line') {
        <div>
          <!-- normal line style -->
          @if (isSteps) {
            <div class="ant-progress-steps-outer">
              @for (step of steps; track step) {
                <div class="ant-progress-steps-item" [ngStyle]="step"></div>
              }
              <ng-template [ngTemplateOutlet]="progressInfoTemplate" />
            </div>
          } @else {
            <div class="ant-progress-outer">
              <div class="ant-progress-inner">
                <div
                  class="ant-progress-bg"
                  [style.width.%]="nzPercent"
                  [style.border-radius]="nzStrokeLinecap === 'round' ? '100px' : '0'"
                  [style.background]="!isGradient ? nzStrokeColor : null"
                  [style.background-image]="isGradient ? lineGradient : null"
                  [style.height.px]="strokeWidth"
                ></div>
                @if (nzSuccessPercent || nzSuccessPercent === 0) {
                  <div
                    class="ant-progress-success-bg"
                    [style.width.%]="nzSuccessPercent"
                    [style.border-radius]="nzStrokeLinecap === 'round' ? '100px' : '0'"
                    [style.height.px]="strokeWidth"
                  ></div>
                }
              </div>
            </div>
            <ng-template [ngTemplateOutlet]="progressInfoTemplate" />
          }
        </div>
      }
      <!-- line progress -->

      <!-- circle / dashboard progress -->

      @if (isCircleStyle) {
        <div
          [style.width.px]="this.nzWidth"
          [style.height.px]="this.nzWidth"
          [style.fontSize.px]="this.nzWidth * 0.15 + 6"
          class="ant-progress-inner"
          [class.ant-progress-circle-gradient]="isGradient"
        >
          <svg class="ant-progress-circle " viewBox="0 0 100 100">
            @if (isGradient) {
              <defs>
                <linearGradient [id]="'gradient-' + gradientId" x1="100%" y1="0%" x2="0%" y2="0%">
                  @for (i of circleGradient; track i) {
                    <stop [attr.offset]="i.offset" [attr.stop-color]="i.color"></stop>
                  }
                </linearGradient>
              </defs>
            }

            <path
              class="ant-progress-circle-trail"
              stroke="#f3f3f3"
              fill-opacity="0"
              [attr.stroke-width]="strokeWidth"
              [attr.d]="pathString"
              [ngStyle]="trailPathStyle"
            ></path>
            @for (p of progressCirclePath; track p) {
              <path
                class="ant-progress-circle-path"
                fill-opacity="0"
                [attr.d]="pathString"
                [attr.stroke-linecap]="nzStrokeLinecap"
                [attr.stroke]="p.stroke"
                [attr.stroke-width]="nzPercent ? strokeWidth : 0"
                [ngStyle]="p.strokePathStyle"
              ></path>
            }
          </svg>
          <ng-template [ngTemplateOutlet]="progressInfoTemplate" />
        </div>
      }
    </div>
  `,isInline:!0,dependencies:[{kind:"ngmodule",type:M},{kind:"directive",type:q,selector:"[nz-icon]",inputs:["nzSpin","nzRotate","nzType","nzTheme","nzTwotoneColor","nzIconfont"],exportAs:["nzIcon"]},{kind:"ngmodule",type:w},{kind:"directive",type:U,selector:"[nzStringTemplateOutlet]",inputs:["nzStringTemplateOutletContext","nzStringTemplateOutlet"],exportAs:["nzStringTemplateOutlet"]},{kind:"directive",type:G,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:b,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:$,selector:"[ngStyle]",inputs:["ngStyle"]}],changeDetection:z.OnPush,encapsulation:S.None})}};p([u()],o.prototype,"nzShowInfo",void 0);p([u()],o.prototype,"nzStrokeColor",void 0);p([u()],o.prototype,"nzSize",void 0);p([m()],o.prototype,"nzSuccessPercent",void 0);p([m()],o.prototype,"nzPercent",void 0);p([u(),m()],o.prototype,"nzStrokeWidth",void 0);p([u(),m()],o.prototype,"nzGapDegree",void 0);p([u()],o.prototype,"nzGapPosition",void 0);p([u()],o.prototype,"nzStrokeLinecap",void 0);p([m()],o.prototype,"nzSteps",void 0);T({minVersion:"12.0.0",version:"17.3.8",ngImport:g,type:o,decorators:[{type:y,args:[{changeDetection:z.OnPush,encapsulation:S.None,selector:"nz-progress",exportAs:"nzProgress",preserveWhitespaces:!1,standalone:!0,imports:[M,w,G,b,$],template:`
    <ng-template #progressInfoTemplate>
      @if (nzShowInfo) {
        <span class="ant-progress-text">
          @if ((status === 'exception' || status === 'success') && !nzFormat) {
            <span nz-icon [nzType]="icon"></span>
          } @else {
            <ng-container *nzStringTemplateOutlet="formatter; context: { $implicit: nzPercent }; let formatter">
              {{ formatter(nzPercent) }}
            </ng-container>
          }
        </span>
      }
    </ng-template>

    <div
      [ngClass]="'ant-progress ant-progress-status-' + status"
      [class.ant-progress-line]="nzType === 'line'"
      [class.ant-progress-small]="nzSize === 'small'"
      [class.ant-progress-default]="nzSize === 'default'"
      [class.ant-progress-show-info]="nzShowInfo"
      [class.ant-progress-circle]="isCircleStyle"
      [class.ant-progress-steps]="isSteps"
      [class.ant-progress-rtl]="dir === 'rtl'"
    >
      @if (nzType === 'line') {
        <div>
          <!-- normal line style -->
          @if (isSteps) {
            <div class="ant-progress-steps-outer">
              @for (step of steps; track step) {
                <div class="ant-progress-steps-item" [ngStyle]="step"></div>
              }
              <ng-template [ngTemplateOutlet]="progressInfoTemplate" />
            </div>
          } @else {
            <div class="ant-progress-outer">
              <div class="ant-progress-inner">
                <div
                  class="ant-progress-bg"
                  [style.width.%]="nzPercent"
                  [style.border-radius]="nzStrokeLinecap === 'round' ? '100px' : '0'"
                  [style.background]="!isGradient ? nzStrokeColor : null"
                  [style.background-image]="isGradient ? lineGradient : null"
                  [style.height.px]="strokeWidth"
                ></div>
                @if (nzSuccessPercent || nzSuccessPercent === 0) {
                  <div
                    class="ant-progress-success-bg"
                    [style.width.%]="nzSuccessPercent"
                    [style.border-radius]="nzStrokeLinecap === 'round' ? '100px' : '0'"
                    [style.height.px]="strokeWidth"
                  ></div>
                }
              </div>
            </div>
            <ng-template [ngTemplateOutlet]="progressInfoTemplate" />
          }
        </div>
      }
      <!-- line progress -->

      <!-- circle / dashboard progress -->

      @if (isCircleStyle) {
        <div
          [style.width.px]="this.nzWidth"
          [style.height.px]="this.nzWidth"
          [style.fontSize.px]="this.nzWidth * 0.15 + 6"
          class="ant-progress-inner"
          [class.ant-progress-circle-gradient]="isGradient"
        >
          <svg class="ant-progress-circle " viewBox="0 0 100 100">
            @if (isGradient) {
              <defs>
                <linearGradient [id]="'gradient-' + gradientId" x1="100%" y1="0%" x2="0%" y2="0%">
                  @for (i of circleGradient; track i) {
                    <stop [attr.offset]="i.offset" [attr.stop-color]="i.color"></stop>
                  }
                </linearGradient>
              </defs>
            }

            <path
              class="ant-progress-circle-trail"
              stroke="#f3f3f3"
              fill-opacity="0"
              [attr.stroke-width]="strokeWidth"
              [attr.d]="pathString"
              [ngStyle]="trailPathStyle"
            ></path>
            @for (p of progressCirclePath; track p) {
              <path
                class="ant-progress-circle-path"
                fill-opacity="0"
                [attr.d]="pathString"
                [attr.stroke-linecap]="nzStrokeLinecap"
                [attr.stroke]="p.stroke"
                [attr.stroke-width]="nzPercent ? strokeWidth : 0"
                [ngStyle]="p.strokePathStyle"
              ></path>
            }
          </svg>
          <ng-template [ngTemplateOutlet]="progressInfoTemplate" />
        </div>
      }
    </div>
  `}]}],ctorParameters:()=>[{type:P},{type:W},{type:O,decorators:[{type:_}]}],propDecorators:{nzShowInfo:[{type:a}],nzWidth:[{type:a}],nzStrokeColor:[{type:a}],nzSize:[{type:a}],nzFormat:[{type:a}],nzSuccessPercent:[{type:a}],nzPercent:[{type:a}],nzStrokeWidth:[{type:a}],nzGapDegree:[{type:a}],nzStatus:[{type:a}],nzType:[{type:a}],nzGapPosition:[{type:a}],nzStrokeLinecap:[{type:a}],nzSteps:[{type:a}]}});var L=class r{static{this.\u0275fac=x({minVersion:"12.0.0",version:"17.3.8",ngImport:g,type:r,deps:[],target:I.NgModule})}static{this.\u0275mod=A({minVersion:"14.0.0",version:"17.3.8",ngImport:g,type:r,imports:[o],exports:[o]})}static{this.\u0275inj=j({minVersion:"12.0.0",version:"17.3.8",ngImport:g,type:r,imports:[o]})}};T({minVersion:"12.0.0",version:"17.3.8",ngImport:g,type:L,decorators:[{type:R,args:[{imports:[o],exports:[o]}]}]});export{J as a,o as b,L as c};
