1import{j as e,ax as K,r,t as P,cY as pe,u as he,x as v,a as je,aG as fe,aW as p,h as x,J as A,T as k,V as N,X as I,l as H,ar as z,as as $,at as L,au as O,av as V,aB as R,a4 as Q,ae as U,af as B,ag as S,ah as g,ai as F,aj as u,aE as Z,S as ge,aI as W,a5 as ve}from"./index-f--GfbGy.js";import{P as _e}from"./PageHeader-mOtZbH7v.js";import{S as M}from"./StatusIndicator-o013Wp0c.js";import{M as w}from"./MetricTile-BVKKajTg.js";import{A as Ne}from"./AuditTimeline-CfnYq0cH.js";import{T as be,a as ye,b as C,c as T}from"./tabs-CmG3F9Ix.js";import{f as G}from"./formatLabel-CMSDlo_u.js";import{E as Se}from"./external-link-7pLn2YZK.js";import{C as ee}from"./copy-D9uAtglO.js";import{S as se}from"./shield-alert-BjKT2OpB.js";import{T as ae}from"./trash-2-fBtMVbd8.js";import"./arrow-down-right-Dxg9oe8j.js";import"./arrow-up-right-BqiJ1OMg.js";import"./minus-Bd0WhWeS.js";import"./JsonViewer-DZEoOFRK.js";const we={super_admin:"border-warning/40 bg-warning/10 text-warning",support_admin:"border-info/40 bg-info/10 text-info",billing_admin:"border-info/40 bg-info/10 text-info",org_admin:"border-primary/40 bg-primary/10 text-primary",manager:"border-primary/30 bg-primary/5 text-primary",staff:"border-muted-foreground/30 bg-muted text-foreground",org_staff:"border-muted-foreground/30 bg-muted text-foreground",support_agent:"border-info/30 bg-info/5 text-info",support:"border-info/30 bg-info/5 text-info",api_only:"border-muted-foreground/30 bg-muted text-muted-foreground",owner:"border-success/40 bg-success/10 text-success",claimant:"border-muted-foreground/30 bg-muted text-muted-foreground"};function Ce({role:s}){const t=we[s]??"border-muted-foreground/30 bg-muted text-muted-foreground";return e.jsx(K,{variant:"outline",className:`${t} text-[10px] uppercase tracking-wider font-medium`,children:s.replace(/_/g," ")})}const Te=pe("relative w-full rounded-lg border p-4 [&>svg~*]:ps-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:start-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),J=r.forwardRef(({className:s,variant:t,...a},d)=>e.jsx("div",{ref:d,role:"alert",className:P(Te({variant:t}),s),...a}));J.displayName="Alert";const X=r.forwardRef(({className:s,...t},a)=>e.jsx("h5",{ref:a,className:P("mb-1 font-medium leading-none tracking-tight",s),...t}));X.displayName="AlertTitle";const q=r.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:P("text-sm [&_p]:leading-relaxed",s),...t}));q.displayName="AlertDescription";const te=[{value:"okta",label:"Okta"},{value:"azure_ad",label:"Azure AD"},{value:"google",label:"Google Workspace"},{value:"onelogin",label:"OneLogin"},{value:"generic",label:"Generic"}],ie=["org_admin","manager","staff","support_agent","api_only"];function Y({label:s,value:t}){return e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:s}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{readOnly:!0,value:t,className:"font-mono text-xs"}),e.jsx(v,{size:"sm",variant:"outline",onClick:()=>{navigator.clipboard.writeText(t),x.success("Copied")},children:e.jsx(ee,{className:"h-3 w-3"})})]})]})}function Ye(){const{orgId:s,connectionId:t}=he(),[a,d]=r.useState(null),[n,m]=r.useState({domains:0,mappings:0,attempts:0}),[i,h]=r.useState([]),[l,b]=r.useState([]),[o,j]=r.useState([]),[c,E]=r.useState(null),[f,re]=r.useState([]),[ne,le]=r.useState(""),D=async()=>{if(!(!s||!t))try{const[_,ce,de,oe,xe,me,ue]=await Promise.all([p.getSso(s,t),p.listSsoDomains(s,t),p.listSsoMappings(s,t),p.listSsoAttempts(s,t,50),p.getSsoSecurity(s,t),H.from("organizations").select("name").eq("id",s).maybeSingle(),H.from("audit_logs").select("*").eq("organization_id",s).like("action","sso.%").order("created_at",{ascending:!1}).limit(50)]);d(_.sso),m(_.counts),h(ce.domains),b(de.mappings),j(oe.attempts),E(xe.security),le(me.data?.name??""),re((ue.data??[]).map(y=>({id:y.id,actor:y.actor_user_id?`user:${y.actor_user_id.slice(0,8)}`:"system",action:y.action,entity:y.target_id?`${y.target_type}:${y.target_id.slice(0,8)}`:void 0,at:y.created_at,payload:y.metadata})))}catch(_){x.error(_.message)}};return r.useEffect(()=>{D()},[s,t]),!a||!s||!t?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}):e.jsxs("div",{children:[e.jsx(v,{variant:"ghost",size:"sm",asChild:!0,className:"mb-2",children:e.jsxs(je,{to:`/admin/organizations/${s}`,children:[e.jsx(fe,{className:"me-1 h-4 w-4"}),ne||"Organization"]})}),e.jsx(_e,{title:a.display_name||`${a.provider.toUpperCase()} connection`,description:`${te.find(_=>_.value===a.idp_type)?.label??"Generic"} · ${a.provider.toUpperCase()}`,actions:e.jsxs(v,{size:"sm",variant:"outline",onClick:async()=>{try{const _=await p.testSso(s,t);x.success("Test login recorded"),_.redirect_url&&window.open(_.redirect_url,"_blank"),D()}catch(_){x.error(_.message)}},children:[e.jsx(Se,{className:"me-1 h-3 w-3"}),"Test login"]})}),e.jsx(Ae,{conn:a,security:c,domains:i,mappings:l}),e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsx(M,{variant:"soft",tone:a.status==="active"?"success":"warning",label:G(a.status)}),e.jsx(M,{variant:"soft",tone:c?.domain_status==="verified"?"success":c?.domain_status==="partial"?"warning":"muted",label:`Domains ${c?.domain_status??"â"}`}),e.jsx(M,{variant:"soft",tone:c?.metadata_status==="configured"?"success":"warning",label:`Metadata ${c?.metadata_status??"â"}`}),e.jsx(M,{variant:"soft",tone:c?.cert_status==="ok"?"success":c?.cert_status==="expiring"?"warning":c?.cert_status==="expired"?"danger":"muted",label:`Cert ${c?.cert_status??"â"}`}),e.jsx(M,{variant:"soft",tone:a.enforce_mfa?"success":"muted",label:`MFA ${a.enforce_mfa?"enforced":"off"}`})]}),e.jsxs(be,{defaultValue:"overview",children:[e.jsxs(ye,{className:"flex-wrap h-auto",children:[e.jsx(C,{value:"overview",children:"Overview"}),e.jsx(C,{value:"idp",children:"Identity provider"}),e.jsxs(C,{value:"domains",children:["Domains (",n.domains,")"]}),e.jsx(C,{value:"certificates",children:"Certificates"}),e.jsxs(C,{value:"mappings",children:["Mappings (",n.mappings,")"]}),e.jsx(C,{value:"provisioning",children:"Provisioning"}),e.jsx(C,{value:"security",children:"Security"}),e.jsx(C,{value:"audit",children:"Audit"})]}),e.jsx(T,{value:"overview",children:e.jsx(A,{children:e.jsxs(k,{className:"space-y-4 pt-4",children:[e.jsx(Y,{label:"ACS URL (Reply URL)",value:a.acs_url}),e.jsx(Y,{label:"Entity ID (Audience)",value:a.entity_id}),e.jsxs("div",{className:"rounded-md border bg-surface p-3 text-xs text-muted-foreground space-y-1.5",children:[e.jsx("div",{className:"font-medium text-foreground",children:"IdP setup checklist"}),e.jsxs("div",{children:["1. Add an Application of type ",a.provider.toUpperCase()," in your IdP."]}),e.jsx("div",{children:"2. Set the ACS URL and Entity ID above."}),e.jsx("div",{children:"3. Upload IdP metadata in the Identity Provider tab."}),e.jsx("div",{children:"4. Verify your email domains in the Domains tab."}),e.jsx("div",{children:"5. Map IdP groups to lo.st roles in the Mappings tab."}),e.jsx("div",{children:"6. Run a test login from the page header."})]})]})})}),e.jsx(T,{value:"idp",children:e.jsx(ke,{orgId:s,connectionId:t,conn:a,onSaved:D})}),e.jsx(T,{value:"domains",children:e.jsx(De,{orgId:s,connectionId:t,domains:i,onChange:D})}),e.jsx(T,{value:"certificates",children:e.jsx(Me,{orgId:s,connectionId:t,conn:a,onSaved:D})}),e.jsx(T,{value:"mappings",children:e.jsx(Ie,{orgId:s,connectionId:t,mappings:l,onChange:D})}),e.jsx(T,{value:"provisioning",children:e.jsx(Ee,{orgId:s,connectionId:t,conn:a,onSaved:D})}),e.jsx(T,{value:"security",children:e.jsx(Re,{security:c,attempts:o})}),e.jsx(T,{value:"audit",children:e.jsx(A,{children:e.jsx(k,{className:"pt-4",children:e.jsx(Ne,{entries:f})})})})]})]})}function Ae({conn:s,security:t,domains:a,mappings:d}){const n=[];return t?.cert_status==="expiring"&&n.push({title:"Signing certificate expiring soon",desc:`Expires in ${t.cert_expires_in_days} day(s). Upload a rollover certificate.`}),t?.cert_status==="expired"&&n.push({title:"Signing certificate expired",desc:"Single sign-on will fail until a new certificate is uploaded."}),a.length>0&&t?.domain_status!=="verified"&&n.push({title:"Unverified domains",desc:"Some domains have not completed DNS verification."}),s.jit_enabled&&d.length===0&&!s.jit_default_role&&n.push({title:"JIT provisioning has no role",desc:"Set a default role or define group mappings before enabling JIT."}),n.length===0?null:e.jsxs(J,{variant:"destructive",className:"mb-4",children:[e.jsx(se,{className:"h-4 w-4"}),e.jsx(X,{children:"Action required"}),e.jsx(q,{children:e.jsx("ul",{className:"mt-1 list-disc ps-4 text-xs",children:n.map((m,i)=>e.jsxs("li",{children:[e.jsxs("span",{className:"font-medium",children:[m.title,"."]})," ",m.desc]},i))})})]})}function ke({orgId:s,connectionId:t,conn:a,onSaved:d}){const[n,m]=r.useState(a.idp_type??"generic"),[i,h]=r.useState(a.display_name??""),[l,b]=r.useState(a.metadata_url??""),[o,j]=r.useState(a.metadata_xml??""),[c,E]=r.useState(!1);return e.jsx(A,{children:e.jsxs(k,{className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Identity provider"}),e.jsxs(z,{value:n,onValueChange:m,children:[e.jsx($,{children:e.jsx(L,{})}),e.jsx(O,{children:te.map(f=>e.jsx(V,{value:f.value,children:f.label},f.value))})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Display name"}),e.jsx(I,{value:i,onChange:f=>h(f.target.value),placeholder:"Acme Okta"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Metadata URL"}
1),e.jsx(I,{value:l,onChange:f=>b(f.target.value),placeholder:"https://idp.example.com/metadata"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Or paste IdP metadata XML / JSON"}),e.jsx(R,{rows:8,value:o,onChange:f=>j(f.target.value),className:"font-mono text-xs"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(v,{size:"sm",disabled:c,onClick:async()=>{E(!0);try{await p.updateSso(s,t,{idp_type:n,display_name:i||null,metadata_url:l||null,metadata_xml:o||null}),x.success("Saved"),d()}catch(f){x.error(f.message)}finally{E(!1)}},children:"Save"})})]})})}function De({orgId:s,connectionId:t,domains:a,onChange:d}){const[n,m]=r.useState("");return e.jsx(A,{children:e.jsxs(k,{className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{value:n,onChange:i=>m(i.target.value),placeholder:"corp.example.com"}),e.jsxs(v,{size:"sm",onClick:async()=>{if(n.trim())try{await p.addSsoDomain(s,t,n.trim()),m(""),d()}catch(i){x.error(i.message)}},children:[e.jsx(Q,{className:"me-1 h-3 w-3"}),"Add domain"]})]}),e.jsxs(U,{children:[e.jsx(B,{children:e.jsxs(S,{children:[e.jsx(g,{children:"Domain"}),e.jsx(g,{children:"TXT record"}),e.jsx(g,{children:"Status"}),e.jsx(g,{children:"Verified"}),e.jsx(g,{className:"w-32"})]})}),e.jsxs(F,{children:[a.length===0&&e.jsx(S,{children:e.jsx(u,{colSpan:5,className:"text-center text-xs text-muted-foreground",children:"No domains"})}),a.map(i=>e.jsxs(S,{children:[e.jsx(u,{className:"text-xs font-medium",children:i.domain}),e.jsx(u,{className:"font-mono text-[11px] text-muted-foreground",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"truncate max-w-[200px]",children:i.txt_token}),e.jsx(v,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:()=>{navigator.clipboard.writeText(i.txt_token),x.success("Copied")},children:e.jsx(ee,{className:"h-3 w-3"})})]})}),e.jsx(u,{children:e.jsx(M,{variant:"soft",tone:i.status==="verified"?"success":"warning",label:G(i.status)})}),e.jsx(u,{className:"text-xs text-muted-foreground",children:i.verified_at?Z(new Date(i.verified_at),{addSuffix:!0}):"â"}),e.jsxs(u,{className:"text-end",children:[i.status!=="verified"&&e.jsx(v,{size:"sm",variant:"outline",onClick:async()=>{try{await p.verifySsoDomain(s,t,i.id),x.success("Verified"),d()}catch(h){x.error(h.message)}},children:"Verify"}),e.jsx(v,{size:"icon",variant:"ghost",onClick:async()=>{try{await p.removeSsoDomain(s,t,i.id),d()}catch(h){x.error(h.message)}},children:e.jsx(ae,{className:"h-3 w-3"})})]})]},i.id))]})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Add a TXT record at ",e.jsx("span",{className:"font-mono",children:"_lost-verify.<domain>"})," with the token shown above, then click Verify."]})]})})}function Me({orgId:s,connectionId:t,conn:a,onSaved:d}){const[n,m]=r.useState(a.certificate??""),[i,h]=r.useState(a.certificate_expires_at?a.certificate_expires_at.slice(0,10):""),[l,b]=r.useState(a.certificate_rollover??""),o=a.certificate_expires_at?Math.floor((new Date(a.certificate_expires_at).getTime()-Date.now())/864e5):null;return e.jsx(A,{children:e.jsxs(k,{className:"space-y-4 pt-4",children:[o!==null&&o<30&&e.jsxs(J,{variant:"destructive",children:[e.jsx(se,{className:"h-4 w-4"}),e.jsxs(X,{children:["Certificate ",o<0?"expired":"expiring soon"]}),e.jsx(q,{className:"text-xs",children:o<0?"Sign-ins will fail until a new certificate is installed.":`Expires in ${o} day(s). Stage a rollover certificate now.`})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Active signing certificate (PEM)"}),e.jsx(R,{rows:8,value:n,onChange:j=>m(j.target.value),className:"font-mono text-[11px]",placeholder:"-----BEGIN CERTIFICATE-----"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Expiry date"}),e.jsx(I,{type:"date",value:i,onChange:j=>h(j.target.value)})]}),e.jsx("div",{className:"flex items-end",children:o!==null&&e.jsxs(K,{variant:"outline",className:"text-[11px]",children:[e.jsx(ge,{className:"me-1 h-3 w-3"}),o>=0?`${o}d remaining`:`Expired ${Math.abs(o)}d ago`]})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Rollover certificate (next, optional)"}
1),e.jsx(R,{rows:6,value:l,onChange:j=>b(j.target.value),className:"font-mono text-[11px]"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(v,{size:"sm",onClick:async()=>{try{await p.updateSso(s,t,{certificate:n||null,certificate_expires_at:i?new Date(i).toISOString():null,certificate_rollover:l||null}),x.success("Saved"),d()}catch(j){x.error(j.message)}},children:"Save certificates"})})]})})}function Ie({orgId:s,connectionId:t,mappings:a,onChange:d}){const[n,m]=r.useState(""),[i,h]=r.useState("staff");return e.jsx(A,{children:e.jsxs(k,{className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{value:n,onChange:l=>m(l.target.value),placeholder:"IdP group (e.g. lost-admins)",className:"flex-1"}),e.jsxs(z,{value:i,onValueChange:h,children:[e.jsx($,{className:"w-44",children:e.jsx(L,{})}),e.jsx(O,{children:ie.map(l=>e.jsx(V,{value:l,children:l},l))})]}),e.jsxs(v,{size:"sm",onClick:async()=>{if(n.trim())try{await p.addSsoMapping(s,t,n.trim(),i),m(""),d()}catch(l){x.error(l.message)}},children:[e.jsx(Q,{className:"me-1 h-3 w-3"}),"Add mapping"]})]}),e.jsxs(U,{children:[e.jsx(B,{children:e.jsxs(S,{children:[e.jsx(g,{children:"IdP group"}),e.jsx(g,{children:"lo.st role"}),e.jsx(g,{className:"w-12"})]})}),e.jsxs(F,{children:[a.length===0&&e.jsx(S,{children:e.jsx(u,{colSpan:3,className:"text-center text-xs text-muted-foreground",children:"No mappings"})}),a.map(l=>e.jsxs(S,{children:[e.jsx(u,{className:"text-xs font-mono",children:l.idp_group}),e.jsx(u,{children:e.jsx(Ce,{role:l.app_role})}),e.jsx(u,{children:e.jsx(v,{size:"icon",variant:"ghost",onClick:async()=>{try{await p.removeSsoMapping(s,t,l.id),d()}catch(b){x.error(b.message)}},children:e.jsx(ae,{className:"h-3 w-3"})})})]},l.id))]})]})]})})}function Ee({orgId:s,connectionId:t,conn:a,onSaved:d}){const[n,m]=r.useState(!!a.jit_enabled),[i,h]=r.useState(a.jit_default_role??"staff"),[l,b]=r.useState(!!a.enforce_mfa),[o,j]=r.useState(a.session_timeout_minutes??480);return e.jsx(A,{children:e.jsxs(k,{className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Just-in-time provisioning"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Auto-create users on first SSO login."})]}),e.jsx(W,{checked:n,onCheckedChange:m})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Default role for new users"}),e.jsxs(z,{value:i,onValueChange:h,children:[e.jsx($,{className:"w-60",children:e.jsx(L,{})}),e.jsx(O,{children:ie.map(c=>e.jsx(V,{value:c,children:c},c))})]})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Enforce MFA"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Require multi-factor authentication for SSO users."})]}),e.jsx(W,{checked:l,onCheckedChange:b})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{children:"Session timeout (minutes)"}),e.jsx(I,{type:"number",min:5,max:10080,value:o,onChange:c=>j(parseInt(c.target.value||"480",10)),className:"w-40"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(v,{size:"sm",onClick:async()=>{try{await p.updateSso(s,t,{jit_enabled:n,jit_default_role:i,enforce_mfa:l,session_timeout_minutes:o}),x.success("Saved"),d()}catch(c){x.error(c.message)}},children:"Save"})})]})})}function Re({security:s,attempts:t}){return s?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[e.jsx(w,{label:"Last successful login",value:s.last_login_at?Z(new Date(s.last_login_at),{addSuffix:!0}):"â"}),e.jsx(w,{label:"Failed (24h)",value:s.failed_24h,hint:"Sign-in failures"}),e.jsx(w,{label:"Active sessions",value:s.active_sessions}),e.jsx(w,{label:"Avg session",value:`${s.avg_session_minutes}m`}),e.jsx(w,{label:"MFA enforcement",value:s.mfa_enforced?"Required":"Optional"}),e.jsx(w,{label:"Domain status",value:s.domain_status}),e.jsx(w,{label:"IdP metadata",value:s.metadata_status}),e.jsx(w,{label:"Cert expiry",value:s.cert_expires_in_days===null?"â":`${s.cert_expires_in_days}d`,hint:s.cert_status})]}),e.jsx(A,{children:e.jsxs(k,{className:"pt-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"Recent login attempts"}),e.jsxs(U,{children:[e.jsx(B,{children:e.jsxs(S,{children:[e.jsx(g,{children:"When"}),e.jsx(g,{children:"Email"}),e.jsx(g,{children:"Status"}),e.jsx(g,{children:"IP"}),e.jsx(g,{children:"Error"})]})}),e.jsxs(F,{children:[t.length===0&&e.jsx(S,{children:e.jsx(u,{colSpan:5,className:"text-center text-xs text-muted-foreground",children:"No attempts"})}),t.map(a=>e.jsxs(S,{children:[e.jsx(u,{className:"text-xs text-muted-foreground",children:ve(new Date(a.created_at),"MMM d, HH:mm:ss")}),e.jsx(u,{className:"text-xs font-mono",children:a.email??"â"}),e.jsx(u,{children:e.jsx(M,{variant:"soft",tone:a.status==="success"?"success":a.status==="failure"?"danger":"info",label:G(a.status)})}),e.jsx(u,{className:"text-xs font-mono",children:a.ip??"â"}),e.jsx(u,{className:"text-xs text-muted-foreground",children:a.error??"â"})]},a.id))]})]})]})})]}):e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"})}export{Ye as default};
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.