import{a as R}from"./chunk-MJMWESWV.js";import{c as f,d as x}from"./chunk-P5KJQMC2.js";import{c as $,f as v}from"./chunk-PT2SMVM6.js";import{c as a,d as j}from"./chunk-PBM4LEG7.js";import{Lb as L,Md as N,Nb as o,Sd as q,dd as I,nd as g,qa as z,ra as B,va as O,yb as m}from"./chunk-PGS4AHIT.js";j();g();j();g();v();var T=(()=>{class r{constructor(t){this.translate=t}formatElapsedTimeDigits(t,e){let i=Math.floor(t/1e3),s=Math.floor(i/60),F=Math.floor(s/60),P=Math.floor(F/24),M=Math.floor(P/30),D=Math.floor(M/12),b=i%60,C=s%60,n=a.zeroPadBefore(a.numToStr(F),2),c=a.zeroPadBefore(a.numToStr(C),2),p=a.zeroPadBefore(a.numToStr(b),2);switch(e){case"minutes":return`${n}:${c}`;case"full":default:return`${n}:${c}:${p}`}}formatElapsedTime(t,e="full",i="long",s=!1){let F=Math.floor(t/1e3),P=Math.floor(F/60),M=Math.floor(P/60),D=Math.floor(M/24),b=Math.floor(D/30),C=Math.floor(b/12),n=F%60,c=P%60,p=M%24,U=D%30,E=b%12,u=n&&s?"":this.translateUnit(n,"second",i),l=c&&s?"":this.translateUnit(c,"minute",i),h=p&&s?"":this.translateUnit(p,"hour",i),y=U&&s?"":this.translateUnit(U,"day",i),V=E&&s?"":this.translateUnit(E,"month",i),w=C&&s?"":this.translateUnit(C,"year",i);switch(e){case"seconds":return u;case"minutes":return n===0?`${l}`:`${l} ${u}`;case"hours":return c===0&&n===0?`${h}`:`${h} ${l} ${u}`;case"days":return p===0&&c===0&&n===0?`${y}`:`${y} ${h} ${l} ${u}`;case"months":return U===0&&p===0&&c===0&&n===0?`${V}`:`${V} ${y} ${h} ${l} ${u}`;case"years":return E===0&&U===0&&p===0&&c===0&&n===0?`${w}`:`${w} ${V} ${y} ${h} ${l} ${u}`;case"=years":return w;case"=months":return V;case"=days":return y;case"=hours":return h;case"=minutes":return l;case"=seconds":return u;case"full":default:let d="";return C>0&&(d+=w+" "),b>0&&(d+=V+" "),D>0&&(d+=y+" "),M>0&&(d+=h+" "),P>0&&(d+=l+" "),n>0&&(d+=u+" "),d.trim()}}translateUnit(t,e,i){let s=`TimeUnit${i==="short"?"Short":""}${R.capitalFirst(e)}`;return this.translate.instant(s,{value:t})}static{this.\u0275fac=function(e){return new(e||r)(O($))}}static{this.\u0275prov=z({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();v();var K=(()=>{class r{constructor(t,e,i){this.formatterService=t,this.translate=e,this.cdr=i,this.lastValue="",this.langChangeSub=null}transform(t,e,i,s){return this.langChangeSub||(this.langChangeSub=this.translate.onLangChange.subscribe(()=>{this.lastValue=this.updateValue(t,e,i,s),this.cdr.markForCheck()})),this.lastValue=this.updateValue(t,e,i,s),this.lastValue}updateValue(t,e,i,s){return a.isSet(t)?this.formatterService.formatElapsedTime(t,e,i,s):""}ngOnDestroy(){this.langChangeSub?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||r)(m(T,16),m($,16),m(I,16))}}static{this.\u0275pipe=o({name:"pawFormatElapsed",type:r,pure:!1,standalone:!1})}}return r})();j();g();var X=(()=>{class r{constructor(t){this.formatterService=t}transform(t,e){return a.isSet(t)?this.formatterService.formatElapsedTimeDigits(t,e):""}static{this.\u0275fac=function(e){return new(e||r)(m(T,16))}}static{this.\u0275pipe=o({name:"pawFormatElapsedDigits",type:r,pure:!0,standalone:!1})}}return r})();q();x();g();var _=(()=>{class r{transform(t,e,i){return f.thousands(f.currency(t,i,e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275pipe=o({name:"pawFormatCurrency",type:r,pure:!0,standalone:!1})}}return r})();x();g();var et=(()=>{class r{transform(t,e,i){return f.decimal(t,e,i)}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275pipe=o({name:"pawFormatDecimal",type:r,pure:!0,standalone:!1})}}return r})();j();x();g();v();var nt=(()=>{class r{constructor(t,e){this.translate=t,this.cdr=e,this.lastValue="",this.langChangeSub=null}transform(t){return this.langChangeSub||(this.langChangeSub=this.translate.onLangChange.subscribe(()=>{this.lastValue=this.updateValue(t),this.cdr.markForCheck()})),this.lastValue=this.updateValue(t),this.lastValue}updateValue(t){return a.isSet(t)?a.isString(t)?f.dateFromIso(t):f.dateFromIso(t.toISOString()):""}ngOnDestroy(){this.langChangeSub?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||r)(m($,16),m(I,16))}}static{this.\u0275pipe=o({name:"pawFormatDate",type:r,pure:!1,standalone:!1})}}return r})();g();var $t=(()=>{class r{static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275mod=L({type:r})}static{this.\u0275inj=B({imports:[N]})}}return r})();export{_ as a,et as b,T as c,K as d,X as e,nt as f,$t as g};
