PageSourceSearch

https://axc-rfp-paltfrom.vercel.app/_next/static/chunks/99645-846e3d48b0876db2.js

js axc-rfp-paltfrom.vercel.app collected 2026-10-03 06:11:20 UTC 8,270 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99645],{99645:(e,t,l)=>{l.r(t),l.d(t,{default:()=>h});var i=l(95155),o=l(12115),n=l(4373);let r={NONE:{label:"No Proof",color:"#64748b",icon:""},COMMITTED:{label:"Committed",color:"#f59e0b",icon:""},PROOF_AVAILABLE:{label:"Proof Ready",color:"#3b82f6",icon:""},VERIFIED:{label:"Verified",color:"#10b981",icon:"✓"},FAILED:{label:"Failed",color:"#ef4444",icon:"✗"}};function s(e){var t;let{status:l,txId:o}=e,n=null!=(t=r[null!=l?l:"NONE"])?t:r.NONE;return(0,i.jsxs)("span",{title:o?"Midnight: ".concat(o):n.label,style:{fontSize:9,padding:"1px 6px",borderRadius:6,fontWeight:600,background:"".concat(n.color,"18"),color:n.color,cursor:o?"help":"default",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",gap:2},children:[n.icon&&(0,i.jsx)("span",{children:n.icon}),n.label]})}let d={AUTO_POPULATED:{label:"Auto",color:"#10b981"},SITE_ENTERED:{label:"Site",color:"#3b82f6"},PATIENT_REPORTED:{label:"Patient",color:"#8b5cf6"},DEVICE_CAPTURED:{label:"Device",color:"#fb923c"}};function c(e){var t;let{sourceType:l}=e,o=null!=(t=d[null!=l?l:""])?t:{label:null!=l?l:"—",color:"#64748b"};return(0,i.jsx)("span",{style:{fontSize:9,padding:"1px 6px",borderRadius:6,fontWeight:600,background:"".concat(o.color,"18"),color:o.color,whiteSpace:"nowrap"},children:o.label})}let a={card:{...n.f.card,background:n.C.card,border:"1px solid ".concat(n.C.border),marginBottom:16},btn:{...n.f.btn,border:"none",cursor:"pointer"},th:{...n.f.th,textAlign:"left",color:n.C.muted,borderBottom:"1px solid ".concat(n.C.border)},td:{...n.f.td,color:n.C.text,borderBottom:"1px solid ".concat((0,n.u)(n.C.border,8))}};function u(e,t){var l,i,o;let n=null;try{let e=JSON.parse(null!=(l=localStorage.getItem("user"))?l:"");n=null!=(i=null==e?void 0:e.sessionToken)?i:null}catch(e){}return fetch(e,{...t,headers:{"Content-Type":"application/json",...n?{"x-session":n}:{},...null!=(o=null==t?void 0:t.headers)?o:{}}})}function h(e){var t,l;let{studyId:r}=e,[d,h]=(0,o.useState)([]),[f,p]=(0,o.useState)(null),[x,b]=(0,o.useState)(null),[y,m]=(0,o.useState)(null),[g,j]=(0,o.useState)(!0),[C,v]=(0,o.useState)(!1),[S,E]=(0,o.useState)("");(0,o.useEffect)(()=>{u("/api/studies/".concat(r,"/enrollments")).then(e=>e.json()).then(e=>{var t;h((null!=(t=e.enrollments)?t:[]).filter(e=>e.subjectId)),j(!1)}).catch(()=>j(!1))},[r]);let T=async(e,t)=>{p(e),b(t);let l=await u("/api/studies/".concat(r,"/sdv/").concat(e,"/").concat(t));m(await l.json())},I=async()=>{if(!f||!x)return;v(!0);let e=await u("/api/studies/".concat(r,"/sdv/").concat(f,"/").concat(x),{method:"POST",body:JSON.stringify({action:"verify-all"})}),t=await e.json();t.summary&&(E("Verification complete: ".concat(t.summary.verified," verified, ").concat(t.summary.failed," discrepancies")),setTimeout(()=>E(""),3e3),T(f,x)),v(!1)};return g?(0,i.jsx)("div",{style:{...a.card,textAlign:"center",color:n.C.muted},children:"Loading SDV Dashboard..."}):(0,i.jsxs)("div",{children:[S&&(0,i.jsx)("div",{style:{position:"fixed",top:16,right:16,background:n.C.card,border:"1px solid ".concat(n.C.green),borderRadius:8,padding:"8px 16px",color:n.C.text,fontSize:12,zIndex:9999},children:S}),(0,i.jsxs)("div",{style:a.card,children:[(0,i.jsx)("div",{style:{fontSize:16,fontWeight:700,color:n.C.text,marginBottom:12},children:"Source Data Verification"}),(0,i.jsx)("div",{style:{fontSize:11,color:n.C.amber,background:"".concat(n.C.amber,"10"),padding:"8px 12px",borderRadius:6,marginBottom:12},children:"De-identified view. Patient identity is not visible. Verification is performed through zero-knowledge proofs."}),0===d.length?(0,i.jsx)("div",{style:{color:n.C.muted,fontSize:12},children:"No enrolled subjects with Subject IDs found."}):(0,i.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:d.map(e=>(0,i.jsx)("button",{onClick:()=>{var t,l;let i=null!=(l=null==(t=(Array.isArray(e.visitSchedule)?e.visitSchedule:[])[0])?void 0:t.visitCode)?l:"SCREEN";T(e.subjectId,i)},style:{...a.btn,background:f===e.subjectId?"".concat(n.C.indigo,"30"):"".concat(n.C.border),color:f===e.subjectId?n.C.indigo:n.C.text,border:"1px solid ".concat(f===e.subjectId?n.C.indigo:n.C.border)},children:e.subjectId},e.subjectId))})]}),y&&(0,i.jsxs)("div",{style:a.card,children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{style:{fontSize:14,fontWeight:700,color:n.C.text}
1,children:["Subject ",y.subjectId," — Visit ",y.visitCode]}),(0,i.jsxs)("div",{style:{fontSize:11,color:n.C.muted},children:[y.summary.verified," verified / ",y.summary.mismatches," discrepancies / ",y.summary.pending," pending"]})]}),(0,i.jsx)("button",{onClick:I,disabled:C,style:{...a.btn,background:n.C.indigo,color:"#fff"},children:C?"Verifying...":"Verify All (ZK Proof)"})]}),(0,i.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:8,marginBottom:16},children:[{label:"Total Fields",value:y.summary.total,color:n.C.text},{label:"Verified",value:y.summary.verified,color:n.C.green},{label:"Discrepancies",value:y.summary.mismatches,color:"#ef4444"},{label:"Locked",value:y.summary.locked,color:n.C.cyan}].map(e=>(0,i.jsxs)("div",{style:{background:n.C.inputBg,borderRadius:8,padding:12,textAlign:"center"},children:[(0,i.jsx)("div",{style:{fontSize:20,fontWeight:700,color:e.color},children:e.value}),(0,i.jsx)("div",{style:{fontSize:10,color:n.C.muted},children:e.label})]},e.label))}),(0,i.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{style:a.th,children:"Field"}),(0,i.jsx)("th",{style:a.th,children:"Value"}),(0,i.jsx)("th",{style:a.th,children:"Source"}),(0,i.jsx)("th",{style:a.th,children:"Verification"}),(0,i.jsx)("th",{style:a.th,children:"Proof"}),(0,i.jsx)("th",{style:a.th,children:"Status"})]})}),(0,i.jsx)("tbody",{children:(null!=(l=y.entries)?l:[]).map(e=>{var t;return(0,i.jsxs)("tr",{children:[(0,i.jsxs)("td",{style:a.td,children:[(0,i.jsx)("div",{style:{fontWeight:600},children:e.fieldLabel}),(0,i.jsx)("div",{style:{fontSize:9,color:n.C.muted},children:e.fieldId})]}),(0,i.jsxs)("td",{style:a.td,children:[null!=(t=e.value)?t:(0,i.jsx)("span",{style:{color:n.C.muted},children:"—"})," ",e.unit&&(0,i.jsx)("span",{style:{color:n.C.muted,fontSize:10},children:e.unit})]}),(0,i.jsx)("td",{style:a.td,children:(0,i.jsx)(c,{sourceType:e.sourceType})}),(0,i.jsx)("td",{style:a.td,children:(0,i.jsx)("span",{style:{fontSize:9,padding:"1px 6px",borderRadius:6,fontWeight:700,background:"MATCH"===e.matchStatus?"".concat(n.C.green,"18"):"MISMATCH"===e.matchStatus?"#ef444418":"".concat(n.C.amber,"18"),color:"MATCH"===e.matchStatus?n.C.green:"MISMATCH"===e.matchStatus?"#ef4444":n.C.amber},children:"MATCH"===e.matchStatus?"Source Verified":"MISMATCH"===e.matchStatus?"Discrepancy":"Pending"})}),(0,i.jsx)("td",{style:a.td,children:(0,i.jsx)(s,{status:e.proofStatus,txId:e.midnightTxId})}),(0,i.jsx)("td",{style:a.td,children:(0,i.jsx)("span",{style:{fontSize:9,padding:"1px 6px",borderRadius:6,fontWeight:600,background:"LOCKED"===e.status?"".concat(n.C.green,"18"):(0,n.u)(n.C.muted,9),color:"LOCKED"===e.status?n.C.green:n.C.muted},children:e.status})})]},e.id)})})]}),(null==(t=y.queries)?void 0:t.length)>0&&(0,i.jsxs)("div",{style:{marginTop:16},children:[(0,i.jsxs)("div",{style:{fontSize:13,fontWeight:700,color:n.C.text,marginBottom:8},children:["Data Queries (",y.queries.length,")"]}),y.queries.map(e=>(0,i.jsxs)("div",{style:{background:n.C.inputBg,borderRadius:6,padding:10,marginBottom:6,borderLeft:"3px solid ".concat("OPEN"===e.status?"#ef4444":"RESPONDED"===e.status?n.C.amber:n.C.green)},children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11},children:[(0,i.jsxs)("span",{style:{fontWeight:600,color:n.C.text},children:[e.fieldId," — ",e.queryType]}),(0,i.jsx)("span",{style:{color:"OPEN"===e.status?"#ef4444":n.C.green},children:e.status})]}),(0,i.jsx)("div",{style:{fontSize:11,color:n.C.muted,marginTop:4},children:e.question}),e.response&&(0,i.jsxs)("div",{style:{fontSize:11,color:n.C.cyan,marginTop:4},children:["Response: ",e.response]})]},e.id))]})]})]})}}}]);

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.