1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f5fe9a28-3109-5e43-b35d-dee26fea0e93")}catch(e){}}(); 3import{$t as e,Bn as t,Bt as n,D as r,E as i,Gt as a,H as o,Ht as s,In as c,Jt as l,Kt as u,Mt as d,Nn as f,O as p,On as m,Q as h,Rt as g,V as _,Vt as v,Y as y,_n as b,br as x,h as S,j as C,k as w,pn as T,qn as E,tr as D,zt as O}from"./CRN0ZWjI.js";import{h as k,t as A}from"./BetLQkGc.js";import{r as j,t as M}from"#entry";import{t as N}from"./CVUfgejn.js";e(),D(),f();var P={class:`d-flex flex-column`},F={class:`font-weight-semibold mb-1`},I={class:`text-gray-2`},L=Object.assign(l({__name:`Preview`,props:{info:{}},setup(e){let t=e,n=e=>{let t=document.createElement(`div`);return t.innerHTML=e,t.textContent||t.innerText||``},r=g(()=>{let e=n(t.info.message);return e.length>100?e.substring(0,100)+`...`:e});return(t,n)=>(T(),s(`div`,P,[O(`div`,F,x(e.info.subject),1),O(`div`,I,x(E(r)),1)]))}}),{__name:`NotificationsPreview`}),R=()=>{let{axios:e}=A(),t=`notifications`,n=async n=>await e.post(`${t}/${n}/read`),r=async()=>await e.post(`${t}/read-all`);return{...j(t),markAsRead:n,markAllAsRead:r}};f(),e(),D();var z={class:`d-flex align-center w-100 mb-2`},B={class:`text-title-large text-gray-2 font-weight-bold`},V={key:0,class:`d-flex align-center flex-wrap ga-3`},H={key:1,class:`d-flex align-center ga-2 text-gray-3`},U={class:`text-body-small font-weight-medium`},W={key:2,class:`d-flex align-center ga-2 text-gray-3 ms-2`},G={class:`text-body-small font-weight-medium`},K=[`innerHTML`],q=Object.assign(M(l({__name:`Details`,props:{item:{},categories:{},permissions:{}},emits:[`submit`,`open`,`close`],setup(e,{expose:l,emit:f}){let g=e,D=f,A=R(),j=N(),M=t(!1),P=t(10),F=t(!0),I=null,L=async()=>{if(M.value=!0,g.item?.category===`critical`?(F.value=!1,P.value=10,I=k(()=>{--P.value,P.value<=0&&(F.value=!0,I&&=(clearInterval(I),null))},1e3)):F.value=!0,g.item&&!g.item.was_read)try{await A.markAsRead(g.item.id)}catch(e){j.show({title:e?.message,type:`error`})}D(`open`)},q=e=>({"alert-danger":`error`,"alert-success":`success`,"alert-warning":`warning`,"alert-info":`info`,"alert-primary":`primary`,"alert-secondary":`secondary`})[e]||`primary`,J=()=>{F.value&&(I&&=(clearInterval(I),null),M.value=!1,D(`close`))};return l({open:L,close:J}),(t,l)=>(T(),s(`div`,null,[O(`div`,{onClick:L},[b(t.$slots,`default`,{},void 0,!0)]),u(C,{modelValue:E(M),"onUpdate:modelValue":l[0]||=e=>c(M)?M.value=e:null,persistent:``,"max-width":`900`,style:{"z-index":`11000`},scrollable:``},{default:m(()=>[u(i,{class:`rounded-lg`},{default:m(()=>[e.item?.category===`ad`?v(``,!0):(T(),s(d,{key:0},[u(p,{class:`d-flex flex-column align-start bg-gray-6 pa-4 py-3`},{default:m(()=>[O(`div`,z,[O(`div`,B,x(e.item?.subject||t.$t(`notifications.details.no_subject`)),1),u(S),e.item.category===`critical`?v(``,!0):(T(),n(y,{key:0,icon:``,size:`x-small`,color:`gray-3`,variant:`text`,onClick:J},{default:m(()=>[u(h,null,{default:m(()=>[...l[1]||=[a(`uil-times`,-1)]]),_:1})]),_:1}))]),e.item?(T(),s(`div`,V,[e.item.category&&e.categories?(T(),n(o,{key:0,size:`x-small`,color:q(e.item.color),variant:`tonal`},{default:m(()=>[O(`b`,null,x(e.categories[e.item.category]),1)]),_:1},8,[`color`])):v(``,!0),e.item.created_at?(T(),s(`div`,H,[u(h,{size:`14`},{default:m(()=>[...l[2]||=[a(`uil-clock`,-1)]]),_:1}),O(`span`,U,x(e.item.created_at),1)])):v(``,!0),e.item.author?(T(),s(`div`,W,[u(h,{size:`14`},{default:m(()=>[...l[3]||=[a(`uil-user`,-1)]]),_:1}),O(`span`,G,x(e.item.author),1)])):v(``,!0)])):v(``,!0)]),_:1}),u(_)],64)),u(r,{class:`pa-4`},{default:m(()=>[e.item?(T(),s(`div`,{key:0,class:`notification-content text-body-large`,innerHTML:e.item.message},null,8,K)):v(``,!0)]),_:1}),u(_),u(w,{class:`pa-4`},{default:m(()=>[u(S),u(y,{class:`text-white`,"min-width":`120`,color:`primary`,variant:`flat`,disabled:!E(F),onClick:J},{default:m(()=>[E(F)?(T(),s(d,{key:1},[a(x(t.$t(`global.buttons.close`)),1)],64)):(T(),s(d,{key:0},[a(x(t.$t(`global.buttons.close`))+` (`+x(E(P))+`) `,1)],64))]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`modelValue`])]))}}),[[`__scopeId`,`data-v-44489187`]]),{__name:`NotificationsDetails`});export{R as n,L as r,q as t}; 4//# debugId=f5fe9a28-3109-5e43-b35d-dee26fea0e93
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.