PageSourceSearch

https://claimready.io/assets/Upload-rtt6yhB9.js

js claimready.io collected 2026-10-02 01:57:20 UTC 7,536 bytes, 1 lines download raw bytes

1import{d as L,c as o,o as l,a as D,F as P,h as O,e as t,b as f,f as h,t as _,i as c,j as W,g as m,w as u,u as s,p as J,k as C}from"./index-phbp4HFs.js";import{_ as U,B as F}from"./SignupForm.vue_vue_type_style_index_0_scoped_cfb7eaf2_lang-CT9EJUtl.js";import{C as x}from"./Card-DKDtiJYz.js";import{S}from"./Stack-C4UJq8xW.js";import{A as M}from"./Alert-Bp7Yp4yU.js";import{S as q}from"./Spinner-F-AUpgPi.js";import{u as K,w as Y}from"./document.service-WirBYfiI.js";import"./api-Dp2lHg1N.js";const Q=["onClick"],X={class:"mb-stepper__indicator"},Z={class:"mb-stepper__circle"},ee={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3"},te={key:0,class:"mb-stepper__connector"},ae={key:0,class:"mb-stepper__content"},le={class:"mb-stepper__label"},se={key:0,class:"mb-stepper__description"},oe=L({__name:"Stepper",props:{steps:{},currentStep:{default:0},variant:{default:"default"},size:{default:"md"},clickable:{type:Boolean,default:!1}},emits:["step-click"],setup(p,{emit:z}){const r=p,n=z;function k(i){return i<r.currentStep?"completed":i===r.currentStep?"current":"upcoming"}function d(i){r.clickable&&n("step-click",i)}return(i,b)=>(l(),o("div",{class:D(["mb-stepper",`mb-stepper--${p.variant}`,`mb-stepper--${p.size}`])},[(l(!0),o(P,null,O(p.steps,(v,g)=>(l(),o("div",{key:g,class:D(["mb-stepper__step",`mb-stepper__step--${k(g)}`,{"mb-stepper__step--clickable":p.clickable}]),onClick:y=>d(g)},[t("div",X,[t("div",Z,[k(g)==="completed"?(l(),o("svg",ee,[...b[0]||(b[0]=[t("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):p.variant!=="dots"?(l(),o(P,{key:1},[h(_(g+1),1)],64)):f("",!0)]),g<p.steps.length-1?(l(),o("div",te)):f("",!0)]),p.variant!=="dots"?(l(),o("div",ae,[t("span",le,_(v.label),1),v.description&&p.variant==="default"?(l(),o("span",se,_(v.description),1)):f("",!0)])):f("",!0)],10,Q))),128))],2))}}),ne=U(oe,[["__scopeId","data-v-ab61a781"]]),ie={class:"upload-page"},re={class:"upload-dropzone__text"},ue={class:"upload-dropzone__link"},pe={key:1,class:"upload-file"},de={class:"upload-file__icon"},ce={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},ve={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},fe={class:"upload-file__info"},ge={class:"upload-file__name"},me={class:"upload-file__size"},_e={class:"upload-actions"},ke={class:"upload-processing__title"},he={class:"upload-processing__text"}
1,be=30,ye=L({__name:"Upload",setup(p){const z=J(),r=c(0),n=c(null),k=c(!1),d=c(null),i=c(!1),b=c(!1),v=c(""),g=c(null),y=c(!1),B=c(0),A=[{label:"Select File"},{label:"Processing"},{label:"Complete"}],I=W(()=>n.value!==null&&!i.value),T=a=>{a.preventDefault(),k.value=!0},V=()=>{k.value=!1},E=a=>{var w;a.preventDefault(),k.value=!1;const e=(w=a.dataTransfer)==null?void 0:w.files;e&&e.length>0&&$(e[0])},G=a=>{const e=a.target;e.files&&e.files.length>0&&$(e.files[0])},N=["application/pdf","image/png","image/jpeg","image/jpg","image/gif","image/webp"],$=a=>{if(d.value=null,!N.includes(a.type)){d.value="Please select a PDF or image file (PNG, JPEG, GIF, WebP)";return}if(a.size>10*1024*1024){d.value="File size must be less than 10MB";return}n.value=a},R=()=>{n.value=null,d.value=null},j=async()=>{if(n.value){d.value=null,i.value=!0,r.value=1,v.value="Uploading your decision letter...";try{const a=await K(n.value);g.value=a.documentId,i.value=!1,b.value=!0,y.value=!1,B.value=0,v.value="AI is analyzing your decision letter...";const e=await Y(a.documentId,{maxAttempts:90,intervalMs:2e3,onProgress:w=>{B.value++,B.value>=be&&!y.value&&(y.value=!0),w.status==="extracting"?v.value="AI is extracting conditions and ratings...":w.status==="processing"&&(v.value="Generating plain-English explanations...")}});r.value=2,b.value=!1,y.value=!1,setTimeout(()=>{z.push(`/app/documents/${e.id}`)},1500)}catch(a){d.value=a instanceof Error?a.message:"Upload failed",i.value=!1,b.value=!1,r.value=0}}},H=a=>a<1024?a+" B":a<1024*1024?(a/1024).toFixed(1)+" KB":(a/(1024*1024)).toFixed(1)+" MB";return(a,e)=>(l(),o("div",ie,[m(s(S),{gap:"lg"},{default:u(()=>[e[12]||(e[12]=t("div",{class:"upload-page__header"},[t("h1",{class:"upload-page__title"},"Upload Decision Letter"),t("p",{class:"upload-page__subtitle"}," Upload your VA decision letter to get a detailed breakdown ")],-1)),m(s(ne),{steps:A,"current-step":r.value},null,8,["current-step"]),r.value===0?(l(),C(s(x),{key:0,padding:"lg"},{default:u(()=>[m(s(S),{gap:"md"},{default:u(()=>[d.value?(l(),C(s(M),{key:0,variant:"destructive"},{default:u(()=>[h(_(d.value),1)]),_:1})):f("",!0),t("div",{class:D(["upload-dropzone",{"upload-dropzone--dragging":k.value},{"upload-dropzone--has-file":n.value}]),onDragover:T,onDragleave:V,onDrop:E},[n.value?(l(),o("div",pe,[t("div",de,[n.value.type==="application/pdf"?(l(),o("svg",ce,[...e[5]||(e[5]=[t("path",{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},null,-1)])])):(l(),o("svg",ve,[...e[6]||(e[6]=[t("path",{d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)])]))]),t("div",fe,[t("p",ge,_(n.value.name),1),t("p",me,_(H(n.value.size)),1)]),t("button",{type:"button",class:"upload-file__remove",onClick:R,"aria-label":"Remove file"},[...e[7]||(e[7]=[t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M6 18L18 6M6 6l12 12"})],-1)])])])):(l(),o(P,{key:0},[e[3]||(e[3]=t("div",{class:"upload-dropzone__icon"},[t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t("path",{d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})])],-1)),t("p",re,[e[2]||(e[2]=h(" Drag and drop your file here, or ",-1)),t("label",ue,[e[1]||(e[1]=h(" browse ",-1)),t("input",{type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",class:"upload-dropzone__input",onChange:G},null,32)])]),e[4]||(e[4]=t("p",{class:"upload-dropzone__hint"},"PDF or image files (PNG, JPEG, GIF, WebP), max 10MB",-1))],64))],34),t("div",_e,[m(s(F),{variant:"outline",onClick:e[0]||(e[0]=w=>s(z).push("/app"))},{default:u(()=>[...e[8]||(e[8]=[h(" Cancel ",-1)])]),_:1}),m(s(F),{disabled:!I.value,loading:i.value,onClick:j},{default:u(()=>[...e[9]||(e[9]=[h(" Upload & Analyze ",-1)])]),_:1},8,["disabled","loading"])])]),_:1})]),_:1})):f("",!0),r.value===1?(l(),C(s(x),{key:1,padding:"lg"},{default:u(()=>[m(s(S),{gap:"md",class:"upload-processing"},{default:u(()=>[m(s(q),{size:"lg"}),t("h2",ke,_(i.value?"Uploading...":"Processing..."),1),t("p",he,_(v.value),1),y.value?(l(),C(s(M),{key:0,variant:"warning",class:"upload-processing__warning"},{default:u(()=>[...e[10]||(e[10]=[h(" Taking longer than expected. Large documents may require additional processing time. Please wait... ",-1)])]),_:1})):f("",!0)]),_:1})]),_:1})):f("",!0),r.value===2?(l(),C(s(x),{key:2,padding:"lg"},{default:u(()=>[m(s(S),{gap:"md",class:"upload-complete"},{default:u(()=>[...e[11]||(e[11]=[t("div",{class:"upload-complete__icon"},[t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M22 11.08V12a10 10 0 11-5.93-9.14"}),t("path",{d:"M22 4L12 14.01l-3-3"})])],-1),t("h2",{class:"upload-complete__title"},"Analysis Complete!",-1),t("p",{class:"upload-complete__text"},"Redirecting to your results...",-1)])]),_:1})]),_:1})):f("",!0)]),_:1})]))}}),$e=U(ye,[["__scopeId","data-v-d0d41438"]]);export{$e 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.