Files
mission-control-v2/frontend/dist/assets/Start-BicB1Gxf.js
T
2026-09-25 13:49:03 +02:00

2 lines
15 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Protokollfenster-Ch6xrwBe.js","assets/dist-D4CVSex9.js","assets/sheet-DU78qfp_.js","assets/index-CIOHqG23.js","assets/useSelector-uUwrspuX.js","assets/useMatch-CiyhmkMV.js","assets/index-h0yYjQNz.css","assets/button-D8rvET0Z.js","assets/dist-B2n2wafq.js","assets/Bestaetigen-D6CzMfJm.js"])))=>i.map(i=>d[i]);
import{i as e,n as t,r as n,s as r,t as i}from"./dist-D4CVSex9.js";import{C as a,Et as o,Ft as s,Gt as c,Ht as l,It as u,Jt as d,Lt as f,Qt as p,Rt as m,S as h,Ut as g,Vt as _,Wt as v,Y as y,b,ht as x,qt as S,tn as C,un as w,w as T,x as E,zt as D}from"./index-CIOHqG23.js";import{t as O}from"./button-D8rvET0Z.js";import{t as k}from"./Lampe-gSQfYg4e.js";var A=t(),j=r(e(),1),M=n(),N=(0,j.lazy)(()=>T(()=>import(`./Protokollfenster-Ch6xrwBe.js`).then(e=>({default:e.Protokollfenster})),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),P=(0,j.lazy)(()=>T(()=>import(`./Bestaetigen-D6CzMfJm.js`).then(e=>e.n).then(e=>({default:e.Bestaetigen})),__vite__mapDeps([9,1,3,4,5,6,7,8])));function F({h:e}){let t=y(),[n,r]=(0,j.useState)(null),[a,o]=(0,j.useState)(null),s=e.stufe===`rot`,c=a?d(e,a):null;async function u(){try{let t=await C(`/api/hinweise/${encodeURIComponent(e.id)}/aktion/protokoll`);r({titel:e.titel,text:t.text||t.out||t.err||`Kein Protokoll vorhanden.`})}catch(e){l(`fehler`,e.message)}}function f(n){t.mutate({hinweis:e.id,aktion:n.id,label:n.label})}function p(t){t.id===`protokoll`?u():d(e,t)?o(t):f(t)}return(0,M.jsxs)(`article`,{className:`flex flex-col gap-2.5 border-t border-linie pt-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(`h3`,{className:`min-w-0 font-sans text-[17px] leading-snug font-semibold`,children:e.titel}),(0,M.jsx)(`span`,{"aria-hidden":!0,className:`hidden h-0 flex-grow border-b-2 border-dotted border-linie-stark sm:block`}),(0,M.jsx)(`span`,{className:i(`schild shrink-0 text-base`,s?`text-rot`:`text-bernstein`),children:s?`Jetzt`:`Prüfen`})]}),(0,M.jsxs)(`p`,{className:`ziffern text-[13px] text-text-3`,children:[m(e.seit),` · zuletzt `,D(e.zuletzt)]}),e.text&&(0,M.jsx)(`p`,{className:`text-[15px] leading-relaxed break-words text-text-2`,children:e.text}),e.aktionen.length>0&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2.5 pt-1`,children:e.aktionen.map((e,n)=>(0,M.jsx)(O,{variant:n===0&&e.id!==`protokoll`?`default`:`outline`,size:`sm`,disabled:t.isPending,onClick:()=>p(e),children:e.label},e.id))}),n&&(0,M.jsx)(j.Suspense,{fallback:null,children:(0,M.jsx)(N,{offen:!0,titel:n.titel,text:n.text,onSchliessen:()=>r(null)})}),a&&c&&(0,M.jsx)(j.Suspense,{fallback:null,children:(0,M.jsx)(P,{offen:!0,titel:c.titel,text:c.text,knopf:c.knopf,gesperrt:t.isPending,onNein:()=>o(null),onJa:()=>{f(a),o(null)}})})]})}function I(e){let t=(0,A.c)(12),{hinweise:n,verlauf:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=new Date().toDateString(),t[0]=i):i=t[0];let a=i,o;if(t[1]!==n.length||t[2]!==r){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>(e.art===`erledigt`||e.art===`auto`)&&new Date(e.ts*1e3).toDateString()===a,t[4]=e):e=t[4];let i=r.filter(e);if(n.length===0){let e;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,M.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine offenen Punkte. Der Wächter prüft jede Minute.`}),t[5]=e):e=t[5];let n=i.length>0&&(0,M.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-text-3`,children:i.slice(0,4).map(R)}),r;t[6]===n?r=t[7]:(r=(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-linie pt-4`,children:[e,n]}),t[6]=n,t[7]=r),o=r;break bb0}}t[1]=n.length,t[2]=r,t[3]=o}else o=t[3];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;t[8]===n?s=t[9]:(s=n.map(L),t[8]=n,t[9]=s);let c;return t[10]===s?c=t[11]:(c=(0,M.jsx)(`div`,{className:`flex flex-col gap-4`,children:s}),t[10]=s,t[11]=c),c}function L(e){return(0,M.jsx)(F,{h:e},e.id)}function R(e){return(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`span`,{className:`ziffern`,children:D(e.ts)}),` · `,e.text]},`${e.id}-${e.ts}`)}function z(e){let t=(0,A.c)(25),{anteil:n,farbe:r,zonen:i,mitte:a,unter:o,beschriftung:s,ariaText:l}=e,u=r===void 0?`var(--cyan)`:r,d;t[0]===i?d=t[1]:(d=i===void 0?[]:i,t[0]=i,t[1]=d);let f=d,p=n!=null&&n>.004,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,M.jsx)(`path`,{d:c(0,1,75),fill:`none`,stroke:`var(--linie)`,strokeWidth:12,strokeLinecap:`round`}),t[2]=m):m=t[2];let h;t[3]===f?h=t[4]:(h=f.map(B),t[3]=f,t[4]=h);let g;t[5]!==n||t[6]!==u||t[7]!==p?(g=p&&(0,M.jsx)(`path`,{d:c(0,n,75),fill:`none`,stroke:u,strokeWidth:12,strokeLinecap:`round`}),t[5]=n,t[6]=u,t[7]=p,t[8]=g):g=t[8];let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_={fontSize:34,fontWeight:500,fill:`var(--foreground)`},t[9]=_):_=t[9];let v;t[10]===a?v=t[11]:(v=(0,M.jsx)(`text`,{x:`100`,y:`100`,textAnchor:`middle`,className:`ziffern`,style:_,children:a}),t[10]=a,t[11]=v);let y;t[12]===o?y=t[13]:(y=o&&(0,M.jsx)(`text`,{x:`100`,y:`122`,textAnchor:`middle`,style:{fontFamily:`var(--font-anzeige)`,fontSize:14,fontWeight:600,letterSpacing:`0.12em`,fill:`var(--text-3)`},children:o.toUpperCase()}),t[12]=o,t[13]=y);let b;t[14]!==l||t[15]!==h||t[16]!==g||t[17]!==v||t[18]!==y?(b=(0,M.jsxs)(`svg`,{viewBox:`0 0 200 150`,className:`h-auto w-full max-w-[200px]`,role:`img`,"aria-label":l,children:[m,h,g,v,y]}),t[14]=l,t[15]=h,t[16]=g,t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]===s?x=t[21]:(x=(0,M.jsx)(`figcaption`,{className:`schild text-[15px] text-text-3`,children:s}),t[20]=s,t[21]=x);let S;return t[22]!==b||t[23]!==x?(S=(0,M.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col items-center gap-1`,children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24],S}function B(e){return(0,M.jsx)(`path`,{d:c(e.von,e.bis,86),fill:`none`,stroke:e.farbe,strokeWidth:4,strokeLinecap:`round`},`${e.von}-${e.bis}`)}function V(e){let t=(0,A.c)(26),{zustand:n,lampen:r,onAnsehen:a}=e,o;t[0]===n?o=t[1]:(o=S(n),t[0]=n,t[1]=o);let s=o,c=s.art===`gelb`||s.art===`rot`,l=!c,u=`${s.oben} ${s.mitte}`,d=g[s.art],f=c?`cursor-pointer`:`cursor-default`,p;t[2]!==d||t[3]!==f?(p=i(`flex min-h-[130px] flex-col items-center justify-center gap-1 rounded-2xl border px-4 py-4 font-anzeige transition-colors`,d,f),t[2]=d,t[3]=f,t[4]=p):p=t[4];let m;t[5]===s.oben?m=t[6]:(m=(0,M.jsx)(`span`,{className:`schild text-sm tracking-[0.26em]`,children:s.oben}),t[5]=s.oben,t[6]=m);let h;t[7]===s.mitte?h=t[8]:(h=(0,M.jsx)(`span`,{className:`text-[40px] leading-none font-bold tracking-[0.04em] sm:text-[44px]`,children:s.mitte}),t[7]=s.mitte,t[8]=h);let _;t[9]===s.unten?_=t[10]:(_=(0,M.jsx)(`span`,{className:`font-sans text-sm opacity-80`,children:s.unten}),t[9]=s.unten,t[10]=_);let v;t[11]!==a||t[12]!==l||t[13]!==u||t[14]!==p||t[15]!==m||t[16]!==h||t[17]!==_?(v=(0,M.jsxs)(`button`,{type:`button`,onClick:a,disabled:l,"aria-label":u,className:p,children:[m,h,_]}),t[11]=a,t[12]=l,t[13]=u,t[14]=p,t[15]=m,t[16]=h,t[17]=_,t[18]=v):v=t[18];let y;t[19]===r?y=t[20]:(y=r.map(H),t[19]=r,t[20]=y);let b;t[21]===y?b=t[22]:(b=(0,M.jsx)(`ul`,{className:`grid grid-cols-2 gap-2.5 rounded-2xl border border-linie bg-panel p-3 sm:grid-cols-4`,children:y}),t[21]=y,t[22]=b);let x;return t[23]!==v||t[24]!==b?(x=(0,M.jsxs)(`section`,{"aria-label":`Warnpanel`,className:`grid gap-4 md:grid-cols-[260px_minmax(0,1fr)] md:gap-5`,children:[v,b]}),t[23]=v,t[24]=b,t[25]=x):x=t[25],x}function H(e){return(0,M.jsx)(k,{lampe:e},e.id)}function U(e){let t=(0,A.c)(2),{z:n}=e,r;return t[0]===n?r=t[1]:(r=(0,M.jsx)(`span`,{className:`ziffern inline-flex h-[1.75em] w-[1.1875em] shrink-0 items-center justify-center rounded-md border border-[#2a3036] bg-[#0b0d0f] font-medium`,children:n}),t[0]=n,t[1]=r),r}function W(e){let t=(0,A.c)(25),{sekunden:n}=e,r;t[0]===n?r=t[1]:(r=f(n),t[0]=n,t[1]=r);let i=r,a=String(Math.min(i?.[0]??0,99)),o;t[2]===a?o=t[3]:(o=a.padStart(2,`0`),t[2]=a,t[3]=o);let s=o,c=String(i?.[1]??0),l;t[4]===c?l=t[5]:(l=c.padStart(2,`0`),t[4]=c,t[5]=l);let u=l,d=i?`Laufzeit ohne Neustart: ${i[0]} Tage, ${i[1]} Stunden`:`Laufzeit unbekannt`,p=i?s[0]:`–`,m;t[6]===p?m=t[7]:(m=(0,M.jsx)(U,{z:p}),t[6]=p,t[7]=m);let h=i?s[1]:`–`,g;t[8]===h?g=t[9]:(g=(0,M.jsx)(U,{z:h}),t[8]=h,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,M.jsx)(`span`,{className:`schild mr-[0.444em] ml-[0.111em] text-[0.5625em] font-bold text-text-3`,children:`T`}),t[10]=_):_=t[10];let v=i?u[0]:`–`,y;t[11]===v?y=t[12]:(y=(0,M.jsx)(U,{z:v}),t[11]=v,t[12]=y);let b=i?u[1]:`–`,x;t[13]===b?x=t[14]:(x=(0,M.jsx)(U,{z:b}),t[13]=b,t[14]=x);let S;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,M.jsx)(`span`,{className:`schild ml-[0.111em] text-[0.5625em] font-bold text-text-3`,children:`H`}),t[15]=S):S=t[15];let C;t[16]!==y||t[17]!==x||t[18]!==m||t[19]!==g||t[20]!==d?(C=(0,M.jsxs)(`div`,{"aria-label":d,role:`img`,className:`flex h-[min(75cqw,150px)] items-center gap-[0.1875em] pb-[min(10cqw,20px)] text-[length:clamp(14px,14.5cqw,32px)]`,children:[m,g,_,y,x,S]}),t[16]=y,t[17]=x,t[18]=m,t[19]=g,t[20]=d,t[21]=C):C=t[21];let w;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,M.jsx)(`figcaption`,{className:`schild text-[15px] text-text-3`,children:`Ohne Neustart`}),t[22]=w):w=t[22];let T;return t[23]===C?T=t[24]:(T=(0,M.jsxs)(`figure`,{className:`@container m-0 flex min-w-0 flex-col items-center justify-end gap-1`,children:[C,w]}),t[23]=C,t[24]=T),T}function G(e){let t=(0,A.c)(47),{box:n}=e,r=_(),i=r?.ram_used??n.ram_used,a=r?.ram_total??n.ram_total,o=r?.temp_cpu??n.temp_cpu,c=r?.temp_gpu??n.temp_gpu,l=n.platte,d=r?.uptime_s??n.uptime_s,f=i!=null&&a?i/a:null,m;t[0]===i?m=t[1]:(m=i==null?`–`:String(Math.round(s(i)??0)),t[0]=i,t[1]=m);let h;t[2]===a?h=t[3]:(h=a?`von ${Math.round(s(a)??0)} GB`:void 0,t[2]=a,t[3]=h);let g;t[4]!==f||t[5]!==i||t[6]!==a?(g=f==null?`Speicher unbekannt`:`Speicher: ${u(i)} von ${u(a)} belegt`,t[4]=f,t[5]=i,t[6]=a,t[7]=g):g=t[7];let v;t[8]!==f||t[9]!==m||t[10]!==h||t[11]!==g?(v=(0,M.jsx)(z,{beschriftung:`Speicher`,anteil:f,mitte:m,unter:h,ariaText:g}),t[8]=f,t[9]=m,t[10]=h,t[11]=g,t[12]=v):v=t[12];let y=o==null?null:o/100,b;t[13]===o?b=t[14]:(b=p(o),t[13]=o,t[14]=b);let x;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(x=[{von:.7,bis:.85,farbe:`var(--bernstein)`},{von:.85,bis:1,farbe:`var(--rot)`}],t[15]=x):x=t[15];let S;t[16]===o?S=t[17]:(S=o==null?`–`:`${Math.round(o)}°`,t[16]=o,t[17]=S);let C;t[18]===c?C=t[19]:(C=c==null?void 0:`GPU ${Math.round(c)}°`,t[18]=c,t[19]=C);let w;t[20]===o?w=t[21]:(w=o==null?`Temperatur unbekannt`:`Temperatur ${Math.round(o)} Grad`,t[20]=o,t[21]=w);let T;t[22]!==w||t[23]!==y||t[24]!==b||t[25]!==S||t[26]!==C?(T=(0,M.jsx)(z,{beschriftung:`Temperatur`,anteil:y,farbe:b,zonen:x,mitte:S,unter:C,ariaText:w}),t[22]=w,t[23]=y,t[24]=b,t[25]=S,t[26]=C,t[27]=T):T=t[27];let E=l?l.percent/100:null,D=l&&l.percent>=90?`var(--rot)`:l&&l.percent>=80?`var(--bernstein)`:`var(--cyan)`,O;t[28]===l?O=t[29]:(O=l?`${Math.round(l.percent)}%`:`–`,t[28]=l,t[29]=O);let k;t[30]===l?k=t[31]:(k=l?`${u(l.used)} / ${u(l.total)}`:void 0,t[30]=l,t[31]=k);let j;t[32]===l?j=t[33]:(j=l?`Platte zu ${Math.round(l.percent)} Prozent belegt`:`Platte unbekannt`,t[32]=l,t[33]=j);let N;t[34]!==E||t[35]!==D||t[36]!==O||t[37]!==k||t[38]!==j?(N=(0,M.jsx)(z,{beschriftung:`Platte`,anteil:E,farbe:D,mitte:O,unter:k,ariaText:j}),t[34]=E,t[35]=D,t[36]=O,t[37]=k,t[38]=j,t[39]=N):N=t[39];let P;t[40]===d?P=t[41]:(P=(0,M.jsx)(W,{sekunden:d}),t[40]=d,t[41]=P);let F;return t[42]!==T||t[43]!==N||t[44]!==P||t[45]!==v?(F=(0,M.jsxs)(`section`,{"aria-label":`Instrumente`,className:`grid grid-cols-2 gap-x-4 gap-y-6 rounded-2xl border border-linie bg-panel px-4 py-5 lg:grid-cols-4 lg:px-6`,children:[v,T,N,P]}),t[42]=T,t[43]=N,t[44]=P,t[45]=v,t[46]=F):F=t[46],F}var K={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`};function q(e){let t=(0,A.c)(14),{radar:n}=e;if(!n?.kandidaten)return null;let r,i;t[0]===n.kandidaten?(r=t[1],i=t[2]):(r=n.kandidaten.filter(Y),i=r.find(J)??r[0],t[0]=n.kandidaten,t[1]=r,t[2]=i);let a=i,o=r.length===1?``:`en`,s;t[3]!==r.length||t[4]!==o?(s=(0,M.jsxs)(`span`,{className:`schild text-sm text-cyan`,children:[`Radar · `,r.length,` Kandidat`,o]}),t[3]=r.length,t[4]=o,t[5]=s):s=t[5];let c;t[6]===a?c=t[7]:(c=a?(0,M.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-[15px]`,children:[(0,M.jsx)(`span`,{className:`ziffern`,children:a.name}),(0,M.jsxs)(`span`,{className:`text-text-2`,children:[`fürs `,a.rolle===`hirn`?`Hirn`:`Coden`]}),(0,M.jsx)(h,{art:K[a.status]??`grau`,children:v[a.status]??a.status})]}):(0,M.jsx)(`span`,{className:`text-[15px] text-text-2`,children:`Nichts Besseres in Sicht.`}),t[6]=a,t[7]=c);let l;t[8]!==s||t[9]!==c?(l=(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[s,c]}),t[8]=s,t[9]=c,t[10]=l):l=t[10];let u;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,M.jsx)(O,{variant:`info`,size:`sm`,asChild:!0,children:(0,M.jsx)(w,{to:`/box/modelle`,hash:`radar`,children:`Ansehen`})}),t[11]=u):u=t[11];let d;return t[12]===l?d=t[13]:(d=(0,M.jsxs)(`div`,{className:`mt-auto flex flex-wrap items-center justify-between gap-3 rounded-xl border border-cyan-rand bg-cyan-grund px-4 py-3.5`,children:[l,u]}),t[12]=l,t[13]=d),d}function J(e){return e.status===`bestanden`}function Y(e){return[`bestanden`,`wartet`,`neu`].includes(e.status)}function X(){let e=(0,A.c)(32),{data:t,error:n,isPending:r}=o(),i=x();if(r){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsx)(a,{text:`Die Box meldet sich gleich …`}),e[0]=t):t=e[0],t}if(!t){let t=`MC2 antwortet nicht: ${n?.message??`keine Daten`}`,r;return e[1]===t?r=e[2]:(r=(0,M.jsx)(a,{fehler:!0,text:t}),e[1]=t,e[2]=r),r}let s=t.hinweise.length,c;e[3]!==t.lampen||e[4]!==t.zustand?(c=(0,M.jsx)(V,{zustand:t.zustand,lampen:t.lampen,onAnsehen:Z}),e[3]=t.lampen,e[4]=t.zustand,e[5]=c):c=e[5];let l;e[6]===t.box?l=e[7]:(l=(0,M.jsx)(G,{box:t.box}),e[6]=t.box,e[7]=l);let u=s?`ziffern text-sm text-bernstein`:`ziffern text-sm text-gruen`,d=s?`${s} offen`:`alles erledigt`,f;e[8]!==u||e[9]!==d?(f=(0,M.jsx)(`span`,{className:u,children:d}),e[8]=u,e[9]=d,e[10]=f):f=e[10];let p;e[11]!==t.hinweise||e[12]!==t.verlauf?(p=(0,M.jsx)(I,{hinweise:t.hinweise,verlauf:t.verlauf}),e[11]=t.hinweise,e[12]=t.verlauf,e[13]=p):p=e[13];let m;e[14]!==f||e[15]!==p?(m=(0,M.jsx)(b,{titel:`Checkliste`,id:`checkliste`,rechts:f,children:p}),e[14]=f,e[15]=p,e[16]=m):m=e[16];let h;e[17]!==t.flugplan.gelaufen||e[18]!==t.flugplan.geplant?(h=(0,M.jsx)(E,{gelaufen:t.flugplan.gelaufen,geplant:t.flugplan.geplant}),e[17]=t.flugplan.gelaufen,e[18]=t.flugplan.geplant,e[19]=h):h=e[19];let g;e[20]===i.data?g=e[21]:(g=(0,M.jsx)(q,{radar:i.data}),e[20]=i.data,e[21]=g);let _;e[22]!==h||e[23]!==g?(_=(0,M.jsxs)(b,{titel:`Flugplan`,children:[h,g]}),e[22]=h,e[23]=g,e[24]=_):_=e[24];let v;e[25]!==m||e[26]!==_?(v=(0,M.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[minmax(0,1.35fr)_minmax(0,1fr)] md:gap-6`,children:[m,_]}),e[25]=m,e[26]=_,e[27]=v):v=e[27];let y;return e[28]!==c||e[29]!==l||e[30]!==v?(y=(0,M.jsxs)(M.Fragment,{children:[c,l,v]}),e[28]=c,e[29]=l,e[30]=v,e[31]=y):y=e[31],y}function Z(){return document.getElementById(`checkliste`)?.scrollIntoView({behavior:`smooth`,block:`start`})}export{X as StartSeite};