1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5111],{83298:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/processEmailBatch",function(){return r(66009)}])},66009:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return a}});var s=r(85893),n=r(67294);function a(){let[e,t]=(0,n.useState)([]),[r,a]=(0,n.useState)(""),[i,o]=(0,n.useState)(""),[c,d]=(0,n.useState)(!1),[l,p]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/listSenders");if(!e.ok)throw Error("Error fetching senders");let r=await e.json();t(r.senderKeys||[])}catch(e){console.error(e)}})()},[]);let h=async()=>{if(!r){alert("Please select a sender.");return}d(!0),o("Batch processing started...");try{let e=await fetch("/api/processEmailBatch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({senderName:r,isProd:l})});if(!e.ok)throw Error("Batch initialization failed");let t=await e.json();o(t.message)}catch(e){console.error(e),o("Error: ".concat(e.message))}finally{d(!1)}};return(0,s.jsxs)("div",{style:{padding:"20px",maxWidth:"800px",margin:"0 auto"},children:[(0,s.jsx)("h1",{children:"Process Email Batch"}),(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{htmlFor:"sender-select",children:"Select Sender: "}),(0,s.jsxs)("select",{id:"sender-select",value:r,onChange:e=>a(e.target.value),style:{padding:"8px",minWidth:"200px",borderRadius:"4px",border:"1px solid #ccc"},children:[(0,s.jsx)("option",{value:"",children:"--Select Sender--"}),e.map((e,t)=>(0,s.jsx)("option",{value:e,children:e},t))]})]}),(0,s.jsx)("div",{style:{marginBottom:"20px",display:"flex",alignItems:"center",gap:"10px"},children:(0,s.jsxs)("label",{children:[(0,s.jsx)("input",{type:"checkbox",checked:l,onChange:e=>p(e.target.checked)}),"Production Mode"]})}),(0,s.jsx)("button",{onClick:h,disabled:c||!r,style:{padding:"10px 20px",backgroundColor:c?"#6c757d":"#007bff",color:"white",border:"none",borderRadius:"4px",cursor:"pointer"},children:c?"Processing...":"Start Batch Process"}),(0,s.jsxs)("div",{style:{marginTop:"20px"},children:[(0,s.jsx)("h2",{children:"Batch Status:"}),(0,s.jsx)("pre",{style:{whiteSpace:"pre-wrap",padding:"15px",backgroundColor:"#f8f9fa",borderRadius:"4px",border:"1px solid #dee2e6"},children:i||"No status updates yet"})]})]})}}},function(e){e.O(0,[92888,49774,40179],function(){return e(e.s=83298)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.