1import{C as e,S as t,_ as n,c as r,g as i,l as a,m as o,t as s,u as c,v as l,w as u,x as d}from"./xsDMLkkz.js";function f(){let{user:f}=s();async function p(t,n=`contact`){let{db:i}=r();await a(e(i,`tempai_contacts`),{kind:n,uid:f.value?.uid??``,name:t.name.trim(),email:t.email.trim(),subject:t.subject.trim(),message:t.message.trim(),status:`new`,reply:``,createdAt:new Date().toISOString(),repliedAt:``,repliedBy:``})}function m(n){let a=f.value?.uid;if(!a)return n.value=[],()=>{};let{db:o}=r();return i(l(e(o,`tempai_contacts`),t(`uid`,`==`,a)),e=>{n.value=e.docs.map(e=>({...e.data(),id:e.id})).sort((e,t)=>e.createdAt<t.createdAt?1:-1)},e=>console.warn(`contacts`,e))}async function h(){let{db:t}=r();return(await o(l(e(t,`tempai_contacts`),n(`createdAt`,`desc`)))).docs.map(e=>({...e.data(),id:e.id}))}async function g(e,t){let{db:n}=r(),i=t.trim();await d(u(n,`tempai_contacts`,e),{reply:i,status:i?`replied`:`new`,repliedAt:i?new Date().toISOString():``,repliedBy:i?f.value?.email??``:``})}async function _(e){let{db:t}=r();await c(u(t,`tempai_contacts`,e))}return{send:p,watchMine:m,listAll:h,reply:g,remove:_}}export{f as t};
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.