1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fd54c747-a771-40e6-9cae-d78861d231db",e._sentryDebugIdIdentifier="sentry-dbid-fd54c747-a771-40e6-9cae-d78861d231db")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9676],{59676:(e,t,s)=>{s.r(t),s.d(t,{InterpretationGuide:()=>p});var a=s(95155),r=s(12115),n=s(92571);let l=(0,s(30772).A)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);var i=s(40557),d=s(12363),c=s(76721),x=s(64577),o=s(9005),m=s(99028);function p({modality:e,peaks:t,data:s,activeRegion:d,onSelectRegion:c}){let[x,o]=(0,r.useState)(null),[h,g]=(0,r.useState)([]),[b,f]=(0,r.useState)(""),[j,y]=(0,r.useState)(!1),N=(0,r.useRef)(0);return((0,r.useEffect)(()=>{let a=++N.current;y(!0),(0,m.ms)(e,t,s).then(e=>{a===N.current&&(g(e.analyses),f(e.overallSummary))}).catch(()=>{a===N.current&&(g([]),f(""))}).finally(()=>{a===N.current&&y(!1)})},[e,t,s]),j&&0===h.length)?(0,a.jsxs)("div",{className:"p-4 flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)(n.A,{size:12,className:"animate-spin"}),"Analyzing regions..."]}):0===h.length?(0,a.jsx)("div",{className:"p-4 text-xs text-text-muted italic",children:"No diagnostic regions defined for this modality. Interpretation guides are available for FTIR, Raman, and UV-Vis spectra."}):(0,a.jsxs)("div",{className:"flex flex-col h-full overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-4 py-3 border-b border-border-subtle bg-surface-elevated/50 shrink-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)(l,{size:12,className:"text-amber shrink-0"}),(0,a.jsx)("span",{className:"text-[11px] font-semibold text-text-primary tracking-wide uppercase",children:"Overall Summary"})]}),(0,a.jsx)("p",{className:"text-xs text-text-secondary leading-relaxed",children:b})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,a.jsxs)("div",{className:"px-3 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)(i.A,{size:12,className:"text-text-muted shrink-0"}),(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted tracking-wider uppercase",children:"Diagnostic Regions"})]}),(0,a.jsx)("div",{className:"space-y-1",children:h.map(e=>(0,a.jsx)(u,{analysis:e,isActive:d?.name===e.region.name,isExpanded:x===e.region.name,onToggleSelect:()=>{d?.name===e.region.name?c(null):c(e.region)},onToggleExpand:()=>{o(x===e.region.name?null:e.region.name)}},e.region.name))})]})})]})}function u({analysis:e,isActive:t,isExpanded:s,onToggleSelect:r,onToggleExpand:n}){let l=e.lookForItems.filter(e=>e.matchFound).length,i=e.peaksFound.length;return(0,a.jsxs)("div",{className:`rounded-lg border transition-colors ${t?"border-accent/30 bg-accent/[0.04]":"border-border-subtle hover:border-border-subtle/80 bg-surface-elevated/30"}`,children:[(0,a.jsxs)("button",{onClick:r,className:"flex items-center gap-2 w-full px-3 py-2 text-left",children:[(0,a.jsx)("div",{className:`w-1.5 h-8 rounded-full shrink-0 transition-colors ${t?"bg-accent":i>0?"bg-cyan/40":"bg-border-subtle"}`}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:`text-xs font-medium truncate ${t?"text-accent":"text-text-primary"}`,children:e.region.name})}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted font-mono",children:[e.region.rangeMin,"â",e.region.rangeMax," ","cmâ»\xb9"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[i>0&&(0,a.jsxs)("span",{className:"text-[9px] font-medium text-cyan bg-cyan/10 rounded px-1.5 py-0.5",children:[i," peak",1!==i?"s":""]}),l>0&&(0,a.jsxs)("span",{className:"text-[9px] font-medium text-emerald-400 bg-emerald-400/10 rounded px-1.5 py-0.5",children:[l," match",1!==l?"es":""]})]})]}),(0,a.jsxs)("button",{onClick:n,className:"flex items-center gap-1 w-full px-3 py-1 text-[10px] text-text-muted hover:text-text-secondary transition-colors border-t border-border-subtle/50",children:[s?(0,a.jsx)(d.A,{size:12}):(0,a.jsx)(c.A,{size:12}),(0,a.jsx)("span",{children:s?"Hide details":"Show details"})]}),s&&(0,a.jsxs)("div",{className:"px-3 pb-3 space-y-3 border-t border-border-subtle/50",children:[(0,a.jsx)("p",{className:"text-[11px] text-text-secondary leading-relaxed pt-2",children:e.region.description}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted tracking-wider up
1percase",children:"What to Look For"}),(0,a.jsx)("div",{className:"mt-1 space-y-0.5",children:e.lookForItems.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start gap-2 py-0.5",children:[e.matchFound?(0,a.jsx)(x.A,{size:12,className:"text-emerald-400 shrink-0 mt-0.5"}):(0,a.jsx)(o.A,{size:12,className:"text-text-muted/40 shrink-0 mt-0.5"}),(0,a.jsx)("span",{className:`text-[11px] leading-relaxed ${e.matchFound?"text-text-primary":"text-text-muted"}`,children:e.text})]},t))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted tracking-wider uppercase",children:"What We Found"}),(0,a.jsx)("p",{className:"text-[11px] text-text-secondary leading-relaxed mt-1",children:e.summary})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted tracking-wider uppercase",children:"Interpretation"}),(0,a.jsx)("p",{className:"text-[11px] text-text-secondary leading-relaxed mt-1",children:e.interpretation})]})]})]})}}}]);
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.