-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathchunk-ARKKPO2L.js
1 lines (1 loc) · 2.6 KB
/
chunk-ARKKPO2L.js
1
import{ba as c,ca as f,da as d,n as g}from"./chunk-O3IWK6WU.js";import{Jb as l,Lb as s,ia as m,xb as y}from"./chunk-NACBYLXS.js";var D=(()=>{class t{transform(e,r){if(!Array.isArray(e))return e;if(e.length!==0)switch(r){case"sum":return d(e);case"avg":return d(e)/e.length;case"max":return Math.max(...e);case"min":return Math.min(...e);default:throw Error("Invalid Pipe Arguments: Aggregate pipe doesn't support this type")}}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=s({name:"nzAggregate",type:t,pure:!0})}return t})(),M=class t{static formats={B:{max:1024},kB:{max:Math.pow(1024,2),prev:"B"},KB:{max:Math.pow(1024,2),prev:"B"},MB:{max:Math.pow(1024,3),prev:"kB"},GB:{max:Math.pow(1024,4),prev:"MB"},TB:{max:Number.MAX_SAFE_INTEGER,prev:"GB"}};transform(n,e=0,r="B",o){if(!(c(n)&&c(e)&&e%1===0&&e>=0))return n;let i=n,u=r;for(;u!=="B";)i*=1024,u=t.formats[u].prev;if(o){let a=t.formats[o],p=f(t.calculateResult(a,i),e);return t.formatResult(p,o)}for(let a in t.formats)if(t.formats.hasOwnProperty(a)){let p=t.formats[a];if(i<p.max){let h=f(t.calculateResult(p,i),e);return t.formatResult(h,a)}}}static formatResult(n,e){return`${n} ${e}`}static calculateResult(n,e){let r=n.prev?t.formats[n.prev]:void 0;return r?e/r.max:e}static \u0275fac=function(e){return new(e||t)};static \u0275pipe=s({name:"nzBytes",type:t,pure:!0})},P=(()=>{class t{transform(e,r="px"){return typeof e=="number"?`${e}${r}`:e}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=s({name:"nzToCssUnit",type:t,pure:!0})}return t})(),B=(()=>{class t{transform(e,r,o=""){if(typeof e!="string")return e;let i=typeof r>"u"?e.length:r;return e.length<=i?e:e.substring(0,i)+o}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=s({name:"nzEllipsis",type:t,pure:!0})}return t})(),x=(()=>{class t{sanitizer;constructor(e){this.sanitizer=e}transform(e,r="html"){switch(r){case"html":return this.sanitizer.bypassSecurityTrustHtml(e);case"style":return this.sanitizer.bypassSecurityTrustStyle(e);case"url":return this.sanitizer.bypassSecurityTrustUrl(e);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(e);default:throw new Error("Invalid safe type specified")}}static \u0275fac=function(r){return new(r||t)(y(g,16))};static \u0275pipe=s({name:"nzSanitizer",type:t,pure:!0})}return t})(),N=(()=>{class t{transform(e){return e.trim()}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=s({name:"nzTrim",type:t,pure:!0})}return t})();var T=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=l({type:t});static \u0275inj=m({})}return t})();export{D as a,M as b,P as c,B as d,x as e,N as f,T as g};