1import{r as l,j as e}from"./react-vendor-BW9Nu_5l.js";import{af as u}from"./single-org-5b_TQwao.js";import{c as y,fe as k,cr as g,dA as w,a4 as j,X as v,aV as N,m as E}from"./SSOProviderLogo-Cf_Gn5rN.js";import{C as A}from"./copy-sjsFQyqc.js";import"./vite-helpers-mg6Z-sIv.js";import"./firebase-C4P3A27n.js";/** 2 * @license lucide-react v0.294.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const C=y("FileCheck2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v4",key:"702lig"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);function M({request:t,onClose:a,themeColor:c="#004E7C"}){const[o,d]=l.useState(!1),p=l.useRef(null),i=(t==null?void 0:t.status)==="pending",[,m]=l.useState(0);if(l.useEffect(()=>{if(!i)return;const s=setInterval(()=>m(r=>r+1),6e4);return()=>clearInterval(s)},[i]),l.useEffect(()=>{var s,r;(r=(s=p.current)==null?void 0:s.focus)==null||r.call(s)},[]),l.useEffect(()=>{const s=r=>{r.key==="Escape"&&(a==null||a())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),!(t!=null&&t.pdfUrl))return null;const x=t.title||t.filename||"Your export",n=k({appUrl:u(),orgId:t.orgId,pdfUrl:t.pdfUrl})||t.pdfUrl,h=i?Math.max(1,w(t.createdAt)||g):0,f=i?j:C,b=async()=>{try{await navigator.clipboard.writeText(n),d(!0),setTimeout(()=>d(!1),2e3)}catch{window.prompt("Copy this link:",n)}};return e.jsx("div",{className:"fixed inset-0 z-[70] bg-black/50 flex items-end md:items-center justify-center md:p-4",role:"dialog","aria-modal":"true","aria-labelledby":"accessible-export-ready-title",onClick:s=>{s.target===s.currentTarget&&(a==null||a())},children:e.jsxs("div",{className:"bg-white w-full md:max-w-md rounded-t-2xl md:rounded-2xl shadow-2xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-slate-200",children:[e.jsx("div",{className:"w-9 h-9 rounded-full flex items-center justify-center flex-shrink-0 text-white",style:{backgroundColor:c},children:e.jsx(f,{className:"w-5 h-5","aria-hidden":"true"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h2",{id:"accessible-export-ready-title",className:"text-base font-bold text-slate-900",children:i?"Your export is ready":"Your accessible export is ready"}),e.jsx("p",{className:"text-xs text-slate-500 truncate",title:x,children:x})]}),e.jsx("button",{ref:p,type:"button",onClick:a,className:"p-1 rounded hover:bg-slate-100 text-slate-400 hover:text-slate-600","aria-label":"Close",children:e.jsx(v,{className:"w-4 h-4","aria-hidden":"true"})})]}),e.jsxs("div",{className:"px-4 py-4 space-y-3",children:[i?e.jsxs("p",{className:"text-sm text-slate-700",role:"status",children:["The PDF is available now. The accessible (WCAG 2.1 AA) version is still being prepared and will be offered right on this link in about"," ",e.jsxs("strong",{children:[h," ",h===1?"minute":"minutes"]}),". Come back to this link any time to open it."]}):e.jsx("p",{className:"text-sm text-slate-700",children:"DocAccess has finished processing this export. Open the link below to view it â the accessible (WCAG 2.1 AA) version is offered right on the link."}),e.jsxs("a",{href:t.pdfUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-bold text-white hover:opacity-90 transition",style:{backgroundColor:c},title:t.pdfUrl,children:[e.jsx(N,{className:"w-4 h-4 flex-shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:i?"Open export":"Open accessible export"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:b,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-bold border border-slate-200 text-slate-700 hover:bg-slate-50 transition",title:n,children:[o?e.jsx(E,{className:"w-3.5 h-3.5","aria-hidden":"true"}):e.jsx(A,{className:"w-3.5 h-3.5","aria-hidden":"true"}),o?"Copied":"Copy link"]}),e.jsx("button",{type:"button",onClick:a,className:"ml-auto px-3 py-1.5 rounded-lg text-xs font-bold text-slate-600 hover:bg-slate-100 transition",children:"Close"})]})]})]})})}export{M 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.