Update verified React dashboard
Browse files
frontend/dist/assets/TeamWorkspace-BpO8YF2p.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{c as te,r,l as Ue,a as ze,b as Me,s as Pe,f as xe,d as T,R as e,e as Ne,n as Ce,g as Oe,h as Fe,w as ye,i as qe,j as Ie,k as je,m as We,o as He,p as Be,v as Ge,q as Ke,t as Qe,u as $e,x as Le,L as Ye,S as Ze,A as Je,y as Ae,z as Xe,B as Ve,C as Te,D as et}from"./index-DEvENDvs.js";/**
|
| 2 |
+
* @license lucide-react v0.468.0 - ISC
|
| 3 |
+
*
|
| 4 |
+
* This source code is licensed under the ISC license.
|
| 5 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const tt=te("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/**
|
| 7 |
+
* @license lucide-react v0.468.0 - ISC
|
| 8 |
+
*
|
| 9 |
+
* This source code is licensed under the ISC license.
|
| 10 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 11 |
+
*/const Re=te("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
| 12 |
+
* @license lucide-react v0.468.0 - ISC
|
| 13 |
+
*
|
| 14 |
+
* This source code is licensed under the ISC license.
|
| 15 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 16 |
+
*/const at=te("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
| 17 |
+
* @license lucide-react v0.468.0 - ISC
|
| 18 |
+
*
|
| 19 |
+
* This source code is licensed under the ISC license.
|
| 20 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 21 |
+
*/const rt=te("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
|
| 22 |
+
* @license lucide-react v0.468.0 - ISC
|
| 23 |
+
*
|
| 24 |
+
* This source code is licensed under the ISC license.
|
| 25 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 26 |
+
*/const nt=te("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
| 27 |
+
* @license lucide-react v0.468.0 - ISC
|
| 28 |
+
*
|
| 29 |
+
* This source code is licensed under the ISC license.
|
| 30 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 31 |
+
*/const st=te("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
| 32 |
+
* @license lucide-react v0.468.0 - ISC
|
| 33 |
+
*
|
| 34 |
+
* This source code is licensed under the ISC license.
|
| 35 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 36 |
+
*/const lt=te("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
| 37 |
+
* @license lucide-react v0.468.0 - ISC
|
| 38 |
+
*
|
| 39 |
+
* This source code is licensed under the ISC license.
|
| 40 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 41 |
+
*/const ct=te("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function it({user:f,inspection:p,notes:G=[],onEvidence:i}){const S=r.useRef(0),E=r.useRef(null),ae=r.useRef(null),[w,F]=r.useState("checking"),[g,P]=r.useState([]),[U,z]=r.useState([]),[de,M]=r.useState(""),[K,q]=r.useState([]),[ue,o]=r.useState([]),[Z,u]=r.useState(""),[I,N]=r.useState(!1),[k,j]=r.useState(""),[re,W]=r.useState(""),[me,Q]=r.useState(""),[ne,y]=r.useState("Normal"),[x,pe]=r.useState(""),[O,n]=r.useState(!1),[h,m]=r.useState(""),[C,b]=r.useState(""),[R,J]=r.useState(0),[$,fe]=r.useState(""),[ge,ke]=r.useState(""),[he,be]=r.useState(""),s=g.find(t=>t.id===de),se=Ue(G),Y=ze(g),we=Me(s,f.id,U.some(t=>t.user_id===f.id&&t.role==="developer"));async function Ee(){const t=++S.current,d=await T(),v=await d.rpc("defectrag_ca_staff");if(t!==S.current)return;if(v.error||v.data!==!0)throw F("denied"),P([]),z([]),M(""),q([]),o([]),new Error("Sign in with an approved Staff account and verify the security code before opening corrective actions.");const L=await Promise.all([d.from("corrective_actions").select("*").order("created_at",{ascending:!1}).limit(500),d.from("staff_members").select("user_id,display_name,role,revoked_at").is("revoked_at",null)]);if(t===S.current){if(L.some(le=>le.error))throw F("unavailable"),P([]),z([]),M(""),q([]),o([]),L.find(le=>le.error).error;F("authorized"),P(L[0].data||[]),z(L[1].data||[]),u(""),J(le=>le+1)}}r.useEffect(()=>{const t=Pe(Ee,{onState:d=>{d.error&&(F("unavailable"),u(d.error),P([]),z([]),M(""),q([]),o([]))}});return()=>{t.stop(),S.current++}},[f.id]),r.useEffect(()=>{const t=()=>{S.current++,F("checking"),P([]),z([]),M(""),q([]),o([]),Ee().catch(d=>u(d.message))};return window.addEventListener("defectrag-auth-change",t),()=>window.removeEventListener("defectrag-auth-change",t)},[f.id]),r.useEffect(()=>{n(!1),j("")},[p==null?void 0:p.id,se==null?void 0:se.id]),r.useEffect(()=>{w==="authorized"&&xe(ae.current)},[w,p==null?void 0:p.id]),r.useEffect(()=>{b(""),m((s==null?void 0:s.state)||""),fe((s==null?void 0:s.owner_id)||""),ke((s==null?void 0:s.supervisor_id)||""),be("")},[s==null?void 0:s.id,s==null?void 0:s.version]),r.useEffect(()=>{s&&xe(E.current)},[s==null?void 0:s.id]),r.useEffect(()=>{let t=!0;const d=S.current;if(q([]),o([]),!(!s||w!=="authorized"))return T().then(v=>Promise.all([v.from("corrective_action_history").select("*").eq("case_id",s.id).order("version"),v.from("corrective_action_events").select("id,case_id,version,kind,status,attempts,last_error,created_at").eq("case_id",s.id).order("created_at",{ascending:!1})])).then(v=>{if(!(!t||d!==S.current)){if(v.some(L=>L.error))throw v.find(L=>L.error).error;q(v[0].data||[]),o(v[1].data||[])}}).catch(v=>{t&&d===S.current&&u(v.message)}),()=>{t=!1}},[s==null?void 0:s.id,s==null?void 0:s.version,R,f.id,w]);async function B(t){if(!I){N(!0),u("");try{await t(),await Ee(),ye()}catch(d){u(d.message||"Corrective action request failed.")}finally{N(!1)}}}const H=t=>{var d;return((d=U.find(v=>v.user_id===t))==null?void 0:d.display_name)||"Former / unavailable staff"};return e.createElement("section",{className:"card",ref:ae,tabIndex:-1,"aria-label":"Corrective Actions workspace"},e.createElement("div",{className:"section-title"},e.createElement("div",null,e.createElement("h2",null,"Corrective Actions"),e.createElement("p",null,"Track work needed after a Staff review confirms a defect. Assign someone to fix it, set a due date, and keep a record of progress.")),e.createElement("button",{className:"secondary",disabled:I,onClick:()=>B(Ee)},"Refresh cases")),Z&&e.createElement("div",{className:"error",role:"alert"},Ne(Z)),w==="checking"&&e.createElement("p",{role:"status"},"Checking Staff access and the security code…"),w!=="checking"&&w!=="authorized"&&e.createElement("p",{className:"note"},"Open Staff workspace to check account approval and enter the security code. Then return here and try again."),w==="authorized"&&e.createElement(e.Fragment,null,e.createElement("p",{className:"caption"},"Showing up to 500 cases available to this account. Open: ",Y.open," · Resolved / closed: ",Y.resolved," · Overdue: ",Y.overdue," · Average resolution: ",Y.averageResolutionHours===null?"No resolved cases":Y.averageResolutionHours.toFixed(1)+" hours",". Email delivery is separate from whether the case has been saved."),p&&!p.archived_at&&e.createElement(e.Fragment,null,e.createElement("h3",null,"Create from inspection ",p.id.slice(0,8)),se?e.createElement("form",{className:"login-form",onSubmit:t=>{t.preventDefault(),B(async()=>{const d=await T(),v=await qe(d,"defectrag_create_corrective_action",{p_inspection:p.id,p_review:se.id,p_confirmed:O,p_owner:re,p_supervisor:me,p_priority:ne,p_description:k,p_due:new Date(x).toISOString()});M(v),j(""),n(!1)})}},e.createElement("label",{className:"field"},"What needs fixing?",e.createElement("textarea",{required:!0,minLength:10,maxLength:2e3,value:k,onChange:t=>j(t.target.value)})),e.createElement("label",{className:"field"},"Person responsible",e.createElement("select",{required:!0,value:re,onChange:t=>W(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),U.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),e.createElement("label",{className:"field"},"Supervisor",e.createElement("select",{required:!0,value:me,onChange:t=>Q(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),U.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),e.createElement("label",{className:"field"},"Priority",e.createElement("select",{value:ne,onChange:t=>y(t.target.value)},["Low","Normal","High","Critical"].map(t=>e.createElement("option",{key:t},t)))),e.createElement("label",{className:"field"},"Due date and time",e.createElement("input",{type:"datetime-local",required:!0,value:x,onChange:t=>pe(t.target.value)})),e.createElement("label",null,e.createElement("input",{type:"checkbox",checked:O,onChange:t=>n(t.target.checked)})," A Staff review has confirmed a defect that needs fixing. An unusual inspection result alone is not enough."),e.createElement("button",{className:"primary",disabled:I||!O},"Create corrective action")):e.createElement("p",{className:"note"},"First open the shared inspection, set the review to Reviewed and Reject, and save it. Then confirm that the defect needs fixing before creating a case.")),!p&&e.createElement("p",{className:"caption"},"To create a case, choose a Team inspection and save its Staff review first. Use Choose a Team inspection above."),e.createElement("div",{className:"table-wrap"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Case"),e.createElement("th",null,"Status"),e.createElement("th",null,"Owner"),e.createElement("th",null,"Priority"),e.createElement("th",null,"Due"),e.createElement("th",null))),e.createElement("tbody",null,g.map(t=>e.createElement("tr",{key:t.id},e.createElement("td",null,t.id.slice(0,8)),e.createElement("td",null,t.state,!["Resolved","Closed","Cancelled"].includes(t.state)&&Date.parse(t.due_at)<Date.now()?" · Overdue":""),e.createElement("td",null,H(t.owner_id)),e.createElement("td",null,t.priority),e.createElement("td",null,new Date(t.due_at).toLocaleString()),e.createElement("td",null,e.createElement("button",{className:"text-button",onClick:()=>M(t.id)},"Details")))))),!g.length&&e.createElement("p",{className:"caption"},"No cases are available to this account yet.")),s&&e.createElement("div",{className:"cloud-message",ref:E,tabIndex:-1,"aria-label":"Corrective action case details"},e.createElement("div",{className:"section-title"},e.createElement("h3",null,"Case ",s.id.slice(0,8)," · ",s.state),e.createElement("button",{className:"text-button",onClick:()=>M("")},"Close details")),e.createElement("p",null,s.description),e.createElement("p",null,"Supervisor: ",H(s.supervisor_id)," · Confirmed by: ",H(s.confirmed_by)),e.createElement("button",{className:"secondary",onClick:()=>i(s.inspection_id)},"Open the linked photo and review"),Ce(s.state).length>0&&!we&&e.createElement("p",{className:"note"},"Only the person responsible, the supervisor or a Developer can change this case after verifying their security code. Other Staff can read it."),Ce(s.state).length>0&&we&&e.createElement("form",{className:"login-form",onSubmit:t=>{t.preventDefault(),B(async()=>{const d=await T();await qe(d,"defectrag_update_corrective_action",{p_id:s.id,p_version:s.version,p_state:h,p_note:C,p_owner:$,p_supervisor:ge,p_due:he?new Date(he).toISOString():null}),b("")})}},e.createElement("label",{className:"field"},"Case status",e.createElement("select",{value:h,onChange:t=>m(t.target.value)},Ce(s.state).map(t=>e.createElement("option",{key:t},t)))),e.createElement("label",{className:"field"},"Owner",e.createElement("select",{required:!0,value:$,onChange:t=>fe(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),U.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),e.createElement("label",{className:"field"},"Supervisor",e.createElement("select",{required:!0,value:ge,onChange:t=>ke(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),U.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),e.createElement("label",{className:"field"},"Change due date and time (optional)",e.createElement("input",{type:"datetime-local",value:he,onChange:t=>be(t.target.value)})),e.createElement("label",{className:"field"},"What changed or was fixed?",e.createElement("textarea",{required:!0,minLength:3,maxLength:2e3,value:C,onChange:t=>b(t.target.value)})),e.createElement("button",{className:"primary",disabled:I||!h},"Save case update")),e.createElement("h3",null,"Status history"),K.map(t=>e.createElement("p",{key:t.id},e.createElement("strong",null,t.state)," · ",H(t.actor_id)," · ",new Date(t.created_at).toLocaleString(),e.createElement("br",null),t.note,t.snapshot&&e.createElement("small",null,e.createElement("br",null),"Owner: ",H(t.snapshot.owner_id)," · Supervisor: ",H(t.snapshot.supervisor_id)," · Due: ",new Date(t.snapshot.due_at).toLocaleString()))),e.createElement("h3",null,"Email delivery"),e.createElement("p",{className:"caption"},"Waiting emails have not been sent. If delivery fails or is uncertain, contact the workspace administrator. The case stays saved even when the email service is unavailable."),ue.map(t=>e.createElement("p",{key:t.id},Oe(t.kind)," · ",Fe(t.status)," · attempts ",t.attempts,t.last_error?" · "+Ne(t.last_error):"")))))}function ot({client:f,user:p,onChange:G}){var O;const[i,S]=r.useState(null),[E,ae]=r.useState([]),[w,F]=r.useState([]),[g,P]=r.useState(null),[U,z]=r.useState(""),[de,M]=r.useState(""),[K,q]=r.useState(""),[ue,o]=r.useState(""),[Z,u]=r.useState(""),[I,N]=r.useState(""),[k,j]=r.useState(!1),[re,W]=r.useState([]),[me,Q]=r.useState([]),ne=((O=window.DEFECTRAG_PUBLIC_CONFIG)==null?void 0:O.registrationEnabled)===!0;async function y(){if(!p){S(null),W([]),Q([]);return}const n=await Ie(f);S(n);const{data:h,error:m}=await f.auth.mfa.listFactors();if(m)throw m;const C=(h.totp||[]).filter(b=>b.status==="verified");if(ae(C),F((h.all||[]).filter(b=>b.factor_type==="totp"&&b.status==="unverified")),M(b=>{var R;return C.some(J=>J.id===b)?b:((R=C[0])==null?void 0:R.id)||""}),n.role==="developer"&&n.approved&&n.aal2){const[b,R]=await Promise.all([f.rpc("defectrag_access_directory"),f.rpc("defectrag_notification_status")]);if(b.error)throw b.error;if(R.error)throw R.error;W(b.data||[]),Q(R.data||[])}else W([]),Q([])}async function x(n){j(!0),N("");try{await n()}catch(h){N(h.message||"Security request failed.")}finally{j(!1)}}r.useEffect(()=>{let n=!0;return P(null),z(""),W([]),Q([]),f&&p?y().catch(h=>{n&&N(h.message)}):S(null),()=>{n=!1}},[f,p==null?void 0:p.id]);async function pe(){await Ge(f,(g==null?void 0:g.id)||de,U),z(""),P(null),await y(),G(),N("Security code verified. Staff access is available only after the account is approved.")}return e.createElement("div",{className:"section-gap"},e.createElement("h3",null,"Sign-in and account security"),I&&e.createElement("p",{className:"note",role:"status"},Ne(I)),p?e.createElement(e.Fragment,null,e.createElement("p",null,"Access: ",e.createElement("strong",null,i!=null&&i.revoked?"revoked":i!=null&&i.approved?"approved":(i==null?void 0:i.request_status)||"not requested")," · Authenticator: ",e.createElement("strong",null,i!=null&&i.aal2?"security code verified":"enter security code")),e.createElement("button",{className:"secondary",disabled:k,onClick:()=>x(y)},"Refresh account status"),i&&!i.approved&&!i.revoked&&!i.request_status&&e.createElement("form",{className:"login-form",onSubmit:n=>{n.preventDefault(),x(async()=>{await We(f,K),await y(),N("Request sent. Check back here for Developer approval. Team and private Staff work are not available while the request is waiting."),G()})}},e.createElement("label",{className:"field"},"Display name",e.createElement("input",{value:K,maxLength:80,onChange:n=>q(n.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:k||!i.registration_enabled||!i.email_verified},"Request staff access")),e.createElement("p",{className:"caption"},"Use an authenticator app for the extra six-digit sign-in code. Keep access to that app. If it is lost, contact the workspace administrator; resetting the password does not remove this security check."),!g&&!E.length&&!w.length&&e.createElement("button",{className:"secondary",disabled:k,onClick:()=>x(async()=>P(await He(f)))},"Set up a security code app"),!g&&w.map(n=>e.createElement("p",{key:n.id,className:"caption"},"Authenticator setup was not finished. ",e.createElement("button",{className:"text-button",disabled:k,onClick:()=>x(async()=>{const{error:h}=await f.auth.mfa.unenroll({factorId:n.id});if(h)throw h;await y()})},"Cancel incomplete setup"))),g&&e.createElement("div",{className:"note"},e.createElement("div",null,e.createElement("p",null,"Open an authenticator app, scan this private QR code, then enter the six-digit code below to finish. Do not share the QR code or security codes."),e.createElement("img",{src:g.totp.qr_code,width:"200",height:"200",alt:"Private authenticator enrollment QR code"}),e.createElement("button",{className:"text-button",disabled:k,onClick:()=>x(async()=>{const{error:n}=await f.auth.mfa.unenroll({factorId:g.id});if(n)throw n;P(null),z("")})},"Cancel incomplete setup"))),(g||E.length>0)&&e.createElement("form",{className:"login-form",onSubmit:n=>{n.preventDefault(),x(pe)}},!g&&e.createElement("label",{className:"field"},"Security code app",e.createElement("select",{value:de,onChange:n=>M(n.target.value)},E.map(n=>e.createElement("option",{key:n.id,value:n.id},n.friendly_name||"Authenticator")))),e.createElement("label",{className:"field"},"Six-digit security code",e.createElement("input",{inputMode:"numeric",autoComplete:"one-time-code",pattern:"[0-9]{6}",maxLength:6,value:U,onChange:n=>z(n.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:k},"Verify security code")),(i==null?void 0:i.role)==="developer"&&i.approved&&i.aal2&&e.createElement(e.Fragment,null,e.createElement("h3",{className:"section-gap"},"Staff access management"),e.createElement("p",null,"Approve or reject requests that are still waiting. Removing access stops new Staff actions but keeps inspection history."),e.createElement("div",{className:"table-wrap"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Account"),e.createElement("th",null,"Status"),e.createElement("th",null,"Role"),e.createElement("th",null,"Action"))),e.createElement("tbody",null,re.map(n=>e.createElement("tr",{key:n.user_id},e.createElement("td",null,n.display_name,e.createElement("br",null),e.createElement("small",null,n.email)),e.createElement("td",null,n.status),e.createElement("td",null,n.role||"applicant"),e.createElement("td",null,n.user_id!==p.id&&(n.status==="pending"?["approve","reject"]:n.status==="approved"?["revoke"]:[]).map(h=>e.createElement("button",{key:h,className:"text-button",disabled:k,onClick:()=>{window.confirm(`${h[0].toUpperCase()+h.slice(1)} access for ${n.display_name}?`)&&x(async()=>{await Be(f,n,h),await y(),G(),N("Account access updated. Check Email delivery below separately; saving this change does not confirm an email was sent.")})}},{approve:"Approve",reject:"Reject",revoke:"Remove access"}[h])))))))),e.createElement("h3",{className:"section-gap"},"Email delivery"),e.createElement("p",{className:"caption"},"Waiting emails have not been sent. Delivery depends on administrator settings and the email service being available. Sent means the email service accepted the message; it may still reach Spam or fail to arrive."),e.createElement("div",{className:"table-wrap"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Event"),e.createElement("th",null,"Delivery"),e.createElement("th",null,"Attempts"),e.createElement("th",null))),e.createElement("tbody",null,me.map(n=>e.createElement("tr",{key:n.id},e.createElement("td",null,Oe(n.kind)),e.createElement("td",null,Fe(n.status)),e.createElement("td",null,n.attempts),e.createElement("td",null,n.status==="dead"&&e.createElement("button",{className:"text-button",disabled:k,onClick:()=>x(async()=>{const{error:h}=await f.rpc("defectrag_retry_notification",{p_id:n.id});if(h)throw h;await y()})},"Retry delivery"))))))))):ne?e.createElement("form",{className:"login-form",onSubmit:n=>{n.preventDefault(),x(async()=>{await je(f,{email:ue,password:Z,displayName:K,redirectTo:location.origin+location.pathname}),u(""),N("Check the inbox and Spam folder for a confirmation email. Open its link, sign in, then choose Request staff access. A Developer must approve the request before Staff work is available.")})}},e.createElement("p",null,"New to Staff work? Create an account, confirm the email, then request access. The public demo can be used without an account."),e.createElement("label",{className:"field"},"Display name",e.createElement("input",{value:K,onChange:n=>q(n.target.value),maxLength:80,autoComplete:"name",required:!0})),e.createElement("label",{className:"field"},"Email",e.createElement("input",{type:"email",value:ue,onChange:n=>o(n.target.value),autoComplete:"email",required:!0})),e.createElement("label",{className:"field"},"New password",e.createElement("input",{type:"password",minLength:12,value:Z,onChange:n=>u(n.target.value),autoComplete:"new-password",required:!0})),e.createElement("button",{className:"secondary",disabled:k||!f},"Register account")):e.createElement("p",{className:"caption"},"New account registration is currently closed. Existing Staff can sign in below. The public demo is still available."))}function ut({onOpenInspection:f,onOpenCorrectiveActions:p,onChooseInspection:G,casesView:i=!1,initialInspectionId:S=null}){var De;const E=r.useRef(0),ae=r.useRef(null),w=r.useRef(0),F=r.useRef(null),g=r.useRef(0),P=r.useRef(null),U=r.useRef(null),[z,de]=r.useState(0),[M,K]=r.useState(!1),[q,ue]=r.useState({state:"refreshing"}),[o,Z]=r.useState(null),[u,I]=r.useState(null),[N,k]=r.useState([]),[j,re]=r.useState({}),[W,me]=r.useState(""),[Q,ne]=r.useState(""),[y,x]=r.useState(!1),[pe,O]=r.useState(""),[n,h]=r.useState(!1),[m,C]=r.useState(null),[b,R]=r.useState([]),[J,$]=r.useState([]),[fe,ge]=r.useState(""),[ke,he]=r.useState(!1),[be,s]=r.useState(""),[se,Y]=r.useState(!1),[we,Ee]=r.useState(null),B=Ke(),H=Qe(window.DEFECTRAG_PUBLIC_CONFIG);r.useEffect(()=>()=>{b.filter(a=>a.startsWith("blob:")).forEach(a=>URL.revokeObjectURL(a))},[b]),r.useEffect(()=>{F.current=m},[m]),r.useEffect(()=>{m&&xe(P.current)},[z]),r.useEffect(()=>{if(!o||!u||!S)return;const a=o.id+":"+S;U.current!==a&&(U.current=a,L({id:S},{focus:!i}))},[o==null?void 0:o.id,u==null?void 0:u.user_id,S]);const t=$e();async function d(a){x(!0),O("");try{await a()}catch(l){O(l.message||"Team request failed.")}finally{x(!1)}}async function v(){var A;const a=++w.current,l=E.current,c=(A=F.current)==null?void 0:A.id,{client:D,staff:Se}=await et();let _=D.from("shared_inspections").select("*").order("created_at",{ascending:!1}).limit(200);_=n?_.not("archived_at","is",null):_.is("archived_at",null);const[{data:X,error:ce},{data:_e,error:V},ve]=await Promise.all([_,D.from("staff_members").select("*"),c?D.from("staff_notes").select("*").eq("inspection_id",c).order("created_at"):{data:[]}]);if(ce)throw ce;if(V)throw V;if(ve.error)throw ve.error;if(a===w.current&&(I(Se),O(""),k(X||[]),re(Object.fromEntries((_e||[]).map(ee=>[ee.user_id,ee.display_name]))),c&&l===E.current)){const ee=(X||[]).find(ie=>ie.id===c);if(!ee)E.current++,C(null),R([]),$([]);else if(C(ee),$(ve.data||[]),Date.now()-g.current>480*1e3)if(B){const ie=await Le(D,ee);a===w.current&&l===E.current?(R(ie),g.current=Date.now()):ie.forEach(oe=>URL.revokeObjectURL(oe))}else{const ie=await Promise.all([ee.image_path,ee.heatmap_path].map(oe=>D.storage.from("team-inspections").createSignedUrl(oe,900)));if(a===w.current&&l===E.current){if(ie.some(oe=>oe.error))throw new Error("Shared image links could not refresh.");R(ie.map(oe=>oe.data.signedUrl)),g.current=Date.now()}}}}r.useEffect(()=>{if(!t)return;let a=!1,l;return T().then(async c=>{!a&&B&&Ee(c),l=c.auth.onAuthStateChange((Se,_)=>{var X;if(!a){const ce=((X=_==null?void 0:_.user)==null?void 0:X.id)||null;ae.current!==ce&&(E.current++,w.current++,C(null),k([]),R([]),$([]),I(null),ae.current=ce),Z((_==null?void 0:_.user)||null),Se==="PASSWORD_RECOVERY"&&he(!0)}}).data.subscription;const{data:D}=await c.auth.getUser();a||Z(D.user)}).catch(c=>{a||O(c.message)}),()=>{a=!0,E.current++,l==null||l.unsubscribe()}},[t]),r.useEffect(()=>{if(!o)return;const a=Pe(v,{onState:l=>{ue(l),l.error&&(O(l.error),B&&(E.current++,k([]),re({}),C(null),R([]),$([]),I(null)))}});return()=>{a.stop(),w.current++}},[o==null?void 0:o.id,n]);async function L(a,{focus:l=!0}={}){const c=++E.current;K(!0);try{await d(async()=>{if(c!==E.current)return;const D=await T(),Se=D.storage.from("team-inspections"),[{data:_,error:X},{data:ce,error:_e}]=await Promise.all([D.from("shared_inspections").select("*").eq("id",a.id).single(),D.from("staff_notes").select("*").eq("inspection_id",a.id).order("created_at")]);if(c!==E.current)return;if(X)throw X;if(_e)throw _e;const V=B?await Le(D,_):null,ve=V?V.map(A=>({data:{signedUrl:A}})):await Promise.all([_.image_path,_.heatmap_path].map(A=>Se.createSignedUrl(A,900)));if(ve.some(A=>A.error))throw new Error("Private images could not be loaded. Check staff/storage policies.");if(c!==E.current){V==null||V.forEach(A=>URL.revokeObjectURL(A));return}F.current=_,g.current=Date.now(),C(_),R(ve.map(A=>A.data.signedUrl)),$(ce||[]),l&&de(A=>A+1)})}finally{c===E.current&&K(!1)}}async function le(){await d(async()=>{const a=await T(),l=N.filter(c=>c.owner_id===o.id).map(c=>c.id);if(l.length){const{error:c}=await a.rpc("archive_team_inspections",{p_ids:l});if(c)throw c}E.current++,C(null),Y(!1),await v(),ye()})}return t?e.createElement(e.Fragment,null,e.createElement("section",{className:"card"},e.createElement("div",{className:"section-title"},e.createElement("div",null,e.createElement("h2",null,e.createElement(ct,{size:21})," ",i?"Corrective Actions access":"Staff workspace"),e.createElement("p",null,"Sign in to review inspections shared with the team. New inspections start in Personal Workspace and are shared only when chosen.")),e.createElement("span",{className:"subtle-tag"},e.createElement(Re,{size:13})," STAFF ACCESS")),pe&&e.createElement("div",{className:"error",role:"alert"},Ne(pe)),M&&e.createElement("p",{role:"status"},"Opening the shared photo and review…"),i&&!H&&e.createElement("p",{className:"note"},"Corrective Actions has been turned off for this app. Inspections and reviews are still available. Contact the workspace administrator if needed."),B&&we&&(!i||!u)&&e.createElement(ot,{key:(o==null?void 0:o.id)||"anonymous",client:we,user:o,onChange:()=>{ye(),o&&d(v)}}),o?e.createElement(e.Fragment,null,e.createElement("div",{className:"team-toolbar"},e.createElement("div",null,e.createElement(Ze,{size:18}),e.createElement("strong",null,(u==null?void 0:u.display_name)||o.email),e.createElement("span",{className:"subtle-tag"},(u==null?void 0:u.role)||"CHECKING ACCESS")),e.createElement("button",{className:"secondary",disabled:y,onClick:()=>d(v)},e.createElement(st,{size:16})," Refresh"),!i&&u&&H&&e.createElement("button",{className:"secondary",onClick:()=>p==null?void 0:p()},"Open Corrective Actions"),i&&u&&e.createElement("button",{className:"secondary",onClick:()=>G==null?void 0:G()},"Choose a Team inspection"),e.createElement("button",{className:"secondary",onClick:()=>d(async()=>{await(await T()).auth.signOut(),k([]),C(null),I(null)})},e.createElement(nt,{size:16})," Sign out")),ke&&e.createElement("form",{className:"login-form",onSubmit:a=>{a.preventDefault(),d(async()=>{const l=await T(),{error:c}=await l.auth.updateUser({password:be});if(c)throw c;s(""),he(!1)})}},e.createElement("label",{className:"field"},"Set a new password",e.createElement("input",{type:"password",minLength:12,autoComplete:"new-password",value:be,onChange:a=>s(a.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:y},"Save password")),!i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"team-toolbar"},e.createElement("span",{role:"status"},"Team Workspace · latest ",N.length," shared inspections · ",q.state==="synced"?"updated at "+new Date(q.at).toLocaleTimeString():q.state==="offline"?"offline; shown results may be out of date":q.state==="stale"?"update failed; shown results may be out of date":"refreshing…"," · checks for changes every 15 seconds"),(u==null?void 0:u.role)==="developer"&&e.createElement("button",{className:"secondary",onClick:()=>{h(!n),C(null)}},e.createElement(tt,{size:16}),n?"Active history":"Restore archived team work"),!n&&e.createElement("button",{className:"secondary danger",disabled:y||!N.some(a=>a.owner_id===o.id),onClick:()=>Y(!0)},e.createElement(Je,{size:16})," Archive my shared inspections")),se&&e.createElement("div",{className:"note"},e.createElement("div",null,e.createElement("strong",null,"Archive your visible records?"),e.createElement("p",null,"They will leave the shared active history. Original files and conversations remain recoverable by a developer. Other staff members’ records will stay active."),e.createElement("div",{className:"button-row"},e.createElement("button",{className:"primary",disabled:y,onClick:le},"Archive my records"),e.createElement("button",{className:"secondary",onClick:()=>Y(!1)},"Cancel")))),e.createElement("div",{className:"table-wrap"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Inspection"),e.createElement("th",null,"Product"),e.createElement("th",null,"Result"),e.createElement("th",null,"Shared by"),e.createElement("th",null,"Saved"),e.createElement("th",null))),e.createElement("tbody",null,N.map(a=>{var l;return e.createElement("tr",{key:a.id},e.createElement("td",null,e.createElement("strong",null,a.id.slice(0,8))),e.createElement("td",null,a.payload.category),e.createElement("td",null,e.createElement("span",{className:"badge "+((l=a.payload.verdict)==null?void 0:l.toLowerCase())},Ae(a.payload.verdict))),e.createElement("td",null,j[a.owner_id]||"Staff member"),e.createElement("td",null,new Date(a.created_at).toLocaleString()),e.createElement("td",null,e.createElement("button",{className:"text-button",disabled:y,onClick:()=>L(a)},"Review"),n&&(u==null?void 0:u.role)==="developer"&&e.createElement("button",{className:"text-button",disabled:y,onClick:()=>d(async()=>{const c=await T(),{error:D}=await c.rpc("restore_team_inspections",{p_ids:[a.id]});if(D)throw D;await v(),ye()})},"Restore")))}))),!N.length&&e.createElement("div",{className:"empty"},e.createElement(Re,{size:30}),e.createElement("p",null,n?"No archived records to recover.":"No shared inspections yet. Open an inspection result and select Share with team."))))):e.createElement("form",{className:"login-form",onSubmit:a=>{a.preventDefault(),d(async()=>{const l=await T(),{error:c}=await l.auth.signInWithPassword({email:W,password:Q});if(c)throw c;ne("")})}},e.createElement("label",{className:"field"},"Work email",e.createElement("input",{type:"email",autoComplete:"username",value:W,onChange:a=>me(a.target.value),required:!0})),e.createElement("label",{className:"field"},"Password",e.createElement("input",{type:"password",autoComplete:"current-password",value:Q,onChange:a=>ne(a.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:y},y?e.createElement(Ye,{className:"spin",size:17}):e.createElement(rt,{size:17})," Sign in"),e.createElement("button",{type:"button",className:"text-button",disabled:!W||y,onClick:()=>d(async()=>{const a=await T(),{error:l}=await a.auth.resetPasswordForEmail(W,{redirectTo:location.origin+location.pathname});if(l)throw l;O("Password reset requested. Check the inbox and Spam folder.")})},"Reset password"),e.createElement("p",{className:"caption"},B?"A new account needs Developer approval before Staff work is available. Approved Staff must also enter their security code when asked.":"The workspace administrator must approve an account before it can access Staff work."))),i&&o&&u&&H&&e.createElement(it,{key:o.id,user:o,inspection:m,notes:J,onEvidence:a=>L({id:a})}),o&&m&&e.createElement("section",{className:"card",ref:P,tabIndex:-1,"aria-labelledby":"shared-inspection-title"},e.createElement("div",{className:"section-title"},e.createElement("div",null,e.createElement("h2",{id:"shared-inspection-title"},"Shared inspection · ",m.id.slice(0,8)),e.createElement("p",null,"Shared copy from ",j[m.owner_id]||"a colleague",". These are saved results. Opening them does not run another inspection.")),e.createElement("div",{className:"button-row"},f&&!m.archived_at&&e.createElement("button",{className:"secondary",onClick:()=>f(m)},"Open full result and assistant"),!i&&H&&!m.archived_at&&e.createElement("button",{className:"secondary",onClick:()=>p==null?void 0:p(m)},"Create or view corrective actions"),e.createElement("button",{className:"text-button",onClick:()=>{E.current++,F.current=null,C(null),R([]),$([])}},"Close"))),e.createElement("div",{className:"shared-images"},b.map((a,l)=>e.createElement("img",{key:a,src:a,alt:l?"Saved highlighted areas":"Saved inspected product"}))),e.createElement("div",{className:"observation"},e.createElement("strong",null,"SAVED RESULT"),e.createElement("span",null,Ae(m.payload.verdict)," · score ",Number(m.payload.score).toFixed(5)," · review limit ",Number(m.payload.threshold).toFixed(5))),e.createElement("h3",{className:"section-gap"},"Saved assistant conversation"),(De=m.conversation)!=null&&De.length?m.conversation.map((a,l)=>e.createElement("p",{className:"cloud-message",key:l},e.createElement("strong",null,a.role==="user"?"Inspector":"Evidence Assistant",": "),a.question||a.answer)):e.createElement("p",{className:"caption"},"No assistant conversation was shared with this inspection."),!m.archived_at&&e.createElement(Xe,{key:m.id+String(J.length),current:J.map(a=>Te(a,j)).filter(Boolean).at(-1),disabled:y,onSave:async a=>{const l=await T(),{error:c}=await l.from("staff_notes").insert({inspection_id:m.id,author_id:o.id,body:Ve(a.status,a.decision,a.note)});if(c)throw c;await L(m),ye()}}),e.createElement("h3",{className:"section-gap"},"Team notes"),J.filter(a=>!Te(a,j)).map(a=>e.createElement("div",{className:"cloud-message",key:a.id},e.createElement("strong",null,j[a.author_id]||"Staff member"),e.createElement("p",null,a.body),e.createElement("small",null,new Date(a.created_at).toLocaleString()))),!m.archived_at&&e.createElement("form",{className:"question-form",onSubmit:a=>{a.preventDefault(),d(async()=>{const l=await T(),{error:c}=await l.from("staff_notes").insert({inspection_id:m.id,author_id:o.id,body:fe.trim()});if(c)throw c;ge(""),await L(m),ye()})}},e.createElement("input",{"aria-label":"Staff review note",maxLength:2e3,placeholder:"Add a note for the team…",value:fe,onChange:a=>ge(a.target.value)}),e.createElement("button",{className:"primary",disabled:y||!fe.trim()},e.createElement(lt,{size:16})," Add note")))):e.createElement("section",{className:"card cloud-setup"},e.createElement("div",{className:"setup-icon"},e.createElement(Re,{size:32})),e.createElement("span",{className:"eyebrow"},"TEAM WORKSPACE"),e.createElement("h2",null,"Team workspace is not available yet."),e.createElement("p",null,"The workspace administrator needs to connect shared storage before Staff can sign in here."),e.createElement("div",{className:"setup-grid"},[["01","Connect shared storage","The workspace administrator completes this setup."],["02","Set up staff access","The administrator sets up approval and account security."],["03","Connect this dashboard","The administrator connects the app, then Staff can sign in."]].map(([a,l,c])=>e.createElement("div",{key:a},e.createElement("b",null,a),e.createElement("h3",null,l),e.createElement("p",null,c)))),e.createElement("a",{className:"primary",href:"https://supabase.com/dashboard",target:"_blank",rel:"noreferrer"},"Administrator setup ",e.createElement(at,{size:16})),e.createElement("p",{className:"caption"},"Contact the workspace administrator for help. The public demo can be used without Staff access."))}export{ut as default};
|
frontend/dist/assets/index-DEvENDvs.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
frontend/dist/assets/index-jDRMwSe5.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
:root{font-family:Inter,Segoe UI,system-ui,sans-serif;color:#20383b;background:#f5f7f7;font-synthesis:none;font-weight:400;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{opacity:.52;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #35b6a5;outline-offset:3px}button{border:0;background:none;color:inherit}h1,h2,h3,p{margin:0}h1{font-size:38px;line-height:1.2;letter-spacing:-1.1px;font-weight:650}h2{font-size:20px;letter-spacing:-.25px;font-weight:650}h3{font-size:18px}p{line-height:1.65}.app{display:flex;min-height:100vh}.sidebar{background:#142f33;color:#aec0c2;width:242px;position:fixed;inset:0 auto 0 0;padding:31px 19px 22px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;color:#fff;gap:10px;margin-bottom:47px}.brand>div{font-weight:700;letter-spacing:-.5px;font-size:24px}.brand span:not(.brand-mark){font-size:10px;display:block;letter-spacing:1.8px;font-weight:500;margin-top:6px;color:#9bb5b8}.brand-mark{background:#2f6d67;width:37px;height:40px;border-radius:10px;display:grid;place-items:center;color:#a3e6d9}.brand b{font-size:13px;color:#a3e6d9;font-weight:500;border:1px solid #426468;border-radius:5px;padding:3px;margin-left:auto}.workspace-label{font-size:13px;letter-spacing:1.6px;color:#739095;margin:0 13px 14px}nav{display:grid;gap:7px}nav button{display:flex;align-items:center;gap:11px;text-align:left;padding:12px 13px;border-radius:7px;font-size:15px;color:#adc3c5;white-space:nowrap}nav button.active{background:#2a5556;color:#e0f7ee;font-weight:600}nav button.active svg{color:#9fdbc7}nav button:hover{background:#24464a}.nav-count{margin-left:auto;font-size:13px;background:#b98243;color:#fff;border-radius:4px;min-width:20px;text-align:center;padding:2px}.sidebar-bottom{margin-top:auto}.local-card{margin-top:40px;padding:15px 12px;border:1px solid #365054;border-radius:7px;font-size:13px}.local-card strong{font-size:13px;vertical-align:middle;color:#c2d5d3}.local-card p{color:#819ea2;line-height:1.9;margin:8px 0 0 15px}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#65c4a2;margin-right:7px;vertical-align:middle}.status-dot.offline{background:#d6aa60}.sidebar-foot{display:flex;align-items:center;justify-content:center;gap:7px;color:#7e9b9f;font-size:13px;padding-top:23px}main{margin-left:242px;flex:1;min-width:0}.topbar{height:73px;border-bottom:1px solid #e3e9e8;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 37px;font-size:14px;color:#7b898a}.topbar>span,.topbar>div{display:flex;align-items:center;gap:13px}.environment{font-size:12px;letter-spacing:1px;color:#69827e}.avatar{background:#eaf0ef;color:#49605e;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;font-size:13px;font-weight:600;margin-left:8px}.content{max-width:1570px;margin:auto;padding:35px 37px 0}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:29px}.eyebrow{font-size:12px;font-weight:650;letter-spacing:1.7px;color:#6f8c85;margin-bottom:9px}.page-heading>div>p:last-child{color:#7b8a8a;font-size:15px;margin-top:9px}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:9px;border-radius:6px;padding:12px 16px;font-size:14px;font-weight:600;white-space:nowrap}.primary{background:#23796c;color:#fff}.primary:hover:not(:disabled){background:#1b6157}.secondary{background:#fff;border:1px solid #dbe4e2;color:#536a68}.text-button{color:#30786c;font-size:14px;font-weight:600;display:inline-flex;align-items:center;gap:8px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:24px}.card{background:#fff;border:1px solid #e0e7e5;border-radius:9px;padding:23px;margin-bottom:24px;box-shadow:0 2px 2px #163d3502}.stat{padding:20px 22px;margin-bottom:0}.stat>div{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#788a87}.stat strong{font-size:32px;letter-spacing:-1px;font-weight:600;display:block;margin:12px 0 7px}.stat small{font-size:13px;color:#8c9996}.teal{color:#3c8075}.green{color:#5a9d7c}.orange{color:#d68b61}.amber{color:#c3a253}.overview-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:24px}.hero-card{position:relative;border-radius:9px;overflow:hidden;background:#183e3f;min-height:330px;padding:30px;color:#f2faf7;margin-bottom:24px}.hero-card .pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;letter-spacing:1px;background:#365b56;color:#b7dace;padding:6px 8px;border-radius:4px}.hero-card h2{font-size:24px;line-height:1.4;letter-spacing:-.7px;margin:18px 0 12px;position:relative;z-index:2}.hero-card p{font-size:14px;color:#aac6be;max-width:59%;position:relative;z-index:2}.hero-card .light{margin-top:23px;background:#ddf1e6;color:#275f52}.scan-visual{position:absolute;inset:52px 18px 40px auto;width:35%;border:1px solid #4b7970;border-radius:7px;background:#305858;transform:rotate(-5deg);padding:8px}.scan-visual img{width:100%;height:100%;object-fit:cover;border-radius:4px;opacity:.65;filter:saturate(.65)}.scan-visual>span{position:absolute;bottom:-23px;left:-10px;font-size:10px;letter-spacing:1px;white-space:nowrap;color:#b7dace}.scan-corner{position:absolute;z-index:1;top:20px;right:20px;bottom:20px;left:20px;border:1px solid #aad7bd;border-radius:4px}.scan-corner:after{content:"";position:absolute;top:47%;left:-6px;right:-6px;height:1px;background:#c0eaca;box-shadow:0 0 12px #c3f5df}.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:21px}.section-title p{font-size:14px;color:#8a9795;margin-top:6px}.subtle-tag{font-size:11px;letter-spacing:.7px;color:#6b8981;background:#f0f5f3;border:1px solid #e1ebe6;border-radius:4px;padding:5px 7px;white-space:nowrap}.pipeline-step{display:flex;gap:13px;margin-bottom:19px;align-items:center}.pipeline-step>span{font-size:13px;border:1px solid #dce7e3;border-radius:50%;width:28px;height:28px;display:grid;place-items:center;color:#588b7e}.pipeline-step strong{font-size:14px}.pipeline-step p{font-size:13px;color:#8b9a96;line-height:1.6;margin-top:2px}.readiness{padding:23px}.readiness .note{font-size:12px;padding:11px}.note{background:#f1f6f3;color:#668377;border:1px solid #e2ece5;border-radius:5px;display:flex;align-items:flex-start;gap:9px;padding:13px;font-size:14px;line-height:1.6}.note svg{flex-shrink:0;margin-top:1px}.note p{font-size:14px}.standalone{margin-bottom:24px}.standalone strong{color:#45695b}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:14px}th{text-align:left;color:#83938e;font-size:12px;letter-spacing:.2px;background:#f7f9f8;padding:12px;font-weight:500}td{padding:15px 12px;border-bottom:1px solid #edf1ef;color:#5f736d}td strong{font-weight:600;color:#3c5950}td small{display:block;color:#96a29d;font-size:12px;margin-top:5px}tr:last-child td{border-bottom:0}.badge{display:inline-flex;align-items:center;gap:6px;border:1px solid #d4e8dc;background:#edf8f0;color:#558068;font-size:13px;border-radius:5px;padding:5px 8px}.badge i{width:4px;height:4px;border-radius:50%;background:currentColor}.badge.anomalous{background:#fcf0ea;border-color:#f3dacc;color:#b17a57}.badge.uncertain{background:#f9f4e6;border-color:#ede2bd;color:#a38e52}.icon-button{width:29px;height:29px;border:1px solid #e1e9e5;border-radius:5px;display:inline-grid;place-items:center;color:#6c8d7e}.gallery{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:24px}.sample{background:#fff;border:1px solid #dfe7e2;border-radius:8px;padding:0;text-align:left;overflow:hidden}.sample:hover{border-color:#73a28d}.sample img{width:100%;height:110px;object-fit:cover;background:#e6edeb}.sample>div{padding:13px 11px}.sample strong{font-size:14px}.sample span{font-size:11px;color:#889990;display:flex;justify-content:space-between;margin-top:5px}.inspection-grid{display:grid;grid-template-columns:330px minmax(0,1fr);gap:24px}.field{font-size:14px;font-weight:600;display:block;margin-bottom:20px;color:#496658}.field>span{font-weight:400;color:#93a098;font-size:13px;margin-left:5px}select,input{border:1px solid #dce5df;border-radius:5px;background:#fff;color:#536c5f;min-height:39px;padding:9px 11px;width:100%;font-size:14px}.field select,.field input{margin-top:9px}.drop-zone{border:1px dashed #b9cfc0;background:#f8faf8;border-radius:7px;min-height:195px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:20px;gap:12px;cursor:pointer;position:relative;color:#6d917c;text-align:center}.drop-zone span{font-size:12px;color:#9ba99e}.drop-zone img{width:100%;height:140px;object-fit:contain}.drop-zone input{opacity:0;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;cursor:pointer}.drop-zone:focus-within{outline:3px solid #35b6a5;outline-offset:3px}.caption{font-size:12px;color:#8a9d8e;line-height:1.7;margin-top:12px}.upload-card .caption:last-child{text-align:center}.wide{width:100%;margin-top:19px}.empty{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#96a99b;gap:12px;padding:20px}.empty p{font-size:15px;max-width:350px}.empty h3{font-size:17px;color:#557362}.result-banner{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}.result-banner h2{margin-top:13px;font-size:24px}.result-banner p{font-size:13px;color:#8c9c90;margin-top:6px}.image-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;font-size:13px;color:#849a8b}.result-image{width:100%;max-height:390px;object-fit:contain;background:#f2f6f3;border:1px solid #e5ece6;border-radius:7px}.score-grid{display:grid;grid-template-columns:repeat(3,1fr);margin:20px 0;gap:18px}.score-grid>div{border-right:1px solid #e7ede7}.score-grid>div:last-child{border:0}.score-grid small{font-size:13px;color:#8aa08f;display:block}.score-grid strong{font-size:26px;font-weight:550;display:block;margin-top:8px;color:#405f4a}.filters{display:flex;align-items:center;gap:12px;background:#f7f9f7;padding:12px;margin-bottom:16px;border-radius:5px;color:#809885}.filters select{max-width:170px;font-size:13px}.filters>span{margin-left:auto;font-size:13px;white-space:nowrap}.muted{color:#8c9e90}.table-caption{padding:8px 12px}.assistant h2{display:flex;align-items:center;gap:8px}.observation{display:flex;gap:14px;background:#f1f6f1;padding:13px;border-radius:6px;font-size:14px;color:#64846a;align-items:center}.observation strong{font-size:11px;letter-spacing:1px;white-space:nowrap}.suggestions{display:flex;gap:10px;margin:25px 0;flex-wrap:wrap}.suggestions button{border:1px solid #dfe9df;border-radius:6px;padding:12px;font-size:13px;display:flex;gap:15px;align-items:center;color:#65846b}.question-form{display:flex;gap:10px;margin-top:21px}.question-form input{flex:1}.conversation{margin-top:20px}.user-message{margin-left:15%;padding:16px;border-radius:6px;background:#edf4ee;margin-bottom:16px;font-size:15px}.user-message strong{font-size:13px;color:#7c947f}.user-message p{margin-top:6px}.assistant-message{border:1px solid #e3ebe2;border-radius:6px;padding:18px;margin-bottom:18px}.assistant-message>div:first-child{display:flex;align-items:center;justify-content:space-between}.assistant-message strong{font-size:14px}.answer-text{font-size:15px;white-space:pre-wrap;margin:14px 0}.trace{color:#99a798;font-size:11px;display:block;margin-top:13px}details{font-size:14px;color:#608166}summary{cursor:pointer;padding:10px 0}.source{background:#f6f9f4;padding:12px;border-radius:5px;margin:8px 0}.source p{font-size:14px;color:#798f78;white-space:pre-wrap;margin:8px 0}.source small{display:block;color:#90a08a;font-size:12px}.source a{display:flex;align-items:center;gap:5px;color:#3b7e52;font-size:13px;margin-top:8px}.generating{display:flex;gap:9px;align-items:center;font-size:14px;color:#658e6b;padding:15px 0}.alert-row{display:flex;gap:17px;align-items:center;border-top:1px solid #edf0ea;padding:19px 0}.alert-row>svg{color:#bd9b65}.alert-row>div{flex:1}.alert-row strong{font-size:15px}.alert-row p{font-size:13px;color:#94a38d;margin-top:5px}.performance-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.performance-grid .card{min-width:0}.performance-grid .section-title{gap:7px}.performance-grid p{font-size:13px}.matrix{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;margin:17px 0 25px;align-items:center;text-align:center}.matrix small{font-size:11px;color:#8a9c82}.matrix b{font-size:22px;font-weight:500;background:#f9f1e9;color:#ad987a;padding:15px 0;border-radius:4px}.matrix b.correct{background:#eaf3e8;color:#658460}dl>div{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #edf0e8;padding:10px 0;font-size:12px}dt{color:#90a087}dd{margin:0;color:#668060;text-align:right}.about p{font-size:15px;color:#82937a;margin:14px 0}.about h3{font-size:16px;margin-top:27px;color:#627b57}.source-link{display:flex;align-items:center;justify-content:space-between;padding:23px 0;border-bottom:1px solid #e9eee4;color:#7c956d}.source-link strong{font-size:15px}.source-link small{display:block;font-size:13px;color:#a1ac97;margin-top:6px}.about .note{margin-top:22px}.error{background:#fcf0ed;border:1px solid #f0d5cb;color:#a5654e;display:flex;gap:10px;align-items:center;padding:14px;border-radius:6px;font-size:15px;margin-bottom:23px}.error span{flex:1}.error button{color:inherit;display:grid;place-items:center}.batch-summary{margin:22px 0}.batch-summary p{font-size:15px;color:#83927b;margin-top:8px}footer{border-top:1px solid #e2e9e0;margin-top:12px;padding:22px 0;color:#8c9d86;display:flex;gap:17px;font-size:12px}footer>span:first-child{flex:1}.spin{animation:spin 1.2s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(min-width:1500px){.hero-card h2{font-size:34px}.hero-card{min-height:340px}.gallery .sample img{height:140px}}@media(max-width:1200px){.sidebar{width:214px;padding-left:14px;padding-right:14px}main{margin-left:214px}.content{padding:28px 25px 0}.topbar{padding:0 25px}.hero-card{padding:24px}.hero-card h2{font-size:24px}.overview-grid{grid-template-columns:1.15fr 1fr;gap:18px}.hero-card p{max-width:65%}.scan-visual{width:29%;right:14px}.gallery{grid-template-columns:repeat(3,1fr)}.sample img{height:140px}.inspection-grid{grid-template-columns:285px minmax(0,1fr);gap:18px}.card{padding:19px}.performance-grid{grid-template-columns:1fr}.performance-grid .matrix{max-width:350px}.performance-grid dl{display:grid;grid-template-columns:repeat(2,1fr);gap:0 30px}.filters{flex-wrap:wrap}.filters select{flex:1;min-width:110px}}@media(max-width:900px){.overview-grid{grid-template-columns:1fr}.hero-card{min-height:285px}.scan-visual{width:28%;right:32px;top:25px}.hero-card p{max-width:60%}.inspection-grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,1fr)}.page-heading{align-items:flex-start}h1{font-size:32px}.brand>div{font-size:20px}.brand span:not(.brand-mark){font-size:10px}.sidebar{width:200px}main{margin-left:200px}.alert-row{flex-wrap:wrap}.alert-row>div{min-width:180px}}@media(max-width:680px){.app{display:block}.sidebar{width:100%;position:relative;padding:16px 18px 0;display:block}.brand{margin-bottom:20px;width:185px}.brand>div{font-size:22px}.workspace-label,.sidebar-bottom{display:none}nav{display:flex;overflow:auto;gap:4px;margin:0 -5px;padding:0 0 12px}nav button{font-size:13px;padding:10px;gap:7px}nav button svg{width:15px;min-width:15px}.sidebar nav .nav-count{font-size:11px}main{margin:0}.topbar{height:50px;padding:0 19px;font-size:12px}.environment{font-size:10px}.avatar{width:25px;height:25px;font-size:11px}.content{padding:26px 18px 0}.page-heading{display:block;margin-bottom:25px}.page-heading>.primary{margin-top:18px}h1{font-size:30px}.stats-grid{gap:10px}.stat{padding:17px}.stat strong{font-size:32px}.stat small{font-size:11px}.hero-card{padding:23px;min-height:310px}.hero-card h2{font-size:25px}.hero-card p{max-width:62%}.scan-visual{width:27%;right:18px;top:65px;bottom:55px}.scan-visual>span{font-size:5px;left:-8px}.gallery{grid-template-columns:repeat(2,1fr);gap:10px}.sample img{height:120px}.sample span{font-size:11px}.card{padding:18px;margin-bottom:18px}.section-title{gap:10px}.section-title h2{font-size:17px}.section-title p{font-size:13px}.subtle-tag{font-size:10px}.section-title>.subtle-tag{max-width:130px;white-space:normal}.observation{display:block}.observation span{display:block;margin-top:7px;font-size:13px}.assistant-message>div:first-child{gap:12px}.assistant-message{padding:12px}.score-grid{gap:12px}.score-grid strong{font-size:24px}.score-grid small{font-size:11px}.result-banner h2{font-size:20px}.result-banner{align-items:flex-start}.result-banner .secondary{padding:9px;font-size:12px}.performance-grid dl{display:block}.filters{gap:8px}.filters>svg{display:none}.filters select{min-width:90px}.filters>span{width:100%;font-size:12px}.question-form{gap:6px}.question-form .primary{padding:10px}.question-form input{min-width:0}.alert-row{gap:10px}.alert-row>div{min-width:140px}.alert-row .secondary{font-size:13px;padding:10px}footer{flex-wrap:wrap;font-size:11px;gap:9px}footer>span:last-child{width:100%}.source-link{padding:18px 0}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}.showcase-banner{display:flex;gap:14px;padding:18px 22px;background:#e4f3ee;border:1px solid #95c9ba;border-radius:14px;margin:0 0 24px;color:#154b40}.showcase-banner svg{flex-shrink:0;margin-top:2px}.showcase-banner p{margin:6px 0 0;line-height:1.55;font-size:16px}.upload-card .gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.upload-card .sample img{height:110px}.upload-card .sample{min-width:0}:root{--ink:#1d2541;--muted:#66728b;--accent:#6556e8;--blue:#247bef;--line:#e1e5f1;--surface:#fff;font-family:Segoe UI,Inter,system-ui,sans-serif;color:var(--ink);background:#f4f5fb;font-size:16px;font-weight:450;--shadow:0 5px 24px #26345e08}body{background:radial-gradient(ellipse at 90% 0,#e9e8fd 0,transparent 40%),#f4f5fb}button,a,input,select,summary{transition:background .18s,border-color .18s,box-shadow .18s,transform .18s,color .18s}button:active:not(:disabled){transform:translateY(1px)}.sidebar{background:linear-gradient(180deg,#171d37,#202347 70%,#302958);color:#b7c2df;border-right:1px solid #3e4167;padding-top:25px}.brand{margin-bottom:28px;gap:11px}.brand>div{font-size:26px;letter-spacing:-1px}.brand span:not(.brand-mark){font-size:8px;letter-spacing:1.5px;color:#bdc2e6}.brand-mark{background:none;width:42px;height:42px}.brand-mark img{width:42px;height:42px}.workspace-label{color:#8993bb;font-size:10px;margin-bottom:12px}nav{gap:5px;overflow:auto;scrollbar-width:thin;scrollbar-color:#555c8c transparent}nav button{font-size:14px;padding:11px 12px;color:#c4cbe3}nav button.active{background:linear-gradient(105deg,#6556e8,#4d4aa2);color:#fff;box-shadow:0 5px 14px #0b0e2b50}nav button.active svg{color:#fff}nav button:hover{background:#343959;color:#fff}.nav-count{background:#f3a64a;color:#1d2541;font-weight:700}.local-card{background:#ffffff07;border-color:#525776;margin-top:22px}.local-card strong{font-size:12px;color:#e0e5f7}.local-card p{font-size:11px;color:#b1b9d8}.sidebar-foot{font-size:11px;color:#afb5d6}.status-dot{background:#4fd6b1;box-shadow:0 0 0 3px #4fd6b114}.topbar{background:#ffffffc9;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);color:#74809a;border-color:var(--line);height:68px;font-size:13px}.environment{font-size:10px;color:#5a5e99}.avatar{background:#e9e7ff;color:#6556ba}.content{padding-top:32px}.page-heading{margin-bottom:28px}.page-heading h1{font-size:38px;letter-spacing:-1.4px;color:#202841;font-weight:720}.page-heading>div>p:last-child{font-size:16px;color:var(--muted);max-width:700px}.eyebrow{color:#6d61bd;font-size:11px;letter-spacing:1.8px;font-weight:700;margin-bottom:11px}.card{border-color:var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow);padding:25px;margin-bottom:24px}.section-title{margin-bottom:21px}.section-title h2{color:var(--ink);font-size:20px;font-weight:680}.section-title h2 svg{vertical-align:middle;margin-right:4px}.section-title p{font-size:14px;color:var(--muted);line-height:1.55}.section-title>div{min-width:0}.subtle-tag{border-color:#e1dcfb;background:#f1eefe;color:#625998;display:inline-flex;align-items:center;gap:5px;border-radius:6px;font-size:10px}.stats-grid{gap:17px}.stat{position:relative;overflow:hidden}.stat:after{content:"";position:absolute;width:80px;height:80px;right:-35px;bottom:-35px;border-radius:50%;background:#f2f0ff}.stat>div{font-size:14px;color:#64708b}.stat strong{font-size:38px;line-height:1.25;font-weight:720;color:#26304d;letter-spacing:-1px}.stat small{font-size:12px;color:#79839a}.stat:nth-child(2):after{background:#eaf9f0}.stat:nth-child(3):after{background:#fff2e7}.stat:nth-child(4):after{background:#fff8da}.teal{color:#7861e8}.green{color:#25936c}.orange{color:#de7d38}.amber{color:#bc961b}.primary{background:linear-gradient(110deg,#6b54e8,#4b69e6);border-radius:9px;color:#fff;box-shadow:0 4px 10px #6757dc25;font-size:14px;min-height:42px;padding:11px 17px;font-weight:600}.primary:hover{box-shadow:0 6px 18px #6757dc40;filter:brightness(1.05);transform:translateY(-1px)}.secondary{border:1px solid #dce0f0;border-radius:9px;color:#5d5a8d;background:#fff;font-size:13px;padding:10px 13px;display:inline-flex;align-items:center;gap:7px;justify-content:center}.secondary:hover{background:#f3f1ff;border-color:#b7aceb}.secondary.selected{background:#eeebff;border-color:#8f7ce7}.danger{color:#b34d5f}.text-button{color:#6c5ccc;font-size:13px}.icon-button{border-color:#dfe0ef;border-radius:8px;color:#7167a6;background:#fff;width:33px;height:33px}.icon-button:hover{background:#eeeafa;border-color:#b8a9ea}.button-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.button-row>.primary,.button-row>.secondary{white-space:nowrap}.hero-card{background:linear-gradient(125deg,#373073,#3a4e9a 60%,#2469a3);border-radius:17px;box-shadow:0 10px 28px #2526591a;min-height:330px}.hero-card h2{font-size:29px;font-weight:680;color:#fff;max-width:65%;line-height:1.28}.hero-card p{font-size:14px;color:#d1d8f5;max-width:61%;line-height:1.65}.pill{background:#ffffff16;color:#e0dffd;border-color:#ffffff26;font-size:10px}.primary.light{background:#fff;color:#4f469b;box-shadow:none}.scan-visual{transform:rotate(-4deg);box-shadow:0 15px 30px #0b133b40;border-color:#b9b1f6;border-radius:10px;overflow:hidden;animation:float-image 7s ease-in-out infinite}.scan-corner{border-color:#e4dcff}.scan-corner:after{background:#9cdffd;box-shadow:0 0 14px #91d9ff;animation:scan-sweep 4s ease-in-out infinite}.scan-visual>span{background:#252044d9;color:#d3e9ff;font-size:8px}.pipeline-step strong{font-size:14px;color:#37415f}.pipeline-step p{font-size:13px;color:#78839a}.pipeline-step>span{border-color:#ddd5f7;color:#7962c1;background:#faf8ff;font-size:11px}.readiness .note{font-size:12px}.note{border-color:#dddff1;background:#f5f5fc;color:#656985;border-radius:9px;font-size:13px;line-height:1.6}.note p{font-size:13px}.showcase-banner{background:linear-gradient(100deg,#ede9ff,#e9f2ff);border-color:#d5d0f4;border-radius:14px;color:#514b84;padding:19px 21px}.showcase-banner p,table{font-size:14px}th{background:#f5f6fc;color:#8189a1;font-size:11px;padding:13px 12px;font-weight:650}td{padding:17px 12px;border-color:#edf0f7;color:#66718b}td strong{color:#374261}td small{font-size:11px;color:#8991a8;margin-top:6px}tbody tr{transition:background .16s}tbody tr:hover{background:#f8f7ff}.badge{font-size:12px;padding:6px 10px;border-radius:7px}.badge.good{color:#217a57;background:#eaf8f0;border-color:#c9ead8}.badge.anomalous{color:#b66331;background:#fff0e5;border-color:#f8d7bd}.badge.uncertain{color:#a17b0d;background:#fff8df;border-color:#eddda0}.filters{background:#f5f6fc;border-radius:10px;padding:14px;color:#78819a}.filters select{font-size:13px;max-width:190px}.filters>span{font-size:12px}.gallery{grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.sample{border-color:#e0e3ef;border-radius:12px;transition:transform .18s,box-shadow .18s,border-color .18s}.sample:hover{transform:translateY(-4px);box-shadow:0 9px 24px #3c32651c;border-color:#a697e7}.sample img{height:140px}.sample>div{padding:13px}.sample strong{font-size:14px;color:#3c4561}.sample span{font-size:11px;color:#8388a2}.sample img{transition:transform .35s}.sample:hover img{transform:scale(1.035)}.field{font-size:14px;color:#525c79}.field>span{font-size:12px;color:#9497ad}select,input{min-height:43px;border-color:#dce0ee;border-radius:8px;color:#4e5872;font-size:14px;padding:10px 12px}input:focus,select:focus{border-color:#9c88e5;box-shadow:0 0 0 3px #8c74e51a}.drop-zone{border-color:#bdb0e5;background:#f8f6ff;color:#8170bc;border-radius:13px;min-height:200px}.drop-zone:hover{border-color:#8a6ce4;background:#f2edff}.drop-zone strong{font-size:15px}.drop-zone span{font-size:12px}.caption{color:#7e86a0;font-size:12px;line-height:1.7}.empty{color:#9298b2}.empty p{font-size:15px}.empty h3{color:#626b8e}.result-banner h2{font-size:24px;color:#303b5a}.result-banner p{font-size:12px;color:#7c87a1}.image-toolbar{font-size:13px;color:#78819c}.score-grid small{color:#7a839e;font-size:13px}.score-grid strong{color:#4d438c;font-size:27px;font-weight:650}.score-grid>div{border-color:#e5e2f3}.viewer-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}.viewer-controls>div{display:flex;align-items:center;gap:8px;font-size:12px;color:#7f80a1}.viewer-stage{height:350px;position:relative;border:1px solid #e0e2ef;border-radius:12px;background:repeating-conic-gradient(#f0f1f7,#f0f1f7 25%,#f8f8fc 0%,#f8f8fc 50%) 50%/20px 20px;overflow:hidden}.viewer-image-wrap{position:absolute;top:0;right:0;bottom:0;left:0;transition:transform .25s}.viewer-original,.viewer-overlay{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:contain}.viewer-overlay{clip-path:inset(0 0 0 var(--split))}.viewer-overlay.full{clip-path:none}.comparison-line{position:absolute;top:0;bottom:0;left:var(--split);width:2px;background:#fff;box-shadow:0 0 0 1px #6556e8;pointer-events:none}.comparison-line:after{content:"↔";position:absolute;top:48%;left:-17px;width:34px;height:34px;border-radius:50%;background:#fff;color:#6556e8;display:grid;place-items:center;box-shadow:0 2px 14px #35304f30}.comparison-range{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:ew-resize;padding:0;margin:0}.viewer-stage:focus-within{outline:3px solid #a18cef;outline-offset:2px}.viewer-label{position:absolute;top:12px;padding:6px 9px;background:#20283ecf;color:#fff;border-radius:5px;font-size:9px;letter-spacing:1px;pointer-events:none}.viewer-label.left{left:12px}.viewer-label.right{right:12px}.image-dialog,.confirmation-dialog{border:1px solid #d9d5ed;border-radius:18px;padding:26px;box-shadow:0 24px 90px #11152655;color:var(--ink);max-width:min(94vw,1100px)}dialog::backdrop{background:#171931a8;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.image-dialog{width:1000px}.image-dialog .viewer-stage{height:70vh}.confirmation-dialog{width:520px}.confirmation-dialog h2{font-size:26px;line-height:1.25}.confirmation-dialog>p{margin:17px 0;color:#77809b;font-size:15px}.confirmation-dialog .note{margin-bottom:23px}.confirmation-dialog .button-row{justify-content:flex-end}.observation{background:linear-gradient(110deg,#eeebfb,#ecf2fc);color:#5a568a;border:1px solid #e3dff5;border-radius:10px;font-size:14px;flex-wrap:wrap}.observation strong{font-size:10px;color:#7866ad}.suggestions{gap:9px;margin:20px 0}.suggestions button{font-size:13px;color:#71619e;border-color:#ddd6ef;border-radius:9px;padding:10px 12px;background:#fcfbff}.suggestions button:hover{background:#efe9fd;border-color:#b8a8df}.user-message{background:#eeebfc;color:#4e467a;border-radius:13px 13px 3px;font-size:15px}.user-message strong{font-size:11px;color:#9585b6}.assistant-message{border-color:#e1def0;background:linear-gradient(130deg,#fff,#faf9ff);border-radius:13px;padding:22px}.assistant-message strong{font-size:14px;color:#625281}.answer-text{font-size:16px;line-height:1.85;color:#45506c;margin:17px 0}.source{background:#f3f1fa;border-radius:8px;padding:15px}.source p{font-size:14px;color:#6e6c87;line-height:1.75}.source strong{font-size:12px}.source small{font-size:11px;color:#9691aa}.source a{font-size:12px;color:#6f5cc6}.workflow-details{margin-top:13px;border-top:1px solid #e8e3f4;padding-top:3px}.workflow-details summary{font-size:12px;color:#9a91b0}.workflow-details p{font-size:12px;color:#8c829f}.trace{font-size:11px;color:#a398b7}.generating{font-size:14px;color:#7663ae}.generating .spin{color:#8165d8}.question-form input{font-size:15px}.question-form .primary{min-width:90px}.assistant .section-title{flex-wrap:wrap}.error{font-size:14px;background:#fff1ef;border-color:#f1cfc8;color:#a65045;border-radius:10px}.success{display:flex;align-items:center;gap:10px;margin-bottom:22px;border:1px solid #c7e9db;background:#edf9f2;color:#377963;padding:14px;border-radius:10px;font-size:14px}.success span{flex:1}.alert-row{border-color:#ebe7f3}.alert-row strong{font-size:15px;color:#5b527b}.alert-row p{font-size:12px;color:#8b85a0}.performance-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.performance-grid p{font-size:13px;color:#82829a}.performance-grid .section-title h2{font-size:18px}.performance-grid .section-title{flex-wrap:wrap}.matrix small{font-size:11px;color:#9290a7}.matrix b{font-size:24px;background:#fff0e5;color:#a77e5c}.matrix b.correct{background:#eeebfa;color:#7961b2}dl>div{font-size:12px;border-color:#e9e6f0}dt{color:#9288a3}dd{color:#6e5f86}.about p{font-size:15px;color:#7a7791;line-height:1.85}.about h3{font-size:17px;color:#6e608b}.source-link strong{font-size:15px;color:#71658c}.source-link small{font-size:12px;color:#9b91ac}.source-link{border-color:#ece7f1}.about .note{font-size:13px}.muted{color:var(--muted)}footer{color:#9290a8;font-size:12px;border-color:#dddbea;padding:23px 0}.setup-icon{width:57px;height:57px;background:linear-gradient(125deg,#eee6ff,#e5f0ff);color:#8061c7;border-radius:16px;display:grid;place-items:center}.cloud-setup{padding:36px}.cloud-setup>.eyebrow{display:block;margin-top:25px}.cloud-setup>h2{font-size:30px;margin-bottom:17px}.cloud-setup>p{max-width:760px;color:var(--muted);font-size:16px;line-height:1.8}.setup-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:32px 0}.setup-grid>div{padding:23px;background:#f7f5fd;border:1px solid #e4ddf4;border-radius:12px}.setup-grid b{color:#a396c5;font-size:13px}.setup-grid h3{font-size:17px;margin:15px 0 9px}.setup-grid p{font-size:14px;color:#9286a6;line-height:1.7}.login-form{max-width:440px;margin:28px 0}.login-form .text-button{margin-left:16px}.team-toolbar{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin:20px 0;color:#7d719b;font-size:13px}.team-toolbar>div:first-child{display:flex;align-items:center;gap:10px;flex:1}.team-toolbar>span:first-child{flex:1}.shared-images{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:20px 0}.shared-images img{width:100%;height:320px;object-fit:contain;background:#f2eff8;border-radius:12px}.cloud-message{padding:15px 17px;border:1px solid #e6e1ee;border-radius:10px;margin:12px 0;color:#7b6a8c;font-size:15px;white-space:pre-wrap}.cloud-message small{font-size:11px;color:#aa9bb6}.section-gap{margin:27px 0 16px}.benchmark-intro{display:flex;align-items:center;gap:25px;background:linear-gradient(115deg,#eeebff,#eff5ff);border-color:#d8d4f0}.benchmark-intro h2{font-size:27px;color:#594c80}.benchmark-intro p{font-size:15px;color:#82729d;line-height:1.8;max-width:850px;margin-top:14px}.benchmark-intro>svg{color:#a28cc9;flex-shrink:0}.training-steps{display:grid;gap:10px;margin-bottom:24px}.training-steps details{border:1px solid #e5dff0;border-radius:10px;background:#faf8fd;padding:7px 17px}.training-steps summary{display:flex;align-items:center;gap:14px;color:#75608f;font-size:15px;list-style:none}.training-steps summary>span{font-size:11px;border:1px solid #dcd0eb;color:#ac8cbb;border-radius:50%;width:28px;height:28px;display:grid;place-items:center}.training-steps details p{margin:5px 0 15px 43px;font-size:14px;color:#8b789e;line-height:1.75}.content{animation:page-in .28s ease-out}.card{animation:card-in .32s ease-out both}.stats-grid .card:nth-child(2){animation-delay:35ms}.stats-grid .card:nth-child(3){animation-delay:.07s}.stats-grid .card:nth-child(4){animation-delay:.105s}@keyframes page-in{0%{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes card-in{0%{opacity:.5;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}@keyframes float-image{0%,to{transform:rotate(-4deg) translateY(0)}50%{transform:rotate(-3deg) translateY(-6px)}}@keyframes scan-sweep{0%,to{top:25%;opacity:.5}50%{top:75%;opacity:1}}@media(min-width:901px){.sidebar{width:250px}main{margin-left:250px}.content,.topbar{padding-left:32px;padding-right:32px}.inspection-grid{grid-template-columns:310px minmax(0,1fr)}}@media(max-width:1250px){.performance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-grid{grid-template-columns:1fr}.hero-card{min-height:290px}.hero-card h2{font-size:31px}.scan-visual{width:26%;top:23px;bottom:23px;right:35px}.readiness{display:none}.gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.setup-grid{grid-template-columns:1fr}.page-heading h1{font-size:34px}.section-title{flex-wrap:wrap}}@media(max-width:900px){.sidebar{width:205px}main{margin-left:205px}.sidebar nav button{font-size:12px;padding:11px 8px}.content{padding:26px 22px 0}.inspection-grid{grid-template-columns:1fr}.upload-card .gallery{grid-template-columns:repeat(4,minmax(0,1fr))}.performance-grid{grid-template-columns:1fr}.viewer-stage{height:380px}.stats-grid{grid-template-columns:repeat(2,1fr)}.card{padding:22px}.hero-card h2{font-size:27px}}@media(max-width:680px){.sidebar{width:100%;position:relative;padding:18px 18px 0}.sidebar nav{overflow:auto}.sidebar nav button{font-size:12px;padding:10px;min-height:40px}.brand{margin-bottom:18px}.brand>div{font-size:23px}main{margin:0}.content{padding:24px 16px 0}.page-heading h1{font-size:31px}.page-heading>div>p:last-child{font-size:15px}.card{padding:19px;border-radius:13px}.topbar{padding:0 17px;height:53px}.environment{font-size:8px}.stats-grid{gap:11px}.stat strong{font-size:31px}.stat small{font-size:11px}.hero-card{min-height:330px;padding:24px}.hero-card h2{font-size:27px;max-width:70%}.hero-card p{font-size:13px;max-width:68%}.scan-visual{width:23%;right:18px;top:80px;bottom:85px}.gallery,.upload-card .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.sample img{height:135px}.viewer-controls{justify-content:center}.viewer-stage{height:300px}.viewer-label{font-size:8px}.section-title h2{font-size:19px}.section-title p{font-size:13px}.result-banner{flex-wrap:wrap}.result-banner h2{font-size:22px}.result-banner p{font-size:12px}.score-grid strong{font-size:23px}.score-grid small{font-size:11px}.observation{font-size:13px}.assistant-message{padding:16px}.answer-text{font-size:15px}.assistant-message>div:first-child{flex-wrap:wrap;gap:10px}.suggestions button{font-size:12px}.shared-images{grid-template-columns:1fr}.benchmark-intro>svg{display:none}.benchmark-intro h2{font-size:24px}.cloud-setup{padding:23px}.cloud-setup>h2{font-size:26px}.team-toolbar>.secondary{font-size:12px}.confirmation-dialog{padding:23px}.confirmation-dialog h2{font-size:24px}footer{font-size:10px}.source-link strong{font-size:14px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}.tutorial-dialog{width:min(650px,calc(100vw - 32px));max-height:88dvh;box-sizing:border-box;border:1px solid #dcd8ef;border-radius:20px;padding:28px;margin:auto;background:#fff;color:#29344f;box-shadow:0 24px 90px #11152655;overflow:auto}.tutorial-top,.tutorial-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.tutorial-progress{display:block;width:100%;height:6px;margin:18px 0 23px;accent-color:#6556e8}.tutorial-icon{width:58px;height:58px;border-radius:16px;background:linear-gradient(120deg,#eee8ff,#e9f0ff);color:#6556e8;display:grid;place-items:center;margin-bottom:18px}.tutorial-dialog h2{font-size:27px;line-height:1.25;margin:0 0 12px}.tutorial-dialog h2:focus{outline:none}.tutorial-dialog>p{font-size:16px;line-height:1.65;color:#5c6680}.tutorial-points{padding-left:22px;margin:18px 0 26px;color:#56617b;font-size:15px;line-height:1.75}.tutorial-points li+li{margin-top:12px}.tutorial-footer{border-top:1px solid #e8e3f4;padding-top:18px}.tutorial-footer .button-row{margin:0}.tutorial-footer button{min-height:42px}@media(max-width:680px){.tutorial-dialog{padding:20px;max-height:90dvh}.tutorial-dialog h2{font-size:23px}.tutorial-points{font-size:14px}.tutorial-footer{gap:10px}.tutorial-footer .button-row{gap:8px}}.guided-coach{position:sticky;top:12px;z-index:5;margin-bottom:28px;padding:20px 24px!important;border-color:#b9aff5!important;box-shadow:0 8px 28px #43377d18}.guided-coach .section-title{margin-bottom:10px}.guided-coach .subtle-tag{display:inline-flex;gap:7px;align-items:center}.guided-coach progress{display:block;width:100%;height:5px;accent-color:#6556e8;margin:8px 0 14px}.guided-coach h2{font-size:22px;margin:0 0 9px}.guided-coach h2:focus{outline:none}.guided-coach p{font-size:15px;line-height:1.6;margin:0 0 10px}.guided-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.guided-footer small{color:#5c6680}.guided-target{outline:3px solid #7867ee;outline-offset:5px;scroll-margin-top:270px}.guided-practice .card{margin-bottom:28px}.guided-practice .guided-photo{padding:12px;margin:20px 0}.guided-photo>img{display:block;width:100%;max-height:210px;object-fit:contain;margin-bottom:15px}.guided-thumb{width:110px;height:110px;object-fit:contain;border-radius:12px;background:#f3f1fb}.guided-practice .login-form{max-width:650px}.guided-practice .guided-target>button{scroll-margin-top:270px}.guided-practice textarea{min-height:90px}.guided-practice form>button{margin-top:10px}@media(max-width:680px){.guided-coach{position:static;padding:18px!important}.guided-coach h2{font-size:20px}.guided-coach p{font-size:14px}.guided-footer{gap:8px}.guided-target{scroll-margin-top:20px}.guided-practice .inspection-grid{min-width:0}.guided-practice .card{overflow-wrap:anywhere}}
|
frontend/dist/index.html
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="theme-color" content="#132e32"/><meta name="description" content="Local visual anomaly inspection with traceable evidence."/><title>DefectRAG · Inspection intelligence</title><link rel="icon" type="image/svg+xml" href="./logo.svg"><script src="./config.js"></script> <script type="module" crossorigin src="./assets/index-
|
| 2 |
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
| 3 |
</head><body><div id="root"></div></body></html>
|
|
|
|
| 1 |
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="theme-color" content="#132e32"/><meta name="description" content="Local visual anomaly inspection with traceable evidence."/><title>DefectRAG · Inspection intelligence</title><link rel="icon" type="image/svg+xml" href="./logo.svg"><script src="./config.js"></script> <script type="module" crossorigin src="./assets/index-DEvENDvs.js"></script>
|
| 2 |
+
<link rel="stylesheet" crossorigin href="./assets/index-jDRMwSe5.css">
|
| 3 |
</head><body><div id="root"></div></body></html>
|