/*! maintenance_supporter frontend 2.103.0 */ import{a as mi,b as fi,c as vi,g as ki}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-GXB5TPY7.js";import{a as $}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-274MLN75.js";import{a as Ei,b as Ri,c as Oi,d as _t,e as Ci,f as It}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FH35SLMS.js";import{A as Ji,B as yt,C as Xi,D as Zi,E as es,F as ts,G as is,N as ss,Q as as,a as le,b as ti,c as je,d as Se,e as nt,f as He,g as ut,h as yi,i as xi,j as gt,k as $i,l as ji,m as O,n as Ze,o as ke,p as ze,q as qe,r as Lt,s as vt,t as bt,u as qi,v as Fi,w as Ki,x as Gi,y as Yi,z as Qi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-L5NQ4343.js";import{f as Hi,g as Ne,i as Bi,j as ft,k as Ni}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-WNGWMATB.js";import{a as mt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-KZ3OKTLK.js";import{a as _i,b as dt,c as Ee,d as pt,e as Je,f as ht}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-DR2AFVDA.js";import{a as rt,c as Le}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-EOMYEBQ4.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-4DQPCVDN.js";import{a as Ht,b as ge}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-UVFWQWIH.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-5TWB2KD3.js";import{a as zi,b as Li}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-2URORCTE.js";import{c as Pi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-XDU67K3J.js";import{a as A,b as Z,c as V}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-VZUMUVFP.js";import{c as Si,d as Ti,e as Re}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-MMIPM7EE.js";import{b as bi,i as wi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-GMGHSBQJ.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-R77C34J4.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-S4GGDFOL.js";import{a as At}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-IRRUA3DS.js";import{c as Mi,d as zt,e as Di}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-DPJSGXJS.js";import{l as Xe}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-2BQZ33DM.js";import{a as Ui,b as Vi,c as Wi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-QVOLUT24.js";import{a as P,b as Ai,c as Ii,d as Pt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-3LDXEWBF.js";import{$ as Ie,B as fe,C as Dt,E as Te,F as ci,G as lt,H as Be,I as K,J as Ke,L as G,M as U,N as Ge,P as q,Q as di,S as xe,T as pi,U as hi,V as Ye,Y as ui,Z as gi,a as _,aa as Qe,b as B,c as n,d as Y,da as ct,f as h,h as N,i as Mt,j as ii,k as si,l as ai,m as R,n as f,o as ot,p as ri,q as Me,t as s,u as ni,v as re,x as oi,y as li,z as ye}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OWNF6K2Z.js";var Hs=["assignee_pool","required_completion_fields","checklist","labels","mirror_todo_entities","next_event_titles","history","readings"],Bs=["checklist_progress"],Ns=["tasks","parts"],qs=["manual_docs","battery_fleet_excluded"];function Bt(l,c,e=[]){for(let t of c)l[t]===void 0&&(l[t]=[]);for(let t of e)l[t]===void 0&&(l[t]={})}function Fs(l){let c=l;Bt(c,Ns),c.object&&typeof c.object=="object"&&Bt(c.object,qs);for(let e of c.tasks)Bt(e,Hs,Bs);return l}function et(l){for(let c of l)Fs(c);return l}function Us(l,c){if(c.objects)return c.objects;let e=c.delta||[],t=c.removed||[];if(!e.length&&!t.length)return null;let i=new Map(l.map(a=>[a.entry_id,a]));for(let a of e)i.set(a.entry_id,a);for(let a of t)i.delete(a);return[...i.values()]}function rs(l,c){return c.objects&&et(c.objects),c.delta&&et(c.delta),Us(l,c)}var Nt=["today","dashboard","calendar","settings"];var Vs=168*3600*1e3;function ns(){try{let l=Z(A.objectsCache);if(!l)return null;let c=JSON.parse(l);return c.v!==Mt||!Number.isFinite(c.at)||Date.now()-c.at>Vs||!Array.isArray(c.objects)||c.objects.length===0?null:{objects:c.objects,stats:c.stats??null}}catch{return null}}function qt(l,c){if(!(!Array.isArray(l)||l.length===0))try{let e={v:Mt,at:Date.now(),objects:l,stats:c};V(A.objectsCache,JSON.stringify(e))}catch{}}function tt(l){return l.responsible_user_id?[l.responsible_user_id]:[...new Set((l.assignee_pool||[]).filter(c=>typeof c=="string"&&c))]}function it(l,c){return!!c&&tt(l).includes(c)}var Ws={days:1,weeks:7,months:30.4368,years:365.25};function Ft(l,c){return!l||l<=0?0:l*(Ws[c||"days"]??1)}function xt(l,c,e){let t=Ft(l,e);if(t<=0||c==null)return{pct:0,overflow:!1};let i=(t-c)/t*100;return{pct:Math.max(0,Math.min(100,i)),overflow:i>100}}function os(l,c,e,t,i,a){let r=[[e.manufacturer,l.manufacturer],[e.model,l.model],[e.serial,l.serial_number],[e.installed,l.installation_date?t(l.installation_date):null],[e.warranty,l.warranty_expiry?t(l.warranty_expiry):null]].filter(([,u])=>!!u),d=c.map(u=>{let p=e.scheduleLabel(u);return`
${$(e.title)} \xB7 ${$(e.generated)}: ${$(t(a))}
${r.length?``:""}| ${$(e.colTask)} | ${$(e.colType)} | ${$(e.colStatus)} | ${$(e.colSchedule)} | ${$(e.colLastDone)} | ${$(e.colNextDue)} | ${$(e.colTimes)} | ${$(e.colCost)} |
|---|---|---|---|---|---|---|---|
| ${$(e.none)} | |||||||
| ${$(e.totalCost)} | ${$(i(o))} | ||||||
| ${L(y)} | ${T} |