n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 3.04 kB
JavaScript
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.16.1"}}catch(e){}}(),System.register(["./chunk-legacy-Dz3fjYb5.js","./core-legacy-VD8c7QJ-.js","./CalendarDate-legacy-BdYpbLuZ.js","./dateformat-legacy-BGLHQd3J.js","./insights.constants-legacy-DtPF8E1N.js"],(function(e,t){var n,a,s,o,r,i,l,d,u,f,c,y,D,g,b,h,m,p,w,v,T;return{setters:[function(e){n=e.o},function(e){a=e.at},function(e){s=e.h,o=e.i,r=e.l,i=e.m,l=e.s},function(e){d=e.t},function(e){u=e.a,f=e.n,c=e.r}],execute:function(){try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(x=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[x]="4f11e9ba-3e4a-43cc-94e0-84952af0e8fc",t._sentryDebugIdIdentifier="sentry-dbid-4f11e9ba-3e4a-43cc-94e0-84952af0e8fc")}catch(t){}var t,x;y=n(d(),1),D="d mmm, yyyy",e("l",g=e=>Math.round(e/(Math.abs(e)<60?1:60))),e("o",b=e=>e/1e3),e("s",h=e=>100*e),m={total:e=>e,failed:e=>e,timeSaved:g,averageRunTime:b,failureRate:h},p=(e,t)=>e-t,v={total:w=(e,t)=>{if(0===e&&0===t)return 0;const n=p(e,t);return 0===n?null:t/n*100},failed:w,timeSaved:(e,t)=>g(t),averageRunTime:(e,t)=>b(t),failureRate:(e,t)=>h(t)},e("c",(e=>e?c.map((t=>({id:t,value:m[t](e[t].value),deviation:null===e[t].deviation?null:v[t](e[t].value,e[t].deviation),deviationUnit:null===e[t].deviation?"":f[t](e[t].deviation),unit:u[t](e[t].value)}))):[])),e("a",T={day:1,week:7,"2weeks":14,month:30,quarter:90,"6months":180,year:365}),e("i",(()=>{const e=a();return{day:e.baseText("insights.lastNHours",{interpolate:{count:24}}),week:e.baseText("insights.lastNDays",{interpolate:{count:7}}),"2weeks":e.baseText("insights.lastNDays",{interpolate:{count:14}}),month:e.baseText("insights.lastNDays",{interpolate:{count:30}}),quarter:e.baseText("insights.lastNDays",{interpolate:{count:90}}),"6months":e.baseText("insights.months",{interpolate:{count:6}}),year:e.baseText("insights.oneYear")}})),e("t",(e=>{const{start:t,end:n}=e;if(!t)return"";const a=t.toDate(i()),s=n?.toDate(i());return n&&0!==t.compare(n)?t.year===n.year?`${(0,y.default)(a,"d mmm")} - ${(0,y.default)(s,D)}`:`${(0,y.default)(a,D)} - ${(0,y.default)(s,D)}`:(0,y.default)(a,D)})),e("r",(e=>{const{start:t,end:n}=e;if(!t||!n||!r(n,i()))return null;const a=n.compare(t);for(const[s,o]of Object.entries(T))if(a===o)return s;return null})),e("n",(e=>{if(!e.start||!e.end)return{startDate:new Date,endDate:new Date};const t=i(),n=s(t),a=e.end&&0===e.end.compare(n),r=e.end&&e.start?e.end.compare(e.start):0;if(a){const n=l(t);return 1===r?{startDate:o(e.start,n).toDate(t),endDate:o(e.end,n).toDate(t)}:{startDate:e.start?.toDate(t)??new Date,endDate:o(e.end,n).toDate(t)}}{const n=e.start?.toDate(t)??new Date,a=e.end?.toDate(t)??new Date;return a.setHours(23,59,59,999),{startDate:n,endDate:a}}}))}}}));
//# sourceMappingURL=insights.utils-legacy-DBZPnldI.js.map