PageSourceSearch

https://tenantev.com/assets/UploadMobile-D5BIuaX_.js

js tenantev.com collected 2026-09-28 15:13:33 UTC 7,183 bytes, 1 lines download raw bytes

1import{d as ce,e as a,h as de,c as fe,k as Y,a as E,l,t as N,x as S,p as w,w as P,q as pe,T as H,F as ve,u as me,C as he,D as ye,I as Ee,o as p,H as Re,_ as be}from"./index-BOZhynU1.js";import{_ as _e}from"./id-logo-re6AhKY_.js";import{A as B}from"./ApplicationApi-9CN8mLfO.js";import{n as $}from"./notify-BUwJ2z1p.js";import{l as m}from"./loading-B2ifEkql.js";import{D as h}from"./document-CeOj_3gB.js";import ge from"./VerificationComplete-CleT-08K.js";import{T as we}from"./TFormErrorMessage-B2wym0Xs.js";import{c as De}from"./convertHeic-h4HbpHuE.js";const R=b=>(he("data-v-26b83e24"),b=b(),ye(),b),xe={key:1,class:"main row self-center"},ke={class:"text-center q-mb-md"},Ie=R(()=>l("img",{src:_e,class:"q-mb-md",style:{width:"120px",height:"120px"}},null,-1)),Te={class:"text-center subtitle"},Ce={class:"text-center title q-my-sm"},Ne=["innerHTML"],Se=R(()=>l("p",{class:"text-center body-medium"},"Make sure your document is readable and well lit. No photocopies.",-1)),Pe=R(()=>l("p",{class:"label"},"There is some information that needs to be manually verified.",-1)),Be=R(()=>l("p",{class:"label"},"Please review your dashboard for any additional documentation/ information that may be needed",-1)),Fe=R(()=>l("p",null,"An expired ID has been detected. Do you want to proceed with the upload?",-1)),Ue=ce({__name:"UploadMobile",setup(b){const j=me(),z=Ee(),_=a(""),i=a(""),F=a(""),u=a(""),D=a(null),f=a(null),c=a(!1),r=a(0),U=a(2),O=a(!1),A=a(!1),s=a(!1),o=a(""),M=a(""),V=a(!1),x=a(!1),k=a(0),y=a(!0),v=a(!1),G=["image/jpeg","image/png","image/jpg"];de(async()=>{_.value=j.params.token;try{m.show("checking-token");const e=await B.checkTokenUploadV2(_.value);i.value=e.idDocumentType.toLowerCase()||h.DRIVER_LICENSE,F.value=e.description||"",I()}catch(e){console.error("Error checking token:",e)}finally{m.hide("checking-token")}});const I=e=>{i.value===h.PASSPORT?u.value="<b>information page</b>":i.value===h.DRIVER_LICENSE||e==="FRONT_SIDE"?u.value="<b>FRONT SIDE</b>":(i.value===h.DRIVER_LICENSE||e==="BACK_SIDE")&&(u.value="<b>BACK SIDE</b>")},J=()=>{D.value&&D.value.click()},Q=async e=>{const t=e.target;t.files&&t.files.length>0&&(f.value=await De(t.files[0]),W())},W=()=>{const e=f.value;if(e){if(e.size>20*1024*1024){T("Your document scanning was unsuccessful as the system could not extract the information from it. The system detected that the image was in a format that is larger than allowed. Please reduce the file before uploading it. ","ER",!1);return}if(!G.includes(e.type)){T("Your document scanning was unsuccessful as the system could not extract the information from it. The system detected that the image was in a format that is not compatible with our system (PNG, JPG, OR PDF). Please upload your document in any of the preferred listed formats. ","ER",!1);return}Z()}},X=e=>e?"DRIVER_LICENSE_BACK":i.value,Z=async()=>{if(f.value){c.value=!0,s.value||(s.value=r.value>=4);try{m.show("uploading-document");const e=await ee(f.value),t={filename:f.value.name,fileMimeType:f.value.type,fileData:e,fileSize:f.value.size,token:_.value,checkExpired:A.value,forceUpload:s.value,backId:u.value.includes("BACK"),retries:r.value,idDocumentType:X(u.value.includes("BACK"))},n=await B.uploadDocumentFromMobileV2(t);ae(n)}catch(e){te(e)}finally{m.hide("uploading-document"),c.value=!1}}},ee=e=>new Promise((t,n)=>{const d=new FileReader;d.onload=()=>t(d.result),d.onerror=n,d.readAsDataURL(e)}),ae=e=>{if(e.errors)r.value++,T(e.errorString,e.status,oe(e.errors));else if(e.status)switch(e.status){case"NB":i.value=h.DRIVER_LICENSE,I("BACK_SIDE");break;case"NFNT":i.value=h.DRIVER_LICENSE,I("FRONT_SIDE");break;case"NR":case"OK":L(e.status);break}},te=e=>{ne(e)},T=(e,t,n=!0)=>{if(t==="NR"){L(t);return}let d=e;if(n){const g=Math.max(0,U.value-r.value);if(g<=0){C(),v.value=!0,y.value=!1;return}else g>1?d+=`<br/><br/>You have (${g}) TRIES left before manual review`:d+=`<br/><br/>You have (${g}) TRY left before manual review`}o.value=d},oe=e=>!["GREEN_CARD_DETECTED","ERROR_PROCESS_PDF"].includes(e),L=e=>{e==="OK"?(ie(),v.value=!0):(e==="NR"||e==="NR_ER")&&(C(),v.value=!0),se()},se=()=>{c.value=!1,y.value=!1},le=()=>{O.value=!1,z.push({name:Re.PROPERTY_CODE})},ne=e=>{var t,n;if(s.value=!1,e.status===408)o.value="We are not able to read the document. Please try again!",s.value=r.value>4;else if(e.status===422){if(o.value=((t=e.error)==null?void 0:t.detail)||"Unprocessable entity error",s.value=!0,o.value.includes("The session"))o.value="Please go back to the computer and generate a new QR code by refreshing the page. Scan the code and try again.",v.value=!0,s.value=!1;else if(o.value.includes("expiration date")||o.value.includes("has expired")||o.value.includes("Non-US Driver`s License detected"))re();else if(o.value==="invalid.task.id"){o.value="",s.value=!1;return}}else e.status===406&&(o.value=((n=e.error)==null?void 0:n.detail)||"Not acceptable error",s.value=r.value>1);r.value++,c.value=!1},re=()=>{u.value.includes("FRONT")?(U.value-r.value===1&&(A.value=!1,o.value="We will upload and review this ID manually, if ID is expired the document may be rejected and a new non-expired ID will be requested."),s.value=!1):(y.value=!1,5-k.value===0?(s.value=!0,K()):(x.value=!0,k.value++,s.value=!1),c.value=!1)},ie=()=>{$.success("Documents Uploaded"),o.value="",M.value="You can now close and continue on to the computer.",c.value=!1,V.value=!0},C=()=>
1{o.value="Thank you for your cooperation! There is some information that needs to be manually verified. Please review your dashboard for any additional documentation/ information that may be needed.",M.value="You can now close and continue on to the computer.",c.value=!1,V.value=!0},q=e=>{e==="retry"?(u.value="<b>FRONT SIDE</b>",r.value=0,o.value="",y.value=!0,x.value=!1):K()},K=async()=>{try{m.show("confirming-expired-id"),await B.confirmExpiredMobile(_.value),$.success("Expired ID confirmed successfully"),C()}catch(e){console.error("Error confirming expired mobile:",e)}finally{m.hide("confirming-expired-id")}},ue=fe(()=>y.value&&!c.value&&!v.value);return(e,t)=>(p(),Y(ve,null,[v.value?(p(),E(ge,{key:0,"show-back-button":!1,"additional-text":"Please return to your computer to continue the process."})):(p(),Y("div",xe,[l("div",ke,[Ie,l("p",Te,N(F.value),1),l("p",Ce,[S("Upload a picture of the "),l("span",{innerHTML:u.value},null,8,Ne),S(" of your "+N(i.value),1)])]),Se,o.value!==""?(p(),E(we,{key:0,class:"full-width q-mb-md",message:o.value},null,8,["message"])):w("",!0),ue.value?(p(),E(pe,{key:1,color:"secondary",unelevated:"",class:"q-pa-md",onClick:J},{default:P(()=>[S("Open Camera")]),_:1})):w("",!0),l("input",{ref_key:"fileInput",ref:D,type:"file",capture:"",accept:"image/*",style:{display:"none"},onChange:Q},null,544)])),O.value?(p(),E(H,{key:2,"show-buttons":!1,title:"Thank you for your cooperation!",onClose:le},{default:P(()=>[Pe,Be]),_:1})):w("",!0),x.value?(p(),E(H,{key:3,"show-buttons":!0,title:"Expired ID Detected",onClose:t[0]||(t[0]=n=>q("retry")),onConfirm:t[1]||(t[1]=n=>q("confirm"))},{default:P(()=>[Fe,l("p",null,"Remaining attempts: "+N(5-k.value),1)]),_:1})):w("",!0)],64))}}),$e=be(Ue,[["__scopeId","data-v-26b83e24"]]);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.