Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 11m34s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 12m8s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 15m14s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 15m47s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m48s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 14m15s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 16m38s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 17m2s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m16s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m53s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 line
No EOL
22 KiB
JavaScript
1 line
No EOL
22 KiB
JavaScript
import{At as e,Mt as t,Nt as n,Ot as r,P as i,ut as a}from"./ui-DY0WbyhT.js";import{At as o,C as s,Dt as c,E as l,O as u,Q as d,S as f,T as p,Tt as m,V as h,W as g,Y as _,_t as v,g as y,h as b,i as x,k as S,kt as C,o as w,ot as T,p as E,q as D,rt as O,s as k,st as A,v as j,w as M,x as N}from"./framework-Cy4cevSy.js";import{t as P}from"./corner-down-right-CllUTQAi.js";import{t as F}from"./file-check-corner-D4KcCwGQ.js";import{t as I}from"./link-2-BdN1y1H6.js";import{t as L}from"./send-cXiW05LR.js";import{t as ee}from"./trash-5Sd5z4th.js";import{Ct as R,E as z,Ot as B,S as V,X as te,at as H,f as ne,gt as U,m as W,nt as G,o as K,p as q,v as J}from"./app-V0HOzKwI.js";import{t as re}from"./NewsStats-C0CJYjij.js";var ie=n({name:`chart-no-axes-column`,size:24,node:[[`path`,{d:`M5 21v-6`,key:`1hz6c0`}],[`path`,{d:`M12 21V3`,key:`1lcnhd`}],[`path`,{d:`M19 21V9`,key:`unv183`}]],aliases:[`bar-chart-2`]}),Y=n({name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]}),X=n({name:`reply`,size:24,node:[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]}),Z={id:`kommentare`,class:`rounded-xl border bg-card p-6 shadow-xs sm:p-8`,"aria-labelledby":`kommentare-titel`},ae={id:`kommentare-titel`,class:`flex items-center gap-2 text-lg font-semibold`},Q={key:0,class:`rounded-pill bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground tabular-nums`},oe={class:`min-w-0 flex-1`},$=[`maxlength`,`onKeydown`],se={key:0,class:`mt-1 text-[13px] text-destructive`},ce={key:1,class:`mt-2 flex items-center justify-end gap-3`},le={key:1,class:`mt-4 rounded-md bg-muted px-3 py-2 text-[13px] text-muted-foreground`},ue={key:2,class:`mt-6 text-sm text-muted-foreground`},de={class:`mt-6 grid gap-6`},fe=[`id`],pe={class:`min-w-0 flex-1`},me={key:0,class:`py-1 text-sm text-muted-foreground italic`},he={class:`rounded-lg bg-muted/60 px-3.5 py-2.5`},ge={class:`flex flex-wrap items-baseline gap-x-2 text-[13px]`},_e={class:`font-semibold`},ve={key:0,class:`text-muted-foreground`},ye={key:0,class:`mt-0.5 flex items-center gap-1 text-xs text-muted-foreground`},be=[`onSubmit`],xe=[`maxlength`],Se={class:`mt-2 flex justify-end gap-2`},Ce={key:2,class:`mt-1 text-sm leading-relaxed break-words whitespace-pre-line`},we={class:`mt-1 flex flex-wrap items-center gap-x-3 px-1 text-xs text-muted-foreground`},Te=[`datetime`,`title`],Ee={key:0},De=[`onClick`],Oe=[`onClick`],ke=[`onClick`],Ae={class:`min-w-0 flex-1`},je={class:`mb-1 text-xs text-muted-foreground`},Me=[`id`,`maxlength`,`onKeydown`],Ne={key:0,class:`mt-1 text-[13px] text-destructive`},Pe={class:`mt-2 flex justify-end gap-2`},Fe={__name:`NewsComments`,props:{postSlug:{type:String,required:!0},comments:{type:Object,required:!0}},setup(e){let t=e,n=w(),a=n.props.auth?.user,l=v(``),d=v(!1),x=v({}),C=v(null),O=v(``),N=v(null),F=v(``),I=new Intl.RelativeTimeFormat(`de-DE`,{numeric:`auto`}),R=new Intl.DateTimeFormat(`de-DE`,{dateStyle:`medium`,timeStyle:`short`});function z(e){let t=(new Date(e)-new Date)/1e3,n=[[60,`second`],[60,`minute`],[24,`hour`],[7,`day`]],r=t;for(let[e,t]of n){if(Math.abs(r)<e)return I.format(Math.round(r),t);r/=e}return R.format(new Date(e))}function B(e,r){d.value=!0,k.post(`/neuigkeiten/${t.postSlug}/kommentare`,e,{preserveScroll:!0,only:[`comments`,`flash`],onError:e=>x.value=e,onSuccess:()=>{x.value={},r();let e=n.props.flash?.comment;e&&h(()=>K(e))},onFinish:()=>d.value=!1})}function V(){l.value.trim()&&B({body:l.value},()=>l.value=``)}function te(e){N.value=null,C.value=e,O.value=``,h(()=>document.getElementById(`antwort-${e.id}`)?.focus())}function H(){O.value.trim()&&B({body:O.value,parent_id:C.value.id},()=>{C.value=null,O.value=``})}function ne(e){C.value=null,N.value=e.id,F.value=e.body}function U(e){k.put(`/kommentare/${e.id}`,{body:F.value},{preserveScroll:!0,only:[`comments`,`flash`],onSuccess:()=>N.value=null})}function W(e){window.confirm(`Kommentar löschen?`)&&k.delete(`/kommentare/${e.id}`,{preserveScroll:!0,only:[`comments`,`flash`]})}function K(e){let t=document.getElementById(`kommentar-${e}`);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),t.classList.add(`ring-2`,`ring-brand/40`),setTimeout(()=>t.classList.remove(`ring-2`,`ring-brand/40`),2e3))}g(()=>{let e=window.location.hash.match(/^#kommentar-(\d+)$/);e&&setTimeout(()=>K(e[1]),300)});let q=e=>{e.target.style.height=`auto`,e.target.style.height=`${e.target.scrollHeight}px`};return(t,n)=>(D(),p(`section`,Z,[f(`h2`,ae,[S(m(G),{class:`size-5 text-brand-text`}),n[6]||=u(` Kommentare `,-1),e.comments.count?(D(),p(`span`,Q,o(e.comments.count),1)):M(``,!0)]),e.comments.enabled?(D(),p(`form`,{key:0,class:`mt-5 flex gap-3`,onSubmit:y(V,[`prevent`])},[m(a)?(D(),s(J,{key:0,person:m(a),class:`size-9 shrink-0`},null,8,[`person`])):M(``,!0),f(`div`,oe,[A(f(`textarea`,{"onUpdate:modelValue":n[0]||=e=>l.value=e,rows:`2`,maxlength:e.comments.max,placeholder:`Was meinen Sie dazu?`,"aria-label":`Kommentar schreiben`,class:`w-full resize-none rounded-lg border border-input bg-background px-3 py-2 text-sm leading-relaxed focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none`,onInput:q,onKeydown:[b(y(V,[`ctrl`]),[`enter`]),b(y(V,[`meta`]),[`enter`])]},null,40,$),[[E,l.value]]),x.value.body&&!C.value?(D(),p(`p`,se,o(x.value.body),1)):M(``,!0),l.value.trim()?(D(),p(`div`,ce,[n[8]||=f(`span`,{class:`text-xs text-muted-foreground`},`Strg + Enter zum Senden`,-1),S(m(i),{type:`submit`,size:`sm`,disabled:d.value},{default:T(()=>[d.value?(D(),s(m(r),{key:0,class:`animate-spin`})):(D(),s(m(L),{key:1})),n[7]||=u(` Kommentieren`,-1)]),_:1},8,[`disabled`])])):M(``,!0)])],32)):(D(),p(`p`,le,`Die Kommentare zu diesem Beitrag sind geschlossen.`)),!e.comments.threads.length&&e.comments.enabled?(D(),p(`p`,ue,`Noch keine Kommentare – schreiben Sie den ersten.`)):M(``,!0),f(`ol`,de,[(D(!0),p(j,null,_(e.comments.threads,t=>(D(),p(`li`,{key:t.id},[(D(!0),p(j,null,_([t,...t.replies],(t,r)=>(D(),p(`article`,{key:t.id,id:`kommentar-${t.id}`,class:c([`flex gap-3 rounded-lg transition-shadow`,r>0?`mt-4 ml-6 sm:ml-12`:``])},[t.author?(D(),s(J,{key:0,person:t.author,class:c([r>0?`size-8`:`size-9`,`shrink-0`])},null,8,[`person`,`class`])):(D(),p(`span`,{key:1,class:c([`grid shrink-0 place-items-center rounded-full bg-muted text-muted-foreground`,r>0?`size-8`:`size-9`])},[S(m(G),{class:`size-4`})],2)),f(`div`,pe,[t.deleted?(D(),p(`p`,me,`Dieser Kommentar wurde gelöscht.`)):(D(),p(j,{key:1},[f(`div`,he,[f(`p`,ge,[f(`span`,_e,o(t.author?.name??`Ehemalige Person`),1),t.author?.department?(D(),p(`span`,ve,o(t.author.department),1)):M(``,!0)]),t.reply_to?(D(),p(`p`,ye,[S(m(P),{class:`size-3`}),u(` Antwort an `+o(t.reply_to),1)])):M(``,!0),N.value===t.id?(D(),p(`form`,{key:1,class:`mt-2`,onSubmit:y(e=>U(t),[`prevent`])},[A(f(`textarea`,{"onUpdate:modelValue":n[1]||=e=>F.value=e,rows:`3`,maxlength:e.comments.max,class:`w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/30`,"aria-label":`Kommentar bearbeiten`},null,8,xe),[[E,F.value]]),f(`div`,Se,[S(m(i),{type:`button`,size:`sm`,variant:`ghost`,onClick:n[2]||=e=>N.value=null},{default:T(()=>[...n[9]||=[u(`Abbrechen`,-1)]]),_:1}),S(m(i),{type:`submit`,size:`sm`,disabled:!F.value.trim()},{default:T(()=>[...n[10]||=[u(`Speichern`,-1)]]),_:1},8,[`disabled`])])],40,be)):(D(),p(`p`,Ce,o(t.body),1))]),f(`div`,we,[f(`time`,{datetime:t.created_at,title:m(R).format(new Date(t.created_at))},o(z(t.created_at)),9,Te),t.edited?(D(),p(`span`,Ee,`bearbeitet`)):M(``,!0),e.comments.enabled?(D(),p(`button`,{key:1,type:`button`,class:`inline-flex items-center gap-1 font-medium hover:text-foreground`,onClick:e=>te(t)},[S(m(X),{class:`size-3.5`}),n[11]||=u(` Antworten`,-1)],8,De)):M(``,!0),t.can.edit?(D(),p(`button`,{key:2,type:`button`,class:`inline-flex items-center gap-1 hover:text-foreground`,onClick:e=>ne(t)},[S(m(Y),{class:`size-3`}),n[12]||=u(` Bearbeiten`,-1)],8,Oe)):M(``,!0),t.can.delete?(D(),p(`button`,{key:3,type:`button`,class:`inline-flex items-center gap-1 hover:text-destructive`,onClick:e=>W(t)},[S(m(ee),{class:`size-3`}),n[13]||=u(` Löschen`,-1)],8,ke)):M(``,!0)])],64))])],10,fe))),128)),C.value&&[t.id,...t.replies.map(e=>e.id)].includes(C.value.id)?(D(),p(`form`,{key:0,class:`mt-3 ml-6 flex gap-3 sm:ml-12`,onSubmit:y(H,[`prevent`])},[m(a)?(D(),s(J,{key:0,person:m(a),class:`size-8 shrink-0`},null,8,[`person`])):M(``,!0),f(`div`,Ae,[f(`p`,je,`Antwort an `+o(C.value.author?.name),1),A(f(`textarea`,{id:`antwort-${C.value.id}`,"onUpdate:modelValue":n[3]||=e=>O.value=e,rows:`2`,maxlength:e.comments.max,class:`w-full resize-none rounded-lg border border-input bg-background px-3 py-2 text-sm focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none`,"aria-label":`Antwort schreiben`,onInput:q,onKeydown:[b(y(H,[`ctrl`]),[`enter`]),b(y(H,[`meta`]),[`enter`]),n[4]||=b(e=>C.value=null,[`esc`])]},null,40,Me),[[E,O.value]]),x.value.body?(D(),p(`p`,Ne,o(x.value.body),1)):M(``,!0),f(`div`,Pe,[S(m(i),{type:`button`,size:`sm`,variant:`ghost`,onClick:n[5]||=e=>C.value=null},{default:T(()=>[...n[14]||=[u(`Abbrechen`,-1)]]),_:1}),S(m(i),{type:`submit`,size:`sm`,disabled:d.value||!O.value.trim()},{default:T(()=>[S(m(L)),n[15]||=u(` Antworten`,-1)]),_:1},8,[`disabled`])])])],32)):M(``,!0)]))),128))])]))}},Ie={key:0,class:`block text-[15px] leading-relaxed`},Le={class:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[13px]`},Re={key:0,class:`rounded-pill bg-brand-soft px-2.5 py-0.5 text-[11px] font-semibold tracking-wider text-brand-text uppercase`},ze={class:`inline-flex items-center gap-1.5`},Be={class:`inline-flex items-center gap-1.5`},Ve={key:1,class:`inline-flex items-center gap-1.5`},He={key:2,href:`#kommentare`,class:`inline-flex items-center gap-1.5 hover:text-foreground`},Ue={class:`fixed inset-x-0 top-0 z-50 h-1 bg-transparent`,"aria-hidden":`true`},We=[`src`,`alt`],Ge={class:`grid gap-6 lg:grid-cols-12`},Ke={class:`grid min-w-0 grid-cols-1 content-start gap-6 lg:col-span-8`},qe={key:0,class:`mb-8 flex items-center gap-3 border-b pb-6 lg:hidden`},Je={class:`min-w-0 text-sm`},Ye={key:0,class:`text-muted-foreground`},Xe={key:1,class:`mb-6 flex items-start gap-3 rounded-lg border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-950 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-100`},Ze=[`innerHTML`],Qe=[`innerHTML`],$e={class:`flex-1 text-sm`},et={class:`mt-10 flex flex-wrap items-center gap-2 border-t pt-6`},tt={key:0,class:`tabular-nums`},nt=[`href`],rt={class:`grid content-start gap-6 lg:col-span-4`},it={key:0,class:`rounded-xl border bg-card p-5 shadow-xs`},at={class:`min-w-0`},ot={class:`block font-semibold`},st={key:0,class:`block text-[13px] text-muted-foreground`},ct={key:1,class:`rounded-xl border bg-card p-5 shadow-xs`},lt={class:`mb-3 flex items-center gap-1.5 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},ut={class:`text-2xl font-semibold tabular-nums`},dt={class:`text-base font-normal text-muted-foreground`},ft={class:`mt-2 h-2 overflow-hidden rounded-full bg-muted`},pt={key:0,class:`mt-4 border-t pt-3`},mt={key:0,class:`mt-2 grid max-h-64 gap-1 overflow-y-auto text-[13px]`},ht={key:2,class:`rounded-xl border bg-card p-5 shadow-xs`},gt={class:`mb-3 flex items-center gap-1.5 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},_t={class:`grid grid-cols-3 gap-3 text-center`},vt={class:`text-xl font-semibold tabular-nums`},yt={class:`text-xl font-semibold tabular-nums`},bt={class:`text-xl font-semibold tabular-nums`},xt={key:0,class:`mt-4`},St=[`aria-label`],Ct=[`title`],wt={key:1,class:`mt-4 border-t pt-3`},Tt={key:0,class:`mt-2 text-[13px] leading-relaxed text-muted-foreground`},Et={key:3,class:`rounded-xl border bg-card p-5 shadow-xs lg:sticky lg:top-20`},Dt={class:`grid gap-1`},Ot=[`src`],kt={key:1,class:`grid h-16 w-20 shrink-0 place-items-center rounded-md bg-brand-soft text-brand-text`},At={class:`min-w-0`},jt={key:0,class:`block text-[10px] font-semibold tracking-wider text-accent2-text uppercase`},Mt={class:`line-clamp-2 text-sm leading-snug font-medium group-hover:underline`},Nt={class:`flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground`},Pt={__name:`Show`,props:{post:{type:Object,required:!0},related:{type:Object,required:!0},editUrl:{type:String,default:null},form:{type:Object,default:null},content:{type:Object,default:null},comments:{type:Object,default:null},reach:{type:Object,default:null},easy:{type:Object,default:null},mustRead:{type:Object,default:null},mustReadReport:{type:Object,default:null}},setup(n){let h=n,g=v(!1),y=v(!1);function b(){k.post(`/neuigkeiten/${h.post.slug}/gelesen`,{},{preserveScroll:!0,onStart:()=>g.value=!0,onFinish:()=>g.value=!1})}let w=v(!1),E=v(null),A=v(!!h.post.liked),P=v(h.post.likes??0);O(()=>[h.post.liked,h.post.likes],([e,t])=>{A.value=!!e,P.value=t??0});function L(){let e=!A.value;A.value=e,P.value+=e?1:-1,k.visit(`/neuigkeiten/${h.post.slug}/herz`,{method:e?`post`:`delete`,preserveScroll:!0,preserveState:!0,onError:()=>{A.value=!e,P.value+=e?-1:1}})}let ee=N(()=>Math.max(1,...(h.reach?.days??[]).map(e=>e.readers))),Y=v(!1),X=v(null),Z=v(0),{y:ae}=a();O(ae,()=>{let e=X.value;if(!e)return;let t=e.getBoundingClientRect(),n=t.height-window.innerHeight*.6;Z.value=Math.min(100,Math.max(0,-t.top/Math.max(n,1)*100))});let Q=v(!1);async function oe(){try{await navigator.clipboard.writeText(window.location.href),Q.value=!0,setTimeout(()=>Q.value=!1,2e3)}catch{window.prompt(`Link zum Beitrag:`,window.location.href)}}let $=e=>[e?.department,e?.job_title].filter(Boolean).join(` | `),se=()=>`mailto:?subject=${encodeURIComponent(h.post.title)}&body=${encodeURIComponent(window.location.href)}`;return(a,h)=>(D(),s(ne,{title:n.post.title},{default:T(()=>[S(q,{title:n.post.title,breadcrumbs:[{label:`Neuigkeiten`,href:`/neuigkeiten`}]},l({description:T(()=>[n.post.teaser?(D(),p(`span`,Ie,o(n.post.teaser),1)):M(``,!0),f(`span`,Le,[n.post.category?(D(),p(`span`,Re,o(n.post.category.name),1)):M(``,!0),f(`span`,ze,[S(m(B),{class:`size-4`}),u(` `+o(m(V)(n.post.published_at)),1)]),f(`span`,Be,[S(m(R),{class:`size-4`}),u(` `+o(n.post.reading_minutes)+` Min. Lesezeit`,1)]),P.value?(D(),p(`span`,Ve,[S(m(U),{class:`size-4`}),u(` `+o(P.value),1)])):M(``,!0),n.comments?.count?(D(),p(`a`,He,[S(m(G),{class:`size-4`}),u(` `+o(n.comments.count)+` `+o(n.comments.count===1?`Kommentar`:`Kommentare`),1)])):M(``,!0)])]),_:2},[n.editUrl?{name:`actions`,fn:T(()=>[S(m(i),{variant:`outline`,size:`sm`,"as-child":``},{default:T(()=>[S(m(x),{href:n.editUrl},{default:T(()=>[S(m(te)),h[3]||=u(` Bearbeiten`,-1)]),_:1},8,[`href`])]),_:1})]),key:`0`}:void 0]),1032,[`title`]),f(`div`,Ue,[f(`div`,{class:`h-full bg-brand transition-[width] duration-150`,style:C({width:`${Z.value}%`})},null,4)]),n.post.cover_url?(D(),p(`img`,{key:0,src:n.post.cover_url,alt:n.post.title,class:`mb-6 aspect-[2/1] max-h-[460px] w-full rounded-xl object-cover shadow-xs`},null,8,We)):M(``,!0),f(`div`,Ge,[f(`div`,Ke,[f(`article`,{ref_key:`article`,ref:X,class:`min-w-0 rounded-xl border bg-card p-6 shadow-xs sm:p-10`},[n.post.author?(D(),p(`div`,qe,[S(J,{person:n.post.author,class:`size-11`},null,8,[`person`]),f(`div`,Je,[S(m(x),{href:`/personen/${n.post.author.id}`,class:`font-semibold hover:underline`},{default:T(()=>[u(o(n.post.author.name),1)]),_:1},8,[`href`]),$(n.post.author)?(D(),p(`p`,Ye,o($(n.post.author)),1)):M(``,!0)])])):M(``,!0),n.mustRead&&!n.mustRead.acknowledged_at?(D(),p(`div`,Xe,[S(m(F),{class:`mt-0.5 size-5 shrink-0`}),f(`p`,null,[h[4]||=f(`strong`,null,`Pflichtlektüre:`,-1),h[5]||=u(` Bitte lesen Sie den Beitrag und bestätigen Sie am Ende „Gelesen und verstanden“`,-1),n.mustRead.until?(D(),p(j,{key:0},[u(` – bis `+o(m(V)(n.mustRead.until)),1)],64)):M(``,!0),h[6]||=u(`.`,-1)])])):M(``,!0),S(K,{modelValue:w.value,"onUpdate:modelValue":h[0]||=e=>w.value=e,easy:n.easy,"read-source":()=>`${n.post.title}.\n${n.post.teaser??``}\n${E.value?.innerText??``}`,class:`-mt-2 mb-6`},null,8,[`modelValue`,`easy`,`read-source`]),f(`div`,{ref_key:`body`,ref:E},[w.value&&n.easy?.html?(D(),p(`div`,{key:0,class:`prose prose-neutral max-w-none text-[17px] leading-relaxed prose-headings:tracking-tight dark:prose-invert`,lang:`de`,innerHTML:n.easy.html},null,8,Ze)):n.content?(D(),s(W,{key:1,content:n.content},null,8,[`content`])):(D(),p(`div`,{key:2,class:`prose prose-neutral max-w-none prose-headings:tracking-tight prose-h2:mt-10 prose-a:text-brand-text prose-blockquote:border-l-brand prose-blockquote:bg-brand-soft/50 prose-blockquote:py-1 prose-blockquote:not-italic prose-img:rounded-lg dark:prose-invert first-of-type:prose-p:text-lg`,innerHTML:n.post.body_html},null,8,Qe))],512),n.mustRead?(D(),p(`div`,{key:2,class:c([`mt-10 flex flex-wrap items-center gap-4 rounded-lg border p-5`,n.mustRead.acknowledged_at?`border-emerald-300 bg-emerald-50 dark:border-emerald-800 dark:bg-emerald-950/40`:`bg-muted/50`])},[n.mustRead.acknowledged_at?(D(),p(j,{key:0},[S(m(e),{class:`size-6 shrink-0 text-emerald-700 dark:text-emerald-400`}),f(`p`,$e,`Sie haben diesen Beitrag am `+o(m(V)(n.mustRead.acknowledged_at))+` gelesen und bestätigt.`,1)],64)):(D(),p(j,{key:1},[h[8]||=f(`p`,{class:`min-w-0 flex-1 text-sm`},[f(`strong`,null,`Gelesen?`),u(` Bitte bestätigen Sie, dass Sie den Inhalt gelesen und verstanden haben.`)],-1),S(m(i),{disabled:g.value,onClick:b},{default:T(()=>[g.value?(D(),s(m(r),{key:0,class:`animate-spin`})):(D(),s(m(t),{key:1})),h[7]||=u(` Gelesen und verstanden`,-1)]),_:1},8,[`disabled`])],64))],2)):M(``,!0),n.form?(D(),s(W,{key:3,content:n.form,class:`mt-10`},null,8,[`content`])):M(``,!0),f(`footer`,et,[S(m(i),{variant:`outline`,size:`sm`,"aria-pressed":A.value,class:c(A.value?`border-brand/40 bg-brand-soft text-brand-text hover:bg-brand-soft hover:text-brand-text`:``),onClick:L},{default:T(()=>[S(m(U),{class:c(A.value?`fill-current`:``)},null,8,[`class`]),u(` `+o(A.value?`Gefällt mir`:`Herz geben`),1),P.value?(D(),p(`span`,tt,` · `+o(P.value),1)):M(``,!0)]),_:1},8,[`aria-pressed`,`class`]),h[10]||=f(`span`,{class:`mr-2 ml-auto text-sm text-muted-foreground max-sm:ml-0`},`Beitrag teilen:`,-1),S(m(i),{variant:`outline`,size:`sm`,onClick:oe},{default:T(()=>[(D(),s(d(Q.value?m(t):m(I)))),u(` `+o(Q.value?`Link kopiert`:`Link kopieren`),1)]),_:1}),S(m(i),{variant:`outline`,size:`sm`,"as-child":``},{default:T(()=>[f(`a`,{href:se()},[S(m(H)),h[9]||=u(` Per E-Mail`,-1)],8,nt)]),_:1})])],512),n.comments?(D(),s(Fe,{key:0,"post-slug":n.post.slug,comments:n.comments},null,8,[`post-slug`,`comments`])):M(``,!0)]),f(`aside`,rt,[n.post.author?(D(),p(`section`,it,[h[11]||=f(`h2`,{class:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},`Geschrieben von`,-1),S(m(x),{href:`/personen/${n.post.author.id}`,class:`flex items-center gap-3 rounded-lg p-1 hover:bg-accent/50`},{default:T(()=>[S(J,{person:n.post.author,class:`size-14`},null,8,[`person`]),f(`span`,at,[f(`span`,ot,o(n.post.author.name),1),$(n.post.author)?(D(),p(`span`,st,o($(n.post.author)),1)):M(``,!0)])]),_:1},8,[`href`])])):M(``,!0),n.mustReadReport?(D(),p(`section`,ct,[f(`h2`,lt,[S(m(F),{class:`size-3.5`}),h[12]||=u(` Lesebestätigungen`,-1)]),f(`p`,ut,[u(o(n.mustReadReport.confirmed)+` `,1),f(`span`,dt,`von `+o(n.mustReadReport.audience),1)]),f(`div`,ft,[f(`div`,{class:`h-full rounded-full bg-brand`,style:C({width:`${n.mustReadReport.audience?Math.round(n.mustReadReport.confirmed/n.mustReadReport.audience*100):0}%`})},null,4)]),n.mustReadReport.missing.length?(D(),p(`div`,pt,[f(`button`,{type:`button`,class:`text-[13px] font-medium text-brand-text hover:underline`,onClick:h[1]||=e=>y.value=!y.value},o(y.value?`Ausblenden`:`Wer fehlt noch? (${n.mustReadReport.audience-n.mustReadReport.confirmed})`),1),y.value?(D(),p(`ul`,mt,[(D(!0),p(j,null,_(n.mustReadReport.missing,e=>(D(),p(`li`,{key:e},o(e),1))),128))])):M(``,!0)])):M(``,!0)])):M(``,!0),n.reach?(D(),p(`section`,ht,[f(`h2`,gt,[S(m(ie),{class:`size-3.5`}),h[13]||=u(` Reichweite`,-1)]),f(`dl`,_t,[f(`div`,null,[h[14]||=f(`dt`,{class:`text-[11px] text-muted-foreground`},`Gelesen`,-1),f(`dd`,vt,o(n.reach.readers),1)]),f(`div`,null,[h[15]||=f(`dt`,{class:`text-[11px] text-muted-foreground`},`der Belegschaft`,-1),f(`dd`,yt,o(n.reach.share)+` %`,1)]),f(`div`,null,[h[16]||=f(`dt`,{class:`text-[11px] text-muted-foreground`},`Herzen`,-1),f(`dd`,bt,o(n.reach.likes),1)])]),n.reach.days.length>1?(D(),p(`div`,xt,[f(`div`,{class:`flex h-16 items-end gap-0.5`,role:`img`,"aria-label":`Lesende je Tag in den ersten ${n.reach.days.length} Tagen`},[(D(!0),p(j,null,_(n.reach.days,e=>(D(),p(`div`,{key:e.date,class:`flex-1 rounded-t-sm bg-brand/70`,style:C({height:`${Math.max(4,e.readers/ee.value*100)}%`}),title:`${m(z)(e.date)}: ${e.readers}`},null,12,Ct))),128))],8,St),h[17]||=f(`p`,{class:`mt-1 text-[11px] text-muted-foreground`},`Lesende je Tag seit Veröffentlichung`,-1)])):M(``,!0),n.reach.likers.length?(D(),p(`div`,wt,[f(`button`,{type:`button`,class:`text-[13px] font-medium text-brand-text hover:underline`,onClick:h[2]||=e=>Y.value=!Y.value},o(Y.value?`Ausblenden`:`Wer hat ein Herz gegeben?`),1),Y.value?(D(),p(`p`,Tt,o(n.reach.likers.join(`, `)),1)):M(``,!0)])):M(``,!0),h[18]||=f(`p`,{class:`mt-3 text-[11px] leading-snug text-muted-foreground`},`Gezählt wird anonym: jede Person einmal, ohne festzuhalten, wer gelesen hat.`,-1)])):M(``,!0),n.related.data.length?(D(),p(`section`,Et,[h[20]||=f(`h2`,{class:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},`Weitere Beiträge`,-1),f(`ul`,Dt,[(D(!0),p(j,null,_(n.related.data,e=>(D(),p(`li`,{key:e.id},[S(m(x),{href:`/neuigkeiten/${e.slug}`,class:`group flex gap-3 rounded-lg p-2 hover:bg-accent/50`},{default:T(()=>[e.thumb_url?(D(),p(`img`,{key:0,src:e.thumb_url,alt:``,loading:`lazy`,class:`h-16 w-20 shrink-0 rounded-md object-cover`},null,8,Ot)):(D(),p(`span`,kt,[S(m(B),{class:`size-5`})])),f(`span`,At,[e.category?(D(),p(`span`,jt,o(e.category.name),1)):M(``,!0),f(`span`,Mt,o(e.title),1),f(`span`,Nt,[u(o(m(z)(e.published_at))+` `,1),S(re,{post:e},null,8,[`post`])])])]),_:2},1032,[`href`])]))),128))]),S(m(x),{href:`/neuigkeiten`,class:`mt-3 block border-t pt-3 text-[13px] font-medium text-brand-text hover:underline`},{default:T(()=>[...h[19]||=[u(`Alle Neuigkeiten`,-1)]]),_:1})])):M(``,!0)])])]),_:1},8,[`title`]))}};export{Pt as default}; |