From c31458330bdd9718eff3aa9929f5fadc66d1cbc7 Mon Sep 17 00:00:00 2001 From: Pradeeppon01 Date: Sat, 13 Jul 2024 17:02:51 +0530 Subject: [PATCH] latest --- dummy.txt | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 dummy.txt diff --git a/dummy.txt b/dummy.txt deleted file mode 100644 index 330ac17..0000000 --- a/dummy.txt +++ /dev/null @@ -1,40 +0,0 @@ -./src/Components/QueryExecutor.jsx:116: !query.includes("image_name") && -./src/Components/QueryExecutor.jsx:119: alert("Selecting primary Key (image_name) is mandatory"); -./src/Components/PlayGround.jsx:147: !query.includes("image_name") && -./src/Components/PlayGround.jsx:152: "Selecting primary Key (image_name) or Selecting all (*) is mandatory" -./src/Components/QueryCardEditor.jsx:34: const image_name = searchParams.get("image_name"); -./src/Components/QueryCardEditor.jsx:55: image_name, -./src/Components/QueryCardEditor.jsx:95: if (table && image_name) { -./src/Components/QueryCardEditor.jsx:117: setImageName(recordData?.image_name); -./src/Components/QueryCardEditor.jsx:159: if (data?.image_name === imageName) { -./src/Components/QueryCardEditor.jsx:174: const newUrl = `/sqlPlayground/edit?image_name=${newRecords[currentIndex]?.image_name}&table=ocr_scanned_part_c_v1&error=${paramsError}&error_reason=${paramsErrorReason}°reeType=${paramsDegreeType}&sysNo=${paramsSysNo}`; -./src/Components/QueryCardEditor.jsx:231: if (data?.image_name === imageName) { -./src/Components/QueryCardEditor.jsx:245: const newUrl = `/sqlPlayground/edit?image_name=${evErrorsData[newIndex]?.image_name}&table=ocr_scanned_part_c_v1&error=${paramsError}&error_reason=${paramsErrorReason}°reeType=${paramsDegreeType}&sysNo=${paramsSysNo}`; -./src/Components/CustomQueryExecutorCard_BK.jsx:42: console.log("Image name ====== ",data?.image_name) -./src/Components/CustomQueryExecutorCard_BK.jsx:43: setImageName(data?.image_name) -./src/Components/CustomQueryExecutorCard_BK.jsx:276: onClick={() => navigate(`/sqlPlayground/edit?image_name=${data["image_name"]}&table=ocr_scanned_part_c_v1&error=${error}&error_reason=${error_reason}&sysNo=${reduxSystemNo}°reeType=${degreeType}`)} -./src/Components/QrCodeCardEditor.jsx:32: const image_name = searchParams.get("image_name"); -./src/Components/QrCodeCardEditor.jsx:50: image_name, -./src/Components/QrCodeCardEditor.jsx:91: if (table && image_name) { -./src/Components/QrCodeCardEditor.jsx:110: setImageName(recordData?.image_name); -./src/Components/QrCodeCardEditor.jsx:145: if (data?.image_name === imageName) { -./src/Components/QrCodeCardEditor.jsx:160: const newUrl = `/sqlPlayground/edit?image_name=${newRecords[currentIndex]?.image_name}&table=ocr_scanned_part_c_v1&error=${paramsError}&error_reason=${paramsErrorReason}°reeType=${paramsDegreeType}&sysNo=${paramsSysNo}`; -./src/Components/QrCodeCardEditor.jsx:217: if (data?.image_name === imageName) { -./src/Components/QrCodeCardEditor.jsx:231: const newUrl = `/sqlPlayground/edit?image_name=${evErrorsData[newIndex]?.image_name}&table=ocr_scanned_part_c_v1&error=${paramsError}&error_reason=${paramsErrorReason}°reeType=${paramsDegreeType}&sysNo=${paramsSysNo}`; -./src/Components/QueryExecutorCard.jsx:178: onClick={() => navigate(`/sqlPlayground/edit?image_name=${data["image_name"]}&table=ocr_scanned_part_c_v1&error=${error}&error_reason=${error_reason}&sysNo=${reduxSystemNo}°reeType=${degreeType}`)} -./src/Components/EvQrcode.jsx:155: imageName: currentItem.image_name, -./src/Components/EvQrcode.jsx:264: Image Name: {currentItem.image_name} -./src/Components/EvQrcode.jsx:309: alt={currentItem.image_name} -./src/Components/CustomQueryExecutorCard.jsx:51: console.log("Image name ====== ", data?.image_name); -./src/Components/CustomQueryExecutorCard.jsx:52: setImageName(data?.image_name); -./src/Components/CustomQueryExecutorCard.jsx:389: onClick={() => navigate(`/sqlPlayground/edit?image_name=${data["image_name"]}&table=ocr_scanned_part_c_v1&error=${error}&error_reason=${error_reason}&sysNo=${reduxSystemNo}°reeType=${degreeType}`)} -./src/Components/CustomQueryExecutorCard.jsx:479: {showEditContainer && } -./src/Components/TableComponent.jsx:574: {row.image_name} -./src/Components/TableComponentAdditionalSheet.jsx:551: {row.image_name} -./src/Components/AttendanceAdditionalSheet.jsx:64: image_name, -./src/Components/AttendanceAdditionalSheet.jsx:68: image_name, -./src/Components/AttendanceAdditionalSheet.jsx:79: // data.image_name, -./src/Components/AttendanceAdditionalSheet.jsx:185: data.image_name, -./dist/assets/index-C7VD-tuW.js:456: */var Fh=f;function Hie(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vie=typeof Object.is=="function"?Object.is:Hie,Wie=Fh.useSyncExternalStore,Uie=Fh.useRef,Gie=Fh.useEffect,Yie=Fh.useMemo,Kie=Fh.useDebugValue;m8.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Uie(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Yie(function(){function d(_){if(!p){if(p=!0,m=_,_=r(_),o!==void 0&&s.hasValue){var S=s.value;if(o(S,_))return y=S}return y=_}if(S=y,Vie(m,_))return S;var w=r(_);return o!==void 0&&o(S,w)?S:(m=_,y=w)}var p=!1,m,y,b=n===void 0?null:n;return[function(){return d(t())},b===null?void 0:function(){return d(b())}]},[t,n,r,o]);var c=Wie(e,i[0],i[1]);return Gie(function(){s.hasValue=!0,s.value=c},[c]),Kie(c),c};g8.exports=m8;var Xie=g8.exports,Jo="default"in Ma?He:Ma,CA=Symbol.for("react-redux-context"),SA=typeof globalThis<"u"?globalThis:{};function qie(){if(!Jo.createContext)return{};const e=SA[CA]??(SA[CA]=new Map);let t=e.get(Jo.createContext);return t||(t=Jo.createContext(null),e.set(Jo.createContext,t)),t}var Ks=qie(),Qie=()=>{throw new Error("uSES not initialized!")};function iw(e=Ks){return function(){return Jo.useContext(e)}}var v8=iw(),y8=Qie,Zie=e=>{y8=e},Jie=(e,t)=>e===t;function eae(e=Ks){const t=e===Ks?v8:iw(e),n=(r,o={})=>{const{equalityFn:i=Jie,devModeChecks:s={}}=typeof o=="function"?{equalityFn:o}:o,{store:c,subscription:d,getServerState:p,stabilityCheck:m,identityFunctionCheck:y}=t();Jo.useRef(!0);const b=Jo.useCallback({[r.name](S){return r(S)}}[r.name],[r,m,s.stabilityCheck]),_=y8(d.addNestedSub,c.getState,p||c.getState,b,i);return Jo.useDebugValue(_),_};return Object.assign(n,{withTypes:()=>n}),n}var Qn=eae();function tae(e){e()}function nae(){let e=null,t=null;return{clear(){e=null,t=null},notify(){tae(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var wA={notify(){},get:()=>[]};function rae(e,t){let n,r=wA,o=0,i=!1;function s(w){m();const T=r.subscribe(w);let E=!1;return()=>{E||(E=!0,T(),y())}}function c(){r.notify()}function d(){S.onStateChange&&S.onStateChange()}function p(){return i}function m(){o++,n||(n=e.subscribe(d),r=nae())}function y(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=wA)}function b(){i||(i=!0,m())}function _(){i&&(i=!1,y())}const S={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:d,isSubscribed:p,trySubscribe:b,tryUnsubscribe:_,getListeners:()=>r};return S}var oae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iae=typeof navigator<"u"&&navigator.product==="ReactNative",aae=oae||iae?Jo.useLayoutEffect:Jo.useEffect;function sae({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const s=Jo.useMemo(()=>{const p=rae(e);return{store:e,subscription:p,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,r,o,i]),c=Jo.useMemo(()=>e.getState(),[e]);aae(()=>{const{subscription:p}=s;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),c!==e.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[s,c]);const d=t||Ks;return Jo.createElement(d.Provider,{value:s},n)}var lae=sae;function x8(e=Ks){const t=e===Ks?v8:iw(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var cae=x8();function uae(e=Ks){const t=e===Ks?cae:x8(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Vo=uae();Zie(Xie.useSyncExternalStoreWithSelector);const Og=e=>({type:"UPDATE_ATTENDENCE_ANOMOLY_DATA",payload:e}),of=e=>({type:"UPDATE_PART-A_ANOMOLY_DATA",payload:e}),U1=e=>({type:"UPDATE_SYSTEM_NO",payload:e}),b8=e=>({type:"UPDATE_PLAYGROUND_QUERY",payload:e}),C8=e=>({type:"UPDATE_PLAYGROUND_PAGENO",payload:e}),$m=e=>({type:"UPDATE_PLAYGROUND_TOTAL_PAGES",payload:e}),S8=e=>({type:"UPDATE_PLAYGROUND_RESULTS",payload:e}),dae=e=>({type:"UPDATE_PARTC_ERROR_LIST",payload:e}),Tf=e=>({type:"UPDATE_PARTC_ERROR_DATA",payload:e}),EA=e=>({type:"UPDATE_SELECTED_ERROR_JSON",payload:e}),fae=e=>({type:"UPDATE_PART_C_DEGREE_TYPE",payload:e}),Iy=e=>({type:"UPDATE_EV_QRCODE_LIST",payload:e});var aw={},hae=fi;Object.defineProperty(aw,"__esModule",{value:!0});var La=aw.default=void 0,pae=hae(da()),gae=x;La=aw.default=(0,pae.default)((0,gae.jsx)("path",{d:"M7.11 8.53 5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93"}),"RotateLeft");var sw={},mae=fi;Object.defineProperty(sw,"__esModule",{value:!0});var ja=sw.default=void 0,vae=mae(da()),yae=x;ja=sw.default=(0,vae.default)((0,yae.jsx)("path",{d:"M15.55 5.55 11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m3.89-2.42 1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48"}),"RotateRight");const{Header:xae,Content:bae,Footer:Cae,Sider:Sae}=fn;function wae(e,t,n,r){return{key:t,icon:n,children:r,label:e}}const Eae=[wae("Reassigned Booklet No","1",x.jsx(ds,{}))],Iae=()=>{console.log("Checking1 ...");const[e,t]=f.useState(!1),[n,r]=f.useState(null),[o,i]=f.useState(!1),[s,c]=f.useState(null);f.useState(!1);const[d,p]=f.useState(null),[m,y]=f.useState(!1),[b,_]=f.useState(null);f.useState("0% 0%"),f.useState(!1);const S=Vo(),[w,T]=f.useState(80),[E,I]=f.useState(0),A=Qn(K=>K.attendenceAnomolyData),[O,P]=f.useState([]),R=pr();let[M,$]=ic();const F=M.get("sno");console.log("Serach parmas sno : ",F);const[k,B]=f.useState(window.innerWidth);f.useEffect(()=>{const K=()=>{B(window.innerWidth)};return window.addEventListener("resize",K),()=>{window.removeEventListener("resize",K)}},[]),f.useEffect(()=>{k<800&&t(!0),k>800&&t(!1)},[k]),f.useEffect(()=>{F&&r(F)},[F]),f.useEffect(()=>{U()},[n]);const{token:{colorBgContainer:V,borderRadiusLG:W}}=Io.useToken();f.useEffect(()=>{A.length===0&&L()},[]);const L=()=>{console.log("Fetching......."),y(!0),fetch("https://api.exampaper.vidh.ai/fetchAnamolyAttendenceData",{method:"GET",headers:{"Content-Type":"application/json"}}).then(K=>(console.log("Response fetched.."),K.json())).then(K=>{console.log("Response Data is : ",K),y(!1),K.status==="success"&&(P(K==null?void 0:K.data),console.log("Data to be stored in store : ",K==null?void 0:K.data),S(Og(K==null?void 0:K.data)))}).catch(K=>{console.error("Error fetching data: ",K),y(!1)})},U=async()=>{y(!0),c(null),n||console.log("Returning");const ee=await(await fetch("https://api.exampaper.vidh.ai/fetchBookletInfo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bookletInput:n})})).json();if(console.log("Response Data is : ",ee),i(!0),y(!1),ee.status==="success"&&(console.log("Into top if"),ee.data||c(null),ee.data)){c(ee.data[0]);const oe=ee.data[0];_(oe==null?void 0:oe.register_number)}};`${s==null?void 0:s.s3_path}`;const H=()=>{console.log("Zooming In Image ....");const K=document.getElementsByClassName("scanned-img");for(var J of K){console.log("Ele is : ",J);const ee=w+10;T(ee),J.style.width=`${ee}%`}},z=()=>{console.log("Zooming Out Image ....");const K=document.getElementsByClassName("scanned-img");for(var J of K){console.log("Ele is : ",J);const ee=w-10;T(ee),J.style.width=`${ee}%`}},j=()=>{const K=document.getElementsByClassName("scanned-img");for(var J of K){console.log("Ele is : ",J);const ee=E-90;I(ee),J.style.transform=`rotate(${ee}deg)`}},Y=()=>{const K=document.getElementsByClassName("scanned-img");for(var J of K){console.log("Ele is : ",J);const ee=E+90;I(ee),J.style.transform=`rotate(${ee}deg)`}},X=async()=>{y(!0),console.log("Reassgined Sno : ",d);const ee=await(await fetch("https://api.exampaper.vidh.ai/updateReassingedSno",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bookletInput:n,reasssingedSno:d,registerNumber:b})})).json();if(y(!1),p(null),ee.status==="success"&&(ee==null?void 0:ee.status_code)==200){console.log("Updation success"),sn.success("Record Updated Successfully !!");var oe=0,xe=0;const ae=A.filter(de=>(de==null?void 0:de.student_slno)===F?(xe=oe,console.log("data matched : ",de),!1):(oe+=1,!0));console.log("Filtered Data: ",ae),S(Og(ae)),ae.length>0&&R(`/anomoly/reassigned/booklet?sno=${ae[xe].student_slno}`)}else ee.status==="success"&&(ee==null?void 0:ee.status_code)==405&&(console.log("Updation not allowed"),sn.error("Reassigned Serial No is Invalid !!"))},q=async()=>{y(!0);const ee=await(await fetch("https://api.exampaper.vidh.ai/markAsAssigned",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bookletInput:n})})).json();if(y(!1),ee.status==="success"){sn.success("Record Updated Successfully !!");var oe=0,xe=0;const ae=A.filter(de=>(de==null?void 0:de.student_slno)===F?(xe=oe,console.log("data matched : ",de),!1):(oe+=1,!0));console.log("Filtered Data: ",ae),S(Og(ae)),ae.length>0&&R(`/anomoly/reassigned/booklet?sno=${ae[xe].student_slno}`)}};return x.jsxs(fn,{style:{minHeight:"100vh"},children:[x.jsx(Fo,{}),x.jsxs(Sae,{collapsible:!0,collapsed:e,onCollapse:K=>t(K),children:[x.jsx("div",{className:"demo-logo-vertical"}),x.jsx(ui,{theme:"dark",defaultSelectedKeys:["1"],mode:"inline",items:Eae})]}),x.jsxs(fn,{children:[x.jsx(xae,{style:{padding:0,background:V},children:x.jsxs(pe,{className:"d-flex justify-content-between h-100 py-1 px-2",children:[x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>{R(-1)},children:x.jsx(Ho,{})}),x.jsxs(pe,{className:"d-flex justify-content-between gap-2",children:[x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>{R("/anomoly/reassigned/stats")},children:x.jsx(ac,{})}),x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>{R("/")},children:x.jsx(zo,{})})]})]})}),x.jsx(bae,{style:{margin:"16px 16px"},children:x.jsxs(pe,{className:"w-100 d-flex flex-column flex-md-row justify-content-between",children:[x.jsxs(pe,{className:"w-25 d-none d-md-flex flex-column",children:[x.jsx(pe,{className:"d-flex justify-content-between"}),s&&x.jsx(x.Fragment,{children:x.jsxs(pe,{children:[x.jsx(pe,{className:"d-flex justify-content-start px-2 py-3",children:x.jsx("h6",{children:x.jsx("u",{children:"Booklet Info:"})})}),x.jsxs(pe,{className:"px-2",children:[x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"student-name-input",className:"h6",children:x.jsx("u",{children:"Booklet Serial No:"})}),x.jsx("h5",{children:n})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"student-name-input",className:"h6",children:x.jsx("u",{children:"Student Name:"})}),x.jsx("h5",{children:s==null?void 0:s.student_name})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"exam-centre-code-input",className:"h6",children:x.jsx("u",{children:"Exam Center Code:"})}),x.jsx("h5",{children:s==null?void 0:s.exam_centre_code})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"exam-centre-input",className:"h6",children:x.jsx("u",{children:"Exam Centre:"})}),x.jsx("h5",{children:s.exam_centre})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"exam-date-input",className:"h6",children:x.jsx("u",{children:"Exam Date:"})}),x.jsx("h5",{children:s==null?void 0:s.exam_date})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"reassigned-serial-no-input",children:x.jsx("u",{children:"Reassigned Serial No:"})}),x.jsx(pe,{className:"d-flex justify-content-between w-100",children:x.jsx(vo,{id:"reassigned-serial-no-input",className:"w-100",value:s.reassigned_serial_no,placeholder:`Please enter the SNo.${s==null?void 0:s.rownumber} Answer Booklet No`,autoComplete:"off",onChange:K=>{p(K.target.value)}})})]}),x.jsxs(pe,{className:"py-2 d-flex justify-content-start flex-column gap-2",children:[x.jsx(it,{className:"text-light bg-primary p-3 w-100",disabled:!d,onClick:X,children:"Update"}),x.jsx(it,{className:"text-light bg-primary p-3 w-100",onClick:q,children:"Mark As Assigned"})]})]})]})})]}),x.jsx(pe,{className:"w-md-25 d-flex d-md-none flex-column",children:s&&x.jsx(x.Fragment,{children:x.jsxs(pe,{children:[x.jsx(pe,{className:"d-flex justify-content-start px-2 py-3",children:x.jsx("h6",{children:x.jsx("u",{children:"Booklet Info:"})})}),x.jsxs(pe,{className:"px-2",children:[x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"student-name-input",className:"h6",children:x.jsx("u",{children:"Booklet Serial No:"})}),x.jsx("h5",{children:n})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"student-name-input",className:"h6",children:x.jsx("u",{children:"Student Name:"})}),x.jsx("h5",{children:s==null?void 0:s.student_name})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"exam-centre-code-input",className:"h6",children:x.jsx("u",{children:"Exam Center Code:"})}),x.jsx("h5",{children:s==null?void 0:s.exam_centre_code})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"exam-centre-input",className:"h6",children:x.jsx("u",{children:"Exam Centre:"})}),x.jsx("h5",{children:s.exam_centre})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"exam-date-input",className:"h6",children:x.jsx("u",{children:"Exam Date:"})}),x.jsx("h5",{children:s==null?void 0:s.exam_date})]}),x.jsxs(pe,{className:"d-flex flex-column align-items-start gap-2 py-2",children:[x.jsx("label",{for:"reassigned-serial-no-input",children:x.jsx("u",{children:"Reassigned Serial No:"})}),x.jsx(pe,{className:"d-flex justify-content-between w-100",children:x.jsx(vo,{id:"reassigned-serial-no-input",className:"w-100",value:s.reassigned_serial_no,placeholder:`Please enter the SNo.${s==null?void 0:s.rownumber} Answer Booklet No`,autoComplete:"off",onChange:K=>{p(K.target.value)}})})]}),x.jsxs(pe,{className:"py-2 d-flex justify-content-start flex-column gap-2",children:[x.jsx(it,{className:"text-light bg-primary p-3 w-100",disabled:!d,onClick:X,children:"Update"}),x.jsx(it,{className:"text-light bg-primary p-3 w-100",onClick:q,children:"Mark As Assigned"})]})]})]})})}),x.jsx(pe,{className:"w-75 d-none d-md-block",style:{height:"800px",overflow:"auto"},children:s&&x.jsxs(x.Fragment,{children:[x.jsxs(pe,{className:"py-2",children:[x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:H,children:"ZoomIn"}),x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:z,children:"ZoomOut"}),x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:j,children:x.jsx(La,{})}),x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:Y,children:x.jsx(ja,{})})]}),x.jsx("img",{className:"scanned-img",src:`https://docs.exampaper.vidh.ai/${s==null?void 0:s.s3_path}`,width:`${w}%`})]})}),x.jsx(pe,{className:"w-100 d-md-none overflow-auto",children:s&&x.jsxs(x.Fragment,{children:[x.jsxs(pe,{className:"py-2",children:[x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:H,children:"ZoomIn"}),x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:z,children:"ZoomOut"}),x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:j,children:x.jsx(La,{})}),x.jsx(it,{className:"bg-primary text-light p-3 mx-1",onClick:Y,children:x.jsx(ja,{})})]}),x.jsx("img",{className:"scanned-img",src:`https://docs.exampaper.vidh.ai/${s.s3_path}`,width:`${w}%`})]})})]})}),x.jsxs(Cae,{style:{textAlign:"center"},children:["exampaper.vidh.ai ©",new Date().getFullYear()]})]}),m&&x.jsx(Yr,{loadingText:"Fetching"})]})};var lw={},_ae=fi;Object.defineProperty(lw,"__esModule",{value:!0});var w8=lw.default=void 0,Tae=_ae(da()),Aae=x;w8=lw.default=(0,Tae.default)((0,Aae.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var cw={},Nae=fi;Object.defineProperty(cw,"__esModule",{value:!0});var E8=cw.default=void 0,Oae=Nae(da()),IA=x;E8=cw.default=(0,Oae.default)([(0,IA.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"},"0"),(0,IA.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn");var uw={},Rae=fi;Object.defineProperty(uw,"__esModule",{value:!0});var I8=uw.default=void 0,Mae=Rae(da()),Pae=x;I8=uw.default=(0,Mae.default)((0,Pae.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z"}),"ZoomOut");const $ae=f.forwardRef(function(t,n){return x.jsx(Xre,{direction:"up",ref:n,...t})});function Dae({imagePath:e,setIsDialogOpen:t}){const[n,r]=f.useState(!1),[o,i]=f.useState(80),[s,c]=f.useState(0),d=()=>{r(!0)},p=()=>{r(!1),t(!1)};f.useEffect(()=>{d()},[]);const m=()=>{console.log("Zooming In Image ....");const _=document.getElementsByClassName("scanned-img");for(var S of _){console.log("Ele is : ",S);const w=o+10;i(w),S.style.width=`${w}%`}},y=()=>{console.log("Zooming Out Image ....");const _=document.getElementsByClassName("scanned-img");for(var S of _){console.log("Ele is : ",S);const w=o-10;i(w),S.style.width=`${w}%`}},b=()=>{const _=document.getElementsByClassName("scanned-img");for(var S of _){console.log("Ele is : ",S);const w=s-90;c(w),S.style.transform=`rotate(${w}deg)`}};return x.jsx(f.Fragment,{children:x.jsxs(jh,{fullScreen:!0,open:n,onClose:p,TransitionComponent:$ae,children:[x.jsx(tre,{sx:{position:"relative"},children:x.jsxs(voe,{children:[x.jsx(Fp,{edge:"start",color:"inherit",onClick:p,"aria-label":"close",children:x.jsx(w8,{})}),x.jsx(Fp,{color:"inherit",onClick:m,"aria-label":"zoom in",children:x.jsx(E8,{})}),x.jsx(Fp,{color:"inherit",onClick:y,"aria-label":"zoom out",children:x.jsx(I8,{})}),x.jsx(Fp,{color:"inherit",onClick:b,"aria-label":"rotate",children:x.jsx(ja,{})})]})}),x.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",overflow:"auto"},children:x.jsx("img",{className:"scanned-img",style:{marginTop:"60%"},width:`${o}%`,src:`https://docs.exampaper.vidh.ai/${e}`,alt:"S3 Image"})})]})})}function hd({filterSelectedExamCentreCode:e,setFilterSelectedExamCentreCode:t,rows:n,type:r,distinctExamCentreCodes:o,batchType:i}){console.log("Rows in table component : ",n);const[s,c]=f.useState(0),[d,p]=f.useState(5),[m,y]=f.useState(!1),[b,_]=f.useState(""),[S,w]=f.useState(!1),T=()=>{w(!1)},E=()=>{w(!0)},[I,A]=f.useState({open:!1,vertical:"top",horizontal:"center",message:""}),{vertical:O,horizontal:P,open:R,message:M}=I,$=()=>{A({...I,open:!1})},F=s>0?Math.max(0,(1+s)*d-n.length):0,k=(z,j)=>{c(j)},B=z=>{p(parseInt(z.target.value,10)),c(0)},V=z=>{console.log("imagepath:",z),_(z),y(!0)},[W,L]=f.useState(null);f.useState([]);const U=z=>{L(z.target.files[0]),console.log("event.target.files[0]: ",z.target.files[0])},H=async()=>{if(!W){alert("Please upload a CSV file first.");return}const z=new FormData;z.append("file",W);try{E();const j=await fetch("https://api.exampaper.vidh.ai/uploadAdditionalAttendanceCsv",{method:"POST",body:z});if(j.ok){const Y=await j.json();console.log("File uploaded successfully:",Y),T(),sn.success(Y.message)}else console.error("File upload failed:",j.statusText),T(),sn.error("failed to upload")}catch(j){console.error("Error uploading file:",j),T(),sn.error("failed to upload")}};return x.jsxs(Lae,{className:"overflow-auto",sx:{maxWidth:"100%",width:1200},children:[r==="AnomolyReassigned"&&x.jsxs(x.Fragment,{children:[x.jsx("h5",{className:"py-2",children:"Manual Verification Needed Students :"}),x.jsxs("table",{"aria-label":"custom pagination table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:"Attendence Serial No"}),x.jsx("th",{children:"Answer Booklet Serial No"}),x.jsx("th",{children:"Exam Centre Code"}),x.jsx("th",{children:"Exam Centre"}),x.jsx("th",{children:"Student Name"}),x.jsx("th",{children:"Register Number"}),x.jsx("th",{children:"Reassigned Booklet Serial No"})]})}),x.jsxs("tbody",{children:[(d>0?n.slice(s*d,s*d+d):n).map(z=>x.jsxs("tr",{children:[x.jsx("td",{children:z.attendence_serial_no}),x.jsx("td",{style:{width:160},align:"right",children:x.jsx(Ey,{to:`/anomoly/reassigned/booklet?sno=${z==null?void 0:z.answer_booklet_sno}`,children:z.answer_booklet_sno})}),x.jsx("td",{style:{width:160},align:"right",children:z.exam_centre_code}),x.jsx("td",{style:{width:160},align:"right",children:z.exam_centre}),x.jsx("td",{style:{width:160},align:"right",children:z.student_name}),x.jsx("td",{style:{width:160},align:"right",children:z.register_number}),x.jsx("td",{style:{width:160},align:"right",children:z.reassigned_serial_no})]},z.attendence_serial_no)),F>0&&x.jsx("tr",{style:{height:41*F},children:x.jsx("td",{colSpan:3,"aria-hidden":!0})})]}),x.jsx("tfoot",{children:x.jsx("tr",{children:x.jsx(Mc,{rowsPerPageOptions:[5,10,25,{label:"All",value:-1}],colSpan:3,count:n.length,rowsPerPage:d,page:s,slotProps:{select:{"aria-label":"rows per page"},actions:{showFirstButton:!0,showLastButton:!0}},onPageChange:k,onRowsPerPageChange:B})})})]})]}),r==="ReassignedStats"&&x.jsxs(x.Fragment,{children:[x.jsx("h5",{className:"py-2",children:"Exam Centre Code Complete MetaData :"}),x.jsxs("table",{"aria-label":"custom pagination table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:"Exam Centre Code"}),x.jsx("th",{children:"Total Scanned Count"}),x.jsx("th",{children:"Manual Verification Count"})]})}),x.jsxs("tbody",{children:[(d>0?n.slice(s*d,s*d+d):n).map(z=>x.jsxs("tr",{children:[x.jsx("td",{style:{width:160},align:"right",children:x.jsx("a",{href:`/anomoly/reassigned/stats/${z.exam_centre_code}`,children:z.exam_centre_code})}),x.jsx("td",{style:{width:160},align:"right",children:z.total_count}),x.jsx("td",{style:{width:160},align:"right",children:z.manual_verification_count})]},z.exam_centre_code)),F>0&&x.jsx("tr",{style:{height:41*F},children:x.jsx("td",{colSpan:3,"aria-hidden":!0})})]}),x.jsx("tfoot",{children:x.jsx("tr",{children:x.jsx(Mc,{rowsPerPageOptions:[5,10,25,{label:"All",value:-1}],colSpan:3,count:n.length,rowsPerPage:d,page:s,slotProps:{select:{"aria-label":"rows per page"},actions:{showFirstButton:!0,showLastButton:!0}},onPageChange:k,onRowsPerPageChange:B})})})]})]}),r==="IndividualReassignedStats"&&x.jsxs(x.Fragment,{children:[x.jsx("h5",{className:"py-2",children:"Exam Centre Code-Date Wise MetaData :"}),x.jsxs("table",{"aria-label":"custom pagination table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:"Exam Centre Code"}),x.jsx("th",{children:"Exam Date"}),x.jsx("th",{children:"Subject Code"}),x.jsx("th",{children:"Total Count"}),x.jsx("th",{children:"Manual Verification Count"})]})}),x.jsxs("tbody",{children:[(d>0?n.slice(s*d,s*d+d):n).map(z=>x.jsxs("tr",{children:[x.jsx("td",{style:{width:160},align:"right",children:z.exam_centre_code}),x.jsx("td",{style:{width:160},align:"right",children:z.exam_date}),x.jsx("td",{style:{width:160},align:"right",children:z.subject_code}),x.jsx("td",{style:{width:160},align:"right",children:z.total_count}),x.jsx("td",{style:{width:160},align:"right",children:z.manual_verification_needed_count})]},z.exam_centre_code)),F>0&&x.jsx("tr",{style:{height:41*F},children:x.jsx("td",{colSpan:3,"aria-hidden":!0})})]}),x.jsx("tfoot",{children:x.jsx("tr",{children:x.jsx(Mc,{rowsPerPageOptions:[5,10,25,{label:"All",value:-1}],colSpan:3,count:n.length,rowsPerPage:d,page:s,slotProps:{select:{"aria-label":"rows per page"},actions:{showFirstButton:!0,showLastButton:!0}},onPageChange:k,onRowsPerPageChange:B})})})]})]}),r==="PartAReassigned"&&x.jsxs(x.Fragment,{children:[x.jsx("h5",{className:"py-2",children:"Part-A Anomoly Data :"}),x.jsxs("table",{"aria-label":"custom pagination table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:"s3_path"}),x.jsx("th",{children:"Barcode"}),x.jsx("th",{children:"Subject Code"}),x.jsx("th",{children:"Register Number"}),x.jsx("th",{children:"Type"})]})}),x.jsxs("tbody",{children:[(d>0?n.slice(s*d,s*d+d):n).map(z=>x.jsxs("tr",{children:[x.jsx("td",{style:{width:160},align:"right",children:x.jsx(Ey,{to:`/anomoly/partA/booklet?batchType=${i}&barcode=${z.barcode}&s3Path=${z.s3_path}&sysNo=${z.systemNo}`,children:z==null?void 0:z.s3_path})}),x.jsx("td",{style:{width:160},align:"right",children:z.barcode}),x.jsx("td",{style:{width:160},align:"right",children:z.subject_code}),x.jsx("td",{style:{width:160},align:"right",children:z.register_number}),x.jsx("td",{style:{width:160},align:"right",children:z.type})]},z.exam_centre_code)),F>0&&x.jsx("tr",{style:{height:41*F},children:x.jsx("td",{colSpan:3,"aria-hidden":!0})})]}),x.jsx("tfoot",{children:x.jsx("tr",{children:x.jsx(Mc,{rowsPerPageOptions:[5,10,25,{label:"All",value:-1}],colSpan:3,count:n.length,rowsPerPage:d,page:s,slotProps:{select:{"aria-label":"rows per page"},actions:{showFirstButton:!0,showLastButton:!0}},onPageChange:k,onRowsPerPageChange:B})})})]})]}),r==="AttendenceAdditionalRecord"&&x.jsxs(x.Fragment,{children:[x.jsx("h5",{className:"py-2",children:"Part-A Anomoly Data :"}),x.jsxs("table",{"aria-label":"custom pagination table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:"qrcode"}),x.jsx("th",{children:"Cover A"}),x.jsx("th",{children:"Cover B"}),x.jsx("th",{children:"Subject Code"}),x.jsx("th",{children:"Total Students"}),x.jsx("th",{children:"Total Present"}),x.jsx("th",{children:"Total Absent"})]})}),x.jsxs("tbody",{children:[(d>0?n.slice(s*d,s*d+d):n).map(z=>x.jsxs("tr",{children:[x.jsx("td",{style:{width:160},align:"right",children:x.jsx(Ey,{to:`/anomoly/attendence/additionalRecord/correction?qrcode=${z.qrcode}`,children:z==null?void 0:z.qrcode})}),x.jsx("td",{style:{width:160},align:"right",children:z.coverA}),x.jsx("td",{style:{width:160},align:"right",children:z.coverB}),x.jsx("td",{style:{width:160},align:"right",children:z.subject_code}),x.jsx("td",{style:{width:160},align:"right",children:z.total_students}),x.jsx("td",{style:{width:160},align:"right",children:z.total_present}),x.jsx("td",{style:{width:160},align:"right",children:z.total_absent})]},z.exam_centre_code)),F>0&&x.jsx("tr",{style:{height:41*F},children:x.jsx("td",{colSpan:3,"aria-hidden":!0})})]}),x.jsx("tfoot",{children:x.jsx("tr",{children:x.jsx(Mc,{rowsPerPageOptions:[5,10,25,{label:"All",value:-1}],colSpan:3,count:n.length,rowsPerPage:d,page:s,slotProps:{select:{"aria-label":"rows per page"},actions:{showFirstButton:!0,showLastButton:!0}},onPageChange:k,onRowsPerPageChange:B})})})]})]}),r==="AdditionalSheet"&&x.jsxs(x.Fragment,{children:[x.jsx("h5",{className:"py-2",children:"Attendance Additional Sheet"}),x.jsx("div",{style:{width:"200px",height:"50px",backgroundColor:"lightblue",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"5px"},children:x.jsx("a",{style:{textDecoration:"none",color:"black",padding:"10px 20px",backgroundColor:"white",border:"1px solid black",borderRadius:"5px",textAlign:"center",display:"inline-block"},href:"/src/assets/additional_attendance_template.csv",download:"additional_attendance_template.csv",children:"Download Template CSV"})}),x.jsx("p",{children:"Please download the CSV file and by verifying the image type appropriately"}),x.jsxs("table",{"aria-label":"custom pagination table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:"Image Name"}),x.jsx("th",{children:"upload csv"}),x.jsx("th",{children:"Image"})]})}),x.jsxs("tbody",{children:[(d>0?n.slice(s*d,s*d+d):n).map(z=>x.jsxs("tr",{children:[x.jsx("td",{style:{width:160},align:"right",children:z.image_name}),x.jsx("td",{style:{width:160},align:"right",children:x.jsxs("div",{children:[x.jsx("input",{type:"file",accept:".csv",onChange:U}),x.jsx("button",{style:{width:"130px",height:"30px",fontSize:"12px",textAlign:"center"},onClick:H,children:"Upload CSV"})]})}),x.jsxs("td",{style:{width:160},align:"right",children:[x.jsx("div",{children:x.jsx("span",{style:{cursor:"pointer",color:"blue"},onClick:()=>V(z.s3_image_path),children:"Preview Image"})}),x.jsx("div",{children:x.jsx("span",{children:x.jsx("a",{style:{textDecoration:"none"},href:`https://docs.exampaper.vidh.ai/${z.s3_image_path}`,download:!0,children:"Download Image"})})})]})]},z.exam_centre_code)),F>0&&x.jsx("tr",{style:{height:41*F},children:x.jsx("td",{colSpan:3,"aria-hidden":!0})})]}),x.jsx("tfoot",{children:x.jsx("tr",{children:x.jsx(Mc,{rowsPerPageOptions:[5,10,25,{label:"All",value:-1}],colSpan:3,count:n.length,rowsPerPage:d,page:s,slotProps:{select:{"aria-label":"rows per page"},actions:{showFirstButton:!0,showLastButton:!0}},onPageChange:k,onRowsPerPageChange:B})})})]})]}),m&&x.jsx(Dae,{imagePath:b,setIsDialogOpen:y}),x.jsx(KS,{sx:{color:"#fff",zIndex:z=>z.zIndex.drawer+1},open:S,children:x.jsx(Nm,{color:"inherit"})}),x.jsx(pe,{sx:{width:500},children:x.jsx(foe,{anchorOrigin:{vertical:O,horizontal:P},open:R,onClose:$,message:M},O+P)}),x.jsx(Fo,{})]})}const _y={50:"#F3F6F9",100:"#E5EAF2",200:"#DAE2ED",300:"#C7D0DD",400:"#B0B8C4",500:"#9DA8B7",600:"#6B7A90",700:"#434D5B",800:"#303740",900:"#1C2025"},Lae=m1("div")(({theme:e})=>` -./dist/assets/index-C7VD-tuW.js:562:`;const{Header:ufe,Content:dfe,Footer:phe,Sider:ghe}=fn;function ffe(){const[e,t]=f.useState([]),[n,r]=f.useState(window.innerWidth),[o,i]=f.useState(!1),[s,c]=f.useState([]);f.useState([]);const[d,p]=f.useState(!1),[m,y]=f.useState([]);Vo(),Qn(F=>F.attendenceAnomolyData);const[b,_]=f.useState(!1),[S,w]=f.useState(""),T=Qn(F=>F==null?void 0:F.systemNumber);f.useEffect(()=>{T?O(T):_(!0)},[]),f.useEffect(()=>{const F=()=>{r(window.innerWidth)};return window.addEventListener("resize",F),()=>{window.removeEventListener("resize",F)}},[]),f.useEffect(()=>{n<800&&i(!0),n>800&&i(!1)},[n]);function E(F,k){return{image_name:F,s3_image_path:k}}const I=async F=>{const k={systemRecords:F,sysNo:T};try{fetch("https://api.exampaper.vidh.ai/updateSystemReservationStatusAttendence",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}).then(B=>B.json()).then(B=>{console.log("response from updation : ",B)})}catch{throw new Error("Error in update system records : ",F)}};function A(F,k){const B=[];for(var V=0;V{console.log("Fetching......."),p(!0),fetch(`https://api.exampaper.vidh.ai/fetchAnamolyAttendenceAdditionalSheetData?sysNo=${F}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then(k=>(console.log("Response fetched.."),k.json())).then(k=>{if(console.log("Response Data is : ",k),p(!1),k.status==="success"){console.log("System record ====== ",k.systemRecord);var B=k==null?void 0:k.data;k.systemRecord||(B=A(k==null?void 0:k.data,F)),I(B),console.log("System records : ",B),c(B);const V=[];for(const W of B)V.push(E(W.image_name,W.s3_image_path));V.length>0&&t(V)}}).catch(k=>{console.error("Error fetching data: ",k),p(!1)})};f.useEffect(()=>{for(var F in s)(F==null?void 0:F.exam_centre_code)==S},[S]);const P=()=>{console.log("System No Change is called"),_(!0)};f.useEffect(()=>{console.log("System no container show status : ",b)},[b]);const{token:{colorBgContainer:R,borderRadiusLG:M}}=Io.useToken(),$=pr();return x.jsxs(fn,{style:{minHeight:"100vh"},children:[x.jsx(Fo,{}),x.jsxs(fn,{children:[x.jsx(ufe,{style:{padding:0,background:R},children:x.jsxs(pe,{className:"d-flex justify-content-between h-100 py-1 px-2",children:[x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>{$(-1)},children:x.jsx(Ho,{})}),x.jsxs(pe,{className:"d-flex justify-content-between gap-2",children:[T&&x.jsxs(pe,{className:"h6 p-0 m-0 text-light bg-primary rounded h-100 d-flex align-items-center px-3",style:{cursor:"pointer"},onClick:P,children:[x.jsx("b",{children:"System No : "})," ",T]}),x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>{$("/")},children:x.jsx(zo,{})})]})]})}),x.jsx(dfe,{style:{margin:"16px 16px"},children:x.jsx(pe,{className:"w-100 d-flex justify-content-between",children:x.jsxs(pe,{className:"w-100 d-flex justify-content-center",children:[e.length>0&&x.jsx(hd,{filterSelectedExamCentreCode:S,setFilterSelectedExamCentreCode:w,rows:e,type:"AdditionalSheet",distinctExamCentreCodes:m}),e.length==0&&x.jsx(pe,{className:"w-100 d-flex justify-content-center py-2 align-items-center text-center",children:x.jsx("h6",{children:"No Data Found !!"})})]})})})]}),d&&x.jsx(Yr,{loadingText:"Loading"}),b&&x.jsx(zh,{setShowSystemNoContainer:_,showSystemNoContainer:b})]})}var bw={},hfe=fi;Object.defineProperty(bw,"__esModule",{value:!0});var r5=bw.default=void 0,pfe=hfe(da()),gfe=x;r5=bw.default=(0,pfe.default)((0,gfe.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download");(()=>{var e={296:(o,i,s)=>{var c=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,y=parseInt,b=typeof s.g=="object"&&s.g&&s.g.Object===Object&&s.g,_=typeof self=="object"&&self&&self.Object===Object&&self,S=b||_||Function("return this")(),w=Object.prototype.toString,T=Math.max,E=Math.min,I=function(){return S.Date.now()};function A(P){var R=typeof P;return!!P&&(R=="object"||R=="function")}function O(P){if(typeof P=="number")return P;if(function($){return typeof $=="symbol"||function(F){return!!F&&typeof F=="object"}($)&&w.call($)=="[object Symbol]"}(P))return NaN;if(A(P)){var R=typeof P.valueOf=="function"?P.valueOf():P;P=A(R)?R+"":R}if(typeof P!="string")return P===0?P:+P;P=P.replace(c,"");var M=p.test(P);return M||m.test(P)?y(P.slice(2),M?2:8):d.test(P)?NaN:+P}o.exports=function(P,R,M){var $,F,k,B,V,W,L=0,U=!1,H=!1,z=!0;if(typeof P!="function")throw new TypeError("Expected a function");function j(J){var ee=$,oe=F;return $=F=void 0,L=J,B=P.apply(oe,ee)}function Y(J){var ee=J-W;return W===void 0||ee>=R||ee<0||H&&J-L>=k}function X(){var J=I();if(Y(J))return q(J);V=setTimeout(X,function(ee){var oe=R-(ee-W);return H?E(oe,k-(ee-L)):oe}(J))}function q(J){return V=void 0,z&&$?j(J):($=F=void 0,B)}function K(){var J=I(),ee=Y(J);if($=arguments,F=this,W=J,ee){if(V===void 0)return function(oe){return L=oe,V=setTimeout(X,R),U?j(oe):B}(W);if(H)return V=setTimeout(X,R),j(W)}return V===void 0&&(V=setTimeout(X,R)),B}return R=O(R)||0,A(M)&&(U=!!M.leading,k=(H="maxWait"in M)?T(O(M.maxWait)||0,R):k,z="trailing"in M?!!M.trailing:z),K.cancel=function(){V!==void 0&&clearTimeout(V),L=0,$=W=F=V=void 0},K.flush=function(){return V===void 0?B:q(I())},K}},96:(o,i,s)=>{var c="Expected a function",d=NaN,p="[object Symbol]",m=/^\s+|\s+$/g,y=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,_=/^0o[0-7]+$/i,S=parseInt,w=typeof s.g=="object"&&s.g&&s.g.Object===Object&&s.g,T=typeof self=="object"&&self&&self.Object===Object&&self,E=w||T||Function("return this")(),I=Object.prototype.toString,A=Math.max,O=Math.min,P=function(){return E.Date.now()};function R($){var F=typeof $;return!!$&&(F=="object"||F=="function")}function M($){if(typeof $=="number")return $;if(function(B){return typeof B=="symbol"||function(V){return!!V&&typeof V=="object"}(B)&&I.call(B)==p}($))return d;if(R($)){var F=typeof $.valueOf=="function"?$.valueOf():$;$=R(F)?F+"":F}if(typeof $!="string")return $===0?$:+$;$=$.replace(m,"");var k=b.test($);return k||_.test($)?S($.slice(2),k?2:8):y.test($)?d:+$}o.exports=function($,F,k){var B=!0,V=!0;if(typeof $!="function")throw new TypeError(c);return R(k)&&(B="leading"in k?!!k.leading:B,V="trailing"in k?!!k.trailing:V),function(W,L,U){var H,z,j,Y,X,q,K=0,J=!1,ee=!1,oe=!0;if(typeof W!="function")throw new TypeError(c);function xe(ie){var ue=H,we=z;return H=z=void 0,K=ie,Y=W.apply(we,ue)}function ae(ie){var ue=ie-q;return q===void 0||ue>=L||ue<0||ee&&ie-K>=j}function de(){var ie=P();if(ae(ie))return Ie(ie);X=setTimeout(de,function(ue){var we=L-(ue-q);return ee?O(we,j-(ue-K)):we}(ie))}function Ie(ie){return X=void 0,oe&&H?xe(ie):(H=z=void 0,Y)}function ge(){var ie=P(),ue=ae(ie);if(H=arguments,z=this,q=ie,ue){if(X===void 0)return function(we){return K=we,X=setTimeout(de,L),J?xe(we):Y}(q);if(ee)return X=setTimeout(de,L),xe(q)}return X===void 0&&(X=setTimeout(de,L)),Y}return L=M(L)||0,R(U)&&(J=!!U.leading,j=(ee="maxWait"in U)?A(M(U.maxWait)||0,L):j,oe="trailing"in U?!!U.trailing:oe),ge.cancel=function(){X!==void 0&&clearTimeout(X),K=0,H=q=z=X=void 0},ge.flush=function(){return X===void 0?Y:Ie(P())},ge}($,F,{leading:B,maxWait:F,trailing:V})}},703:(o,i,s)=>{var c=s(414);function d(){}function p(){}p.resetWarningCache=d,o.exports=function(){function m(_,S,w,T,E,I){if(I!==c){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}}function y(){return m}m.isRequired=m;var b={array:m,bigint:m,bool:m,func:m,number:m,object:m,string:m,symbol:m,any:m,arrayOf:y,element:m,elementType:m,instanceOf:y,node:m,objectOf:y,oneOf:y,oneOfType:y,shape:y,exact:y,checkPropTypes:p,resetWarningCache:d};return b.PropTypes=b,b}},697:(o,i,s)=>{o.exports=s(703)()},414:o=>{o.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(o){var i=t[o];if(i!==void 0)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.n=o=>{var i=o&&o.__esModule?()=>o.default:()=>o;return n.d(i,{a:i}),i},n.d=(o,i)=>{for(var s in i)n.o(i,s)&&!n.o(o,s)&&Object.defineProperty(o,s,{enumerable:!0,get:i[s]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.o=(o,i)=>Object.prototype.hasOwnProperty.call(o,i),n.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{LazyLoadComponent:()=>me,LazyLoadImage:()=>Ge,trackWindowScroll:()=>q});const o=f;var i=n.n(o),s=n(697);const c=Pa;var d=n.n(c);function p(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function m(Ne){return m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},m(Ne)}function y(Ne,le){var Se=Object.keys(Ne);if(Object.getOwnPropertySymbols){var Me=Object.getOwnPropertySymbols(Ne);le&&(Me=Me.filter(function(tt){return Object.getOwnPropertyDescriptor(Ne,tt).enumerable})),Se.push.apply(Se,Me)}return Se}function b(Ne,le,Se){return(le=S(le))in Ne?Object.defineProperty(Ne,le,{value:Se,enumerable:!0,configurable:!0,writable:!0}):Ne[le]=Se,Ne}function _(Ne,le){for(var Se=0;Se"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var se,he=T(Me);if(tt){var $e=T(this).constructor;se=Reflect.construct(he,arguments,$e)}else se=he.apply(this,arguments);return function(Ye,Xe){if(Xe&&(m(Xe)==="object"||typeof Xe=="function"))return Xe;if(Xe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(vt){if(vt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return vt}(Ye)}(this,se)});function ve(se){var he;if(function(Ye,Xe){if(!(Ye instanceof Xe))throw new TypeError("Cannot call a class as a function")}(this,ve),(he=ke.call(this,se)).supportsObserver=!se.scrollPosition&&se.useIntersectionObserver&&p(),he.supportsObserver){var $e=se.threshold;he.observer=function(Ye){return I[Ye]=I[Ye]||new IntersectionObserver(E,{rootMargin:Ye+"px"}),I[Ye]}($e)}return he}return le=ve,Se=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,he=this.placeholder.getBoundingClientRect(),$e=d().findDOMNode(this.placeholder).style,Ye=parseInt($e.getPropertyValue("margin-left"),10)||0,Xe=parseInt($e.getPropertyValue("margin-top"),10)||0;return{bottom:se.y+he.bottom+Xe,left:se.x+he.left+Ye,right:se.x+he.right+Ye,top:se.y+he.top+Xe}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var se=this.props,he=se.scrollPosition,$e=se.threshold,Ye=this.getPlaceholderBoundingBox(he),Xe=he.y+window.innerHeight,vt=he.x,ot=he.x+window.innerWidth,Et=he.y;return Et-$e<=Ye.bottom&&Xe+$e>=Ye.top&&vt-$e<=Ye.right&&ot+$e>=Ye.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var se=this,he=this.props,$e=he.className,Ye=he.height,Xe=he.placeholder,vt=he.style,ot=he.width;if(Xe&&typeof Xe.type!="function")return i().cloneElement(Xe,{ref:function(Ft){return se.placeholder=Ft}});var Et=function(Ft){for(var Mt=1;Mt"u"?0:window.scrollX||window.pageXOffset},X=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const q=function(Ne){var le=function(Se){(function($e,Ye){if(typeof Ye!="function"&&Ye!==null)throw new TypeError("Super expression must either be null or a function");$e.prototype=Object.create(Ye&&Ye.prototype,{constructor:{value:$e,writable:!0,configurable:!0}}),Object.defineProperty($e,"prototype",{writable:!1}),Ye&&U($e,Ye)})(he,Se);var Me,tt,ke,ve,se=(ke=he,ve=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var $e,Ye=j(ke);if(ve){var Xe=j(this).constructor;$e=Reflect.construct(Ye,arguments,Xe)}else $e=Ye.apply(this,arguments);return H(this,$e)});function he($e){var Ye;if(function(vt,ot){if(!(vt instanceof ot))throw new TypeError("Cannot call a class as a function")}(this,he),(Ye=se.call(this,$e)).useIntersectionObserver=$e.useIntersectionObserver&&p(),Ye.useIntersectionObserver)return H(Ye);var Xe=Ye.onChangeScroll.bind(z(Ye));return $e.delayMethod==="debounce"?Ye.delayedScroll=R()(Xe,$e.delayTime):$e.delayMethod==="throttle"&&(Ye.delayedScroll=$()(Xe,$e.delayTime)),Ye.state={scrollPosition:{x:Y(),y:X()}},Ye.baseComponentRef=i().createRef(),Ye}return Me=he,(tt=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||k(d().findDOMNode(this.baseComponentRef.current))!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=k(d().findDOMNode(this.baseComponentRef.current)),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:Y(),y:X()}})}},{key:"render",value:function(){var $e=this.props,Ye=($e.delayMethod,$e.delayTime,function(vt,ot){if(vt==null)return{};var Et,Ft,Mt=function(ut,pt){if(ut==null)return{};var yt,Pe,Ze={},dt=Object.keys(ut);for(Pe=0;Pe=0||(Ze[yt]=ut[yt]);return Ze}(vt,ot);if(Object.getOwnPropertySymbols){var mt=Object.getOwnPropertySymbols(vt);for(Ft=0;Ft=0||Object.prototype.propertyIsEnumerable.call(vt,Et)&&(Mt[Et]=vt[Et])}return Mt}($e,V)),Xe=this.useIntersectionObserver?null:this.state.scrollPosition;return i().createElement(Ne,W({forwardRef:this.baseComponentRef,scrollPosition:Xe},Ye))}}])&&L(Me.prototype,tt),Object.defineProperty(Me,"prototype",{writable:!1}),he}(i().Component);return le.propTypes={delayMethod:s.PropTypes.oneOf(["debounce","throttle"]),delayTime:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool},le.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},le};function K(Ne){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},K(Ne)}function J(Ne,le){for(var Se=0;Se"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var se,he=oe(Me);if(tt){var $e=oe(this).constructor;se=Reflect.construct(he,arguments,$e)}else se=he.apply(this,arguments);return function(Ye,Xe){if(Xe&&(K(Xe)==="object"||typeof Xe=="function"))return Xe;if(Xe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(vt){if(vt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return vt}(Ye)}(this,se)});function ve(se){return function(he,$e){if(!(he instanceof $e))throw new TypeError("Cannot call a class as a function")}(this,ve),ke.call(this,se)}return le=ve,(Se=[{key:"render",value:function(){return i().createElement(O,this.props)}}])&&J(le.prototype,Se),Object.defineProperty(le,"prototype",{writable:!1}),ve}(i().Component);const ae=q(xe);function de(Ne){return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},de(Ne)}function Ie(Ne,le){for(var Se=0;Se"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var se,he=ue(Me);if(tt){var $e=ue(this).constructor;se=Reflect.construct(he,arguments,$e)}else se=he.apply(this,arguments);return function(Ye,Xe){if(Xe&&(de(Xe)==="object"||typeof Xe=="function"))return Xe;if(Xe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(Ye)}(this,se)});function ve(se){var he;(function(ot,Et){if(!(ot instanceof Et))throw new TypeError("Cannot call a class as a function")})(this,ve),he=ke.call(this,se);var $e=se.afterLoad,Ye=se.beforeLoad,Xe=se.scrollPosition,vt=se.visibleByDefault;return he.state={visible:vt},vt&&(Ye(),$e()),he.onVisible=he.onVisible.bind(ie(he)),he.isScrollTracked=!!(Xe&&Number.isFinite(Xe.x)&&Xe.x>=0&&Number.isFinite(Xe.y)&&Xe.y>=0),he}return le=ve,(Se=[{key:"componentDidUpdate",value:function(se,he){he.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var se=this.props,he=se.className,$e=se.delayMethod,Ye=se.delayTime,Xe=se.height,vt=se.placeholder,ot=se.scrollPosition,Et=se.style,Ft=se.threshold,Mt=se.useIntersectionObserver,mt=se.width;return this.isScrollTracked||Mt&&p()?i().createElement(O,{className:he,height:Xe,onVisible:this.onVisible,placeholder:vt,scrollPosition:ot,style:Et,threshold:Ft,useIntersectionObserver:Mt,width:mt}):i().createElement(ae,{className:he,delayMethod:$e,delayTime:Ye,height:Xe,onVisible:this.onVisible,placeholder:vt,style:Et,threshold:Ft,width:mt})}}])&&Ie(le.prototype,Se),Object.defineProperty(le,"prototype",{writable:!1}),ve}(i().Component);we.propTypes={afterLoad:s.PropTypes.func,beforeLoad:s.PropTypes.func,useIntersectionObserver:s.PropTypes.bool,visibleByDefault:s.PropTypes.bool},we.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const me=we;function Te(Ne){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},Te(Ne)}var Le=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function Be(Ne,le){var Se=Object.keys(Ne);if(Object.getOwnPropertySymbols){var Me=Object.getOwnPropertySymbols(Ne);le&&(Me=Me.filter(function(tt){return Object.getOwnPropertyDescriptor(Ne,tt).enumerable})),Se.push.apply(Se,Me)}return Se}function Re(Ne){for(var le=1;le"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var se,he=je(Me);if(tt){var $e=je(this).constructor;se=Reflect.construct(he,arguments,$e)}else se=he.apply(this,arguments);return function(Ye,Xe){if(Xe&&(Te(Xe)==="object"||typeof Xe=="function"))return Xe;if(Xe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(vt){if(vt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return vt}(Ye)}(this,se)});function ve(se){var he;return function($e,Ye){if(!($e instanceof Ye))throw new TypeError("Cannot call a class as a function")}(this,ve),(he=ke.call(this,se)).state={loaded:!1},he}return le=ve,(Se=[{key:"onImageLoad",value:function(){var se=this;return this.state.loaded?null:function(he){se.props.onLoad(he),se.props.afterLoad(),se.setState({loaded:!0})}}},{key:"getImg",value:function(){var se=this.props,he=(se.afterLoad,se.beforeLoad,se.delayMethod,se.delayTime,se.effect,se.placeholder,se.placeholderSrc,se.scrollPosition,se.threshold,se.useIntersectionObserver,se.visibleByDefault,se.wrapperClassName,se.wrapperProps,function($e,Ye){if($e==null)return{};var Xe,vt,ot=function(Ft,Mt){if(Ft==null)return{};var mt,ut,pt={},yt=Object.keys(Ft);for(ut=0;ut=0||(pt[mt]=Ft[mt]);return pt}($e,Ye);if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols($e);for(vt=0;vt=0||Object.prototype.propertyIsEnumerable.call($e,Xe)&&(ot[Xe]=$e[Xe])}return ot}(se,Le));return i().createElement("img",Oe({},he,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var se=this.props,he=se.beforeLoad,$e=se.className,Ye=se.delayMethod,Xe=se.delayTime,vt=se.height,ot=se.placeholder,Et=se.scrollPosition,Ft=se.style,Mt=se.threshold,mt=se.useIntersectionObserver,ut=se.visibleByDefault,pt=se.width;return i().createElement(me,{beforeLoad:he,className:$e,delayMethod:Ye,delayTime:Xe,height:vt,placeholder:ot,scrollPosition:Et,style:Ft,threshold:Mt,useIntersectionObserver:mt,visibleByDefault:ut,width:pt},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(se){var he=this.props,$e=he.effect,Ye=he.height,Xe=he.placeholderSrc,vt=he.width,ot=he.wrapperClassName,Et=he.wrapperProps,Ft=this.state.loaded,Mt=Ft?" lazy-load-image-loaded":"",mt=Ft||!Xe?{}:{backgroundImage:"url(".concat(Xe,")"),backgroundSize:"100% 100%"};return i().createElement("span",Oe({className:ot+" lazy-load-image-background "+$e+Mt,style:Re(Re({},mt),{},{color:"transparent",display:"inline-block",height:Ye,width:vt})},Et),se)}},{key:"render",value:function(){var se=this.props,he=se.effect,$e=se.placeholderSrc,Ye=se.visibleByDefault,Xe=se.wrapperClassName,vt=se.wrapperProps,ot=this.getLazyLoadImage();return(he||$e)&&!Ye||Xe||vt?this.getWrappedLazyLoadImage(ot):ot}}])&&et(le.prototype,Se),Object.defineProperty(le,"prototype",{writable:!1}),ve}(i().Component);rt.propTypes={onLoad:s.PropTypes.func,afterLoad:s.PropTypes.func,beforeLoad:s.PropTypes.func,delayMethod:s.PropTypes.string,delayTime:s.PropTypes.number,effect:s.PropTypes.string,placeholderSrc:s.PropTypes.string,threshold:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool,visibleByDefault:s.PropTypes.bool,wrapperClassName:s.PropTypes.string,wrapperProps:s.PropTypes.object},rt.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const Ge=rt})()})();const o5=({data:e,s3_image_column:t,query:n,error:r,error_reason:o,reduxSystemNo:i,degreeType:s})=>{const c=pr(),[d,p]=f.useState({}),[m,y]=f.useState(!1),[b,_]=f.useState([]),[S,w]=f.useState([]);f.useEffect(()=>{p(e),_(Object.keys(e)),w(Object.values(e))},[e]),f.useEffect(()=>{console.log("Data value ===== ",d),_(Object.keys(d)),w(Object.values(d))},[d]);const T=async()=>{const A={data:e};try{y(!0);const O=await fetch("https://api.exampaper.vidh.ai/partcEvCoverMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});y(!1);const P=await O.json();if(P.status==="success"){const R={...d,is_cover:1};p(R),console.log("Updation successfull ...."),sn.success("Record Marked As Ev !...")}else throw new Error(P==null?void 0:P.message)}catch(O){throw new Error(O)}},E=async()=>{const A={data:e};try{y(!0);const O=await fetch("https://api.exampaper.vidh.ai/partcDummyMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});y(!1);const P=await O.json();if(P.status==="success"){console.log("Updation successfull ....");const R={...d,type:102};p(R),sn.success("Record Marked as Dummy ! ....")}else throw new Error(P==null?void 0:P.message)}catch(O){throw new Error(O)}},I=async()=>{const A={data:e};try{y(!0);const O=await fetch("https://api.exampaper.vidh.ai/partcEvBacksideMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});y(!1);const P=await O.json();if(P.status==="success"){console.log("Updation successfull ....");const R={...d,is_backpage:1};p(R),sn.success("Record Marked as Backpage ! ....")}else throw new Error(P==null?void 0:P.message)}catch(O){throw new Error(O)}};return x.jsxs(pe,{className:"w-100 rounded shadow mb-5 bg-white",children:[x.jsx(Fo,{}),x.jsxs(pe,{className:"p-4 d-flex justify-content-between align-items-start",children:[x.jsx(pe,{className:"text-left p-3 d-flex flex-column justify-content-between align-items-between h-100",children:b.map((A,O)=>x.jsxs("p",{children:[x.jsx("strong",{children:b[O]})," : ",S[O]]}))}),x.jsxs(pe,{className:"p-1",children:[x.jsxs(pe,{className:"p-2 d-flex justify-content-end gap-3 align-items-center",children:[n.includes("ocr_scanned_part_c_v1")&&e[t]&&x.jsxs(x.Fragment,{children:[x.jsx(it,{className:"w-50 m-0 bg-primary text-white p-1 rounded",onClick:()=>c(`/sqlPlayground/edit?image_name=${e.image_name}&table=ocr_scanned_part_c_v1&error=${r}&error_reason=${o}&sysNo=${i}°reeType=${s}`),children:"Edit"}),x.jsx(it,{className:"w-50 m-0 bg-primary text-white p-1 rounded",onClick:()=>{I()},children:"Mark As Back"}),x.jsx(it,{className:"w-50 m-0 bg-primary text-white p-1 rounded",onClick:()=>{T()},children:"Mark As EV"}),x.jsx(it,{className:"w-50 m-0 bg-primary text-white p-1 rounded",onClick:()=>{E()},children:"Mark As Dummy"})]}),x.jsx(it,{className:"bg-primary",children:x.jsx("a",{href:`https://docs.exampaper.vidh.ai/${e[t]}`,children:x.jsx(r5,{className:"text-light text-white"})})})]}),x.jsx(pe,{className:"border border-dark",children:x.jsx("img",{src:`https://docs.exampaper.vidh.ai/${e[t]}`,width:"800px",height:"auto",alt:"Image Alt"})})]})]}),m&&x.jsx(Yr,{loadingText:"Loading ..."})]})},i5=({query:e,setQuery:t})=>x.jsx(x.Fragment,{children:x.jsx("textarea",{className:"w-100 p-3 h5 bg-white",id:"text-area-input",placeholder:"Enter your query ....",rows:"7",value:e,onChange:n=>t(n.target.value)})}),{Header:mfe,Content:vfe,Footer:yfe,Sider:mhe}=fn,Gh=({children:e})=>{const t=pr(),{token:{colorBgContainer:n,borderRadiusLG:r}}=Io.useToken();return x.jsxs(fn,{style:{minHeight:"100vh"},children:[x.jsx(Fo,{}),x.jsxs(fn,{children:[x.jsx(mfe,{style:{padding:0,background:n},children:x.jsxs(pe,{className:"d-flex justify-content-between h-100 py-1 px-2",children:[x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>{t(-1)},children:x.jsx(Ho,{})}),x.jsx(pe,{className:"d-flex justify-content-between gap-2",children:x.jsx(pe,{className:"d-flex justify-content-between gap-md-4 gap-1 align-items-center",children:x.jsx(it,{className:"bg-primary p-1 text-light rounded h-100",onClick:()=>{t("/")},children:x.jsx(zo,{})})})})]})}),x.jsx(vfe,{style:{margin:"16px 16px"},children:e}),x.jsx(pe,{style:{position:"fixed",bottom:"15px",left:"30px"},children:x.jsx(it,{className:"bg-primary rounded-circle p-3",onClick:()=>{window.scrollTo(0,0)},children:x.jsx(_8,{className:"text-white"})})}),x.jsxs(yfe,{style:{textAlign:"center"},children:["exampaper.vidh.ai ©",new Date().getFullYear()]})]})]})},uo=He.forwardRef(({placeholder:e,value:t,setValue:n,onKeyDown:r},o)=>x.jsxs(pe,{className:"d-flex flex-column",children:[x.jsxs("label",{htmlFor:"limit-input",className:"text-left",children:[e," :-"]}),x.jsx(vo,{className:"rounded h6 bg-white",type:"text",placeholder:e,id:"limit-input",autoComplete:"off",value:t,onChange:i=>n(i.target.value),onKeyDown:r,inputRef:o})]})),xfe=()=>{const[e,t]=f.useState([]),[n,r]=f.useState([]),[o,i]=f.useState(1),[s,c]=f.useState(0),[d,p]=f.useState(null),[m,y]=f.useState(""),[b,_]=f.useState(!1),[S,w]=f.useState(null),[T,E]=f.useState(""),I=50;pr();const A=Vo(),O=Qn(B=>B==null?void 0:B.playGroundQuery),P=Qn(B=>B==null?void 0:B.playGroundCurrentPage),R=Qn(B=>B==null?void 0:B.playGroundtotalPages),M=Qn(B=>B==null?void 0:B.playGroundResults);console.log("Redux playground query : ",O),console.log("Redux playground page no : ",P),console.log("Redux playground total pages : ",R),console.log("Redux playground resutls : ",M),Io.useToken(),f.useEffect(()=>{O&&!m&&y(O)},[O]),f.useEffect(()=>{P!=0&&s==0&&c(R)},[R]),f.useEffect(()=>{n.length==0&&M.length>0&&(r(M),p("s3_path"))},[M]),f.useEffect(()=>{o==0&&P!==0&&(console.log("Updating in use effect ============================= >"),i(P))},[P]);const $=async()=>{if(m.includes("limit")){alert("Please specify the limit in the input field.");return}if(m.includes(";")){alert("Please remove the special character from the query ';'");return}if(!T){alert("Limit cannot be empty !!");return}if(!m.includes("image_name")&&m.includes("ocr_scanned_part_c_v1")){alert("Selecting primary Key (image_name) is mandatory");return}_(!0);const B={query:m,limit:T};try{const W=await(await fetch("https://api.exampaper.vidh.ai/fetchQueryValue",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)})).json();if(_(!1),W.status==="success"){r(W.results),A(S8(W==null?void 0:W.results));const L=Math.ceil((W==null?void 0:W.results.length)/I);c(L),A($m(s)),i(1),t(W.results.slice(0,I))}}catch(V){console.error("Error:",V)}};f.useEffect(()=>{A(b8(m))},[m]),f.useEffect(()=>{n.length>0&&(t([]),console.log(" ===========================>>>>>>>>>>>>>>>>>>>>>>>> "),_(!0),setTimeout(()=>{const B=(o-1)*I,V=B+I;t(n.slice(B,V)),_(!1)},1e3)),A(C8(o)),F()},[o,n]);const F=()=>{const B=[];for(let V=1;V<=s;V++)B.push(x.jsxs("span",{children:[V>1&&" | ",x.jsx("a",{href:"#!",onClick:()=>i(V),className:V===o?"active":"",children:V})]},V));w(B)};f.useEffect(()=>{F(),A($m(s))},[o,s]);const k=()=>e.length===0?null:(Object.keys(n[0]),x.jsxs("div",{className:"w-100",children:[x.jsxs("div",{className:"text-left d-flex justify-content-between align-items-center",children:[x.jsxs("h5",{children:[x.jsx("strong",{children:"Total Results "})," : ",n.length]}),n.length>0&&x.jsx("div",{id:"footer-container",children:x.jsxs("div",{id:"footer-main",className:"d-flex justify-content-center p-3 align-items-center",children:[x.jsx("div",{className:"d-flex justify-content-center align-items-center p-1",children:x.jsxs(pe,{className:"d-flex flex-column align-items-end",children:[x.jsx(pe,{children:S}),x.jsxs(pe,{children:[x.jsx("strong",{children:o}),"/",x.jsx("strong",{children:s})]})]})}),x.jsx("div",{className:"d-flex gap-3"})]})})]}),x.jsx("div",{className:"my-2 overflow-auto",children:e.map(B=>x.jsx(o5,{data:B,s3_image_column:d,query:m}))})]}));return x.jsxs(Gh,{children:[x.jsxs("div",{className:"mx-3",children:[x.jsxs("div",{className:"my-3 d-flex flex-md-row flex-column",children:[x.jsx("div",{className:"w-100 w-md-75",children:x.jsx(i5,{query:m,setQuery:y})}),x.jsx("div",{className:"d-none d-md-block w-25",children:x.jsxs("div",{className:"w-100 d-flex flex-column gap-2 mx-2",children:[x.jsx(uo,{placeholder:"limit",value:T,setValue:E}),x.jsx(uo,{placeholder:"imageColumn",value:d,setValue:p}),x.jsx("button",{className:"btn bg-primary text-light",id:"submit-btn",onClick:$,children:"Submit"})]})}),x.jsx("div",{className:"d-block d-md-none w-100",children:x.jsxs("div",{className:"w-100 d-flex flex-column gap-2",children:[x.jsx(vo,{className:"rounded h6 bg-white",type:"text",placeholder:"Limit",id:"limit-input",autoComplete:"off",value:T,onChange:B=>E(B.target.value)}),x.jsx(vo,{className:"input rounded h6 bg-white",type:"text",placeholder:"Image column name",id:"image-column-input",autoComplete:"off",value:d,onChange:B=>p(B.target.value)}),x.jsx("button",{className:"btn bg-primary text-light",id:"submit-btn",onClick:$,children:"Submit"})]})})]}),x.jsx("div",{id:"results-container",className:"d-flex w-100 justify-content-center",children:k()})]}),b&&x.jsx(Yr,{})]})},bfe=()=>x.jsx(pe,{children:"hello"}),Cfe=()=>{const[e,t]=ic(),[n,r]=f.useState(),[o,i]=f.useState(),[s,c]=f.useState(null),[d,p]=f.useState(null),[m,y]=f.useState(null),[b,_]=f.useState(!1),[S,w]=f.useState([]),[T,E]=f.useState(null),[I,A]=f.useState(!1),[O,P]=f.useState([]),[R,M]=f.useState(0),$=Qn(ae=>ae==null?void 0:ae.partCErrorList),F=e.get("table"),k=e.get("image_name"),B=e.get("error"),V=e.get("error_reason"),W=e.get("sysNo"),L=e.get("degreeType");f.useState([]);const[U,H]=f.useState([]),z=f.useRef(null),j=f.useRef(null),Y=f.useRef(null),X=f.useRef(null),q=pr(),K=Vo();console.log("Ev errors list ==== ",$),console.log("table is : ",F);const J=async()=>{try{return await(await fetch("https://api.exampaper.vidh.ai/fetchPrimaryKeyData",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({image_name:k,table:F})})).json()}catch(ae){throw new Error(ae)}};f.useEffect(()=>{const ae=localStorage.getItem("marks_manual_data");console.log("Marks local data 123 ========= ",ae),ae&&(console.log("Into if and updating ......."),console.log("marks local data ==== ",ae),H(JSON.parse(ae)))},[]),f.useEffect(()=>{K(U1(W))},[W]),f.useEffect(()=>{console.log("Ev error data =============== ",U)},[U]),f.useEffect(()=>{(async()=>{if(F&&k){_(!0);const de=await J();if(_(!1),console.log("Response is : ",de),(de==null?void 0:de.status)==="success"){console.log("=========== Success ============");const Ie=de==null?void 0:de.data;Ie.length>0&&w(Ie[0])}}})()},[]),f.useEffect(()=>{console.log("=========== Use effect triggered ==========="),r(S==null?void 0:S.barcode),c(S==null?void 0:S.marks),i(S==null?void 0:S.qrcode),y(S==null?void 0:S.image_name),p(S==null?void 0:S.subject_code),E(S==null?void 0:S.s3_path)},[S]);const ee=async()=>{var Ie;if(s){_(!0);try{const ue=await(await fetch("https://api.exampaper.vidh.ai/editPartCdata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({qrcode:o,barcode:n,table:F,s3Path:T,subjectCode:d,marks:s,imageName:m,rotateAngle:R})})).json();if(_(!1),console.log("response data ========= ",ue),(ue==null?void 0:ue.status)==="success"){var ae=null;console.log("Ev errors data before filter ============= ",U);var de=U.filter((we,me)=>(we==null?void 0:we.image_name)===m?(ae=me,!1):!0);if(ae||(ae=0),console.log("new records ======1 ",de),console.log("Current Index ===== ",ae),K(Tf(de)),de.length>0){console.log("Has to navigte 12 ....."),localStorage.setItem("marks_manual_data",JSON.stringify(de));const we=`/sqlPlayground/edit?image_name=${(Ie=de[ae])==null?void 0:Ie.image_name}&table=ocr_scanned_part_c_v1&error=${B}&error_reason=${V}°reeType=${L}&sysNo=${W}`;console.log("new url ==== ",we),window.location.href=we}else q("/")}}catch(ge){throw _(!1),new Error(ge)}}};f.useEffect(()=>{console.log("Rotate angle changed to ========== ",R);const ae=document.getElementById("img-container");console.log("Imge container ===== ",ae),ae&&(ae.style.transform=`rotate(${R}deg)`)},[R]);const oe=()=>{var Ie;try{if(U){var ae=null,de=U.filter((ie,ue)=>(ie==null?void 0:ie.image_name)===m?(ae=ue,!1):!0);ae||(ae=0),console.log("Current Index ===== ",ae);const ge=ae+1;if(console.log("new index ===== ",ge),de.length>0){console.log("Has to navigte 12 .....");const ie=`/sqlPlayground/edit?image_name=${(Ie=U[ge])==null?void 0:Ie.image_name}&table=ocr_scanned_part_c_v1&error=${B}&error_reason=${V}°reeType=${L}&sysNo=${W}`;console.log("new url ==== ",ie),window.location.href=ie}}}catch(ge){throw new Error(ge)}},xe=ae=>{try{console.log("Handle key down clicked ...",ae),console.log("event target ..... ",ae.target),console.log("barcode targed .....",z.current),ae.key==="Enter"&&(ae.target===z.current?j.current.focus():ae.target===j.current?Y.current.focus():ae.target===Y.current?X.current.focus():ae.target===X.current&&ee())}catch{}};return x.jsxs(Gh,{children:[x.jsxs(pe,{className:"d-flex justify-content-between align-items-center",children:[x.jsxs(pe,{className:"d-flex flex-column gap-3 w-25",children:[m&&x.jsxs("h5",{className:"text-left",children:["ID : ",m]}),B&&x.jsxs("h5",{className:"text-left",children:["Error Code : ",B]}),L?L===0?x.jsx("h5",{className:"text-left",children:"Degree Type : UG"}):x.jsx("h5",{className:"text-left",children:"Degree Type : PG"}):null,x.jsx(uo,{placeholder:"Barcode",value:n,setValue:r,onKeyDown:xe,ref:z}),x.jsx(uo,{placeholder:"QR Code",value:o,setValue:i,onKeyDown:xe,ref:j}),x.jsx(uo,{placeholder:"Marks",value:s,setValue:c,onKeyDown:xe,ref:Y}),x.jsx(uo,{placeholder:"Subject Code",value:d,setValue:p,onKeyDown:xe,ref:X}),x.jsx(it,{className:"bg-primary text-white rounded p-3",onClick:()=>{ee()},children:"Update"}),x.jsx(it,{className:"bg-primary text-white rounded p-3",onClick:()=>{oe()},children:"Skip"}),x.jsxs(pe,{className:"d-flex justify-content-between",children:[x.jsxs(it,{className:"bg-primary text-white rounded p-3",onClick:()=>M(ae=>ae-90),children:["Rotate ",x.jsx(La,{})]}),x.jsxs(it,{className:"bg-primary text-white rounded p-3",onClick:()=>M(ae=>ae+90),children:["Rotate ",x.jsx(ja,{})]})]})]}),x.jsx(pe,{className:"w-75",children:x.jsx(pe,{className:"px-5",id:"img-container",children:x.jsx("img",{src:`https://docs.exampaper.vidh.ai/${S==null?void 0:S.s3_path}`,width:"100%",height:"auto"})})})]}),b&&x.jsx(Yr,{}),I&&x.jsx(fw,{type:"rotation_results",rotationResults:O,setShowDialog:A})]})},{Content:Sfe,Header:wfe}=fn;function Efe(){const[e,t]=ic(),[n,r]=f.useState(!1),[o,i]=f.useState(!1),[s,c]=f.useState(null),[d,p]=f.useState([]),[m,y]=f.useState(null),[b,_]=f.useState(null),[S,w]=f.useState(1),[T,E]=f.useState(1),[I,A]=f.useState(!1),[O,P]=f.useState(null),[R,M]=f.useState(null),[$,F]=f.useState([]),[k,B]=f.useState(0),V=[{type:"UG",type_code:"0"},{type:"PG",type_code:"2"},{type:"UNIVERSITY",type_code:"5"}],W=Qn(ie=>ie==null?void 0:ie.partCDegreeType);console.log("Redux degree type ...",W),f.useEffect(()=>{M(W||"2")},[W]);const L=ie=>{const ue=ie.target.value;console.log("Value ===== ",ue),M(ue),j(fae(ue))},{token:{colorBgContainer:U,borderRadiusLG:H}}=Io.useToken(),z=pr(),j=Vo();e.get("error"),e.get("error_reason"),e.get("sysNo"),e.get("degreeType");const Y=Qn(ie=>ie==null?void 0:ie.partCErrorList);console.log("evErrorsList = ",Y);const X=Qn(ie=>ie==null?void 0:ie.partCErrorData);console.log("evErrorData: ",X);const q=Qn(ie=>ie==null?void 0:ie.systemNumber);console.log("systemno: ",q);const K=Qn(ie=>ie==null?void 0:ie.selectedErrorJson);console.log("selectedErrorJson: ",K),f.useEffect(()=>{q?Y&&Y.length>0?c(Y):ee():A(!0)},[q]),f.useEffect(()=>{console.log("Use effect 11 called ..."),q?(X&&X.length>0&&p(X),m&&oe(q)):A(!0)},[m,b,k]),f.useEffect(()=>{if(d&&d.length>0){console.log("len = ",d.length);const ie=Math.ceil(d.length/10);console.log("tp = ",ie),E(ie)}},[d]),f.useEffect(()=>{j(Tf([])),p([]),F(!1),ee()},[R]);const J=async ie=>{const ue={systemRecords:ie,sysNo:q};try{fetch("https://api.exampaper.vidh.ai/updateSystemReservationStatusPartC",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ue)}).then(we=>we.json()).then(we=>{console.log("response from updation : ",we)})}catch{throw new Error("Error in update system records : ",ie)}},ee=async()=>{r(!0),F(!1);try{const ue=await(await fetch(`https://api.exampaper.vidh.ai/getpartcEv?degreeType=${R}`,{method:"GET",headers:{"Content-Type":"application/json"}})).json();c(ue.data),F(!0),j(dae(ue.data))}catch(ie){console.error("Error fetching data: ",ie)}finally{r(!1)}},oe=async ie=>{console.log("fetching anomoly records"),r(!0),F(!1);try{const me=await(await fetch("https://api.exampaper.vidh.ai/getpartcEvErrors",{method:"POST",body:JSON.stringify({error:m,error_reason:b,sysno:ie,degreeType:R}),headers:{"Content-Type":"application/json"}})).json();var ue=me==null?void 0:me.data;console.log("System record ====== ",me.systemRecord),me.systemRecord||(ue=xe(me==null?void 0:me.data,ie)),console.log("System records : ",ue),F(!0),p(ue),r(!1),j(Tf(ue)),localStorage.setItem("marks_manual_data",JSON.stringify(ue)),J(ue)}catch(we){r(!1),console.error("Error fetching data: ",we)}};function xe(ie,ue){const we=[];ie||(ie=[]);for(var me=0;me{y(ie),_(ue),w(1),P(we);let me={};me.error=ie,me.error_reason=ue,console.log("tmp = ",me),j(EA(me)),B(Te=>Te+1)},de=ie=>{i(!0),w(ie)};f.useEffect(()=>{S>0&&i(!1)},[S,d]);const Ie=()=>{const ie=(S-1)*10,ue=ie+10;return d.slice(ie,ue)},ge=()=>{console.log("System No Change is called"),A(!0),j(EA({})),j(Tf([]))};return x.jsx(fn,{style:{minHeight:"100vh"},children:x.jsxs(fn,{children:[x.jsx(wfe,{style:{padding:0,background:U},children:x.jsxs(pe,{className:"d-flex justify-content-between h-100 py-1 px-2",children:[x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>z(-1),children:x.jsx(Ho,{})}),x.jsxs(pe,{className:"d-flex justify-content-between gap-2",children:[q&&x.jsxs(pe,{className:"h6 p-0 m-0 text-light bg-primary rounded h-100 d-flex align-items-center px-3",style:{cursor:"pointer"},onClick:ge,children:[x.jsx("b",{children:"System No : "})," ",q]}),x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>z("/"),children:x.jsx(zo,{})})]})]})}),x.jsx(Sfe,{style:{padding:"24px",backgroundColor:"#5078f2",backgroundImage:"linear-gradient(315deg, #5078f2 0%, #efe9f4 74%)"},children:n?x.jsx(pe,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",children:x.jsx(Nm,{})}):x.jsxs(x.Fragment,{children:[x.jsxs(pe,{className:"w-25 d-flex flex-column align-items-start",children:[x.jsx("h6",{children:"Degree Type"}),x.jsx(k$,{fullWidth:!0,children:x.jsx(k1,{className:"bg-white",value:R,onChange:L,children:V.map(ie=>x.jsx(Q$,{value:ie.type_code,children:ie.type},ie.type_code))})})]}),$?s&&s.length>0?s.map((ie,ue)=>x.jsx(K$,{onClick:()=>ae(ie.error,ie.error_reason,ue),style:{margin:"16px",borderRadius:H,alignItems:"flex-start",textAlign:"start",cursor:"pointer",color:"white",backgroundColor:O===ue?"#3f51b5":"#537895",backgroundImage:O===ue?"linear-gradient(315deg, #70a1ff 0%, #c2c0c0 74%);":"linear-gradient(315deg, #537895 0%, #09203f 74%)"},children:x.jsxs(X$,{children:[ie.error&&x.jsxs(Rs,{id:"1",variant:"body2",children:["Code: ",ie.error]}),ie["count(*)"]&&x.jsxs(Rs,{id:"2",variant:"body2",color:"whitesmoke",children:["Count: ",ie["count(*)"]]})]})},ue)):x.jsx(pe,{className:"p-3 my-3 bg-white rounded",children:x.jsx("h5",{children:"No data to display ..."})}):null,d&&d.length>0&&$?x.jsxs(x.Fragment,{children:[x.jsx(pe,{display:"flex",justifyContent:"center",marginBottom:"16px",children:x.jsx(CK,{current:S,total:T*10,onChange:de})}),o?x.jsx(pe,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",children:x.jsx(Nm,{})}):Ie().map((ie,ue)=>x.jsx(o5,{data:ie,s3_image_column:"s3_path",query:"ocr_scanned_part_c_v1",error:m,error_reason:b,reduxSystemNo:q,degreeType:R},ue))]}):$&&Y&&Y.length==0?x.jsx(pe,{className:"p-3 my-3 bg-white rounded",children:x.jsx("h5",{children:"No data to display ..."})}):null]})}),I&&x.jsx(zh,{setShowSystemNoContainer:A,showSystemNoContainer:I})]})})}var jt;(function(e){e[e.QR_CODE=0]="QR_CODE",e[e.AZTEC=1]="AZTEC",e[e.CODABAR=2]="CODABAR",e[e.CODE_39=3]="CODE_39",e[e.CODE_93=4]="CODE_93",e[e.CODE_128=5]="CODE_128",e[e.DATA_MATRIX=6]="DATA_MATRIX",e[e.MAXICODE=7]="MAXICODE",e[e.ITF=8]="ITF",e[e.EAN_13=9]="EAN_13",e[e.EAN_8=10]="EAN_8",e[e.PDF_417=11]="PDF_417",e[e.RSS_14=12]="RSS_14",e[e.RSS_EXPANDED=13]="RSS_EXPANDED",e[e.UPC_A=14]="UPC_A",e[e.UPC_E=15]="UPC_E",e[e.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(jt||(jt={}));var e3=new Map([[jt.QR_CODE,"QR_CODE"],[jt.AZTEC,"AZTEC"],[jt.CODABAR,"CODABAR"],[jt.CODE_39,"CODE_39"],[jt.CODE_93,"CODE_93"],[jt.CODE_128,"CODE_128"],[jt.DATA_MATRIX,"DATA_MATRIX"],[jt.MAXICODE,"MAXICODE"],[jt.ITF,"ITF"],[jt.EAN_13,"EAN_13"],[jt.EAN_8,"EAN_8"],[jt.PDF_417,"PDF_417"],[jt.RSS_14,"RSS_14"],[jt.RSS_EXPANDED,"RSS_EXPANDED"],[jt.UPC_A,"UPC_A"],[jt.UPC_E,"UPC_E"],[jt.UPC_EAN_EXTENSION,"UPC_EAN_EXTENSION"]]),t3;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.URL=1]="URL"})(t3||(t3={}));function Ife(e){return Object.values(jt).includes(e)}var Xi;(function(e){e[e.SCAN_TYPE_CAMERA=0]="SCAN_TYPE_CAMERA",e[e.SCAN_TYPE_FILE=1]="SCAN_TYPE_FILE"})(Xi||(Xi={}));var Fc=function(){function e(){}return e.GITHUB_PROJECT_URL="https://github.com/mebjas/html5-qrcode",e.SCAN_DEFAULT_FPS=2,e.DEFAULT_DISABLE_FLIP=!1,e.DEFAULT_REMEMBER_LAST_CAMERA_USED=!0,e}(),a5=function(){function e(t,n){this.format=t,this.formatName=n}return e.prototype.toString=function(){return this.formatName},e.create=function(t){if(!e3.has(t))throw t+" not in html5QrcodeSupportedFormatsTextMap";return new e(t,e3.get(t))},e}(),n3=function(){function e(){}return e.createFromText=function(t){var n={text:t};return{decodedText:t,result:n}},e.createFromQrcodeResult=function(t){return{decodedText:t.text,result:t}},e}(),nC;(function(e){e[e.UNKWOWN_ERROR=0]="UNKWOWN_ERROR",e[e.IMPLEMENTATION_ERROR=1]="IMPLEMENTATION_ERROR",e[e.NO_CODE_FOUND_ERROR=2]="NO_CODE_FOUND_ERROR"})(nC||(nC={}));var s5=function(){function e(){}return e.createFrom=function(t){return{errorMessage:t,type:nC.UNKWOWN_ERROR}},e}(),l5=function(){function e(t){this.verbose=t}return e.prototype.log=function(t){this.verbose&&console.log(t)},e.prototype.warn=function(t){this.verbose&&console.warn(t)},e.prototype.logError=function(t,n){(this.verbose||n===!0)&&console.error(t)},e.prototype.logErrors=function(t){if(t.length===0)throw"Logger#logError called without arguments";this.verbose&&console.error(t)},e}();function ru(e){return typeof e>"u"||e===null}var Kd=function(){function e(){}return e.codeParseError=function(t){return"QR code parse error, error = "+t},e.errorGettingUserMedia=function(t){return"Error getting userMedia, error = "+t},e.onlyDeviceSupportedError=function(){return"The device doesn't support navigator.mediaDevices , only supported cameraIdOrConfig in this case is deviceId parameter (string)."},e.cameraStreamingNotSupported=function(){return"Camera streaming not supported by the browser."},e.unableToQuerySupportedDevices=function(){return"Unable to query supported devices, unknown error."},e.insecureContextCameraQueryError=function(){return"Camera access is only supported in secure context like https or localhost."},e}(),Gi=function(){function e(){}return e.scanningStatus=function(){return"Scanning"},e.idleStatus=function(){return"Idle"},e.errorStatus=function(){return"Error"},e.permissionStatus=function(){return"Permission"},e.noCameraFoundErrorStatus=function(){return"No Cameras"},e.lastMatch=function(t){return"Last Match: "+t},e.codeScannerTitle=function(){return"Code Scanner"},e.cameraPermissionTitle=function(){return"Request Camera Permissions"},e.cameraPermissionRequesting=function(){return"Requesting camera permissions..."},e.noCameraFound=function(){return"No camera found"},e.scanButtonStopScanningText=function(){return"Stop Scanning"},e.scanButtonStartScanningText=function(){return"Start Scanning"},e.scanButtonScanningStarting=function(){return"Launching Camera..."},e.textIfCameraScanSelected=function(){return"Scan an Image File"},e.textIfFileScanSelected=function(){return"Scan using camera directly"},e.selectCamera=function(){return"Select Camera"},e}(),r3=function(){function e(){}return e.builtUsing=function(){return"Built using "},e.reportIssues=function(){return"Report issues"},e}(),c5=function(){function e(){}return e.isMediaStreamConstraintsValid=function(t,n){if(typeof t!="object"){var r=typeof t;return n.logError("videoConstraints should be of type object, the "+("object passed is of type "+r+"."),!0),!1}for(var o=["autoGainControl","channelCount","echoCancellation","latency","noiseSuppression","sampleRate","sampleSize","volume"],i=new Set(o),s=Object.keys(t),c=0,d=s;c0?(u=Sd.updateStateListForPair(u,g,v),g++):u=this.updateStateListForChar(u,g)}return Ow.min(u,(g,v)=>g.getBitCount()-v.getBitCount()).toBitArray(this.text)}updateStateListForChar(a,l){const u=[];for(let h of a)this.updateStateForChar(h,l,u);return Sd.simplifyStates(u)}updateStateForChar(a,l,u){let h=this.text[l]&255,g=rv[a.getMode()][h]>0,v=null;for(let C=0;C<=va;C++){let N=rv[C][h];if(N>0){if(v==null&&(v=a.endBinaryShift(l)),!g||C===a.getMode()||C===mi){const D=v.latchAndAppend(C,N);u.push(D)}if(!g&&Mw[a.getMode()][C]>=0){const D=v.shiftAndAppend(C,N);u.push(D)}}}if(a.getBinaryShiftByteCount()>0||rv[a.getMode()][h]===0){let C=a.addBinaryShiftChar(l);u.push(C)}}static updateStateListForPair(a,l,u){const h=[];for(let g of a)this.updateStateForPair(g,l,u,h);return this.simplifyStates(h)}static updateStateForPair(a,l,u,h){let g=a.endBinaryShift(l);if(h.push(g.latchAndAppend(va,u)),a.getMode()!==va&&h.push(g.shiftAndAppend(va,u)),u===3||u===4){let v=g.latchAndAppend(mi,16-u).latchAndAppend(mi,1);h.push(v)}if(a.getBinaryShiftByteCount()>0){let v=a.addBinaryShiftChar(l).addBinaryShiftChar(l+1);h.push(v)}}static simplifyStates(a){let l=[];for(const u of a){let h=!0;for(const g of l){if(g.isBetterThanOrEqualTo(u)){h=!1;break}u.isBetterThanOrEqualTo(g)&&(l=l.filter(v=>v!==g))}h&&l.push(u)}return l}}class Dn{constructor(){}static encodeBytes(a){return Dn.encode(a,Dn.DEFAULT_EC_PERCENT,Dn.DEFAULT_AZTEC_LAYERS)}static encode(a,l,u){let h=new Sd(a).encode(),g=I.truncDivision(h.getSize()*l,100)+11,v=h.getSize()+g,C,N,D,G,Z;if(u!==Dn.DEFAULT_AZTEC_LAYERS){if(C=u<0,N=Math.abs(u),N>(C?Dn.MAX_NB_BITS_COMPACT:Dn.MAX_NB_BITS))throw new m(B.format("Illegal value %s for layers",u));D=Dn.totalBitsInLayer(N,C),G=Dn.WORD_SIZE[N];let ct=D-D%G;if(Z=Dn.stuffBits(h,G),Z.getSize()+g>ct)throw new m("Data to large for user specified layer");if(C&&Z.getSize()>G*64)throw new m("Data to large for user specified layer")}else{G=0,Z=null;for(let ct=0;;ct++){if(ct>Dn.MAX_NB_BITS)throw new m("Data too large for an Aztec code");if(C=ct<=3,N=C?ct+1:ct,D=Dn.totalBitsInLayer(N,C),v>D)continue;(Z==null||G!==Dn.WORD_SIZE[N])&&(G=Dn.WORD_SIZE[N],Z=Dn.stuffBits(h,G));let wn=D-D%G;if(!(C&&Z.getSize()>G*64)&&Z.getSize()+g<=wn)break}}let ne=Dn.generateCheckWords(Z,D,G),ce=Z.getSize()/G,Ee=Dn.generateModeMessage(C,N,ce),_e=(C?11:14)+N*4,De=new Int32Array(_e),We;if(C){We=_e;for(let ct=0;ct=h||a.get(v+N))&&(C|=1<0&&i[i.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]r&&(r=c,n=s)}if(!n)throw"No largest barcode found";return n},e.prototype.createBarcodeDetectorFormats=function(t){for(var n=[],r=0,o=t;r=c&&s()})})},e.prototype.scanFile=function(t,n){return this.scanFileV2(t,n).then(function(r){return r.decodedText})},e.prototype.scanFileV2=function(t,n){var r=this;if(!t||!(t instanceof File))throw"imageFile argument is mandatory and should be instance of File. Use 'event.target.files[0]'.";if(ru(n)&&(n=!0),!this.stateManagerProxy.canScanFile())throw"Cannot start file scan - ongoing camera scan";return new Promise(function(o,i){r.possiblyCloseLastScanImageFile(),r.clearElement(),r.lastScanImageFile=URL.createObjectURL(t);var s=new Image;s.onload=function(){var c=s.width,d=s.height,p=document.getElementById(r.elementId),m=p.clientWidth?p.clientWidth:xi.DEFAULT_WIDTH,y=Math.max(p.clientHeight?p.clientHeight:d,xi.FILE_SCAN_MIN_HEIGHT),b=r.computeCanvasDrawConfig(c,d,m,y);if(n){var _=r.createCanvasElement(m,y,"qr-canvas-visible");_.style.display="inline-block",p.appendChild(_);var S=_.getContext("2d");if(!S)throw"Unable to get 2d context from canvas";S.canvas.width=m,S.canvas.height=y,S.drawImage(s,0,0,c,d,b.x,b.y,b.width,b.height)}var w=r.createCanvasElement(b.width,b.height);p.appendChild(w);var T=w.getContext("2d");if(!T)throw"Unable to get 2d context from canvas";T.canvas.width=b.width,T.canvas.height=b.height,T.drawImage(s,0,0,c,d,0,0,b.width,b.height);try{r.qrcode.decodeAsync(w).then(function(E){o(n3.createFromQrcodeResult(E))}).catch(i)}catch(E){i("QR code parse error, error = "+E)}},s.onerror=i,s.onabort=i,s.onstalled=i,s.onsuspend=i,s.src=URL.createObjectURL(t)})},e.prototype.clear=function(){this.clearElement()},e.getCameras=function(){if(navigator.mediaDevices)return e.getCamerasFromMediaDevices();var t=MediaStreamTrack;if(MediaStreamTrack&&t.getSources)return e.getCamerasFromMediaStreamTrack();var n=function(){if(location.protocol==="https:")return!0;var o=location.host.split(":")[0];return o==="127.0.0.1"||o==="localhost"},r=Kd.unableToQuerySupportedDevices();return n()||(r=Kd.insecureContextCameraQueryError()),Promise.reject(r)},e.prototype.getRunningTrackCapabilities=function(){if(this.localMediaStream==null)throw"Scanning is not in running state, call this API only when QR code scanning using camera is in running state.";if(this.localMediaStream.getVideoTracks().length===0)throw"No video tracks found";var t=this.localMediaStream.getVideoTracks()[0];return t.getCapabilities()},e.prototype.applyVideoConstraints=function(t){var n=this;if(t){if(!c5.isMediaStreamConstraintsValid(t,this.logger))throw"invalid videoConstaints passed, check logs for more details"}else throw"videoConstaints is required argument.";if(this.localMediaStream===null)throw"Scanning is not in running state, call this API only when QR code scanning using camera is in running state.";if(this.localMediaStream.getVideoTracks().length===0)throw"No video tracks found";return new Promise(function(r,o){if("aspectRatio"in t){o("Chaning 'aspectRatio' in run-time is not yet supported.");return}var i=n.localMediaStream.getVideoTracks()[0];i.applyConstraints(t).then(function(s){r(s)}).catch(function(s){o(s)})})},e.getCamerasFromMediaDevices=function(){return new Promise(function(t,n){navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then(function(r){var o=function(i){for(var s=i.getVideoTracks(),c=0,d=s;cn&&(r.logger.warn("`qrbox.width` or `qrbox` is larger than the width of the root element. The width will be truncated to the width of root element."),d=n),d};s(i.width),s(i.height),i.width=c(i.width)},e.prototype.validateQrboxConfig=function(t){if(typeof t!="number"&&(t.width===void 0||t.height===void 0))throw"Invalid instance of QrDimensions passed for 'config.qrbox'. Both 'width' and 'height' should be set."},e.prototype.toQrdimensions=function(t){return typeof t=="number"?{width:t,height:t}:t},e.prototype.setupUi=function(t,n,r){var o=ru(r.qrbox)?{width:t,height:n}:r.qrbox;this.validateQrboxConfig(o);var i=this.toQrdimensions(o);i.height>n&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var s=r.isShadedBoxEnabled()&&i.height<=n,c={x:0,y:0,width:t,height:n},d=s?this.getShadedRegionBounds(t,n,i):c,p=this.createCanvasElement(d.width,d.height),m=p.getContext("2d");m.canvas.width=d.width,m.canvas.height=d.height,this.element.append(p),s&&this.possiblyInsertShadingElement(this.element,t,n,i),this.createScannerPausedUiElement(this.element),this.qrRegion=d,this.context=m,this.canvasElement=p},e.prototype.createScannerPausedUiElement=function(t){var n=document.createElement("div");n.innerText="Scanner paused",n.style.display="none",n.style.position="absolute",n.style.top="0px",n.style.zIndex="1",n.style.background="yellow",n.style.textAlign="center",n.style.width="100%",t.appendChild(n),this.scannerPausedUiElement=n},e.prototype.scanContext=function(t,n){var r=this;return this.stateManagerProxy.isPaused()?Promise.resolve(!1):this.qrcode.decodeAsync(this.canvasElement).then(function(o){return t(o.text,n3.createFromQrcodeResult(o)),r.possiblyUpdateShaders(!0),!0}).catch(function(o){r.possiblyUpdateShaders(!1);var i=Kd.codeParseError(o);return n(i,s5.createFrom(i)),!1})},e.prototype.foreverScan=function(t,n,r){var o=this;if(this.shouldScan&&this.localMediaStream){var i=this.videoElement,s=i.videoWidth/i.clientWidth,c=i.videoHeight/i.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var d=this.qrRegion.width*s,p=this.qrRegion.height*c,m=this.qrRegion.x*s,y=this.qrRegion.y*c;this.context.drawImage(i,m,y,d,p,0,0,this.qrRegion.width,this.qrRegion.height);var b=function(){o.foreverScanTimeout=setTimeout(function(){o.foreverScan(t,n,r)},o.getTimeoutFps(t.fps))};this.scanContext(n,r).then(function(_){!_&&t.disableFlip!==!0?(o.context.translate(o.context.canvas.width,0),o.context.scale(-1,1),o.scanContext(n,r).finally(function(){b()})):b()}).catch(function(_){o.logger.logError("Error happend while scanning context",_),b()})}},e.prototype.onMediaStreamReceived=function(t,n,r,o,i,s){var c=this,d=this;return new Promise(function(p,m){var y=function(){var S=c.createVideoElement(o);d.element.append(S),S.onabort=m,S.onerror=m;var w=function(){var T=S.clientWidth,E=S.clientHeight;d.setupUi(T,E,n),d.foreverScan(n,i,s),S.removeEventListener("playing",w),p(null)};S.addEventListener("playing",w),S.srcObject=t,S.play(),d.videoElement=S};if(d.localMediaStream=t,r||!n.aspectRatio)y();else{var b={aspectRatio:n.aspectRatio},_=t.getVideoTracks()[0];_.applyConstraints(b).then(function(S){return y()}).catch(function(S){d.logger.logErrors(["[Html5Qrcode] Constriants could not be satisfied, ignoring constraints",S]),y()})}})},e.prototype.createVideoConstraints=function(t){if(typeof t=="string")return{deviceId:{exact:t}};if(typeof t=="object"){var n="facingMode",r="deviceId",o={user:!0,environment:!0},i="exact",s=function(S){if(S in o)return!0;throw"config has invalid 'facingMode' value = "+("'"+S+"'")},c=Object.keys(t);if(c.length!==1)throw"'cameraIdOrConfig' object should have exactly 1 key,"+(" if passed as an object, found "+c.length+" keys");var d=Object.keys(t)[0];if(d!==n&&d!==r)throw"Only '"+n+"' and '"+r+"' are supported for 'cameraIdOrConfig'";if(d===n){var p=t.facingMode;if(typeof p=="string"){if(s(p))return{facingMode:p}}else if(typeof p=="object")if(i in p){if(s(p[""+i]))return{facingMode:{exact:p[""+i]}}}else throw"'facingMode' should be string or object with"+(" "+i+" as key.");else{var m=typeof p;throw"Invalid type of 'facingMode' = "+m}}else{var y=t.deviceId;if(typeof y=="string")return{deviceId:y};if(typeof y=="object"){if(i in y)return{deviceId:{exact:y[""+i]}};throw"'deviceId' should be string or object with"+(" "+i+" as key.")}else{var b=typeof y;throw"Invalid type of 'deviceId' = "+b}}}var _=typeof t;throw"Invalid type of 'cameraIdOrConfig' = "+_},e.prototype.computeCanvasDrawConfig=function(t,n,r,o){if(t<=r&&n<=o){var i=(r-t)/2,s=(o-n)/2;return{x:i,y:s,width:t,height:n}}else{var c=t,d=n;return t>r&&(n=r/t*n,t=r),n>o&&(t=o/n*t,n=o),this.logger.log("Image downsampled from "+(c+"X"+d)+(" to "+t+"X"+n+".")),this.computeCanvasDrawConfig(t,n,r,o)}},e.prototype.clearElement=function(){if(this.stateManagerProxy.isScanning())throw"Cannot clear while scan is ongoing, close it first.";var t=document.getElementById(this.elementId);t&&(t.innerHTML="")},e.prototype.createVideoElement=function(t){var n=document.createElement("video");return n.style.width=t+"px",n.muted=!0,n.setAttribute("muted","true"),n.playsInline=!0,n},e.prototype.possiblyUpdateShaders=function(t){this.qrMatch!==t&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach(function(n){n.style.backgroundColor=t?xi.BORDER_SHADER_MATCH_COLOR:xi.BORDER_SHADER_DEFAULT_COLOR}),this.qrMatch=t)},e.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},e.prototype.createCanvasElement=function(t,n,r){var o=t,i=n,s=document.createElement("canvas");return s.style.width=o+"px",s.style.height=i+"px",s.style.display="none",s.id=ru(r)?"qr-canvas":r,s},e.prototype.getShadedRegionBounds=function(t,n,r){if(r.width>t||r.height>n)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(t-r.width)/2,y:(n-r.height)/2,width:r.width,height:r.height}},e.prototype.possiblyInsertShadingElement=function(t,n,r,o){if(!(n-o.width<1||r-o.height<1)){var i=document.createElement("div");i.style.position="absolute";var s=(n-o.width)/2,c=(r-o.height)/2;if(i.style.borderLeft=s+"px solid #0000007a",i.style.borderRight=s+"px solid #0000007a",i.style.borderTop=c+"px solid #0000007a",i.style.borderBottom=c+"px solid #0000007a",i.style.boxSizing="border-box",i.style.top="0px",i.style.bottom="0px",i.style.left="0px",i.style.right="0px",i.id=""+xi.SHADED_REGION_ELEMENT_ID,n-o.width<11||r-o.height<11)this.hasBorderShaders=!1;else{var d=5,p=40;this.insertShaderBorders(i,p,d,-d,0,!0),this.insertShaderBorders(i,p,d,-d,0,!1),this.insertShaderBorders(i,p,d,o.height+d,0,!0),this.insertShaderBorders(i,p,d,o.height+d,0,!1),this.insertShaderBorders(i,d,p+d,-d,-d,!0),this.insertShaderBorders(i,d,p+d,o.height+d-p,-d,!0),this.insertShaderBorders(i,d,p+d,-d,-d,!1),this.insertShaderBorders(i,d,p+d,o.height+d-p,-d,!1),this.hasBorderShaders=!0}t.append(i)}},e.prototype.insertShaderBorders=function(t,n,r,o,i,s){var c=document.createElement("div");c.style.position="absolute",c.style.backgroundColor=xi.BORDER_SHADER_DEFAULT_COLOR,c.style.width=n+"px",c.style.height=r+"px",c.style.top=o+"px",s?c.style.left=i+"px":c.style.right=i+"px",this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(c),t.appendChild(c)},e.prototype.showPausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="block"},e.prototype.hidePausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="none"},e.prototype.getTimeoutFps=function(t){return 1e3/t},e}(),Cw="data:image/svg+xml;base64,",kfe=Cw+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNzEuNjQzIDM3MS42NDMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM3MS42NDMgMzcxLjY0MyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTEwNS4wODQgMzguMjcxaDE2My43Njh2MjBIMTA1LjA4NHoiLz48cGF0aCBkPSJNMzExLjU5NiAxOTAuMTg5Yy03LjQ0MS05LjM0Ny0xOC40MDMtMTYuMjA2LTMyLjc0My0yMC41MjJWMzBjMC0xNi41NDItMTMuNDU4LTMwLTMwLTMwSDEyNS4wODRjLTE2LjU0MiAwLTMwIDEzLjQ1OC0zMCAzMHYxMjAuMTQzaC04LjI5NmMtMTYuNTQyIDAtMzAgMTMuNDU4LTMwIDMwdjEuMzMzYTI5LjgwNCAyOS44MDQgMCAwIDAgNC42MDMgMTUuOTM5Yy03LjM0IDUuNDc0LTEyLjEwMyAxNC4yMjEtMTIuMTAzIDI0LjA2MXYxLjMzM2MwIDkuODQgNC43NjMgMTguNTg3IDEyLjEwMyAyNC4wNjJhMjkuODEgMjkuODEgMCAwIDAtNC42MDMgMTUuOTM4djEuMzMzYzAgMTYuNTQyIDEzLjQ1OCAzMCAzMCAzMGg4LjMyNGMuNDI3IDExLjYzMSA3LjUwMyAyMS41ODcgMTcuNTM0IDI2LjE3Ny45MzEgMTAuNTAzIDQuMDg0IDMwLjE4NyAxNC43NjggNDUuNTM3YTkuOTg4IDkuOTg4IDAgMCAwIDguMjE2IDQuMjg4IDkuOTU4IDkuOTU4IDAgMCAwIDUuNzA0LTEuNzkzYzQuNTMzLTMuMTU1IDUuNjUtOS4zODggMi40OTUtMTMuOTIxLTYuNzk4LTkuNzY3LTkuNjAyLTIyLjYwOC0xMC43Ni0zMS40aDgyLjY4NWMuMjcyLjQxNC41NDUuODE4LjgxNSAxLjIxIDMuMTQyIDQuNTQxIDkuMzcyIDUuNjc5IDEzLjkxMyAyLjUzNCA0LjU0Mi0zLjE0MiA1LjY3Ny05LjM3MSAyLjUzNS0xMy45MTMtMTEuOTE5LTE3LjIyOS04Ljc4Ny0zNS44ODQgOS41ODEtNTcuMDEyIDMuMDY3LTIuNjUyIDEyLjMwNy0xMS43MzIgMTEuMjE3LTI0LjAzMy0uODI4LTkuMzQzLTcuMTA5LTE3LjE5NC0xOC42NjktMjMuMzM3YTkuODU3IDkuODU3IDAgMCAwLTEuMDYxLS40ODZjLS40NjYtLjE4Mi0xMS40MDMtNC41NzktOS43NDEtMTUuNzA2IDEuMDA3LTYuNzM3IDE0Ljc2OC04LjI3MyAyMy43NjYtNy42NjYgMjMuMTU2IDEuNTY5IDM5LjY5OCA3LjgwMyA0Ny44MzYgMTguMDI2IDUuNzUyIDcuMjI1IDcuNjA3IDE2LjYyMyA1LjY3MyAyOC43MzMtLjQxMyAyLjU4NS0uODI0IDUuMjQxLTEuMjQ1IDcuOTU5LTUuNzU2IDM3LjE5NC0xMi45MTkgODMuNDgzLTQ5Ljg3IDExNC42NjEtNC4yMjEgMy41NjEtNC43NTYgOS44Ny0xLjE5NCAxNC4wOTJhOS45OCA5Ljk4IDAgMCAwIDcuNjQ4IDMuNTUxIDkuOTU1IDkuOTU1IDAgMCAwIDYuNDQ0LTIuMzU4YzQyLjY3Mi0zNi4wMDUgNTAuODAyLTg4LjUzMyA1Ni43MzctMTI2Ljg4OC40MTUtMi42ODQuODIxLTUuMzA5IDEuMjI5LTcuODYzIDIuODM0LTE3LjcyMS0uNDU1LTMyLjY0MS05Ljc3Mi00NC4zNDV6bS0yMzIuMzA4IDQyLjYyYy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM2MwLTUuNTE0IDQuNDg2LTEwIDEwLTEwaDE1djIxLjMzM2gtMTV6bS0yLjUtNTIuNjY2YzAtNS41MTQgNC40ODYtMTAgMTAtMTBoNy41djIxLjMzM2gtNy41Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM3ptMTcuNSA5My45OTloLTcuNWMtNS41MTQgMC0xMC00LjQ4Ni0xMC0xMHYtMS4zMzNjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGg3LjV2MjEuMzMzem0zMC43OTYgMjguODg3Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi04LjI3MWg5MS40NTdjLS44NTEgNi42NjgtLjQzNyAxMi43ODcuNzMxIDE4LjI3MWgtODIuMTg4em03OS40ODItMTEzLjY5OGMtMy4xMjQgMjAuOTA2IDEyLjQyNyAzMy4xODQgMjEuNjI1IDM3LjA0IDUuNDQxIDIuOTY4IDcuNTUxIDUuNjQ3IDcuNzAxIDcuMTg4LjIxIDIuMTUtMi41NTMgNS42ODQtNC40NzcgNy4yNTEtLjQ4Mi4zNzgtLjkyOS44LTEuMzM1IDEuMjYxLTYuOTg3IDcuOTM2LTExLjk4MiAxNS41Mi0xNS40MzIgMjIuNjg4aC05Ny41NjRWMzBjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGgxMjMuNzY5YzUuNTE0IDAgMTAgNC40ODYgMTAgMTB2MTM1LjU3OWMtMy4wMzItLjM4MS02LjE1LS42OTQtOS4zODktLjkxNC0yNS4xNTktMS42OTQtNDIuMzcgNy43NDgtNDQuODk4IDI0LjY2NnoiLz48cGF0aCBkPSJNMTc5LjEyOSA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXpNMTcyLjYyOSAxNDIuODZoLTEyLjU2VjEzMC44YTUgNSAwIDEgMC0xMCAwdjE3LjA2MWE1IDUgMCAwIDAgNSA1aDE3LjU2YTUgNSAwIDEgMCAwLTEwLjAwMXpNMjE2LjU2OCA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXptLTUgMjQuMDYxaC0xNC4wNlY5My4xNjdoMTQuMDZ2MTQuMDYxek0yMTEuNjY5IDEyNS45MzZIMTk3LjQxYTUgNSAwIDAgMC01IDV2MTQuMjU3YTUgNSAwIDAgMCA1IDVoMTQuMjU5YTUgNSAwIDAgMCA1LTV2LTE0LjI1N2E1IDUgMCAwIDAtNS01eiIvPjwvc3ZnPg==",Bfe=Cw+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1OS4wMTggNTkuMDE4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1OS4wMTggNTkuMDE4IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJtNTguNzQxIDU0LjgwOS01Ljk2OS02LjI0NGExMC43NCAxMC43NCAwIDAgMCAyLjgyLTcuMjVjMC01Ljk1My00Ljg0My0xMC43OTYtMTAuNzk2LTEwLjc5NlMzNCAzNS4zNjEgMzQgNDEuMzE0IDM4Ljg0MyA1Mi4xMSA0NC43OTYgNTIuMTFjMi40NDEgMCA0LjY4OC0uODI0IDYuNDk5LTIuMTk2bDYuMDAxIDYuMjc3YS45OTguOTk4IDAgMCAwIDEuNDE0LjAzMiAxIDEgMCAwIDAgLjAzMS0xLjQxNHpNMzYgNDEuMzE0YzAtNC44NSAzLjk0Ni04Ljc5NiA4Ljc5Ni04Ljc5NnM4Ljc5NiAzLjk0NiA4Ljc5NiA4Ljc5Ni0zLjk0NiA4Ljc5Ni04Ljc5NiA4Ljc5NlMzNiA0Ni4xNjQgMzYgNDEuMzE0ek0xMC40MzEgMTYuMDg4YzAgMy4wNyAyLjQ5OCA1LjU2OCA1LjU2OSA1LjU2OHM1LjU2OS0yLjQ5OCA1LjU2OS01LjU2OGMwLTMuMDcxLTIuNDk4LTUuNTY5LTUuNTY5LTUuNTY5cy01LjU2OSAyLjQ5OC01LjU2OSA1LjU2OXptOS4xMzggMGMwIDEuOTY4LTEuNjAyIDMuNTY4LTMuNTY5IDMuNTY4cy0zLjU2OS0xLjYwMS0zLjU2OS0zLjU2OCAxLjYwMi0zLjU2OSAzLjU2OS0zLjU2OSAzLjU2OSAxLjYwMSAzLjU2OSAzLjU2OXoiLz48cGF0aCBkPSJtMzAuODgyIDI4Ljk4NyA5LjE4LTEwLjA1NCAxMS4yNjIgMTAuMzIzYTEgMSAwIDAgMCAxLjM1MS0xLjQ3NWwtMTItMTFhMSAxIDAgMCAwLTEuNDE0LjA2M2wtOS43OTQgMTAuNzI3LTQuNzQzLTQuNzQzYTEuMDAzIDEuMDAzIDAgMCAwLTEuMzY4LS4wNDRMNi4zMzkgMzcuNzY4YTEgMSAwIDEgMCAxLjMyMiAxLjUwMWwxNi4zMTMtMTQuMzYyIDcuMzE5IDcuMzE4YS45OTkuOTk5IDAgMSAwIDEuNDE0LTEuNDE0bC0xLjgyNS0xLjgyNHoiLz48cGF0aCBkPSJNMzAgNDYuNTE4SDJ2LTQyaDU0djI4YTEgMSAwIDEgMCAyIDB2LTI5YTEgMSAwIDAgMC0xLTFIMWExIDEgMCAwIDAtMSAxdjQ0YTEgMSAwIDAgMCAxIDFoMjlhMSAxIDAgMSAwIDAtMnoiLz48L3N2Zz4=",a3=Cw+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NjAgNDYwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NjAgNDYwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNMjMwIDBDMTAyLjk3NSAwIDAgMTAyLjk3NSAwIDIzMHMxMDIuOTc1IDIzMCAyMzAgMjMwIDIzMC0xMDIuOTc0IDIzMC0yMzBTMzU3LjAyNSAwIDIzMCAwem0zOC4zMzMgMzc3LjM2YzAgOC42NzYtNy4wMzQgMTUuNzEtMTUuNzEgMTUuNzFoLTQzLjEwMWMtOC42NzYgMC0xNS43MS03LjAzNC0xNS43MS0xNS43MVYyMDIuNDc3YzAtOC42NzYgNy4wMzMtMTUuNzEgMTUuNzEtMTUuNzFoNDMuMTAxYzguNjc2IDAgMTUuNzEgNy4wMzMgMTUuNzEgMTUuNzFWMzc3LjM2ek0yMzAgMTU3Yy0yMS41MzkgMC0zOS0xNy40NjEtMzktMzlzMTcuNDYxLTM5IDM5LTM5IDM5IDE3LjQ2MSAzOSAzOS0xNy40NjEgMzktMzkgMzl6Ii8+PC9zdmc+",Ffe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAQgAAAEIBarqQRAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAE1SURBVDiNfdI7S0NBEAXgLya1otFgpbYSbISAgpXYi6CmiH9KCAiChaVga6OiWPgfRDQ+0itaGVNosXtluWwcuMzePfM4M3sq8lbHBubwg1dc4m1E/J/N4ghDPOIsfk/4xiEao5KX0McFljN4C9d4QTPXuY99jP3DsIoDPGM6BY5i5yI5R7O4q+ImFkJY2DCh3cAH2klyB+9J1xUMMAG7eCh1a+Mr+k48b5diXrFVwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=",s3=function(){function e(){}return e.createDefault=function(){return{hasPermission:!1,lastUsedCameraId:null}},e}(),zfe=function(){function e(){this.data=s3.createDefault();var t=localStorage.getItem(e.LOCAL_STORAGE_KEY);t?this.data=JSON.parse(t):this.reset()}return e.prototype.hasCameraPermissions=function(){return this.data.hasPermission},e.prototype.getLastUsedCameraId=function(){return this.data.lastUsedCameraId},e.prototype.setHasPermission=function(t){this.data.hasPermission=t,this.flush()},e.prototype.setLastUsedCameraId=function(t){this.data.lastUsedCameraId=t,this.flush()},e.prototype.resetLastUsedCameraId=function(){this.data.lastUsedCameraId=null,this.flush()},e.prototype.reset=function(){this.data=s3.createDefault(),this.flush()},e.prototype.flush=function(){localStorage.setItem(e.LOCAL_STORAGE_KEY,JSON.stringify(this.data))},e.LOCAL_STORAGE_KEY="HTML5_QRCODE_DATA",e}(),Hfe=function(){function e(){this.infoDiv=document.createElement("div")}return e.prototype.renderInto=function(t){this.infoDiv.style.position="absolute",this.infoDiv.style.top="10px",this.infoDiv.style.right="10px",this.infoDiv.style.zIndex="2",this.infoDiv.style.display="none",this.infoDiv.style.padding="5pt",this.infoDiv.style.border="1px solid silver",this.infoDiv.style.fontSize="10pt",this.infoDiv.style.background="rgb(248 248 248)",this.infoDiv.innerText=r3.builtUsing();var n=document.createElement("a");n.innerText="html5-qrcode",n.href="https://github.com/mebjas/html5-qrcode",n.target="new",this.infoDiv.appendChild(n);var r=document.createElement("br"),o=document.createElement("br");this.infoDiv.appendChild(r),this.infoDiv.appendChild(o);var i=document.createElement("a");i.innerText=r3.reportIssues(),i.href="https://github.com/mebjas/html5-qrcode/issues",i.target="new",this.infoDiv.appendChild(i),t.appendChild(this.infoDiv)},e.prototype.show=function(){this.infoDiv.style.display="block"},e.prototype.hide=function(){this.infoDiv.style.display="none"},e}(),Vfe=function(){function e(t,n){this.isShowingInfoIcon=!0,this.onTapIn=t,this.onTapOut=n,this.infoIcon=document.createElement("img")}return e.prototype.renderInto=function(t){var n=this;this.infoIcon.src=a3,this.infoIcon.style.position="absolute",this.infoIcon.style.top="4px",this.infoIcon.style.right="4px",this.infoIcon.style.opacity="0.6",this.infoIcon.style.cursor="pointer",this.infoIcon.style.zIndex="2",this.infoIcon.style.width="16px",this.infoIcon.style.height="16px",this.infoIcon.onmouseover=function(r){return n.onHoverIn()},this.infoIcon.onmouseout=function(r){return n.onHoverOut()},this.infoIcon.onclick=function(r){return n.onClick()},t.appendChild(this.infoIcon)},e.prototype.onHoverIn=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="1")},e.prototype.onHoverOut=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="0.6")},e.prototype.onClick=function(){this.isShowingInfoIcon?(this.isShowingInfoIcon=!1,this.onTapIn(),this.infoIcon.src=Ffe,this.infoIcon.style.opacity="1"):(this.isShowingInfoIcon=!0,this.onTapOut(),this.infoIcon.src=a3,this.infoIcon.style.opacity="0.6")},e}(),Wfe=function(){function e(){var t=this;this.infoDiv=new Hfe,this.infoIcon=new Vfe(function(){t.infoDiv.show()},function(){t.infoDiv.hide()})}return e.prototype.renderInto=function(t){this.infoDiv.renderInto(t),this.infoIcon.renderInto(t)},e}(),Ufe=function(){function e(){}return e.hasCameraPermissions=function(){return new Promise(function(t,n){navigator.mediaDevices.enumerateDevices().then(function(r){r.forEach(function(o){o.kind==="videoinput"&&o.label&&t(!0)}),t(!1)})})},e}(),bi;(function(e){e[e.STATUS_DEFAULT=0]="STATUS_DEFAULT",e[e.STATUS_SUCCESS=1]="STATUS_SUCCESS",e[e.STATUS_WARNING=2]="STATUS_WARNING",e[e.STATUS_REQUESTING_PERMISSION=3]="STATUS_REQUESTING_PERMISSION"})(bi||(bi={}));function Gfe(e){return{fps:e.fps,qrbox:e.qrbox,aspectRatio:e.aspectRatio,disableFlip:e.disableFlip,videoConstraints:e.videoConstraints}}function Yfe(e,t){return{formatsToSupport:e.formatsToSupport,experimentalFeatures:e.experimentalFeatures,verbose:t}}var Kfe=function(){function e(t,n,r){if(this.lastMatchFound=null,this.cameraScanImage=null,this.fileScanImage=null,this.elementId=t,this.config=this.createConfig(n),this.verbose=r===!0,!document.getElementById(t))throw"HTML Element with id="+t+" not found";this.currentScanType=Xi.SCAN_TYPE_CAMERA,this.sectionSwapAllowed=!0,this.logger=new l5(this.verbose),this.persistedDataManager=new zfe,n.rememberLastUsedCamera!==!0&&this.persistedDataManager.reset()}return e.prototype.render=function(t,n){var r=this;this.lastMatchFound=null,this.qrCodeSuccessCallback=function(i,s){if(t)t(i,s);else{if(r.lastMatchFound===i)return;r.lastMatchFound=i,r.setHeaderMessage(Gi.lastMatch(i),bi.STATUS_SUCCESS)}},this.qrCodeErrorCallback=function(i,s){n&&n(i,s)};var o=document.getElementById(this.elementId);if(!o)throw"HTML Element with id="+this.elementId+" not found";o.innerHTML="",this.createBasicLayout(o),this.html5Qrcode=new i3(this.getScanRegionId(),Yfe(this.config,this.verbose))},e.prototype.pause=function(t){if(!this.html5Qrcode)throw"Code scanner not initialized.";(ru(t)||t!==!0)&&(t=!1),this.html5Qrcode.pause(t)},e.prototype.resume=function(){if(!this.html5Qrcode)throw"Code scanner not initialized.";this.html5Qrcode.resume()},e.prototype.getState=function(){if(!this.html5Qrcode)throw"Code scanner not initialized.";return this.html5Qrcode.getState()},e.prototype.clear=function(){var t=this,n=function(){var r=document.getElementById(t.elementId);r&&(r.innerHTML="",t.resetBasicLayout(r))};return this.html5Qrcode?new Promise(function(r,o){if(!t.html5Qrcode){r();return}t.html5Qrcode.isScanning?t.html5Qrcode.stop().then(function(i){if(!t.html5Qrcode){r();return}t.html5Qrcode.clear(),n(),r()}).catch(function(i){t.verbose&&t.logger.logError("Unable to stop qrcode scanner",i),o(i)}):(t.html5Qrcode.clear(),n())}):Promise.resolve()},e.prototype.getRunningTrackCapabilities=function(){if(!this.html5Qrcode)throw"Code scanner not initialized.";return this.html5Qrcode.getRunningTrackCapabilities()},e.prototype.applyVideoConstraints=function(t){if(!this.html5Qrcode)throw"Code scanner not initialized.";return this.html5Qrcode.applyVideoConstraints(t)},e.prototype.createConfig=function(t){return t?(t.fps||(t.fps=Fc.SCAN_DEFAULT_FPS),t.rememberLastUsedCamera!==!Fc.DEFAULT_REMEMBER_LAST_CAMERA_USED&&(t.rememberLastUsedCamera=Fc.DEFAULT_REMEMBER_LAST_CAMERA_USED),t):{fps:Fc.SCAN_DEFAULT_FPS,rememberLastUsedCamera:Fc.DEFAULT_REMEMBER_LAST_CAMERA_USED}},e.prototype.createBasicLayout=function(t){t.style.position="relative",t.style.padding="0px",t.style.border="1px solid silver",this.createHeader(t);var n=document.createElement("div"),r=this.getScanRegionId();n.id=r,n.style.width="100%",n.style.minHeight="100px",n.style.textAlign="center",t.appendChild(n),this.insertCameraScanImageToScanRegion();var o=document.createElement("div"),i=this.getDashboardId();o.id=i,o.style.width="100%",t.appendChild(o),this.setupInitialDashboard(o)},e.prototype.resetBasicLayout=function(t){t.style.border="none"},e.prototype.setupInitialDashboard=function(t){this.createSection(t),this.createSectionControlPanel(),this.createSectionSwap()},e.prototype.createHeader=function(t){var n=document.createElement("div");n.style.textAlign="left",n.style.margin="0px",t.appendChild(n);var r=new Wfe;r.renderInto(n);var o=document.createElement("div");o.id=this.getHeaderMessageContainerId(),o.style.display="none",o.style.textAlign="center",o.style.fontSize="14px",o.style.padding="2px 10px",o.style.margin="4px",o.style.borderTop="1px solid #f6f6f6",n.appendChild(o)},e.prototype.createSection=function(t){var n=document.createElement("div");n.id=this.getDashboardSectionId(),n.style.width="100%",n.style.padding="10px 0px 10px 0px",n.style.textAlign="left",t.appendChild(n)},e.prototype.createCameraListUi=function(t,n,r){var o=this;o.setHeaderMessage(Gi.cameraPermissionRequesting());var i=function(){r||o.createPermissionButton(t,n)};i3.getCameras().then(function(s){o.persistedDataManager.setHasPermission(!0),o.resetHeaderMessage(),s&&s.length>0?(t.removeChild(n),o.renderCameraSelection(s)):(o.setHeaderMessage(Gi.noCameraFound(),bi.STATUS_WARNING),i())}).catch(function(s){o.persistedDataManager.setHasPermission(!1),r?r.disabled=!1:i(),o.setHeaderMessage(s,bi.STATUS_WARNING)})},e.prototype.createPermissionButton=function(t,n){var r=this,o=document.createElement("button");o.innerText=Gi.cameraPermissionTitle(),o.addEventListener("click",function(){o.disabled=!0,r.createCameraListUi(t,n,o)}),n.appendChild(o)},e.prototype.createPermissionsUi=function(t,n){var r=this;if(this.persistedDataManager.hasCameraPermissions()){Ufe.hasCameraPermissions().then(function(o){o?r.createCameraListUi(t,n):(r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,n))}).catch(function(o){r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,n)});return}this.createPermissionButton(t,n)},e.prototype.createSectionControlPanel=function(){var t=this,n=document.getElementById(this.getDashboardSectionId()),r=document.createElement("div");n.appendChild(r);var o=document.createElement("div");o.id=this.getDashboardSectionCameraScanRegionId(),o.style.display=this.currentScanType===Xi.SCAN_TYPE_CAMERA?"block":"none",r.appendChild(o);var i=document.createElement("div");i.style.textAlign="center",o.appendChild(i),this.createPermissionsUi(o,i);var s=document.createElement("div");s.id=this.getDashboardSectionFileScanRegionId(),s.style.textAlign="center",s.style.display=this.currentScanType===Xi.SCAN_TYPE_CAMERA?"none":"block",r.appendChild(s);var c=document.createElement("input");c.id=this.getFileScanInputId(),c.accept="image/*",c.type="file",c.style.width="200px",c.disabled=this.currentScanType===Xi.SCAN_TYPE_CAMERA;var d=document.createElement("span");d.innerText=" Select Image",s.appendChild(c),s.appendChild(d),c.addEventListener("change",function(p){if(!t.html5Qrcode)throw"html5Qrcode not defined";if(!(p==null||p.target==null)&&t.currentScanType===Xi.SCAN_TYPE_FILE&&p.target.files.length!==0){var m=p.target.files[0];t.html5Qrcode.scanFileV2(m,!0).then(function(y){t.resetHeaderMessage(),t.qrCodeSuccessCallback(y.decodedText,y)}).catch(function(y){t.setHeaderMessage(y,bi.STATUS_WARNING),t.qrCodeErrorCallback(y,s5.createFrom(y))})}})},e.prototype.renderCameraSelection=function(t){var n=this,r=document.getElementById(this.getDashboardSectionCameraScanRegionId());r.style.textAlign="center";var o=document.createElement("span");o.style.marginRight="10px";var i=t.length,s=document.createElement("select");if(i===1)s.style.display="none";else{var c=Gi.selectCamera();o.innerText=c+" ("+t.length+") "}s.id=this.getCameraSelectionId();for(var d=[],p=0,m=t;p",n.appendChild(this.cameraScanImage);return}this.cameraScanImage=new Image,this.cameraScanImage.onload=function(r){n.innerHTML="
",n.appendChild(t.cameraScanImage)},this.cameraScanImage.width=64,this.cameraScanImage.style.opacity="0.8",this.cameraScanImage.src=kfe},e.prototype.insertFileScanImageToScanRegion=function(){var t=this,n=document.getElementById(this.getScanRegionId());if(this.fileScanImage){n.innerHTML="
",n.appendChild(this.fileScanImage);return}this.fileScanImage=new Image,this.fileScanImage.onload=function(r){n.innerHTML="
",n.appendChild(t.fileScanImage)},this.fileScanImage.width=64,this.fileScanImage.style.opacity="0.8",this.fileScanImage.src=Bfe},e.prototype.clearScanRegion=function(){var t=document.getElementById(this.getScanRegionId());t.innerHTML=""},e.prototype.getDashboardSectionId=function(){return this.elementId+"__dashboard_section"},e.prototype.getDashboardSectionCameraScanRegionId=function(){return this.elementId+"__dashboard_section_csr"},e.prototype.getDashboardSectionFileScanRegionId=function(){return this.elementId+"__dashboard_section_fsr"},e.prototype.getDashboardSectionSwapLinkId=function(){return this.elementId+"__dashboard_section_swaplink"},e.prototype.getScanRegionId=function(){return this.elementId+"__scan_region"},e.prototype.getDashboardId=function(){return this.elementId+"__dashboard"},e.prototype.getFileScanInputId=function(){return this.elementId+"__filescan_input"},e.prototype.getStatusSpanId=function(){return this.elementId+"__status_span"},e.prototype.getHeaderMessageContainerId=function(){return this.elementId+"__header_message"},e.prototype.getCameraSelectionId=function(){return this.elementId+"__camera_selection"},e.prototype.getCameraScanRegion=function(){return document.getElementById(this.getDashboardSectionCameraScanRegionId())},e.prototype.getFileScanRegion=function(){return document.getElementById(this.getDashboardSectionFileScanRegionId())},e.prototype.getFileScanInput=function(){return document.getElementById(this.getFileScanInputId())},e.prototype.getDashboardSectionSwapLink=function(){return document.getElementById(this.getDashboardSectionSwapLinkId())},e.prototype.getHeaderMessageDiv=function(){return document.getElementById(this.getHeaderMessageContainerId())},e}();const Xfe=()=>{var m,y,b,_,S,w,T,E;const[e,t]=f.useState(null),[n,r]=f.useState(!1),[o,i]=f.useState([]),[s,c]=f.useState([]),d=f.useRef(null);f.useEffect(()=>{d.current=new Kfe("reader",{qrbox:{width:250,height:250},fps:5});const I=()=>{if(e){r(!0);try{fetch("https://api.exampaper.vidh.ai/fetchQrcodeScannedInfo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({qrcodeValue:e})}).then(R=>R.json()).then(R=>{r(!1),R.status==="success"&&(i(R.results),c(R==null?void 0:R.marks))})}catch(P){throw r(!1),new Error(P)}}};window.fetchBarcodeData=I;const A=P=>{const R=document.getElementById("reader");R&&(R.style.visibility="hidden"),t(P)};window.success=A;const O=P=>{console.log("Error: ",P)};return window.error=O,document.getElementById("reader")&&d.current.render(A,O),()=>{d.current.clear()}},[]);const p=()=>{t(null),i([]),c([])};return f.useEffect(()=>{if(e)fetchBarcodeData();else{const I=document.getElementById("reader");console.log("Reader ELe ===== ",I),I&&(console.log("Changing it to visible"),I.style.visibility="visible",d.current.render(success,error))}},[e]),x.jsxs(pe,{className:"App",children:[x.jsx(pe,{className:"d-flex justify-content-center text-light bg-primary rounded py-3",children:x.jsx("h1",{children:"Welcome to exampaper.vidh.ai"})}),x.jsxs(pe,{className:"my-3",children:[x.jsx(pe,{className:"d-none d-md-flex justify-content-center align-items-center w-100",children:e?x.jsxs("h5",{children:["QR : ",e]}):x.jsx("div",{id:"reader",style:{width:"400px",height:"400px"}})}),x.jsx(pe,{className:"d-flex d-md-none justify-content-center align-items-center w-100",children:e?x.jsxs("h5",{children:["QR : ",e]}):x.jsx("div",{id:"reader",style:{width:"400px",height:"400px"}})})]}),x.jsx(pe,{className:"w-100 d-flex justify-content-center",children:o.length>0&&x.jsxs(pe,{className:"p-5 w-50 rounded shadow",children:[x.jsxs("h5",{children:["Candidate Name: ",(m=o[0])==null?void 0:m.candidate_name]}),x.jsxs("h5",{children:["Register Name : ",(y=o[0])==null?void 0:y.register_number]}),x.jsxs("h5",{children:["Subject Code : ",(b=o[0])==null?void 0:b.subject_code]}),x.jsxs("h5",{children:["Exam center code : ",(_=o[0])==null?void 0:_.exam_centre_code]}),x.jsxs("h5",{children:["Exam center : ",(S=o[0])==null?void 0:S.exam_center]})]})}),x.jsx(pe,{className:"w-100 d-flex justify-content-center",children:e?s.length>0&&o.length>0?x.jsx(x.Fragment,{children:x.jsxs(pe,{className:"d-flex flex-column gap-4",children:[x.jsxs(pe,{className:"p-5 rounded shadow",children:[x.jsxs("h5",{children:["Marks : ",(w=s[0])==null?void 0:w.marks]}),x.jsxs("h5",{children:["File Scanned Date : ",(T=s[0])==null?void 0:T.file_scanned_date]}),x.jsxs("h5",{children:["Cover QR code : ",(E=s[0])==null?void 0:E.cover_barcode]})]}),x.jsx(pe,{children:x.jsx(it,{className:"p-3 bg-primary text-light rounded",onClick:p,children:"Scan Again"})})]})}):x.jsxs(pe,{className:"w-50",children:[x.jsx(pe,{className:"p-5 rounded shadow",children:x.jsx("h5",{children:"Marks Data Not Found .."})}),x.jsx(pe,{className:"my-3",children:x.jsx(it,{className:"p-3 bg-primary text-light rounded",onClick:p,children:"Scan Again"})})]}):null}),n&&x.jsx(Yr,{})]})},{Content:qfe,Header:Qfe}=fn;function Zfe(){const[e,t]=f.useState(!1),[n,r]=f.useState(!1),[o,i]=f.useState([]),[s,c]=f.useState(0),d=f.useRef(null),p=pr(),m=Qn($=>$==null?void 0:$.evQrcodeList);console.log("evQrcodeList = ",m);const y=Qn($=>$==null?void 0:$.systemNumber);console.log("systemno: ",y);const b=Vo(),{token:{colorBgContainer:_}}=Io.useToken();f.useEffect(()=>{y?m.length>0?i(m):T():r(!0)},[y]),f.useEffect(()=>{m.length>0&&i(m)},[m]);const S=()=>{console.log("System No Change is called"),r(!0),b(Iy([]))},w=async $=>{const F={systemRecords:$,sysNo:y};try{fetch("https://api.exampaper.vidh.ai/updateSystemReservationStatusEvQrcode",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}).then(k=>k.json()).then(k=>{console.log("response from updation : ",k)})}catch{throw new Error("Error in update system records : ",$)}},T=async()=>{t(!0);try{const k=await(await fetch("https://api.exampaper.vidh.ai/getEvRecords",{method:"POST",body:JSON.stringify({sysno:y}),headers:{"Content-Type":"application/json"}})).json();var $=k==null?void 0:k.data;console.log("System record ====== ",k.systemRecord),k.systemRecord||($=E(k==null?void 0:k.data,y)),console.log("System records : ",$),b(Iy($)),w($)}catch(F){console.error("Error fetching data: ",F)}finally{t(!1)}};function E($,F){const k=[];for(var B=0;B<$.length;B++){var V=B%5;V===F-1&&k.push($[B])}return k}const I=()=>{t(!0),i([]),setTimeout(()=>{const $=o.filter((F,k)=>k!==s);i($),s>=$.length&&c(0),t(!1)},1e3)},A=async()=>{try{const $=document.getElementById("qrcodeInput").value;console.log("inputvalu = ",$);const F={imageName:P.image_name,qrvalue:$};console.log("payload=",F);const B=await(await fetch("https://api.exampaper.vidh.ai/updateEvRecord",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})).json();console.log("responsedata: ",B),(B==null?void 0:B.status_code)===200?(sn.success("Record Updated Successfully"),I(),document.getElementById("qrcodeInput").value=""):sn.error("Updation Failed")}catch($){console.error("Error fetching data: ",$)}finally{t(!1)}},O=()=>{b(Iy([])),p(-1)};if(e)return x.jsx(Nm,{});const P=o[s],R=P?`https://docs.exampaper.vidh.ai/${P.s3_path}`:"",M=$=>{$.key==="Enter"&&(console.log("Updating ......"),A())};return x.jsxs(fn,{style:{minHeight:"100vh"},children:[x.jsxs(fn,{children:[x.jsx(Fo,{}),x.jsx(Qfe,{style:{padding:0,background:_},children:x.jsxs(pe,{className:"d-flex justify-content-between h-100 py-1 px-2",children:[x.jsx(it,{className:"bg-primary p-1 text-light",onClick:O,children:x.jsx(Ho,{})}),x.jsxs(pe,{className:"d-flex justify-content-between gap-2",children:[y&&x.jsxs(pe,{className:"h6 p-0 m-0 text-light bg-primary rounded h-100 d-flex align-items-center px-3",style:{cursor:"pointer"},onClick:S,children:[x.jsx("b",{children:"System No : "})," ",y]}),x.jsx(it,{className:"bg-primary p-1 text-light",onClick:()=>p("/"),children:x.jsx(zo,{})})]})]})}),x.jsx(qfe,{children:P?x.jsx(pe,{className:"d-flex justify-content-center align-items-center flex-column",style:{minHeight:"80vh"},children:x.jsxs(K$,{style:{display:"flex",flexDirection:"row",margin:"20px 20px 20px 20px"},children:[x.jsxs(pe,{style:{flex:"20%",padding:"20px",marginTop:"30px",textAlign:"left"},children:[x.jsxs(Rs,{variant:"h5",style:{paddingBottom:"20px"},children:["Records Count: ",o.length]}),x.jsxs(Rs,{variant:"h6",children:["Image Name: ",P.image_name]}),x.jsx(Rs,{variant:"subtitle1",style:{paddingTop:"20px",fontWeight:"bold"},children:"Qrcode Value"}),x.jsx("input",{type:"text",id:"qrcodeInput",placeholder:"Enter qrcode value",style:{marginTop:"10px",width:"100%",padding:"5px",backgroundColor:"transparent",color:"#000000"},onKeyDown:M,inputRef:d}),x.jsxs(pe,{mt:2,children:[x.jsx(it,{variant:"contained",color:"primary",onClick:I,style:{marginRight:10},children:"Skip"}),x.jsx(it,{variant:"contained",color:"secondary",onClick:A,style:{backgroundColor:"green"},children:"Update"})]})]}),x.jsx(X$,{style:{flex:"80%"},children:x.jsx("img",{src:R,alt:P.image_name,style:{minWidth:"1000px",width:"100%",marginTop:"20px"}})})]})}):x.jsx(Rs,{children:"No items to display"})}),n&&x.jsx(zh,{setShowSystemNoContainer:r,showSystemNoContainer:n})]}),e&&x.jsx(Yr,{})]})}const Jfe=()=>{const[e,t]=ic(),[n,r]=f.useState(null),[o,i]=f.useState(null),[s,c]=f.useState(!1),[d,p]=f.useState([]),[m,y]=f.useState(null),[b,_]=f.useState(!1),[S,w]=f.useState([]),[T,E]=f.useState(0),I=Qn(H=>H==null?void 0:H.partCErrorList),A=e.get("table"),O=e.get("image_name"),P=e.get("error"),R=e.get("error_reason"),M=e.get("sysNo"),$=e.get("degreeType");f.useState([]);const[F,k]=f.useState([]),B=pr(),V=Vo();console.log("Ev errors list ==== ",I),console.log("table is : ",A);const W=async()=>{try{return await(await fetch("https://api.exampaper.vidh.ai/fetchPrimaryKeyData",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({image_name:O,table:A})})).json()}catch(H){throw new Error(H)}};f.useEffect(()=>{const H=localStorage.getItem("marks_manual_data");console.log("Marks local data 123 ========= ",H),H&&(console.log("Into if and updating ......."),console.log("marks local data ==== ",H),k(JSON.parse(H)))},[]),f.useEffect(()=>{V(U1(M))},[M]),f.useEffect(()=>{console.log("Ev error data =============== ",F)},[F]),f.useEffect(()=>{(async()=>{if(A&&O){c(!0);const z=await W();if(c(!1),console.log("Response is : ",z),(z==null?void 0:z.status)==="success"){console.log("=========== Success ============");const j=z==null?void 0:z.data;j.length>0&&p(j[0])}}})()},[]),f.useEffect(()=>{console.log("=========== Use effect triggered ==========="),i(d==null?void 0:d.image_name),r(d==null?void 0:d.cover_barcode),y(d==null?void 0:d.s3_path)},[d]);const L=async()=>{var j;if(marks){c(!0);try{const q=await(await fetch("https://api.exampaper.vidh.ai/editPartCdata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({evQrcode:n,imageName:o,rotateAngle:T})})).json();if(c(!1),console.log("response data ========= ",q),(q==null?void 0:q.status)==="success"){sn.success("Record Updated Successfully ...");var H=null;console.log("Ev errors data before filter ============= ",F);var z=F.filter((K,J)=>(K==null?void 0:K.image_name)===o?(H=J,!1):!0);if(H||(H=0),console.log("new records ======1 ",z),console.log("Current Index ===== ",H),V(Tf(z)),z.length>0){console.log("Has to navigte 12 ....."),localStorage.setItem("marks_manual_data",JSON.stringify(z));const K=`/sqlPlayground/edit?image_name=${(j=z[H])==null?void 0:j.image_name}&table=ocr_scanned_part_c_v1&error=${P}&error_reason=${R}°reeType=${$}&sysNo=${M}`;console.log("new url ==== ",K),window.location.href=K}else B("/")}}catch(Y){throw c(!1),new Error(Y)}}};f.useEffect(()=>{console.log("Rotate angle changed to ========== ",T);const H=document.getElementById("img-container");console.log("Imge container ===== ",H),H&&(H.style.transform=`rotate(${T}deg)`)},[T]);const U=()=>{var j;try{if(F){var H=null,z=F.filter((X,q)=>(X==null?void 0:X.image_name)===o?(H=q,!1):!0);H||(H=0),console.log("Current Index ===== ",H);const Y=H+1;if(console.log("new index ===== ",Y),z.length>0){console.log("Has to navigte 12 .....");const X=`/sqlPlayground/edit?image_name=${(j=F[Y])==null?void 0:j.image_name}&table=ocr_scanned_part_c_v1&error=${P}&error_reason=${R}°reeType=${$}&sysNo=${M}`;console.log("new url ==== ",X),window.location.href=X}}}catch(Y){throw new Error(Y)}};return x.jsxs(Gh,{children:[x.jsxs(pe,{className:"d-flex justify-content-between align-items-center",children:[x.jsxs(pe,{className:"d-flex flex-column gap-3 w-25",children:[o&&x.jsxs("h5",{className:"text-left",children:["ID : ",o]}),P&&x.jsxs("h5",{className:"text-left",children:["Error Code : ",P]}),x.jsx(uo,{placeholder:"cover qrcode",value:n,setValue:r}),x.jsx(it,{className:"bg-primary text-white rounded p-3",onClick:()=>{L()},children:"Update"}),x.jsx(it,{className:"bg-primary text-white rounded p-3",onClick:()=>{U()},children:"Skip"}),x.jsxs(pe,{className:"d-flex justify-content-between",children:[x.jsxs(it,{className:"bg-primary text-white rounded p-3",onClick:()=>E(H=>H-90),children:["Rotate ",x.jsx(La,{})]}),x.jsxs(it,{className:"bg-primary text-white rounded p-3",onClick:()=>E(H=>H+90),children:["Rotate ",x.jsx(ja,{})]})]})]}),x.jsx(pe,{className:"w-75",children:x.jsx(pe,{className:"px-5",id:"img-container",children:x.jsx("img",{src:`https://docs.exampaper.vidh.ai/${d==null?void 0:d.s3_path}`,width:"100%",height:"auto"})})})]}),s&&x.jsx(Yr,{}),b&&x.jsx(fw,{type:"rotation_results",rotationResults:S,setShowDialog:_})]})},ehe=()=>{const[e,t]=f.useState(),[n,r]=f.useState();return x.jsx(Gh,{children:x.jsx(pe,{children:x.jsxs(pe,{className:"d-flex justify-content-center gap-3 flex-row",children:[x.jsx(uo,{placeholder:"Register Number",value:e,setValue:t}),x.jsx(uo,{placeholder:"Scanned Value",value:n,setValue:r}),x.jsx(pe,{children:x.jsx(it,{className:"bg-primary text-white p-3 rounded",children:"Search"})})]})})})},the=()=>{const e=[{title:"PART - A",url:"/Playground/PartA"},{title:"PART - C",url:"/Playground/PartC"}];return x.jsxs(x.Fragment,{children:[x.jsx(pe,{className:"d-flex justify-content-center text-light bg-primary rounded py-3",children:x.jsx("h1",{children:"Welcome to exampaper.vidh.ai"})}),x.jsx(pe,{className:"p-3",style:{width:"100%"},children:e.map(t=>x.jsx(dw,{title:t==null?void 0:t.title,url:t==null?void 0:t.url}))})]})},nhe=({data:e,s3Path:t,imageName:n,tableName:r,setShowEditContainer:o,rotateAngle:i,type:s})=>{const[c,d]=f.useState(null),[p,m]=f.useState(null),[y,b]=f.useState(null),[_,S]=f.useState(!1),[w,T]=f.useState(null),[E,I]=f.useState(null),[A,O]=f.useState(!0),P=()=>{O(!1)};f.useEffect(()=>{e&&(T(e==null?void 0:e.qrcode),b(e==null?void 0:e.barcode),d(e==null?void 0:e.marks),I(e==null?void 0:e.subject_code),m(e==null?void 0:e.register_number)),console.log("the currect editor type: ",s)},[e]);const R=async()=>{if(c){S(!0);try{const k=await(await fetch("https://api.exampaper.vidh.ai/editPartCdata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({qrcode:w,barcode:y,table:r,s3Path:t,subjectCode:E,marks:c,imageName:n,rotateAngle:i})})).json();S(!1),console.log("response data ========= ",k),(k==null?void 0:k.status)==="success"&&(sn.success("Record Updated Successfully ..."),o(!1))}catch($){throw S(!1),sn.error("Something Went Wrong ..."),new Error($)}}},M=async()=>{if(console.log(p),console.log(E),console.log(y,w),console.log(!p&&!E&&(!y||!w)),!(!p&&!E&&(!y||!w))){S(!0);try{const k=await(await fetch("https://api.exampaper.vidh.ai/editPartAdata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({qrcode:w,barcode:y,table:r,s3Path:t,subjectCode:E,registerNumber:p,imageName:n,rotateAngle:i})})).json();S(!1),console.log("response data ========= ",k),(k==null?void 0:k.status)==="success"&&(sn.success("Record Updated Successfully ..."),o(!1))}catch($){throw S(!1),sn.error("Something Went Wrong ..."),new Error($)}}};return x.jsx(jh,{open:A,onClose:P,maxWidth:"xl",style:{zIndex:100},fullWidth:!0,children:x.jsx(z1,{children:x.jsxs(pe,{className:"d-flex justify-content-between align-items-start gap-4",children:[x.jsx(pe,{className:"d-flex flex-column",children:x.jsx("img",{src:`https://docs.exampaper.vidh.ai/${t}`,height:"100%",width:"100%"})}),x.jsxs(pe,{className:"py-3 d-flex flex-column justify-content-end w-100 gap-3",children:[x.jsx(uo,{value:w,setValue:T,placeholder:"QR code"}),x.jsx(uo,{value:y,setValue:b,placeholder:"BarCode"}),x.jsx(uo,{value:E,setValue:I,placeholder:"Subject code"}),s=="PartC"?x.jsx(uo,{value:c,setValue:d,placeholder:"Marks"}):s=="PartA"?x.jsx(uo,{value:p,setValue:m,placeholder:"Register no"}):null,s=="PartC"?x.jsx(it,{className:"bg-primary text-white p-3",onClick:()=>R(),children:"Update"}):s=="PartA"?x.jsx(it,{className:"bg-primary text-white p-3",onClick:()=>M(),children:"Update"}):null,x.jsx(it,{className:"bg-primary text-white p-3",onClick:()=>o(!1),children:"Close"})]})]})})})},rhe=async e=>{try{if(console.log("data=",e),rotateAngle===0)return;const t={data:e};setIsLoading(!0);const n=await fetch("https://api.exampaper.vidh.ai/markAsPartc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});setIsLoading(!1),(await n.json()).status==="success"&&sn.success("record updated")}catch(t){throw setIsLoading(!1),new Error(t)}},ohe=({data:e,s3_image_column:t,query:n,error:r,error_reason:o,reduxSystemNo:i,degreeType:s,type:c,tableName:d})=>{pr();const[p,m]=f.useState({}),[y,b]=f.useState(!1),[_,S]=f.useState([]),[w,T]=f.useState([]),[E,I]=f.useState(0),[A,O]=f.useState(null),[P,R]=f.useState(null),M=f.useRef(),[$,F]=f.useState(!1);f.useState(null),console.log("data =================== ",e),f.useEffect(()=>{e&&(console.log("Image name ====== ",e==null?void 0:e.image_name),O(e==null?void 0:e.image_name)),d&&R(d),e!=null&&e.subject_code},[e]);const k=async()=>{console.log("update instrunction");const q={data:e};try{b(!0);const K=await fetch("https://api.exampaper.vidh.ai/updatePartAInstructions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});b(!1);const J=await K.json();if(J.status==="success"){console.log("Updation successfull ....");const ee={...p,is_backpage:1};m(ee)}else throw new Error(J==null?void 0:J.message)}catch(K){throw new Error(K)}},B=async()=>{console.log("update front");const q={data:e};try{b(!0);const K=await fetch("https://api.exampaper.vidh.ai/partAFrontSideMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});b(!1);const J=await K.json();if(J.status==="success"){console.log("Updation successfull ....");const ee={...p,is_backpage:1};m(ee)}else throw new Error(J==null?void 0:J.message)}catch(K){throw new Error(K)}},V=async()=>{console.log("update front");const q={data:e};try{b(!0);const K=await fetch("https://api.exampaper.vidh.ai/partcEvFrontSideMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});b(!1);const J=await K.json();if(J.status==="success"){console.log("Updation successfull ....");const ee={...p,is_backpage:1};m(ee)}else throw new Error(J==null?void 0:J.message)}catch(K){throw new Error(K)}},W=async()=>{const q={data:e};try{b(!0);const K=await fetch("https://api.exampaper.vidh.ai/partcEvBacksideMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});b(!1);const J=await K.json();if(J.status==="success"){console.log("Updation successfull ....");const ee={...p,is_backpage:1};m(ee),toast.success("Record Marked as Backpage ! ....")}else throw new Error(J==null?void 0:J.message)}catch(K){throw new Error(K)}},L=()=>{console.log("rotate left .....");const q=E-90;I(J=>J-90),console.log("new angle ....",q);const K=`rotate(${q}deg)`;M.current.style.transform=K},U=()=>{console.log("rotate right");const q=E+90;I(J=>J+90);const K=`rotate(${q}deg)`;M.current.style.transform=K},H=async()=>{const q={data:e};try{b(!0);const K=await fetch("https://api.exampaper.vidh.ai/partcEvCoverMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});b(!1);const J=await K.json();if(J.status==="success"){const ee={...p,is_cover:1};m(ee),console.log("Updation successfull ....")}else throw new Error(J==null?void 0:J.message)}catch(K){throw new Error(K)}},z=async()=>{const q={data:e};try{b(!0);const K=await fetch("https://api.exampaper.vidh.ai/partcEvDummyMarking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});b(!1);const J=await K.json();if(J.status==="success"){const ee={...p,is_cover:1};m(ee),console.log("Updation successfull ...."),toast.success("Record Marked As Ev !...")}else throw new Error(J==null?void 0:J.message)}catch(K){throw b(!1),new Error(K)}},j=()=>{F(!0),console.log("type === ",c)},Y={PartC:[{btnLabel:"Mark As Front",action:V},{btnLabel:"Mark As Back",action:W},{btnLabel:"Mark As Ev",action:H},{btnLabel:"Mark As Dummy",action:z},{btnLabel:"Edit",action:j}],PartA:[{btnLabel:"Mark As Front",action:B},{btnLabel:"Mark As Backpage",action:k},{btnLabel:"Mark As Dummy",action:z},{btnLabel:"Mark As Part-C",action:rhe},{btnLabel:"Edit",action:j}]};f.useEffect(()=>{m(e),S(Object.keys(e)),T(Object.values(e))},[e]),f.useEffect(()=>{console.log("Data value ===== ",p),S(Object.keys(p)),T(Object.values(p))},[p]);const X=async()=>{try{if(E===0)return;const q={imageName:A,tableNameData:P,rotateAngle:E,s3_path:e[t]};b(!0);const K=await fetch("https://api.exampaper.vidh.ai/saveRotatedImage",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)});b(!1),(await K.json()).status==="success"&&toast.success("Image Rotation Saved Successfully")}catch(q){throw b(!1),new Error(q)}};return x.jsxs(pe,{className:"w-100 rounded shadow mb-5 bg-white",children:[x.jsxs(pe,{className:"p-4 d-flex justify-content-between align-items-start",children:[x.jsxs(pe,{className:"p-1",children:[x.jsx(pe,{className:"p-2 d-flex justify-content-end gap-3 align-items-center"}),x.jsx(pe,{className:"border border-dark",id:A,children:x.jsx("img",{src:`https://docs.exampaper.vidh.ai/${e[t]}`,width:"800px",height:"auto",alt:"Image Alt",ref:M})})]}),x.jsxs(pe,{className:"d-flex flex-column gap-2 mx-2 py-3",style:{minWidth:"250px"},children:[c&&Y[c].map(q=>x.jsx(it,{className:"m-0 bg-primary text-white p-3 rounded",onClick:q==null?void 0:q.action,children:q==null?void 0:q.btnLabel})),x.jsxs(pe,{className:"d-flex flex-column justify-content-between gap-2 my-2",children:[x.jsxs(it,{className:"m-0 bg-primary text-white p-3 rounded",onClick:L,children:["Rotate left",x.jsx(La,{})]}),x.jsxs(it,{className:"m-0 bg-primary text-white p-3 rounded",onClick:U,children:["Rotate Right",x.jsx(Cse,{})]}),x.jsx(it,{className:"m-0 bg-primary text-white p-3 rounded",onClick:()=>X(),children:"Save"})]})]}),x.jsx(pe,{className:"text-left p-3 d-flex flex-column justify-content-between align-items-between h-100",children:_.map((q,K)=>x.jsxs("p",{children:[x.jsx("strong",{children:_[K]})," : ",w[K]]}))})]}),y&&x.jsx(Yr,{loadingText:"Loading ..."}),$&&x.jsx(nhe,{type:c,rotateAngle:E,data:e,s3Path:e[t],tableName:d,imageName:e.image_name,setShowEditContainer:F})]})},ihe=()=>{const{type:e}=u8();console.log("Backend URL:","https://api.exampaper.vidh.ai"),console.log("Type ============= ",e);const[t,n]=f.useState(null),r={PartA:"ocr_scanned_part_a_v1",PartC:"ocr_scanned_part_c_v1",Attendence:"attendence_scanned_data"};f.useEffect(()=>{console.log("use effect type ==== ",e),console.log("use effect table name ===== ",t),console.log("table name ==== ",r[e]),t||n(r[e])},[e,t]);const[o,i]=f.useState([]),[s,c]=f.useState([]),[d,p]=f.useState(1),[m,y]=f.useState(0),[b,_]=f.useState(null),[S,w]=f.useState(""),[T,E]=f.useState(!1),[I,A]=f.useState(null),[O,P]=f.useState(""),R=50;pr();const M=Vo(),$=Qn(U=>U==null?void 0:U.playGroundQuery),F=Qn(U=>U==null?void 0:U.playGroundCurrentPage),k=Qn(U=>U==null?void 0:U.playGroundtotalPages),B=Qn(U=>U==null?void 0:U.playGroundResults);console.log("Redux playground query : ",$),console.log("Redux playground page no : ",F),console.log("Redux playground total pages : ",k),console.log("Redux playground resutls : ",B),Io.useToken(),f.useEffect(()=>{$&&!S&&w($)},[$]),f.useEffect(()=>{F!=0&&m==0&&y(k)},[k]),f.useEffect(()=>{console.log("1234 ---- useEffect"),s.length==0&&B&&(console.log("Redux playground results if ..."),console.log("reduxPlaygroundResults.type === type ",B.type===e),B.type===e&&(console.log("Into if ..."),c(B==null?void 0:B.data),_("s3_path")))},[B]),f.useEffect(()=>{d==0&&F!==0&&(console.log("Updating in use effect ============================= >"),p(F))},[F]);const V=async()=>{if(S.includes("limit")){alert("Please specify the limit in the input field.");return}if(S.includes(";")){alert("Please remove the special character from the query ';'");return}if(!O){alert("Limit cannot be empty !!");return}if(!S.includes("image_name")&&!S.includes("*")&&S.includes("ocr_scanned_part_c_v1")){alert("Selecting primary Key (image_name) or Selecting all (*) is mandatory");return}if(!S.includes(t)){alert(`This playground is only for : ${t}`);return}E(!0);const U={query:S,limit:O};try{const j=await(await fetch("https://api.exampaper.vidh.ai/fetchQueryValue",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U)})).json();if(E(!1),j.status==="success"){c(j.results);var H={};H.type=e,H.data=j==null?void 0:j.results,M(S8(H));const Y=Math.ceil((j==null?void 0:j.results.length)/R);y(Y),M($m(m)),p(1),i(j.results.slice(0,R))}else sn.error(j.message)}catch(z){console.error("Error:",z)}};f.useEffect(()=>{M(b8(S))},[S]),f.useEffect(()=>{s.length>0&&(i([]),console.log(" ===========================>>>>>>>>>>>>>>>>>>>>>>>> "),E(!0),setTimeout(()=>{const U=(d-1)*R,H=U+R;i(s.slice(U,H)),E(!1)},1e3)),M(C8(d)),W()},[d,s]);const W=()=>{const U=[];for(let H=1;H<=m;H++)U.push(x.jsxs("span",{children:[H>1&&" | ",x.jsx("a",{href:"#!",onClick:()=>p(H),className:H===d?"active":"",children:H})]},H));A(U)};f.useEffect(()=>{W(),M($m(m))},[d,m]);const L=()=>o.length===0?null:(Object.keys(s[0]),x.jsxs("div",{className:"w-100",children:[x.jsxs("div",{className:"text-left d-flex justify-content-between align-items-center",children:[x.jsxs("h5",{children:[x.jsx("strong",{children:"Total Results "})," : ",s.length]}),s.length>0&&x.jsx("div",{id:"footer-container",children:x.jsxs("div",{id:"footer-main",className:"d-flex justify-content-center p-3 align-items-center",children:[x.jsx("div",{className:"d-flex justify-content-center align-items-center p-1",children:x.jsxs(pe,{className:"d-flex flex-column align-items-end",children:[x.jsx(pe,{children:I}),x.jsxs(pe,{children:[x.jsx("strong",{children:d}),"/",x.jsx("strong",{children:m})]})]})}),x.jsx("div",{className:"d-flex gap-3"})]})})]}),x.jsx("div",{className:"my-2 overflow-auto",children:o.map(U=>x.jsx(ohe,{type:e,tableName:t,data:U,s3_image_column:b,query:S}))})]}));return x.jsxs(Gh,{children:[x.jsxs("div",{className:"mx-3",children:[x.jsxs("div",{className:"my-3 d-flex flex-md-row flex-column",children:[x.jsx("div",{className:"w-100 w-md-75",children:x.jsx(i5,{query:S,setQuery:w})}),x.jsx("div",{className:"d-none d-md-block w-25",children:x.jsxs("div",{className:"w-100 d-flex flex-column gap-2 mx-2",children:[x.jsx(uo,{placeholder:"limit",value:O,setValue:P}),x.jsx(uo,{placeholder:"imageColumn",value:b,setValue:_}),x.jsx("button",{className:"btn bg-primary text-light",id:"submit-btn",onClick:V,children:"Submit"})]})}),x.jsx("div",{className:"d-block d-md-none w-100",children:x.jsxs("div",{className:"w-100 d-flex flex-column gap-2",children:[x.jsx(vo,{className:"rounded h6 bg-white",type:"text",placeholder:"Limit",id:"limit-input",autoComplete:"off",value:O,onChange:U=>P(U.target.value)}),x.jsx(vo,{className:"input rounded h6 bg-white",type:"text",placeholder:"Image column name",id:"image-column-input",autoComplete:"off",value:b,onChange:U=>_(U.target.value)}),x.jsx("button",{className:"btn bg-primary text-light",id:"submit-btn",onClick:V,children:"Submit"})]})})]}),x.jsx("div",{id:"results-container",className:"d-flex w-100 justify-content-center",children:L()})]}),T&&x.jsx(Yr,{})]})};function ahe(){return x.jsx(x.Fragment,{children:x.jsx(Iie,{children:x.jsxs(vie,{children:[x.jsx(ur,{path:"/",element:x.jsx(Wae,{})}),x.jsx(ur,{path:"/sqlPlayground",element:x.jsx(xfe,{})}),x.jsx(ur,{path:"/sqlPlayground/edit",element:x.jsx(Cfe,{})}),x.jsx(ur,{path:"/evQrcode/edit",element:x.jsx(Jfe,{})}),x.jsx(ur,{path:"/studentsDetails",element:x.jsx(ehe,{})}),x.jsx(ur,{path:"/Playgrounds",element:x.jsx(the,{})}),x.jsx(ur,{path:"/Playground/:type",element:x.jsx(ihe,{})}),x.jsx(ur,{path:"/anomoly/attendence/reassigned",element:x.jsx(Vae,{})}),x.jsx(ur,{path:"/sqlPlayground/Editor",element:x.jsx(bfe,{})}),x.jsx(ur,{path:"/anomoly/attendence/additionalSheet",element:x.jsx(ffe,{})}),x.jsx(ur,{path:"/barcodeScanner",element:x.jsx(Xfe,{})}),x.jsx(ur,{path:"/anomoly/reassigned/booklet",element:x.jsx(Iae,{})}),x.jsx(ur,{path:"/anomoly/reassigned/stats",element:x.jsx(Qae,{})}),x.jsx(ur,{path:"/anomoly/attendence",element:x.jsx(Dse,{})}),x.jsx(ur,{path:"/anomoly/attendence/additionalRecord",element:x.jsx(Hse,{})}),x.jsx(ur,{path:"/anomoly/attendence/additionalRecord/correction",element:x.jsx(Xse,{})}),x.jsx(ur,{path:"/anomoly/reassigned/stats/:exam_centre_code",element:x.jsx(ose,{})}),x.jsx(ur,{path:"/anomoly/PartA",element:x.jsx(dse,{})}),x.jsx(ur,{path:"/statistics",element:x.jsx($se,{})}),x.jsx(ur,{path:"/anomoly/partA/booklet",element:x.jsx(bse,{})}),x.jsx(ur,{path:"/anomoly/partC",element:x.jsx(Efe,{})}),x.jsx(ur,{path:"/evQrcode",element:x.jsx(Zfe,{})})]})})})}function Yi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var she=typeof Symbol=="function"&&Symbol.observable||"@@observable",l3=she,Vy=()=>Math.random().toString(36).substring(7).split("").join("."),lhe={INIT:`@@redux/INIT${Vy()}`,REPLACE:`@@redux/REPLACE${Vy()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Vy()}`},c3=lhe;function che(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function uhe(e,t,n){if(typeof e!="function")throw new Error(Yi(2));let r=e,o=t,i=new Map,s=i,c=0,d=!1;function p(){s===i&&(s=new Map,i.forEach((T,E)=>{s.set(E,T)}))}function m(){if(d)throw new Error(Yi(3));return o}function y(T){if(typeof T!="function")throw new Error(Yi(4));if(d)throw new Error(Yi(5));let E=!0;p();const I=c++;return s.set(I,T),function(){if(E){if(d)throw new Error(Yi(6));E=!1,p(),s.delete(I),i=null}}}function b(T){if(!che(T))throw new Error(Yi(7));if(typeof T.type>"u")throw new Error(Yi(8));if(typeof T.type!="string")throw new Error(Yi(17));if(d)throw new Error(Yi(9));try{d=!0,o=r(o,T)}finally{d=!1}return(i=s).forEach(I=>{I()}),T}function _(T){if(typeof T!="function")throw new Error(Yi(10));r=T,b({type:c3.REPLACE})}function S(){const T=y;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Yi(11));function I(){const O=E;O.next&&O.next(m())}return I(),{unsubscribe:T(I)}},[l3](){return this}}}return b({type:c3.INIT}),{dispatch:b,subscribe:y,getState:m,replaceReducer:_,[l3]:S}}const dhe={attendenceAnomolyData:[],partABatchAnomolyData:[],systemNumber:null,playGroundQuery:null,playGroundResults:[],playGroundtotalPages:0,playGroundCurrentPage:0,partCAnomolyList:[],partCErrorList:[],partCErrorData:[],selectedError:null,selectedErrorData:[],selectedErrorJson:{},partCDegreeType:null,evQrcodeList:[]},fhe=(e=dhe,t)=>{switch(t.type){case"UPDATE_ATTENDENCE_ANOMOLY_DATA":return{...e,attendenceAnomolyData:t==null?void 0:t.payload};case"UPDATE_PART-A_ANOMOLY_DATA":return{...e,partABatchAnomolyData:t==null?void 0:t.payload};case"UPDATE_SYSTEM_NO":return{...e,systemNumber:t==null?void 0:t.payload};case"UPDATE_PLAYGROUND_QUERY":return{...e,playGroundQuery:t==null?void 0:t.payload};case"UPDATE_PLAYGROUND_RESULTS":return{...e,playGroundResults:t==null?void 0:t.payload};case"UPDATE_PLAYGROUND_PAGENO":return{...e,playGroundtotalPages:t==null?void 0:t.payload};case"UPDATE_PLAYGROUND_TOTAL_PAGES":return{...e,playGroundCurrentPage:t==null?void 0:t.payload};case"UPDATE_PARTC_ERROR_LIST":return{...e,partCErrorList:t==null?void 0:t.payload};case"UPDATE_PARTC_ERROR_DATA":return{...e,partCErrorData:t==null?void 0:t.payload};case"UPDATE_SELECTED_ERROR":return{...e,selectedError:t==null?void 0:t.payload};case"UPDATE_SELECTED_ERROR_DATA":return{...e,selectedErrorData:t==null?void 0:t.payload};case"UPDATE_SELECTED_ERROR_JSON":return{...e,selectedErrorJson:t==null?void 0:t.payload};case"UPDATE_PART_C_DEGREE_TYPE":return{...e,partCDegreeType:t==null?void 0:t.payload};case"UPDATE_EV_QRCODE_LIST":return{...e,evQrcodeList:t==null?void 0:t.payload};default:return e}},hhe=uhe(fhe);Wy.createRoot(document.getElementById("root")).render(x.jsx(He.StrictMode,{children:x.jsx(lae,{store:hhe,children:x.jsx(ahe,{})})}));