PageSourceSearch

https://app.tabnav.com/_next/static/chunks/2859-7e56523c1c0fb440.js

js tabnav.com collected 2026-10-02 02:36:12 UTC 12,662 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2859],{47089:function(e,t,a){a.d(t,{Cy:function(){return D},OH:function(){return F},QV:function(){return q},RI:function(){return h},V9:function(){return C},We:function(){return m},Wi:function(){return b},cP:function(){return p},eJ:function(){return f},er:function(){return c},hN:function(){return v},iU:function(){return g},kX:function(){return Q},l2:function(){return P},lX:function(){return k},wM:function(){return A},xe:function(){return S}});var r,n=a(88144),i=a(30202),o=a(98029),l=a(98643),d=a(33613);let u=e=>{var t,a;let r=(null==e?void 0:null===(t=e.response)||void 0===t?void 0:null===(a=t.data)||void 0===a?void 0:a.error)||"";return r.includes("page limit exceeded")?"You've reached your page scan limit. Upgrade your plan or remove some scans to continue.":r.toLowerCase().includes("not enough adobe credits")?"You don't have enough scan credits remaining to process this PDF. Please upgrade your plan or try again later.":r.includes("No pdf plan found")?"No active PDF plan was found for your team. Please contact support.":r||"Failed to scan PDF. Please try again."},s=e=>{var t,a;let r=null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data,n=(null==r?void 0:r.error)||"";if(null==r?void 0:null===(a=r.invalidFiles)||void 0===a?void 0:a.length){let e=r.invalidFiles.map(e=>e.fileName).join(", ");return"One or more files exceed the ".concat(r.maxPages||50,"-page limit: ").concat(e)}return n||"Failed to upload PDF. Please try again."},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.a)({queryKey:["pdf-scan",e],queryFn:async()=>{if(!e)return null;let t=await l.Z.get("/api/v1/adobe/get-scans"),a=t.data;return a.find(t=>t.scanId===e)||null},enabled:!!e,...t})},p=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async t=>{let{scanId:a,mode:r="before"}=t;console.log("scanId:",a);let n=e.getQueryData(["pdf",a,r]);if(console.log("cachedData:",n),n)return console.log("Using cached PDF data for",a),n;console.log("Downloading PDF for",a);try{let t=await l.Z.get("/api/v1/adobe/download-pdf/".concat(a,"/").concat(r),{responseType:"arraybuffer",timeout:3e4});if(!t.data||0===t.data.byteLength)throw Error("Empty PDF data received");return e.setQueryData(["pdf",a,r],t.data),t.data}catch(e){var i;if(console.error("Error downloading PDF:",e),(null===(i=e.response)||void 0===i?void 0:i.status)===500)throw Error("Server error while downloading PDF. Please try again later.");throw e}},onError:e=>{console.error("Download failed:",e),d.C.error(e.message||"Failed to download PDF")}})},f="/pdf-remediation/blank-report",y=["pending","in_progress"],v=function(){let{pollMs:e=8e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n.a)({queryKey:["pdf-scans"],queryFn:async()=>{try{let e=await l.Z.get("/api/v1/adobe/get-scans");return Array.isArray(e.data)?e.data:[]}catch(t){var e;if((null==t?void 0:null===(e=t.response)||void 0===e?void 0:e.status)===404)return[];throw t}},initialData:[],refetchOnWindowFocus:!0,refetchInterval:t=>{var a;let r=null==t?void 0:null===(a=t.state)||void 0===a?void 0:a.data;return!!Array.isArray(r)&&!!r.some(e=>y.includes(e.scanStatus))&&e}})},m=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async e=>{var t;let a=new FormData;e.forEach(e=>a.append("files",e));let r=await l.Z.post("/api/v1/adobe/upload-pdfs",a,{headers:{"Content-Type":"multipart/form-data"}}),n=Array.isArray(r.data)?r.data:[r.data];return n.filter(Boolean).map(e=>({scanId:e.scanId,name:e.inputFileName,pages:parseInt(e.pageCount,10)||0,sizeBytes:null!==(t=e.fileSize)&&void 0!==t?t:null}))},onSuccess:()=>{e.invalidateQueries({queryKey:["pdf-scans"]})},onError:e=>{d.C.error(s(e))}})},g=()=>(0,o.D)({mutationFn:async e=>{let t=await l.Z.post("/api/v1/adobe/crawl-pdfs",{url:e});return t.data}}),h=100,w=e=>({scanId:e.scanId,name:e.inputFileName,pages:parseInt(e.pageCount,10)||0,sizeBytes:null!==(r=e.fileSize)&&void 0!==r?r:null,sourceUrl:e.sourceUrl||null}),F=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async e=>{let{urls:t,onProgress:a}=e,r=t.slice(0,h),n=[];for(let e=0;e<r.length;e+=10)n.push(r.slice(e,e+10));let i=[],o=[],d=0,u=null,s=async e=>{try{let t=await l.Z.post("/api/v1/adobe/scrape-pdfs",{urls:e}),a=t.data||{};i.push(...(a.created||[]).map(w)),o.push(...a.skipped||[])}catch(r){var t,n;u=u||r;let a=(null==r?void 0:null===(t=r.response)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.error)||"couldn't be fetched";o.push(...e.map(e=>({url:e,reason:a})))}finally{d+=e.length,null==a||a(Math.min(d,r.length),r.length)}},c=[...n];if(await Promise.all(Array.from({length:Math.min(2,c.length)},async()=>{for(;c.length;)await s(c.shift())})),!i.length&&u)throw u;return{created:i,skipped:o,capped:Math.max(0,t.length-r.length)}},onSuccess:()=>
1{e.invalidateQueries({queryKey:["pdf-scans"]})},onError:e=>{var t,a;d.C.error((null==e?void 0:null===(t=e.response)||void 0===t?void 0:null===(a=t.data)||void 0===a?void 0:a.error)||"Could not fetch the selected PDFs")}})},b=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async e=>{let t=await l.Z.post("/api/v1/adobe/scan-pdfs",e);return t.data},onSuccess:()=>{e.invalidateQueries({queryKey:["pdf-scans"]}),e.invalidateQueries({queryKey:["pdf-plan"]})},onError:e=>{d.C.error(u(e))}})},D=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async e=>{await Promise.all(e.map(e=>l.Z.delete("/api/v1/adobe/remove-pdf/".concat(e)).catch(()=>null)))},onSettled:()=>{e.invalidateQueries({queryKey:["pdf-scans"]})}})},P=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async e=>{let t=await l.Z.post("/api/v1/adobe/cancel-scan/".concat(e));return t.data},onMutate:async t=>{await e.cancelQueries({queryKey:["pdf-scans"]});let a=e.getQueryData(["pdf-scans"]);return e.setQueryData(["pdf-scans"],e=>Array.isArray(e)?e.filter(e=>e.scanId!==t):[]),{previous:a}},onError:(t,a,r)=>{var n,i;(null==r?void 0:r.previous)&&e.setQueryData(["pdf-scans"],r.previous),d.C.error((null==t?void 0:null===(n=t.response)||void 0===n?void 0:null===(i=n.data)||void 0===i?void 0:i.error)||"Failed to cancel remediation. Please try again.")},onSettled:()=>{e.invalidateQueries({queryKey:["pdf-scans"]}),e.invalidateQueries({queryKey:["pdf-plan"]})}})},k=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async e=>{let t=await l.Z.post("/api/v1/adobe/retry-scan/".concat(e));return t.data},onSuccess:()=>{e.invalidateQueries({queryKey:["pdf-scans"]}),e.invalidateQueries({queryKey:["pdf-plan"]})},onError:e=>{d.C.error(u(e))}})},q=()=>{let e=(0,i.NL)();return(0,o.D)({mutationFn:async e=>{let t=await l.Z.delete("/api/v1/adobe/remove-pdf/".concat(e));return t.data},onMutate:async t=>{await e.cancelQueries({queryKey:["pdf-scans"]});let a=e.getQueryData(["pdf-scans"]);return e.setQueryData(["pdf-scans"],e=>Array.isArray(e)?e.filter(e=>e.scanId!==t):[]),{previous:a}},onError:(t,a,r)=>{var n,i;(null==r?void 0:r.previous)&&e.setQueryData(["pdf-scans"],r.previous),d.C.error((null==t?void 0:null===(n=t.response)||void 0===n?void 0:null===(i=n.data)||void 0===i?void 0:i.error)||"Failed to delete PDF. Please try again.")},onSettled:()=>{e.invalidateQueries({queryKey:["pdf-scans"]})}})},C=()=>(0,o.D)({mutationFn:async e=>{let t=await l.Z.get("/api/v1/adobe/download-pdf/".concat(e.scanId,"/after"),{responseType:"arraybuffer",timeout:3e4});if(!t.data||0===t.data.byteLength)throw Error("Empty PDF data received");let a=new Blob([t.data],{type:"application/pdf"}),r=window.URL.createObjectURL(a),n=document.createElement("a");return n.href=r,n.download=e.name||"document.pdf",document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(r),!0},onError:e=>{d.C.error((null==e?void 0:e.message)||"Failed to download PDF")}}),A=()=>{var e,t;let a=(0,n.a)({queryKey:["pdf-plan"],queryFn:async()=>{let e=await l.Z.get("/api/v1/pdfPlan/current");return e.data},staleTime:6e4}),r=a.data,i=null!==(e=null==r?void 0:r.pageLimit)&&void 0!==e?e:0,o=!r||!!r.free||0===i;return{...a,plan:{name:o?"Free":"Pages plan",isFree:o,pageLimit:i,pagesUsed:null!==(t=null==r?void 0:r.pagesScanned)&&void 0!==t?t:0,renews:null}}},Q=e=>(0,n.a)({queryKey:["sharedPdfReport",e],queryFn:async()=>{let t=await l.Z.get("/api/v1/adobe/fetch-pdf-report-unauth/".concat(e));return t.data},enabled:!!e,staleTime:3e5,retry:1}),S=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(0,n.a)({queryKey:["pdfShareToken",e],queryFn:async()=>{let t=await l.Z.get("/api/v1/adobe/create-share-pdf-link-token/".concat(e));return t.data.encryptedScanId},enabled:!!e&&t,staleTime:1/0,retry:1})}},46696:function(e,t,a){a.d(t,{EI:function(){return q},GU:function(){return f},MR:function(){return D},RV:function(){return w},_8:function(){return p},a9:function(){return b},dO:function(){return i},i_:function(){return P},jB:function(){return h},kK:function(){return m},le:function(){return F},mz:function(){return r.mz},nD:function(){return Q},o4:function(){return l},vM:function(){return c},vm:function(){return v},zf:function(){return y}});var r=a(55620),n=a(63093);let i=e=>{let t=e.dark?"#A8AAFF":"#2D2FD0";return{...e,primary:t,primaryStrong:t,primarySoft:e.dark?(0,n.aJ)(t,.18):(0,n.aJ)(t,.1),primaryBtn:t,onPrimary:e.dark?"#170B28":"#FFFFFF"}},o={queued:{key:"queued",label:"Queued",tone:"info",sr:"Queued, waiting to start",blurb:"Waiting in line. Remediation will begin shortly."},remediating:{key:"remediating",label:"Remediating",tone:"primary",sr:"Remediation in progress",blurb:"Repairing tags, alt text, reading order and structure right now."},completed:{key:"completed",label:"Completed",tone:"success",sr:"Completed successfully",blurb
1:"Finished — the accessible PDF and its report are ready."},failed:{key:"failed",label:"Failed",tone:"error",sr:"Remediation failed",blurb:"This file couldn't be remediated. Open details to see why."}},l=["queued","remediating"],d={pending:"queued",in_progress:"remediating",completed:"completed",failed:"failed"},u={queued:["cancel","delete"],remediating:["cancel"],completed:["view","download","share","delete"],failed:["viewDetails","retry","delete"]},s=["view","share"],c=e=>{if(e.isMock)return["view","download"];let t=u[e.status]||[];return e.canViewReport?t:t.filter(e=>!s.includes(e))},p={view:{label:"View report",icon:"chevRight",kind:"primary"},viewDetails:{label:"View details",icon:"alertCircle",kind:"primary"},cancel:{label:"Cancel",icon:"ban",kind:"danger"},retry:{label:"Retry",icon:"refresh",kind:"default"},download:{label:"Download PDF",icon:"download",kind:"default"},share:{label:"Share report",icon:"share",kind:"default"},delete:{label:"Delete",icon:"trash",kind:"danger"}},f=["cancel","retry","delete"],y=e=>o[e.status]||o.queued,v=(e,t)=>"neutral"===t?e.txt3:e[t]||e.txt3,m=e=>"completed"===e.status,g={label:"Couldn't remediate this PDF",fix:"This PDF's underlying structure was built incorrectly when the file was first created, so it can't be remediated. Try a different PDF, or contact Tabnav support if you need help."},h=()=>g,w=e=>null==e?"—":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(0)," KB"):"".concat((e/1024/1024).toFixed(1)," MB"),F=e=>{if(!e||"string"!=typeof e||/[Ā-￿]/.test(e)||!/[€-ÿ]/.test(e))return e;try{let t=Uint8Array.from(Array.from(e,e=>255&e.charCodeAt(0)));return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch(t){return e}},b=50,D=26214400,P=new Set(["status","pages","size","source","created"]),k={queued:0,remediating:1,completed:2,failed:3},q=(e,t)=>{var a,r,n;switch(t){case"status":return null!==(a=k[e.status])&&void 0!==a?a:0;case"pages":return null!==(r=e.pages)&&void 0!==r?r:0;case"size":return null!==(n=e.sizeBytes)&&void 0!==n?n:0;case"source":return"scrape"===e.source?1:0;case"created":return+new Date(e.createdAt);default:return 0}},C=e=>{let t=parseInt(e,10);return Number.isFinite(t)?t:0};function A(e){var t,a,r,n,i,o;let l=d[e.scanStatus]||"queued",u=(null===(t=e.remediationDetails)||void 0===t?void 0:t.metaData)||{},s=C(null!==(n=null!==(r=u["Number of Pages"])&&void 0!==r?r:u.Pages)&&void 0!==n?n:u["Count Scanned Pages"]),c=C(e.pageCount)||s;return{id:e.scanId,scanId:e.scanId,name:e.inputFileName||"Untitled.pdf",pages:c,sizeBytes:null!==(i=e.fileSize)&&void 0!==i?i:null,status:l,createdAt:e.createdAt,updatedAt:e.updatedAt||e.createdAt,source:"scrape"===e.source?"scrape":"upload",sourceUrl:e.sourceUrl||null,score:null!==(o=null===(a=e.remediationDetails)||void 0===a?void 0:a.score)&&void 0!==o?o:null,downloadLink:e.downloadLink||null,hasReport:!!e.remediationDetails,isMock:"mock-pdf-sample"===e.scanId,canViewReport:!!e.canViewReport,_raw:e}}let Q=e=>Array.isArray(e)?e.map(A):[]}}]);

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.