PageSourceSearch

https://demandletter.ai/_nuxt/B_YPSg8J.js

js demandletter.ai collected 2026-10-05 11:57:23 UTC 44,596 bytes, 2 lines download raw bytes

1import{c as se,q as ne,o as a,j as n,k as e,R as qe,y as Ne,N as bt,M as ee,m as c,w as Fe,$ as yt,a0 as xt,a1 as gt,v as t,X as ht,l as d,p as z,B as Oe,I as y,aa as _t,K as l,e as V,a as kt,Z as wt,s as St,b as Ct,_ as Pt,h as Mt,F as Q,x as W,A as F,z as At,D as O,E as G,ab as Vt,S as Ce,a7 as be,a4 as b,f as Lt,L as Rt}from"./B53bTksZ.js";import{_ as It}from"./BCqb0bTt.js";import{C as Ut}from"./D4_QKK0Q.js";import{C as Bt}from"./DPH9u2LQ.js";import{_ as jt}from"./Cq8W-l1E.js";import{d as K}from"./CuI_f00M.js";import{u as $t}from"./DRxL9Hrm.js";import{M as zt}from"./BHm60-Yq.js";import{S as Tt,R as Dt}from"./BP1NjyYx.js";import"./q5wxc1T-.js";const Et=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],Ge=se("bookmark",Et);const qt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Nt=se("clock",qt);const Ft=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ot=se("external-link",Ft);const Gt=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],Kt=se("map-pinned",Gt);const Zt=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ht=se("monitor",Zt);const Xt=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Yt=se("smartphone",Xt),Jt={viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},Qt=["d"],Wt=ne({__name:"SocialBrandIcon",props:{path:{}},setup(_){return(T,S)=>(a(),n("svg",Jt,[e("path",{d:_.path},null,8,Qt)]))}}),er=Object.assign(Wt,{__name:"SocialBrandIcon"}),tr=["aria-labelledby"],rr=["aria-label"],sr={class:"pr-10"},ir={class:"flex h-12 w-12 items-center justify-center rounded-full bg-primary-50 text-primary","aria-hidden":"true"},ar=["id"],or={class:"mt-3 text-sm leading-6 text-ash sm:text-base"},nr={class:"mt-6 rounded-2xl border border-primary-light bg-primary-50 p-5"},lr={class:"flex items-start gap-3"},dr={class:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-white text-primary-dark","aria-hidden":"true"},cr={class:"min-w-0 pt-1"},ur={class:"text-xs font-semibold uppercase tracking-[0.08em] text-primary"},pr={key:0,class:"mt-1 text-sm font-semibold leading-6 text-primary-dark"},mr={class:"mx-1 rounded-md border border-primary-light bg-white px-2 py-1 font-sans text-xs text-ink shadow-sm"},fr={key:1,class:"mt-1 text-sm font-semibold leading-6 text-primary-dark"},vr={class:"mt-6 flex flex-col gap-3"},br=["disabled"],yr=ne({__name:"SavePagePromptModal",props:{modelValue:{type:Boolean},targetUrl:{},copy:{}},emits:["update:modelValue","opened","copy-result"],setup(_,{emit:T}){const S=_,x=T,H=_t(),X=l(null),L=l("desktop-other"),f=l(!1),P=l(!1);let R=null,Y=null,le="";const de=V(()=>["ios","android","mobile-other"].includes(L.value)),ce=V(()=>L.value==="desktop-mac"?"⌘D":L.value==="desktop-other"?"Ctrl+D":""),ye=V(()=>L.value==="ios"?S.copy.iosGuide:L.value==="android"?S.copy.androidGuide:S.copy.mobileGuide),B=()=>{const u=navigator.userAgent,Z=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;return/iPhone|iPad|iPod/i.test(u)||Z?"ios":/Android/i.test(u)?"android":/Mobi/i.test(u)||window.matchMedia("(pointer: coarse)").matches?"mobile-other":/Macintosh|Mac OS X/i.test(u)?"desktop-mac":"desktop-other"},g=()=>{x("update:modelValue",!1)},v=async()=>{if(!(!S.targetUrl||f.value)){f.value=!0;try{await navigator.clipboard.writeText(S.targetUrl),P.value=!0,x("copy-result",{deviceVariant:L.value,result:"success"}),R&&clearTimeout(R),R=setTimeout(()=>{P.value=!1},2500)}catch{x("copy-result",{deviceVariant:L.value,result:"failed"})}finally{f.value=!1}}},D=u=>{if(u.key==="Escape"){u.preventDefault(),g();return}if(u.key!=="Tab"||!X.value)return;const N=Array.from(X.value.querySelectorAll('button:not([disabled]), a[href], input
1:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(!N.length){u.preventDefault(),X.value.focus();return}const k=N[0],w=N[N.length-1];u.shiftKey&&document.activeElement===k?(u.preventDefault(),w?.focus()):!u.shiftKey&&document.activeElement===w&&(u.preventDefault(),k?.focus())},E=async()=>{L.value=B(),P.value=!1,Y=document.activeElement instanceof HTMLElement?document.activeElement:null,le=document.body.style.overflow,document.body.style.overflow="hidden",window.addEventListener("keydown",D),x("opened",L.value),await gt(),X.value?.focus()},q=()=>{document.body.style.overflow=le,window.removeEventListener("keydown",D),Y?.focus(),Y=null};return qe(()=>S.modelValue,u=>{if(u){E();return}q()}),Ne(()=>{S.modelValue&&E()}),bt(()=>{R&&clearTimeout(R),q()}),(u,Z)=>(a(),ee(xt,{to:"body"},[c(yt,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:Fe(()=>[_.modelValue?(a(),n("div",{key:0,class:"fixed inset-0 z-[100] flex items-center justify-center bg-ink/50 px-4 py-8 backdrop-blur-[2px]",onClick:Oe(g,["self"])},[e("section",{ref_key:"modalPanelRef",ref:X,class:"relative max-h-[calc(100dvh-4rem)] w-full max-w-[560px] overflow-y-auto rounded-3xl bg-white p-6 shadow-2xl outline-none sm:p-8",role:"dialog","aria-modal":"true","aria-labelledby":t(H),tabindex:"-1"},[e("button",{class:"absolute right-4 top-4 flex h-10 w-10 items-center justify-center rounded-full border border-dove bg-white text-graphite transition hover:border-primary hover:text-ink focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/15",type:"button","aria-label":_.copy.closeAria,onClick:g},[c(t(ht),{class:"h-4 w-4","aria-hidden":"true"})],8,rr),e("div",sr,[e("span",ir,[c(t(Ge),{class:"h-5 w-5"})]),e("h2",{id:t(H),class:"mt-5 font-serif text-2xl font-bold leading-tight text-ink sm:text-3xl"},d(_.copy.title),9,ar),e("p",or,d(_.copy.description),1)]),e("div",nr,[e("div",lr,[e("span",dr,[t(de)?(a(),ee(t(Yt),{key:0,class:"h-4 w-4"})):(a(),ee(t(Ht),{key:1,class:"h-4 w-4"}))]),e("div",cr,[e("p",ur,d(_.copy.guideLabel),1),t(ce)?(a(),n("p",pr,[z(d(_.copy.desktopPrefix)+" ",1),e("kbd",mr,d(t(ce)),1),z(" "+d(_.copy.desktopSuffix),1)])):(a(),n("p",fr,d(t(ye)),1))])])]),e("div",vr,[e("button",{class:"inline-flex min-h-12 w-full items-center justify-center gap-2 rounded-full bg-primary px-6 text-sm font-semibold text-white transition hover:bg-primary-dark focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-70",type:"button",disabled:t(f)||!_.targetUrl,onClick:v},[t(P)?(a(),ee(t(Ut),{key:0,class:"h-4 w-4","aria-hidden":"true"})):(a(),ee(t(Bt),{key:1,class:"h-4 w-4","aria-hidden":"true"})),z(" "+d(t(P)?_.copy.copiedAction:_.copy.copyAction),1)],8,br),e("button",{class:"inline-flex min-h-11 w-full items-center justify-center rounded-full text-sm font-semibold text-graphite transition hover:bg-fog hover:text-ink focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/10",type:"button",onClick:g},d(_.copy.closeAction),1)])],8,tr)])):y("",!0)]),_:1})]))}}),xr=Object.assign(yr,{__name:"SavePagePromptModal"}),gr={class:"bg-fog text-ink"},hr={class:"border-b border-dove bg-white px-4 py-10 sm:px-6 sm:py-12"},_r={class:"mx-auto max-w-[1120px]"},kr={class:"flex flex-col gap-6"},wr={class:"max-w-[780px]"},Sr={class:"mt-4 max-w-[720px] text-base leading-7 text-ash"},Cr={class:"px-4 py-8 sm:px-6"},Pr={class:"mx-auto max-w-[1120px]"},Mr={key:0,class:"mb-6 grid grid-cols-2 overflow-hidden rounded-2xl border border-dove bg-white"},Ar=["aria-current","onClick"],Vr={class:"mt-1 block text-sm font-semibold"},Lr={key:0,class:"absolute bottom-0 left-1/2 h-[3px] w-2/3 -translate-x-1/2 rounded-t bg-primary"},Rr={class:"min-w-0 space-y-6"},Ir={key:0,class:"rounded-3xl border border-white bg-white p-6 shadow-subtle sm:p-8"},Ur={class:"mt-7 rounded-2xl border border-primary-light bg-primary-50 p-4 sm:p-5"},Br={class:"mt-3 flex flex-col gap-3 sm:flex-row"},jr=["onKeydown"],$r=["disabled"],zr={key:0,class:"mt-5 border-t border-primary-light pt-5"},Tr={class:"flex gap-3"},Dr={class:"mt-4 flex flex-col gap-2 sm:flex-row"},Er=["href","aria-label"],qr={key:1,class:"mt-4 flex flex-col gap-3 rounded-2xl border border-primary-light bg-white px-4 py-3 text-sm text-primary-dark sm:flex-row sm:items-center sm:justify-between"},Nr={class:"flex items-center gap-3"},Fr={class:"mt-7 grid gap-4 md:grid-cols-2"},Or={class:"rounded-2xl border border-dove bg-white p-5"},Gr={class:"mt-4 whitespace-pre-line text-sm leading-6 text-ash"},Kr={class:"rounded-2xl border border-dove bg-white p-5"},Zr={class:"mt-4 whitespace-pre-line text-sm leading-6 text-ash"},Hr={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},Xr={class:"flex items-start gap-3"},Yr={key:0,class:"mt-1 text-sm leading-6 text-ash"},Jr=["disabled"],Qr={key:0,class:"mt-5 rounded-2xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm leading-6 text-amber-950"},Wr={class:"mt-7 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end"},es=["disabled"],ts={key:1,class:"rounded-3xl border border-white bg-white p-6 shadow-subtle sm:p-8"}
1,rs={class:"flex flex-col gap-4 rounded-2xl border border-primary-light bg-primary-50 p-5 sm:flex-row sm:items-center sm:p-6"},ss={class:"flex h-14 w-14 shrink-0 items-center justify-center rounded-full bg-primary text-white"},is={class:"mt-6 rounded-2xl border border-dove bg-fog p-5 sm:p-6"},as={class:"grid gap-x-8 gap-y-5 sm:grid-cols-2"},os={class:"mt-6 flex justify-end"},ns={class:"mt-10 flex flex-col gap-4 border-t border-dove pt-8 sm:flex-row sm:items-start sm:justify-between"},ls=["disabled"],ds={class:"mt-7 rounded-2xl border border-primary-light bg-primary-50 p-5"},cs={class:"mt-2 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"},us={class:"break-all font-mono text-xl font-semibold text-ink"},ps={class:"mt-7 space-y-4"},ms={class:"block text-sm font-semibold text-ink"},fs={class:"mt-1 block text-sm leading-6 text-ash"},vs={class:"mt-7 grid gap-4 sm:grid-cols-2"},bs={key:0,class:"min-w-0 space-y-6"},ys={class:"rounded-3xl border border-white bg-white p-6 shadow-subtle"},xs={class:"mt-4 space-y-4 text-sm leading-6 text-ash"},gs={key:2,class:"rounded-3xl border border-white bg-white p-6 shadow-subtle sm:p-8"},hs={key:0,class:"mt-8 rounded-2xl bg-fog p-6 text-sm text-graphite"},_s={key:1,class:"mt-8 rounded-2xl bg-fog p-6 text-sm text-graphite"},ks={key:2,class:"mt-8 space-y-4"},ws={class:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between"},Ss={class:"font-semibold text-ink"},Cs={class:"mt-1 text-sm text-graphite"},Ps={class:"mt-2 font-mono text-sm text-ink"},Ms={class:"mt-4 flex flex-wrap gap-2"},As=["href"],Vs=["href"],Ls=["href"],Rs=["href"],Is=["onClick"],Us={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-ink/45 px-4 py-8"},Bs={class:"max-h-[90vh] w-full max-w-6xl overflow-y-auto rounded-3xl bg-white p-6 shadow-2xl sm:p-8 lg:p-10"},js={class:"mt-8 grid gap-6 xl:grid-cols-2"},$s={class:"rounded-2xl border border-dove bg-fog p-6"},zs={class:"mt-4 space-y-4"},Ts={class:"grid grid-cols-1 gap-4 md:grid-cols-[minmax(0,1fr)_140px_156px]"},Ds={key:0,class:"mt-3 space-y-2 text-sm leading-6 text-red-700"},Es={class:"rounded-2xl border border-dove bg-fog p-6"},qs={class:"mt-4 space-y-4"},Ns={class:"grid grid-cols-1 gap-4 md:grid-cols-[minmax(0,1fr)_140px_156px]"},Fs={key:0,class:"mt-3 space-y-2 text-sm leading-6 text-red-700"},Os={class:"mt-8 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end"},Gs=["disabled"],Ks=["disabled"],si=ne({__name:"certified-mail",setup(_){const T=ne({props:{label:{type:String,required:!0},value:{type:String,required:!0},mono:{type:Boolean,default:!1}},template:`<div><dt class="text-xs font-semibold uppercase tracking-[0.08em] text-graphite">{{ label }}</dt><dd class="mt-1 break-words text-sm font-semibold text-ink" :class="mono ? 'font-mono' : ''">{{ value }}</dd></div>`}),S=ne({props:{title:{type:String,required:!0},description:{type:String,required:!0},url:{type:String,default:""},readyLabel:{type:String,required:!0},pendingLabel:{type:String,required:!0}},template:'<a v-if="url" class="block rounded-2xl border border-primary-light bg-white p-5 transition hover:border-primary hover:shadow-subtle" :href="url" target="_blank" rel="noopener noreferrer"><span class="block text-sm font-semibold text-ink">{{ title }}</span><span class="mt-1 block text-sm leading-6 text-ash">{{ description }}</span><span class="mt-3 inline-flex rounded-full bg-primary-50 px-2.5 py-1 text-xs font-semibold text-primary-dark">{{ readyLabel }}</span></a><div v-else class="rounded-2xl border border-dove bg-fog p-5 opacity-80"><span class="block text-sm font-semibold text-ink">{{ title }}</span><span class="mt-1 block text-sm leading-6 text-ash">{{ description }}</span><span class="mt-3 inline-flex rounded-full bg-amber-50 px-2.5 py-1 text-xs font-semibold text-amber-800">{{ pendingLabel }}</span></div>'});$t();const x=kt(),H=wt(),X=St(),L=Lt(),{t:f}=Ct(),P=Pt(),R=Mt(),Y={x:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z",threads:"M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.01
17c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.964-.065-1.19.408-2.285 1.33-3.082.88-.76 2.119-1.207 3.583-1.291a13.853 13.853 0 0 1 3.02.142c-.126-.742-.375-1.332-.75-1.757-.513-.586-1.308-.883-2.359-.89h-.029c-.844 0-1.992.232-2.721 1.32L7.734 7.847c.98-1.454 2.568-2.256 4.478-2.256h.044c3.194.02 5.097 1.975 5.287 5.388.108.046.216.094.321.142 1.49.7 2.58 1.761 3.154 3.07.797 1.82.871 4.79-1.548 7.158-1.85 1.81-4.094 2.628-7.277 2.65Zm1.003-11.69c-.242 0-.487.007-.739.021-1.836.103-2.98.946-2.916 2.143.067 1.256 1.452 1.839 2.784 1.767 1.224-.065 2.818-.543 3.086-3.71a10.5 10.5 0 0 0-2.215-.221z",discord:"M20.317 4.3698a19.7913 19.7913 0 0 0-4.8851-1.5152.0741.0741 0 0 0-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 0 0-.0785-.037 19.7363 19.7363 0 0 0-4.8852 1.515.0699.0699 0 0 0-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 0 0 .0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 0 0 .0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 0 0-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 0 1-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 0 1 .0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 0 1 .0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 0 1-.0066.1276 12.2986 12.2986 0 0 1-1.873.8914.0766.0766 0 0 0-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 0 0 .0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 0 0 .0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 0 0-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"},le=[{name:"X",action:"Visit X",url:"https://x.com/AIDemandLetter",iconPath:Y.x,iconBackgroundColor:"#000000",iconBadgeClass:"rounded-md"},{name:"Threads",action:"Visit Threads",url:"https://www.threads.com/@demandletter.ai2026",iconPath:Y.threads,iconBackgroundColor:"#000000",iconBadgeClass:"rounded-md"},{name:"Discord",action:"Join Discord",url:"https://discord.gg/6k3924NHK",iconPath:Y.discord,iconBackgroundColor:"#5865F2",iconBadgeClass:"rounded-full"}],de=V(()=>{const r=x.query.view;return Array.isArray(r)?r[0]||"":String(r||"")}),ce=[{value:1,label:"Redeem & Mail"},{value:2,label:"Sent & Track"}],ye=["USPS tracking number for delivery status","Certified Mail + Return Receipt workflow","Mailing records saved in My Letters","Download slots for letter PDF, proof of mailing, and return receipt"],B=l("flow"),g=l(1),v=l(null),D=l(""),E=l(""),q=l(""),u=l(!1),Z=l(!1),N=l(!1),k=l(""),w=l(!1),ie=l(!1),ue=l(!1),pe=l(!1),xe=l(!1),m=l(""),M=l(""),J=l(""),j=l(null),me=l(!1),ge=l(!1),he=l([]),Ke={entry_source:"certified_mail_gate",flow_context:"certified_mail"},_e=l(!1),ae=l(!1),I=l({street:"",city:"",state:"",zip:""}),U=l({street:"",city:"",state:"",zip:""}),te=l([]),re=l([]),ke=l(""),we=l(""),Pe=r=>({freeform_address:r,country_code:"US"}),fe=r=>["verified","corrected"].includes(String(r.status||"").toLowerCase()),Ze=()=>({street:"",city:"",state:"",zip:""}),Me=r=>{const s=String(r||"").trim();if(!s)return Ze();const o=s.split(",").map(p=>p.trim()).filter(Boolean);return{street:o[0]||"",city:o[1]||"",state:(o[2]||"").toUpperCase(),zip:o[3]||""}},Ae=r=>[r.street.trim(),r.city.trim(),r.state.trim().toUpperCase(),r.zip.trim()].filter(Boolean).join(", "),Ve=r=>!!(r.street.trim()&&r.city.trim()&&r.state.trim()&&r.zip.trim()),Le=(r,s)=>r.standardized_address?.formatted_address?.trim()||[r.standardized_address?.line1,r.standardized_address?.line2,r.standardized_address?.city,r.standardized_address?.province_or_state,r.standardized_address?.postal_or_zip,r.standardized_address?.country_code].filter(
1Boolean).join(", ")||s,ve=r=>{const s=Object.entries(r.errors||{});return s.length?s.flatMap(([o,p])=>{if(!p?.length)return[o];const A=o==="provinceOrState"?"State":o==="postalOrZip"?"ZIP":o==="city"?"City":o==="line1"?"Street address":o==="generic"?"Address":o;return p.map($=>`${A}: ${$}`)}):[]},He=(r=[],s=[])=>{I.value=Me(v.value?.sender_address),U.value=Me(v.value?.recipient_mailing_address),te.value=r,re.value=s,_e.value=!0},Re=()=>{_e.value=!1,te.value=[],re.value=[]},Ie=async(r,s)=>{const[o,p]=await Promise.all([K.verifyAddress(Pe(r)),K.verifyAddress(Pe(s))]);return{senderResult:o,recipientResult:p}},Ue=async(r,s,o,p)=>{if(!h.value||!v.value)return;const A=Le(r,o),$=Le(s,p);await K.updateCertifiedMailAddresses(h.value,{sender_address:A,recipient_mailing_address:$}),v.value={...v.value,sender_address:A,recipient_mailing_address:$}},C=r=>new URLSearchParams(window.location.search).get(r)||"",h=V(()=>{const r=x.query.letter_id||x.query.letterId,s=Array.isArray(r)?r[0]||"":String(r||"");return s||ke.value||C("letter_id")||C("letterId")||""}),Be=V(()=>{const r=x.query.mailing_id||x.query.mailingId,s=Array.isArray(r)?r[0]||"":String(r||"");return s||we.value||C("mailing_id")||C("mailingId")||""}),Xe=V(()=>{if(!h.value||!m.value)return"";const r=H.resolve({path:x.path,query:{letter_id:h.value,mailing_id:m.value,source:"saved_status_link"}});return new URL(r.href,window.location.origin).toString()}),Ye=V(()=>({title:f("savePrompt.title"),description:f("savePrompt.description"),guideLabel:f("savePrompt.guideLabel"),desktopPrefix:f("savePrompt.desktopPrefix"),desktopSuffix:f("savePrompt.desktopSuffix"),iosGuide:f("savePrompt.iosGuide"),androidGuide:f("savePrompt.androidGuide"),mobileGuide:f("savePrompt.mobileGuide"),copyAction:f("savePrompt.copy"),copiedAction:f("savePrompt.copied"),closeAction:f("savePrompt.closeAction"),closeAria:f("savePrompt.closeAria")})),je=(r,s,o)=>{const p=[r,o,s].filter(Boolean).map(A=>String(A).trim()).filter(Boolean);return p.length?p.join(`
2`):"Missing address details. Return to the letter creator and complete contact information before mailing."},Je=V(()=>je(v.value?.sender_name,v.value?.sender_address)),Qe=V(()=>je(v.value?.recipient_name,v.value?.recipient_mailing_address,v.value?.recipient_company)),$e=V(()=>!!(h.value&&u.value&&w.value&&!ie.value)),ze=()=>{!h.value||!m.value||(ue.value=!0)},We=r=>{const s=`demandletter:mail-save-prompt-viewed:${m.value}`;sessionStorage.getItem(s)||(sessionStorage.setItem(s,"1"),P.trackMailSavePromptViewed({mailing_id:m.value,device_variant:r}))},et=r=>{if(P.trackMailSaveLinkCopied({mailing_id:m.value,device_variant:r.deviceVariant,result:r.result}),r.result==="success"){b.success(f("savePrompt.copySuccess"));return}b.error(f("savePrompt.copyFailed"))},tt=V(()=>{const r=j.value?.status||(M.value?"sent":"processing");return[{label:"Mailing order created",description:"Your mailing order has been successfully created.",done:!!m.value},{label:"Submitted for printing",description:"The provider prepares the PDF and envelope for USPS handoff.",done:["processing","sent","in_transit","delivered"].includes(r)&&!!m.value},{label:"USPS tracking active",description:M.value||"Tracking appears after USPS scans the mailpiece.",done:!!M.value},{label:"Delivered and return receipt available",description:J.value?`Estimated delivery ${J.value}`:"Return receipt appears after delivery is confirmed.",done:r==="delivered"}]}),rt=r=>(r||"unknown").replaceAll("_"," ").replace(/^./,s=>s.toUpperCase()),st=r=>r==="delivered"?"bg-primary-50 text-primary-dark":r==="error"||r==="returned"?"bg-red-50 text-red-700":r==="sent"||r==="in_transit"?"bg-blue-50 text-blue-700":"bg-fog text-graphite",it=r=>{const o=r?.data??r;return o?.data??o},at=async r=>{const s=String(L.public.apiBase||"/api").replace(/\/$/,""),o=await $fetch(`${s}/v1/demand-letter/letters/${encodeURIComponent(r)}`,{credentials:"include",headers:{accept:"application/json"}});return it(o)},Te=async()=>{if(!h.value){D.value="No letter_id was provided. Generate a demand letter first, then choose Certified Mail.";return}D.value="";try{const r=await at(h.value)||await K.getLetterDetail(h.value);if(!r?.letter_id){D.value="Letter details were loaded but the response did not include a valid letter_id.",v.value=null;return}v.value=r,w.value=!1,k.value=""}catch(r){D.value=r instanceof Error?r.message:"Letter details could not be loaded."}},Se=async()=>{ge.value=!0;try{const r=await K.listCertifiedMail();
2he.value=r.items||[]}catch{b.error("My Letters could not be loaded.")}finally{ge.value=!1}},De=async()=>{const r=E.value.trim().toUpperCase();if(!r){b.warning("Enter an early bird code first.");return}Z.value=!0;try{const s=await K.redeemCertifiedMailPromo(r,h.value);if(s.mail_method!=="certified")throw new Error(`This code only supports ${s.mail_method} mail.`);q.value=s.code,E.value=s.code,u.value=!0,b.success("Code applied. Certified mailing is free.")}catch{u.value=!1,q.value="",b.error("Early Bird code is invalid. Please check and try again.")}finally{Z.value=!1}},ot=()=>{u.value=!1,q.value="",E.value=""},nt=async()=>{if(!u.value){k.value="Please apply a valid early bird code before verifying addresses.",b.warning(k.value);return}const r=String(v.value?.sender_address||"").trim(),s=String(v.value?.recipient_mailing_address||"").trim();if(!r||!s){k.value="Both sender and recipient mailing addresses are required before verification.",b.warning(k.value);return}N.value=!0,k.value="",w.value=!1;try{const{senderResult:o,recipientResult:p}=await Ie(r,s),A=fe(o),$=fe(p);if(w.value=A&&$,k.value=w.value?"Sender and recipient addresses were verified successfully.":[o.message,p.message].filter(Boolean).join(" ")||"Address verification did not complete successfully.",!w.value){He(ve(o),ve(p)),b.error("Address verification failed. Update the mailing addresses and try again.");return}await Ue(o,p,r,s),b.success("Addresses verified successfully.")}catch(o){k.value=o instanceof Error?o.message:"Address verification failed.",b.error(k.value)}finally{N.value=!1}},lt=async()=>{if(!h.value||!v.value){b.error("Letter details could not be loaded.");return}if(!Ve(I.value)||!Ve(U.value)){b.warning("Complete street, city, state, and ZIP for both addresses before saving.");return}const r=Ae(I.value),s=Ae(U.value);ae.value=!0,te.value=[],re.value=[];try{const{senderResult:o,recipientResult:p}=await Ie(r,s),A=fe(o),$=fe(p);if(!A||!$){te.value=ve(o),re.value=ve(p),b.error("Address verification failed. Update the mailing addresses and try again.");return}await K.updateCertifiedMailAddresses(h.value,{sender_address:r,recipient_mailing_address:s}),v.value={...v.value,sender_address:r,recipient_mailing_address:s},await Ue(o,p,r,s),w.value=!0,k.value="Verification successful!",Re(),b.success("Addresses verified successfully.")}catch(o){b.error(o instanceof Error?o.message:"The updated addresses could not be saved.")}finally{ae.value=!1}},dt=async()=>(R.initialized||await R.refreshCurrentUser(),R.isSignedIn?!0:(xe.value=!0,pe.value=!0,!1)),Ee=async()=>{if($e.value&&await dt()){ie.value=!0,P.trackMailOrderStarted({letter_id:h.value,mail_method:"certified"});try{const r=await K.createCertifiedMail({letter_id:h.value,mail_method:"certified",promo_code:q.value});m.value=r.mailing_id,M.value=r.tracking_number||"",J.value=r.estimated_delivery_date||"",g.value=2,P.trackMailOrderSucceeded({letter_id:h.value,mailing_id:r.mailing_id,mail_method:"certified",tracking_number:r.tracking_number||""}),b.success("Certified mail order created."),await H.replace({query:{...x.query,mailing_id:r.mailing_id}}),ze(),await Promise.all([oe(),Se()])}catch(r){P.trackMailOrderFailed({letter_id:h.value,mail_method:"certified",error_code:r instanceof Error?r.name:"unknown_error"}),b.error("Mailing order could not be created.")}finally{ie.value=!1}}},ct=async()=>{!xe.value||ie.value||(await R.refreshCurrentUser(),xe.value=!1,R.isSignedIn&&await Ee())},oe=async()=>{if(m.value){me.value=!0;try{j.value=await K.getCertifiedMailStatus(m.value),M.value=j.value.tracking_number||M.value,J.value=j.value.estimated_delivery_date||J.value}catch{b.error("Tracking status could not be refreshed.")}finally{me.value=!1}}},ut=async()=>{M.value&&(await navigator.clipboard.writeText(M.value),b.success("Tracking number copied."))},pt=r=>{r===2&&!m.value||(g.value=r,B.value="flow",r===2&&oe())},mt=async()=>{B.value="flow";const r={...x.query};delete r.view,await H.replace({query:r})},ft=async r=>{m.value=r.mailing_id,M.value=r.tracking_number||"",J.value=r.estimated_delivery_date||"",j.value=r,B.value="flow",g.value=2,await H.replace({query:{...x.query,mailing_id:r.mailing_id,letter_id:r.letter_id}})};return Ne(async()=>
2{if(ke.value=C("letter_id")||C("letterId"),we.value=C("mailing_id")||C("mailingId"),m.value=Be.value,C("source")==="saved_status_link"&&m.value&&P.trackMailStatusViewed({mailing_id:m.value,source:"saved_status_link"}),await Promise.all([Te(),Se()]),de.value==="letters"){B.value="letters";return}m.value&&(g.value=2,await oe())}),qe(()=>[x.query.letter_id,x.query.letterId,x.query.mailing_id,x.query.mailingId,x.query.view],async()=>{if(ke.value=C("letter_id")||C("letterId"),we.value=C("mailing_id")||C("mailingId"),m.value=Be.value,B.value=de.value==="letters"?"letters":"flow",!!h.value){if(await Te(),B.value==="letters"){await Se();return}m.value&&(g.value=2,await oe())}}),(r,s)=>{const o=er,p=It,A=xr,$=jt;return a(),n("main",gr,[e("section",hr,[e("div",_r,[e("div",kr,[e("div",wr,[s[11]||(s[11]=e("p",{class:"inline-flex items-center gap-2 rounded-full bg-primary-50 px-3 py-1.5 text-xs font-semibold uppercase tracking-[0.08em] text-primary-dark"},[e("span",{class:"h-2 w-2 rounded-full bg-primary"}),z(" USPS Certified Mail - Free with early bird code ")],-1)),s[12]||(s[12]=e("h1",{class:"mt-5 font-serif text-[clamp(36px,5vw,64px)] font-bold leading-[1.06] text-ink"},"Mail your demand letter via Certified Mail",-1)),e("p",Sr,d(t(f)("hero.description")),1)])])])]),e("section",Cr,[e("div",Pr,[t(B)==="flow"?(a(),n("div",Mr,[(a(),n(Q,null,W(ce,i=>e("button",{key:i.value,class:F(["relative min-h-[74px] px-3 py-3 text-center transition",i.value===t(g)?"text-ink":"text-graphite"]),type:"button","aria-current":i.value===t(g)?"step":void 0,onClick:vt=>pt(i.value)},[e("span",{class:F(["block text-xs font-semibold uppercase tracking-[0.08em]",i.value<=t(g)?"text-primary":"text-dove"])},"Step "+d(i.value),3),e("span",Vr,d(i.label),1),i.value===t(g)?(a(),n("span",Lr)):y("",!0)],10,Ar)),64))])):y("",!0),t(B)==="flow"?(a(),n("section",{key:1,class:F(t(g)===1?"grid gap-6 lg:grid-cols-[1.25fr_0.75fr]":"")},[e("div",Rr,[t(g)===1?(a(),n("section",Ir,[s[20]||(s[20]=At('<div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between"><div><p class="text-sm font-semibold text-primary">Redeem &amp; Mail</p><h2 class="mt-1 font-serif text-3xl font-bold leading-tight text-ink">Unlock free certified mailing </h2><p class="mt-2 text-sm leading-6 text-ash">Enter your early bird code, verify the imported addresses, then submit the letter for printing and USPS delivery.</p></div><div class="flex w-full items-baseline justify-center gap-3 rounded-2xl bg-primary-50 px-5 py-3 text-right sm:block sm:w-auto sm:shrink-0 sm:py-4"><div class="text-sm font-semibold text-graphite"><span class="line-through">$49</span></div><div class="text-3xl font-bold leading-none text-primary">$0</div></div></div>',1)),e("div",Ur,[s[15]||(s[15]=e("label",{class:"block text-sm font-semibold text-primary-dark",for:"promo-code"},"Early bird code",-1)),e("div",Br,[O(e("input",{id:"promo-code","onUpdate:modelValue":s[0]||(s[0]=i=>Ce(E)?E.value=i:null),class:"h-12 w-full min-w-0 shrink-0 rounded-2xl border border-primary-light bg-white px-4 text-sm font-semibold uppercase outline-none transition placeholder:normal-case placeholder:text-graphite focus:border-primary focus:ring-4 focus:ring-primary/10 sm:flex-1 sm:shrink",placeholder:"EARLYBIRD2026",autocomplete:"off",autocapitalize:"characters",onKeydown:Vt(Oe(De,["prevent"]),["enter"])},null,40,jr),[[G,t(E)]]),e("button",{class:"inline-flex h-12 items-center justify-center rounded-full bg-primary px-6 text-sm font-semibold text-white transition hover:bg-primary-dark disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:t(Z),onClick:De},d(t(Z)?"Checking...":"Redeem Code"),9,$r)]),t(u)?y("",!0):(a(),n("div",zr,[e("div",Tr,[c(t(zt),{class:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),s[13]||(s[13]=e("div",null,[e("h3",{class:"text-sm font-semibold text-ink"},"Need an early bird code?"),e("p",{class:"mt-1 text-sm leading-6 text-ash"},"Find the code in our latest official posts on X or Threads, or ask for one in our Discord community.")],-1))]),e("div",Dr,[(a(),n(Q,null,W(le,i=>e("a",{key:i.name,class:"inline-flex min-h-11 items-center justify-center gap-2 rounded-xl border border-primary-light bg-white px-5 text-sm font-semibold text-primary-dark transition hover:border-primary hover:bg-primary/5 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/10",href:i.url,target:"_blank",rel:"noopener noreferrer","aria-label":`${i.action} (opens in a new tab)`},[e("span",{class:F(["inline-flex h-7 w-7 shrink-0 items-center justify-center",i.iconBadgeClass]),style:Rt({backgroundColor:i.iconBackgroun
2dColor})},[c(o,{path:i.iconPath,class:"h-4 w-4 text-white"},null,8,["path"])],6),z(" "+d(i.action)+" ",1),c(t(Ot),{class:"h-3.5 w-3.5 text-graphite","aria-hidden":"true"})],8,Er)),64))])])),t(u)?(a(),n("div",qr,[e("div",Nr,[c(t(be),{class:"h-5 w-5 text-primary"}),e("span",null,[e("strong",null,d(t(q)),1),s[14]||(s[14]=z(" applied. Certified mailing is free.",-1))])]),e("button",{class:"text-sm font-semibold text-graphite transition hover:text-ink",type:"button",onClick:ot},"Remove")])):y("",!0)]),e("div",Fr,[e("article",Or,[s[16]||(s[16]=e("h3",{class:"text-sm font-semibold text-primary-dark"},"Sender",-1)),e("p",Gr,d(t(Je)),1)]),e("article",Kr,[s[17]||(s[17]=e("h3",{class:"text-sm font-semibold text-primary-dark"},"Recipient",-1)),e("p",Zr,d(t(Qe)),1)])]),e("div",{class:F(["mt-5 rounded-2xl border p-5",t(w)?"border-primary-light bg-primary-50":"border-dove bg-white"])},[e("div",Hr,[e("div",Xr,[c(t(Kt),{class:"mt-0.5 h-5 w-5 text-primary"}),e("div",null,[s[18]||(s[18]=e("h3",{class:"text-sm font-semibold text-ink"},"Address verification",-1)),t(w)?y("",!0):(a(),n("p",Yr,"Verify the imported sender and recipient addresses with the backend PostGrid validation endpoint before creating the mailing order."))])]),e("button",{class:"inline-flex min-h-11 items-center justify-center rounded-full border border-primary-light bg-white px-5 text-sm font-semibold text-primary-dark transition hover:border-primary disabled:opacity-50",type:"button",disabled:t(N)||!t(u),onClick:nt},d(t(N)?"Verifying...":t(w)?"Verified":"Verify Addresses"),9,Jr)]),t(k)?(a(),n("p",{key:0,class:F(["mt-3 text-sm leading-6",t(w)?"text-primary-dark":"text-ash"])},d(t(k)),3)):y("",!0)],2),t(D)?(a(),n("div",Qr,d(t(D)),1)):y("",!0),e("div",Wr,[c(p,{to:t(X)("/"),class:"inline-flex min-h-12 items-center justify-center rounded-full border border-dove px-6 text-sm font-semibold text-ink transition hover:border-ink"},{default:Fe(()=>[...s[19]||(s[19]=[z(" Back to creator",-1)])]),_:1},8,["to"]),e("button",{class:"inline-flex min-h-12 items-center justify-center gap-2 rounded-full bg-primary px-7 text-sm font-semibold text-white transition hover:bg-primary-dark disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:!t($e),onClick:Ee},[c(t(Tt),{class:"hidden h-4 w-4 sm:block"}),z(" "+d(t(ie)?"Submitting...":"Confirm & Send via Certified Mail"),1)],8,es)])])):y("",!0),t(g)===2?(a(),n("section",ts,[e("div",rs,[e("div",ss,[c(t(be),{class:"h-7 w-7 stroke-[1.8]","aria-hidden":"true"})]),s[21]||(s[21]=e("div",null,[e("h2",{class:"font-serif text-2xl font-bold leading-tight text-ink sm:text-3xl"}," Your mailing order was created "),e("p",{class:"mt-2 text-sm leading-6 text-ash"},"The letter has been submitted for printing and USPS Certified Mail delivery. Tracking activates when USPS scans the mailpiece.")],-1))]),e("dl",is,[e("div",as,[c(t(T),{label:"Tracking number",value:t(M)||"Pending USPS scan",mono:""},null,8,["value"]),c(t(T),{label:"Mailing ID",value:t(m)||"Pending",mono:""},null,8,["value"]),c(t(T),{label:"Service",value:"Certified Mail + Return Receipt"}),c(t(T),{label:"Estimated delivery",value:t(J)||"Pending"},null,8,["value"]),c(t(T),{label:"Promo code",value:t(q)||"None"},null,8,["value"]),c(t(T),{label:"Total",value:"$0.00"})])]),e("div",os,[t(h)&&t(m)?(a(),n("button",{key:0,class:"inline-flex min-h-11 items-center justify-center gap-2 rounded-full border border-primary-light bg-primary-50 px-5 text-sm font-semibold text-primary-dark transition hover:border-primary hover:bg-primary/10",type:"button",onClick:ze},[c(t(Ge),{class:"h-4 w-4","aria-hidden":"true"}),z(" "+d(t(f)("savePrompt.reopen")),1)])):y("",!0)]),e("div",ns,[s[23]||(s[23]=e("div",null,[e("p",{class:"text-sm font-semibold text-primary"},"USPS Tracking"),e("h2",{class:"mt-1 font-serif text-3xl font-bold leading-tight text-ink"},"Track certified mail"),e("p",{class:"mt-2 max-w-[560px] text-sm leading-6 text-ash"},"Status is read from the backend mailing record and refreshed from the provider when possible.")],-1)),e("button",{class:"inline-flex min-h-11 shrink-0 items-center justify-center gap-2 rounded-full border border-dove px-5 text-sm font-semibold text-ink transition hover:border-ink disabled:opacity-50",type:"button",disabled:t(me)||!t(m),onClick:oe},[c(t(Dt),{class:F(["h-4 w-4",t(me)?"animate-spin":""])},null,8,["class"]),s[22]||(s[22]=z(" Refresh ",-1))],8,ls)]),e("div",ds,[s[24]||(s[24]=e("div",{class:"text-xs font-semibold uppercase tracking-[0.08em] text-primary-dark"},"Certified Mail Tracking Number",-1)),e("div",cs,[e("div",us,d(t(M)||"Pending USPS scan"),1),t(M)?(a(),n("button",{key:0,class:"inline-flex min-h-10 items-center justify-center rounded-full bg-white px-4 text-sm font-semibold text-primary-dark transition hover:text-ink",type:"button",onClick:ut},"Copy")):y("",!0)])]),e("ol",ps,[(a(!0),n(Q,null,W(t(tt),i=>
2(a(),n("li",{key:i.label,class:"flex gap-4 rounded-2xl border border-dove bg-white p-4"},[e("span",{class:F(["mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full",i.done?"bg-primary text-white":"bg-fog text-graphite"])},[i.done?(a(),ee(t(be),{key:0,class:"h-4 w-4"})):(a(),ee(t(Nt),{key:1,class:"h-4 w-4"}))],2),e("span",null,[e("span",ms,d(i.label),1),e("span",fs,d(i.description),1)])]))),128))]),e("div",vs,[c(t(S),{title:"Letter PDF Copy",description:"Digital copy of your demand letter as printed",url:(t(j)?.pdf_url||t(v)?.full_text)&&t(j)?.pdf_url||"","ready-label":"Ready","pending-label":"Ready after PDF generation"},null,8,["url"]),c(t(S),{title:"Mailing Receipt",description:"Provider receipt and tracking record",url:t(j)?.receipt_url||"","ready-label":"Ready","pending-label":"Pending USPS processing"},null,8,["url"]),c(t(S),{title:"Proof of Mailing",description:"USPS-verified proof that your letter was accepted",url:t(j)?.proof_of_mailing_url||"","ready-label":"Ready","pending-label":"Pending USPS acceptance"},null,8,["url"]),c(t(S),{title:"Signed Return Receipt",description:"Available after recipient delivery and signature",url:t(j)?.return_receipt_url||"","ready-label":"Ready","pending-label":"Pending delivery"},null,8,["url"])])])):y("",!0)]),t(g)===1?(a(),n("aside",bs,[e("section",ys,[s[25]||(s[25]=e("p",{class:"text-sm font-semibold text-primary"},"What's included",-1)),e("ul",xs,[(a(),n(Q,null,W(ye,i=>e("li",{key:i,class:"flex gap-3"},[c(t(be),{class:"mt-0.5 h-4 w-4 shrink-0 text-primary"}),e("span",null,d(i),1)])),64))])])])):y("",!0)],2)):(a(),n("section",gs,[e("div",{class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},[s[26]||(s[26]=e("div",null,[e("p",{class:"text-sm font-semibold text-primary"},"My Letters"),e("h2",{class:"mt-1 font-serif text-3xl font-bold leading-tight text-ink"},"Certified mail records")],-1)),e("button",{class:"inline-flex min-h-11 items-center justify-center rounded-full border border-dove px-5 text-sm font-semibold text-ink transition hover:border-ink",type:"button",onClick:mt},"Back to mailing flow")]),t(ge)?(a(),n("div",hs,"Loading records...")):t(he).length===0?(a(),n("div",_s,"No certified mail records yet.")):(a(),n("div",ks,[(a(!0),n(Q,null,W(t(he),i=>(a(),n("article",{key:i.mailing_id,class:"rounded-2xl border border-dove bg-white p-5"},[e("div",ws,[e("div",null,[e("h3",Ss,d(i.scenario||"Demand Letter"),1),e("p",Cs,"To: "+d(i.recipient_name||i.recipient_company||"Recipient"),1),e("p",Ps,d(i.tracking_number||"Tracking pending"),1)]),e("span",{class:F(["inline-flex w-fit rounded-full px-3 py-1 text-xs font-semibold",st(i.status)])},d(rt(i.status)),3)]),e("div",Ms,[i.pdf_url?(a(),n("a",{key:0,class:"rounded-full border border-dove px-3 py-2 text-xs font-semibold text-ink transition hover:border-primary hover:text-primary-dark",href:i.pdf_url,target:"_blank",rel:"noopener noreferrer"},"Letter PDF",8,As)):y("",!0),i.receipt_url?(a(),n("a",{key:1,class:"rounded-full border border-dove px-3 py-2 text-xs font-semibold text-ink transition hover:border-primary hover:text-primary-dark",href:i.receipt_url,target:"_blank",rel:"noopener noreferrer"},"Receipt",8,Vs)):y("",!0),i.proof_of_mailing_url?(a(),n("a",{key:2,class:"rounded-full border border-dove px-3 py-2 text-xs font-semibold text-ink transition hover:border-primary hover:text-primary-dark",href:i.proof_of_mailing_url,target:"_blank",rel:"noopener noreferrer"},"Proof of Mailing",8,Ls)):y("",!0),i.return_receipt_url?(a(),n("a",{key:3,class:"rounded-full border border-dove px-3 py-2 text-xs font-semibold text-ink transition hover:border-primary hover:text-primary-dark",href:i.return_receipt_url,target:"_blank",rel:"noopener noreferrer"},"Return Receipt",8,Rs)):y("",!0),e("button",{class:"rounded-full border border-dove px-3 py-2 text-xs font-semibold text-ink transition hover:border-primary hover:text-primary-dark",type:"button",onClick:vt=>ft(i)},"Track",8,Is)])]))),128))]))]))])]),c(A,{modelValue:t(ue),"onUpdate:modelValue":s[1]||(s[1]=i=>Ce(ue)?ue.value=i:null),"target-url":t(Xe),copy:t(Ye),onOpened:We,onCopyResult:et},null,8,["modelValue","target-url","copy"]),c($,{modelValue:t(pe),"onUpdate:modelValue":s[2]||(s[2]=i=>Ce(pe)?pe.value=i:null),"tracking-context":Ke,onSignedIn:ct},null,8,["modelValue"]),t(_e)?(a(),n("div",Us,[e("div",Bs,[s[29]||(s[29]=e("div",{class:"max-w-3xl"},[e("h2",{class:"mt-1 font-serif text-2xl font-bold text-ink"},"Fix the mailing addresses"),e("p",{class:"mt-2 text-sm leading-6 text-ash"},"One or both addresses could not be verified. Update the details below and try again.")],-1)),e("div",js,[e("section",$s,[s[27]||(s[27]=e("p",{class:"block text-sm font-semibold text-ink"},"Sender mailing address",-1)),e("div",zs,[O(e("input",{id:"sender-street-draft","onUpdate:modelValue":s[3]||(s[3]=i=>t(I).street=i),class:"h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"Street address"},null,512),[[G,t(I).street]]),e("div",Ts,[O(e("input",{id:"sender-city-draft","onUpdate:modelValue":s[4]||(s[4]=i=>t(I).city=i),class:"min-w-0 h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"City"},null,512),[[G,t(I).city]]),O(e("input",{id:"sender-state-draft","onUpdate:modelValue":s[5]||(s[5]=i=>t(I).state=i),class:"min-w-0 h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm uppercase text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"State",maxlength:"2"},null,512),[[G,t(I).state]]),O(e("input",{id:"sender-zip-draft","onUpdate:modelValue":s[6]||(s[6]=i=>t(I).zip=i),class:"min-w-0 h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"ZIP"},null,512),[[G,t(I).zip]])])]),t(te).length?(a(),n("ul",Ds,[(a(!0),n(Q,null,W(t(te),i=>(a(),n("li",{key:i},d(i),1))),128))])):y("",!0)]),e("section",Es,[s[28]||(s[28]=e("p",{class:"block text-sm font-semibold text-ink"},"Recipient mailing address",-1)),e("div",qs,[O(e("input",{id:"recipient-street-draft","onUpdate:modelValue":s[7]||(s[7]=i=>t(U).street=i),class:"h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"Street address"},null,512),[[G,t(U).street]]),e("div",Ns,[O(e("input",{id:"recipient-city-draft","onUpdate:modelValue":s[8]||(s[8]=i=>
2t(U).city=i),class:"min-w-0 h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"City"},null,512),[[G,t(U).city]]),O(e("input",{id:"recipient-state-draft","onUpdate:modelValue":s[9]||(s[9]=i=>t(U).state=i),class:"min-w-0 h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm uppercase text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"State",maxlength:"2"},null,512),[[G,t(U).state]]),O(e("input",{id:"recipient-zip-draft","onUpdate:modelValue":s[10]||(s[10]=i=>t(U).zip=i),class:"min-w-0 h-14 w-full rounded-2xl border border-dove bg-white px-4 text-sm text-ink outline-none transition focus:border-primary focus:ring-4 focus:ring-primary/10",placeholder:"ZIP"},null,512),[[G,t(U).zip]])])]),t(re).length?(a(),n("ul",Fs,[(a(!0),n(Q,null,W(t(re),i=>(a(),n("li",{key:i},d(i),1))),128))])):y("",!0)])]),e("div",Os,[e("button",{class:"inline-flex min-h-11 items-center justify-center rounded-full border border-dove px-5 text-sm font-semibold text-ink transition hover:border-ink disabled:opacity-50",type:"button",disabled:t(ae),onClick:Re}," Cancel ",8,Gs),e("button",{class:"inline-flex min-h-11 items-center justify-center rounded-full bg-primary px-6 text-sm font-semibold text-white transition hover:bg-primary-dark disabled:opacity-50",type:"button",disabled:t(ae),onClick:lt},d(t(ae)?"Saving...":"Save and verify again"),9,Ks)])])])):y("",!0)])}}});export{si as default};

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.