1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6581],{16581:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),n=s(12115),r=s(73321),i=s(83158);s(62108);let l=(0,i.RC)(),c={...(0,i.U3)(),label:"Slides"};function d({nodeId:e,nodeType:t,fieldName:s,data:o,config:u,closePuckEditor:h,lang:p,metadata:x}){let m=(0,r.usePathname)(),[k,b]=(0,n.useState)({kind:"idle"}),[g,f]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=!1;return(async()=>{let t=o;try{t=await (0,i.o2)(o,u,x)}catch{}e||f(t)})(),()=>{e=!0}},[o,u,x]);let y=async a=>{b({kind:"saving"});try{let n=await fetch(`/${p}/api/puck/publish`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:a,fieldName:s,nodeId:e,path:m,type:t,lang:p})});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.message||`HTTP ${n.status}`)}b({kind:"success"}),setTimeout(()=>b({kind:"idle"}),2e3)}catch(e){console.error("Failed to publish Puck data:",e),b({kind:"error",message:e instanceof Error?e.message:"Unknown error"})}};return g?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(i.Ci,{config:u,data:g,metadata:x,headerTitle:"Signage Editor",plugins:[c],overrides:{headerActions:()=>{let e=l(e=>e.appState);return(0,a.jsxs)(a.Fragment,{children:["saving"===k.kind&&(0,a.jsx)("span",{className:"text-xs opacity-60",children:"Speichereâ¦"}),"success"===k.kind&&(0,a.jsx)("span",{className:"text-xs text-green-600",children:"Gespeichert"}),"error"===k.kind&&(0,a.jsxs)("span",{className:"text-xs text-red-600",children:["Fehler: ",k.message]}),(0,a.jsx)("button",{type:"button",onClick:()=>y(e.data),disabled:"saving"===k.kind,className:"rounded bg-black px-3 py-1 text-sm font-medium text-white disabled:opacity-50",children:"Speichern"}),(0,a.jsx)("button",{type:"button",onClick:h,className:"rounded border border-gray-300 px-3 py-1 text-sm",children:"Schliessen"})]})}},onPublish:y})}):(0,a.jsx)("div",{className:"flex h-full w-full items-center justify-center text-sm text-neutral-500",children:"Lade aktuelle Datenâ¦"})}},62108:()=>{}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.