deepbom 1.105.0 → 1.106.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/bin/deepbom.mjs +2 -2
- package/package.json +1 -1
- package/pkg/release-manifest.json +3 -3
- package/pkg/tflite_wasm_audit_bg.wasm +0 -0
package/bin/deepbom.mjs
CHANGED
|
@@ -28,7 +28,7 @@ FT01 stores named tensor/blob data and does not serialize an execution graph.`}f
|
|
|
28
28
|
`)}function gc(e,t,n,i){let o=Ci.env[e];if(o===void 0||o==="")return t;let a=Number(o);if(!Number.isSafeInteger(a)||a<n||a>i)throw new Error(`${e} must be an integer from ${n} through ${i}.`);return a}function Gg(e){return e<1024*1024?`${Math.round(e/1024)} KiB`:`${Math.round(e/(1024*1024)*10)/10} MiB`}var Ro=Xg({id:"deepbom.agent_contract.v1",version:"1.0.2",compatibility:"backward_compatible_within_v1"}),Ka=Xg({id:"deepbom.artifact_evidence_envelope.v1",version:"1.0.0",compatibility:"additive_fields_only_within_v1",required_top_level_fields:["schema","generated_at","identity","artifact_set","conversion_receipt","cpu_cost_target_binding","accelerator_profile_binding","accelerator_bindings","policy_identity","capabilities","interfaces","graph","external_files","metadata","findings","format_extensions","provenance","evidence_boundary","envelope_sha256"],conditional_top_level_fields:["llm_token_budget_scenario","structured_details"],semantic_boundaries:["artifact_defects_cautions_and_evidence_gaps_remain_distinct","static_predictions_are_not_runtime_observations","unknown_and_not_assessable_are_not_coerced_to_absence_or_zero"]}),Nne=Ro.version;function Zg(e){return JSON.parse(JSON.stringify(e))}function Xg(e){if(!e||typeof e!="object"||Object.isFrozen(e))return e;Object.freeze(e);for(let t of Object.values(e))Xg(t);return e}var y3="deepbom.agent_capabilities.v1";function G1(e){if(e?.schema!=="deepbom.cli_capabilities.v1")throw new Error("Agent capability projection requires deepbom.cli_capabilities.v1.");let t=e.cli_version,n=`deepbom@${t}`;return{schema:y3,product:"DEEPBOM",version:t,agent_contract:Zg(Ro),evidence_schema_contract:Zg(Ka),purpose:"Evidence-bounded static analysis of serialized AI deployment artifacts through local tools or the ChatGPT browser sandbox.",selection:{use_when:["A supported serialized deployment artifact must be inspected without executing model code.","The task asks about graph or tensor contracts, MAC or symbolic-shape coverage, quantization, memory feasibility, accelerator eligibility, artifact diff, graph export, SARIF, or CycloneDX 1.7."],do_not_use_when:["The only input is a training checkpoint that would require deserializing executable Python or HDF5 state.","The requested conclusion is measured latency, energy, thermal behavior, task accuracy, clinical validity, or actual runtime assignment without imported evidence."]},invocation:{package:n,compatible_registry_package:"deepbom@latest",resolution_order:["DEEPBOM_BIN","bundled_npm_package","compatible_agent_contract_on_PATH","authorized_npm_download"],resolution_helper:"skills/deepbom/scripts/verify-deepbom.mjs",registry_download_default:"disabled_requires_explicit_allow_download",discovery:"deepbom capabilities --format agent-json",self_test:"deepbom self-test --compact",audit_template:'deepbom audit "<artifact>" --summary',download_fallback:"npx -y deepbom@latest",detail_strategy:"Request one section, JSON Pointer, or evidence envelope only after reading the bounded summary.",default_output:e.default_audit_output},inputs:e.inputs,outputs:e.output_contracts,evidence_contract:{finding_kinds:e.automation.finding_kinds,applicability_states:["NOT_APPLICABLE","NOT_ASSESSABLE","NOT_ASSESSED_YET"],required_answer_fields:["artifact_filename","artifact_sha256","artifact_format","analyzer_version","target_and_binding_source_when_applicable","assessment_coverage","defects_cautions_and_evidence_gaps_separately","reproduction_command"]},execution_boundary:{analysis_location:"local_process",hosted_analysis_endpoint:!1,artifact_bytes_network_transfer:!1,remote_inputs_require_immutable_identity:!0,runtime_measurement_inferred:!1,optional_browser_runtime_measurement:"separate_web_workspace_path_not_part_of_static_cli_or_agent_audit"},local_integrations:{codex:{path:".agents/skills/deepbom",automatic_matching:!0},claude_code:{path:".claude/skills/deepbom",automatic_matching:!0},claude_desktop:{distribution:"MCPB local desktop extension",release_asset:`https://github.com/JunHwan-Kwon/deepbom/releases/download/channels-v${t}/deepbom-${t}.mcpb`,automatic_matching:"host_dependent_after_installation"},generic:{path:"skills/deepbom",automatic_matching:"host_dependent"},install_preview:"deepbom integrate <codex|claude-code|generic>",install_apply:"deepbom integrate <codex|claude-code|generic> --apply"},chatgpt_integration:{status:"developer_mode_ready_public_listing_requires_openai_plugin_review",endpoint:"https://deepbom.org/mcp",transport:"streamable_http",primary_tool:"deepbom_analyze_file",input:"one ChatGPT-authorized attachment",execution_location:"chatgpt_browser_sandbox",result:"bounded hash-bound static evidence returned to the conversation",transfer_boundary:"the DEEPBOM service does not fetch or retain model bytes",use_local_instead_when:["the artifact or result fields are confidential","the artifact exceeds the browser or ChatGPT attachment boundary","the review needs package-directory, sharded-repository, or ONNX external-data closure","the workflow needs a complete evidence export or repeated automation"]},discovery:{agent_page:"https://deepbom.org/for-agents/",chatgpt_page:"https://deepbom.org/chatgpt/",chatgpt_mcp:"https://deepbom.org/mcp",machine_contract:"https://deepbom.org/agent-capabilities.json",plain_text:"https://deepbom.org/llms.txt",skill_source:"https://github.com/JunHwan-Kwon/deepbom/tree/main/skills/deepbom",portable_plugin_manifest:"https://github.com/JunHwan-Kwon/deepbom/blob/main/plugin.json",problem_guides:"https://deepbom.org/guides/",desktop_extension_release:`https://github.com/JunHwan-Kwon/deepbom/releases/tag/channels-v${t}`}}}import{createHash as A3}from"node:crypto";import{lstat as X1,mkdir as H1,readFile as v3,rename as Wg,rm as kp,rmdir as w3,writeFile as x3}from"node:fs/promises";import mt from"node:path";function V1(){let e="deepbom",t="npx -y deepbom@latest";return new Map([["SKILL.md",bc(["---","name: deepbom","description: Statically audit serialized AI model artifacts with the local DEEPBOM CLI. Use for TFLite, ONNX, Core ML, ExecuTorch, GGUF, or SafeTensors deployment review; bounded GraphDef, SavedModel, Keras-config, or PT2 declarative structure; HDF5 or PyTorch-checkpoint safe-envelope inspection; format-neutral model summaries, quantization, memory, diff, verification, graph, Model IR, monochrome document views, SARIF, or CycloneDX 1.7 output. Do not treat checkpoint envelopes as executable graphs or claim framework trainability, measured latency, task accuracy, safety, regulatory approval, standards conformance, or actual runtime placement without the required external evidence.","---","","# Audit deployment artifacts with DEEPBOM","","Run DEEPBOM locally for files in the workspace. Never upload artifact bytes or invent a hosted DEEPBOM endpoint. A separately connected ChatGPT integration may analyze one authorized attachment in its browser sandbox; that is a different execution boundary.","","## Resolve a verified runtime first","","Run `scripts/verify-deepbom.mjs` from this Skill directory before choosing an invocation. It checks, in order, `DEEPBOM_BIN`, the analyzer bundled with an npm installation, and a contract-compatible `deepbom` already on `PATH`. It does not access a package registry by default.","","If no compatible local installation is available, ask before running:","","```bash",'node "<skill-root>/scripts/verify-deepbom.mjs" --allow-download',"```","",`That explicit fallback may download \`deepbom@latest\` through npm. The resolver accepts it only when it declares Agent contract \`${Ro.id}\` version \`${Ro.version}\` and evidence contract \`${Ka.id}\` version \`${Ka.version}\`. Use the returned \`invocation.command\` and \`invocation.prefix_args\` for subsequent commands. Do not silently replace a contract mismatch or network failure with an unverified executable.`,"","## Start with discovery","","After resolving an engine compatible with the contract pinned by this Skill, discover its machine contract:","","```bash",`${e} capabilities --format agent-json`,"```","","Treat that machine document as authoritative for commands, supported inputs, scan modes, targets, outputs, and exit codes. Read `references/capability-selection.md` when deciding whether the task belongs to DEEPBOM.","","## Audit","","Start with the bounded human result:","","```bash",`${e} audit "./model.onnx" --summary`,"```","","Then request only the evidence needed by the question:","","```bash",`${e} audit "./model.onnx" --section quantization --json`,`${e} audit "./model.onnx" --pointer /mac_assessment --json`,`${e} audit "./model.onnx" --output-format envelope`,"```","","For a large GGUF or SafeTensors artifact, use `--scan structure` for inventory questions. Use `integrity` or `full` only when payload evidence is necessary.","","For a concise GGUF tensor table without nested numerical-integrity ledgers, use the bounded projection (it defaults to a structure scan):","","```bash",`${e} gguf "./model.gguf" --tensors`,`${e} gguf "./model.gguf" --tensors --compact`,`${e} gguf "./model.gguf" --tensors --compact --tensor-offset 100 --tensor-limit 100`,"```","","Before relying on any resolved installation, run:","","```bash",`${e} self-test --compact`,"```","","## Interpret the result","","Keep `artifact_defect`, `caution`, and `evidence_gap` separate. An evidence gap is not a defect. Preserve `NOT_APPLICABLE`, `NOT_ASSESSABLE`, and `NOT_ASSESSED_YET` instead of converting them to zero or absence.","","Read `references/evidence-semantics.md` before summarizing findings or target projections. Report at least:","","- artifact filename and SHA-256","- analyzer version","- artifact format","- target and binding source when target-dependent evidence is used","- assessed coverage and unresolved evidence","- defects, cautions, and evidence gaps as separate groups","- the exact reproduction command","","Never infer actual accelerator assignment, latency, energy, thermal behavior, task accuracy, clinical validity, or device fit from static output alone.","","## Compare or explain","","```bash",`${e} diff "./baseline.onnx" "./candidate.onnx" --summary`,`${e} diff "./baseline.gguf" "./candidate.gguf" --tensors --render markdown`,`${e} verify "./model.onnx" --bom "./supplied.cdx.json" --render markdown`,`${e} contract capture "./model.onnx" -o "./baseline.interface-contract.json"`,`${e} explain-rule <rule-id> --json`,`${e} graph "./model.onnx" --view structure --format svg -o graph.svg`,`${e} audit "./model.onnx" --section model_ir --compact`,`${e} model-summary "./model.onnx" --format table`,`${e} model-summary "./model.gguf" --level storage --format markdown`,`${e} visualize "./model.onnx" --view all --orientation portrait -o model-views.zip`,"```","","Use matching serialized deployment formats for diff. Treat `verify --bom` as a reconciliation of the selected component with artifact-observable facts, not a complete BOM or compliance verdict. An automatically captured contract is an artifact-derived baseline until it is separately reviewed and approved. `model_ir`, `model-summary`, and `visualize` are preview engineering projections whose loss ledger and evidence classes must be preserved. Model-summary storage is not framework trainability, and display order is not runtime order. Do not deserialize `.pth`, `.pt`, or `.h5`; use only the safe envelope and bind a conversion receipt to the deployed artifact when lineage is needed.","","## Handle failure","","Read `references/failure-recovery.md` when an invocation fails, exceeds a resource boundary, or returns exit code 2 or 3. Do not weaken a size, path, hash, or evidence boundary merely to force a complete result."])],["references/capability-selection.md",bc(["# Capability selection","","Use DEEPBOM when the subject is a serialized deployment artifact and the question can be answered from artifact bytes, an explicit target profile, or an imported evidence document.","","| Task | Use DEEPBOM | Boundary |","| --- | --- | --- |","| TFLite, ONNX, Core ML, or ExecuTorch graph and tensor audit | Yes | Static artifact evidence only |","| GGUF or SafeTensors storage, quantization, architecture, or memory lower bound | Yes | No executable graph is invented |","| GraphDef, first-MetaGraph SavedModel, Keras config, or PT2 declarative dependency review | Yes, preview | Only serialized bounded relationships; no framework construction or runtime-order claim |","| HDF5 or PyTorch checkpoint identity/archive/risk envelope | Yes, preview | No HDF5 object graph, checkpoint objects, tensor semantics, or executable graph claimed |","| Common Model IR or monochrome A4 engineering views | Yes, preview | Preserve source refs, evidence class, applicability, and loss ledger; no conformance or regulatory verdict |","| MAC and symbolic shape coverage | Yes | Preserve partial or symbolic status |","| Quantization contract review | Yes | Do not infer task accuracy |","| Accelerator eligibility or selected-build evidence | Yes | Eligibility is not observed assignment |","| Artifact version diff | Yes | Inputs must use the same supported format |","| PyTorch or HDF5 training checkpoint execution or full model interpretation | No | Convert safely and bind a conversion receipt |","| Measured latency, energy, temperature, or accuracy | No | Import runtime evidence or use the appropriate benchmark system |","","Prefer `summary` first. Request an envelope for cross-format automation, format-specific JSON for a narrow field, SARIF for CI findings, or CycloneDX 1.7 for supply-chain exchange."])],["references/evidence-semantics.md",bc(["# Evidence semantics","","Preserve DEEPBOM's evidence class and applicability state in the answer.","","- `OBSERVED` describes serialized artifact facts.","- `SOURCE_BACKED` identifies a source-pinned rule or compatibility statement.","- `DERIVED` is deterministically calculated from declared inputs.","- `PREDICTED` and `ESTIMATED` are model-dependent, not runtime observations.","- `MEASURED` is valid only when an imported measurement is identity-bound.","- `NOT_APPLICABLE` means the domain does not apply to this artifact.","- `NOT_ASSESSABLE` means required evidence is absent or insufficient.","- `NOT_ASSESSED_YET` means analysis has not been requested or completed.","","Finding kinds are independent from evidence classes:","","- `artifact_defect`: a contradiction or defect found in the artifact.","- `caution`: a bounded condition that merits review but is not a defect.","- `evidence_gap`: a claim the artifact cannot settle alone.","","When a target is present, report whether its binding source is a default assumption, explicit ID, or profile file. `host_observed: false` means the host was not measured."])],["references/failure-recovery.md",bc(["# Failure recovery","","1. Exit `1`: report invocation, input, artifact, or output failure. Read structured stderr with `--error-format json` before changing the command.","2. Exit `2`: report a policy or verification block. The evidence document may still be valid and should be retained.","3. Exit `3`: report an incomplete verification binding. Do not call it a tool crash or an artifact defect.","4. For a large GGUF or SafeTensors file, retry with `--scan structure` when the question does not require payload integrity.","5. For remote input, require an immutable identity: a full Hugging Face commit, GCS object generation, or HTTPS SHA-256 fragment.","6. Do not raise download, response, or memory limits without explaining the cost and obtaining user approval.","7. If no shell, local MCP, or local file access exists, explain that actual analysis cannot run in that client and provide the contract-checked `npx` command.",`8. Registry download is opt-in. Prefer a verified contract-compatible installation; use \`${t}\` only after network and installation permission is clear. Record the resolved engine version in the answer.`])],["scripts/verify-deepbom.mjs",bc(["#!/usr/bin/env node","",'import { spawnSync } from "node:child_process";','import { existsSync } from "node:fs";','import path from "node:path";','import process from "node:process";','import { fileURLToPath } from "node:url";',"",`const AGENT_CONTRACT = ${JSON.stringify(Ro)};`,`const EVIDENCE_CONTRACT = ${JSON.stringify(Ka)};`,'const REGISTRY_PACKAGE = "deepbom@latest";','const allowDownload = process.argv.slice(2).includes("--allow-download");',"const attempts = [];","const candidates = localCandidates();",'if (allowDownload) candidates.push({ source: "npm_contract_candidate", command: process.platform === "win32" ? "npx.cmd" : "npx", prefix_args: ["-y", REGISTRY_PACKAGE], network: true });',"","for (const candidate of candidates) {",' const versionRun = invoke(candidate, ["--version"]);'," const observedVersion = versionRun.stdout.trim();"," if (versionRun.status !== 0 || !/^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$/.test(observedVersion)) {"," attempts.push({ source: candidate.source, status: versionRun.status, observed_version: observedVersion || null, error: bounded(versionRun.stderr) });"," continue;"," }",' const capabilitiesRun = invoke(candidate, ["capabilities", "--format", "agent-json", "--compact"]);'," let capabilities;"," try { capabilities = JSON.parse(capabilitiesRun.stdout); } catch {}",' if (capabilitiesRun.status !== 0 || capabilities?.schema !== "deepbom.agent_capabilities.v1"'," || capabilities?.agent_contract?.id !== AGENT_CONTRACT.id || capabilities?.agent_contract?.version !== AGENT_CONTRACT.version"," || capabilities?.evidence_schema_contract?.id !== EVIDENCE_CONTRACT.id || capabilities?.evidence_schema_contract?.version !== EVIDENCE_CONTRACT.version) {",' attempts.push({ source: candidate.source, status: capabilitiesRun.status, observed_version: observedVersion, observed_agent_contract: capabilities?.agent_contract || null, observed_evidence_contract: capabilities?.evidence_schema_contract || null, error: bounded(capabilitiesRun.stderr || capabilitiesRun.stdout || "public contract mismatch") });'," continue;"," }",' const selfTest = invoke(candidate, ["self-test", "--compact"]);'," try {"," const document = JSON.parse(selfTest.stdout);",' if (selfTest.status !== 0 || document.schema !== "deepbom.cli_self_test.v1" || document.status !== "pass" || document.version !== observedVersion || capabilities.version !== observedVersion) throw new Error("self-test or analyzer identity mismatch");',' process.stdout.write(`${JSON.stringify({ schema: "deepbom.skill_runtime_resolution.v1", version: observedVersion, agent_contract: AGENT_CONTRACT, evidence_contract: EVIDENCE_CONTRACT, status: "pass", source: candidate.source, network_used: candidate.network, invocation: { command: candidate.command, prefix_args: candidate.prefix_args }, self_test: document })}\\n`);'," process.exit(0);"," } catch (error) {"," attempts.push({ source: candidate.source, status: selfTest.status, observed_version: observedVersion, error: bounded(selfTest.stderr || selfTest.stdout || error.message) });"," }","}","",'process.stderr.write(`${JSON.stringify({ schema: "deepbom.skill_runtime_resolution.v1", agent_contract: AGENT_CONTRACT, evidence_contract: EVIDENCE_CONTRACT, status: "unavailable", registry_download_attempted: allowDownload, attempts, suggested_action: allowDownload ? "Review the recorded installation, compatibility, or network error; do not claim an analysis ran." : "Install a contract-compatible release or rerun with --allow-download only after registry access is authorized." })}\\n`);',"process.exit(3);","","function localCandidates() {"," const rows = [];",' if (process.env.DEEPBOM_BIN?.trim()) rows.push(candidateForPath(path.resolve(process.env.DEEPBOM_BIN.trim()), "DEEPBOM_BIN"));',' const packaged = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../../bin/deepbom.mjs");',' if (existsSync(packaged)) rows.push(candidateForPath(packaged, "bundled_npm_package"));',' const installed = findOnPath("deepbom");',' if (installed && !rows.some((row) => path.resolve(row.identity) === path.resolve(installed))) rows.push(candidateForPath(installed, "installed_path"));'," return rows;","}","","function candidateForPath(file, source) {"," return /\\.(?:mjs|js|cjs)$/i.test(file)"," ? { source, identity: file, command: process.execPath, prefix_args: [file], network: false }"," : { source, identity: file, command: file, prefix_args: [], network: false };","}","","function findOnPath(name) {",' const extensions = process.platform === "win32" ? (process.env.PATHEXT || ".EXE;.CMD;.BAT").split(";") : [""];',' for (const directory of (process.env.PATH || "").split(path.delimiter).filter(Boolean)) {'," for (const extension of extensions) {",' const file = path.join(directory.replace(/^"|"$/g, ""), process.platform === "win32" ? `${name}${extension.toLowerCase()}` : name);'," if (existsSync(file)) return file;"," }"," }"," return null;","}","","function invoke(candidate, args) {",' const shell = process.platform === "win32" && /\\.(?:cmd|bat)$/i.test(candidate.command);',' const result = spawnSync(candidate.command, [...candidate.prefix_args, ...args], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], shell, timeout: 120000, windowsHide: true });',' return { status: Number.isInteger(result.status) ? result.status : 1, stdout: result.stdout || "", stderr: result.stderr || result.error?.message || "" };',"}","","function bounded(value) {",' const text = String(value || "").trim();'," return text ? text.slice(0, 1000) : null;","}"])],["agents/openai.yaml",bc(["interface:",' display_name: "DEEPBOM Artifact Audit"',' short_description: "Audit serialized AI deployment artifacts locally"',' default_prompt: "Statically audit this deployment artifact with DEEPBOM and report bounded evidence, unresolved gaps, and the reproduction command."',"","policy:"," allow_implicit_invocation: true"])]])}function bc(e){return`${e.join(`
|
|
29
29
|
`)}
|
|
30
30
|
`}var Ac="deepbom.agent_integration.v1",c_=Object.freeze({codex:".agents/skills/deepbom","claude-code":".claude/skills/deepbom",generic:"skills/deepbom"}),s_=".deepbom-integration.json";async function W1({action:e,target:t=null,apply:n=!1,root:i=process.cwd(),version:o}){let a=mt.resolve(i),r=V1(),s=t?[I3(t)]:Object.keys(c_);if(e==="status")return{schema:Ac,action:e,applied:!1,project_root:a,integrations:await Promise.all(s.map(u=>Y1(a,r,u,o)))};if(s.length!==1)throw new Error(`The ${e} action requires one integration target.`);let c=s[0];if(e==="install")return E3(a,r,c,o,n);if(e==="remove")return N3(a,c,n);throw new Error(`Unknown agent integration action: ${e}`)}async function E3(e,t,n,i,o){let a=await Y1(e,t,n,i);if(a.status==="conflict")throw new Error(`Agent integration would overwrite unmanaged changes: ${a.conflicts.join(", ")}.`);let r=mt.resolve(e,c_[n]);await Jg(e,r);let s=a.files.filter(_=>_.status!=="unchanged"),c={schema:Ac,action:"install",target:n,applied:!!o,status:s.length?o?"installed":"changes_pending":"current",project_root:e,destination:Sp(mt.relative(e,r)),changes:s,next_command:o?null:`deepbom integrate ${n} --apply`};if(!o||!s.length)return c;await H1(r,{recursive:!0});let u=[];for(let[_,p]of t){let d=Buffer.from(p,"utf8"),m=mt.join(r,_);await H1(mt.dirname(m),{recursive:!0}),await K1(m,d),u.push({path:_,sha256:yc(d)})}let l={schema:Ac,owner:"deepbom",target:n,version:i,agent_contract:Ro,evidence_contract:Ka,managed_files:u};return await K1(mt.join(r,s_),Buffer.from(`${JSON.stringify(l,null,2)}
|
|
31
|
-
`)),c}async function N3(e,t,n){let i=mt.resolve(e,c_[t]);await Jg(e,i);let o=await J1(i);if(!o)return{schema:Ac,action:"remove",target:t,applied:!1,status:"not_installed",destination:Sp(mt.relative(e,i)),changes:[]};let a=[];for(let c of o.managed_files||[]){let u=await eb(mt.join(i,c.path));(!u||yc(u)!==c.sha256)&&a.push(c.path)}if(a.length)throw new Error(`Refusing to remove modified agent integration files: ${a.join(", ")}.`);let r={schema:Ac,action:"remove",target:t,applied:!!n,status:n?"removed":"changes_pending",destination:Sp(mt.relative(e,i)),changes:[...(o.managed_files||[]).map(c=>({path:c.path,status:"remove"})),{path:s_,status:"remove"}],next_command:n?null:`deepbom integrate remove ${t} --apply`};if(!n)return r;for(let c of o.managed_files||[])await kp(mt.join(i,c.path),{force:!0});await kp(mt.join(i,s_),{force:!0});let s=[...new Set((o.managed_files||[]).map(c=>mt.dirname(mt.join(i,c.path))))].sort((c,u)=>u.length-c.length);for(let c of s)await Z1(c,e);return await Z1(i,e),r}async function Y1(e,t,n,i){let o=mt.resolve(e,c_[n]);await Jg(e,o);let a=await J1(o),r=new Map((a?.managed_files||[]).map(l=>[l.path,l.sha256])),s=[],c=[];for(let[l,_]of t){let p=Buffer.from(_,"utf8"),d=await eb(mt.join(o,l)),m="add";d&&yc(d)===yc(p)?m="unchanged":d&&r.get(l)===yc(d)?m="update_managed":d&&(m="conflict",c.push(l)),s.push({path:l,status:m,sha256:yc(p)})}let u=s.every(l=>l.status==="unchanged");return{target:n,destination:Sp(mt.relative(e,o)),status:c.length?"conflict":u?"current":a?"outdated":"not_installed",installed_version:a?.version||null,available_version:i,installed_agent_contract:a?.agent_contract||null,available_agent_contract:Ro,conflicts:c,files:s}}function I3(e){let t=String(e||"").trim().toLowerCase();if(!Object.hasOwn(c_,t))throw new Error("Agent integration target must be codex, claude-code, or generic.");return t}async function J1(e){let t=await eb(mt.join(e,s_));if(!t)return null;let n=JSON.parse(t.toString("utf8"));if(n.schema!==Ac||n.owner!=="deepbom"||!Array.isArray(n.managed_files))throw new Error(`Invalid DEEPBOM integration manifest: ${mt.join(e,s_)}`);return n}async function Jg(e,t){let n=mt.relative(e,t);if(!n||n.startsWith("..")||mt.isAbsolute(n))throw new Error("Agent integration destination must stay below the current directory.");let i=e;for(let o of n.split(mt.sep)){i=mt.join(i,o);try{let a=await X1(i);if(a.isSymbolicLink())throw new Error(`Agent integration refuses symbolic-link path components: ${i}`);if(!a.isDirectory())throw new Error(`Agent integration path component is not a directory: ${i}`)}catch(a){if(a?.code==="ENOENT")break;throw a}}}async function K1(e,t){let n=`${e}.${process.pid}.tmp`,i=`${e}.${process.pid}.bak`;await x3(n,t,{mode:384});let o=await Yg(e);try{o&&await Wg(e,i),await Wg(n,e),o&&await kp(i,{force:!0})}catch(a){throw await kp(n,{force:!0}),o&&await Yg(i)&&!await Yg(e)&&await Wg(i,e),a}}async function Yg(e){try{return await X1(e),!0}catch(t){if(t?.code==="ENOENT")return!1;throw t}}async function Z1(e,t){let n=e;for(;n.startsWith(`${t}${mt.sep}`);){try{await w3(n)}catch{return}n=mt.dirname(n)}}async function eb(e){try{return await v3(e)}catch(t){if(t?.code==="ENOENT")return null;throw t}}function yc(e){return A3("sha256").update(e).digest("hex")}function Sp(e){return e.replaceAll(mt.sep,"/")}function ex(e){return Array.isArray(e)&&e.length?`[${e.join("x")}]`:"[]"}function l_(e){let t=ex(e?.shape),n=e?.shape_signature;if(!Array.isArray(n)||!n.length)return t;let i=ex(n);return i===t?t:`${t} sig=${i}`}function C(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(Number(e||0))}function Za(e){let t=Number(e||0);return t?t.toExponential(2):"0"}function nn(e){let t=Number(e||0)*100,n=Object.is(Math.round(t*10)/10,-0)?0:t;if(n!==0&&Math.abs(n)<1e-4)return`${n.toExponential(2)}%`;let i=n!==0&&Math.abs(n)<.1?4:1;return`${new Intl.NumberFormat("en-US",{maximumFractionDigits:i}).format(n)}%`}function Tp(e,t){let n=Number(e),i=Number(t);if(!Number.isFinite(n)||!Number.isFinite(i))return"Not assessed";let o=nn(n),a=nn(i);return Math.abs(i-n)<=1e-12||o===a?o:`${o} to ${a}`}function mn(e){let t=Number(e||0);return t>=1024*1024?`${new Intl.NumberFormat("en-US",{maximumFractionDigits:1}).format(t/(1024*1024))} MiB`:t>=1024?`${new Intl.NumberFormat("en-US",{maximumFractionDigits:1}).format(t/1024)} KiB`:`${C(t)} B`}function tb(e){if(e==null||e==="")return"Not assessed";let t=Number(e);return!Number.isFinite(t)||t<0?"Not assessed":t>=1e3?`${(t/1e3).toFixed(2)} ms`:t>=10?`${t.toFixed(1)} us`:`${t.toFixed(2)} us`}function u_(e,t){let n=null,i=-1/0;for(let o of e){let a=Number(t(o)||0);a>i&&(n=o,i=a)}return n}function nb(e){return e.reduce((t,n)=>t+Number(n||0),0)}function tx(e){let t=new Map;for(let n of e||[])t.set(n,(t.get(n)||0)+1);return[...t.entries()].sort(([n],[i])=>String(n).localeCompare(String(i))).map(([n,i])=>({name:n,count:i}))}function te(e){return String(e).padStart(3,"0")}function Qe(e){return Array.isArray(e?.ops)?e.ops:[]}function Xt(e){return Array.isArray(e?.tensors)?e.tensors:[]}var rx="deepbom.backend_placement_projection.v1",C3="deepbom.backend_workload_envelope.v1",ct=Object.freeze({CONDITIONALLY_ELIGIBLE:"CONDITIONALLY_ELIGIBLE",DEFINITE_EXCLUSION:"DEFINITE_EXCLUSION",UNRESOLVED:"UNRESOLVED"}),Bo=new Set(Object.values(ct)),k3=Object.freeze({BOOL:8,UINT1:1,UINT2:2,INT2:2,UINT3:3,UINT4:4,INT4:4,FLOAT4E2M1:4,UINT6:6,INT8:8,UINT8:8,FLOAT8E4M3FN:8,FLOAT8E4M3FNUZ:8,FLOAT8E5M2:8,FLOAT8E5M2FNUZ:8,FLOAT8E8M0:8,FLOAT16:16,BFLOAT16:16,INT16:16,UINT16:16,FLOAT32:32,INT32:32,UINT32:32,FLOAT64:64,INT64:64,UINT64:64,COMPLEX64:64,COMPLEX128:128});function ki({analysis:e,profileId:t,label:n,evidenceClass:i,rows:o,scopeId:a="main_graph",source:r=null,interpretationBoundary:s=null}){if(!e||!Array.isArray(e.ops)||!Array.isArray(e.tensors))throw new Error("Backend placement projection requires operator and tensor ledgers.");if(!String(t||"").trim()||!String(n||"").trim()||!String(i||"").trim())throw new Error("Backend placement projection identity is incomplete.");let c=_x(e.ops),u=S3(c,o),l=T3(e,c,a),_=O3(c,u),p=px(u),d=l.edges.map(h=>{let b=u.get(h.producer_op_index).state,A=u.get(h.consumer_op_index).state;return{...h,producer_state:b,consumer_state:A,transition:`${b}->${A}`,crosses_state_boundary:b!==A}}),m=d.filter(h=>h.crosses_state_boundary),f=dx(m),g={schema:rx,method_version:"1.0.0",profile_id:String(t),label:String(n),evidence_class:String(i),scope_id:String(a),source:r,assessment_status:"assessed_independent_static_projection",artifact_sha256:String(e.model_sha256||""),op_count:c.length,state_counts:p,rows:c.map(h=>({scope_id:String(a),op_index:h.index,op_name:String(h.value?.name||""),state:u.get(h.index).state,reason_codes:u.get(h.index).reason_codes,unresolved_predicates:u.get(h.index).unresolved_predicates})),segment_count:_.length,segments:_,graph_edge_count:d.length,graph_edges:d,boundary_edge_count:m.length,boundary_edges:m,boundary_payload:f,conservation:{op_state_count:Object.values(p).reduce((h,b)=>h+b,0),op_count_status:Object.values(p).reduce((h,b)=>h+b,0)===c.length?"complete":"failed",segment_op_count:_.reduce((h,b)=>h+b.op_count,0),segment_count_status:_.reduce((h,b)=>h+b.op_count,0)===c.length?"complete":"failed",edge_classified_count:d.length,edge_count_status:d.length===l.edges.length?"complete":"failed"},interpretation_boundary:s||"Independent source-backed eligibility projection. Segments do not establish selected-build acceptance or runtime assignment. Boundary payload is serialized-shape logical exposure, not observed transfer, copy, or latency."};return g.workload_envelope=sx(e,g),sb(g,{analysis:e}),g}function sx(e,t){let n=_x(On(e?.ops)),i=new Map(On(t?.rows).map(u=>[Number(u.op_index),u]));if(n.length!==i.size||n.some(u=>!i.has(u.index)))throw new Error("Backend workload envelope requires complete placement state coverage.");let o=new Map(On(e?.tensors).map((u,l)=>[Number.isSafeInteger(Number(u?.index))?Number(u.index):l,u])),a=Object.fromEntries([...Bo].map(u=>[u,[]]));for(let u of n)a[i.get(u.index).state].push(u);let r=Object.fromEntries([...Bo].map(u=>[u,nx(a[u],o)])),s=nx(n,o),c=r[ct.CONDITIONALLY_ELIGIBLE];return{schema:C3,method_version:"1.0.0",profile_id:t.profile_id,scope_id:t.scope_id,evidence_class:"DERIVED_FROM_ARTIFACT_AND_STATIC_ELIGIBILITY",status:"assessed_artifact_workload_without_backend_cost_model",total:s,by_state:r,conditionally_eligible_mac_share:ob(c.complete_macs_decimal,s.complete_macs_decimal),conditionally_eligible_mac_share_decimal:ab(c.complete_macs_decimal,s.complete_macs_decimal),conditionally_eligible_logical_byte_share:ob(c.complete_logical_bytes_decimal,s.complete_logical_bytes_decimal),conditionally_eligible_logical_byte_share_decimal:ab(c.complete_logical_bytes_decimal,s.complete_logical_bytes_decimal),boundary_payload:R3(t.boundary_payload),backend_cost_model:{status:"not_assessed",peak_compute:null,memory_bandwidth:null,occupancy:null,shader_or_kernel_selection:null,latency:null,reason:"The artifact and source-eligibility ledger do not bind a selected device, generated shader/kernel, occupancy, backend memory plan, measured bandwidth, or runtime timing."},method:"Partition exact serialized-graph MAC and logical-op-byte ledgers by independent static eligibility state; derive a MAC-equivalent arithmetic-intensity descriptor only when every op in that state has assessed MAC and logical-byte values. Preserve output dtype counts from serialized tensor contracts.",interpretation_boundary:"This envelope describes artifact workload associated with a source-backed eligibility state. It is not a GPU roofline, accepted partition, executed workload, transfer volume, occupancy estimate, kernel choice, or latency prediction."}}function cx(e){return On(e?.rows).map(t=>({op_index:t.op_index,state:t.artifact_precheck_status==="source_candidate_partial"?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:t.artifact_precheck_status==="source_candidate_partial"?[]:On(t.definite_exclusion_reasons).map(Xa),unresolved_predicates:t.artifact_precheck_status==="source_candidate_partial"?On(t.unresolved_predicates).map(Xa):[]}))}function lx(e){return On(e?.ops).map((t,n)=>{let i=Number.isSafeInteger(Number(t?.index))?Number(t.index):n,o=Number(t?.xnnpack_chain_id)>=0&&t?.xnnpack_supported!==!1,a=Xa(t?.xnnpack_reason||t?.xnnpack_break_class||"xnnpack_not_conditionally_delegatable"),r=Xa(t?.xnnpack_build_requirement||"");return{op_index:i,state:o?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:o?[]:[a],unresolved_predicates:o&&r?[r]:[]}})}function ux(e){return On(e?.ops).map(t=>{let n=new Set(["MODEL_LOCAL_FUNCTION_REQUIRES_RUNTIME_RESOLUTION","EXTERNAL_CUSTOM_REGISTRY_REQUIRED","OP_SCHEMA_VERSION_NOT_RESOLVED"]).has(String(t.status||"")),i=t.artifact_precheck_status==="ARTIFACT_PRECHECK_UNRESOLVED",a=t.source_candidate_after_artifact_precheck===!0&&!i?ct.CONDITIONALLY_ELIGIBLE:i||n?ct.UNRESOLVED:ct.DEFINITE_EXCLUSION;return{op_index:t.op_index,state:a,reason_codes:a===ct.DEFINITE_EXCLUSION?[Xa(t.artifact_precheck_status||t.status||"source_exclusion")]:[],unresolved_predicates:a===ct.UNRESOLVED?[Xa(t.artifact_precheck_status||t.status||"unresolved")]:On(t.unresolved_source_condition_fragments).map(Xa)}})}function sb(e,{analysis:t=null}={}){let n=[];(!e||e.schema!==rx)&&n.push("schema mismatch"),(!e?.profile_id||!e?.label||!e?.evidence_class||!e?.scope_id)&&n.push("identity incomplete"),(!Number.isSafeInteger(e?.op_count)||e.op_count<0)&&n.push("op count invalid");let i=On(e?.rows);(i.length!==e?.op_count||new Set(i.map(_=>`${_.scope_id}:${_.op_index}`)).size!==i.length||i.some(_=>_.scope_id!==e.scope_id||!Number.isSafeInteger(_.op_index)||!Bo.has(_.state)))&&n.push("op-state ledger invalid");let o=px(new Map(i.map(_=>[_.op_index,_])));for(let _ of Bo)Number(e?.state_counts?.[_])!==o[_]&&n.push(`state count mismatch: ${_}`);let a=On(e?.segments),r=0;for(let _ of a){if(!Bo.has(_.state)||_.start_position!==r||_.end_position!==_.start_position+_.op_count-1||_.op_count<=0){n.push("segment ledger invalid");break}r=_.end_position+1}(r!==e?.op_count||Number(e?.segment_count)!==a.length)&&n.push("segments do not conserve ops");let s=On(e?.graph_edges),c=new Set;for(let _ of s){let p=`${_.scope_id}:${_.producer_op_index}:${_.consumer_op_index}:${_.tensor_index}`;if(c.has(p)||_.scope_id!==e.scope_id||!Bo.has(_.producer_state)||!Bo.has(_.consumer_state)||_.crosses_state_boundary!==(_.producer_state!==_.consumer_state)||_.transition!==`${_.producer_state}->${_.consumer_state}`||_.logical_payload_bytes==null==!_.logical_payload_reason){n.push("graph edge ledger invalid");break}c.add(p)}let u=s.filter(_=>_.crosses_state_boundary);(Number(e?.graph_edge_count)!==s.length||Number(e?.boundary_edge_count)!==u.length||On(e?.boundary_edges).length!==u.length)&&n.push("edge counts do not conserve graph edges");let l=dx(u);if(JSON.stringify(e?.boundary_payload)!==JSON.stringify(l)&&n.push("boundary payload does not reproduce"),t&&JSON.stringify(e?.workload_envelope)!==JSON.stringify(sx(t,e))&&n.push("workload envelope does not reproduce"),(e?.conservation?.op_count_status!=="complete"||e?.conservation?.segment_count_status!=="complete"||e?.conservation?.edge_count_status!=="complete")&&n.push("conservation status incomplete"),t&&(String(e.artifact_sha256||"")!==String(t.model_sha256||"")&&n.push("artifact binding mismatch"),e.op_count!==On(t.ops).length&&n.push("analysis op count mismatch")),n.length)throw new Error(`Backend placement projection is invalid: ${n.join("; ")}`);return!0}function _x(e){let t=new Set;return e.map((n,i)=>{let o=Number.isSafeInteger(Number(n?.index))?Number(n.index):i;if(t.has(o))throw new Error(`Operator identity duplicates op #${o}.`);return t.add(o),{index:o,position:i,value:n}})}function S3(e,t){if(!Array.isArray(t)||t.length!==e.length)throw new Error("Backend state rows must cover every operator exactly once.");let n=new Set(e.map(o=>o.index)),i=new Map;for(let o of t){let a=Number(o?.op_index);if(!Number.isSafeInteger(a)||!n.has(a)||i.has(a)||!Bo.has(o?.state))throw new Error(`Backend state identity is invalid at op #${String(o?.op_index)}.`);i.set(a,{state:o.state,reason_codes:ax(o.reason_codes),unresolved_predicates:ax(o.unresolved_predicates)})}return i}function T3(e,t,n){let i=new Set(t.map(c=>c.index)),o=new Map;for(let[c,u]of e.tensors.entries()){let l=Number.isSafeInteger(Number(u?.index))?Number(u.index):c;if(o.has(l))throw new Error(`Tensor identity duplicates tensor #${l}.`);o.set(l,u)}let a=new Map,r=new Map;for(let c of t){for(let u of rb(c.value?.outputs)){if(a.has(u)&&a.get(u)!==c.index)throw new Error(`Tensor #${u} has multiple producers in ${n}.`);a.set(u,c.index)}for(let u of rb(c.value?.inputs))r.has(u)||r.set(u,new Set),r.get(u).add(c.index)}let s=[];for(let[c,u]of a)if(i.has(u))for(let l of r.get(c)||[]){if(l===u||!i.has(l))continue;let _=o.get(c),p=z3(_);s.push({scope_id:String(n),producer_op_index:u,consumer_op_index:l,tensor_index:c,tensor_name:_?String(_.name||""):null,tensor_dtype:_?String(_.dtype||""):null,tensor_shape:_&&Array.isArray(_.shape)?_.shape.map(Number):null,logical_payload_bytes:p.bytes,logical_payload_status:p.status,logical_payload_reason:p.reason})}return s.sort((c,u)=>c.producer_op_index-u.producer_op_index||c.consumer_op_index-u.consumer_op_index||c.tensor_index-u.tensor_index),{edges:s}}function z3(e){if(!e)return{bytes:null,status:"not_assessed",reason:"tensor_descriptor_missing"};if(!Array.isArray(e.shape))return{bytes:null,status:"not_assessed",reason:"shape_not_declared"};if(e.shape.some(o=>!Number.isSafeInteger(Number(o))||Number(o)<0))return{bytes:null,status:"not_assessed",reason:"shape_dynamic_or_invalid"};if(Array.isArray(e.shape_signature)&&e.shape_signature.length&&(e.shape_signature.length!==e.shape.length||e.shape_signature.some((o,a)=>!Number.isSafeInteger(Number(o))||Number(o)<0||Number(o)!==Number(e.shape[a]))))return{bytes:null,status:"not_assessed",reason:"shape_signature_not_statically_bound"};let t=k3[String(e.dtype||"").toUpperCase()];if(!t)return{bytes:null,status:"not_assessed",reason:"dtype_width_unknown"};let n=1n;for(let o of e.shape)n*=BigInt(Number(o));let i=(n*BigInt(t)+7n)/8n;return i>BigInt(Number.MAX_SAFE_INTEGER)?{bytes:null,status:"not_assessed",reason:"payload_exceeds_safe_integer"}:{bytes:Number(i),status:"assessed_serialized_static_shape",reason:null}}function O3(e,t){let n=[];for(let i of e){let o=t.get(i.index).state,a=n.at(-1);a?.state===o?(a.end_position=i.position,a.end_op_index=i.index,a.op_count+=1):n.push({segment_index:n.length,state:o,start_position:i.position,end_position:i.position,start_op_index:i.index,end_op_index:i.index,op_count:1})}return n}function dx(e){let t=e.filter(a=>Number.isSafeInteger(a.logical_payload_bytes)),n=ib(t.map(a=>a.logical_payload_bytes)),i=new Map;for(let a of e)i.has(a.tensor_index)||i.set(a.tensor_index,a.logical_payload_bytes);let o=[...i.values()].filter(Number.isSafeInteger);return{semantics:"summed_logical_edge_payload_not_observed_transfer",edge_count:e.length,assessed_edge_count:t.length,unassessed_edge_count:e.length-t.length,assessed_edge_payload_bytes:n,summed_edge_payload_bytes:t.length===e.length?n:null,unique_tensor_count:i.size,assessed_unique_tensor_count:o.length,assessed_unique_tensor_payload_bytes:ib(o),unique_tensor_payload_bytes:o.length===i.size?ib(o):null}}function nx(e,t){let n=e.map(p=>ix(p.value,"macs")),i=e.map(p=>ix(p.value,"estimated_bytes")),o=n.filter(p=>p!=null),a=i.filter(p=>p!=null),r=ox(o),s=ox(a),c=o.length===e.length?r:null,u=a.length===e.length?s:null,l={},_=0;for(let p of e)for(let d of rb(p.value?.outputs)){_+=1;let m=String(t.get(d)?.dtype||"UNKNOWN").toUpperCase();l[m]=(l[m]||0)+1}return{op_count:e.length,assessed_mac_op_count:o.length,unassessed_mac_op_count:e.length-o.length,assessed_macs_decimal:r.toString(),assessed_macs:zp(r),complete_macs_decimal:c?.toString()??null,complete_macs:c==null?null:zp(c),assessed_logical_byte_op_count:a.length,unassessed_logical_byte_op_count:e.length-a.length,assessed_logical_bytes_decimal:s.toString(),assessed_logical_bytes:zp(s),complete_logical_bytes_decimal:u?.toString()??null,complete_logical_bytes:u==null?null:zp(u),mac_equivalent_ops_per_logical_byte:c!=null&&u!=null&&u>0n?ob((c*2n).toString(),u.toString()):null,mac_equivalent_ops_per_logical_byte_decimal:c!=null&&u!=null&&u>0n?ab((c*2n).toString(),u.toString()):null,intensity_status:c==null||u==null?"not_assessed_incomplete_mac_or_logical_byte_ledger":u===0n?"not_applicable_zero_logical_bytes":"derived_complete_artifact_ledger",output_tensor_reference_count:_,output_dtype_reference_counts:Object.fromEntries(Object.entries(l).sort(([p],[d])=>p.localeCompare(d)))}}function ix(e,t){if(!e||e[t]==null||String(e[`${t}_status`]||"")==="not_assessed")return null;let n=Number(e[t]);return Number.isSafeInteger(n)&&n>=0?n:null}function ob(e,t){if(e==null||t==null)return null;let n=BigInt(e),i=BigInt(t);return i>0n&&n<=BigInt(Number.MAX_SAFE_INTEGER)&&i<=BigInt(Number.MAX_SAFE_INTEGER)?Number(n)/Number(i):null}function ab(e,t,n=12){if(e==null||t==null)return null;let i=BigInt(e),o=BigInt(t);if(o<=0n)return null;let a=10n**BigInt(n),r=(i*a+o/2n)/o,s=r/a,c=String(r%a).padStart(n,"0").replace(/0+$/,"");return c?`${s}.${c}`:s.toString()}function ox(e){return e.reduce((t,n)=>t+BigInt(n),0n)}function zp(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}function R3(e){return e==null?e:JSON.parse(JSON.stringify(e))}function px(e){let t=Object.fromEntries([...Bo].map(n=>[n,0]));for(let n of e.values())Bo.has(n.state)&&(t[n.state]+=1);return t}function rb(e){return On(e).map(Number).filter(t=>Number.isSafeInteger(t)&&t>=0)}function ax(e){return[...new Set(On(e).map(Xa).filter(Boolean))].sort()}function Xa(e){return String(e?.id||e?.reason_code||e||"").trim()}function ib(e){let t=e.reduce((n,i)=>n+i,0);if(!Number.isSafeInteger(t))throw new Error("Backend placement payload sum exceeds the safe integer range.");return t}function On(e){return Array.isArray(e)?e:[]}var B3=/^--define\s+([^=\s;]+)=([^\s;]+)$/,D3=new Set(["declared_present","observed_runtime_capability_present"]);function mx(e,t){if(!e)return{status:"pending_runtime_evidence_not_imported",evidence_class:"NOT_ASSESSED",value:null};let n=String(t||"").split(";")[0].trim();if(!n)return{status:"pending_required_configuration_not_declared",evidence_class:"NOT_ASSESSED",value:null};let i=M3(n),o=e?.selector_context?.build?.compile_definitions;if(i&&Array.isArray(o)){let r=o.find(s=>String(s?.name||"")===i.name);if(r){let s=String(r.value??"").trim();return s===i.value?{status:"declared_present",evidence_class:"DECLARED_RUNTIME_BUILD",value:n}:{status:"contradiction_required_configuration_value",evidence_class:"DECLARED_RUNTIME_BUILD",value:`--define ${i.name}=${s}`}}}let a=String(e?.runtime?.build||"").trim();if(!a)return{status:"pending_imported_runtime_build_not_declared",evidence_class:"NOT_ASSESSED",value:null};if(i){let r=$3(a).filter(s=>s.name===i.name);if(r.some(s=>s.value===i.value))return{status:"declared_present",evidence_class:"DECLARED_RUNTIME_BUILD",value:n};if(r.length)return{status:"contradiction_required_configuration_value",evidence_class:"DECLARED_RUNTIME_BUILD",value:r.map(s=>`--define ${s.name}=${s.value}`).join("; ")}}else if(L3(a,n))return{status:"declared_present",evidence_class:"DECLARED_RUNTIME_BUILD",value:n};return{status:"contradiction_required_configuration_absent",evidence_class:"DECLARED_RUNTIME_BUILD",value:a}}function fx(e,t){let n=Array.isArray(t)?t:[];return n.length>0&&n.every(i=>mx(e,i?.required_build_configuration).status==="declared_present")}function hx(e,t){if(Number(t?.affected_source_candidate_op_count||0)===0)return Gn("not_applicable_no_affected_source_candidates","NOT_APPLICABLE",null);if(!e)return Gn("pending_runtime_evidence_not_imported","NOT_ASSESSED",null);let n=e.tflite_delegate_build_inventory;if(!n)return Gn("pending_delegate_build_inventory_not_imported","NOT_ASSESSED",null);switch(t?.id){case"tflite_gpu_delegate_compiled":return n.gpu?.compiled_status==="enabled_by_declared_cmake_option"?Gn("partial_gpu_delegate_compiled_target_backend_unobserved",n.evidence_class,n.gpu.compiled_status):String(n.gpu?.compiled_status||"").startsWith("disabled_")?Gn("contradiction_gpu_delegate_not_compiled",n.evidence_class,n.gpu.compiled_status):Gn("pending_gpu_build_option_not_declared","NOT_ASSESSED",n.gpu?.compiled_status??null);case"tflite_gpu_allow_quant_ops":return n.gpu?.quantized_model_flag_status==="enabled_by_declared_runtime_option"?Gn("declared_present",n.evidence_class,n.gpu.experimental_flags):n.gpu?.quantized_model_flag_status==="disabled_by_declared_runtime_option"?Gn("contradiction_quantized_model_flag_disabled",n.evidence_class,n.gpu.experimental_flags):Gn("pending_gpu_runtime_option_not_declared","NOT_ASSESSED",null);case"tflite_nnapi_delegate_compiled":return n.nnapi?.compiled_status==="enabled_by_declared_cmake_option_and_android_gate"?Gn("declared_present",n.evidence_class,n.nnapi.compiled_status):String(n.nnapi?.compiled_status||"").startsWith("disabled_")?Gn("contradiction_nnapi_delegate_not_compiled",n.evidence_class,n.nnapi.compiled_status):Gn("pending_nnapi_build_gate_unresolved","NOT_ASSESSED",n.nnapi?.compiled_status??null);case"tflite_nnapi_feature_level":{let i=n.nnapi?.runtime_feature_level,o=String(n.nnapi?.accelerator_identity||"").trim();if(i==null||!o)return Gn("pending_nnapi_runtime_capability_query","NOT_ASSESSED",null);let a=n.nnapi.capability_source==="android_nnapi_runtime_query";return Gn(a?"observed_runtime_capability_present":"partial_declared_runtime_capability_not_observed",a?"OBSERVED_RUNTIME_CAPABILITY":n.evidence_class,`${i}; ${o}`)}default:return Gn("unsupported_delegate_requirement","NOT_ASSESSED",t?.id??null)}}function gx(e,t){let n=(Array.isArray(t)?t:[]).map(o=>({id:o?.id??null,profile:o?.profile??null,affected_source_candidate_op_count:Number(o?.affected_source_candidate_op_count||0),binding:hx(e,o)})),i=n.filter(o=>o.binding.status!=="not_applicable_no_affected_source_candidates");return{rows:n,applicable_requirement_count:i.length,satisfied_requirement_count:i.filter(o=>cb(o.binding)).length,contradiction_count:i.filter(o=>o.binding.status.startsWith("contradiction_")).length,pending_or_partial_count:i.filter(o=>!cb(o.binding)&&!o.binding.status.startsWith("contradiction_")).length,all_applicable_requirements_bound:i.length>0&&i.every(o=>cb(o.binding))}}function cb(e){return D3.has(String(e?.status||""))}function M3(e){let t=B3.exec(String(e||"").trim());return t?{name:t[1],value:t[2]}:null}function $3(e){let t=[],n=/(?:^|[\s;])--define\s+([^=\s;]+)=([^\s;]+)/g;for(let i of String(e||"").matchAll(n))t.push({name:i[1],value:i[2]});return t}function L3(e,t){return String(e||"").split(/[\s;,]+/).includes(String(t||""))}function Gn(e,t,n){return{status:e,evidence_class:t||"NOT_ASSESSED",value:n}}var bx="deepbom.placement_comparison.v1";function Op(e,t,{selectedProfileIds:n=null}={}){let i=Array.isArray(t)?t:[],o=new Map(i.map(c=>[String(c.profile_id),c]));if(o.size!==i.length)throw new Error("Placement comparison profile IDs must be unique.");let a=n==null?[...o.keys()]:[...new Set(n.map(String))];for(let c of a)if(!o.has(c))throw new Error(`Placement comparison profile is unavailable: ${c}.`);let r=a.map(c=>q3(o.get(c))),s={schema:bx,method_version:"1.0.0",artifact_sha256:String(e?.model_sha256||""),format:String(e?.format||"unknown").toLowerCase(),graph_op_count:Array.isArray(e?.ops)?e.ops.length:0,available_profile_ids:[...o.keys()],selected_profile_ids:a,rows:r,assessment_status:r.length?"assessed_independent_profiles":"not_applicable_no_static_profiles",conservation:{selected_profile_count:a.length,emitted_row_count:r.length,all_rows_cover_graph:r.every(c=>c.op_count===(Array.isArray(e?.ops)?e.ops.length:0))},interpretation_boundary:"N-way comparison of independent source-backed or compiler-observed placement profiles over one canonical graph and tensor ledger. It does not infer provider priority, joint partitioning, physical transfer, generated kernels, latency, or task correctness."};return lb(s,e,i),s}function lb(e,t=null,n=null){let i=[];e?.schema!==bx&&i.push("schema mismatch"),(!Array.isArray(e?.available_profile_ids)||!Array.isArray(e?.selected_profile_ids)||!Array.isArray(e?.rows))&&i.push("profile inventories missing"),new Set(e?.available_profile_ids||[]).size!==(e?.available_profile_ids||[]).length&&i.push("available profile IDs duplicate"),new Set(e?.selected_profile_ids||[]).size!==(e?.selected_profile_ids||[]).length&&i.push("selected profile IDs duplicate"),(e?.rows||[]).length!==(e?.selected_profile_ids||[]).length&&i.push("selected profile rows do not conserve selection");for(let o of e?.rows||[]){let a=Number(o.conditionally_eligible_ops)+Number(o.definite_exclusion_ops)+Number(o.unresolved_ops);(!e.selected_profile_ids.includes(o.profile_id)||a!==o.op_count||o.op_count!==e.graph_op_count)&&i.push(`profile row does not conserve graph ops: ${o.profile_id}`)}if(t&&(String(e.artifact_sha256||"")!==String(t.model_sha256||"")&&i.push("artifact binding mismatch"),Number(e.graph_op_count)!==(Array.isArray(t.ops)?t.ops.length:0)&&i.push("graph op count mismatch")),n){let o=n.map(a=>String(a.profile_id));JSON.stringify(e.available_profile_ids)!==JSON.stringify(o)&&i.push("available profile inventory mismatch")}if((!e?.conservation?.all_rows_cover_graph||e?.conservation?.selected_profile_count!==e?.conservation?.emitted_row_count)&&i.push("comparison conservation failed"),i.length)throw new Error(`Placement comparison is invalid: ${i.join("; ")}`);return!0}function P3(e){let t=`${e?.profile_id||""} ${e?.label||""}`.toLowerCase();return/(gpu|directml|webgpu|webnn|nnapi|qnn|coreml|edgetpu|tpu|npu|tensorrt|cuda|rocm|metal|vulkan|opencl)/.test(t)?"accelerator":/(cpu|xnnpack|wasm)/.test(t)?"cpu":"other"}function q3(e){let t=e.state_counts||{},n=e.workload_envelope||{};return{profile_id:String(e.profile_id),label:String(e.label),profile_class:P3(e),evidence_class:String(e.evidence_class||"NOT_ASSESSED"),assessment_status:String(e.assessment_status||"not_assessed"),op_count:Number(e.op_count||0),conditionally_eligible_ops:Number(t.CONDITIONALLY_ELIGIBLE||0),definite_exclusion_ops:Number(t.DEFINITE_EXCLUSION||0),unresolved_ops:Number(t.UNRESOLVED||0),segment_count:Number(e.segment_count||0),boundary_edge_count:Number(e.boundary_edge_count||0),boundary_payload:e.boundary_payload||null,conditionally_eligible_mac_share_decimal:n.conditionally_eligible_mac_share_decimal??null,conditionally_eligible_logical_byte_share_decimal:n.conditionally_eligible_logical_byte_share_decimal??null,unresolved_condition_type_count:new Set((e.rows||[]).flatMap(i=>i.unresolved_predicates||[])).size,source:e.source||null,interpretation_boundary:e.interpretation_boundary}}Me();Ce();var Q3="87bbf65b8d23d3f06912b1b2183587e1884bc45c",U3="e8b1ea421cf527584589213c8f5127a8ae8cc997",db=Object.freeze({repository:"https://github.com/tensorflow/tensorflow",commit:Q3,support_path:"tensorflow/lite/delegates/coreml/coreml_delegate.mm",support_sha256:"c09aa345581353ac6be2dfb3a5f7be218ed976f3388a5d4dad1e88a4bda0f0f1",builder_path:"tensorflow/lite/delegates/coreml/builders/op_builder.cc",builder_sha256:"e2f024d0d74befd5dc06f8cf731fe33d1556c6b46cd457a0ccd85019e465156f",partition_helper_header_path:"tensorflow/lite/delegates/utils.h",partition_helper_header_sha256:"390a88c51785f87c1d4c31c27427e6246605d450fc4edfa534c68277c6cb8cc9",partition_helper_source_path:"tensorflow/lite/delegates/utils.cc",partition_helper_source_sha256:"7026cd7e00360b3e528a8a53d91b4ca1f7fb05ccbcad9c6f784fc6df02913464"}),pb=Object.freeze({ADD:1,AVERAGE_POOL_2D:1,CONCATENATION:1,CONV_2D:1,DEPTHWISE_CONV_2D:2,FULLY_CONNECTED:6,HARD_SWISH:1,LOGISTIC:1,MAX_POOL_2D:1,MEAN:1,MIRROR_PAD:1,MUL:1,PAD:1,PADV2:1,RELU:1,RELU_N1_TO_1:1,RELU6:1,RESHAPE:1,RESIZE_BILINEAR:1,SOFTMAX:1,TANH:1,TRANSPOSE_CONV:1}),mb=Object.freeze({repository:"https://github.com/google-ai-edge/LiteRT",commit:U3,support_path:"litert/vendors/qualcomm/compiler/Qualcomm_QNN_Compiler.md",support_sha256:"873a6d442010aa1e448b90bfa5601424627e00fa4475cf012eea32fd87205e3f",compiler_path:"litert/vendors/qualcomm/compiler/qnn_compiler_plugin.cc",compiler_sha256:"2c71cf954ac906786b1f56bc053a570708cccc0e7cc25e56e704777d2c251623",dispatch_path:"litert/vendors/qualcomm/dispatch/dispatch_api.cc",dispatch_sha256:"87ef37e5071b86d4bb7fa63fdf9bb5465b205a1290998310f1e84a5aaaa51b12",supported_soc_path:"litert/vendors/qualcomm/supported_soc.csv",supported_soc_sha256:"a9b77234cadaae2b40a99018d3e2f4fc7cbac7267125599a3b09e90f6b9050f7"}),fb=new Set(["ABS","ADD","ARG_MAX","ARG_MIN","AVERAGE_POOL_2D","BATCH_MATMUL","BATCH_TO_SPACE_ND","BROADCAST_TO","CAST","CEIL","CONCATENATION","CONV_2D","CONV_3D","COS","CUMSUM","DEPTH_TO_SPACE","DEPTHWISE_CONV_2D","DEQUANTIZE","DIV","DYNAMIC_UPDATE_SLICE","ELU","EMBEDDING_LOOKUP","EQUAL","EXP","FLOOR","FLOOR_DIV","FLOOR_MOD","FULLY_CONNECTED","GATHER","GATHER_ND","GELU","GREATER","GREATER_EQUAL","HARD_SWISH","L2_NORMALIZATION","L2_POOL_2D","LEAKY_RELU","LESS","LESS_EQUAL","LOG","LOGICAL_AND","LOGICAL_NOT","LOGICAL_OR","LOGISTIC","MAXIMUM","MAX_POOL_2D","MEAN","MINIMUM","MIRROR_PAD","MUL","NEG","NOT_EQUAL","ONE_HOT","PACK","PAD","PADV2","POW","PRELU","QUANTIZE","REDUCE_ALL","REDUCE_ANY","REDUCE_MAX","REDUCE_MIN","RELU","RELU_0_TO_1","RELU6","RELU_N1_TO_1","RESHAPE","RESIZE_BILINEAR","RESIZE_NEAREST_NEIGHBOR","REVERSE_V2","ROUND","RSQRT","SELECT","SELECT_V2","SIGN","SIN","SLICE","SOFTMAX","SPACE_TO_BATCH_ND","SPACE_TO_DEPTH","SPLIT","SPLIT_V","SQRT","SQUARE","SQUARED_DIFFERENCE","STABLEHLO_COMPOSITE","STRIDED_SLICE","SUB","SUM","TANH","TILE","TOPK_V2","TRANSPOSE","TRANSPOSE_CONV","UNPACK"]),vx=Ix("tflite_coreml",db,Object.keys(pb)),wx=Ix("litert_qualcomm_qnn",mb,[...fb]);function Rp(e){return String(e?.format||"").toLowerCase()!=="tflite"||!Array.isArray(e?.ops)||!Array.isArray(e?.tensors)?[]:[ki({analysis:e,profileId:"tflite_coreml_delegate",label:"TFLite Core ML delegate",evidenceClass:"SOURCE_PINNED_ARTIFACT_PRECHECK",rows:G3(e),source:{...db,rulepack_sha256:vx},interpretationBoundary:"Pinned TensorFlow Core ML delegate registration, FP16GraphPartitionHelper, serialized op version, constant-FP16 DEQUANTIZE full-versus-partial delegation rule, and visible first-input dtype precheck. Op-specific validators, selected Apple OS/Core ML version and options, delegate build, compiled partition, device selection, execution, and latency remain unresolved."}),ki({analysis:e,profileId:"litert_qualcomm_qnn",label:"LiteRT Qualcomm QNN compiler",evidenceClass:"SOURCE_PINNED_ARTIFACT_PRECHECK",rows:H3(e),source:{...mb,rulepack_sha256:wx},interpretationBoundary:"Pinned LiteRT Qualcomm compiler legalization registry precheck. Per-op legalization predicates, selected QNN SDK/plugin build, SoC/backend capability, compiled QNN graph, dispatch, execution, transfer, and latency remain unresolved until identity-bound evidence is imported."})]}function xx(){return Object.freeze({schema:"deepbom.tflite_additional_accelerator_source_manifest.v1",profiles:[{id:"tflite_coreml_delegate",source:db,rulepack_sha256:vx,registered_op_count:Object.keys(pb).length},{id:"litert_qualcomm_qnn",source:mb,rulepack_sha256:wx,registered_op_count:fb.size}]})}function G3(e){let t=e.ops.map((r,s)=>{let c=Nx(r,s),u=String(r?.name||"UNKNOWN");if(u==="DEQUANTIZE")return V3(e,r,c);let l=pb[u];if(l==null)return Jr(c,"builtin_operator_not_registered_in_pinned_coreml_delegate_source");let _=Number(r?.version??1);if(!Number.isSafeInteger(_)||_<1)return __(c,"serialized_op_version_invalid_or_missing");if(_>l)return Jr(c,`serialized_op_version_${_}_exceeds_coreml_maximum_${l}`);let d=K3(e,r,u==="TRANSPOSE_CONV"?2:0);if(d&&d!=="FLOAT32")return Jr(c,`coreml_delegate_first_runtime_input_dtype_${d}_is_not_float32`);let m=["selected_apple_os_coreml_version_and_delegate_build","coreml_op_specific_validator_and_partition_acceptance"];return d||m.push("first_runtime_input_dtype_not_resolved"),_b(c,m)});if(!t.filter(r=>r.fp16_constant_dequantize===!0).length)return t;let i=t.filter(r=>r.fp16_constant_dequantize!==!0),o=i.some(r=>r.state===ct.DEFINITE_EXCLUSION),a=i.some(r=>r.state===ct.UNRESOLVED);return t.map(r=>r.fp16_constant_dequantize!==!0?r:o?Jr(r.op_index,"fp16_constant_dequantize_kept_on_cpu_during_partial_coreml_delegation"):a?__(r.op_index,"fp16_constant_dequantize_full_delegation_condition_unresolved"):_b(r.op_index,["all_non_dequantize_nodes_must_be_accepted_by_the_selected_coreml_delegate_build","coreml_delegate_full_graph_partition_and_option_limits"]))}function V3(e,t,n){let i=Ex(e,t,0);if(!i)return __(n,"dequantize_input_tensor_contract_not_resolved");let o=String(i.dtype||"").toUpperCase();return o?o!=="FLOAT16"?Jr(n,`dequantize_input_dtype_${o}_is_not_constant_float16`):i.constant_buffer===!1?Jr(n,"float16_dequantize_input_is_not_a_serialized_constant"):i.constant_buffer!==!0?__(n,"float16_dequantize_constant_storage_not_resolved"):{op_index:n,state:ct.UNRESOLVED,reason_codes:[],unresolved_predicates:["fp16_constant_dequantize_full_delegation_condition_pending"],fp16_constant_dequantize:!0}:__(n,"dequantize_input_dtype_not_resolved")}function H3(e){return e.ops.map((t,n)=>{let i=Nx(t,n),o=String(t?.name||"UNKNOWN");return fb.has(o)?_b(i,["qnn_legalization_predicates_selected_sdk_plugin_soc_and_backend"]):Jr(i,"litert_opcode_not_registered_in_pinned_qualcomm_compiler_support_registry")})}function K3(e,t,n){return String(Ex(e,t,n)?.dtype||"").toUpperCase()||null}function Ex(e,t,n){let i=Number(t?.inputs?.[n]);return!Number.isSafeInteger(i)||i<0?null:e.tensors.find((o,a)=>Number(o?.index??a)===i)||null}function _b(e,t){return{op_index:e,state:ct.CONDITIONALLY_ELIGIBLE,reason_codes:[],unresolved_predicates:t}}function Jr(e,t){return{op_index:e,state:ct.DEFINITE_EXCLUSION,reason_codes:[t],unresolved_predicates:[]}}function __(e,t){return{op_index:e,state:ct.UNRESOLVED,reason_codes:[],unresolved_predicates:[t]}}function Nx(e,t){let n=Number(e?.index);return Number.isSafeInteger(n)?n:t}function Ix(e,t,n){return K(Q({schema:"deepbom.source_rulepack_identity.v1",id:e,source:t,registered_ops:[...n].sort()}))}Me();Ce();var hb="deepbom.edgetpu_compiler_evidence.v1",Cx=/^[a-f0-9]{64}$/,Z3=new Set(["mapped","unmapped"]);function gb(e,t,{fileSha256:n=null}={}){if(String(t?.format||"").toLowerCase()!=="tflite"||!Array.isArray(t?.ops))throw new Error("Edge TPU compiler evidence requires a decoded TFLite artifact.");let i=typeof e=="string"?JSON.parse(e):e;if(!i||i.schema!==hb)throw new Error(`Edge TPU compiler evidence must use ${hb}.`);let o=vc(i.artifact_sha256,"artifact SHA-256");if(o!==vc(t.model_sha256,"active artifact SHA-256"))throw new Error("Edge TPU compiler evidence is not bound to the active artifact.");let a={name:Bp(i.compiler?.name,"compiler name"),version:Bp(i.compiler?.version,"compiler version"),binary_sha256:vc(i.compiler?.binary_sha256,"compiler binary SHA-256")},r=Y3(i.invocation?.options),s=K(Q({options:r}));if(i.invocation?.sha256!=null&&vc(i.invocation.sha256,"invocation SHA-256")!==s)throw new Error("Edge TPU compiler invocation SHA-256 does not reproduce from normalized options.");let c=W3(i.operations,t.ops),u=c.filter(p=>p.mapping==="mapped").length,l={operation_count:c.length,mapped_operation_count:u,unmapped_operation_count:c.length-u,mapping_coverage_ratio:c.length?u/c.length:null};if(i.summary&&Q(i.summary)!==Q(l))throw new Error("Edge TPU compiler evidence summary does not reproduce from operation rows.");let _={schema:hb,evidence_class:"COMPILER_OBSERVED_COMPILED_ARTIFACT_BOUND",artifact_sha256:o,compiler:a,invocation:{options:r},invocation_sha256:s,compiled_artifact_sha256:vc(i.compiled_artifact_sha256,"compiled artifact SHA-256"),compiler_report_sha256:vc(i.compiler_report_sha256||n,"compiler report SHA-256"),operations:c,summary:l,execution_status:"not_observed_compiler_evidence_only",interpretation_boundary:"The compiler report establishes mapped and unmapped serialized TFLite operations for one compiler binary, invocation, and compiled artifact. It does not establish device execution, physical transfer, latency, task accuracy, or release readiness."};return Object.freeze({..._,evidence_sha256:K(Q(_))})}function X3(e,t){let n=JSON.parse(JSON.stringify(e||null)),i=String(n?.evidence_sha256||"").toLowerCase();n&&delete n.evidence_sha256;let o=gb({schema:n?.schema,artifact_sha256:n?.artifact_sha256,compiler:n?.compiler,invocation:{options:n?.invocation?.options,sha256:n?.invocation_sha256},compiled_artifact_sha256:n?.compiled_artifact_sha256,compiler_report_sha256:n?.compiler_report_sha256,operations:n?.operations,summary:n?.summary},t);if(!Cx.test(i)||o.evidence_sha256!==i)throw new Error("Edge TPU compiler evidence SHA-256 is invalid.");return e}function kx(e,t){return X3(t,e),ki({analysis:e,profileId:"google_edgetpu_compiled_plan",label:"Google Edge TPU compiler result",evidenceClass:t.evidence_class,rows:t.operations.map(n=>({op_index:n.op_index,state:n.mapping==="mapped"?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:n.mapping==="mapped"?[]:[n.reason],unresolved_predicates:n.mapping==="mapped"?["device_execution_not_observed"]:[]})),source:{compiler_name:t.compiler.name,compiler_version:t.compiler.version,compiler_binary_sha256:t.compiler.binary_sha256,compiled_artifact_sha256:t.compiled_artifact_sha256,compiler_report_sha256:t.compiler_report_sha256},interpretationBoundary:t.interpretation_boundary})}function W3(e,t){if(!Array.isArray(e)||e.length!==t.length)throw new Error("Edge TPU compiler evidence must classify every serialized graph operation exactly once.");return e.map((n,i)=>{let o=Number(n?.op_index),a=t[i],r=Number.isSafeInteger(Number(a?.index))?Number(a.index):i;if(!Number.isSafeInteger(o)||o!==r)throw new Error(`Edge TPU compiler operation index mismatch at row ${i}.`);let s=Bp(n?.op_name,`operation name ${o}`);if(s!==String(a?.name||""))throw new Error(`Edge TPU compiler operation name mismatch at #${o}.`);let c=String(n?.mapping||"");if(!Z3.has(c))throw new Error(`Edge TPU compiler mapping is invalid at #${o}.`);let u=n?.reason==null?null:Bp(n.reason,`operation reason ${o}`);if(c==="unmapped"&&!u)throw new Error(`Unmapped Edge TPU operation #${o} requires a reason.`);return{op_index:o,op_name:s,mapping:c,reason:u}})}function Y3(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"||!t.trim()||t.length>1024))throw new Error("Edge TPU compiler options must be a bounded string array.");return e.map(t=>t.trim())}function Bp(e,t){let n=String(e||"").trim();if(!n||n.length>1024)throw new Error(`Edge TPU ${t} is invalid.`);return n}function vc(e,t){let n=String(e||"").toLowerCase();if(!Cx.test(n))throw new Error(`Edge TPU ${t} is invalid.`);return n}Me();Ce();var bb="deepbom.litert_qualcomm_compiler_dispatch_evidence.v1",Sx=/^[a-f0-9]{64}$/,J3=new Set(["compiled","not_compiled"]),eB=new Set(["not_observed","loaded","invoked"]);function yb(e,t,{fileSha256:n=null}={}){if(String(t?.format||"").toLowerCase()!=="tflite"||!Array.isArray(t?.ops))throw new Error("LiteRT Qualcomm evidence requires a decoded TFLite artifact.");let i=typeof e=="string"?JSON.parse(e):e;if(i?.schema!==bb)throw new Error(`LiteRT Qualcomm evidence must use ${bb}.`);let o=ma(i.artifact_sha256,"artifact SHA-256");if(o!==ma(t.model_sha256,"active artifact SHA-256"))throw new Error("LiteRT Qualcomm evidence is not bound to the active artifact.");let a=xx().profiles.find(b=>b.id==="litert_qualcomm_qnn"),r=oB(i.source?.litert_commit,"LiteRT source commit");if(r!==a.source.commit)throw new Error("LiteRT Qualcomm evidence source commit differs from the analyzer source profile.");let s=ma(i.source?.rulepack_sha256,"source rulepack SHA-256");if(s!==a.rulepack_sha256)throw new Error("LiteRT Qualcomm evidence rulepack SHA-256 differs from the analyzer source profile.");let c={name:Dp(i.compiler?.name,"compiler name"),version:Dp(i.compiler?.version,"compiler version"),binary_sha256:ma(i.compiler?.binary_sha256,"compiler binary SHA-256")},u=iB(i.invocation?.options,"compiler options"),l=K(Q({options:u}));if(i.invocation?.sha256!=null&&ma(i.invocation.sha256,"invocation SHA-256")!==l)throw new Error("LiteRT Qualcomm invocation SHA-256 does not reproduce from normalized options.");let _=nB(i.operations,t.ops),p=_.filter(b=>b.compile_status==="compiled").length,d=String(i.dispatch?.status||"not_observed");if(!eB.has(d))throw new Error("LiteRT Qualcomm dispatch status is invalid.");let m=i.dispatch?.runtime_binary_sha256==null?null:ma(i.dispatch.runtime_binary_sha256,"dispatch runtime binary SHA-256"),f=i.dispatch?.evidence_sha256==null?null:ma(i.dispatch.evidence_sha256,"dispatch evidence SHA-256");if(d!=="not_observed"&&(!m||!f))throw new Error("Observed LiteRT Qualcomm dispatch state requires runtime binary and dispatch evidence SHA-256 values.");let g={operation_count:_.length,compiled_operation_count:p,not_compiled_operation_count:_.length-p,dispatch_status:d};if(i.summary&&Q(i.summary)!==Q(g))throw new Error("LiteRT Qualcomm summary does not reproduce from operation and dispatch evidence.");let h={schema:bb,evidence_class:"COMPILER_OBSERVED_COMPILED_ARTIFACT_BOUND",artifact_sha256:o,source:{litert_commit:r,rulepack_sha256:s},compiler:c,invocation:{options:u},invocation_sha256:l,compiled_plan_sha256:ma(i.compiled_plan_sha256,"compiled QNN plan SHA-256"),source_file_sha256:ma(i.source_file_sha256||n,"evidence source-file SHA-256"),operations:_,dispatch:{status:d,runtime_binary_sha256:m,evidence_sha256:f},summary:g,interpretation_boundary:d==="not_observed"?"Compiler evidence binds source, compiler binary, options, operation legalization results, and compiled QNN plan. Dispatch, device assignment, execution, physical transfer, latency, and task correctness are not observed.":"Compiler and dispatch evidence bind one QNN plan and runtime binary. Per-source-op execution, physical transfer, latency, and task correctness are not inferred unless separately measured and identity-bound."};return Object.freeze({...h,evidence_sha256:K(Q(h))})}function tB(e,t){let n=JSON.parse(JSON.stringify(e||null)),i=String(n?.evidence_sha256||"").toLowerCase();n&&delete n.evidence_sha256;let o=yb({...n,invocation:{...n?.invocation,sha256:n?.invocation_sha256}},t,{fileSha256:n?.source_file_sha256});if(!Sx.test(i)||i!==o.evidence_sha256)throw new Error("LiteRT Qualcomm evidence SHA-256 is invalid.");return e}function Tx(e,t){return tB(t,e),ki({analysis:e,profileId:"litert_qualcomm_qnn_compiled_plan",label:"LiteRT Qualcomm compiled QNN plan",evidenceClass:t.evidence_class,rows:t.operations.map(n=>({op_index:n.op_index,state:n.compile_status==="compiled"?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:n.compile_status==="compiled"?[]:[n.reason],unresolved_predicates:n.compile_status==="compiled"?[t.dispatch.status==="not_observed"?"qnn_dispatch_not_observed":"per_source_op_execution_not_observed"]:[]})),source:{...t.source,compiler_binary_sha256:t.compiler.binary_sha256,compiled_plan_sha256:t.compiled_plan_sha256,dispatch_status:t.dispatch.status,dispatch_runtime_binary_sha256:t.dispatch.runtime_binary_sha256},interpretationBoundary:t.interpretation_boundary})}function nB(e,t){if(!Array.isArray(e)||e.length!==t.length)throw new Error("LiteRT Qualcomm evidence must classify every serialized graph operation exactly once.");return e.map((n,i)=>{let o=Number.isSafeInteger(Number(t[i]?.index))?Number(t[i].index):i,a=Number(n?.op_index);if(!Number.isSafeInteger(a)||a!==o)throw new Error(`LiteRT Qualcomm operation index mismatch at row ${i}.`);let r=Dp(n?.op_name,`operation name ${a}`);if(r!==String(t[i]?.name||""))throw new Error(`LiteRT Qualcomm operation name mismatch at #${a}.`);let s=String(n?.compile_status||"");if(!J3.has(s))throw new Error(`LiteRT Qualcomm compile status is invalid at #${a}.`);let c=n?.reason==null?null:Dp(n.reason,`operation reason ${a}`);if(s==="not_compiled"&&!c)throw new Error(`LiteRT Qualcomm non-compiled operation #${a} requires a reason.`);return{op_index:a,op_name:r,compile_status:s,reason:c}})}function iB(e,t){if(!Array.isArray(e)||e.some(n=>typeof n!="string"||!n.trim()||n.length>1024))throw new Error(`LiteRT Qualcomm ${t} must be a bounded string array.`);return e.map(n=>n.trim())}function Dp(e,t){let n=String(e||"").trim();if(!n||n.length>1024)throw new Error(`LiteRT Qualcomm ${t} is invalid.`);return n}function oB(e,t){let n=String(e||"").toLowerCase();if(!/^[a-f0-9]{40}$/.test(n))throw new Error(`LiteRT Qualcomm ${t} is invalid.`);return n}function ma(e,t){let n=String(e||"").toLowerCase();if(!Sx.test(n))throw new Error(`LiteRT Qualcomm ${t} is invalid.`);return n}var Rx="deepbom.execution_placement_evidence.v1",zx=Object.freeze(["artifact_observed","source_pinned_eligibility","configuration_bound","runtime_evidence"]);function Ab(e,t=null){if(!e||typeof e!="object")throw new Error("Execution placement requires analysis evidence.");let n=String(e.format||"").toLowerCase(),i=rB(t),o;if(n==="tflite")o=sB(e,i);else if(n==="onnx")o=cB(e,i);else if(n==="coreml")o=lB(e,i);else if(n==="gguf")o=uB(e,i);else if(n==="safetensors")o=_B(e);else if(n==="executorch")o=dB(e);else throw new Error(`Execution placement does not support format: ${n||"missing"}.`);let a=aB(o,{analysis:e});if(!a.valid)throw new Error(`Execution placement evidence is invalid: ${a.issues.join("; ")}`);return o}function aB(e,{analysis:t=null}={}){let n=[];if(!e||typeof e!="object")return{valid:!1,issues:["evidence must be an object"]};e.schema!==Rx&&n.push("schema mismatch"),["tflite","onnx","coreml","gguf","safetensors","executorch"].includes(e.format)||n.push("unsupported format"),(!Number.isSafeInteger(e.artifact_item_count)||e.artifact_item_count<0)&&n.push("artifact item count is invalid"),(!Array.isArray(e.levels)||e.levels.length!==zx.length||e.levels.some((s,c)=>s?.id!==zx[c]||!s.label||!s.state||!s.tone||!s.evidence_class||!s.detail))&&n.push("evidence level ladder is incomplete or out of order");let i=e.flow||{},o=Array.isArray(i.segments)?i.segments:[];(!Number.isSafeInteger(i.scope_item_count)||i.scope_item_count<0)&&n.push("flow scope item count is invalid"),(!Number.isSafeInteger(i.covered_item_count)||i.covered_item_count<0||i.covered_item_count>i.scope_item_count)&&n.push("flow covered item count is invalid");let a=0;for(let s of o){if(!Number.isSafeInteger(s.start_position)||!Number.isSafeInteger(s.end_position)||!Number.isSafeInteger(s.item_count)||s.item_count<=0||s.start_position!==a||s.end_position!==s.start_position+s.item_count-1||!s.key||!s.label||!s.tone){n.push("flow segment positions or cardinality are invalid");break}a=s.end_position+1}o.length&&a!==i.scope_item_count&&n.push("flow segments do not conserve the scope item count"),!o.length&&i.rendered_item_count!==0&&n.push("empty flow has a non-zero rendered count"),o.length&&i.rendered_item_count!==a&&n.push("rendered flow count does not match its segments");for(let s of Rt(e.portfolios))if(!s.id||!s.label||!s.evidence_class||!Number.isSafeInteger(s.candidate_count)||s.candidate_count<0||!Number.isSafeInteger(s.total_count)||s.total_count<s.candidate_count){n.push("source portfolio count or identity is invalid");break}for(let s of Rt(e.static_profiles))try{sb(s,{analysis:t})}catch(c){n.push(String(c?.message||c));break}try{lb(e.placement_comparison,t,Rt(e.static_profiles))}catch(s){n.push(String(s?.message||s))}for(let s of Rt(e.configuration_preflights))if(!s?.schema||!s?.status||!s?.trust_boundary||!Number.isSafeInteger(s.blocking_issue_count)||!Number.isSafeInteger(s.unresolved_issue_count)){n.push("configuration preflight summary is invalid");break}let r=e.levels?.[3];if(e.format==="coreml"&&r?.state!=="NOT OBSERVED"&&n.push("Core ML plan was promoted to observed runtime evidence"),e.format==="coreml"&&e.portfolios.length&&e.portfolios.reduce((s,c)=>s+c.candidate_count,0)!==i.scope_item_count&&n.push("Core ML anticipated-device counts do not conserve the plan rows"),e.format==="safetensors"&&(o.length||e.portfolios.length)&&n.push("SafeTensors contains fabricated placement evidence"),["tflite","onnx"].includes(e.format)&&e.runtime_observation?.status==="observed"&&e.runtime_observation.covered_item_count!==i.covered_item_count&&n.push("runtime assignment coverage differs from flow coverage"),t){let s=String(t.format||"").toLowerCase(),c=e.format==="gguf"||e.format==="safetensors"?ft(t.tensor_count):Rt(t.ops).length;e.format!==s&&n.push("analysis format binding mismatch"),e.artifact_item_count!==c&&n.push("analysis item-count binding mismatch"),String(e.artifact_sha256||"")!==String(t.model_sha256||"")&&n.push("analysis SHA-256 binding mismatch")}return{valid:n.length===0,issues:n}}function rB(e){return!e||typeof e!="object"?null:e.runtimeAssignmentEvidence||e.runtime_assignment||e}function sB(e,t){let n=Rt(e.ops),i=Bx(t,n),o=i.rows.length>0;o&&Mp(e,t,"TFLite runtime assignment");let a=o&&i.rows.length===n.length,r=n.filter(y=>Ox(y.xnnpack_chain_id,-1)>=0).length,s=Rt(e.delegation_repair?.runtime_build_risks);if(s.find(y=>y.baseline_conditionally_delegatable_op_count!=null&&ft(y.baseline_conditionally_delegatable_op_count)!==r))throw new Error("TFLite runtime-build risk baseline differs from the canonical XNNPACK candidate count.");let u=e.tflite_delegate_compatibility_evidence,l=o||fx(t,s),p=gx(t,u?.build_requirements).all_applicable_requirements_bound,d=o||l||p||!!(t?.runtime_identity||t?.runtime_identity_status==="bound"),m=Rt(u?.profiles).filter(y=>!/xnnpack/i.test(`${y.id||""} ${y.label||""}`)).map(y=>d_(y.id||y.label,y.label||y.id,ft(y.source_candidate_after_artifact_precheck_count),n.length,"SOURCE_PINNED_ARTIFACT_PRECHECK","artifact-visible source candidates")),f=Array.isArray(e.tensors)?[ki({analysis:e,profileId:"xnnpack_cpu",label:"XNNPACK CPU",evidenceClass:"SOURCE_PINNED_PREDICTED",rows:lx(e),source:{rule_basis:e.delegation_rule_basis||null,selector_assessment_status:e.xnnpack_selector_assessment_status||null},interpretationBoundary:"CPU baseline derived from the pinned XNNPACK conditional-delegation ledger. It is not an accepted partition, selected microkernel, measured CPU workload, or timing result."}),...Rt(u?.profiles).filter(y=>Rt(y?.rows).length===n.length).map(y=>ki({analysis:e,profileId:y.id,label:y.label||y.id,evidenceClass:y.evidence_class||"SOURCE_PINNED/DERIVED_PARTIAL",rows:cx(y),source:{tensorflow_source_commit:u.tensorflow_source_commit||null,rulepack_sha256:u.rulepack_sha256||null}})),...Rp(e)]:[];e.edgetpu_compiler_evidence&&f.push(kx(e,e.edgetpu_compiler_evidence)),e.litert_qualcomm_evidence&&f.push(Tx(e,e.litert_qualcomm_evidence));let g=new Set(["xnnpack",...m.map(y=>y.id)]),h=f.filter(y=>y.profile_id!=="xnnpack_cpu"&&!g.has(y.profile_id)).map(y=>d_(y.profile_id,y.label,y.state_counts.CONDITIONALLY_ELIGIBLE,y.op_count,y.evidence_class,"independent conditionally eligible operations")),b=o?Mx(n,i.byOp):p_(n,y=>{let x=Ox(y.xnnpack_chain_id,-1);return x>=0?[`xnn-${x}`,`XNNPACK C${x}`,"candidate"]:[`cpu-${y.xnnpack_break_class||"fallback"}`,"CPU fallback",fB(y)]},$x),A=u?`XNNPACK ${r}/${n.length} candidate ops; GPU, NNAPI, Core ML, and Qualcomm QNN artifact-visible candidates are separate source-pinned profiles.`:`XNNPACK ${r}/${n.length} candidate ops; Core ML and Qualcomm QNN source prechecks are loaded. GPU/NNAPI profiles require the protected source ledger for this run.`;return wc(e,{format:"tflite",itemKind:"serialized_operator",itemCount:n.length,title:"TFLite Execution Placement",subtitle:o?"Observed delegate assignment":"XNNPACK predicted partition + alternate delegate eligibility",state:o?a?"RUNTIME OBSERVED":"PARTIAL RUNTIME OBSERVATION":"SOURCE-PINNED PREDICTION",tone:o&&a?"complete":"partial",banner:!l&&s.length?mB(s,r,n.length):null,levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${n.length} serialized operators and their tensor contracts; the artifact does not select a delegate or runtime build.`),Et("source_pinned_eligibility","Source-pinned eligibility","ASSESSED","partial","SOURCE_PINNED_PREDICTED",A),Et("configuration_bound","Configuration-bound",d?"BOUND":"UNBOUND",d?"partial":"missing",d?"CONFIGURATION_BOUND":"NOT_OBSERVED",o?"The imported runtime assignment binds the executed configuration.":l&&p?"XNNPACK requirements and the TFLite GPU/NNAPI selected-build inventory are bound; device acceptance remains separate.":l?"XNNPACK build requirements are bound; TFLite GPU/NNAPI selected-build availability remains separate.":p?"TFLite GPU/NNAPI selected-build inventory is bound; XNNPACK build requirements and device acceptance remain separate.":d?"A runtime identity is bound, but backend-specific build requirements remain separately assessed.":"Selected delegate build flags and device capability are not embedded in TFLite."),Et("runtime_evidence","Runtime evidence",o?a?"OBSERVED":"PARTIAL OBSERVED":"NOT OBSERVED",o?a?"complete":"partial":"missing",o?"OBSERVED_RUNTIME":"NOT_OBSERVED",o?`${i.rows.length}/${n.length} original-op assignments are identity-bound.`:"Executed delegate partitions, lowering, copies, and kernels require an imported target trace.")],flow:xc(o?"Observed assignment flow":"Conditional XNNPACK partition flow",o?"OBSERVED_RUNTIME_ASSIGNMENT":"SOURCE_PINNED_PREDICTED_PARTITION",n.length,o?i.rows.length:n.length,b),portfolios:[d_("xnnpack","XNNPACK",r,n.length,"SOURCE_PINNED_PREDICTED","conditionally delegatable operators"),...m,...h],staticProfiles:f,note:o?"Observed rows apply only to the imported runtime capture; static XNNPACK and alternate-delegate ledgers remain separate comparisons.":u?"Each delegate/compiler row is an independent source eligibility or imported compiler-result portfolio. They are not combined into a fictitious multi-delegate partition.":"Core ML and Qualcomm QNN profiles remain independent source prechecks. GPU/NNAPI profiles are not loaded in this run, and no multi-backend priority or assignment is inferred.",runtimeObservation:Dx(i,n.length)})}function cB(e,t){let n=Rt(e.ops),i=Rt(e.ort_compatibility_evidence?.execution_providers),o=e.tensorrt_static_preflight,a=Bx(t,n),r=a.rows.length>0;r&&Mp(e,t,"ONNX runtime assignment");let s=r&&a.rows.length===n.length,c=t?.source?.adapter?.native_capture?.selected_build_provider_binding,u=r||!!c,l=i.map(p=>d_(p.execution_provider||p.id||p.label,p.label||p.execution_provider,ft(p.source_candidate_after_artifact_precheck_count),n.length,"SOURCE_PINNED_ARTIFACT_PRECHECK","source candidates after artifact precheck")),_=Array.isArray(e.tensors)?i.filter(p=>Rt(p?.ops).length===n.length).map(p=>ki({analysis:e,profileId:p.execution_provider||p.id||p.label,label:p.label||p.execution_provider||p.id,evidenceClass:p.support_evidence_class||"SOURCE_PINNED_ARTIFACT_PRECHECK",rows:ux(p),source:{source_id:p.source_id||null,source_ref:p.source_ref||null,source_sha256:p.source_sha256||null}})):[];return o?.projection&&_.push(o.projection),wc(e,{format:"onnx",itemKind:"modelproto_operator",itemCount:n.length,title:"ONNX Execution Placement",subtitle:r?"Observed ORT provider assignment":"Per-EP source eligibility portfolios",state:r?s?"RUNTIME OBSERVED":"PARTIAL RUNTIME OBSERVATION":i.length?"SOURCE-PINNED ELIGIBILITY":"SOURCE LEDGER NOT LOADED",tone:r?s?"complete":"partial":i.length?"partial":"missing",banner:r?null:"A provider-priority partition is intentionally not inferred from source registration alone. ORT graph optimization, provider order, selected build, GetCapability acceptance, and CPU fallback must be bound before a joint flow exists.",levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${n.length} ModelProto operators, domains, opsets, and serialized graph contracts are decoded.`),Et("source_pinned_eligibility","Source-pinned eligibility",i.length?`${i.length} EP PROFILES`:"NOT LOADED",i.length?"partial":"missing",i.length?"SOURCE_PINNED_ARTIFACT_PRECHECK":"NOT_ASSESSED",i.length?"Each EP is assessed independently against pinned registrations and artifact-visible predicates.":"Load the source-backed ORT compatibility ledger to evaluate supported EP profiles."),Et("configuration_bound","Configuration-bound",u?"BUILD BOUND":"UNBOUND",u?"partial":"missing",u?"CONFIGURATION_BOUND":"NOT_OBSERVED",u?r&&!c?"Imported runtime assignment binds the executed provider configuration; a separate selected-build inventory was not emitted.":"Selected package/source build provider inventory is bound; GetCapability acceptance is still not inferred.":"ORT version/build, provider priority, reduced-op configuration, and device are not selected by the ONNX artifact."),Et("runtime_evidence","Runtime evidence",r?s?"OBSERVED":"PARTIAL OBSERVED":"NOT OBSERVED",r?s?"complete":"partial":"missing",r?"OBSERVED_RUNTIME":"NOT_OBSERVED",r?`${a.rows.length}/${n.length} original-op provider assignments are bound to the imported profile.`:"Actual EP assignment, optimized nodes, lowering, memory pattern, and kernels require a bound ORT profile.")],flow:xc(r?"Observed EP assignment flow":"EP candidate portfolios",r?"OBSERVED_RUNTIME_ASSIGNMENT":"INDEPENDENT_SOURCE_ELIGIBILITY_PORTFOLIOS",r?n.length:0,r?a.rows.length:0,r?Mx(n,a.byOp):[]),portfolios:l,staticProfiles:_,configurationPreflights:o?[pB(o)]:[],note:r?"The flow is reconstructed from imported observed provider rows; it is not backfilled from static eligibility.":"Candidate counts answer whether each EP remains source-eligible. They do not answer which EP wins when providers are registered together.",runtimeObservation:Dx(a,n.length)})}function lB(e,t){let n=Rt(e.ops),i=t?.schema==="deepbom.coreml_compute_plan.v1"?t:null,o=Rt(i?.structure?.rows);if(i&&Mp(e,i,"Core ML compute plan"),i&&o.length!==n.length)throw new Error("Core ML compute-plan operation count differs from the serialized graph.");if(i&&o.some((s,c)=>ft(s.op_index)!==ft(n[c]?.index)))throw new Error("Core ML compute-plan operation order differs from the serialized graph.");let a=e.coreml?.deployment_floor||{},r=o.length?p_(o,s=>{let c=s.preferred_compute_device||"not determined";return[c,c,"anticipated"]},s=>ft(s.op_index)):[];return wc(e,{format:"coreml",itemKind:"serialized_operation",itemCount:n.length,title:"Core ML Execution Placement",subtitle:i?"MLComputePlan anticipated device usage":"Serialized graph + runtime-plan boundary",state:i?"ANTICIPATED - NOT EXECUTED":"RUNTIME PLAN REQUIRED",tone:i?"estimated":"missing",banner:i?"MLComputePlan preferred/supported compute devices and estimated relative cost are runtime-produced planning estimates for one compiled model and compute-unit configuration. They are not observed execution placement or measured timing.":null,levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${n.length} serialized Core ML operation${n.length===1?"":"s"} and interface contracts are decoded for this representation.`),Et("source_pinned_eligibility","Source-pinned eligibility",a.status==="assessed"?"OS FLOOR DERIVED":"PARTIAL",a.status==="assessed"?"complete":"partial","SOURCE_PINNED_DERIVED","Serialized specification features determine a necessary OS/Core ML floor; they do not select CPU, GPU, or Neural Engine."),Et("configuration_bound","Configuration-bound",i?"PLAN BOUND":"UNBOUND",i?"estimated":"missing",i?"ANTICIPATED_RUNTIME_PLAN":"NOT_OBSERVED",i?`${i.configuration.compute_units}; compiled model and exact operation order are identity-bound.`:"Compile the model on Apple hardware and export an identity-bound MLComputePlan."),Et("runtime_evidence","Runtime evidence","NOT OBSERVED","missing","NOT_OBSERVED","Executed placement, fusion, allocation, and latency require a separate Apple runtime trace; MLComputePlan is not promoted to observed evidence.")],flow:xc(i?"Anticipated preferred-device runs":"No placement flow available",i?"ANTICIPATED_MLCOMPUTEPLAN":"NOT_ASSESSED",o.length,o.length,r),portfolios:i?Object.entries(hB(o,s=>s.preferred_compute_device||"not determined")).map(([s,c])=>d_(s,s,c,o.length,"ANTICIPATED_RUNTIME_PLAN","anticipated operations")):[],note:i?i.boundary:"Static Core ML decoding stops at artifact structure and OS availability. Placement is intentionally left unresolved.",runtimeObservation:{status:"not_observed",covered_item_count:0,total_item_count:n.length,rejected_row_count:0}})}function uB(e,t){let n=t?.schema==="deepbom.gguf_runtime_environment.v2"?t:null;n&&Mp(e,n,"GGUF runtime environment");let i=n?.compute_graph||null,o=ft(i?.graph_count),a=Rt(i?.graphs);if(i&&o!==a.length)throw new Error("GGUF scheduler graph count differs from its graph inventory.");let r=o>0?a[0]:null,s=Rt(r?.scheduled_nodes);if(o>0&&(!r||!s.length))throw new Error("GGUF runtime evidence declares a captured graph without scheduled-node rows.");if(s.some(_=>!String(_?.backend||"").trim()))throw new Error("GGUF scheduled-node evidence lacks a backend assignment.");let c=o>0,u=e.gguf?.backend_compatibility||{},l=s.length?p_(s,_=>{let p=_.backend||"unresolved";return[p,p,p==="unresolved"?"missing":"observed"]},(_,p)=>ft(_.scheduled_index??_.node_index??p)):[];return wc(e,{format:"gguf",itemKind:"serialized_tensor",itemCount:ft(e.tensor_count),title:"GGUF Execution Placement",subtitle:c?"Observed instrumented GGML scheduler assignment":"Artifact prerequisites + external offload contract",state:c?"RUNTIME OBSERVED":n?"CONFIGURATION BOUND":"EXECUTION GRAPH EXTERNAL",tone:c?"complete":n?"partial":"missing",banner:n&&!c?"The imported manifest binds the selected llama.cpp build, backend, device, context, batch, and GPU-layer request, but no generated scheduler graph was captured. Configuration is bound; execution placement is not observed.":null,levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${ft(e.tensor_count)} tensors and GGML storage contracts are decoded. GGUF does not serialize an execution DAG.`),Et("source_pinned_eligibility","Source-pinned eligibility",u.status==="source_candidate"?"CANDIDATE":u.status==="invalid"?"EXCLUDED":"UNRESOLVED",u.status==="source_candidate"?"partial":"missing",u.status==="source_candidate"?"SOURCE_PINNED_PREREQUISITE":"NOT_ASSESSED","Pinned llama.cpp architecture, storage, backend build-option, and registration prerequisites are assessed without inventing layer offload."),Et("configuration_bound","Configuration-bound",n?"BOUND":"UNBOUND",n?"partial":"missing",n?"CONFIGURATION_BOUND":"NOT_OBSERVED",n?`${n.selection.requested_backend_label}; n_gpu_layers=${n.selection.gpu_layers}; context=${n.selection.context_size}; batch=${n.selection.batch_size}.`:"Engine build, backend inventory, n_gpu_layers, split policy, context, batch, and device remain external."),Et("runtime_evidence","Runtime evidence",c?"OBSERVED":"NOT OBSERVED",c?"complete":"missing",c?"OBSERVED_RUNTIME":"NOT_OBSERVED",c?`${o} generated graph(s), ${i.split_count} scheduler split(s), and ${i.successful_dispatch_count}/${i.dispatch_count} successful dispatch(es) are captured.`:"Per-node backend assignment and scheduler transitions require the pinned instrumented llama.cpp trace.")],flow:xc(c?"Observed scheduled-node backend flow - first captured graph":"No serialized placement flow",c?"OBSERVED_GGML_SCHEDULER_GRAPH":"NOT_SERIALIZED",s.length,s.length,l),portfolios:[],note:c?i.interpretation_boundary:"Architecture and storage compatibility do not determine generated GGML nodes, layer offload, tensor residency, or backend transitions.",runtimeObservation:{status:c?"observed":"not_observed",covered_item_count:s.length,total_item_count:s.length,rejected_row_count:0}})}function _B(e){return wc(e,{format:"safetensors",itemKind:"serialized_tensor",itemCount:ft(e.tensor_count),title:"SafeTensors Execution Placement",subtitle:"Checkpoint-container boundary",state:"NOT ASSESSABLE FROM CONTAINER",tone:"na",banner:"SafeTensors contains named tensor payloads, dtypes, shapes, and byte ranges. It does not contain an executable graph, runtime provider order, device policy, or placement trace, so a delegation map would be fabricated evidence.",levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${ft(e.tensor_count)} tensor descriptors and their payload ranges are assessed.`),Et("source_pinned_eligibility","Source-pinned eligibility","NOT APPLICABLE","na","NOT_APPLICABLE","A bound config can derive a canonical architecture scenario, but that scenario is not an executed framework graph or backend-eligibility proof."),Et("configuration_bound","Configuration-bound","EXTERNAL","missing","NOT_OBSERVED","Bind the framework graph, preprocessing, runtime build, provider order, device policy, and cache/offload settings that consume this checkpoint."),Et("runtime_evidence","Runtime evidence","EXTERNAL","missing","NOT_OBSERVED","Import support requires a future framework-specific execution-trace schema; no generic placement is inferred today.")],flow:xc("Placement unavailable by format semantics","NOT_APPLICABLE",0,0,[]),portfolios:[],note:"This explicit non-assessment is a format fact, not a missing parser feature.",runtimeObservation:{status:"not_applicable",covered_item_count:0,total_item_count:0,rejected_row_count:0}})}function dB(e){let t=Rt(e.ops),n=e.executorch_container==="pte",i=e.executorch_program?.selected_build_binding||null,o=i?.selected_build||null,a=i?.status==="CONTRADICTION_SELECTED_BUILD_CANNOT_SATISFY_SERIALIZED_PROGRAM",r=n&&t.length?p_(t,c=>{let u=c.instruction_kind==="DelegateCall",l=u?String(c.name||"serialized delegate"):"portable instruction";return[u?l:"portable",l,u?"anticipated":"artifact"]},(c,u)=>ft(c.index??u)):[],s=t.filter(c=>c.instruction_kind==="DelegateCall").length;return wc(e,{format:"executorch",itemKind:n?"serialized_instruction":"named_tensor_data",itemCount:t.length,title:"ExecuTorch Execution Placement",subtitle:n?"Serialized AOT instruction and delegate flow":"FT01 data-container boundary",state:n?s?"SERIALIZED DELEGATE CALLS":"PORTABLE INSTRUCTIONS SERIALIZED":"NOT APPLICABLE TO PTD",tone:n?"partial":"na",banner:n?`ET12 delegate calls and backend IDs are artifact-observed AOT lowering evidence. ${o?a?"The imported selected-build attestation contradicts the serialized program inventory.":"The imported selected-build attestation covers the serialized backend and operator identities, but does not prove loading or execution.":"No selected runtime build or binary inventory is bound."}`:"FT01 stores named tensor/blob segments and no execution plan.",levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",n?`${t.length} ordered ET12 instruction(s), including ${s} serialized delegate call(s), are decoded.`:`${e.tensor_count||0} FT01 named tensor/blob descriptor(s) are decoded.`),Et("source_pinned_eligibility","Source-pinned eligibility",i?"BACKEND REGISTRY PINNED":"SCHEMA PINNED","complete",i?"SOURCE_PINNED_BACKEND_REGISTRY":"SOURCE_PINNED_SCHEMA",i?`${i.source_registry?.backend_count||0} standard backend IDs are bound to the pinned ExecuTorch source registry; serialized identity still does not establish selected-build linkage.`:"The ET12/FT01 wire contract is pinned to the declared ExecuTorch source release; backend implementation eligibility is not inferred from the backend ID alone."),Et("configuration_bound","Configuration-bound",n?o?a?"CONTRADICTION":"ATTESTED":"UNBOUND":"NOT APPLICABLE",n?o?a?"conflict":"complete":"missing":"na",n?o?a?"ATTESTED_BUILD_CONTRADICTION":"ATTESTED_SELECTED_BUILD":"NOT_OBSERVED":"NOT_APPLICABLE",n?o?`${i.delegate_bindings?.length||0} delegate and ${i.kernel_bindings?.length||0} kernel identity binding(s) were compared with attested build inventories; device capability and initialization remain unobserved.`:"The serialized compile specs are observed, but the matching runtime binary, registered backend implementation, device, and allocator configuration are not bound.":"FT01 does not select a consuming PTE or runtime configuration."),Et("runtime_evidence","Runtime evidence","NOT OBSERVED","missing","NOT_OBSERVED","Delegate loading, executed instruction placement, runtime allocation, kernels, physical transfers, and latency require native ExecuTorch evidence.")],flow:xc(n?"Serialized instruction placement flow":"Placement unavailable by format semantics",n?"ARTIFACT_SERIALIZED_AOT_FLOW":"NOT_APPLICABLE",n?t.length:0,n?t.length:0,r),portfolios:[],note:n?"This flow reports serialized KernelCall and DelegateCall boundaries. It is not an execution trace and does not expose delegate-internal operations.":"FT01 is external tensor/blob data, not an executable graph.",runtimeObservation:{status:n?"not_observed":"not_applicable",covered_item_count:0,total_item_count:n?t.length:0,rejected_row_count:0}})}function wc(e,t){let n=t.staticProfiles||[];return{schema:Rx,method_version:"1.0.0",format:t.format,artifact_sha256:String(e.model_sha256||""),artifact_item_kind:t.itemKind,artifact_item_count:t.itemCount,title:t.title,subtitle:t.subtitle,state:t.state,tone:t.tone,banner:t.banner||null,levels:t.levels,flow:t.flow,portfolios:t.portfolios,static_profiles:n,placement_comparison:Op(e,n),configuration_preflights:t.configurationPreflights||[],interpretation_boundary:t.note,runtime_observation:t.runtimeObservation}}function Bx(e,t){let n=Rt(e?.assignments||e?.runtime_assignment?.assignments),i=new Set(t.map(a=>ft(a.index))),o=new Map;for(let a of n){let r=Number(a?.op_index),s=String(a?.provider||a?.observed_provider||"").trim();if(!Number.isSafeInteger(r)||!s)throw new Error("Runtime assignment row lacks a valid original-op index or provider.");if(!i.has(r))throw new Error(`Runtime assignment references out-of-scope op #${r}.`);if(o.has(r))throw new Error(`Runtime assignment duplicates original op #${r}.`);o.set(r,{...a,op_index:r,provider:s})}return{rows:[...o.values()],byOp:o,rawCount:n.length}}function Dx(e,t){return{status:e.rows.length?"observed":"not_observed",covered_item_count:e.rows.length,total_item_count:t,rejected_row_count:e.rawCount-e.rows.length}}function Mx(e,t){return p_(e,n=>{let o=t.get(ft(n.index))?.provider||"unresolved";return[o,o,o==="unresolved"?"missing":"observed"]},$x)}function p_(e,t,n=(i,o)=>o){let i=[];return e.forEach((o,a)=>{let[r,s,c]=t(o,a),u=n(o,a),l=i.at(-1);l?.key===r?(l.item_count+=1,l.end_position=a,l.end_item_id=u):i.push({key:r,label:s,tone:c,start_position:a,end_position:a,start_item_id:u,end_item_id:u,item_count:1})}),i}function xc(e,t,n,i,o){return{label:e,evidence_basis:t,scope_item_count:n,covered_item_count:i,rendered_item_count:o.reduce((a,r)=>a+r.item_count,0),segments:o}}function d_(e,t,n,i,o,a){return{id:String(e||t||"unknown"),label:String(t||e||"unknown"),candidate_count:n,total_count:i,evidence_class:o,detail:a,tone:"partial"}}function Et(e,t,n,i,o,a){return{id:e,label:t,state:n,tone:i,evidence_class:o,detail:a}}function pB(e){let t=e.engine_inspector_evidence||null;return{schema:e.schema,label:"TensorRT Preflight",status:e.status,evidence_class:e.evidence_class,build_profile_sha256:e.build_profile?.profile_sha256||null,execution_path:e.build_profile?.execution_path||null,blocking_issue_count:ft(e.blocking_issue_count),unresolved_issue_count:ft(e.unresolved_issue_count),profile_cost_status:e.optimization_profile_cost?.status||"not emitted",profile_cost_scenario_count:ft(e.optimization_profile_cost?.scenario_count),optimization_profile_cost:e.optimization_profile_cost||null,engine_inspector:t?{schema:t.schema,status:t.status,evidence_class:t.evidence_class,engine_sha256:t.engine?.sha256||null,engine_byte_length:ft(t.engine?.byte_length),profiling_verbosity:t.inspector?.profiling_verbosity||null,schema_generation:t.inspector?.schema_generation||null,execution_context_bound:t.inspector?.execution_context_bound===!0,engine_layer_count:ft(t.engine_layer_count),io_tensor_count:ft(t.io_tensor_count),tactic_annotated_layer_count:ft(t.tactic_annotated_layer_count),multi_source_metadata_layer_count:ft(t.multi_source_metadata_layer_count),dynamic_dimension_tensor_count:ft(t.dynamic_dimension_tensor_count),layer_type_inventory:Rt(t.layer_type_inventory),data_type_inventory:Rt(t.data_type_inventory),source_mapping_status:t.source_mapping_status||null,artifact_engine_relation:t.artifact_engine_relation||null,interpretation_boundary:t.interpretation_boundary||null}:null,issues:Rt(e.issues),trust_boundary:e.trust_boundary,interpretation_boundary:e.interpretation_boundary}}function mB(e,t,n){let i=[...new Set(e.map(a=>a.required_build_configuration).filter(Boolean))],o=i.length?i.join("; "):"unspecified selected-runtime build requirement";return`Conditional assignment: ${t}/${n} XNNPACK candidates depend on unbound selected-runtime build configuration (${o}). If the requirement is absent, the candidate partition changes; no executed assignment is claimed.`}function fB(e){let t=String(e.xnnpack_break_class||"");return t==="structural"?"structural":t==="memory-traffic"?"traffic":t==="high-adjacent-mac-exposure"?"compute":"fallback"}function $x(e,t){return ft(e?.index??t)}function Mp(e,t,n){let i=String(e?.model_sha256||"").toLowerCase(),o=String(t?.artifact_sha256||t?.artifact?.sha256||"").toLowerCase();if(!/^[a-f0-9]{64}$/.test(i)||o!==i)throw new Error(`${n} is not bound to the active artifact SHA-256.`);let a=String(e?.target_profile?.profile_sha256||"").toLowerCase();if(a&&String(t?.target_profile_sha256||t?.target_profile?.profile_sha256||"").toLowerCase()!==a)throw new Error(`${n} is not bound to the active target profile SHA-256.`)}function hB(e,t){let n={};for(let i of e){let o=String(t(i));n[o]=(n[o]||0)+1}return n}function Rt(e){return Array.isArray(e)?e:[]}function ft(e){let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:0}function Ox(e,t=0){let n=Number(e);return Number.isSafeInteger(n)?n:t}var die=Object.freeze({generic:Object.freeze({label:"Model artifact",depth:"Bounded artifact evidence audit",assessed:"Artifact identity and only the format facts explicitly exposed by the selected bounded adapter",runtimeBoundary:"Execution graph, runtime order, placement, latency, quality, and safety remain unobserved unless the artifact or imported evidence explicitly establishes them",nextProof:"Bind the executable deployment artifact, runtime identity, and representative task-output acceptance evidence required by the intended use",stagedDescriptor:"bounded static artifact audit",dashboardTitle:"Model Artifact Evidence",dashboardCopy:"Observed serialized facts are separated from derived structure and unassessed runtime behavior.",runLabel:"Run Bounded Static Audit",completion:"Bounded static artifact audit complete"}),tflite:Object.freeze({label:"TFLite",depth:"Deep graph and deployment-model audit",assessed:"Every serialized SubGraph and control-flow reference, independent per-subgraph tensor/quantization/cost/ArenaPlanner/source-pinned XNNPACK candidate proofs, all-subgraph sparse storage, and target model",runtimeBoundary:"Nested control-flow invocation counts, actual delegate assignment, materialized copies, selected microkernel, and device latency require imported runtime evidence",nextProof:"Import a target delegate assignment and runtime capture, then bind deployment requirements and representative task-output acceptance evidence",stagedDescriptor:"target-bound static graph and deployment audit",dashboardTitle:"TFLite Deployment Evidence",dashboardCopy:"Artifact facts, selected-target estimates, and conditional XNNPACK compatibility are separated from imported runtime observations.",runLabel:"Run TFLite Static Audit",completion:"TFLite static deployment audit run complete"}),onnx:Object.freeze({label:"ONNX",depth:"Static graph and ORT compatibility audit",assessed:"ModelProto graph, bounded shape/type inference, MAC coverage, Q/DQ contracts, serialized LLM graph signals, opsets, independent source-backed ORT EP portfolios, and optional TensorRT native-parser or ORT-EP preflight evidence",runtimeBoundary:"Source eligibility and native TensorRT parser capability acceptance are not ORT TensorRT GetCapability assignment or execution: actual provider assignment, lowering, kernels, memory pattern, and device latency require bound runtime rows",nextProof:"Import a target ORT profile with provider assignment and runtime identity, then bind deployment requirements and representative task-output acceptance evidence",stagedDescriptor:"static graph, opset, shape, and ORT compatibility audit",dashboardTitle:"ONNX Graph And Runtime Compatibility",dashboardCopy:"Serialized graph evidence and source-backed EP compatibility are shown without claiming observed provider assignment.",runLabel:"Run ONNX Static Audit",completion:"ONNX static graph audit run complete"}),gguf:Object.freeze({label:"GGUF",depth:"Container and tensor-payload audit",assessed:"Header, architecture and tokenizer metadata, tensor directory, GGML storage encodings, payload ranges, source-pinned numerical integrity, registered canonical-decoder parameter/KV/compute scenarios, lower-bound-only memory feasibility, and llama.cpp backend prerequisites",runtimeBoundary:"GGUF does not serialize an execution DAG or per-op placement; selected llama.cpp build, backend, context, offload, kernels, and latency require bound runtime evidence",nextProof:"Bind the consuming engine, backend, context, batch, and target runtime capture before making execution or latency claims",stagedDescriptor:"container, tensor encoding, and payload-integrity audit",dashboardTitle:"GGUF Container Evidence",dashboardCopy:"Stored tensor encodings and byte conservation are assessed without inventing an operator graph or runtime compute precision.",runLabel:"Audit GGUF Container",completion:"GGUF container audit run complete"}),safetensors:Object.freeze({label:"SafeTensors",depth:"Checkpoint and shard-integrity audit",assessed:"Header, tensor dtype and shape inventory, exact byte ranges, full-payload numerical integrity, shard-index completeness, source-pinned dense/MoE/SSM architecture and state scenarios, lower-bound-only memory feasibility, plus optional TensorRT-LLM TP/PP/CP, build-limit, quantization, and logical-KV configuration bound to a model-source digest",runtimeBoundary:"A checkpoint plus configuration still does not serialize the executable forward graph. TensorRT-LLM configuration also does not prove engine tactics, per-rank weight residency, preprocessing, runtime cache allocation, occupancy, throughput, or latency",nextProof:"Bind the executable graph, preprocessing contract, runtime configuration, and task-output acceptance evidence that consume this checkpoint",stagedDescriptor:"checkpoint inventory, payload, and shard-integrity audit",dashboardTitle:"SafeTensors Checkpoint Evidence",dashboardCopy:"Tensor storage and shard identity are assessed; graph and deployment behavior remain outside this container contract.",runLabel:"Audit SafeTensors Checkpoint",completion:"SafeTensors checkpoint integrity audit run complete"}),coreml:Object.freeze({label:"Core ML",depth:"Model/package contract and serialized-program audit",assessed:"Package identity, interfaces, decoded NeuralNetwork and ML Program DAGs, GLM/SVM/TreeEnsemble contracts, named Pipeline stage graphs, shape/arithmetic/liveness costs, numerical payload integrity, and a source-bound OS floor",runtimeBoundary:"For NeuralNetwork and ML Program only, MLComputePlan can add anticipated compute-device usage and relative cost; classical/pipeline execution plus all executed placement, fusion, allocation, and latency require Apple runtime evidence",nextProof:"Import an identity-bound MLComputePlan, then add executed Apple runtime placement and representative task-output acceptance evidence",stagedDescriptor:"model/package contract, serialized graph, and weight-encoding audit",dashboardTitle:"Core ML Serialized Artifact Evidence",dashboardCopy:"Decoded model and package contracts are separated from unobserved native Core ML execution behavior.",runLabel:"Audit Core ML Artifact",completion:"Core ML model/package audit run complete"}),executorch:Object.freeze({label:"ExecuTorch",depth:"Serialized execution-plan, delegate, tensor, and AOT memory audit",assessed:"ET12 execution plans, ordered instructions, EValue contracts, 209 source-pinned portable operator signatures, matching KernelCall input/output direction and nominal tensor-contraction MACs, serialized delegate IDs and compile specs, processed-payload byte identities and public-schema root envelopes, optional selected-build/backend/operator/binary attestation, segment conservation, AOT planned buffers, and FT01 named external tensor data",runtimeBoundary:"Custom or signature-mismatched KernelCall rows and delegate-internal semantics remain unbound; a build attestation does not establish dead-strip behavior, backend initialization, executed placement, runtime allocation, kernels, physical transfers, correctness, or latency",nextProof:"Add deepbom.executorch-build.json and required PTD data to close selected-build identity, then import native executed delegate, allocation, transfer, and timing evidence",stagedDescriptor:"serialized execution-plan, segment, delegate, and AOT memory audit",dashboardTitle:"ExecuTorch Program Evidence",dashboardCopy:"Observed ET12/FT01 contracts, source-described payload envelopes, and optional selected-build identity are separated from delegate-internal semantics and unobserved runtime behavior.",runLabel:"Audit ExecuTorch Artifact",completion:"ExecuTorch static program audit run complete"}),graphdef:vb("TensorFlow GraphDef"),savedmodel:vb("TensorFlow SavedModel protobuf"),tensorflow_protobuf:vb("TensorFlow protobuf"),hdf5:Lx("HDF5"),keras:Px("Keras archive","config.json layer order or explicit keras_history references"),pt2:Px("PyTorch PT2 archive","the first bounded models/*.json ExportedProgram graph"),pytorch_checkpoint:Lx("PyTorch checkpoint")});function vb(e){return Object.freeze({label:e,depth:"Preview bounded serialized-graph audit",assessed:"Serialized protobuf node identities and referenced data/control dependencies within the explicitly materialized graph scope",runtimeBoundary:"Model I/O completeness, tensor shapes and types, kernels, execution schedule, placement, latency, quality, and safety are not inferred from the bounded preview",nextProof:"Bind the complete package and a deployment/runtime contract before making execution or performance claims",stagedDescriptor:"preview bounded serialized-graph audit",dashboardTitle:`${e} Evidence`,dashboardCopy:"Serialized node dependencies are shown without object construction or graph execution.",runLabel:`Audit ${e}`,completion:`${e} preview static audit complete`})}function Lx(e){return Object.freeze({label:e,depth:"Preview safe-envelope audit",assessed:"Container identity, bounded member or header facts, and explicitly readable declarative metadata",runtimeBoundary:"No framework objects are constructed and no executable graph, calculation order, tensor semantics, runtime placement, latency, quality, or safety is claimed",nextProof:"Use an exported deployment graph or a separately bound converter/runtime receipt for semantic and execution analysis",stagedDescriptor:"preview safe-envelope and risk-inventory audit",dashboardTitle:`${e} Safe Envelope`,dashboardCopy:"The container is inspected without unsafe deserialization or framework object construction.",runLabel:`Inspect ${e} Safely`,completion:`${e} safe-envelope audit complete`})}function Px(e,t){return Object.freeze({label:e,depth:"Preview bounded declarative-graph and safe-envelope audit",assessed:`Archive identity and dependency relationships serialized by ${t}`,runtimeBoundary:"Framework objects, payload pickles, custom code, lowering, kernels, runtime scheduling, placement, latency, quality, and safety are not executed or inferred",nextProof:"Bind separately observed framework/runtime evidence when execution behavior is relevant",stagedDescriptor:"preview bounded declarative-graph audit",dashboardTitle:`${e} Evidence`,dashboardCopy:"Serialized declarative dependencies are separated from framework execution and runtime behavior.",runLabel:`Audit ${e}`,completion:`${e} preview static audit complete`})}var gB="deepbom.public_product_contracts.v1",bB=Object.freeze([Ji("tflite","stable","stable","stable","source_bounded","Full FlatBuffer artifact analysis; placement remains a source/build projection until runtime evidence is imported."),Ji("onnx","stable","stable","stable","source_bounded","Full protobuf and external-data analysis; execution-provider assignment is never inferred from eligibility."),Ji("gguf","stable","not_applicable","stable_storage_encoding","not_applicable","GGUF serializes tensor storage and architecture metadata, not an executable operator DAG."),Ji("safetensors","stable","not_applicable","stable_metadata_bound","not_applicable","SafeTensors serializes named tensor storage; graph and placement require a separately bound executable artifact."),Ji("coreml","preview","preview","preview","imported_evidence_only","NeuralNetwork and ML Program evidence is supported; compressed and flexible contracts remain fixture-bounded."),Ji("executorch","preview","preview","limited","selected_build_required","ET12/FT01 parsing is bounded; backend and operator completeness require selected-build evidence."),Ji("graphdef","preview","preview","tensor_content_only","not_assessed","GraphDef node, referenced data/control dependencies, and bounded Placeholder/Const tensor contracts are decoded without execution; explicit model I/O, arbitrary op output contracts, kernels, and runtime schedule are not claimed."),Ji("savedmodel","preview","preview","package_identity_only","not_assessed","The first serialized MetaGraph and SignatureDef tensor contracts are decoded. A selected directory is completely path/size/SHA-256 bound, while variable, asset, extra-MetaGraph, kernel, and runtime semantics remain explicitly incomplete."),Ji("hdf5","preview","not_applicable","not_assessed","not_applicable","Safe-envelope preview parses the HDF5 superblock only; no Keras objects, groups, datasets, links, tensor values, or graph are claimed."),Ji("keras","preview","declarative_config_graph","archive_identity_only","not_applicable","Bounded Sequential or explicit keras_history layer dependencies are projected from config.json without constructing Keras objects, lowering layers, or asserting runtime order."),Ji("pt2","preview","declarative_json_graph","archive_identity_only","not_applicable","The first bounded PT2 models/*.json dependency graph is projected without torch.export.load, pickle loading, native code, kernel, or runtime claims."),Ji("pytorch_checkpoint","preview","not_applicable","not_assessed","not_applicable","Safe-envelope preview inventories archive and pickle opcodes/globals without torch.load, object construction, imports, or executable-graph claims.")]),yB=Object.freeze([eo("deepbom.agent_contract.v1","stable","Reviewed Agent metadata and Skill content are versioned independently from the analyzer engine."),eo("deepbom.cli_capabilities.v1","stable","Additive fields only within v1; removals or semantic changes require a new schema id."),eo("deepbom.artifact_evidence_envelope.v1","stable","Canonical cross-format automation envelope."),eo("deepbom.artifact_ir.v2","stable","Canonical artifact evidence identity, graph/storage topology, and overlay contract."),eo("deepbom.model_ir.v1","preview","Format-neutral program, logical tensor, serialized storage, binding, quantization, architecture, and runtime-layer contract. Preview fields may change additively until migration gates pass; source binding to artifact_ir.v2 is mandatory."),eo("deepbom.model_summary.v1","preview","Deterministic table projection of Model IR operations, reversible structural groups, or serialized storage. It does not infer trainability or runtime order."),eo("deepbom.model_ir_visualization_manifest.v1","preview","Deterministic monochrome A4 projection of Model IR subjects. Canonical SVG and derivative PNG do not assert regulatory approval or standard conformance."),eo("deepbom.semantic_artifact_diff.v1","stable","Same-format graph, storage, and quantization-contract comparison derived from two Artifact IR documents."),eo("deepbom.review_summary.v1","stable","Structured source for bounded human summaries; rendered prose is not a machine API."),eo("sarif-2.1.0/deepbomFinding-v1","stable","Finding identity and artifact fingerprints are stable; additive SARIF properties are allowed."),eo("cyclonedx-1.7-json","stable_projection","CycloneDX 1.7 is the only product ML-BOM export contract."),eo("format_specific_analysis","compatibility_surface","Richer native analysis may add or revise fields; automation should consume the envelope or Artifact IR.")]),AB=jx({schema:gB,format_maturity:bB,machine_contracts:yB,release_policy:{schema:"deepbom.release_channel_policy.v1",version_axes:{engine:"release/version.json; changes with product releases",agent_contract:"deepbom.agent_contract.v1@1.0.0; changes only with the reviewed Agent surface",evidence_contract:"deepbom.artifact_evidence_envelope.v1@1.0.0; changes only with incompatible evidence semantics"},stable_channel:{source_channel:"release",npm_dist_tag:"latest",version_pattern:"MAJOR.MINOR.PATCH",promotion_gate:"clean full quality, deploy, six-platform channel matrix, and installed-channel equivalence",target_minimum_interval_days:14,interval_exception:"P0 correctness or security fix with a bounded regression fixture"},prerelease_channel:{source_channel:"prerelease",npm_dist_tag:"next",version_pattern:"MAJOR.MINOR.PATCH-(alpha|beta|rc).N",promotion_gate:"affected quality tiers and channel packaging pass; never promoted to latest"},development_channel:{source_channel:"dev",publishable:!1,version_pattern:"MAJOR.MINOR.PATCH-dev"}}});function qx(){return JSON.parse(JSON.stringify(AB))}function Ji(e,t,n,i,o,a){return Object.freeze({format:e,overall:[t,n,i].includes("preview")||[t,n,i].includes("limited")?"preview":"stable",parser:t,serialized_graph:n,quantization:i,execution_placement:o,interpretation_boundary:a})}function eo(e,t,n){return Object.freeze({schema:e,stability:t,compatibility_boundary:n})}function jx(e){if(!e||typeof e!="object"||Object.isFrozen(e))return e;Object.freeze(e);for(let t of Object.values(e))jx(t);return e}var vB=Object.freeze({tflite:Object.freeze({id:"tflite",label:"TFLite",extensions:[".tflite"],load:"full",analyzer:"wasm",executable:!1,capabilities:["static_analysis","artifact_export","runtime_execution","target_profiles","protected_source_analysis","experimental_tflite_research","multi_projection_geometry"]}),onnx:Object.freeze({id:"onnx",label:"ONNX",extensions:[".onnx"],load:"full_or_external_data",analyzer:"javascript",executable:!1,capabilities:["static_analysis","artifact_export","runtime_execution","target_profiles","protected_source_analysis"]}),gguf:Object.freeze({id:"gguf",label:"GGUF",extensions:[".gguf"],load:"progressive_header",analyzer:"javascript_metadata",executable:!1,capabilities:["metadata_analysis","artifact_export"]}),safetensors:Object.freeze({id:"safetensors",label:"SafeTensors",extensions:[".safetensors"],load:"declared_header",analyzer:"javascript_metadata",executable:!1,capabilities:["metadata_analysis","artifact_export"]}),coreml:Object.freeze({id:"coreml",label:"Core ML",extensions:[".mlmodel",".mlpackage"],load:"file_or_package",analyzer:"javascript_metadata",executable:!1,capabilities:["metadata_analysis","serialized_graph_analysis","weight_encoding_analysis","artifact_export"]}),executorch:Object.freeze({id:"executorch",label:"ExecuTorch",extensions:[".pte",".ptd"],load:"full_or_external_data",analyzer:"javascript",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","artifact_export"]}),tensorflow_protobuf:Object.freeze({id:"tensorflow_protobuf",label:"TensorFlow GraphDef / SavedModel protobuf",extensions:[".pb"],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),graphdef:Object.freeze({id:"graphdef",label:"TensorFlow GraphDef",extensions:[],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),savedmodel:Object.freeze({id:"savedmodel",label:"TensorFlow SavedModel protobuf",extensions:[],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),hdf5:Object.freeze({id:"hdf5",label:"HDF5 safe envelope",extensions:[".h5",".hdf5"],load:"full_bounded",analyzer:"javascript_safe_envelope",executable:!1,capabilities:["metadata_analysis","safe_envelope","artifact_export"]}),keras:Object.freeze({id:"keras",label:"Keras archive bounded static preview",extensions:[".keras"],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["metadata_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),pt2:Object.freeze({id:"pt2",label:"PyTorch PT2 bounded static preview",extensions:[".pt2"],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["metadata_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),pytorch_checkpoint:Object.freeze({id:"pytorch_checkpoint",label:"PyTorch checkpoint safe envelope",extensions:[".pt",".pth",".ckpt"],load:"full_bounded",analyzer:"javascript_safe_envelope",executable:!0,capabilities:["metadata_analysis","safe_envelope","artifact_export"]}),pytorch_pickle:Object.freeze({id:"pytorch_pickle",label:"Legacy PyTorch unsafe pickle alias",extensions:[],load:"rejected",analyzer:"none",executable:!0,capabilities:[]}),unsupported:Object.freeze({id:"unsupported",label:"Unsupported",extensions:[],load:"rejected",analyzer:"none",executable:!1,capabilities:[]})});function wb(e,t){let n=String(e||"").toLowerCase();for(let i of Object.values(vB))if(i.extensions.some(o=>n.endsWith(o)))return i.id;return t?.length>=8&&t[4]===84&&t[5]===70&&t[6]===76&&t[7]===51?"tflite":t?.length>=8&&(t[4]===69&&t[5]===84&&t[6]===49&&t[7]===50||t[4]===70&&t[5]===84&&t[6]===48&&t[7]===49)?"executorch":t?.length>=4&&t[0]===71&&t[1]===71&&t[2]===85&&t[3]===70?"gguf":t?.length>=8&&t[0]===137&&t[1]===72&&t[2]===68&&t[3]===70&&t[4]===13&&t[5]===10&&t[6]===26&&t[7]===10?"hdf5":wB(t)?"safetensors":t?.length>=4&&t[0]===8?"onnx":"unsupported"}function wB(e){if(!e||e.length<9||e[8]!==123)return!1;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=t.getUint32(0,!0);return t.getUint32(4,!0)===0&&n>=2&&n<=100*1024*1024}nl();Me();Ce();var _A="deepbom.onnx_contract_conflict_capsule.v1",ok=/^[a-f0-9]{64}$/,ak="scope:onnx:main_graph";function mA(e){return String(e?.format||"").toLowerCase()!=="onnx"||(e.onnx_contract_conflict=pq(e)),e}function pq(e){if(String(e?.format||"").toLowerCase()!=="onnx")return null;let t=sk(e.model_sha256||e.artifact_sha256);if(!t)throw new Error("ONNX contract-conflict evidence requires the analyzed artifact SHA-256.");let n=e.onnx_shape_inference,i=e.dynamic_shape_cost_contract;if(!n||!i)return nk({schema:_A,status:"NOT_ASSESSED",evidence_class:"NOT_ASSESSABLE",artifact:tk(e,t),analyzer_contracts:{onnx_shape_inference:n?.schema||null,dynamic_shape_cost:i?.schema||null},summary:xq(),root_conflicts:[],condition_bound_conflicts:[],affected_values:[],downstream_blocked_nodes:[],blocked_mac_rows:[],method:"No capsule is derived unless both the ONNX shape ledger and dynamic-cost ledger are present.",interpretation_boundary:"NOT_ASSESSED is not evidence that the serialized contract is valid."});let o=Fe(n.declaration_conflicts).map((h,b)=>hq(h,b)),a=Fe(n.semantic_contract_conflicts).map((h,b)=>gq(h,b)),r=[...o,...a],s=Aq(r),c=bq(e.tensors),u=wq(c),l=new Set(Fe(e.ops).flatMap(h=>Sq(h.outputs))),_=Fe(e.tensors).filter((h,b)=>l.has(pA(h,b))&&Cq(h)).map((h,b)=>yq(h,pA(h,b),s)),p=Fe(n.rule_unresolved_nodes).filter(h=>String(h?.reason||"").startsWith("blocked_by_upstream_contract_conflict:")).map(h=>({subject_ref:ef(h.node_index),node_index:yo(h.node_index),op_name:Ye(h.op_name)||"UNKNOWN",reason:Ye(h.reason)||"blocked_by_upstream_contract_conflict",blocking_tensor_name:Ye(h.blocked_by?.tensor_name)||Ye(h.reason).split(":").slice(1).join(":"),root_conflict_refs:dA(h.blocked_by?.root_conflict||h.blocked_by,s,u)})),d=Fe(i.total_macs_unresolved_ops).filter(h=>h?.resolution_class==="artifact_contract_conflict").map(h=>({subject_ref:ef(h.op_index),op_index:yo(h.op_index),op_name:Ye(h.op_name)||"UNKNOWN",reason:Ye(h.reason)||"artifact_contract_conflict",blocking_values:Fe(h.blocking_tensors).map(b=>({subject_ref:fA(b.index),tensor_index:yo(b.index),tensor_name:Ye(b.name),role:Ye(b.role)||"unknown"})),root_conflict_refs:hA(Fe(h.root_conflicts).flatMap(b=>dA(b,s,u)))})),m=Nq(d,"op_name"),f={unconditional_root_conflict_count:r.length,declaration_root_conflict_count:o.length,semantic_root_conflict_count:a.length,condition_bound_invalid_variant_count:c.length,invalid_node_output_count:ik(n.invalid_node_output_count),conditionally_invalid_node_output_count:ik(n.conditionally_invalid_node_output_count),downstream_blocked_node_count:p.length,blocked_mac_row_count:d.length,blocked_mac_op_histogram:m,unresolved_root_reference_count:[..._,...p,...d].filter(h=>h.root_conflict_refs.length===0).length},g=r.length>0||c.length>0;return nk({schema:_A,status:g?"INVALID_CONTRACT":"ASSESSED_NO_CONFLICT",evidence_class:"OBSERVED_DERIVED",artifact:tk(e,t),analyzer_contracts:{onnx_shape_inference:n.schema||null,dynamic_shape_cost:i.schema||null},summary:f,root_conflicts:r,condition_bound_conflicts:c,affected_values:_,downstream_blocked_nodes:p,blocked_mac_rows:d,method:"Normalize the source-pinned ONNX shape-inference conflict ledger and dynamic-cost blocker ledger without re-running inference. Preserve serialized declarations, deterministic inferences, condition predicates, native indices, canonical Artifact IR subject references, and exact blocker denominators.",interpretation_boundary:"INVALID_CONTRACT prevents affected shape and MAC rows from being promoted to exact values. The capsule does not repair the model, infer runtime dimensions, prove ONNX Runtime execution, or establish task quality."})}function mq(e,t=null){if(e?.schema!==_A)throw new Error("ONNX contract-conflict capsule schema is invalid.");if(!ok.test(String(e?.artifact?.sha256||"")))throw new Error("ONNX contract-conflict capsule artifact SHA-256 is invalid.");let n=K(Q(Eq(e)));if(e.capsule_sha256!==n)throw new Error("ONNX contract-conflict capsule digest does not match its canonical content.");let i=e.summary||{};fr(i.unconditional_root_conflict_count,Fe(e.root_conflicts).length,"unconditional root conflicts"),fr(i.declaration_root_conflict_count,Fe(e.root_conflicts).filter(s=>s.kind==="declared_inferred_conflict").length,"declaration roots"),fr(i.semantic_root_conflict_count,Fe(e.root_conflicts).filter(s=>s.kind==="operator_semantic_conflict").length,"semantic roots"),fr(i.condition_bound_invalid_variant_count,Fe(e.condition_bound_conflicts).length,"condition-bound variants"),fr(i.downstream_blocked_node_count,Fe(e.downstream_blocked_nodes).length,"downstream blocked nodes"),fr(i.blocked_mac_row_count,Fe(e.blocked_mac_rows).length,"blocked MAC rows"),fr(Iq(i.blocked_mac_op_histogram),Fe(e.blocked_mac_rows).length,"blocked MAC histogram");let o=Number(i.unconditional_root_conflict_count||0)+Number(i.condition_bound_invalid_variant_count||0)>0?"INVALID_CONTRACT":e.status==="NOT_ASSESSED"?"NOT_ASSESSED":"ASSESSED_NO_CONFLICT";if(e.status!==o)throw new Error("ONNX contract-conflict capsule status does not match its conflict counts.");let a=new Set([...Fe(e.root_conflicts),...Fe(e.condition_bound_conflicts)].map(s=>s.conflict_ref)),r=[...Fe(e.affected_values),...Fe(e.downstream_blocked_nodes),...Fe(e.blocked_mac_rows)];for(let s of r)for(let c of Fe(s.root_conflict_refs))if(!a.has(c))throw new Error(`ONNX contract-conflict capsule contains an unresolved root reference: ${c}`);return fr(i.unresolved_root_reference_count,r.filter(s=>Fe(s.root_conflict_refs).length===0).length,"unresolved root references"),t&&fq(e,t),e}function fq(e,t){if(t?.artifact?.sha256!==e.artifact.sha256)throw new Error("ONNX conflict capsule and Artifact IR identify different artifact bytes.");let n=new Set(Fe(t?.graph?.operators).map(o=>o.id)),i=new Set(Fe(t?.graph?.values).map(o=>o.id));for(let o of[...Fe(e.root_conflicts),...Fe(e.downstream_blocked_nodes),...Fe(e.blocked_mac_rows)])if(o.subject_ref&&!n.has(o.subject_ref))throw new Error(`ONNX conflict operator subject is absent from Artifact IR: ${o.subject_ref}`);for(let o of[...Fe(e.condition_bound_conflicts),...Fe(e.affected_values)])if(o.subject_ref&&!i.has(o.subject_ref))throw new Error(`ONNX conflict value subject is absent from Artifact IR: ${o.subject_ref}`);for(let o of Fe(e.blocked_mac_rows))for(let a of Fe(o.blocking_values))if(a.subject_ref&&!i.has(a.subject_ref))throw new Error(`ONNX conflict blocking value is absent from Artifact IR: ${a.subject_ref}`)}function hq(e,t){return{conflict_ref:`onnx-conflict:declaration:${t}`,kind:"declared_inferred_conflict",subject_ref:ef(e.node_index),node_index:yo(e.node_index),op_name:Ye(e.op_name)||"UNKNOWN",tensor_name:Ye(e.tensor_name),field:Ye(e.field)||"contract",declared:e.declared??null,inferred:e.inferred??null}}function gq(e,t){return{conflict_ref:`onnx-conflict:semantic:${t}`,kind:"operator_semantic_conflict",subject_ref:ef(e.node_index),node_index:yo(e.node_index),op_name:Ye(e.op_name)||"UNKNOWN",output_names:Fe(e.output_names).map(Ye).filter(Boolean),reason:Ye(e.reason)||"operator_contract_invalid",details:e.details??null}}function bq(e){let t=[];for(let[n,i]of Fe(e).entries()){let o=i?.conditional_shape_contract||i?.conditionalShapeContract||{};for(let[a,r]of Fe(o.variant_failures).entries()){if(r?.status!=="invalid")continue;let s=pA(i,n);t.push({conflict_ref:`onnx-conflict:conditional:${s}:${a}`,kind:"condition_bound_invalid_variant",subject_ref:fA(s),tensor_index:s,tensor_name:Ye(i?.name)||`tensor_${s}`,variant_index:a,reason:Ye(r.reason)||"conditionally_invalid_tensor_contract",conditions:structuredClone(Fe(r.conditions)),details:r.details??null})}}return t}function yq(e,t,n){let i=e.contract_conflict||e.contractConflict||{};return{subject_ref:fA(t),tensor_index:t,tensor_name:Ye(e.name)||`tensor_${t}`,reason:Ye(i.reason)||"invalid_serialized_tensor_contract",root_conflict_refs:dA(i.root_conflict||i.rootConflict||i,n,new Map)}}function Aq(e){let t=new Map;for(let n of e)for(let i of vq(n))for(let o of rk(i))t.has(o)||t.set(o,n.conflict_ref);return t}function vq(e){let t=[],n=e,i=new Set;for(;n&&typeof n=="object"&&!i.has(n);)i.add(n),(n.node_index!=null||n.reason||n.tensor_name)&&t.push(n),n=n.details;return t}function wq(e){let t=new Map;for(let n of e){let i=`${n.tensor_name}|${n.reason}|${Q(n.conditions||[])}`;t.has(i)||t.set(i,n.conflict_ref)}return t}function dA(e,t,n){if(!e||typeof e!="object")return[];let i=rk(e).map(r=>t.get(r)).filter(Boolean);if(i.length)return hA(i);let o=`${Ye(e.tensor_name)}|${Ye(e.reason)}|${Q(e.conditions||[])}`,a=n.get(o);return a?[a]:[]}function rk(e){let t=yo(e.node_index);return hA([`${t}|${Ye(e.tensor_name)}|${Ye(e.field)}|${Ye(e.reason)}`,`${t}|${Ye(e.tensor_name)}|${Ye(e.field)}|`,`${t}|||${Ye(e.reason)}`,`${t}|${Ye(e.output_names?.[0])}||${Ye(e.reason)}`])}function tk(e,t){let n=e?.artifact_set?.source||{};return{sha256:t,filename:Ye(e.filename)||"model.onnx",byte_length:kq(e.file_size_bytes??e.file_size),artifact_set_sha256:sk(e?.artifact_set?.artifact_set_sha256),source_locator:Ye(n.canonical_locator)||null,source_revision:Ye(n.revision||n.immutability?.revision)||null}}function xq(){return{unconditional_root_conflict_count:0,declaration_root_conflict_count:0,semantic_root_conflict_count:0,condition_bound_invalid_variant_count:0,invalid_node_output_count:0,conditionally_invalid_node_output_count:0,downstream_blocked_node_count:0,blocked_mac_row_count:0,blocked_mac_op_histogram:[],unresolved_root_reference_count:0}}function nk(e){let t={...e,capsule_sha256:K(Q(e))};return mq(t)}function Eq(e){let{capsule_sha256:t,...n}=e||{};return n}function Nq(e,t){let n=new Map;for(let i of e){let o=Ye(i?.[t])||"UNKNOWN";n.set(o,(n.get(o)||0)+1)}return[...n.entries()].sort((i,o)=>o[1]-i[1]||i[0].localeCompare(o[0])).map(([i,o])=>({name:i,count:o}))}function Iq(e){return Fe(e).reduce((t,n)=>t+Number(n?.count||0),0)}function ef(e){let t=yo(e);return t==null?null:`operator:${ak}:${t}`}function fA(e){let t=yo(e);return t==null?null:`value:${ak}:${t}`}function Cq(e){return e?.contract_status==="invalid"||e?.contractStatus==="invalid"}function pA(e,t){return yo(e?.index)??t}function yo(e){let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:null}function ik(e){return yo(e)??0}function kq(e){let t=Number(e);return Number.isFinite(t)&&t>=0?t:null}function Sq(e){return Fe(e).map(yo).filter(t=>t!=null)}function sk(e){let t=Ye(e).toLowerCase();return ok.test(t)?t:null}function fr(e,t,n){if(Number(e)!==t)throw new Error(`ONNX contract-conflict capsule does not conserve ${n}.`)}function hA(e){return[...new Set(e.filter(Boolean))]}function Fe(e){return Array.isArray(e)?e:[]}function Ye(e){return String(e??"").trim()}SA();wA();gf();var LA=Object.freeze({repository:"ggml-org/llama.cpp",source_commit:"7bd8282c37fcd9c4d7236106d664761a23318f18",files:{architecture_registry:{path:"src/llama-arch.cpp",sha256:"1f35546f88f825289efb30c779ec9f71d41dfad74c35b898260d3510a86c997c"},build_options:{path:"ggml/CMakeLists.txt",sha256:"1858523f1703dc31505447a3e162de5f56b6cc5325f9eaad2e0cc8688769737f"},backend_build_rules:{path:"ggml/src/CMakeLists.txt",sha256:"b4210d3aded4f4d217209624f981ecb5c65b1592eca7e049ff14b13c60743cb5"},hip_build_rules:{path:"ggml/src/ggml-hip/CMakeLists.txt",sha256:"a9761856c498862828f88d791643d15dea65ec58d189d2d21a1891f3a506bb30"},backend_registration:{path:"ggml/src/ggml-backend-reg.cpp",sha256:"c0a61f47e7af0359cfff41317ae8e68717960483d141983bba914733b1f68906"},scheduler:{path:"ggml/src/ggml-backend.cpp",sha256:"507577061d22e673a4f002bb215c65aa9c63b88a4e6d1586f52c74ca0b98fa07"}}}),PA=Object.freeze(["clip","llama","llama4","deci","falcon","grok","gpt2","gptj","gptneox","mpt","baichuan","starcoder","refact","bert","modern-bert","nomic-bert","nomic-bert-moe","neo-bert","jina-bert-v2","jina-bert-v3","eurobert","bloom","stablelm","qwen","qwen2","qwen2moe","qwen2vl","qwen3","qwen3moe","qwen3next","qwen3vl","qwen3vlmoe","qwen35","qwen35moe","phi2","phi3","phimoe","plamo","plamo2","plamo3","codeshell","orion","internlm2","minicpm","minicpm3","gemma","gemma2","gemma3","gemma3n","gemma4","gemma4-assistant","gemma-embedding","starcoder2","mamba","mamba2","jamba","falcon-h1","xverse","command-r","cohere2","cohere2moe","dbrx","olmo","olmo2","olmoe","openelm","arctic","deepseek","deepseek2","deepseek2-ocr","deepseek32","deepseek4","chatglm","glm4","glm4moe","glm-dsa","bitnet","t5","t5encoder","jais","jais2","nemotron","nemotron_h","nemotron_h_moe","exaone","exaone4","exaone-moe","rwkv6","rwkv6qwen2","rwkv7","arwkv7","granite","granitemoe","granitehybrid","chameleon","wavtokenizer-dec","plm","bailingmoe","bailingmoe2","dots1","arcee","afmoe","laguna","ernie4_5","ernie4_5-moe","hunyuan-moe","hunyuan-dense","hunyuan_vl","hy_v3","smollm3","gpt-oss","lfm2","lfm2moe","dream","smallthinker","llada","llada-moe","seed_oss","grovemoe","apertus","minimax-m2","minimax-m3","cogvlm","rnd1","pangu-embedded","mistral3","eagle3","dflash","mistral4","paddleocr","mimo2","step35","llama-embed","maincoder","kimi-linear","talkie","mellum","nanbeige"]),tS=Object.freeze([{id:"cpu",label:"CPU",cmake_option:"GGML_CPU",compiled_registration_macro:"GGML_USE_CPU",registration_function:"ggml_backend_cpu_reg",declared_default:"ON",runtime_disable_condition:null},{id:"cuda",label:"CUDA",cmake_option:"GGML_CUDA",compiled_registration_macro:"GGML_USE_CUDA",registration_function:"ggml_backend_cuda_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"hip",label:"HIP",cmake_option:"GGML_HIP",compiled_registration_macro:"GGML_USE_CUDA",registration_function:"ggml_backend_cuda_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"metal",label:"Metal",cmake_option:"GGML_METAL",compiled_registration_macro:"GGML_USE_METAL",registration_function:"ggml_backend_metal_reg",declared_default:"${GGML_METAL_DEFAULT}",runtime_disable_condition:null},{id:"vulkan",label:"Vulkan",cmake_option:"GGML_VULKAN",compiled_registration_macro:"GGML_USE_VULKAN",registration_function:"ggml_backend_vk_reg",declared_default:"OFF",runtime_disable_condition:"GGML_DISABLE_VULKAN environment variable must be absent"},{id:"sycl",label:"SYCL",cmake_option:"GGML_SYCL",compiled_registration_macro:"GGML_USE_SYCL",registration_function:"ggml_backend_sycl_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"webgpu",label:"WebGPU",cmake_option:"GGML_WEBGPU",compiled_registration_macro:"GGML_USE_WEBGPU",registration_function:"ggml_backend_webgpu_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"blas",label:"BLAS",cmake_option:"GGML_BLAS",compiled_registration_macro:"GGML_USE_BLAS",registration_function:"ggml_backend_blas_reg",declared_default:"${GGML_BLAS_DEFAULT}",runtime_disable_condition:null},{id:"openvino",label:"OpenVINO",cmake_option:"GGML_OPENVINO",compiled_registration_macro:"GGML_USE_OPENVINO",registration_function:"ggml_backend_openvino_reg",declared_default:"OFF",runtime_disable_condition:null}]),Cae=Object.freeze({patch_id:"deepbom.ggml_scheduler_trace.v1",trace_protocol:"DEEPBOM_GGML_TRACE_V1",patch_path:"native/llama-cpp/deepbom-ggml-scheduler-trace.patch",patch_sha256:"156f8278172c596657c221ff4937585bcf21a7bc3f08fdc29bf43447b955770f",scheduler_source_original_sha256:"507577061d22e673a4f002bb215c65aa9c63b88a4e6d1586f52c74ca0b98fa07",scheduler_source_patched_sha256:"e027f8876ee9dd04a0b2f0c992b89709ed1a5174011aa5046b488e8aba6af844"});function Zj(){return{...LA,files:Object.fromEntries(Object.entries(LA.files).map(([e,t])=>[e,{...t}]))}}function nS(e,t){let n=typeof e?.architecture=="string"&&e.architecture!=="not_declared"?e.architecture:null,i=n?PA.includes(n):!1,o=Array.isArray(t)?t:[],a=o.filter(u=>u.storage_status!=="assessed"),r=[...new Set(o.map(u=>u.dtype).filter(Boolean))].sort(),s=n?i?a.length?"definite_exclusion_invalid_or_unknown_tensor_storage":"source_candidate_build_and_graph_unbound":"definite_exclusion_architecture_not_registered":"not_assessed_architecture_not_declared",c=tS.map(u=>({...u,assessment_status:s,architecture_registry_match:i,serialized_storage_precheck:a.length?"definite_fail":"passed_known_source_pinned_layouts",build_option_binding:"not_bound_to_selected_runtime_binary",backend_registration_evidence:"source_registration_candidate_only",operator_support_evidence:"not_assessable_without_runtime_constructed_graph_and_backend_device",execution_evidence_class:"NOT_OBSERVED"}));return{schema:"deepbom.gguf_backend_compatibility.v1",status:s.startsWith("definite_exclusion")?"invalid":i&&!a.length?"source_candidate":"not_assessed",evidence_class:"OBSERVED/SOURCE_PINNED",architecture:n,architecture_registry_match:i,pinned_architecture_count:PA.length,tensor_count:o.length,encoding_count:r.length,encodings:r,invalid_or_unknown_storage_tensor_count:a.length,invalid_or_unknown_storage_tensors:a.slice(0,128).map(u=>({tensor_index:u.index,tensor_name:u.name,dtype:u.dtype,storage_status:u.storage_status})),selected_backend_profile_id:null,selected_runtime_build_manifest_status:"not_bound",execution_graph_status:"not_serialized_by_gguf",compatibility_conclusion:"not_concluded",profiles:c,source:Zj(),method:"Match general.architecture against the pinned llama.cpp registry, validate every serialized tensor layout against pinned GGML traits, and enumerate backend CMake option plus compiled registration gates. Do not infer runtime graph operator support, device availability, offload, fallback, or execution.",boundary:"A source candidate is not an executable compatibility result. Bind the exact llama.cpp binary/build manifest and an artifact-identified runtime capture to conclude backend availability or execution."}}Ce();Me();function Ve(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer`);return BigInt(e)}function nt(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function iS({hiddenSize:e,intermediateSize:t,layerCount:n,attentionHeadCount:i,kvHeadCount:o,headWidth:a,contextLength:r,expertCount:s,activeExpertCount:c}){let u=Ve(e,"hidden size"),l=Ve(t,"intermediate size"),_=Ve(n,"layer count"),p=Ve(i,"attention head count"),d=Ve(o,"KV head count"),m=Ve(a,"head width"),f=Ve(r,"context length"),g=Ve(s,"expert count"),h=Ve(c,"active expert count");if(h>g)throw new Error("active expert count cannot exceed expert count");let b=p*m,A=d*m,y=u*b*2n+u*A*2n,x=u*g,v=u*l*3n,I=v*g*_,w=v*h,N=y+x+w,S=N*_,O=f*(f+1n)/2n,B=b*O*2n*_,k=b*f*2n*_;return{schema:"deepbom.sparse_moe_decoder_projection.v1",status:"assessed_source_bound_active_path_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",expert_count:Number(g),active_expert_count_per_token:Number(h),routing_fraction_of_experts:Number(h)/Number(g),router_macs_per_layer_per_token:nt(x),expert_matrix_parameters_per_expert_per_layer:nt(v),total_expert_matrix_parameters_all_layers:nt(I),active_expert_matrix_macs_per_layer_per_token:nt(w),attention_projection_macs_per_layer_per_token:nt(y),active_projection_macs_per_layer_per_token:nt(N),active_projection_macs_all_layers_per_token:nt(S),prefill_active_core_macs_at_declared_context:nt(S*f+B),decode_active_core_macs_at_declared_context:nt(S+k),formula:"router H*E + top_k*(3*H*I) + Q/K/V/O projections; attention QK/PV uses the declared all-global causal scenario",boundary:"Total expert parameters describe serialized expert-matrix residency. Active MAC rows assume exactly top-k experts are evaluated for each token and exclude routing implementation overhead, token sorting, capacity policy, expert imbalance, communication, fusion, activation, normalization, and backend lowering."}}function qA({layerCount:e,intermediateSize:t,stateSize:n,convolutionKernel:i}){let o=Ve(e,"layer count"),a=Ve(t,"intermediate size"),r=Ve(n,"state size"),s=Ve(i,"convolution kernel"),c=a*s,u=a*r,l=o*(c+u);return{schema:"deepbom.ssm_recurrent_state_projection.v1",status:"assessed_element_cardinality",evidence_class:"OBSERVED/SOURCE_PINNED/DERIVED",layer_count:Number(o),intermediate_size:Number(a),state_size:Number(r),convolution_kernel:Number(s),convolution_state_elements_per_layer_per_batch:nt(c),ssm_state_elements_per_layer_per_batch:nt(u),recurrent_state_elements_all_layers_per_batch:nt(l),context_dependency:"constant_per_batch_after_initialization",formula:"layers * intermediate_size * (conv_kernel + state_size) elements per batch",boundary:"This is recurrent cache cardinality from the pinned MambaCache tensor shapes, not transformer KV state. It excludes allocator alignment, temporary selective-scan tensors, paging, residency, and backend-private workspaces."}}function oS({hiddenSize:e,intermediateSize:t,layerCount:n,stateSize:i,timeStepRank:o,convolutionKernel:a,contextLength:r=null}){let s=Ve(e,"hidden size"),c=Ve(t,"intermediate size"),u=Ve(n,"layer count"),l=Ve(i,"state size"),_=Ve(o,"time-step rank"),p=Ve(a,"convolution kernel"),d=s*c*2n,m=c*(_+l*2n),f=_*c,g=c*s,h=c*p,b=d+m+f+g+h,A=b*u,y=r==null?null:Ve(r,"context length");return{schema:"deepbom.ssm_linear_compute_projection.v1",status:"assessed_source_bound_projection_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",input_projection_macs_per_layer_per_token:nt(d),state_parameter_projection_macs_per_layer_per_token:nt(m),time_step_projection_macs_per_layer_per_token:nt(f),output_projection_macs_per_layer_per_token:nt(g),depthwise_convolution_macs_per_layer_per_token_steady_state:nt(h),accounted_macs_per_layer_per_token:nt(b),accounted_macs_all_layers_per_token:nt(A),accounted_macs_all_layers_at_declared_context:y==null?null:nt(A*y),formula:"H*(2I) + I*(R+2S) + R*I + I*H + I*K MACs per layer per token",boundary:"The row counts pinned linear projections and steady-state depthwise convolution only. Selective-scan discretization, recurrent elementwise updates, activation, normalization, residual addition, optimized parallel scan, temporary tensors, and backend fusion are intentionally excluded rather than estimated."}}function aS({vocabularySize:e,hiddenSize:t,intermediateSize:n,attentionLayerCount:i,mambaLayerCount:o,denseFeedForwardLayerCount:a,expertFeedForwardLayerCount:r,attentionHeadCount:s,kvHeadCount:c,headWidth:u,contextLength:l,expertCount:_,activeExpertCount:p,stateSize:d,timeStepRank:m,convolutionKernel:f,mambaIntermediateSize:g}){let h=Ve(t,"hidden size"),b=Ve(n,"feed-forward intermediate size"),A=Ve(i,"attention layer count"),y=Ve(o,"Mamba layer count"),x=BigInt(a),v=BigInt(r);if(x<0n||v<0n||x+v!==A+y)throw new Error("Jamba feed-forward layer counts must be non-negative and conserve total layers");let I=Ve(s,"attention head count"),w=Ve(c,"KV head count"),N=Ve(u,"head width"),S=Ve(l,"context length"),O=Ve(_,"expert count"),B=Ve(p,"active expert count");if(B>O)throw new Error("active expert count cannot exceed expert count");let k=Ve(g,"Mamba intermediate size"),D=Ve(d,"state size"),q=Ve(m,"time-step rank"),L=Ve(f,"convolution kernel"),F=I*N,P=w*N,j=(h*F*2n+h*P*2n)*A,W=(h*k*2n+k*(q+D*2n)+q*k+k*h+k*L)*y,se=h*b*3n,Y=se*x,U=h*O,re=se*B,H=(U+re)*v,fe=se*O*v,Te=j+W+Y+H,ve=S*(S+1n)/2n,gt=F*ve*2n*A,ut=F*S*2n*A,Pt=h*Ve(e,"vocabulary size");return{schema:"deepbom.hybrid_jamba_compute_projection.v1",status:"assessed_source_bound_component_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",attention_layer_count:Number(A),mamba_layer_count:Number(y),dense_feed_forward_layer_count:Number(x),expert_feed_forward_layer_count:Number(v),attention_projection_macs_all_attention_layers_per_token:nt(j),mamba_projection_and_depthwise_macs_all_mamba_layers_per_token:nt(W),dense_feed_forward_macs_all_dense_layers_per_token:nt(Y),active_moe_macs_all_expert_layers_per_token:nt(H),total_expert_matrix_parameters_all_expert_layers:nt(fe),accounted_projection_macs_all_layers_per_token:nt(Te),prefill_accounted_core_macs_at_declared_context:nt(Te*S+gt),decode_accounted_core_macs_at_declared_context:nt(Te+ut),output_projection_macs_per_logit_position:nt(Pt),decode_with_one_logit_position_macs:nt(Te+ut+Pt),formula:"attention Q/K/V/O on attention layers + Mamba pinned linear/depthwise terms on Mamba layers + dense FFN or router/top-k expert FFN according to the configured layer schedules",boundary:"The component scenario follows pinned Jamba layer schedules. Attention uses an all-global causal scenario. Selective-scan arithmetic, activations, normalization, routing implementation, temporary tensors, fusion, communication, and backend lowering are excluded rather than estimated."}}function rS(e,{batches:t=[1,2,4],storageBits:n=[8,16,32]}={}){let i=e?.recurrent_state_elements_all_layers_per_batch?.decimal;if(!/^\d+$/.test(String(i||"")))return[];let o=BigInt(i);return t.flatMap(a=>n.map(r=>{if(!Number.isSafeInteger(a)||a<=0||!Number.isSafeInteger(r)||r<=0||r%8!==0)throw new Error("state scenario dimensions must be positive whole-byte integers");return{batch_size:a,storage_bits:r,logical_bytes:nt(o*BigInt(a)*BigInt(r/8)),evidence_class:"DERIVED_CONDITIONAL_SCENARIO"}}))}var yf="deepbom.on_device_llm_runtime_manifest.v2",Xj="deepbom.on_device_llm_runtime_manifest.v1",sS=new Set(["DECLARED","OBSERVED_RUNTIME"]),Wj=new Set(["cpu","accelerator","unresident"]),Yj=new Set([yf,Xj]),jA=Object.freeze(["graph_workspace_bytes","scratch_bytes","packing_and_replica_bytes","allocator_overhead_bytes","backend_private_bytes","other_runtime_bytes"]);function yn(e){return e&&typeof e=="object"&&/^\d+$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^\d+$/.test(e)||Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function mi(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function Ho(e){return Number.isSafeInteger(e)&&e>0?e:null}function ol(e){return typeof e=="string"&&/^[a-f0-9]{64}$/.test(e)?e:null}function bf(e){return typeof e=="string"&&e.trim()?e.trim():null}function al(e,t,n){let i=e?.evidence_class;return sS.has(i)||n.push({code:"LLM_RUNTIME_SECTION_EVIDENCE_INVALID",path:t,observed:i??null}),sS.has(i)?i:null}function Jj(e,t,n,i){let o=yn(e?.state?.kv_projection?.elements_per_token_per_batch),a=yn(e?.state?.recurrent_projection?.recurrent_state_elements_all_layers_per_batch);return o!=null&&a!=null?{kind:"hybrid_kv_ssm",logicalBytes:(o*BigInt(t)+a)*BigInt(n)*BigInt(i/8)}:o!=null?{kind:"transformer_kv",logicalBytes:o*BigInt(t)*BigInt(n)*BigInt(i/8)}:a!=null?{kind:"ssm_recurrent",logicalBytes:a*BigInt(n)*BigInt(i/8)}:null}function lS(e,{contexts:t=[512,2048,8192],batches:n=[1,2,4],storageBits:i=[8,16,32]}={}){let o=yn(e?.state?.kv_projection?.elements_per_token_per_batch),a=yn(e?.state?.recurrent_projection?.recurrent_state_elements_all_layers_per_batch);if(o==null&&a==null)return[];let r=Ho(e?.architecture?.context_length);return(o==null?[null]:[...new Set(t.filter(Ho).map(c=>r?Math.min(c,r):c))].sort((c,u)=>c-u)).flatMap(c=>n.filter(Ho).flatMap(u=>i.filter(l=>Ho(l)&&l%8===0).map(l=>({state_kind:o!=null&&a!=null?"hybrid_kv_ssm":o!=null?"transformer_kv":"ssm_recurrent",context_length:c,batch_size:u,storage_bits:l,logical_bytes:mi((o!=null?o*BigInt(c)+(a||0n):a)*BigInt(u)*BigInt(l/8)),evidence_class:"DERIVED_CONDITIONAL_SCENARIO"}))))}function uS(e,t,n){if(!e?.document)return{schema:yf,status:"not_artifact_bound",evidence_class:"NOT_ASSESSABLE",required_bindings:cS(),source:null,issues:[]};let i=e.document,o=[];(!i||typeof i!="object"||Array.isArray(i))&&o.push({code:"LLM_RUNTIME_MANIFEST_NOT_OBJECT"}),Yj.has(i?.schema)||o.push({code:"LLM_RUNTIME_MANIFEST_SCHEMA_INVALID",observed:i?.schema??null});let a=ol(t?.artifact_bundle?.model_source_sha256)||ol(t?.model_sha256);(!a||ol(i?.artifact?.sha256)!==a)&&o.push({code:"LLM_RUNTIME_ARTIFACT_SHA256_MISMATCH",expected:a,observed:i?.artifact?.sha256??null}),String(i?.artifact?.format||"").toLowerCase()!==String(t?.format||"").toLowerCase()&&o.push({code:"LLM_RUNTIME_ARTIFACT_FORMAT_MISMATCH"});let r=al(i?.runtime,"/runtime",o),s={evidence_class:r,engine:bf(i?.runtime?.engine),version:bf(i?.runtime?.version),source_repository:bf(i?.runtime?.source_repository),source_commit:/^[a-f0-9]{40}$/.test(String(i?.runtime?.source_commit||""))?i.runtime.source_commit:null,binary_sha256:ol(i?.runtime?.binary_sha256),build_configuration_sha256:ol(i?.runtime?.build_configuration_sha256)};for(let W of["engine","version","binary_sha256","build_configuration_sha256"])s[W]||o.push({code:"LLM_RUNTIME_IDENTITY_FIELD_MISSING",field:W});let c=al(i?.deployment,"/deployment",o),u=Ho(i?.deployment?.context_length),l=Ho(i?.deployment?.batch_size),_=Ho(i?.deployment?.state_storage_bits);(!u||!l||!_||_%8!==0)&&o.push({code:"LLM_RUNTIME_DEPLOYMENT_DIMENSION_INVALID"});let p=Ho(n?.architecture?.context_length);u&&p&&u>p&&o.push({code:"LLM_RUNTIME_CONTEXT_EXCEEDS_DECLARED_ARCHITECTURE",declared:p,observed:u});let d=al(i?.weight_residency,"/weight_residency",o),m=yn(i?.weight_residency?.artifact_serialized_tensor_bytes),f=yn(n?.storage?.serialized_tensor_bytes_decimal);(m==null||f==null||m!==f)&&o.push({code:"LLM_RUNTIME_SERIALIZED_WEIGHT_BYTES_MISMATCH",expected:f==null?null:String(f),observed:m==null?null:String(m)});let g=yn(i?.weight_residency?.runtime_weight_bytes),h=yn(i?.weight_residency?.cpu_bytes),b=yn(i?.weight_residency?.accelerator_bytes),A=yn(i?.weight_residency?.unresident_bytes);([g,h,b,A].some(W=>W==null)||h+b+A!==g)&&o.push({code:"LLM_RUNTIME_WEIGHT_RESIDENCY_CONSERVATION_FAILED"});let y=al(i?.layer_placement,"/layer_placement",o),x=Ho(n?.architecture?.layer_count),v=Ho(i?.layer_placement?.layer_count),I=Array.isArray(i?.layer_placement?.assignments)?i.layer_placement.assignments:[];(!x||v!==x||I.length!==x)&&o.push({code:"LLM_RUNTIME_LAYER_ASSIGNMENT_CARDINALITY_MISMATCH",expected:x,observed:I.length});let w=new Set;for(let W of I)!Number.isSafeInteger(W?.layer_index)||W.layer_index<0||W.layer_index>=(x||0)||w.has(W.layer_index)||!Wj.has(W?.location)?o.push({code:"LLM_RUNTIME_LAYER_ASSIGNMENT_INVALID",row:W}):w.add(W.layer_index);let N=al(i?.state_cache,"/state_cache",o),S=u&&l&&_&&_%8===0?Jj(n,u,l,_):null,O=yn(i?.state_cache?.logical_bytes);(!S||i?.state_cache?.kind!==S.kind||O!==S.logicalBytes)&&o.push({code:"LLM_RUNTIME_STATE_LOGICAL_BYTES_MISMATCH",expected_kind:S?.kind||null,expected_bytes:S?String(S.logicalBytes):null});let B=yn(i?.state_cache?.allocated_bytes),k=yn(i?.state_cache?.resident_bytes),D=yn(i?.state_cache?.page_size_bytes),q=yn(i?.state_cache?.resident_page_count),L=yn(i?.state_cache?.total_page_count),F=i?.state_cache?.paging_enabled;(typeof F!="boolean"||B==null||k==null||k>B)&&o.push({code:"LLM_RUNTIME_STATE_ALLOCATION_INVALID"}),F&&(D==null||D===0n||q==null||L==null||q>L||k!==D*q||B!==D*L)&&o.push({code:"LLM_RUNTIME_STATE_PAGING_CONSERVATION_FAILED"}),!F&&[D,q,L].some(W=>W!=null)&&o.push({code:"LLM_RUNTIME_NONPAGED_STATE_HAS_PAGE_FIELDS"});let P=eF(i,o),j=[r,c,d,y,N,P?.evidence_class].filter(Boolean).includes("OBSERVED_RUNTIME"),J={capture_id:bf(i?.capture?.capture_id),collected_at:typeof i?.capture?.collected_at=="string"&&!Number.isNaN(Date.parse(i.capture.collected_at))?i.capture.collected_at:null,device_identity_sha256:ol(i?.capture?.device_identity_sha256),source_file_sha256:e.sha256||null};return j&&(!J.capture_id||!J.collected_at||!J.device_identity_sha256)&&o.push({code:"LLM_RUNTIME_OBSERVED_CAPTURE_IDENTITY_INCOMPLETE"}),{schema:i?.schema||yf,status:o.length?"invalid":j?"artifact_bound_observed_runtime":"artifact_bound_declared_runtime",evidence_class:o.length?"INVALID":j?"DECLARED_AND_OBSERVED_RUNTIME":"DECLARED",source:e.path||null,source_sha256:e.sha256||null,runtime:s,deployment:{evidence_class:c,context_length:u,batch_size:l,state_storage_bits:_},weight_residency:{evidence_class:d,artifact_serialized_tensor_bytes:m==null?null:mi(m),runtime_weight_bytes:g==null?null:mi(g),cpu_bytes:h==null?null:mi(h),accelerator_bytes:b==null?null:mi(b),unresident_bytes:A==null?null:mi(A)},layer_placement:{evidence_class:y,layer_count:v,assignments:I,accelerator_layer_count:I.filter(W=>W.location==="accelerator").length,cpu_layer_count:I.filter(W=>W.location==="cpu").length,unresident_layer_count:I.filter(W=>W.location==="unresident").length},state_cache:{evidence_class:N,kind:i?.state_cache?.kind||null,logical_bytes:O==null?null:mi(O),allocated_bytes:B==null?null:mi(B),resident_bytes:k==null?null:mi(k),paging_enabled:F===!0,page_size_bytes:D==null?null:mi(D),resident_page_count:q==null?null:mi(q),total_page_count:L==null?null:mi(L)},working_memory:P,capture:J,required_bindings:cS(),issue_count:o.length,issues:o,boundary:P?"DECLARED sections describe requested configuration; OBSERVED_RUNTIME sections require capture identity. Exclusive primary weight residency, logical state bytes, and the six working-memory categories are conserved independently. The accounted allocation is not process RSS, device-pool fit, application memory, operating-system reserve, kernel selection, latency, or task quality.":"DECLARED sections describe requested configuration; OBSERVED_RUNTIME sections require capture identity. Exclusive primary weight residency and logical state bytes are conserved independently. Runtime packing, replicas, workspaces, allocator overhead, backend-private allocations, kernel selection, latency, and task quality are not inferred."}}function cS(){return["runtime_engine_version_binary_and_build","context_batch_and_state_dtype","exclusive_weight_residency","complete_layer_placement","state_allocation_and_paging","capture_identity_for_observed_sections"]}function eF(e,t){let n=e?.working_memory;if(n==null)return null;if(e?.schema!==yf)return t.push({code:"LLM_RUNTIME_WORKING_MEMORY_REQUIRES_V2"}),null;let i=al(n,"/working_memory",t),o={},a=0n;for(let u of jA){let l=yn(n?.[u]);l==null?t.push({code:"LLM_RUNTIME_WORKING_MEMORY_CATEGORY_INVALID",field:u}):(o[u]=mi(l),a+=l)}let r=yn(n?.accounted_nonweight_runtime_bytes);(r==null||r!==a)&&t.push({code:"LLM_RUNTIME_WORKING_MEMORY_CONSERVATION_FAILED",expected:String(a),observed:r==null?null:String(r)});let s=n?.coverage,c=i==="OBSERVED_RUNTIME"?"complete_observed_runtime_categories":i==="DECLARED"?"complete_declared_runtime_categories":null;return s!==c&&t.push({code:"LLM_RUNTIME_WORKING_MEMORY_COVERAGE_INVALID",expected:c,observed:s??null}),{evidence_class:i,coverage:c,...Object.fromEntries(jA.map(u=>[u,o[u]||null])),accounted_nonweight_runtime_bytes:mi(a),category_count:jA.length,boundary:"All six runtime-allocation categories are explicit and arithmetically conserved. Completeness is the manifest producer's declared or observed capture scope; the section is not process RSS and does not include application memory or operating-system reserve."}}var _S="deepbom.llm_memory_feasibility.v1.1",Af="All serialized tensor bytes and the logical state bytes are simultaneously resident in one aggregate primary-memory budget; storage-backed weight paging, remote execution, and capacity split across independently constrained memory pools are excluded.",tF=1024n**2n,wo=1024n**3n,nF=Object.freeze([["512 MiB",512n*tF],["1 GiB",wo],["2 GiB",2n*wo],["4 GiB",4n*wo],["8 GiB",8n*wo],["16 GiB",16n*wo],["24 GiB",24n*wo],["32 GiB",32n*wo],["48 GiB",48n*wo],["64 GiB",64n*wo],["96 GiB",96n*wo],["128 GiB",128n*wo]].map(([e,t])=>Object.freeze({label:e,bytes:String(t)})));function Ko(e){return e&&typeof e=="object"&&/^\d+$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^\d+$/.test(e)?BigInt(e):typeof e=="bigint"&&e>=0n?e:Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function rn(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function dS(e,t){let n=Ko(e),i=Ko(t);return n==null?{status:"not_assessable_lower_bound_unbound",deficit_bytes:null,headroom_after_lower_bound_bytes:null,fit_claim:"not_emitted"}:i==null?{status:"lower_bound_derived_capacity_unbound",deficit_bytes:null,headroom_after_lower_bound_bytes:null,fit_claim:"not_emitted"}:{status:n>i?"lower_bound_exceeds_capacity":"lower_bound_at_or_below_capacity_fit_unresolved",deficit_bytes:n>i?rn(n-i):null,headroom_after_lower_bound_bytes:n<=i?rn(i-n):null,fit_claim:"not_emitted"}}function vf(e,t){let n=null,i=0;for(let o of t){let a=BigInt(o.bytes);e>a?i+=1:n==null&&(n=o.label)}return{first_capacity_not_exceeded:n||`>${t.at(-1)?.label||"largest reference tier"}`,lower_bound_exceeded_capacity_count:i}}function iF(e,t,n){let i=Array.isArray(e?.state?.scenario_matrix)?e.state.scenario_matrix:[];if(!i.length){let o=vf(t,n);return[{state_kind:"state_contract_unbound",context_length:null,batch_size:null,storage_bits:null,serialized_weight_floor_bytes:rn(t),logical_state_bytes:null,static_lower_bound_bytes:rn(t),evidence_class:"OBSERVED_SERIALIZED_STORAGE",...o}]}return i.map(o=>{let a=Ko(o.logical_bytes);if(a==null)return null;let r=t+a;return{state_kind:o.state_kind,context_length:o.context_length??null,batch_size:o.batch_size,storage_bits:o.storage_bits,serialized_weight_floor_bytes:rn(t),logical_state_bytes:rn(a),static_lower_bound_bytes:rn(r),evidence_class:"OBSERVED_STORAGE_PLUS_DERIVED_CONDITIONAL_STATE",...vf(r,n)}}).filter(Boolean)}function oF(e,t){let n=e?.runtime_contract;if(!n||!["artifact_bound_declared_runtime","artifact_bound_observed_runtime"].includes(n.status))return null;let i=Ko(n.weight_residency?.cpu_bytes),o=Ko(n.weight_residency?.accelerator_bytes),a=Ko(n.state_cache?.resident_bytes),r=Ko(n.state_cache?.allocated_bytes);if([i,o,a,r].some(_=>_==null))return null;let s=i+o+a,c=Ko(n.working_memory?.accounted_nonweight_runtime_bytes),u=i+o+r,l=c==null?null:u+c;return{status:l!=null?n.status==="artifact_bound_observed_runtime"?"assessed_observed_accounted_primary_allocation":"assessed_declared_accounted_primary_allocation":n.status==="artifact_bound_observed_runtime"?"assessed_observed_primary_residency_lower_bound":"assessed_declared_primary_residency_lower_bound",evidence_class:n.evidence_class,context_length:n.deployment?.context_length??null,batch_size:n.deployment?.batch_size??null,state_storage_bits:n.deployment?.state_storage_bits??null,exclusive_weight_resident_bytes:rn(i+o),state_resident_bytes:rn(a),state_allocated_bytes:rn(r),primary_resident_lower_bound_bytes:rn(s),primary_allocated_lower_bound_bytes:rn(u),working_memory_accounted_bytes:c==null?null:rn(c),primary_allocated_accounted_bytes:l==null?null:rn(l),allocation_accounting_status:l==null?"working_memory_categories_unbound":n.working_memory.coverage,capacity_scope:"Aggregate CPU plus accelerator primary residency. Per-pool capacity constraints are not assessed.",resident_capacity_assessment:vf(s,t),allocated_capacity_assessment:vf(l??u,t),fit_claim:"not_emitted",boundary:l==null?"Exclusive primary weight residency plus state-cache residency/allocation from the bound manifest. Working-memory categories are unbound, so the allocated value remains a lower bound. CPU and accelerator bytes are aggregated and do not establish fit within either pool.":"Exclusive primary weight residency, state allocation, and six explicitly conserved working-memory categories from the bound manifest. The accounted value aggregates CPU and accelerator allocations and is not process RSS or a per-pool fit claim; application memory and operating-system reserve remain external."}}function pS(e,{capacityTiers:t=nF}={}){let n=t.map(r=>({label:String(r.label),bytes:String(r.bytes)}));if(!n.length||n.some((r,s)=>!r.label||!/^\d+$/.test(r.bytes)||BigInt(r.bytes)<=0n||s>0&&BigInt(r.bytes)<=BigInt(n[s-1].bytes)))throw new Error("LLM memory capacity tiers must be non-empty, positive, and strictly increasing");let i=Ko(e?.storage?.serialized_tensor_bytes_decimal);if(i==null)return{schema:_S,status:"not_assessable_serialized_weight_bytes_unbound",evidence_class:"NOT_ASSESSABLE",capacity_scope:"single_aggregate_primary_memory_budget",residency_assumption:Af,reference_capacity_tiers:n.map(r=>({label:r.label,bytes:rn(BigInt(r.bytes))})),static_scenarios:[],runtime_primary_residency:null,fit_claim:"not_emitted",boundary:"No fit claim is emitted because exact serialized tensor bytes are unavailable."};let o=iF(e,i,n),a=o.map(r=>Ko(r.static_lower_bound_bytes)).filter(r=>r!=null);return{schema:_S,status:o.some(r=>r.logical_state_bytes==null)?"partial_serialized_weight_floor_only":"assessed_static_lower_bound_scenarios",evidence_class:o.some(r=>r.logical_state_bytes==null)?"OBSERVED":"OBSERVED/DERIVED_CONDITIONAL_SCENARIO",capacity_scope:"single_aggregate_primary_memory_budget",residency_assumption:Af,serialized_weight_floor_bytes:rn(i),minimum_static_lower_bound_bytes:a.length?rn(a.reduce((r,s)=>r<s?r:s)):null,maximum_static_lower_bound_bytes:a.length?rn(a.reduce((r,s)=>r>s?r:s)):null,reference_capacity_tiers:n.map(r=>({label:r.label,bytes:rn(BigInt(r.bytes))})),static_scenarios:o,runtime_primary_residency:oF(e,n),fit_claim:"not_emitted",boundary:"Under the explicit simultaneous-residency assumption, static rows add exact serialized tensor bytes to logical KV/SSM state bytes. A smaller aggregate capacity is insufficient only under that assumption. A capacity at or above the lower bound is not proven sufficient. A v2 artifact-bound runtime manifest may separately account for working-memory categories, but per-pool capacity, application memory, and operating-system reserve remain external."}}var wf="deepbom.llm_layer_storage.v1";function mS(e){if(typeof e=="bigint")return e>=0n?e:null;if(Number.isSafeInteger(e)&&e>=0)return BigInt(e);let t=String(e??"");return/^(?:0|[1-9]\d*)$/.test(t)?BigInt(t):null}function Ns(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:e.toString()}}function aF(e,t){if(e==="gguf")return{id:"gguf_block_namespace",expression:"^blk\\.([0-9]+)\\.",regex:/^blk\.([0-9]+)\./,evidence:"OBSERVED_SERIALIZED_GGUF_TENSOR_NAMESPACE"};if(e!=="safetensors")return null;let n=t?.kind==="ssm_recurrent";return{id:n?"hf_mamba_backbone_layer_namespace":"hf_decoder_model_layer_namespace",expression:n?"^backbone\\.layers\\.([0-9]+)\\.":"^model\\.layers\\.([0-9]+)\\.",regex:n?/^backbone\.layers\.([0-9]+)\./:/^model\.layers\.([0-9]+)\./,evidence:"SOURCE_REGISTERED_HF_CANONICAL_TENSOR_NAMESPACE"}}function fS(e,t,n){let i=String(e?.format||"").toLowerCase(),o=aF(i,t),a="Exact serialized tensor bytes grouped by a source-registered or format-canonical layer namespace. These bytes are not runtime packing, replicas, allocator usage, residency, offload capacity, engine workspace, or physical transfer.";if(!o)return{schema:wf,status:"not_applicable_format",evidence_class:"NOT_APPLICABLE",format:i,boundary:a};let r=Number(t?.layer_count);if(!Number.isSafeInteger(r)||r<=0)return{schema:wf,status:"not_assessable_layer_count_unbound",evidence_class:"NOT_ASSESSABLE",format:i,namespace:{id:o.id,expression:o.expression,evidence:o.evidence},boundary:a};let s=Array.isArray(e?.tensors)?e.tensors:[],c=[],u=[];for(let[v,I]of s.entries()){let w=mS(I?.byte_length_decimal??I?.byte_length);w==null&&u.push({tensor_index:Number.isSafeInteger(Number(I?.index))?Number(I.index):v,tensor_name:String(I?.name||"")}),c.push({tensor:I,position:v,bytes:w})}if(u.length)return{schema:wf,status:"invalid_serialized_tensor_byte_contract",evidence_class:"OBSERVED_INVALID",format:i,expected_layer_count:r,invalid_byte_tensor_count:u.length,invalid_byte_tensors:u.slice(0,256),namespace:{id:o.id,expression:o.expression,evidence:o.evidence},boundary:a};let l=Array.from({length:r},(v,I)=>({layer_index:I,tensor_count:0,bytes:0n})),_=0n,p=0,d=[];for(let v of c){let I=String(v.tensor?.name||""),w=o.regex.exec(I);if(!w){_+=v.bytes,p+=1;continue}let N=Number(w[1]);if(!Number.isSafeInteger(N)||N<0||N>=r){d.push({tensor_index:Number.isSafeInteger(Number(v.tensor?.index))?Number(v.tensor.index):v.position,tensor_name:I,layer_index:N});continue}l[N].tensor_count+=1,l[N].bytes+=v.bytes}let m=c.reduce((v,I)=>v+I.bytes,0n),f=l.reduce((v,I)=>v+I.bytes,0n),g=mS(n?.byte_length_decimal??n?.byte_length),h=l.filter(v=>v.tensor_count===0).map(v=>v.layer_index),b=f+_===m&&g!=null&&m===g,A=d.length?"invalid_layer_index_out_of_range":b?h.length?"partial_layer_namespace_coverage":"assessed_exact_serialized_layer_storage":"invalid_storage_conservation",y=l.filter(v=>v.tensor_count>0),x=y.map(v=>v.bytes).sort((v,I)=>v<I?-1:v>I?1:0);return{schema:wf,status:A,evidence_class:A.startsWith("invalid")?"OBSERVED_INVALID":A.startsWith("partial")?`${o.evidence}/PARTIAL`:`${o.evidence}/DERIVED_EXACT_INTEGER`,format:i,namespace:{id:o.id,expression:o.expression,evidence:o.evidence},expected_layer_count:r,observed_layer_count:y.length,missing_layer_indices:h,unexpected_layer_tensor_count:d.length,unexpected_layer_tensors:d.slice(0,256),serialized_tensor_count:c.length,layer_tensor_count:l.reduce((v,I)=>v+I.tensor_count,0),non_layer_tensor_count:p,serialized_tensor_bytes:Ns(m),expected_serialized_tensor_bytes:g==null?null:Ns(g),layer_bytes:Ns(f),non_layer_bytes:Ns(_),minimum_populated_layer_bytes:x.length?Ns(x[0]):null,maximum_populated_layer_bytes:x.length?Ns(x.at(-1)):null,conservation:{status:b?"pass":"fail",equation:"sum(layer.serialized_bytes) + non_layer_bytes = sum(tensor.byte_length) = tensor_storage_summary.byte_length"},layers:l.map(v=>({layer_index:v.layer_index,tensor_count:v.tensor_count,serialized_bytes:Ns(v.bytes)})),boundary:a}}Me();Ce();var QA="deepbom.llm_static_memory_profile.v1",xS="deepbom.llm_static_memory_placement.v1",hS=new Set(["cpu","accelerator"]),rF=new Set(["highest_index_first","lowest_index_first"]),gS=4096;function Ef(e,t,n){if(!n?.document)return lF();let i=sF(n.document,e,t),o=e?.storage?.layer_storage;if(o?.status!=="assessed_exact_serialized_layer_storage"||o?.conservation?.status!=="pass")throw new Error("LLM static memory placement requires an exact conserved layer-storage ledger.");let a=o.layers||[];if(!a.length||a.length>gS||a.some((b,A)=>b.layer_index!==A||xf(b.serialized_bytes)==null))throw new Error(`LLM static memory placement requires 1-${gS} contiguous exact layer rows.`);let r=cF(e,i.policy),s=rl(r.bytes,"logical state bytes"),c=rl(o.non_layer_bytes,"non-layer serialized bytes"),u=a.map(b=>rl(b.serialized_bytes,`layer ${b.layer_index} serialized bytes`)),l=u.reduce((b,A)=>b+A,0n),_=rl(o.serialized_tensor_bytes,"serialized tensor bytes");if(l+c!==_)throw new Error("LLM layer and non-layer bytes do not conserve against serialized tensor bytes.");let p=i.policy.layer_order==="highest_index_first"?a.map(b=>b.layer_index).reverse():a.map(b=>b.layer_index),d=new Set,m=0n,f=[];for(let b=0;b<=a.length;b+=1){if(b>0){let w=p[b-1];d.add(w),m+=u[w]}let A=l-m,y=A+(i.policy.non_layer_pool==="cpu"?c:0n)+(i.policy.state_pool==="cpu"?s:0n),x=m+(i.policy.non_layer_pool==="accelerator"?c:0n)+(i.policy.state_pool==="accelerator"?s:0n),v=bS(y,i.capacities.cpu_bytes,i.reserves.cpu_bytes),I=bS(x,i.capacities.accelerator_bytes,i.reserves.accelerator_bytes);f.push({accelerator_layer_count:b,accelerator_layer_indices:[...d].sort((w,N)=>w-N),cpu_layer_count:a.length-b,cpu_layer_serialized_bytes:sn(A),accelerator_layer_serialized_bytes:sn(m),cpu_accounted_lower_bound_bytes:sn(y),accelerator_accounted_lower_bound_bytes:sn(x),cpu_capacity_assessment:v,accelerator_capacity_assessment:I,status:v.exceeds||I.exceeds?"accounted_lower_bound_exceeds_at_least_one_pool":"accounted_lower_bound_not_exceeding_pools_fit_unresolved"})}let g=f.filter(b=>b.status==="accounted_lower_bound_not_exceeding_pools_fit_unresolved"),h={schema:QA,artifact:i.artifact,capacities:vS(i.capacities),reserves:vS(i.reserves),policy:i.policy};return{schema:xS,status:g.length?"assessed_lower_bound_candidates":"assessed_all_candidates_exceed_lower_bound",evidence_class:"OBSERVED_SERIALIZED_STORAGE/DERIVED_CONDITIONAL_STATIC_LOWER_BOUND",source:n.path||null,source_sha256:ES(n.sha256)?n.sha256:null,normalized_profile:h,normalized_profile_sha256:K(Q(h)),layer_count:a.length,serialized_tensor_bytes:sn(_),layer_serialized_bytes:sn(l),non_layer_serialized_bytes:sn(c),logical_state:r,candidate_count:f.length,candidates:f,lower_bound_not_exceeding_candidate_count:g.length,minimum_accelerator_layer_count_not_disproven:g.length?g[0].accelerator_layer_count:null,maximum_accelerator_layer_count_not_disproven:g.length?g.at(-1).accelerator_layer_count:null,fit_claim:"not_emitted",conservation:{status:"pass",equation:"layer_serialized_bytes + non_layer_serialized_bytes = serialized_tensor_bytes; every candidate assigns each serialized byte and logical-state byte to exactly one declared pool"},boundary:"Candidates are exact only for serialized tensor bytes and the logical KV/SSM state under the declared profile. Exceeding either effective pool capacity proves that candidate insufficient under these assumptions. Not exceeding both capacities does not prove fit because runtime-expanded or repacked weights, replicas, workspace, allocator overhead, backend-private allocations, application memory, operating-system reserve beyond the declared reserve, and physical placement remain unbound."}}function sF(e,t,n){if(!e||typeof e!="object"||Array.isArray(e)||e.schema!==QA)throw new Error(`LLM static memory profile must use ${QA}.`);let i=wS(e.artifact?.sha256,"profile artifact SHA-256"),o=wS(n?.artifact_bundle?.model_source_sha256||n?.model_sha256,"active model-source SHA-256"),a=String(e.artifact?.format||"").toLowerCase();if(i!==o||a!==String(t?.format||"").toLowerCase())throw new Error("LLM static memory profile is not bound to the active artifact identity.");let r={cpu_bytes:yS(e.capacities?.cpu_bytes,"CPU capacity"),accelerator_bytes:yS(e.capacities?.accelerator_bytes,"accelerator capacity")},s={cpu_bytes:AS(e.reserves?.cpu_bytes,"CPU reserve"),accelerator_bytes:AS(e.reserves?.accelerator_bytes,"accelerator reserve")};if(s.cpu_bytes>=r.cpu_bytes||s.accelerator_bytes>=r.accelerator_bytes)throw new Error("Each LLM memory reserve must be smaller than its declared pool capacity.");let c=String(e.policy?.layer_order||""),u=String(e.policy?.non_layer_pool||""),l=String(e.policy?.state_pool||"");if(!rF.has(c)||!hS.has(u)||!hS.has(l))throw new Error("LLM memory policy must bind layer order, non-layer pool, and state pool.");let _=FA(e.policy?.batch_size,"batch size"),p=FA(e.policy?.state_storage_bits,"state storage bits");if(p%8!==0)throw new Error("LLM state storage bits must be byte-aligned.");let d=e.policy?.context_length==null?null:FA(e.policy.context_length,"context length");return{artifact:{format:a,sha256:i},capacities:r,reserves:s,policy:{layer_order:c,non_layer_pool:u,state_pool:l,context_length:d,batch_size:_,state_storage_bits:p}}}function cF(e,t){let n=BigInt(t.state_storage_bits/8),i=xf(e?.state?.kv_projection?.elements_per_token_per_batch),o=xf(e?.state?.recurrent_projection?.recurrent_state_elements_all_layers_per_batch);if(i!=null&&o!=null){if(t.context_length==null)throw new Error("Hybrid KV/SSM placement requires a declared context length.");let a=i*BigInt(t.context_length),r=(a+o)*BigInt(t.batch_size);return{kind:"hybrid_kv_ssm",context_length:t.context_length,batch_size:t.batch_size,storage_bits:t.state_storage_bits,kv_elements_per_batch:sn(a),recurrent_elements_per_batch:sn(o),bytes:sn(r*n)}}if(i!=null){if(t.context_length==null)throw new Error("Transformer KV placement requires a declared context length.");let a=i*BigInt(t.context_length)*BigInt(t.batch_size)*n;return{kind:"transformer_kv",context_length:t.context_length,batch_size:t.batch_size,storage_bits:t.state_storage_bits,bytes:sn(a)}}if(o!=null){if(t.context_length!=null)throw new Error("SSM recurrent-state placement must not declare a context length.");let a=o*BigInt(t.batch_size)*n;return{kind:"ssm_recurrent",context_length:null,batch_size:t.batch_size,storage_bits:t.state_storage_bits,bytes:sn(a)}}throw new Error("LLM static memory placement requires a complete KV or recurrent-state contract.")}function bS(e,t,n){let i=t-n,o=e>i;return{declared_capacity_bytes:sn(t),declared_reserve_bytes:sn(n),effective_capacity_bytes:sn(i),accounted_lower_bound_bytes:sn(e),status:o?"accounted_lower_bound_exceeds_effective_capacity":"accounted_lower_bound_at_or_below_effective_capacity_fit_unresolved",exceeds:o,deficit_bytes:o?sn(e-i):null,headroom_after_accounted_lower_bound_bytes:o?null:sn(i-e),fit_claim:"not_emitted"}}function lF(){return{schema:xS,status:"not_bound",evidence_class:"NOT_ASSESSABLE",required_profile:["artifact_identity","cpu_and_accelerator_capacities","per_pool_reserves","layer_order","non_layer_pool","state_pool","context_batch_and_state_storage_width"],candidates:[],fit_claim:"not_emitted",boundary:"No per-pool placement result is emitted until an artifact-bound static memory profile declares both capacities, reserves, and residency policy."}}function xf(e){return e&&typeof e=="object"&&/^(?:0|[1-9]\d*)$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^(?:0|[1-9]\d*)$/.test(e)?BigInt(e):typeof e=="bigint"&&e>=0n?e:Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function rl(e,t){let n=xf(e);if(n==null)throw new Error(`${t} must be an exact non-negative integer.`);return n}function yS(e,t){let n=rl(e,t);if(n<=0n)throw new Error(`${t} must be positive.`);return n}function AS(e,t){return rl(e,t)}function FA(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`);return e}function sn(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function vS(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,sn(n)]))}function ES(e){return typeof e=="string"&&/^[a-f0-9]{64}$/.test(e)}function wS(e,t){if(!ES(e))throw new Error(`${t} must be a lowercase SHA-256 digest.`);return e}Me();Ce();var Nf=Object.freeze({repository:"NVIDIA/TensorRT-LLM",release:"v1.2.0",commit:"51f5ef32b695f421dd27727f3935052015c945f9",files:Object.freeze([Object.freeze({path:"tensorrt_llm/builder.py",sha256:"306ced17abe40cc8d25fa1acc749a54f3896e7f97940c2f2d2e4ab8529913eb1",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/builder.py",purpose:"EngineConfig serialization, BuildConfig limits, KV-cache type, plugin configuration, and weight-streaming declaration."}),Object.freeze({path:"tensorrt_llm/models/modeling_utils.py",sha256:"dc739812818f215be4ee625a11ae2418df9d18e79542385952f3a9f0f01ff442",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/models/modeling_utils.py",purpose:"PretrainedConfig architecture dimensions, distributed mapping, and quantization/KV-cache quantization fields."}),Object.freeze({path:"tensorrt_llm/mapping.py",sha256:"ef149fde47ab5bd23a8a4d88da6fa61752d5213e5d425f1d08bead9545e57d42",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/mapping.py",purpose:"world_size = tp_size x pp_size x cp_size and pipeline-layer partition rules."}),Object.freeze({path:"tensorrt_llm/llmapi/kv_cache_type.py",sha256:"761cd0a9412bba588c741c82dcbe64433eba5f863db323310c5f71c539b6e917",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/llmapi/kv_cache_type.py",purpose:"Serialized KV-cache type vocabulary."})])});var HA="deepbom.tensorrt_llm_static_deployment_contract.v1",uF="deepbom.tensorrt_llm_artifact_binding.v1",UA=/^[a-f0-9]{64}$/;function NS(e,t,{engineConfig:n=null,binding:i=null}={}){if(!n?.document)return _F();let o=[],a=n.document;if(!a||typeof a!="object"||Array.isArray(a))return dF("engine_config_not_object",n,o);let r=If(a.pretrained_config,"pretrained_config",o),s=If(a.build_config,"build_config",o),c=If(r.mapping,"pretrained_config.mapping",o),u=If(r.quantization,"pretrained_config.quantization",o),l=$n(c.world_size,"mapping.world_size",o),_=$n(c.tp_size,"mapping.tp_size",o),p=$n(c.pp_size,"mapping.pp_size",o),d=$n(c.cp_size??1,"mapping.cp_size",o);[l,_,p,d].every(P=>P!=null)&&l!==_*p*d&&o.push(Ln("parallel_world_size_mismatch",`${l} != ${_} x ${p} x ${d}`));let m=$n(r.num_hidden_layers,"pretrained_config.num_hidden_layers",o),f=hF(c.pp_partition,p,m,o),g=$n(s.max_input_len,"build_config.max_input_len",o),h=$n(s.max_seq_len,"build_config.max_seq_len",o),b=$n(s.max_batch_size,"build_config.max_batch_size",o),A=$n(s.max_num_tokens,"build_config.max_num_tokens",o),y=Cf(s.opt_num_tokens,"build_config.opt_num_tokens",o);g!=null&&h!=null&&g>h&&o.push(Ln("input_exceeds_sequence_limit",`${g} > ${h}`)),y!=null&&A!=null&&y>A&&o.push(Ln("optimal_tokens_exceed_maximum",`${y} > ${A}`));let x={name:GA(r.architecture,"pretrained_config.architecture",o),dtype:GA(r.dtype,"pretrained_config.dtype",o),hidden_size:$n(r.hidden_size,"pretrained_config.hidden_size",o),intermediate_size:$n(r.intermediate_size,"pretrained_config.intermediate_size",o),layer_count:m,attention_head_count:$n(r.num_attention_heads,"pretrained_config.num_attention_heads",o),kv_head_count:$n(r.num_key_value_heads,"pretrained_config.num_key_value_heads",o),head_size:$n(r.head_size,"pretrained_config.head_size",o),vocabulary_size:Cf(r.vocab_size,"pretrained_config.vocab_size",o),maximum_position_embeddings:Cf(r.max_position_embeddings,"pretrained_config.max_position_embeddings",o)},v=fF(x,t?.architecture||{});v.some(P=>P.status==="mismatch")&&o.push(Ln("source_architecture_mismatch","TensorRT-LLM engine config differs from the artifact-bound architecture contract."));let I=mF(e),w=pF(i,n,I,e?.artifact_bundle?.files||[],o),N=gF(u.kv_cache_quant_algo,x.dtype),S=bF(x,h,b,N),O=$n(s.max_beam_width,"build_config.max_beam_width",o),B=GA(s.kv_cache_type,"build_config.kv_cache_type",o),k=VA(s.strongly_typed,"build_config.strongly_typed",o),D=VA(s.weight_streaming,"build_config.weight_streaming",o),q=Cf(u.group_size,"quantization.group_size",o),L=yF(u.has_zero_point,"quantization.has_zero_point",o),F={schema:HA,method_version:"1.0.0",status:o.length?"invalid":w.status==="artifact_bound"?"artifact_bound_configuration":"candidate_configuration_unbound",evidence_class:w.status==="artifact_bound"?"OBSERVED_CONFIG/SOURCE_PINNED/ARTIFACT_BOUND/DERIVED":"OBSERVED_CONFIG/SOURCE_PINNED/UNBOUND_CANDIDATE",engine_config:{path:n.path||null,byte_length:n.byte_length??null,sha256:n.sha256||null,version:a.version??null,canonical_content_sha256:K(Q(a))},artifact_binding:w,architecture:x,architecture_comparison:v,parallelism:{world_size:l,tensor_parallel_size:_,pipeline_parallel_size:p,context_parallel_size:d,layer_partition_per_pipeline_rank:f,layer_partition_conservation:f&&m!=null&&f.reduce((P,X)=>P+X,0)===m?"complete":"not_assessable",weight_bytes_per_rank:null,weight_bytes_per_rank_reason:"Tensor parallelism and pipeline parallelism do not imply uniform byte sharding for embeddings, LM heads, replicated parameters, plugins, quantized packing, or managed weights. Per-rank engine or builder evidence is required."},build_limits:{max_input_length:g,max_sequence_length:h,maximum_batch_size:b,maximum_beam_width:O,maximum_batched_tokens:A,optimal_batched_tokens:y,kv_cache_type:B,strongly_typed:k,weight_streaming:D,plugin_config_sha256:s.plugin_config&&typeof s.plugin_config=="object"?K(Q(s.plugin_config)):null},quantization:{weight_activation_algorithm:u.quant_algo??null,kv_cache_algorithm:u.kv_cache_quant_algo??null,group_size:q,has_zero_point:L,excluded_module_count:Array.isArray(u.exclude_modules)?u.exclude_modules.length:0},kv_cache_scenario:S,issues:o,issue_count:o.length,source_basis:Nf,trust_boundary:{browser_engine_deserialization:"prohibited",browser_engine_execution:"prohibited",accepted_input:"Hash-bound UTF-8 JSON engine configuration and optional artifact-binding manifest only."},interpretation_boundary:"This contract validates serialized TensorRT-LLM configuration, parallelism conservation, artifact binding, and a conditional logical KV-state scenario where dimensions are complete. It does not build or deserialize an engine, establish per-rank weight residency, tactic/kernel selection, workspace or allocator memory, GPU occupancy, throughput, latency, accuracy, or device feasibility."};return F.contract_sha256=K(Q(F)),F}function _F(){return{schema:HA,status:"not_selected",evidence_class:"NOT_ASSESSABLE",source_basis:Nf}}function dF(e,t,n){n.push(Ln(e,"TensorRT-LLM engine configuration cannot be assessed."));let i={schema:HA,status:"invalid",evidence_class:"OBSERVED_INVALID",engine_config:{path:t?.path||null,sha256:t?.sha256||null},issues:n,issue_count:n.length,source_basis:Nf};return i.contract_sha256=K(Q(i)),i}function pF(e,t,n,i,o){if(!e?.document)return{status:"not_selected",source_artifact_sha256:null,engine_config_sha256:null,engine_file_count:0};let a=e.document;if(a?.schema!==uF||!UA.test(String(a.source_artifact_sha256||""))||!UA.test(String(a.engine_config_sha256||"")))return o.push(Ln("binding_manifest_invalid","TensorRT-LLM binding manifest schema or digest is invalid.")),{status:"invalid",source_artifact_sha256:a?.source_artifact_sha256||null,engine_config_sha256:a?.engine_config_sha256||null,engine_file_count:0};a.source_artifact_sha256!==n&&o.push(Ln("binding_artifact_digest_mismatch","Binding manifest does not identify the selected model-source artifact.")),a.engine_config_sha256!==t.sha256&&o.push(Ln("binding_engine_config_digest_mismatch","Binding manifest does not identify the selected TensorRT-LLM engine config."));let r=new Map(i.map(c=>[c.path,c])),s=Array.isArray(a.engine_files)?a.engine_files:[];for(let c of s)(!c||typeof c.path!="string"||!UA.test(String(c.sha256||""))||r.get(c.path)?.sha256!==c.sha256)&&o.push(Ln("binding_engine_file_mismatch",`Engine component ${c?.path||"<unknown>"} is absent or hash-divergent in the selected bundle.`));return{status:"artifact_bound",source_artifact_sha256:a.source_artifact_sha256,engine_config_sha256:a.engine_config_sha256,engine_file_count:s.length,manifest_path:e.path||null,manifest_sha256:e.sha256||null}}function mF(e){return String(e?.artifact_bundle?.model_source_sha256||e?.model_sha256||"").toLowerCase()}function fF(e,t){return[["hidden_size","hidden_size"],["intermediate_size","intermediate_size"],["layer_count","layer_count"],["attention_head_count","attention_head_count"],["kv_head_count","kv_head_count"],["head_size","head_width"],["vocabulary_size","vocabulary_size"],["maximum_position_embeddings","context_length"]].map(([i,o])=>{let a=e[i],r=t[o];return{engine_field:i,artifact_field:o,engine_value:a,artifact_value:r,status:a==null||r==null?"not_comparable":a===r?"match":"mismatch"}})}function hF(e,t,n,i){if(e!=null){if(!Array.isArray(e)||e.some(s=>!Number.isSafeInteger(Number(s))||Number(s)<0))return i.push(Ln("pipeline_partition_invalid","mapping.pp_partition must contain non-negative integer layer counts.")),null;let r=e.map(Number);return t!=null&&r.length!==t&&i.push(Ln("pipeline_partition_rank_count_mismatch",`${r.length} partition entries for pp_size ${t}.`)),n!=null&&r.reduce((s,c)=>s+c,0)!==n&&i.push(Ln("pipeline_partition_layer_count_mismatch","Pipeline partition does not conserve layer count.")),r}if(t==null||n==null)return null;let o=Math.floor(n/t),a=n%t;return Array.from({length:t},(r,s)=>o+(s<a?1:0))}function gF(e,t){let n=String(e||"").toUpperCase();if(n.includes("FP4")||n.includes("INT4"))return 4;if(n.includes("FP8")||n.includes("INT8"))return 8;let i=String(t||"").toLowerCase();return["float16","bfloat16","half"].includes(i)?16:["float32","float"].includes(i)?32:null}function bF(e,t,n,i){if(![e.layer_count,e.kv_head_count,e.head_size,t,n,i].every(s=>Number.isSafeInteger(s)&&s>0))return{status:"not_assessable_incomplete_dimensions",logical_bytes:null};let a=2n*BigInt(e.layer_count)*BigInt(e.kv_head_count)*BigInt(e.head_size)*BigInt(t)*BigInt(n),r=(a*BigInt(i)+7n)/8n;return{status:"derived_conditional_logical_state",evidence_class:"OBSERVED_CONFIG/DERIVED_CONDITIONAL",context_length:t,batch_size:n,storage_bits:i,logical_elements_decimal:String(a),logical_bytes:{value:r<=BigInt(Number.MAX_SAFE_INTEGER)?Number(r):null,decimal:String(r)},boundary:"Logical full-context KV cardinality from serialized TensorRT-LLM dimensions. Runtime block allocation, reserved capacity, beam sharing, eviction, reuse, fragmentation, and residency are not included."}}function If(e,t,n){return!e||typeof e!="object"||Array.isArray(e)?(n.push(Ln("required_object_missing",t)),{}):e}function GA(e,t,n){let i=String(e??"").trim();return i||n.push(Ln("required_text_missing",t)),i||null}function $n(e,t,n){let i=Number(e);return!Number.isSafeInteger(i)||i<=0?(n.push(Ln("positive_integer_invalid",t)),null):i}function Cf(e,t,n){return e==null?null:$n(e,t,n)}function VA(e,t,n){return typeof e!="boolean"?(n.push(Ln("boolean_not_explicit",t)),null):e}function yF(e,t,n){return e==null?null:VA(e,t,n)}function Ln(e,t){return{code:e,detail:t}}var IS="deepbom.on_device_llm_contract.v2",AF=Object.freeze(["do_sample","temperature","top_p","top_k","typical_p","min_p","max_new_tokens","min_new_tokens","repetition_penalty","num_beams","bos_token_id","eos_token_id","pad_token_id"]),Is=Object.freeze(["intended_use","patient_population","clinical_workflow","human_oversight","task_and_acceptance_metrics","evaluation_dataset_and_lineage","prompt_and_output_constraints","privacy_and_phi_handling","postmarket_monitoring_plan"]);function br(e){return typeof e=="string"&&e.trim()?e.trim():null}function kt(e){return Number.isSafeInteger(e)&&e>0?e:null}function ZA(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function sl(e){return e&&typeof e=="object"&&/^\d+$/.test(String(e.decimal||""))?BigInt(e.decimal):Number.isSafeInteger(e)&&e>=0||typeof e=="string"&&/^\d+$/.test(e)?BigInt(e):null}function vF(e,t){let n=Array.isArray(t?.encodings)?t.encodings.map(o=>({...o})):[],i=(e?.tensors||[]).map(o=>({index:Number.isSafeInteger(Number(o.index))?Number(o.index):null,name:String(o.name||""),dtype:String(o.dtype||"UNKNOWN"),shape:Array.isArray(o.shape)?o.shape.map(a=>Number.isSafeInteger(Number(a))?Number(a):null):[],byte_length:Number.isSafeInteger(Number(o.byte_length))?Number(o.byte_length):Number.isSafeInteger(Number(o.initializer_available_bytes))?Number(o.initializer_available_bytes):Number.isSafeInteger(Number(o.initializer_bytes))?Number(o.initializer_bytes):Number.isSafeInteger(Number(o.buffer_data_length))?Number(o.buffer_data_length):null})).sort((o,a)=>Number(o.index??0)-Number(a.index??0)||String(o.name).localeCompare(String(a.name)));return{encoding_signature_schema:"deepbom.llm_serialized_encoding_signature.v1",encoding_inventory:n,encoding_inventory_sha256:K(Q(n)),encoding_inventory_signature_basis:"SHA-256 over UTF-8 RFC8785-JCS canonical JSON of the complete emitted encoding_inventory array. Rows are ordered by exact serialized bytes descending, then dtype.",tensor_encoding_assignment_sha256:K(Q(i)),tensor_encoding_assignment_signature_basis:"SHA-256 over UTF-8 RFC8785-JCS canonical JSON of tensor rows sorted by numeric index then name and projected to index, name, dtype, shape, and byte_length.",recipe_interpretation:"Content-addressed serialized encoding inventory and tensor-to-encoding assignment only. Quantizer command, converter build, importance matrix, source checkpoint, and recipe authenticity are not inferred."}}function wF(e){let t=sl(e?.elements_per_token_per_batch),n=sl(e?.elements_at_context_batch_one);return t==null||n==null?[]:[8,16,32].map(i=>({storage_bits:i,bytes_per_token_per_batch:ZA(t*BigInt(i/8)),bytes_at_declared_context_batch_one:ZA(n*BigInt(i/8)),evidence_class:"DERIVED_CONDITIONAL_SCENARIO"}))}function xF(e){return!e||typeof e!="object"||Array.isArray(e)?{}:Object.fromEntries(AF.filter(t=>Object.hasOwn(e,t)).map(t=>[t,e[t]]))}function KA(e){return(Array.isArray(e)?e:e==null?[]:[e]).filter(n=>Number.isSafeInteger(n))}function CS(e){let t=e?.document;if(!t)return{status:"not_selected",evidence_class:"NOT_ASSESSABLE",source:null,sha256:null,byte_length:null,coverage:{declared:0,required:Is.length,declared_fields:[],missing:[...Is]},issues:[]};let n=[];(!t||typeof t!="object"||Array.isArray(t))&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_NOT_OBJECT"}),t?.schema!=="deepbom.on_device_llm_deployment_declaration.v1"&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_SCHEMA_INVALID",observed:t?.schema??null});for(let a of Is){let r=t?.[a];r!=null&&(["task_and_acceptance_metrics","evaluation_dataset_and_lineage"].includes(a)?(!Array.isArray(r)||!r.length||r.some(s=>!s||typeof s!="object"||Array.isArray(s)))&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_ARRAY_INVALID",field:a}):(typeof r!="string"||!r.trim())&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_TEXT_INVALID",field:a}))}let i=Is.filter(a=>{let r=t?.[a];return Array.isArray(r)?r.length>0:typeof r=="string"&&!!r.trim()}),o=Is.filter(a=>!i.includes(a));return{status:n.length?"invalid":o.length?"declared_unverified_partial":"declared_unverified_complete",evidence_class:"DECLARED_UNVERIFIED",source:e?.path||null,sha256:e?.sha256||null,byte_length:e?.byte_length??null,coverage:{declared:i.length,required:Is.length,declared_fields:i,missing:o},issues:n}}function EF(e,t){let n=e?.tokenizer_config?.document||null,i=e?.generation_config?.document||null,o=e?.architecture_config?.document||null,a=[],r=kt(t?.vocabulary_size);for(let[p,d]of[["architecture_config",o],["generation_config",i]])for(let m of["bos_token_id","eos_token_id","pad_token_id"])for(let f of KA(d?.[m]))r!=null&&(f<0||f>=r)&&a.push({code:"LLM_SPECIAL_TOKEN_ID_OUT_OF_RANGE",source:p,field:m,value:f,vocabulary_size:r});for(let p of["bos_token_id","eos_token_id","pad_token_id"]){let d=KA(o?.[p]),m=KA(i?.[p]);d.length&&m.length&&JSON.stringify(d)!==JSON.stringify(m)&&a.push({code:"LLM_GENERATION_TOKEN_ID_CONFLICT",field:p,architecture_config:d,generation_config:m})}let s=br(n?.chat_template),c=e?.chat_template||null,u=s?K(s):null;u&&c?.sha256&&u!==c.sha256&&a.push({code:"LLM_CHAT_TEMPLATE_AMBIGUOUS",tokenizer_config_sha256:u,chat_template_file_sha256:c.sha256});let _=Object.values(e||{}).filter(p=>p?.path&&p?.sha256).map(p=>({role:p.role,path:p.path,byte_length:p.byte_length,sha256:p.sha256})).sort((p,d)=>p.path.localeCompare(d.path)).filter(p=>["tokenizer_config","tokenizer_definition","special_token_map","chat_template"].includes(p.role));return{status:a.length?"invalid":_.length?"partially_bound":"not_selected",evidence_class:_.length?"OBSERVED/DECLARED_UNVERIFIED":"NOT_ASSESSABLE",definition_files:_,tokenizer_config:n?{model_max_length:kt(n.model_max_length),padding_side:br(n.padding_side),truncation_side:br(n.truncation_side)}:null,chat_template:u?{status:c?.sha256===u?"identical_dual_declaration":"declared_in_tokenizer_config",sha256:u,source:"tokenizer_config.json"}:c?{status:"declared_in_file",sha256:c.sha256,source:c.path}:{status:"not_selected"},generation:i?{status:"declared_unverified",source:e.generation_config.path,sha256:e.generation_config.sha256,values:xF(i)}:{status:"not_selected",values:{}},issues:a}}function NF(e){let t=e?.gguf?.semantic_contract||{},n=t.architecture_fields||{};return{source_status:t.status||"not_declared",source_evidence_class:t.evidence_class||"NOT_ASSESSABLE",architecture:{family:br(t.architecture),kind:"dense_transformer_decoder",architecture_names:[],context_length:kt(t.context_length),vocabulary_size:kt(t.tokenizer?.vocabulary_count),hidden_size:kt(t.embedding_length),intermediate_size:kt(t.feed_forward_length),layer_count:kt(t.block_count),attention_head_count:kt(t.attention_head_count),kv_head_count:kt(t.attention_head_count_kv),head_width:kt(t.attention_key_length||t.derived_attention_head_width),gqa_query_heads_per_kv_head:kt(t.derived_gqa_query_heads_per_kv_head),position_encoding:t.position_encoding||{status:Object.keys(n).some(i=>i.startsWith("rope."))?"declared":"not_declared"}},tokenizer:{...t.tokenizer,evidence_class:t.tokenizer?.status==="assessed"?"OBSERVED":"NOT_ASSESSABLE",definition_files:[],chat_template:t.tokenizer?.chat_template||{status:"not_declared"}},generation:{status:"not_embedded_as_runtime_policy",values:{}},kv_state_projection:t.kv_state_projection||null,compute_projection:t.compute_projection||null,issues:t.issues||[]}}function IF(e,t){let n=e?.safetensors?.hf_architecture_contract||{},i=n?.fields||{},o={family:br(n.model_type),kind:br(n.architecture_kind)||"dense_transformer_decoder",architecture_names:Array.isArray(n.architectures)?n.architectures:[],context_length:kt(i.max_position_embeddings),vocabulary_size:kt(i.vocab_size),hidden_size:kt(i.hidden_size),intermediate_size:kt(i.intermediate_size),layer_count:kt(i.num_hidden_layers),attention_head_count:kt(i.num_attention_heads),kv_head_count:kt(i.num_key_value_heads),head_width:kt(i.head_dim),gqa_query_heads_per_kv_head:kt(n.gqa_query_heads_per_kv_head),position_encoding:n.position_encoding||{status:"not_projected_from_registered_config"},moe:n.moe_projection||null,ssm:n.recurrent_state_projection?{state_size:kt(i.state_size),convolution_kernel:kt(i.conv_kernel),expansion_factor:Number.isFinite(i.expand)&&i.expand>0?i.expand:null,time_step_rank:kt(i.time_step_rank),recurrent_layer_count:kt(n.recurrent_state_projection?.layer_count)}:null},a=EF(t,o),r=CS(t?.deployment_declaration);return{source_status:n.status||"not_assessed_config_not_selected",source_evidence_class:n.evidence_class||"NOT_ASSESSABLE",architecture:o,tokenizer:a,generation:a.generation,kv_state_projection:n.kv_state_projection||null,recurrent_state_projection:n.recurrent_state_projection||null,compute_projection:n.compute_projection||null,deployment_declaration:r,issues:[...n.issues||[],...a.issues,...r.issues]}}var CF=new Set(["ATTENTION","MULTIHEADATTENTION","GROUPQUERYATTENTION","PAGEDATTENTION","ROTARYEMBEDDING","EMBEDLAYERNORMALIZATION","SKIPLAYERNORMALIZATION","MATMULNBITS","GATEDRELATIVEPOSITIONBIAS","BIASGELU","FASTGELU"]);function kF(e){return String(e||"").replace(/[^A-Za-z0-9]/g,"").toUpperCase()}function SF(e){let t={BOOL:8,INT4:4,UINT4:4,INT8:8,UINT8:8,FLOAT16:16,BFLOAT16:16,INT16:16,UINT16:16,FLOAT32:32,INT32:32,UINT32:32,FLOAT64:64,INT64:64,UINT64:64}[String(e?.dtype||"").toUpperCase()],n=Array.isArray(e?.shape_signature)&&e.shape_signature.length?e.shape_signature:e?.shape;if(!t||!Array.isArray(n)||!n.length||n.some(o=>!Number.isSafeInteger(Number(o))||Number(o)<0))return null;let i=n.reduce((o,a)=>o*BigInt(a),1n);return ZA((i*BigInt(t)+7n)/8n)}function TF(e){let t=String(e?.format||"").toLowerCase(),n=t==="onnx"?e?.onnx_external_data_structure_binding:null;if(n?.range_conservation_status==="complete"){let l=sl(n.declared_element_count),_=sl(n.declared_payload_bytes),p=(n.encoding_inventory||[]).map(d=>{let m=sl(d.element_count),f=sl(d.declared_payload_bytes);return{dtype:String(d.dtype||"UNKNOWN"),tensor_count:Number(d.tensor_count||0),element_count:m!=null&&m<=BigInt(Number.MAX_SAFE_INTEGER)?Number(m):null,element_count_decimal:m==null?null:String(m),byte_length:f!=null&&f<=BigInt(Number.MAX_SAFE_INTEGER)?Number(f):null,byte_length_decimal:f==null?null:String(f),effective_bits_per_element:d.effective_bits_per_element??null}});return{status:"assessed_serialized_constant_structure_payload_values_not_assessed",element_count:l<=BigInt(Number.MAX_SAFE_INTEGER)?Number(l):null,element_count_decimal:String(l),byte_length:_<=BigInt(Number.MAX_SAFE_INTEGER)?Number(_):null,byte_length_decimal:String(_),unique_byte_length:n.unique_payload_bytes?.number??null,unique_byte_length_decimal:n.unique_payload_bytes?.decimal??null,effective_bits_per_element:l>0n?Number(_*8000000n/l)/1e6:null,numerical_payload_decode:n.numerical_payload_decode,encodings:p,format:t}}let o=(Array.isArray(e?.tensors)?e.tensors:[]).filter(l=>l?.constant_buffer===!0||Number(l?.initializer_available_bytes||l?.initializer_bytes||l?.buffer_data_length||0)>0),a=e?.size_breakdown||{},r=Number.isSafeInteger(Number(a.available_initializer_bytes))?Number(a.available_initializer_bytes):Number.isSafeInteger(Number(a.constant_bytes))?Number(a.constant_bytes):null,s=Number.isSafeInteger(Number(a.available_initializer_scalar_elements))?Number(a.available_initializer_scalar_elements):Number.isSafeInteger(Number(a.stored_scalar_elements))?Number(a.stored_scalar_elements):null,c=new Map;for(let l of o){let _=String(l.dtype||"UNKNOWN"),p=Number(l.initializer_available_bytes||l.initializer_bytes||l.buffer_data_length||0),d=Number(l.initializer_stored_elements||0),m=c.get(_)||{dtype:_,tensor_count:0,element_count:0,byte_length:0};m.tensor_count+=1,Number.isSafeInteger(d)&&d>=0&&(m.element_count+=d),Number.isSafeInteger(p)&&p>=0&&(m.byte_length+=p),c.set(_,m)}let u=[...c.values()].sort((l,_)=>_.byte_length-l.byte_length||l.dtype.localeCompare(_.dtype)).map(l=>({dtype:l.dtype,tensor_count:l.tensor_count,element_count:l.element_count,element_count_decimal:String(l.element_count),byte_length:l.byte_length,byte_length_decimal:String(l.byte_length),effective_bits_per_element:l.element_count?l.byte_length*8/l.element_count:null}));return{status:r==null?"not_assessed_constant_storage":"assessed_serialized_constant_storage",element_count:s,element_count_decimal:s==null?null:String(s),byte_length:r,byte_length_decimal:r==null?null:String(r),effective_bits_per_element:r!=null&&s?r*8/s:null,encodings:u,format:t}}function zF(e){let t=Array.isArray(e?.ops)?e.ops:[],n=Array.isArray(e?.tensors)?e.tensors:[],i=t.map((l,_)=>({op_index:Number.isSafeInteger(Number(l?.index))?Number(l.index):_,name:String(l?.name||"UNKNOWN"),domain:br(l?.domain),version:Number.isSafeInteger(Number(l?.version))?Number(l.version):null,normalized_name:kF(l?.name)})),o=l=>i.filter(_=>l.has(_.normalized_name)).length,a=i.filter(l=>CF.has(l.normalized_name)),r={matrix_multiply:o(new Set(["MATMUL","BATCHMATMUL","FULLYCONNECTED","GEMM"])),softmax:o(new Set(["SOFTMAX","LOGSOFTMAX"])),normalization:o(new Set(["LAYERNORMALIZATION","RMSNORMALIZATION","L2NORMALIZATION"])),embedding_gather:o(new Set(["GATHER","GATHERND","EMBEDLAYERNORMALIZATION"])),elementwise_activation:o(new Set(["GELU","FASTGELU","SILU","SWISH","BIASGELU"]))},s=r.matrix_multiply>=2&&r.softmax>=1&&r.normalization>=1,u=[...e?.inputs||[],...e?.outputs||[]].filter(l=>/(?:^|[._/])(past|present|cache|key|value|kv)(?:[._/]|$)/i.test(String(l?.name||""))).map(l=>({tensor_index:Number.isSafeInteger(Number(l?.index))?Number(l.index):null,name:String(l?.name||""),dtype:String(l?.dtype||"UNKNOWN"),shape:Array.isArray(l?.shape_signature)&&l.shape_signature.length?l.shape_signature:Array.isArray(l?.shape)?l.shape:[],logical_bytes_if_static:SF(l),classification:"serialized_name_candidate_not_semantic_proof"}));return{schema:"deepbom.serialized_llm_graph_evidence.v1",status:a.length?"explicit_transformer_operator_evidence_present":s?"transformer_like_motif_candidate":"no_serialized_llm_specific_evidence",evidence_class:a.length?"OBSERVED_SERIALIZED_OPERATOR_SEMANTICS":s?"OBSERVED_GRAPH_WITH_HEURISTIC_CLASSIFICATION":"OBSERVED_NOT_DETECTED",graph_op_count:i.length,graph_signature_sha256:K(Q(i)),explicit_operator_count:a.length,explicit_operators:a,primitive_counts:r,transformer_motif_candidate:s,external_state_candidate_count:u.length,external_state_candidates:u,interpretation_boundary:"An explicit Attention-family operator establishes only its serialized operator semantics, not that the model is a language model. A decomposed MatMul/Softmax/normalization motif is heuristic and may represent vision or another attention workload. Interface names identify candidates only. Architecture family, layer count, KV layout, tokenizer, generation policy, task, and accuracy remain unbound without identity-bound metadata."}}function OF(e){let t=zF(e);return{source_status:t.status,source_evidence_class:t.evidence_class,architecture:{family:null,kind:"not_established_from_serialized_graph_alone",architecture_names:[],context_length:null,vocabulary_size:null,hidden_size:null,intermediate_size:null,layer_count:null,attention_head_count:null,kv_head_count:null,head_width:null,gqa_query_heads_per_kv_head:null,position_encoding:{status:"not_established"}},tokenizer:{status:"not_embedded_or_identity_bound",evidence_class:"NOT_ASSESSABLE",definition_files:[],chat_template:{status:"not_selected"}},generation:{status:"not_embedded_or_identity_bound",values:{}},kv_state_projection:null,recurrent_state_projection:null,compute_projection:null,graph:t,storage:TF(e),issues:[]}}function Zo(e={},{sidecars:t={}}={}){let n=String(e?.format||"").toLowerCase(),i=n==="gguf"?NF(e):n==="safetensors"?IF(e,t):["onnx","tflite"].includes(n)?OF(e):null;if(!i)return{schema:IS,status:"not_applicable_format",evidence_class:"NOT_APPLICABLE",format:n};let o=i.storage||e?.tensor_storage_summary||{},a=vF(e,o),r=fS(e,i.architecture,o),s=["gguf","safetensors"].includes(n)&&/assessed/.test(i.source_status)&&!/not_assessed/.test(i.source_status),c=String(r.status||"").startsWith("invalid"),u=i.source_status==="invalid"||i.source_status==="invalid_config"||i.issues.length>0||c,l=i.deployment_declaration||CS(null),_={schema:IS,status:u?"invalid":s?"assessed_static_artifact_contract":"partial_architecture_contract",evidence_class:s?"OBSERVED/SOURCE_BACKED/DERIVED":i.source_evidence_class,format:n,artifact_role:n==="gguf"?br(e?.metadata?.["general.type"])||"model":n==="safetensors"?"model_tensor_repository":"serialized_executable_graph",architecture:i.architecture,storage:{status:o.status||"not_assessed",serialized_parameter_count:o.element_count??null,serialized_parameter_count_decimal:o.element_count_decimal??null,serialized_tensor_bytes:o.byte_length??null,serialized_tensor_bytes_decimal:o.byte_length_decimal??null,effective_bits_per_parameter:o.effective_bits_per_element??null,...a,layer_storage:r,basis:"Reused from deepbom.tensor_storage_summary.v1; no independent recount."},tokenizer:i.tokenizer,generation:i.generation,state:{kv_projection:i.kv_state_projection,recurrent_projection:i.recurrent_state_projection,storage_scenarios:wF(i.kv_state_projection),recurrent_storage_scenarios:rS(i.recurrent_state_projection),scenario_matrix:[],scenario_boundary:i.kv_state_projection&&i.recurrent_state_projection?"Hybrid byte rows sum transformer KV elements for the selected context with context-independent SSM recurrent elements, then apply batch and storage width. They are not runtime allocation, residency, paging, or device-memory measurements.":i.recurrent_state_projection?"Recurrent-state byte rows are conditional on batch and storage width, remain context-independent under the pinned Mamba cache shape, and are not runtime allocation, residency, paging, or device-memory measurements.":"KV byte rows are conditional on context, batch, and cache storage width. They are not runtime allocation, residency, paging, or device-memory measurements."},compute:{projection:i.compute_projection,boundary:"Architecture equations are static scenarios, not a serialized execution graph, lowered kernel count, latency estimate, or throughput measurement."},serialized_graph:i.graph||null,runtime_contract:null,tensorrt_llm:null,memory_feasibility:null,static_memory_placement:null,medical_ai_claim_boundary:{status:l.status==="not_selected"?"not_established_by_model_artifact":l.status,declaration:l,required_external_evidence:l.coverage?.missing||[...Is],established:["artifact_identity","serialized_tensor_storage","declared_architecture_fields","conditional_state_and_compute_scenarios_where_complete"],not_established:["task_accuracy","clinical_validity","clinical_utility","safety_effectiveness","runtime_assignment","release_readiness"]},issue_count:i.issues.length+(c?1:0),issues:[...i.issues,...c?[{code:"LLM_LAYER_STORAGE_CONTRACT_INVALID",status:r.status}]:[]]};return _.state.scenario_matrix=lS(_),_.runtime_contract=uS(t?.runtime_manifest,e,_),_.tensorrt_llm=NS(e,_,{engineConfig:t?.tensorrt_llm_engine_config||null,binding:t?.tensorrt_llm_binding||null}),_.runtime_contract.gguf_backend_prerequisites=n==="gguf"&&e?.gguf?.backend_compatibility||null,_.memory_feasibility=pS(_),_.static_memory_placement=Ef(_,e,t?.static_memory_profile),_.runtime_contract.status==="invalid"&&(_.status="invalid",_.issues=[..._.issues,..._.runtime_contract.issues],_.issue_count=_.issues.length),_}var md=Object.freeze({awq:Object.freeze({repository:"casper-hansen/AutoAWQ",commit:"5f3785dcaa107ca76f5fa5355f459370c86f82d6",path:"awq/modules/linear/gemm.py",sha256:"073e1faa28ce167349606ee2d0ad6362a1f978fe08ca07298da3c6b977123081",layout:"WQLinear_GEMM"}),gptq:Object.freeze({repository:"ModelCloud/GPTQModel",release:"7.3.5",commit:"a752a7cebeaa5feb499e0b038895f745572ab0fa",path:"gptqmodel/nn_modules/qlinear/__init__.py",sha256:"63c03283af6a1452b1427f88340e992795dfc8169e06f52a4500d692b01486d4",layout:"GPTQQuantLinear classic INT32-compatible packed state"}),hqq:Object.freeze({repository:"mobiusml/hqq",commit:"d88a488ec8aa2d58362ef2038a52bca862db2e74",path:"hqq/core/quantize.py",sha256:"a76a054ba4382d9552f563c468296771cddf53dcd9f4ce6655f94fe18e653daa",layout:"HQQLinear encoded SafeTensors state"}),"compressed-tensors":Object.freeze({repository:"vllm-project/compressed-tensors",release:"0.9.4",commit:"8aa8b822c8f6dac6272bb0749a498e3297b88510",path:"src/compressed_tensors/compressors/quantized_compressors/pack_quantized.py",sha256:"48f207964f1ec22a762dc8e0902c34d8adb51247d448549df6a42a2f43ede5e3",layout:"pack-quantized"})}),RF=Object.freeze({hqq:Object.freeze([Object.freeze({path:"hqq/core/bitpack.py",sha256:"19499f1c72e5f2422e7c90d83ab370e006bbbbad0ede3020b7e356688d99fca8"}),Object.freeze({path:"hqq/core/utils.py",sha256:"808316e4337f6a6305b97844c729a5b70a072052ae5c1c69b793834a143fdf60"}),Object.freeze({path:"hqq/models/base.py",sha256:"4823d53d2992a0eada577cc8bc5c58202eca33d15b792ec50dc03ab63fdf7dc6"}),Object.freeze({repository:"huggingface/transformers",commit:"8cb5963cc22174954e7dca2c0a3320b7dc2f4edc",path:"src/transformers/utils/quantization_config.py",sha256:"30af0253da4122a03c4d758cada0dfaccdd89ddb725b7f698f45be135ddb5358"})]),"compressed-tensors":Object.freeze([Object.freeze({path:"src/compressed_tensors/quantization/quant_config.py",sha256:"33149471be5d3aa30de8b1720f92b687c5f44ef12d716200a22509a83d9d1c61"}),Object.freeze({path:"src/compressed_tensors/quantization/quant_args.py",sha256:"b0aa5bf0370d39b89d8d78cda25d539ff222877657072712a7e7f2cfaf131a16"}),Object.freeze({path:"src/compressed_tensors/quantization/quant_scheme.py",sha256:"cb3d2831b6f0a7b4195d777693928826ef90e9a4ea836f76f55754cd9eefcac3"}),Object.freeze({path:"src/compressed_tensors/quantization/lifecycle/apply.py",sha256:"391fba42637da45446b5e60c0406adbb64f9a87bad42dec8c378c7e0320bbc49"}),Object.freeze({path:"src/compressed_tensors/quantization/lifecycle/initialize.py",sha256:"498e3e1495a9552ba9423bafcbbaeb21cd2915853d7112f92e8d4ac9f512be85"})])}),hd="deepbom.safetensors_quantization_contract.v1.2",RS=Object.freeze(["method","bits","group_size","zero_point","sym","version","desc_act","checkpoint_format"]);function gd(e,t,{sidecars:n={}}={}){let i=UF(e,n);if(!i.length)return zf("not_applicable_no_quantization_declaration","No supported quantization declaration was selected with the SafeTensors repository.");let o=i.map(GF),a=bd(o.map(d=>d.method).filter(Boolean));if(a.length!==1||!md[a[0]])return zf("not_assessed_unsupported_or_conflicting_method",`Expected one supported quantization method; observed ${a.join(", ")||"none"}.`,{declarations:o});let r=a[0];if(r==="hqq")return BF(i,t);if(r==="compressed-tensors")return DF(i,t);let s=VF(o),c=HF(o),u=KF(r,c),l=ZF(t).map(d=>r==="awq"?XF(d,c):WF(d,c));l.length||u.push("quantization_declaration_has_no_packed_module_tensors");let _=s.length+u.length+l.reduce((d,m)=>d+m.issues.length,0),p=md[r];return{schema:hd,status:_?"fail":"assessed",evidence_class:"OBSERVED/DERIVED_FROM_PINNED_FORMAT_SOURCE",method:r,bits:c.bits??null,group_size:c.group_size??null,zero_point:c.zero_point??null,symmetric:c.sym??null,implementation_version:c.version??null,checkpoint_format:c.checkpoint_format??null,pack_word_bits:32,pack_factor:fd(c.bits)?32/c.bits:null,storage_word_bits:32,codes_per_storage_word:fd(c.bits)?32/c.bits:null,granularity:"per_group_weight",logical_group_axis:"input_features",declaration_count:o.length,declarations:o,declaration_conflicts:s,config_issues:u,module_count:l.length,valid_module_count:l.filter(d=>d.status==="pass").length,invalid_module_count:l.filter(d=>d.status!=="pass").length,logical_weight_element_count:fi(l,"logical_weight_element_count"),packed_weight_code_capacity:fi(l,"packed_weight_code_capacity"),logical_weight_bits:fi(l,"logical_weight_bits"),packed_weight_storage_bits:fi(l,"packed_weight_storage_bits"),packing_padding_bits:fi(l,"packing_padding_bits"),packing_conservation_status:l.every(d=>d.packing_conservation_status==="exact_no_padding")?"exact_no_padding":"invalid",scale_element_count:fi(l,"scale_element_count"),zero_point_code_capacity:fi(l,"zero_point_code_capacity"),packed_tensor_bytes:l.reduce((d,m)=>d+m.packed_tensor_bytes,0),source:p,source_files:Rf(r),modules:l,boundary:r==="gptq"?"This contract validates the classic INT32 qweight/qzeros/scales/g_idx state against the pinned GPTQModel layout. Other GPTQModel pack dtypes, planar formats, calibration quality, reconstructed weight accuracy, kernel selection, runtime support, and task quality are not inferred.":"This contract validates selected config ownership, packed tensor identities, dtypes, shapes, group cardinality, and code capacity against one pinned implementation layout. It does not establish calibration quality, reconstructed weight accuracy, kernel selection, runtime support, or task quality."}}function BF(e,t){let n=md.hqq,i=e.map(g=>({path:g.path,...MF(g.value)})),o=i.filter(g=>g.mode==="invalid").map(g=>g.path);if(o.length)return zf("not_assessed_hqq_quantization_config_invalid","HQQ quant_config does not contain a source-compatible static or module-tagged weight contract.",{source:n,source_files:Rf("hqq"),declaration_paths:e.map(g=>g.path),unsupported_paths:o});let a=bd(i.map(g=>JSON.stringify({mode:g.mode,static_config:g.static_config,dynamic_configs:g.dynamic_configs,skip_modules:g.skip_modules}))),r=a.length>1?[{field:"hqq_quant_config",values:a,paths:i.map(g=>g.path)}]:[],s=i[0],c=[];(s.mode==="static"?[s.static_config]:Object.values(s.dynamic_configs)).forEach(g=>$F(g,c));let l=PF(t),_=new Set(l.map(g=>SS(g.name)));if(s.mode==="dynamic")for(let g of Object.keys(s.dynamic_configs))_.has(g)||c.push(`dynamic_config_target_has_no_encoded_module:${g}`);let p=l.map(g=>{let h=SS(g.name),b=s.mode==="static"?s.static_config:s.dynamic_configs[h]||null,A=s.skip_modules.some(y=>g.name===y||g.name.endsWith(`.${y}`));return FF(g,b,{tag:h,excluded:A,ownership_mode:s.mode})});p.length||c.push("hqq_declaration_has_no_encoded_W_q_modules");let d=cl(p,"bits"),m=cl(p,"group_size"),f=cl(p,"logical_weight_axis");return MS({method:"hqq",declarations:i,conflicts:r,configIssues:c,modules:p,source:n,bits:d,groupSize:m,symmetric:null,zeroPoint:null,granularity:s.mode==="dynamic"?"module_scoped_per_group_weight":"per_group_weight",logicalGroupAxis:f,storageWordBits:d==null?null:Tf[d]?.storageBits??null,codesPerStorageWord:d==null?null:Tf[d]?.codes??null,extra:{configuration_scope:s.mode==="dynamic"?"source_bound_module_tag":"global_static",module_tag_rule:"Remove path components equal to model or layers and every numeric component, then join the remainder with dots.",configured_module_tag_count:s.mode==="dynamic"?Object.keys(s.dynamic_configs).length:null,shard_ownership:jS(p)},boundary:"This contract validates HQQ encoded SafeTensors metadata, module-tag ownership, source-defined grouping, packed shape, shard ownership, and bit capacity. It does not infer reconstructed values, calibration quality, runtime backend, or task quality."})}function DF(e,t){let n=md["compressed-tensors"],i=e.map(g=>({path:g.path,config:LF(g.value)})),o=i.filter(g=>!g.config).map(g=>g.path);if(o.length)return zf("not_assessed_compressed_tensors_config_invalid","compressed-tensors analysis requires a pack-quantized config_groups object with named targets.",{source:n,source_files:Rf("compressed-tensors"),declaration_paths:e.map(g=>g.path),unsupported_paths:o});let a=bd(i.map(g=>JSON.stringify(g.config))),r=a.length>1?[{field:"compressed_tensors_config",values:a,paths:i.map(g=>g.path)}]:[],s=i[0].config,c=[],u=TS(t).filter(g=>g.weight_packed).map(g=>{let h=BS(g.name,s);if(h.status!=="selected")return OS(g,[h.reason],h);let b=h.scheme.weights,A=qF(b);return A.length?OS(g,A,h,YA(g,h.scheme)):QF(g,b,h)});u.length||c.push("compressed_tensors_declaration_has_no_weight_packed_modules");let l=u.flatMap(g=>g.activation_contracts||[]),_=jF(TS(t),u,s),p=[...l,..._];for(let g of _)for(let h of g.issues||[])c.push(`${g.module_name}:${g.kind}:${h}`);let d=cl(u,"bits"),m=cl(u,"group_size"),f=cl(u,"symmetric");return MS({method:"compressed-tensors",declarations:i.map(g=>({path:g.path,...g.config})),conflicts:r,configIssues:c,modules:u,source:n,bits:d,groupSize:m,symmetric:f,zeroPoint:f==null?null:!f,granularity:"module_scoped_weight",logicalGroupAxis:1,storageWordBits:32,codesPerStorageWord:null,extra:{configuration_scope:"source_bound_target_precedence",target_precedence:["global ignore","exact module name","regex module name","module class name"],config_group_count:s.groups.length,activation_quantization_contracts:p,activation_quantization_contract_count:p.length,shard_ownership:jS(u,p),regex_contract:"Python re.match semantics are reproduced only for the explicitly accepted ASCII-compatible regex subset; unsupported constructs fail closed during config parsing."},boundary:"This contract applies the pinned compressed-tensors target and ignore precedence per packed Linear module, validates source-defined pack-quantized layout, original shape metadata, group scale cardinality, optional packed zero points, activation companion ownership, shard ownership, and exact INT32 storage padding. It does not infer dynamic activation values, unpacked weights, runtime kernels, or task quality."})}var Tf=Object.freeze({8:Object.freeze({name:"8bit_u8",dtype:"U8",storageBits:8,codes:1}),6:Object.freeze({name:"8bit_u8",dtype:"U8",storageBits:8,codes:1}),5:Object.freeze({name:"8bit_u8",dtype:"U8",storageBits:8,codes:1}),4:Object.freeze({name:"4bit_u8",dtype:"U8",storageBits:8,codes:2}),3:Object.freeze({name:"3bit_32",dtype:"I32",storageBits:32,codes:10}),2:Object.freeze({name:"2bit_u8",dtype:"U8",storageBits:8,codes:4}),1.58:Object.freeze({name:"2bit_u8",dtype:"U8",storageBits:8,codes:4}),1:Object.freeze({name:"1bit_u8",dtype:"U8",storageBits:8,codes:8})});function kS(e){let t=Xo(e?.weight_quant_params)?e.weight_quant_params:e;if(!Xo(t))return null;let n=tQ(t.nbits??t.bits),i=t.group_size==null?null:ul(t.group_size),o=ul(t.axis??1),a=Cs(t.view_as_float)??!1,r=Cs(t.channel_wise)??!0;return n==null||o==null?null:{bits:n,group_size:i,axis:o,view_as_float:a,channel_wise:r}}function MF(e){let t=Xo(e?.quant_config)?e.quant_config:e,n=Array.isArray(e?.skip_modules)?e.skip_modules.filter(a=>typeof a=="string"):[],i=kS(t);if(i)return{mode:"static",static_config:i,dynamic_configs:{},skip_modules:n};if(!Xo(t))return{mode:"invalid",static_config:null,dynamic_configs:{},skip_modules:n};let o={};for(let[a,r]of Object.entries(t)){let s=kS(r);if(!a||!s)return{mode:"invalid",static_config:null,dynamic_configs:{},skip_modules:n};o[a]=s}return Object.keys(o).length?{mode:"dynamic",static_config:null,dynamic_configs:o,skip_modules:n}:{mode:"invalid",static_config:null,dynamic_configs:{},skip_modules:n}}function $F(e,t){Tf[e.bits]||t.push("hqq_bits_not_source_registered"),e.group_size!=null&&(!Number.isSafeInteger(e.group_size)||e.group_size<1||e.group_size%8)&&t.push("hqq_group_size_must_be_null_or_positive_multiple_of_8"),[0,1].includes(e.axis)||t.push("hqq_axis_must_be_zero_or_one"),e.channel_wise!==!0&&t.push("hqq_encoded_group_contract_requires_channel_wise_true"),e.view_as_float===!0&&t.push("hqq_float_view_storage_not_supported_without_compute_dtype_contract")}function SS(e){return String(e||"").split(".").filter(t=>t!=="model"&&t!=="layers"&&!/^\d+$/.test(t)).join(".")}function kf(e){if(!Xo(e))return null;let t=e.group_size==null?null:ul(e.group_size),n=ks(e.strategy)??(t>0?"group":t===-1?"channel":"tensor");return{bits:ul(e.num_bits??8),group_size:t,symmetric:Cs(e.symmetric)??!0,strategy:n,type:ks(e.type||"int"),dynamic:Cs(e.dynamic)??!1,actorder:ks(e.actorder)}}function LF(e){let t=ks(e?.format);if(t!=="pack-quantized"||!Xo(e?.config_groups))return null;let n=[];for(let[o,a]of Object.entries(e.config_groups)){if(!Xo(a)||!Array.isArray(a.targets)||!a.targets.length||a.targets.some(r=>typeof r!="string"||!r))return null;for(let r of a.targets)if(r.startsWith("re:")&&!zS(r.slice(3)))return null;n.push({name:o,targets:[...a.targets],weights:a.weights==null?null:kf(a.weights),input_activations:a.input_activations==null?null:kf(a.input_activations),output_activations:a.output_activations==null?null:kf(a.output_activations)})}if(!n.length)return null;Xo(e.kv_cache_scheme)&&n.push({name:"kv_cache",targets:["re:.*self_attn$"],weights:null,input_activations:null,output_activations:kf(e.kv_cache_scheme),kv_cache:!0});let i=Array.isArray(e.ignore)?e.ignore.filter(o=>typeof o=="string"&&o):[];for(let o of i)if(o.startsWith("re:")&&!zS(o.slice(3)))return null;return{format:t,groups:n,ignore:i}}function PF(e){return DS(e,/^(.*)\.(W_q|scale|zero|shape|nbits|group_size|axis|packing|view_as_float)$/)}function TS(e){return DS(e,/^(.*)\.(weight_packed|weight_scale|weight_shape|weight_zero_point|weight_g_idx|input_scale|input_zero_point|output_scale|output_zero_point|k_scale|v_scale)$/)}function BS(e,t,n="Linear"){let i=XA(e,n,t.ignore);if(i.length)return{status:"ignored",reason:"packed_module_matches_global_ignore",matched_ignore_targets:i};let o=new Map;for(let l of t.groups)for(let _ of l.targets)o.set(_,l);let a=XA(e,n,[...o.keys()]);if(!a.length)return{status:"unmatched",reason:"packed_module_has_no_matching_config_target",matched_targets:[]};let r=a.map(l=>o.get(l)),c=r.filter(l=>!l.kv_cache)[0]||r[0],u=r.find(l=>l.kv_cache)||null;return!c.weights&&!u?{status:"unmatched",reason:"matching_config_target_has_no_weight_scheme",matched_targets:a}:u&&c!==u&&c.output_activations&&u.output_activations?{status:"conflict",reason:"kv_cache_and_module_scheme_both_define_output_activations",matched_targets:a}:{status:"selected",matched_targets:a,selected_group:c.name,target_precedence_match:a[0],scheme:u&&c!==u?{...c,output_activations:u.output_activations,kv_cache_merged:!0}:c}}function XA(e,t,n){let i=[...n||[]].sort((a,r)=>{let s=a.startsWith("re:")?1:0,c=r.startsWith("re:")?1:0;return s-c||a.localeCompare(r)}),o=a=>i.filter(r=>{if(r.startsWith("re:"))try{return new RegExp(r.slice(3)).exec(a)?.index===0}catch{return!1}return r===a});return[...o(e),...t?o(t):[]]}function zS(e){if(!e||!/^[\x20-\x7e]+$/.test(e)||/\(\?|\\[AZ]|\\[pP]|\\N\{|\\g</.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}function qF(e){let t=[];return e?((!Number.isSafeInteger(e.bits)||e.bits<1||e.bits>8)&&t.push("compressed_tensors_bits_must_be_between_1_and_8"),(!Number.isSafeInteger(e.group_size)||e.group_size<1)&&t.push("compressed_tensors_group_size_must_be_positive"),e.type!=="int"&&t.push("compressed_tensors_pack_quantized_weight_type_must_be_int"),e.strategy!=="group"&&t.push("compressed_tensors_pack_quantized_weight_strategy_must_be_group"),e.dynamic!==!1&&t.push("compressed_tensors_packed_weight_scheme_must_be_static"),t):["selected_config_group_has_no_weight_scheme"]}function YA(e,t){let n=[];for(let[i,o]of[["input",t?.input_activations],["output",t?.output_activations]]){if(!o)continue;let a=e[`${i}_scale`]||null,r=e[`${i}_zero_point`]||null,s=[],c=o.strategy==="token"?[1,1]:[1];o.dynamic?(a||r)&&s.push("dynamic_activation_contract_has_serialized_scale_or_zero_point"):(a?gi(a.shape||[],c)||s.push("static_activation_scale_shape_mismatch"):s.push("static_activation_scale_missing"),!o.symmetric&&!r&&s.push("asymmetric_static_activation_zero_point_missing"),r&&!gi(r.shape||[],c)&&s.push("static_activation_zero_point_shape_mismatch")),n.push({module_name:e.name,kind:`${i}_activation`,status:s.length?"fail":o.dynamic?"assessed_config_dynamic_runtime_values":"assessed_static_serialized_companions",issues:s,config:o,scale_tensor:a?ll(a):null,zero_point_tensor:r?ll(r):null,boundary:o.dynamic?"Scale and zero point are computed from runtime activation values and are not serialized numerical constants.":"Serialized companion identity and shape are validated; calibration quality and runtime quantization error are not inferred."})}return n}function jF(e,t,n){let i=new Set(t.map(a=>a.name)),o=[];for(let a of e.filter(r=>!i.has(r.name))){if(a.k_scale||a.v_scale){let s=n.groups.find(u=>u.kv_cache&&XA(a.name,null,u.targets).length),c=[];s||c.push("serialized_kv_scale_has_no_matching_kv_cache_scheme");for(let u of["k_scale","v_scale"])a[u]&&(gi(a[u].shape||[],[1])||c.push(`${u}_shape_must_be_scalar_cardinality_one`));o.push({module_name:a.name,kind:"kv_cache",status:c.length?"fail":"assessed_static_serialized_kv_scales",issues:c,config:s?.output_activations||null,k_scale_tensor:a.k_scale?ll(a.k_scale):null,v_scale_tensor:a.v_scale?ll(a.v_scale):null,boundary:"Serialized KV scale tensor identity and scalar cardinality are validated; cache allocation, runtime values, and attention execution are not inferred."});continue}let r=BS(a.name,n,null);r.status==="selected"&&o.push(...YA(a,r.scheme))}return o}function DS(e,t){let n=new Map;for(let i of e||[]){let o=String(i.name||"").match(t);o&&(n.has(o[1])||n.set(o[1],{name:o[1]}),n.get(o[1])[o[2]]=i)}return[...n.values()].sort((i,o)=>i.name.localeCompare(o.name))}function FF(e,t,n={}){let i=Of(e,["W_q","scale","zero","shape","nbits","group_size","axis","packing"]),o=ev(e.shape,"shape",i),a=Sf(e.nbits,"nbits",i),r=Sf(e.group_size,"group_size",i),s=Sf(e.axis,"axis",i),c=JF(e.packing,"packing",i),u=e.view_as_float?Sf(e.view_as_float,"view_as_float",i):0;o&&(o.length!==2||o.some(O=>!Number.isSafeInteger(O)||O<1))&&i.push("shape_metadata_must_be_positive_rank_two"),t||i.push("module_not_selected_by_hqq_dynamic_config"),n.excluded&&i.push("encoded_module_matches_hqq_skip_modules");let l=t&&o?t.group_size??(t.axis===1?o[1]:o[0]):t?.group_size??null;a!=null&&t&&a!==t.bits&&i.push("nbits_metadata_config_mismatch"),r!=null&&l!=null&&r!==l&&i.push("group_size_metadata_config_mismatch"),s!=null&&t&&s!==t.axis&&i.push("axis_metadata_config_mismatch"),(t?.view_as_float===!0||u!==0)&&i.push("view_as_float_metadata_not_supported");let _=a??t?.bits??null,p=s??t?.axis??null,d=r??l,m=Tf[_];c!=null&&c!==m?.name&&i.push("packing_metadata_source_layout_mismatch");let f=o?BigInt(o[0])*BigInt(o[1]):0n;(!Number.isSafeInteger(d)||d<1)&&i.push("effective_group_size_not_resolved"),[0,1].includes(p)||i.push("effective_axis_not_resolved"),m||i.push("effective_hqq_bits_not_source_registered"),f&&Number.isSafeInteger(d)&&f%BigInt(d)&&i.push("logical_weight_count_not_divisible_by_group_size");let g=f&&Number.isSafeInteger(d)&&f%BigInt(d)===0n?Number(f/BigInt(d)):null,h=g==null||![0,1].includes(p)?null:p===1?[g,d]:[d,g],b=h?p===1?[h[0],1]:[1,h[1]]:null,A=WA(e.scale,"scale",i),y=WA(e.zero,"zero",i);A&&b&&!gi(A,b)&&i.push("scale_shape_mismatch"),y&&b&&!gi(y,b)&&i.push("zero_shape_mismatch");let x=h&&m?Math.ceil(h[0]/m.codes):null,v=x==null?null:[x,h[1]],I=Ca(e.W_q,"W_q",m?.dtype||"unknown",i);I&&v&&!gi(I,v)&&i.push("W_q_shape_mismatch"),m&&m.codes!==10&&h&&h[0]%m.codes&&i.push("source_packer_requires_first_axis_divisible_by_pack_factor");let w=I&&m?hi(I)*BigInt(m.storageBits):0n,N=tv(f,_),S=w-N;return S<0n&&i.push("packed_storage_capacity_below_logical_bits"),m?.codes===10&&S>=BigInt(I?.[1]||0)*32n&&i.push("hqq_3bit_padding_exceeds_one_padded_pack_row"),JA(e,i,{input:o?.[1]??null,output:o?.[0]??null,groupSize:d,groups:g,bits:_,logical:f,physical:w,padding:S,packedCodeCapacity:I&&m?hi(I)*BigInt(m.codes):0n,scales:A?hi(A):0n,zeroes:y?hi(y):0n,storageBits:m?.storageBits??null,codesPerWord:m?.codes??null,packing:m?.name??null,tensors:["W_q","scale","zero","shape","nbits","group_size","axis","packing","view_as_float"],logicalAxis:p,storedGroupAxis:p,zeroStorage:"floating_affine_zero",payloadModule:{qweight:e.W_q,scales:e.scale,qzeros:e.zero},zeroMode:"finite_affine_value",zeroCodeCapacity:y?hi(y):0n,ownership:n})}function QF(e,t,n={}){let i=["weight_packed","weight_scale","weight_shape",...t.symmetric?[]:["weight_zero_point"],...t.actorder==="group"||t.actorder==="dynamic"?["weight_g_idx"]:[]],o=Of(e,i),a=YA(e,n.scheme);for(let h of a)for(let b of h.issues)o.push(`${h.kind}:${b}`);let r=Ca(e.weight_packed,"weight_packed","I32",o),s=WA(e.weight_scale,"weight_scale",o),c=ev(e.weight_shape,"weight_shape",o);e.weight_shape&&!["I64","I32"].includes(e.weight_shape.dtype)&&o.push("weight_shape_dtype_must_be_I64_or_I32"),c&&(c.length!==2||c.some(h=>!Number.isSafeInteger(h)||h<1))&&o.push("weight_shape_metadata_must_be_positive_rank_two");let u=c?.[0]??r?.[0]??null,l=c?.[1]??(s?s[1]*t.group_size:null),_=l!=null?Math.ceil(l/t.group_size):null;l!=null&&l%t.group_size&&o.push("input_features_not_divisible_by_group_size"),r&&u!=null&&l!=null&&!gi(r,[u,Math.ceil(l*t.bits/32)])&&o.push("weight_packed_shape_mismatch"),s&&u!=null&&_!=null&&!gi(s,[u,_])&&o.push("weight_scale_shape_mismatch"),c&&r&&r[0]!==c[0]&&o.push("weight_shape_output_mismatch");let p=0n;if(t.symmetric&&e.weight_zero_point&&o.push("weight_zero_point_present_for_symmetric_scheme"),!t.symmetric&&e.weight_zero_point){let h=Ca(e.weight_zero_point,"weight_zero_point","I32",o),b=u!=null&&_!=null?[Math.ceil(u*t.bits/32),_]:null;h&&b&&!gi(h,b)&&o.push("weight_zero_point_packed_shape_mismatch"),p=h?hi(h)*BigInt(Math.floor(32/t.bits)):0n}if(e.weight_g_idx){let h=qS(e.weight_g_idx,"weight_g_idx","I32",o);h&&l!=null&&h[0]!==l&&o.push("weight_g_idx_shape_mismatch")}let d=l!=null&&u!=null?BigInt(l)*BigInt(u):0n,m=tv(d,t.bits),f=r?hi(r)*32n:0n,g=f-m;return g<0n&&o.push("packed_storage_capacity_below_logical_bits"),u!=null&&g>=BigInt(u)*32n&&o.push("packed_storage_padding_exceeds_one_word_per_row"),JA(e,o,{input:l,output:u,groupSize:t.group_size,groups:_,bits:t.bits,logical:d,physical:f,padding:g,packedCodeCapacity:d,scales:s?hi(s):0n,zeroes:p,storageBits:32,codesPerWord:null,packing:"dense_cross_element_int32",tensors:["weight_packed","weight_scale","weight_shape","weight_zero_point","weight_g_idx"],logicalAxis:1,storedGroupAxis:1,zeroStorage:t.symmetric?"omitted_symmetric_zero":"packed_along_output_axis",payloadModule:{qweight:e.weight_packed,scales:e.weight_scale,qzeros:e.weight_zero_point,g_idx:e.weight_g_idx},zeroMode:t.symmetric?"absent":"packed_code",zeroCodeCapacity:p,symmetric:t.symmetric,ownership:n,activationContracts:a})}function OS(e,t,n={},i=[]){return JA(e,[...t],{input:null,output:null,groupSize:null,groups:null,bits:null,logical:0n,physical:0n,padding:0n,packedCodeCapacity:0n,scales:0n,zeroes:0n,storageBits:32,codesPerWord:null,packing:"not_assessed",tensors:["weight_packed","weight_scale","weight_shape","weight_zero_point","weight_g_idx","input_scale","input_zero_point","output_scale","output_zero_point"],logicalAxis:1,storedGroupAxis:1,zeroStorage:"not_assessed",symmetric:null,ownership:n,activationContracts:i})}function JA(e,t,n){let i=$S(n.payloadModule||{},n,t);return{name:e.name,status:t.length?"fail":"pass",issues:t,input_features:n.input,output_features:n.output,group_size:n.groupSize,group_count:n.groups,logical_weight_axis:n.logicalAxis,stored_group_axis:n.storedGroupAxis,bits:n.bits,storage_word_bits:n.storageBits,codes_per_storage_word:n.codesPerWord,symmetric:n.symmetric??null,packing_layout:n.packing,logical_weight_element_count:n.logical.toString(),packed_weight_code_capacity:n.packedCodeCapacity.toString(),logical_weight_bits:n.logicalBits?.toString?.()??tv(n.logical,n.bits).toString(),packed_weight_storage_bits:n.physical.toString(),packing_padding_bits:n.padding.toString(),packing_conservation_status:n.padding<0n?"invalid":n.padding===0n?"exact_no_padding":"exact_with_source_defined_padding",scale_element_count:n.scales.toString(),zero_point_code_capacity:n.zeroes.toString(),zero_point_storage_transform:n.zeroStorage,packed_tensor_bytes:n.tensors.filter(o=>e[o]).reduce((o,a)=>o+Number(e[a].byte_length||0),0),quantization_payload_integrity:i,tensors:Object.fromEntries(n.tensors.filter(o=>e[o]).map(o=>[o,ll(e[o])])),ownership:n.ownership||null,activation_contracts:n.activationContracts||[],shard_paths:bd(n.tensors.filter(o=>e[o]?.shard_path).map(o=>e[o].shard_path))}}function MS({method:e,declarations:t,conflicts:n,configIssues:i,modules:o,source:a,bits:r,groupSize:s,symmetric:c,zeroPoint:u,granularity:l,logicalGroupAxis:_,storageWordBits:p,codesPerStorageWord:d,boundary:m,extra:f={}}){let g=n.length+i.length+o.reduce((h,b)=>h+b.issues.length,0);return{schema:hd,status:g?"fail":"assessed",evidence_class:"OBSERVED/DERIVED_FROM_PINNED_FORMAT_SOURCE",method:e,bits:r,group_size:s,zero_point:u,symmetric:c,implementation_version:null,checkpoint_format:e==="compressed-tensors"?"pack-quantized":"encoded_state_dict",pack_word_bits:p,pack_factor:d,storage_word_bits:p,codes_per_storage_word:d,granularity:l,logical_group_axis:_,declaration_count:t.length,declarations:t,declaration_conflicts:n,config_issues:i,module_count:o.length,valid_module_count:o.filter(h=>h.status==="pass").length,invalid_module_count:o.filter(h=>h.status!=="pass").length,logical_weight_element_count:fi(o,"logical_weight_element_count"),packed_weight_code_capacity:fi(o,"packed_weight_code_capacity"),logical_weight_bits:fi(o,"logical_weight_bits"),packed_weight_storage_bits:fi(o,"packed_weight_storage_bits"),packing_padding_bits:fi(o,"packing_padding_bits"),packing_conservation_status:o.every(h=>h.packing_conservation_status==="exact_no_padding")?"exact_no_padding":o.every(h=>h.packing_conservation_status!=="invalid")?"exact_with_source_defined_padding":"invalid",scale_element_count:fi(o,"scale_element_count"),zero_point_code_capacity:fi(o,"zero_point_code_capacity"),packed_tensor_bytes:o.reduce((h,b)=>h+b.packed_tensor_bytes,0),source:a,source_files:Rf(e),modules:o,boundary:m,...f}}function UF(e,t){let n=[];Xo(e?.quantization_config)&&n.push({path:"config.json#/quantization_config",value:e.quantization_config});for(let i of["quant_config","quantize_config","quantization_config"]){let o=t?.[i];Xo(o?.document)&&n.push({path:o.path||`${i}.json`,value:o.document})}return n}function GF(e){let t=e.value;return{path:e.path,method:ks(t.quant_method),bits:ul(t.bits??t.w_bit),group_size:ul(t.group_size??t.q_group_size),zero_point:Cs(t.zero_point),sym:Cs(t.sym),version:ks(t.version),desc_act:Cs(t.desc_act),checkpoint_format:ks(t.checkpoint_format??t.format)}}function VF(e){let t=[];for(let n of RS){let i=bd(e.map(o=>o[n]).filter(o=>o!=null));i.length>1&&t.push({field:n,values:i,paths:e.filter(o=>o[n]!=null).map(o=>o.path)})}return t}function HF(e){let t={};for(let n of RS)t[n]=e.map(i=>i[n]).find(i=>i!=null)??null;return t}function KF(e,t){let n=[];return fd(t.bits)||n.push("bits_must_be_a_positive_divisor_of_32"),(!Number.isSafeInteger(t.group_size)||t.group_size===0||t.group_size<-1)&&n.push("group_size_must_be_positive_or_minus_one"),e==="awq"&&t.zero_point==null&&n.push("awq_zero_point_declaration_missing"),e==="awq"&&t.version&&t.version!=="gemm"&&n.push("only_source_pinned_awq_gemm_layout_is_assessed"),n}function ZF(e){let t=new Map;for(let n of e||[]){let i=String(n.name||"").match(/^(.*)\.(qweight|qzeros|scales|g_idx)$/);i&&(t.has(i[1])||t.set(i[1],{name:i[1]}),t.get(i[1])[i[2]]=n)}return[...t.values()].sort((n,i)=>n.name.localeCompare(i.name))}function XF(e,t){let n=Of(e,["qweight","scales",...t.zero_point===!1?[]:["qzeros"]]),i=fd(t.bits)?32/t.bits:null,o=Ca(e.qweight,"qweight","I32",n),a=Ca(e.scales,"scales","F16",n),r=e.qzeros?Ca(e.qzeros,"qzeros","I32",n):null;e.g_idx&&n.push("awq_gemm_layout_does_not_define_g_idx");let s=o?.[0]??null,c=o&&i?o[1]*i:null,u=FS(t.group_size,s),l=s!=null&&u?Math.ceil(s/u):null;return s!=null&&u&&s%u&&n.push("input_features_not_divisible_by_group_size"),a&&l!=null&&c!=null&&!gi(a,[l,c])&&n.push("scales_shape_mismatch"),r&&l!=null&&o&&!gi(r,[l,o[1]])&&n.push("qzeros_shape_mismatch"),t.zero_point===!1&&e.qzeros&&n.push("qzeros_present_while_zero_point_is_false"),LS(e,n,{input:s,output:c,groups:l,groupSize:u,pack:i,bits:t.bits,qweight:o,scales:a,qzeros:r,zeroStorage:"packed_unsigned_zero_code"})}function WF(e,t){let n=Of(e,["qweight","qzeros","scales","g_idx"]),i=fd(t.bits)?32/t.bits:null,o=Ca(e.qweight,"qweight","I32",n),a=Ca(e.scales,"scales","F16",n),r=Ca(e.qzeros,"qzeros","I32",n),s=qS(e.g_idx,"g_idx","I32",n),c=s?.[0]??(o&&i?o[0]*i:null),u=o?.[1]??null,l=FS(t.group_size,c),_=c!=null&&l?Math.ceil(c/l):null;return c!=null&&i&&c%i&&n.push("input_features_not_divisible_by_pack_factor"),u!=null&&i&&u%i&&n.push("output_features_not_divisible_by_pack_factor"),o&&c!=null&&u!=null&&i&&!gi(o,[c/i,u])&&n.push("qweight_shape_mismatch"),a&&_!=null&&u!=null&&!gi(a,[_,u])&&n.push("scales_shape_mismatch"),r&&_!=null&&u!=null&&i&&!gi(r,[_,u/i])&&n.push("qzeros_shape_mismatch"),LS(e,n,{input:c,output:u,groups:_,groupSize:l,pack:i,bits:t.bits,qweight:o,scales:a,qzeros:r,gIdx:s,zeroStorage:"packed_zero_code_minus_one"})}function YF(e){let t=e?.numerical_integrity;return e?t?.status!=="assessed_full_payload"?{status:"not_assessed_full_payload_unavailable"}:{status:"assessed_full_payload",payload_sha256:t.payload_sha256||null,value_count:t.value_count??null,finite_value_count:t.finite_value_count??null,nonfinite_value_count:Number(t.nan_value_count||0)+Number(t.positive_infinity_value_count||0)+Number(t.negative_infinity_value_count||0),minimum_finite:t.minimum_finite??t.minimum_finite_decimal??null,maximum_finite:t.maximum_finite??t.maximum_finite_decimal??null,distinct_finite_values:t.distinct_finite_values??null,distinct_value_status:t.distinct_value_status||null,semantic:t.quantization_metadata_integrity||null}:{status:"not_applicable_absent"}}function $S(e,t,n){let i=Object.fromEntries(["qweight","qzeros","scales","g_idx"].filter(c=>e[c]).map(c=>[c,YF(e[c])])),o=i.scales;o?.status==="assessed_full_payload"&&(o.nonfinite_value_count!==0||!(Number(o.minimum_finite)>0)||o.semantic?.role==="scale"&&o.semantic.nonpositive_scale_count!==0)&&n.push("scales_payload_must_be_finite_and_positive");let a=i.g_idx;if(a?.status==="assessed_full_payload"){let c=Number(a.minimum_finite),u=Number(a.maximum_finite);(a.nonfinite_value_count!==0||a.semantic?.integer_value_contract===!1||!Number.isSafeInteger(c)||c<0||!Number.isSafeInteger(u)||t.groups!=null&&u>=t.groups)&&n.push("g_idx_payload_outside_group_domain"),t.groups!=null&&Number.isSafeInteger(a.distinct_finite_values)&&a.distinct_finite_values!==t.groups&&n.push("g_idx_group_cardinality_mismatch")}let r=i.qzeros,s=t.zeroMode||(r?"packed_code":"absent");if(r?.status==="assessed_full_payload"&&s==="finite_affine_value"&&r.nonfinite_value_count!==0&&n.push("zero_payload_must_be_finite"),r?.status==="assessed_full_payload"&&s==="packed_code"&&t.bits){let c=r.semantic?.packed_lane_profiles?.find(_=>_.bits===t.bits),u=t.zeroCodeCapacity??(t.qzeros&&t.pack?hi(t.qzeros)*BigInt(t.pack):null),l=typeof u=="bigint"&&u<=BigInt(Number.MAX_SAFE_INTEGER)?Number(u):null;!c||l==null||c.lane_count!==l?n.push("qzeros_packed_lane_cardinality_mismatch"):r.selected_packed_lane_profile=c}return{schema:"deepbom.safetensors.quantization_payload_integrity.v1",zero_point_payload_mode:s,status:Object.values(i).some(c=>c.status==="not_assessed_full_payload_unavailable")?"partial":n.some(c=>/payload|g_idx_group|qzeros_packed/.test(c))?"fail":"assessed",tensors:i}}function LS(e,t,n){let i=n.input!=null&&n.output!=null?BigInt(n.input)*BigInt(n.output):0n,o=n.qweight&&n.pack?hi(n.qweight)*BigInt(n.pack):0n,a=n.scales?hi(n.scales):0n,r=n.qzeros&&n.pack?hi(n.qzeros)*BigInt(n.pack):0n,s=$S(e,{...n,zeroMode:e.qzeros?"packed_code":"absent",zeroCodeCapacity:r},t);return{name:e.name,status:t.length?"fail":"pass",issues:t,input_features:n.input,output_features:n.output,bits:n.bits,group_size:n.groupSize,group_count:n.groups,logical_weight_axis:1,stored_group_axis:0,logical_weight_element_count:i.toString(),packed_weight_code_capacity:o.toString(),logical_weight_bits:(i*BigInt(n.bits||0)).toString(),packed_weight_storage_bits:n.qweight?(hi(n.qweight)*32n).toString():"0",packing_padding_bits:n.qweight?(hi(n.qweight)*32n-i*BigInt(n.bits||0)).toString():"0",packing_conservation_status:o===i?"exact_no_padding":"invalid",scale_element_count:a.toString(),zero_point_code_capacity:r.toString(),zero_point_storage_transform:n.zeroStorage,packed_tensor_bytes:[e.qweight,e.qzeros,e.scales,e.g_idx].filter(Boolean).reduce((c,u)=>c+Number(u.byte_length||0),0),quantization_payload_integrity:s,tensors:Object.fromEntries(["qweight","qzeros","scales","g_idx"].filter(c=>e[c]).map(c=>[c,ll(e[c])]))}}function Of(e,t){return t.filter(n=>!e[n]).map(n=>`missing_${n}`)}function Rf(e){return[md[e],...RF[e]||[]].map(n=>({...n}))}function PS(e,t,n){if(!e)return null;let i=e.numerical_integrity||{};return!String(i.decoded_values_status||"").startsWith("complete_")||!Array.isArray(i.decoded_values)?(n.push(`${t}_small_value_payload_not_decoded`),null):i.decoded_values}function ev(e,t,n){let i=PS(e,t,n);if(!i)return null;let o=i.map(eQ);return o.some(a=>a==null)?(n.push(`${t}_contains_non_integer_metadata`),null):o}function Sf(e,t,n){let i=PS(e,t,n);if(!i)return null;if(i.length!==1)return n.push(`${t}_metadata_must_be_scalar`),null;let o=Number(i[0]);return Number.isFinite(o)?o:(n.push(`${t}_metadata_must_be_finite`),null)}function JF(e,t,n){let i=ev(e,t,n);return i?e.dtype!=="U8"||i.some(o=>o<0||o>127)?(n.push(`${t}_metadata_must_be_ascii_U8`),null):String.fromCharCode(...i):null}function eQ(e){try{let t=BigInt(String(e));return t>=BigInt(Number.MIN_SAFE_INTEGER)&&t<=BigInt(Number.MAX_SAFE_INTEGER)?Number(t):null}catch{return null}}function WA(e,t,n){return e?(["F16","BF16","F32","F64"].includes(e.dtype)||n.push(`${t}_dtype_${e.dtype||"unknown"}_expected_floating`),!Array.isArray(e.shape)||e.shape.length!==2||e.shape.some(i=>!Number.isSafeInteger(i)||i<1)?(n.push(`${t}_must_have_positive_rank_two_shape`),null):e.shape):null}function Ca(e,t,n,i){return e?(e.dtype!==n&&i.push(`${t}_dtype_${e.dtype||"unknown"}_expected_${n}`),!Array.isArray(e.shape)||e.shape.length!==2||e.shape.some(o=>!Number.isSafeInteger(o)||o<1)?(i.push(`${t}_must_have_positive_rank_two_shape`),null):e.shape):null}function qS(e,t,n,i){return e?(e.dtype!==n&&i.push(`${t}_dtype_${e.dtype||"unknown"}_expected_${n}`),!Array.isArray(e.shape)||e.shape.length!==1||!Number.isSafeInteger(e.shape[0])||e.shape[0]<1?(i.push(`${t}_must_have_positive_rank_one_shape`),null):e.shape):null}function ll(e){return{tensor_index:e.index??null,tensor_name:e.name,dtype:e.dtype,shape:e.shape,byte_length:Number(e.byte_length||0),shard_path:e.shard_path||null}}function cl(e,t){let n=[...new Map((e||[]).map(i=>i[t]).filter(i=>i!=null).map(i=>[JSON.stringify(i),i])).values()];return n.length===1?n[0]:null}function jS(e,t=[]){let n=[];for(let o of e||[])for(let[a,r]of Object.entries(o.tensors||{}))n.push({module_name:o.name,tensor_role:a,tensor_name:r.tensor_name,shard_path:r.shard_path||null});for(let o of t||[])for(let a of["scale_tensor","zero_point_tensor","k_scale_tensor","v_scale_tensor"]){let r=o[a];r&&n.push({module_name:o.module_name,tensor_role:`${o.kind}:${a}`,tensor_name:r.tensor_name,shard_path:r.shard_path||null})}let i=[...new Map(n.map(o=>[`${o.module_name}\0${o.tensor_role}\0${o.tensor_name}`,o])).values()];return{status:i.some(o=>o.shard_path)?i.every(o=>o.shard_path)?"assessed_all_quantization_tensors_shard_bound":"fail_partial_shard_ownership":"not_applicable_single_file_or_unannotated_input",tensor_count:i.length,shard_bound_tensor_count:i.filter(o=>o.shard_path).length,rows:i}}function zf(e,t,n={}){return{schema:hd,status:e,evidence_class:"NOT_ASSESSED",reason:t,...n}}function FS(e,t){return e===-1?t:e}function fd(e){return Number.isSafeInteger(e)&&e>0&&e<=32&&32%e===0}function tQ(e){let t=Number(e);return Number.isFinite(t)?t:null}function tv(e,t){return t===1.58?e*2n:Number.isSafeInteger(t)?e*BigInt(t):0n}function Xo(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ul(e){return e==null||e===""||!Number.isSafeInteger(Number(e))?null:Number(e)}function Cs(e){return typeof e=="boolean"?e:null}function ks(e){return typeof e=="string"&&e.trim()?e.trim().toLowerCase():null}function bd(e){return[...new Set(e.map(t=>typeof t=="string"?t:JSON.stringify(t)))].map(t=>t==="true"?!0:t==="false"?!1:/^-?\d+$/.test(t)?Number(t):t)}function gi(e,t){return e.length===t.length&&e.every((n,i)=>n===t[i])}function hi(e){return e.reduce((t,n)=>t*BigInt(n),1n)}function fi(e,t){return e.reduce((n,i)=>n+BigInt(i[t]||0),0n).toString()}Ce();function bi(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer`);return BigInt(e)}function nQ(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}function cn(e){return{value:nQ(e),decimal:String(e)}}function _l({layerCount:e,kvHeadCount:t,keyHeadWidth:n,valueHeadWidth:i,contextLength:o,storageBits:a=null}){let r=bi(e,"layer count"),s=bi(t,"KV head count"),c=bi(n,"key head width"),u=bi(i,"value head width"),l=bi(o,"context length");if(a!=null&&(!Number.isSafeInteger(a)||a<=0||a%8!==0))throw new Error("KV storage width must be a positive whole-byte bit width");let _=r*s*(c+u),p=_*l,d=a==null?null:_*BigInt(a/8),m=d==null?null:d*l;return{schema:"deepbom.transformer_kv_state_projection.v1",status:"assessed_element_cardinality",evidence_class:"OBSERVED/SOURCE_PINNED/DERIVED",layer_count:Number(r),kv_head_count:Number(s),key_head_width:Number(c),value_head_width:Number(u),context_length:Number(l),elements_per_token_per_batch:cn(_),elements_at_context_batch_one:cn(p),conditional_storage_bits:a,bytes_per_token_per_batch_if_storage_width_matches:d==null?null:cn(d),bytes_at_context_batch_one_if_storage_width_matches:m==null?null:cn(m),formula:"layers * kv_heads * (key_head_width + value_head_width) elements per token per batch",boundary:"Element cardinality follows the declared attention-state dimensions. Byte values apply only when the runtime cache uses the supplied storage width and exclude allocator layout, paging, alignment, residency, and backend-private state."}}function QS({vocabularySize:e,hiddenSize:t,intermediateSize:n,layerCount:i,attentionHeadCount:o,kvHeadCount:a,headWidth:r,contextLength:s,mlpProjectionMatrixCount:c,schema:u,mlpField:l,mlpLabel:_}){let p=bi(e,"vocabulary size"),d=bi(t,"hidden size"),m=bi(n,"intermediate size"),f=bi(i,"layer count"),g=bi(o,"attention head count");bi(a,"KV head count");let h=bi(r,"attention head width"),b=bi(s,"context length"),A=bi(c,"MLP projection matrix count"),y=g*h,x=BigInt(a)*h,v=d*y*2n+d*x*2n,I=d*m*A,w=v+I,N=w*f,S=b*(b+1n)/2n,O=y*S*2n*f,B=y*b*2n*f,k=N*b,D=k+O,q=N+B,L=d*p,F={schema:u,status:"assessed_declared_all_global_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",query_projection_width:cn(y),kv_projection_width:cn(x),attention_projection_macs_per_layer_per_token:cn(v),mlp_projection_matrix_count:Number(A),dense_projection_macs_per_layer_per_token:cn(w),dense_projection_macs_all_layers_per_token:cn(N),declared_context_causal_attention_pair_count:cn(S),prefill_attention_macs_all_layers_at_declared_context:cn(O),decode_attention_macs_all_layers_at_declared_context:cn(B),prefill_dense_projection_macs_all_layers_at_declared_context:cn(k),prefill_transformer_core_macs_at_declared_context:cn(D),decode_transformer_core_macs_at_declared_context:cn(q),output_projection_macs_per_logit_position:cn(L),prefill_with_logits_at_every_position_macs:cn(D+L*b),decode_with_one_logit_position_macs:cn(q+L),mac_definition:`One matrix multiply-accumulate is one MAC. Dense projection terms include Q/K/V/O and ${Number(A)} ${_} MLP matrices. Attention terms include QK and probability-value products over an all-global causal scenario.`,boundary:"This is a source-bound architecture scenario, not a reconstructed execution DAG or runtime count. It excludes embedding lookup, normalization, RoPE, activation, softmax, masking, bias, cache movement, local/sliding attention reductions, sparsity, fusion, and backend lowering. The all-global prefill row is an explicit scenario and may exceed models with local or sliding attention."};return F[l]=cn(I),F}function US(e){return QS({...e,schema:"deepbom.canonical_decoder_compute_projection.v1",mlpField:"mlp_projection_macs_per_layer_per_token",mlpLabel:"declared"})}function dl(e){return QS({...e,mlpProjectionMatrixCount:3,schema:"deepbom.canonical_gated_decoder_compute_projection.v1",mlpField:"gated_mlp_projection_macs_per_layer_per_token",mlpLabel:"gated"})}nf();nf();var ov=1024*1024,iv=100*ov,nv=64*ov,$f=["UINT8","INT8","UINT16","INT16","UINT32","INT32","FLOAT32","BOOL","STRING","ARRAY","UINT64","INT64","FLOAT64"];var iQ=Object.freeze({F4:4,F6_E2M3:6,F6_E3M2:6,BOOL:8,U8:8,I8:8,F8_E4M3:8,F8_E5M2:8,F8_E8M0:8,F8_E4M3FNUZ:8,F8_E5M2FNUZ:8,U16:16,I16:16,F16:16,BF16:16,U32:32,I32:32,F32:32,U64:64,I64:64,F64:64,C64:64}),oQ=Object.freeze({repository:"ggml-org/llama.cpp",source_commit:"7bd8282c37fcd9c4d7236106d664761a23318f18",type_traits_source:"ggml/src/ggml.c",type_traits_source_sha256:"9e40ad07323c7925f06a105119dfb07c1d4a21d3263a9e9bd0bd21792c42e1e4",block_layout_source:"ggml/src/ggml-common.h",block_layout_source_sha256:"af255601767325f087313fa84b9435cb77aeec37df6b61b98d9ecc65f29fb4a0"}),aQ=Object.freeze({0:{name:"F32",block_elements:1,block_bytes:4},1:{name:"F16",block_elements:1,block_bytes:2},2:{name:"Q4_0",block_elements:32,block_bytes:18},3:{name:"Q4_1",block_elements:32,block_bytes:20},6:{name:"Q5_0",block_elements:32,block_bytes:22},7:{name:"Q5_1",block_elements:32,block_bytes:24},8:{name:"Q8_0",block_elements:32,block_bytes:34},9:{name:"Q8_1",block_elements:32,block_bytes:36},10:{name:"Q2_K",block_elements:256,block_bytes:84},11:{name:"Q3_K",block_elements:256,block_bytes:110},12:{name:"Q4_K",block_elements:256,block_bytes:144},13:{name:"Q5_K",block_elements:256,block_bytes:176},14:{name:"Q6_K",block_elements:256,block_bytes:210},15:{name:"Q8_K",block_elements:256,block_bytes:292},16:{name:"IQ2_XXS",block_elements:256,block_bytes:66},17:{name:"IQ2_XS",block_elements:256,block_bytes:74},18:{name:"IQ3_XXS",block_elements:256,block_bytes:98},19:{name:"IQ1_S",block_elements:256,block_bytes:50},20:{name:"IQ4_NL",block_elements:32,block_bytes:18},21:{name:"IQ3_S",block_elements:256,block_bytes:110},22:{name:"IQ2_S",block_elements:256,block_bytes:82},23:{name:"IQ4_XS",block_elements:256,block_bytes:136},24:{name:"I8",block_elements:1,block_bytes:1},25:{name:"I16",block_elements:1,block_bytes:2},26:{name:"I32",block_elements:1,block_bytes:4},27:{name:"I64",block_elements:1,block_bytes:8},28:{name:"F64",block_elements:1,block_bytes:8},29:{name:"IQ1_M",block_elements:256,block_bytes:56},30:{name:"BF16",block_elements:1,block_bytes:2},34:{name:"TQ1_0",block_elements:256,block_bytes:54},35:{name:"TQ2_0",block_elements:256,block_bytes:66},39:{name:"MXFP4",block_elements:32,block_bytes:17},40:{name:"NVFP4",block_elements:64,block_bytes:36},41:{name:"Q1_0",block_elements:128,block_bytes:18},42:{name:"Q2_0",block_elements:64,block_bytes:18}}),rQ=new Set(["llama","mistral","qwen2","qwen3","gemma","gemma2"]);function GS(e){return rQ.has(e)}var Ss=class extends Error{constructor(t){super(`metadata header requires at least ${t} bytes`),this.requiredBytes=t}};function KS(e,t){try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{throw new Error(`${t} is not valid UTF-8`)}}var yd=class{constructor(t,n=!0){this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.offset=0,this.littleEndian=n}need(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("invalid read length");if(this.offset+t>this.bytes.length)throw new Ss(this.offset+t)}u8(){return this.need(1),this.bytes[this.offset++]}i8(){return this.need(1),this.view.getInt8(this.offset++)}u16(){this.need(2);let t=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}i16(){this.need(2);let t=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}u32(){this.need(4);let t=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}i32(){this.need(4);let t=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}f32(){this.need(4);let t=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}f64(){this.need(8);let t=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}u64(t=`Unsigned integer at byte ${this.offset}`){return this.safeInteger(this.big64(!1),t)}i64(t=`Signed integer at byte ${this.offset}`){return this.safeInteger(this.big64(!0),t)}big64(t){this.need(8);let n=t?this.view.getBigInt64(this.offset,this.littleEndian):this.view.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}safeInteger(t,n){if(t>BigInt(Number.MAX_SAFE_INTEGER)||t<BigInt(Number.MIN_SAFE_INTEGER))throw new Error(`${n} is ${t}; supported exact range is ${Number.MIN_SAFE_INTEGER} to ${Number.MAX_SAFE_INTEGER}.`);return Number(t)}string(t=65535){let n=this.u64();if(n>t)throw new Error(`string length ${n} exceeds ${t}`);this.need(n);let i=KS(this.bytes.subarray(this.offset,this.offset+n),"metadata string");return this.offset+=n,i}};function ZS(e,t,n=0){if(n>4)throw new Error("GGUF metadata array nesting exceeds 4");switch(t){case 0:return e.u8();case 1:return e.i8();case 2:return e.u16();case 3:return e.i16();case 4:return e.u32();case 5:return e.i32();case 6:return e.f32();case 7:{let i=e.u8();if(i>1)throw new Error(`invalid GGUF boolean ${i}`);return!!i}case 8:return e.string(Number.MAX_SAFE_INTEGER);case 9:{let i=e.u32();if(!$f[i])throw new Error(`unknown GGUF array value type ${i}`);let o=e.u64();if(o>1e7)throw new Error(`GGUF metadata array count ${o} exceeds safety limit`);let a=[];for(let r=0;r<o;r+=1){let s=ZS(e,i,n+1);r<8&&a.push(s)}return{kind:"array",element_type:$f[i],count:o,sample:a}}case 10:return e.u64();case 11:return e.i64();case 12:return e.f64();default:throw new Error(`unknown GGUF metadata value type ${t}`)}}function sQ(e,t){let n=aQ[t];if(!n)return{status:"unsupported_type",traits:null,byteLength:null};let i=BigInt(e[0]??1),o=BigInt(n.block_elements);if(i%o!==0n)return{status:"invalid_row_cardinality",traits:n,byteLength:null};let a=e.slice(1).reduce((s,c)=>s*BigInt(c),1n),r=i/o*BigInt(n.block_bytes)*a;if(r>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("GGUF tensor storage exceeds JavaScript exact integer range");return{status:"assessed",traits:n,byteLength:Number(r)}}function cQ(e){return(e||[]).reduce((t,n)=>t*BigInt(n),1n)}function Bf(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}function VS(e,t,n=6){if(t===0n)return null;let i=10n**BigInt(n),o=(e*i*2n/t+1n)/2n,a=o/i,r=String(o%i).padStart(n,"0").replace(/0+$/,"");return r?`${a}.${r}`:String(a)}function lQ(e,t){let n=new Map((t?.tensor_records||[]).map(o=>[o.tensor_index,o])),i=new Map;for(let o of e){let a=n.get(o.index);if(a?.status!=="assessed_full_payload"||!a.payload_sha256)continue;let r=`${o.dtype}\0${JSON.stringify(o.shape||[])}\0${o.byte_length}\0${a.payload_sha256}`;i.has(r)||i.set(r,[]),i.get(r).push(o)}return[...i.values()].filter(o=>o.length>1).map(o=>({dtype:o[0].dtype,shape:[...o[0].shape||[]],byte_length_each:Number(o[0].byte_length||0),tensor_count:o.length,duplicate_bytes_after_first:Number(o[0].byte_length||0)*(o.length-1),payload_sha256:n.get(o[0].index).payload_sha256,tensor_indices:o.map(a=>a.index),tensor_names:o.map(a=>a.name),interpretation:"Content-addressed duplicate candidate: identical dtype, shape, byte length, and payload SHA-256. Runtime aliasing or semantic weight tying is not inferred."})).sort((o,a)=>a.duplicate_bytes_after_first-o.duplicate_bytes_after_first||o.tensor_names[0].localeCompare(a.tensor_names[0]))}function Lf(e,t,n=null){let i=new Map,o=0n,a=0n,r=0;for(let l of t||[]){let _=cQ(l.shape),p=Number.isSafeInteger(l.byte_length)&&l.byte_length>=0,d=BigInt(p?l.byte_length:0);p||(r+=1),o+=_,a+=d;let m=String(l.dtype||"UNKNOWN"),f=i.get(m)||{dtype:m,tensor_count:0,element_count:0n,byte_length:0n,unknown_byte_length_tensor_count:0};f.tensor_count+=1,f.element_count+=_,f.byte_length+=d,p||(f.unknown_byte_length_tensor_count+=1),i.set(m,f)}let s=lQ(t||[],n),c=s.reduce((l,_)=>l+_.duplicate_bytes_after_first,0),u=[...i.values()].map(l=>({dtype:l.dtype,tensor_count:l.tensor_count,element_count:Bf(l.element_count),element_count_decimal:String(l.element_count),byte_length:Bf(l.byte_length),byte_length_decimal:String(l.byte_length),unknown_byte_length_tensor_count:l.unknown_byte_length_tensor_count,effective_bits_per_element:l.unknown_byte_length_tensor_count?null:VS(l.byte_length*8n,l.element_count)})).sort((l,_)=>{let p=BigInt(l.byte_length_decimal),d=BigInt(_.byte_length_decimal);return p===d?l.dtype.localeCompare(_.dtype):p>d?-1:1});return{schema:"deepbom.tensor_storage_summary.v1",status:r?"partial_unknown_serialized_byte_cardinality":"assessed",evidence_class:"OBSERVED/DERIVED",format:e,tensor_count:(t||[]).length,element_count:Bf(o),element_count_decimal:String(o),byte_length:Bf(a),byte_length_decimal:String(a),unknown_byte_length_tensor_count:r,effective_bits_per_element:r?null:VS(a*8n,o),encoding_count:u.length,encodings:u,content_addressed_duplicate_group_count:s.length,content_addressed_duplicate_tensor_count:s.reduce((l,_)=>l+_.tensor_count,0),content_addressed_duplicate_bytes_after_first:c,duplicate_groups:s,duplicate_method:"Group only full-payload records with identical dtype, shape, byte length, and SHA-256; no payload rescan and no semantic alias claim."}}function Df(e,t){let n=e.find(i=>i.key===t);return n?.value?.kind==="array"?n.value:null}function uQ(e,t,n){let i=typeof t["general.architecture"]=="string"?t["general.architecture"]:null,o=[],a={},r=P=>{if(!i)return null;let X=`${i}.${P}`;if(!Object.hasOwn(t,X))return null;let j=t[X];return a[P]=j,(!Number.isSafeInteger(j)||j<=0)&&o.push({code:"GGUF_ARCHITECTURE_INTEGER_INVALID",key:X,value:j}),Number.isSafeInteger(j)&&j>0?j:null},s=P=>{if(!i)return null;let X=`${i}.${P}`;if(!Object.hasOwn(t,X))return null;let j=t[X];return a[P]=j,(!Number.isFinite(j)||j<=0)&&o.push({code:"GGUF_ARCHITECTURE_NUMBER_INVALID",key:X,value:j}),Number.isFinite(j)&&j>0?j:null},c=P=>{if(!i)return null;let X=`${i}.${P}`;if(!Object.hasOwn(t,X))return null;let j=t[X];return a[P]=j,(typeof j!="string"||!j.trim())&&o.push({code:"GGUF_ARCHITECTURE_STRING_INVALID",key:X,value:j}),typeof j=="string"&&j.trim()?j.trim():null},u=r("context_length"),l=r("embedding_length"),_=r("block_count"),p=r("feed_forward_length"),d=r("attention.head_count"),m=r("attention.head_count_kv"),f=r("attention.key_length"),g=r("attention.value_length"),h=r("rope.dimension_count"),b=s("rope.freq_base"),A=c("rope.scaling.type"),y=s("rope.scaling.factor");l&&d&&l%d!==0&&o.push({code:"GGUF_ATTENTION_HEAD_WIDTH_NONINTEGRAL",embedding_length:l,head_count:d}),d&&m&&d%m!==0&&o.push({code:"GGUF_ATTENTION_GQA_GROUP_NONINTEGRAL",head_count:d,head_count_kv:m});let x=Df(e,"tokenizer.ggml.tokens"),v=Df(e,"tokenizer.ggml.scores"),I=Df(e,"tokenizer.ggml.token_type");x&&v&&x.count!==v.count&&o.push({code:"GGUF_TOKENIZER_SCORE_CARDINALITY_MISMATCH",token_count:x.count,score_count:v.count}),x&&I&&x.count!==I.count&&o.push({code:"GGUF_TOKENIZER_TYPE_CARDINALITY_MISMATCH",token_count:x.count,token_type_count:I.count});let w=e.filter(P=>/^tokenizer\.ggml\..+_token_id$/.test(P.key)&&P.value?.kind!=="array").map(P=>({key:P.key,value:P.value,in_vocabulary:Number.isSafeInteger(P.value)&&P.value>=0&&(!x||P.value<x.count)}));for(let P of w)P.in_vocabulary||o.push({code:"GGUF_SPECIAL_TOKEN_ID_OUT_OF_RANGE",key:P.key,value:P.value,vocabulary_count:x?.count??null});let N=Object.keys(a).length+(x?1:0)+(v?1:0)+(I?1:0)+w.length,S=typeof t["tokenizer.chat_template"]=="string"&&t["tokenizer.chat_template"].length?t["tokenizer.chat_template"]:null,O=l&&d&&l%d===0?l/d:null,B=f||O,k=g||O,D=_&&m&&B&&k&&u?_l({layerCount:_,kvHeadCount:m,keyHeadWidth:B,valueHeadWidth:k,contextLength:u}):null,q=x?.count??null,F=GS(i)&&q&&l&&p&&_&&d&&m&&B&&B===k&&u?dl({vocabularySize:q,hiddenSize:l,intermediateSize:p,layerCount:_,attentionHeadCount:d,kvHeadCount:m,headWidth:B,contextLength:u}):null;return{schema:"deepbom.gguf_semantic_contract.v1",status:o.length?"invalid":N?"assessed":"not_declared",evidence_class:"OBSERVED/DERIVED",architecture:i,architecture_fields:a,context_length:u,embedding_length:l,block_count:_,feed_forward_length:p,attention_head_count:d,attention_head_count_kv:m,attention_key_length:f,attention_value_length:g,derived_attention_head_width:O,derived_gqa_query_heads_per_kv_head:d&&m&&d%m===0?d/m:null,position_encoding:{status:h||b||A||y?"declared":"not_declared",rope_dimension_count:h,rope_frequency_base:b,rope_scaling_type:A,rope_scaling_factor:y},kv_state_projection:D,compute_projection:F,compute_projection_status:F?"assessed_registered_canonical_decoder_scenario":GS(i)?"not_assessed_incomplete_or_nonuniform_attention_metadata":"not_assessed_architecture_not_registered_for_canonical_decoder_projection",tokenizer:{status:x||w.length?o.some(P=>P.code.startsWith("GGUF_TOKENIZER")||P.code.startsWith("GGUF_SPECIAL"))?"invalid":"assessed":"not_declared",model:t["tokenizer.ggml.model"]||null,vocabulary_count:q,score_count:v?.count??null,token_type_count:I?.count??null,merge_count:Df(e,"tokenizer.ggml.merges")?.count??null,special_token_count:w.length,special_tokens:w,chat_template:S?{status:"embedded_in_gguf",sha256:K(S),utf8_byte_length:new TextEncoder().encode(S).length}:{status:"not_declared"},complete_array_values_retained:!1,array_evidence:"Full array cardinalities are parsed; only bounded previews are retained in browser memory."},serialized_tensor_count:n.length,assessed_field_count:N,issue_count:o.length,issues:o,boundary:"Internal metadata consistency, declared attention-state cardinality, and an explicit canonical decoder compute scenario where registered only; an execution DAG, architecture implementation, tokenizer behavior, cache storage dtype/layout, backend support, and runtime allocation are not inferred."}}function _Q(e,t,n){if(e.length<24)throw new Ss(24);if(String.fromCharCode(...e.subarray(0,4))!=="GGUF")throw new Error("invalid GGUF magic");let i=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(4,!0),o=i===2||i===3,a=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(4,!1),r=o?i:a;if(r!==2&&r!==3)throw new Error(`unsupported GGUF version ${r}`);if(!o&&r!==3)throw new Error("big-endian GGUF requires format version 3");let s=new yd(e,o);s.offset=8;let c=s.u64(),u=s.u64();if(c>1e7||u>1e6)throw new Error("GGUF header count exceeds safety limit");let l=[],_={},p=0;for(let P=0;P<u;P+=1){let X=s.string();/^[a-z0-9_]+(?:\.[a-z0-9_]+)*$/.test(X)||(p+=1);let j=s.u32();if(!$f[j])throw new Error(`unknown GGUF metadata value type ${j}`);let J=ZS(s,j),W=(J?.kind==="array",J);l.push({key:X,type:$f[j],value:W}),J?.kind!=="array"&&typeof J!="object"&&(_[X]=J)}let d=Object.hasOwn(_,"general.alignment")?_["general.alignment"]:void 0;if(d!==void 0&&typeof d!="number")throw new Error(`GGUF general.alignment must be a numeric metadata value, received ${typeof d}`);let m=d===void 0?32:d;if(!Number.isInteger(m)||m<=0||m>ov||(m&m-1)!==0)throw new Error(`invalid GGUF alignment ${m}`);let f=[],g=0;for(let P=0;P<c;P+=1){let X=s.string(64),j=s.u32();if(j>16)throw new Error(`GGUF tensor rank ${j} exceeds safety limit`);let J=Array.from({length:j},()=>s.u64()),W=s.u32(),se=s.u64();se%m!==0&&(g+=1);let Y=sQ(J,W);f.push({index:P,name:X,shape:J,dtype:Y.traits?.name||`GGML_TYPE_${W}`,ggml_type:W,data_offset:se,data_end:Y.byteLength==null?null:se+Y.byteLength,byte_length:Y.byteLength,block_elements:Y.traits?.block_elements||null,block_bytes:Y.traits?.block_bytes||null,storage_status:Y.status})}let h=Math.ceil(s.offset/m)*m;if(h>n)throw new Error("GGUF tensor data offset exceeds file size");let b=n-h,A=0,y=0,x=0;for(let P of f)P.storage_status==="unsupported_type"?A+=1:P.storage_status==="invalid_row_cardinality"&&(y+=1),(P.data_offset>b||P.data_end!=null&&P.data_end>b)&&(g+=1,x+=1);let v=f.filter(P=>P.data_end!=null).sort((P,X)=>P.data_offset-X.data_offset||P.data_end-X.data_end||P.index-X.index),I=0,w=0,N=0;for(let P of v)P.data_offset<I?N+=1:w+=P.data_offset-I,I=Math.max(I,P.data_end);let S=Math.max(0,b-I);w+=S;let O=f.reduce((P,X)=>P+Number(X.byte_length||0),0),k=y+N+x?"invalid_tensor_storage_ranges":A?"partial_unsupported_ggml_types":w?"complete_with_alignment_padding":"complete_without_gaps_or_overlaps",D=String(_["general.architecture"]||"not_declared"),q=uQ(l,_,f),L=nS({architecture:D},f),F=XS("gguf",t,n,f,{status:p||g||y||N?"invalid":A?"partial":"assessed",metadata:_,metadata_entries:l,gguf:{schema:"deepbom.gguf_metadata.v1",version:r,endianness:o?"little":"big",architecture:D,quantization_version:Number.isSafeInteger(_["general.quantization_version"])?_["general.quantization_version"]:null,general_file_type:Number.isSafeInteger(_["general.file_type"])?_["general.file_type"]:null,tensor_count:c,metadata_kv_count:u,alignment:m,tensor_data_offset:h,payload_byte_length:b,declared_tensor_byte_length:O,alignment_padding_byte_length:w,payload_coverage_status:k,unsupported_ggml_type_count:A,invalid_tensor_cardinality_count:y,overlapping_tensor_range_count:N,out_of_bounds_tensor_range_count:x,invalid_metadata_key_count:p,invalid_tensor_offset_count:g,type_traits_source:oQ,semantic_contract:q,backend_compatibility:L,parser_scope:"GGUF metadata, tensor descriptors, source-pinned serialized byte ranges, and full-payload numerical integrity for supported scalar and GGML block encodings."}});return q.serialized_parameter_count=F.tensor_storage_summary.element_count,q.serialized_parameter_count_decimal=F.tensor_storage_summary.element_count_decimal,q.serialized_tensor_bytes=F.tensor_storage_summary.byte_length,q.serialized_tensor_bytes_decimal=F.tensor_storage_summary.byte_length_decimal,q.effective_bits_per_parameter=F.tensor_storage_summary.effective_bits_per_element,q.parameter_storage_basis="Reused from deepbom.tensor_storage_summary.v1; tensor shape products and serialized payload bytes are not recomputed.",F.on_device_llm=Zo(F),F}function dQ(e,t,n){if(e.length<9)throw new Ss(9);let o=new yd(e,!0).u64("SafeTensors header length at byte 0");if(o<2||o>iv)throw new Error(`SafeTensors header length ${o} is outside the supported range`);let a=8+o;if(e.length<a)throw new Ss(a);if(e[8]!==123)throw new Error("SafeTensors header must begin with '{'");let r=KS(e.subarray(8,a),"SafeTensors header").trimEnd(),s=Ao(r,"SafeTensors header");if(!s||typeof s!="object"||Array.isArray(s))throw new Error("SafeTensors header must be an object");let c=s.__metadata__||{};if(!c||typeof c!="object"||Array.isArray(c)||Object.values(c).some(m=>typeof m!="string"))throw new Error("SafeTensors __metadata__ must contain only string values");let u=n-a;if(u<0)throw new Error("SafeTensors header exceeds file size");let l=[];for(let[m,f]of Object.entries(s)){if(m==="__metadata__")continue;if(!f||typeof f!="object"||Array.isArray(f))throw new Error(`invalid SafeTensors descriptor ${m}`);let g=iQ[f.dtype];if(!g)throw new Error(`unsupported SafeTensors dtype ${f.dtype}`);let h=f.shape,b=f.data_offsets;if(!Array.isArray(h)||h.some(v=>!Number.isSafeInteger(v)||v<0))throw new Error(`invalid SafeTensors shape ${m}`);if(!Array.isArray(b)||b.length!==2||b.some(v=>!Number.isSafeInteger(v)||v<0)||b[1]<b[0])throw new Error(`invalid SafeTensors offsets ${m}`);if(b[1]>u)throw new Error(`SafeTensors tensor ${JSON.stringify(m)} declares payload byte range [${b[0]}, ${b[1]}), but only ${u} payload bytes are available after the ${a}-byte header.`);let y=h.reduce((v,I)=>v*BigInt(I),1n)*BigInt(g);if(y%8n!==0n)throw new Error(`SafeTensors sub-byte tensor ${m} is not byte-aligned`);let x=Number(y/8n);if(!Number.isSafeInteger(x)||b[1]-b[0]!==x)throw new Error(`SafeTensors byte cardinality mismatch ${m}`);l.push({index:l.length,name:m,shape:h,dtype:f.dtype,data_offset:b[0],data_end:b[1],byte_length:x})}let _=[...l].sort((m,f)=>m.data_offset-f.data_offset||m.data_end-f.data_end),p=0;for(let m of _){if(m.data_offset!==p)throw new Error(`SafeTensors payload gap or overlap before ${m.name}`);p=m.data_end}if(p!==u)throw new Error(`SafeTensors tensor ranges cover ${p} of ${u} payload bytes; ${u-p} trailing bytes are not assigned to any tensor.`);let d=XS("safetensors",t,n,l,{status:"assessed",metadata:c,safetensors:{schema:"deepbom.safetensors_metadata.v1",header_byte_length:o,tensor_count:l.length,payload_byte_length:u,payload_coverage_status:"complete_without_gaps_or_overlaps",duplicate_key_validation:"complete",reference_implementation:Es(),quantization_contract:gd(null,l),parser_scope:"Header, exact tensor byte ranges, and full-payload numerical integrity for source-bound scalar, FP8, and PyTorch-packed F4 dtypes. F6 remains explicitly unassessed because SafeTensors does not define its packed-bit mapping."}});return d.on_device_llm=Zo(d),d}function av(e,t){let n=e==="gguf"?t.filter(_=>Number(_.block_elements||0)>1).length:0,i=e==="gguf"?t.filter(_=>_.storage_status==="assessed"&&Number(_.block_elements||0)===1).length:0,o=e==="gguf"?t.filter(_=>_.storage_status!=="assessed").length:0,a=t.filter(_=>["F16","BF16","FLOAT16","BFLOAT16"].includes(String(_.dtype||"").toUpperCase())).length,r=t.filter(_=>["F32","F64","FLOAT32","FLOAT64"].includes(String(_.dtype||"").toUpperCase())).length,s=e==="gguf"?t.length-o:t.length,c=Math.max(0,s-n-a-r),u=n>0?"format_defined_block_quantized_weights":"not_quantized_storage_encoding",l=n>0?i>0?"mixed_block_quantized_and_scalar_storage":"block_quantized_storage":a>0&&a+r===t.length?r>0?"mixed_floating_point_storage":"reduced_precision_floating_point_storage":"scalar_or_mixed_typed_storage";return{status:e==="gguf"?n>0?"assessed":"not_applicable_no_block_quantization":"not_applicable_weight_container",classification:e==="gguf"?u:"weight_container",label:e==="gguf"?n>0?"GGUF block-quantized tensor storage":"GGUF tensor storage (no block quantization observed)":"SafeTensors weight container",summary:e==="gguf"?n>0?`${n}/${t.length} tensors use source-pinned block-quantized GGML encodings.`:`0/${t.length} tensors use a source-pinned block-quantized GGML encoding; floating-point storage is not relabeled as quantization.`:`${a} reduced-precision floating-point, ${r} full-precision floating-point, and ${c} other typed tensor(s) are serialized; no execution-graph quantization contract is present.`,detail:e==="gguf"?`${n} block-quantized, ${i} scalar-encoded, ${o} unsupported or invalid encoding tensor(s). GGML block encoding is not TFLite/ONNX affine per-tensor or per-axis quantization.`:"SafeTensors dtype and byte ranges are container metadata, not an executable quantization graph contract.",full_integer:!1,compute_ops:0,quantized_compute_ops:0,quantized_compute_mac_percent:null,encoded_tensor_count:s,block_quantized_tensor_count:n,reduced_precision_float_tensor_count:a,full_precision_float_tensor_count:r,other_typed_tensor_count:c,precision_category_conservation:s===n+a+r+c,storage_precision_classification:e==="gguf"?l:"typed_weight_container",scalar_encoded_tensor_count:i,unsupported_encoding_tensor_count:o,op_state_counts:[]}}function XS(e,t,n,i,o){let a=i.reduce((s,c)=>s+Number(c.byte_length||0),0),r=e==="gguf"?i.filter(s=>Number(s.block_elements||0)>1).length:0;return{schema:"deepbom.static_analysis.container.v1",format:e,filename:t,file_size:n,file_size_bytes:n,operator_count:null,tensor_count:i.length,quantized_tensors:r,per_channel_tensors:0,per_tensor_tensors:0,total_macs:null,mac_assessment:{status:"not_applicable_weight_container",compute_ops:0,assessed_compute_ops:0},ops:[],inputs:[],outputs:[],tensors:i,tensor_inventory:{status:o.status,tensor_count:i.length,total_declared_tensor_bytes:a,tensors:i},tensor_storage_summary:Lf(e,i),metadata_presence:{status:"assessed",producer_name:o.metadata?.["general.name"]||null,producer_version:o.metadata?.["general.version"]||null,metadata_author:o.metadata?.["general.author"]||null,metadata_license:o.metadata?.["general.license"]||null,description:o.metadata?.["general.description"]||null,preprocessing_contract_status:"not_applicable_weight_container",output_semantics_documented:!1},quantization_status:av(e,i),format_extensions:{[e]:o[e]},[e]:o[e]}}function Mf(e,t){e.tensor_numerical_integrity=t;let n=new Map(t.tensor_records.map(i=>[i.tensor_index,i]));for(let i of e.tensors)i.numerical_integrity=n.get(i.index)||null;return e.tensor_inventory.numerical_integrity_status=t.status,e.tensor_inventory.assessed_payload_bytes=t.assessed_tensor_bytes,e.tensor_inventory.unassessed_payload_bytes=t.unassessed_tensor_bytes,e.tensor_inventory.decoded_value_count=t.decoded_value_count,e.tensor_storage_summary=Lf(e.format,e.tensors,t),e.format==="safetensors"&&(e.safetensors.quantization_contract=gd(null,e.tensors),e.format_extensions.safetensors=e.safetensors),e}async function Pf(e,t,{onProgress:n,scanMode:i="full"}={}){let o=String(t||"").toLowerCase();if(!["structure","integrity","full"].includes(i))throw new Error(`unsupported metadata scan mode ${i}`);if(o==="safetensors"){let a=new Uint8Array(await e.slice(0,8).arrayBuffer());if(a.length<8)throw new Error("truncated SafeTensors length prefix");let r=new yd(a).u64("SafeTensors header length at byte 0");if(r>iv)throw new Error(`SafeTensors header exceeds ${iv} bytes`);let s=new Uint8Array(await e.slice(0,8+r).arrayBuffer()),c=dQ(s,e.name,e.size);return i==="structure"?Mf(c,HS(c,e.size)):Mf(c,await hf(e,c,{onProgress:n})),{analysis:c,retainedBytes:s,payloadLoaded:!1,payloadScanned:i!=="structure"}}if(o==="gguf"){let a=Math.min(e.size,65536);for(;a<=Math.min(e.size,nv);){let r=new Uint8Array(await e.slice(0,a).arrayBuffer());try{let s=_Q(r,e.name,e.size);return i==="structure"?Mf(s,HS(s,e.size)):Mf(s,await hf(e,s,{onProgress:n})),{analysis:s,retainedBytes:r,payloadLoaded:!1,payloadScanned:i!=="structure"}}catch(s){if(!(s instanceof Ss))throw s;let c=Math.max(a*2,s.requiredBytes);if(c<=a||c>nv||a===e.size)throw new Error(`GGUF metadata header exceeds the ${nv}-byte inspection limit`);a=Math.min(e.size,c)}}}throw new Error(`metadata adapter is not implemented for ${o||"unknown"}`)}function HS(e,t){let n=e.tensors.map(o=>({schema:"deepbom.tensor_numerical_integrity.tensor.v1",status:"not_assessed_scan_policy_structure",evidence_class:"NOT_ASSESSABLE",tensor_index:o.index,tensor_name:o.name,dtype:o.dtype,shape:o.shape,byte_length:Number.isSafeInteger(o.byte_length)?o.byte_length:null,reason:"Payload numerical decoding was intentionally skipped by the structure scan policy."})),i=e.tensors.reduce((o,a)=>o+Number(a.byte_length||0),0);return{schema:"deepbom.tensor_numerical_integrity.v1",status:"not_assessed_scan_policy_structure",evidence_class:"NOT_ASSESSABLE",scan_scope:"metadata_and_tensor_directory_only",tensor_count:n.length,assessed_tensor_count:0,unassessed_tensor_count:n.length,declared_tensor_bytes:i,assessed_tensor_bytes:0,unassessed_tensor_bytes:i,byte_conservation_status:"complete_descriptor_cardinality_payload_not_scanned",source_file_bytes:t,decoded_value_count:0,nonfinite_value_count:null,exact_zero_value_count:null,all_zero_tensor_count:null,constant_tensor_count:null,invalid_encoding_value_count:null,nonfinite_scale_block_count:null,tensor_records:n,decoder_source:e.format==="gguf"?pd:Es(),limitations:[{reason:"Payload numerical integrity requires --scan integrity or --scan full."}]}}Yf();Ce();var bT=1024*1024*1024,uT=2e6,_T=1e5,Sv=16*1024*1024,dT=64*1024*1024,pT=200,aG=new TextDecoder("utf-8",{fatal:!0});function rG(e,t="graph.pb"){ih(e,bT,"TensorFlow GraphDef");let n=wT(e,"GraphDef");return vT(n,t,"graphdef")}function th(e,t="graph.pb"){if(ih(e,bT,"TensorFlow protobuf"),/^saved_model\.pb$/i.test(String(t).split(/[\\/]/).pop()||"")){let n=cG(e),i=vT(n[0],t,"savedmodel",{source:"SavedModel.meta_graphs[0].graph_def",artifact_role:"model_package"});return i.savedmodel={schema:"deepbom.tensorflow_savedmodel_safe_static_contract.v1",meta_graph_count:n.length,materialized_meta_graph_indices:[0],signature_defs:n[0].signatures,additional_meta_graphs:n.slice(1).map((o,a)=>({index:a+1,node_count:o.nodes.length,function_count:o.functions.length,signature_count:o.signatures.length})),package_closure_status:"protobuf_only_variables_assets_and_fingerprints_not_bound",evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",unsafe_execution_performed:!1,interpretation_boundary:"The first serialized MetaGraph GraphDef and SignatureDef tensor contracts are materialized. Additional MetaGraphs are inventoried but not merged into one execution graph, and this standalone protobuf does not bind the SavedModel directory, variables, assets, fingerprints, kernels, or runtime behavior."},i.format_extensions.savedmodel=i.savedmodel,i}return rG(e,t)}function sG(e,t="model.h5"){ih(e,Number.MAX_SAFE_INTEGER,"HDF5");let n=NT(e);if(n<0)throw new Error("HDF5 signature was not found at an allowed user-block boundary.");let i=n+8,o=e[i];if(![0,1,2,3].includes(o))throw new Error(`Unsupported HDF5 superblock version ${o}.`);let a=o<=1?TG(e,i,o):SG(e,i,o);return Pv(t,"hdf5",{schema:"deepbom.hdf5_safe_envelope.v1",status:"superblock_assessed_object_graph_not_materialized",evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",signature_offset:n,...a,unsafe_deserialization_performed:!1,object_construction_performed:!1,profile_candidates:zG(t),interpretation_boundary:"The HDF5 superblock and container identity are parsed without loading Keras or Python objects. Group, dataset, link, filter, tensor, architecture, and executable-graph coverage are not claimed in this release."},"training_checkpoint_or_model_container")}async function yT(e,t=e?.name||"model.h5"){CT(e,"HDF5");let n=[0];for(let i=512;i<e.size&&i<=1024*1024*1024;i*=2)n.push(i);for(let i of n){let o=Math.min(512,e.size-i);if(o<8)continue;let a=new Uint8Array(await e.slice(i,i+o).arrayBuffer());if(NT(a)!==0)continue;let r=sG(a,t);return r.file_size=e.size,r.file_size_bytes=e.size,r.safe_source_artifact.signature_offset=i,r.safe_source_artifact.file_size_bytes=e.size,r.safe_source_artifact.header_range={start:i,end_exclusive:i+a.length},{analysis:r,retainedBytes:a}}throw new Error("HDF5 signature was not found at an allowed user-block boundary within the bounded 1 GiB search range.")}async function Mv(e,t=e?.name||"model.pt2",n=""){CT(e,"ZIP model container");let i=Math.min(e.size,65557),o=e.size-i,a=new Uint8Array(await e.slice(o,e.size).arrayBuffer()),r=RG(a),s=new DataView(a.buffer,a.byteOffset,a.byteLength),c=s.getUint16(r+10,!0),u=s.getUint32(r+12,!0),l=s.getUint32(r+16,!0);bG(c,u,l,e.size,o+r);let _=new Uint8Array(await e.slice(l,l+u).arrayBuffer()),p=gG(_,c,l,u),d=String(t).toLowerCase(),m=n||(d.endsWith(".pt2")?"pt2":d.endsWith(".keras")?"keras":"pytorch_checkpoint"),f=await yG(p,m,b=>AG(e,b)),g=m==="pt2"?"exported_program":m==="keras"?"model_package":"training_checkpoint",h=Pv(t,m,{schema:"deepbom.safe_zip_model_envelope.v1",status:f.status,evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",archive:wG(p),...f,unsafe_deserialization_performed:!1,native_code_executed:!1,file_access:{mode:"bounded_ranges",full_artifact_loaded:!1,central_directory_bytes:u},interpretation_boundary:m==="pytorch_checkpoint"?"The archive and bounded pickle opcode/global inventory are inspected without torch.load, pickle.load, Python imports, object construction, or native code execution. A checkpoint does not establish an executable model graph.":"The archive and bounded declarative members are inspected without framework object construction or native code execution. Opaque or unsafe members remain hash-addressed and are not interpreted as an executable runtime graph."},g);return m==="pt2"&&xG(h,f),m==="keras"&&EG(h,f),h.file_size=e.size,h.file_size_bytes=e.size,{analysis:h,retainedBytes:a}}async function AT(e,t="model.pt"){ih(e,Number.MAX_SAFE_INTEGER,"PyTorch checkpoint");let n=ET(e);return Pv(t,"pytorch_checkpoint",{schema:"deepbom.pytorch_safe_envelope.v1",status:"legacy_pickle_opcode_inventory_assessed_payload_not_deserialized",evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",container:"legacy_pickle_stream_or_unrecognized_checkpoint_envelope",pickle:n,unsafe_deserialization_performed:!1,native_code_executed:!1,interpretation_boundary:"Only bounded pickle opcodes and literal GLOBAL references are inventoried. STACK_GLOBAL targets, object semantics, tensors, architecture, and executable graph remain not assessable without unsafe object construction."},"training_checkpoint")}function cG(e){let n=vn(e,"SavedModel",0).filter(i=>i.number===2&&i.wire===2);if(!n.length)throw new Error("SavedModel contains no MetaGraphDef records.");return n.map((i,o)=>{let a=vn(i.bytes,`SavedModel.meta_graphs[${o}]`,1),r=a.find(c=>c.number===2&&c.wire===2);if(!r)return null;let s=wT(r.bytes,`SavedModel.meta_graphs[${o}].graph_def`);return s.signatures=lG(a,`SavedModel.meta_graphs[${o}]`),s}).filter(Boolean)}function vT(e,t,n="graphdef",i={}){let o=new Map(e.nodes.map((d,m)=>[d.name,m])),a=new Map(e.nodes.map(d=>[d.name,d])),r=new Map,s=(d,m=0)=>{let f=`${d}:${m}`;return r.has(f)||r.set(f,r.size),r.get(f)};for(let d of e.nodes)for(let m of d.inputs)m.control||s(m.node,m.port);for(let d of e.signatures||[])for(let m of[...d.inputs,...d.outputs]){let f=Lv(m.tensor_name);f.control||s(f.node,f.port)}let c=new Map((e.signatures||[]).flatMap(d=>[...d.inputs,...d.outputs]).map(d=>[d.tensor_name,d])),u=new Set(e.nodes.flatMap(d=>d.inputs.filter(m=>!m.control).map(m=>`${m.node}:${m.port}`))),l=e.nodes.map((d,m)=>({index:m,name:d.op,graph_node_name:d.name,domain:"tensorflow.graphdef",version:null,inputs:d.inputs.filter(f=>!f.control).map(f=>s(f.node,f.port)),outputs:[...r.keys()].filter(f=>f.startsWith(`${d.name}:`)).map(f=>r.get(f)).sort((f,g)=>f-g),macs:null,macs_status:"not_assessed_operator_semantics_and_shapes_not_materialized"})),_=[...r.entries()].sort(([,d],[,m])=>d-m).map(([d,m])=>{let f=d.replace(/:\d+$/,""),g=mG(a.get(f),c.get(d));return{index:m,name:d,dtype:g.dtype,shape:g.shape,value_kind:"graph_value",constant_buffer:g.constant,serialized_payload_bytes:g.serialized_payload_bytes,numerical_integrity:g.payload_sha256?{payload_sha256:g.payload_sha256}:null,contract_status:g.status}}),p=e.nodes.flatMap((d,m)=>d.inputs.filter(f=>f.control).map(f=>({source_node_name:f.node,source_op_index:o.has(f.node)?o.get(f.node):null,target_node_name:d.name,target_op_index:m,status:o.has(f.node)?"resolved":"unresolved"})));return{format:n,filename:t,file_size:i.file_size??null,file_size_bytes:i.file_size??null,ops:l,tensors:_,operator_count:l.length,tensor_count:_.length,input_tensor_indices:hT((e.signatures||[]).flatMap(d=>d.inputs).map(d=>fT(d.tensor_name,r))),output_tensor_indices:hT((e.signatures||[]).flatMap(d=>d.outputs).map(d=>fT(d.tensor_name,r))),total_macs:null,total_macs_decimal:null,mac_confidence:"partial",mac_assessment:{status:"not_assessed",metric_scope:"serialized GraphDef node ledger; compute classification and shapes not materialized",compute_ops:l.length,assessed_compute_ops:0,not_assessed_compute_ops:l.length,total_assessed_macs:0,total_assessed_macs_decimal:"0"},graphdef:{schema:"deepbom.tensorflow_graphdef_static_contract.v1",status:"serialized_nodes_dependencies_and_bounded_endpoint_contracts_materialized",node_count:e.nodes.length,function_count:e.functions.length,control_dependency_count:p.length,unresolved_input_count:e.nodes.flatMap(d=>d.inputs).filter(d=>!o.has(d.node)).length,versions:e.versions,functions:e.functions,node_attribute_summaries:e.nodes.map((d,m)=>({index:m,name:d.name,op:d.op,attributes:d.attributes})),control_dependencies:p,source:i.source||"GraphDef protobuf",unsafe_execution_performed:!1,graph_input_output_status:e.signatures?.length?"explicit_signature_def_endpoints":"not_explicitly_serialized_by_graphdef",interpretation_boundary:"Node names, op identities, referenced data inputs, control inputs, and function inventory are serialized facts. GraphDef does not explicitly identify model inputs or outputs, and unreferenced operation outputs are not synthesized. Tensor shapes, dtypes, function-call binding, execution schedule, kernels, placement, and runtime behavior are not inferred when not materialized."},format_extensions:{[n]:{node_count:e.nodes.length,function_count:e.functions.length}},findings:[],recommendations:[],artifact_role:i.artifact_role||"exported_program"}}function lG(e,t){let n=e.filter(o=>o.number===5&&o.wire===2);if(n.length>1e5)throw new Error(`${t} exceeds 100,000 SignatureDef map entries.`);let i=new Set;return n.map((o,a)=>{let r=vn(o.bytes,`${t}.signature_def[${a}]`,2),s=kd(r,1,`${t}.signature_def[${a}].key`);if(i.has(s))throw new Error(`${t} repeats SignatureDef key ${JSON.stringify(s)}.`);i.add(s);let c=r.find(l=>l.number===2&&l.wire===2);if(!c)throw new Error(`${t}.signature_def[${a}].value is missing.`);let u=vn(c.bytes,`${t}.signature_def[${a}].value`,3);return{key:s,method_name:nh(u,3),inputs:mT(u,1,`${t}.signature_def[${a}].inputs`),outputs:mT(u,2,`${t}.signature_def[${a}].outputs`)}})}function mT(e,t,n){let i=e.filter(a=>a.number===t&&a.wire===2),o=new Set;return i.map((a,r)=>{let s=vn(a.bytes,`${n}[${r}]`,4),c=kd(s,1,`${n}[${r}].key`);if(o.has(c))throw new Error(`${n} repeats key ${JSON.stringify(c)}.`);o.add(c);let u=s.find(m=>m.number===2&&m.wire===2);if(!u)throw new Error(`${n}[${r}].value is missing.`);let l=vn(u.bytes,`${n}[${r}].value`,5),_=nh(l,1);if(!_)throw new Error(`${n}[${r}] does not expose a dense TensorInfo name.`);let p=l.find(m=>m.number===2&&m.wire===0),d=l.find(m=>m.number===3&&m.wire===2);return{key:c,tensor_name:_,dtype:p?$v(bl(p.value,`${n}[${r}].dtype`)):"UNKNOWN",shape:d?eh(d.bytes,`${n}[${r}].tensor_shape`):[],evidence_class:"OBSERVED_SERIALIZED_ARTIFACT"}})}function fT(e,t){let n=Lv(e);return t.get(`${n.node}:${n.port}`)??null}function hT(e){return[...new Set(e.filter(t=>Number.isSafeInteger(t)&&t>=0))].sort((t,n)=>t-n)}function wT(e,t){let n=vn(e,t,0),i=n.filter(r=>r.number===1&&r.wire===2).map((r,s)=>uG(r.bytes,`${t}.node[${s}]`)),o=n.find(r=>r.number===2&&r.wire===2),a=n.find(r=>r.number===4&&r.wire===2);return{nodes:i,functions:o?fG(o.bytes,`${t}.library`):[],versions:a?hG(a.bytes):null}}function uG(e,t){let n=vn(e,t,1),i=kd(n,1,`${t}.name`),o=kd(n,2,`${t}.op`),a=n.filter(c=>c.number===3&&c.wire===2).map((c,u)=>Lv(Jo(c.bytes,`${t}.input[${u}]`))),r=n.filter(c=>c.number===5&&c.wire===2);if(r.length>1e5)throw new Error(`${t} exceeds 100,000 attributes.`);let s={};for(let[c,u]of r.entries()){let l=_G(u.bytes,`${t}.attr[${c}]`);if(Object.hasOwn(s,l.key))throw new Error(`${t} repeats attribute ${JSON.stringify(l.key)}.`);s[l.key]=l.value}return{name:i,op:o,inputs:a,device:nh(n,4),attribute_entry_count:r.length,attributes:s}}function _G(e,t){let n=vn(e,t,2),i=kd(n,1,`${t}.key`),o=n.find(a=>a.number===2&&a.wire===2);if(!o)throw new Error(`${t}.value is missing.`);return{key:i,value:dG(o.bytes,`${t}.value`)}}function dG(e,t){let n=vn(e,t,3),i=n.find(s=>s.number===6&&s.wire===0),o=n.find(s=>s.number===7&&s.wire===2),a=n.find(s=>s.number===8&&s.wire===2),r=n.find(s=>s.number===1&&s.wire===2);return{type:i?$v(bl(i.value,`${t}.type`)):null,shape:o?eh(o.bytes,`${t}.shape`):null,tensor:a?pG(a.bytes,`${t}.tensor`):null,list_shapes:r?vn(r.bytes,`${t}.list`,4).filter(s=>s.number===7&&s.wire===2).map((s,c)=>eh(s.bytes,`${t}.list.shape[${c}]`)):[],scalar_kinds_present:n.filter(s=>[2,3,4,5,9,10,11,12,13,14].includes(s.number)).map(s=>s.number)}}function pG(e,t){let n=vn(e,t,4),i=n.find(r=>r.number===1&&r.wire===0),o=n.find(r=>r.number===2&&r.wire===2),a=n.find(r=>r.number===4&&r.wire===2)?.bytes||null;return{dtype:i?$v(bl(i.value,`${t}.dtype`)):"UNKNOWN",shape:o?eh(o.bytes,`${t}.tensor_shape`):[],tensor_content_byte_length:a?.length||0,tensor_content_sha256:a?Mo(a):null,typed_value_field_count:n.filter(r=>r.number>=5&&r.number<=19).length}}function eh(e,t){let n=vn(e,t,4);return n.find(o=>o.number===3&&o.wire===0)?.value===1n?null:n.filter(o=>o.number===2&&o.wire===2).map((o,a)=>{let s=vn(o.bytes,`${t}.dim[${a}]`,5).find(c=>c.number===1&&c.wire===0);return!s||s.value>BigInt(Number.MAX_SAFE_INTEGER)?-1:Number(s.value)})}function mG(e,t=null){if(!e)return{dtype:"UNKNOWN",shape:[],constant:!1,serialized_payload_bytes:0,payload_sha256:null,status:"referenced_source_node_unresolved"};let n=e.attributes?.value?.tensor||null,i=e.attributes?.shape?.shape??e.attributes?._output_shapes?.list_shapes?.[0]??n?.shape??null,o=n?.dtype||e.attributes?.dtype?.type||e.attributes?.T?.type||t?.dtype||"UNKNOWN",a=Array.isArray(i)?i:Array.isArray(t?.shape)?t.shape:[];return{dtype:o,shape:a,constant:e.op==="Const"&&!!n,serialized_payload_bytes:n?.tensor_content_byte_length||0,payload_sha256:n?.tensor_content_sha256||null,status:n?"serialized_tensor_proto_contract":i||e.attributes?.dtype?.type||e.attributes?.T?.type?"serialized_node_attribute_contract":t?"serialized_signature_def_contract":"serialized_endpoint_name_shape_and_dtype_not_materialized"}}function $v(e){return{1:"FLOAT32",2:"FLOAT64",3:"INT32",4:"UINT8",5:"INT16",6:"INT8",7:"STRING",8:"COMPLEX64",9:"INT64",10:"BOOL",14:"BFLOAT16",17:"UINT16",19:"FLOAT16",22:"UINT32",23:"UINT64"}[e]||`TF_DATATYPE_${e}`}function Lv(e){let t=e.startsWith("^"),n=t?e.slice(1):e,i=/^(.*?)(?::(\d+))?$/.exec(n);if(!i||!i[1])throw new Error(`Invalid TensorFlow NodeDef input reference ${JSON.stringify(e)}.`);let o=i[2]==null?0:Number(i[2]);if(!Number.isSafeInteger(o)||o<0)throw new Error(`Invalid TensorFlow output port in ${JSON.stringify(e)}.`);return{serialized:e,node:i[1],port:o,control:t}}function fG(e,t){return vn(e,t,1).filter(n=>n.number===1&&n.wire===2).map((n,i)=>{let o=vn(n.bytes,`${t}.function[${i}]`,2),a=o.find(s=>s.number===1&&s.wire===2),r=a?nh(vn(a.bytes,`${t}.function[${i}].signature`,3),1):null;return{index:i,name:r||`function_${i}`,node_count:o.filter(s=>s.number===3&&s.wire===2).length,return_entry_count:o.filter(s=>s.number===4&&s.wire===2).length,control_return_entry_count:o.filter(s=>s.number===6&&s.wire===2).length}})}function hG(e){let t=vn(e,"VersionDef",1);return{producer:Ov(t.find(n=>n.number===1)),min_consumer:Ov(t.find(n=>n.number===2)),bad_consumers:t.filter(n=>n.number===3).map(Ov).filter(n=>n!=null)}}function vn(e,t,n){if(n>8)throw new Error(`${t} exceeds the bounded protobuf nesting depth.`);let i=[],o=0;for(;o<e.length;){if(i.length>=uT)throw new Error(`${t} exceeds ${uT} protobuf fields.`);let a=zv(e,o,t);o=a.next;let r=Number(a.value>>3n),s=Number(a.value&7n);if(!Number.isSafeInteger(r)||r<=0)throw new Error(`${t} contains an invalid protobuf field number.`);if(s===0){let c=zv(e,o,t);o=c.next,i.push({number:r,wire:s,value:c.value})}else if(s===1)ji(e,o,8,t),i.push({number:r,wire:s,bytes:e.subarray(o,o+8)}),o+=8;else if(s===2){let c=zv(e,o,t);o=c.next;let u=bl(c.value,`${t} length`);ji(e,o,u,t),i.push({number:r,wire:s,bytes:e.subarray(o,o+u)}),o+=u}else if(s===5)ji(e,o,4,t),i.push({number:r,wire:s,bytes:e.subarray(o,o+4)}),o+=4;else throw new Error(`${t} contains unsupported protobuf wire type ${s}.`)}return i}function gG(e,t,n,i){let o=[],a=new Set,r=0,s=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let c=0;c<t;c+=1){if(ji(e,r,46,"ZIP central record"),s.getUint32(r,!0)!==33639248)throw new Error("ZIP central-directory signature is invalid.");let u=s.getUint16(r+8,!0),l=s.getUint16(r+10,!0),_=s.getUint32(r+16,!0),p=s.getUint32(r+20,!0),d=s.getUint32(r+24,!0),m=s.getUint16(r+28,!0),f=s.getUint16(r+30,!0),g=s.getUint16(r+32,!0),h=s.getUint32(r+42,!0);ji(e,r+46,m+f+g,"ZIP central record payload");let b=IT(Jo(e.subarray(r+46,r+46+m),`ZIP entry ${c}`)),A=b.toLowerCase();if(a.has(A))throw new Error(`ZIP archive repeats or case-collides path ${b}.`);if(a.add(A),u&1)throw new Error(`Encrypted ZIP entry is not accepted: ${b}.`);o.push({path:b,flags:u,compressionMethod:l,crc32:_,compressedSize:p,uncompressedSize:d,localHeaderOffset:h,encrypted:!1}),r+=46+m+f+g}if(r!==i)throw new Error("ZIP central-directory size does not conserve parsed records.");return{entries:o,centralDirectoryOffset:n,centralDirectorySize:i}}function bG(e,t,n,i,o){if(e===65535||t===4294967295||n===4294967295)throw new Error("ZIP64 model archives are not supported by the bounded envelope parser.");if(e>_T)throw new Error(`ZIP archive exceeds ${_T} entries.`);if(t>dT)throw new Error(`ZIP central directory exceeds ${dT} bytes.`);if(n+t!==o||n+t>i)throw new Error("ZIP central-directory bounds do not terminate at the EOCD record.")}async function yG(e,t,n){let i=r=>e.entries.filter(s=>s.path.toLowerCase().endsWith(`/${r}`)||s.path.toLowerCase()===r);if(t==="pytorch_checkpoint"){let r=e.entries.filter(c=>/(^|\/)data\.pkl$|\.pkl$/i.test(c.path)),s=[];for(let c of r.slice(0,16))s.push({path:c.path,pickle:ET(await n(c))});return{status:"archive_and_pickle_opcode_inventory_assessed_payload_not_deserialized",pickle_members:s,storage_member_count:e.entries.filter(c=>/(^|\/)data\/\d+$/i.test(c.path)).length,native_binary_members:e.entries.filter(c=>/\.(so|dll|dylib|cubin|ptx)$/i.test(c.path)).map(c=>c.path)}}if(t==="pt2"){let r=i("archive_format"),s=i("archive_version");if(r.length>1||s.length>1)throw new Error("PT2 archive repeats its format or version marker.");let c=r[0]?Jo(await n(r[0]),r[0].path).trim():null,u=s[0]?Jo(await n(s[0]),s[0].path).trim():null,l=e.entries.filter(p=>/(^|\/)models\/[^/]+\.json$/i.test(p.path)||/(^|\/)data\/(weights|constants)\/[^/]+_config\.json$/i.test(p.path)||/(^|\/)extra\/module_info\.json$/i.test(p.path)),_=[];for(let p of l.slice(0,16))_.push({path:p.path,document:gT(await n(p),p.path)});return{status:c!=="pt2"?"archive_assessed_pt2_format_marker_missing_or_invalid":_.some(p=>/(^|\/)models\/[^/]+\.json$/i.test(p.path))?"pt2_archive_and_bounded_declarative_members_assessed":"pt2_archive_assessed_declarative_model_definition_not_found",archive_format:c,archive_version:u,declarative_documents:_,opaque_native_members:e.entries.filter(p=>/\.(so|dll|dylib|cubin|ptx)$/i.test(p.path)).map(p=>p.path),embedded_pickle_members:e.entries.filter(p=>/\.(pt|pth|pkl|pickle)$/i.test(p.path)).map(p=>p.path),declarative_member_limit:16,declarative_members_omitted:Math.max(0,l.length-16)}}let o=[...i("config.json"),...i("metadata.json")],a=[];for(let r of o.slice(0,8))a.push({path:r.path,document:gT(await n(r),r.path)});return{status:a.length?"keras_archive_and_declarative_config_assessed_objects_not_constructed":"keras_archive_assessed_config_not_found",declarative_documents:a,layer_inventory:OG(a.find(r=>/config\.json$/i.test(r.path))?.document)}}async function AG(e,t){xT(t);let n=new Uint8Array(await e.slice(t.localHeaderOffset,t.localHeaderOffset+30).arrayBuffer());ji(n,0,30,`ZIP local header ${t.path}`);let i=new DataView(n.buffer,n.byteOffset,n.byteLength);if(i.getUint32(0,!0)!==67324752)throw new Error(`ZIP local header signature is invalid for ${t.path}.`);let o=i.getUint16(6,!0),a=i.getUint16(8,!0),r=i.getUint16(26,!0),s=i.getUint16(28,!0);if(o&1||a!==t.compressionMethod)throw new Error(`ZIP local header conflicts with the central directory for ${t.path}.`);let c=new Uint8Array(await e.slice(t.localHeaderOffset+30,t.localHeaderOffset+30+r+s).arrayBuffer());if(IT(Jo(c.subarray(0,r),`ZIP local entry ${t.path}`))!==t.path)throw new Error(`ZIP local and central paths disagree for ${t.path}.`);let l=t.localHeaderOffset+30+r+s;if(l+t.compressedSize>e.size)throw new Error(`ZIP member ${t.path} exceeds the source byte range.`);let _=new Uint8Array(await e.slice(l,l+t.compressedSize).arrayBuffer());return vG(_,t)}function xT(e){if(e.uncompressedSize>Sv||e.compressedSize>Sv)throw new Error(`ZIP declarative member ${e.path} exceeds the ${Sv}-byte extraction limit.`);if(e.compressedSize>0&&e.uncompressedSize/e.compressedSize>pT)throw new Error(`ZIP declarative member ${e.path} exceeds the ${pT}:1 compression-ratio limit.`)}async function vG(e,t){xT(t);let n;if(t.compressionMethod===0)n=new Uint8Array(e);else if(t.compressionMethod===8){if(typeof DecompressionStream!="function")throw new Error(`Deflate decompression is unavailable for ${t.path}.`);n=new Uint8Array(await new Response(new Blob([e]).stream().pipeThrough(new DecompressionStream("deflate-raw"))).arrayBuffer())}else throw new Error(`ZIP member ${t.path} uses unsupported compression method ${t.compressionMethod}.`);if(n.length!==t.uncompressedSize)throw new Error(`ZIP member ${t.path} uncompressed size mismatch.`);if(BG(n)!==t.crc32)throw new Error(`ZIP member ${t.path} CRC-32 mismatch.`);return n}function wG(e){return{entry_count:e.entries.length,central_directory_offset:e.centralDirectoryOffset,central_directory_size:e.centralDirectorySize,total_claimed_uncompressed_bytes:e.entries.reduce((t,n)=>t+BigInt(n.uncompressedSize),0n).toString(),entries:e.entries.map(t=>({path:t.path,compression_method:t.compressionMethod,crc32:t.crc32.toString(16).padStart(8,"0"),compressed_bytes:t.compressedSize,uncompressed_bytes:t.uncompressedSize,local_header_offset:t.localHeaderOffset,encrypted:t.encrypted}))}}function ET(e){let t=[],n=new Map,i=0,o=0,a=!1;for(;o<e.length&&!a;){let r=e[o];if(n.set(`0x${r.toString(16).padStart(2,"0")}`,(n.get(`0x${r.toString(16).padStart(2,"0")}`)||0)+1),o+=1,r===99){let s=e.indexOf(10,o),c=s<0?-1:e.indexOf(10,s+1);if(s<0||c<0)throw new Error("Pickle GLOBAL opcode is truncated.");t.push({module:Jo(e.subarray(o,s),"pickle GLOBAL module"),name:Jo(e.subarray(s+1,c),"pickle GLOBAL name")}),o=c+1}else r===147?i+=1:r===46?a=!0:o=kG(e,o,r)}return{byte_length:e.length,sha256:Mo(e),literal_global_references:t.slice(0,1e4),literal_global_count:t.length,stack_global_count:i,opcode_histogram:Object.fromEntries([...n].sort(([r],[s])=>r.localeCompare(s))),stop_opcode_observed:a,parsed_byte_length:o,completeness:a?i?"partial_stack_global_targets_not_resolved":"literal_global_inventory_complete_for_opcode_stream":"partial_stop_opcode_not_reached"}}function xG(e,t){let n=(t.declarative_documents||[]).filter(l=>/(^|\/)models\/[^/]+\.json$/i.test(l.path)),i=n[0]?.document,o=i?.graph_module?.graph;if(!o||!Array.isArray(o.nodes)||!Array.isArray(o.inputs)||!Array.isArray(o.outputs)){e.pt2={schema:"deepbom.pt2_declarative_graph.v1",graph_materialized:!1,model_definition_count:n.length,status:n.length?"model_definition_present_graph_schema_not_materialized":"model_definition_not_present",interpretation_boundary:"No executable graph is claimed unless a bounded models/*.json document exposes the pinned ExportedProgram graph_module.graph fields."},e.format_extensions.pt2=e.pt2;return}if(o.nodes.length>1e6)throw new Error("PT2 declarative graph exceeds 1,000,000 nodes.");let a=Er(o.inputs.flatMap($s)),r=Er(o.outputs.flatMap($s)),s=o.nodes.map((l,_)=>{if(!l||typeof l!="object"||typeof l.target!="string"||!l.target)throw new Error(`PT2 graph node ${_} has no serialized target.`);return{index:_,name:l.target,graph_node_name:typeof l.name=="string"&&l.name?l.name:`node_${_}`,domain:"pytorch.export",version:null,input_names:Er((Array.isArray(l.inputs)?l.inputs:[]).flatMap(p=>$s(p?.arg))),output_names:Er((Array.isArray(l.outputs)?l.outputs:[]).flatMap($s)),macs:null,macs_status:"not_assessed_operator_semantics_and_shapes_not_executed"}}),c=Er([...a,...r,...s.flatMap(l=>[...l.input_names,...l.output_names]),...Object.keys(o.tensor_values||{})]),u=new Map(c.map((l,_)=>[l,_]));e.ops=s.map(({input_names:l,output_names:_,...p})=>({...p,inputs:l.map(d=>u.get(d)),outputs:_.map(d=>u.get(d))})),e.tensors=c.map((l,_)=>{let p=o.tensor_values?.[l],d=NG(p?.sizes);return{index:_,name:l,dtype:IG(p?.dtype),shape:d||[],shape_signature:d||[],value_kind:p?"tensor":"serialized_graph_argument",constant_buffer:!1,contract_status:p?d?"serialized_tensor_meta_static_shape":"serialized_tensor_meta_symbolic_or_unresolved_shape":"serialized_argument_name_only"}}),e.operator_count=e.ops.length,e.tensor_count=e.tensors.length,e.input_tensor_indices=a.map(l=>u.get(l)),e.output_tensor_indices=r.map(l=>u.get(l)),e.mac_assessment={status:"not_assessed",metric_scope:"serialized PT2 ExportedProgram JSON node ledger; no operator execution or framework object construction",compute_ops:e.ops.length,assessed_compute_ops:0,not_assessed_compute_ops:e.ops.length,total_assessed_macs:0,total_assessed_macs_decimal:"0"},e.pt2={schema:"deepbom.pt2_declarative_graph.v1",graph_materialized:!0,primary_model_definition_path:n[0].path,model_definition_count:n.length,additional_model_definitions:n.slice(1).map(l=>l.path),operation_count:e.ops.length,value_count:e.tensors.length,nested_graph_argument_count:Rv(i,"as_graph"),schema_version:i.schema_version||null,opset_version:i.opset_version||null,torch_version:i.torch_version||null,unsafe_deserialization_performed:!1,interpretation_boundary:"Operations and named value dependencies come only from the first bounded models/*.json ExportedProgram document. Additional model definitions and higher-order nested graph bodies are inventoried but not merged. Tensor payloads, .pt sample inputs, native binaries, kernels, runtime order, and execution behavior are not loaded or inferred."},e.format_extensions.pt2=e.pt2}function EG(e,t){let n=(t.declarative_documents||[]).find(f=>/(^|\/)config\.json$/i.test(f.path)),i=n?.document,o=i?.config?.layers,a=String(i?.class_name||"");if(!Array.isArray(o)||!["Sequential","Functional","Model"].includes(a)||o.length>1e6){e.keras={schema:"deepbom.keras_declarative_layer_graph.v1",graph_materialized:!1,status:Array.isArray(o)?"unsupported_or_unbounded_model_config":"model_layer_config_not_present",interpretation_boundary:"A Keras layer graph is materialized only for a bounded Sequential, Functional, or Model config.json. Keras objects and custom layer code are never constructed or imported."},e.format_extensions.keras=e.keras;return}let r=new Map,s=o.map((f,g)=>{let h=String(f?.config?.name||f?.name||`layer_${g}`);if(!h||r.has(h))throw new Error(`Keras config contains a missing or duplicate layer name ${JSON.stringify(h)}.`);return r.set(h,g),{layer:f,index:g,name:h,className:String(f?.class_name||"unknown")}}),c=s.map(f=>Er(Bv(f.layer?.inbound_nodes))).map(f=>f.filter(g=>r.has(g))),u=a==="Sequential",l=s.map(f=>`${f.name}:output:0`);e.tensors=s.map((f,g)=>{let h=CG(f.layer?.build_config?.input_shape??f.layer?.config?.batch_shape??f.layer?.config?.batch_input_shape);return{index:g,name:l[g],dtype:String(f.layer?.config?.dtype||"UNKNOWN").toUpperCase(),shape:h||[],shape_signature:h||[],value_kind:"keras_declared_layer_output",constant_buffer:!1,contract_status:h?"declared_config_shape":"serialized_layer_output_name_shape_not_assessable"}}),e.ops=s.map((f,g)=>{let h=c[g].length?c[g]:u&&g>0?[s[g-1].name]:[];return{index:g,name:f.className,graph_node_name:f.name,domain:"keras.config",version:null,inputs:h.map(b=>r.get(b)),outputs:[g],macs:null,macs_status:"not_assessed_layer_class_does_not_establish_lowered_operator_semantics"}});let _=Er(Dv(i?.config?.input_layers)),p=Er(Dv(i?.config?.output_layers)),d=_.map(f=>r.get(f)).filter(Number.isSafeInteger),m=p.map(f=>r.get(f)).filter(Number.isSafeInteger);e.operator_count=e.ops.length,e.tensor_count=e.tensors.length,e.input_tensor_indices=d.length?d:s.filter((f,g)=>f.className==="InputLayer"||!c[g].length&&(!u||g===0)).map(f=>f.index),e.output_tensor_indices=m.length?m:s.length?[s.at(-1).index]:[],e.mac_assessment={status:"not_assessed",metric_scope:"serialized Keras config layer graph; no layer construction, lowering, kernel selection, or execution",compute_ops:e.ops.length,assessed_compute_ops:0,not_assessed_compute_ops:e.ops.length,total_assessed_macs:0,total_assessed_macs_decimal:"0"},e.keras={schema:"deepbom.keras_declarative_layer_graph.v1",graph_materialized:!0,root_class_name:a,primary_config_path:n.path,layer_count:s.length,explicit_inbound_reference_count:c.reduce((f,g)=>f+g.length,0),sequential_order_used:u,unsafe_deserialization_performed:!1,custom_layer_execution_claim:!1,interpretation_boundary:"Layer identities and connections are projected only from serialized Keras config order or explicit keras_history references. Layer classes are not constructed, imported, lowered, or treated as equivalent to backend operators. Weights, concrete function traces, kernels, runtime order, performance, and model quality remain separate evidence."},e.format_extensions.keras=e.keras}function $s(e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.flatMap($s);let t=[e.as_tensor?.name,e.as_token?.name,e.as_sym_int?.as_name,e.as_sym_bool?.as_name,e.as_sym_float?.as_name].filter(i=>typeof i=="string"&&i),n=[e.as_tensors,e.as_optional_tensors,e.as_nested_tensors].flatMap(i=>Array.isArray(i)?i.flatMap($s):[]);return[...t,...n,...$s(e.as_optional_tensor)]}function Er(e){return[...new Set(e.filter(t=>typeof t=="string"&&t.length&&t.length<=1e5))]}function NG(e){if(!Array.isArray(e))return null;let t=[];for(let n of e){if(!Number.isSafeInteger(n?.as_int)||n.as_int<0)return null;t.push(n.as_int)}return t}function IG(e){return typeof e=="string"&&e?e.toUpperCase():Number.isSafeInteger(e)?`PT2_SCALAR_TYPE_${e}`:"UNKNOWN"}function Rv(e,t){return!e||typeof e!="object"?0:Array.isArray(e)?e.reduce((n,i)=>n+Rv(i,t),0):Object.entries(e).reduce((n,[i,o])=>n+(i===t?1:0)+Rv(o,t),0)}function Bv(e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.flatMap(Bv);let t=e.keras_history;return[...Array.isArray(t)&&typeof t[0]=="string"?[t[0]]:[],...Object.values(e).flatMap(Bv)]}function Dv(e){return Array.isArray(e)?e.flatMap(t=>Array.isArray(t)&&typeof t[0]=="string"?[t[0]]:Dv(t)):[]}function CG(e){if(!Array.isArray(e))return null;let t=[];for(let n of e)if(n==null)t.push(-1);else if(Number.isSafeInteger(n)&&n>=0)t.push(n);else return null;return t}function kG(e,t,n){if(new Set([40,41,48,49,50,78,81,82,93,97,98,100,101,108,111,115,116,117,125,129,133,134,135,136,137,143,144,145,146,147,148,151,152]).has(n))return t;if([74,114,132].includes(n))return Cd(e,t,4,"pickle opcode argument");if([75,104,113,130,128].includes(n))return Cd(e,t,1,"pickle opcode argument");if([77,131].includes(n))return Cd(e,t,2,"pickle opcode argument");if([71,149].includes(n))return Cd(e,t,8,"pickle opcode argument");if([70,73,76,80,83,86,103,112].includes(n))return Tv(e,t,"pickle line argument");if(n===105)return Tv(e,Tv(e,t,"pickle INST module"),"pickle INST name");if([84,88,66].includes(n))return Jf(e,t,4,"pickle 32-bit byte string");if([85,67,140,138].includes(n))return Jf(e,t,1,"pickle 8-bit byte string");if([141,142,150].includes(n))return Jf(e,t,8,"pickle 64-bit byte string");if(n===139)return Jf(e,t,4,"pickle LONG4");throw new Error(`Unsupported pickle opcode 0x${n.toString(16).padStart(2,"0")} at byte ${t-1}.`)}function Tv(e,t,n){let i=e.indexOf(10,t);if(i<0)throw new Error(`${n} is truncated.`);return i+1}function Jf(e,t,n,i){ji(e,t,n,i);let o=0n;for(let r=0;r<n;r+=1)o|=BigInt(e[t+r])<<BigInt(r*8);let a=bl(o,`${i} length`);return Cd(e,t+n,a,i)}function Cd(e,t,n,i){return ji(e,t,n,i),t+n}function Pv(e,t,n,i){return{format:t,filename:e,file_size:null,file_size_bytes:null,ops:[],tensors:[],operator_count:0,tensor_count:0,input_tensor_indices:[],output_tensor_indices:[],total_macs:null,total_macs_decimal:null,mac_confidence:"not_applicable",mac_assessment:{status:"not_applicable_no_executable_graph_materialized",compute_ops:0,assessed_compute_ops:0,not_assessed_compute_ops:0,total_assessed_macs:0,total_assessed_macs_decimal:"0"},safe_source_artifact:n,artifact_role:i,format_extensions:{[t]:n},findings:[],recommendations:[]}}function SG(e,t,n){ji(e,t,4,"HDF5 superblock v2/v3");let i=e[t+1],o=e[t+2],a=e[t+3];kT(i,o);let r=t+4,s=Ta(e,r,i);r+=i;let c=Ta(e,r,i);r+=i;let u=Ta(e,r,i);r+=i;let l=Ta(e,r,i);return r+=i,ji(e,r,4,"HDF5 superblock checksum"),{superblock_version:n,offset_size:i,length_size:o,file_consistency_flags:a,base_address:s,superblock_extension_address:c,end_of_file_address:u,root_object_header_address:l,checksum_status:"present_not_validated"}}function TG(e,t,n){ji(e,t,20,"HDF5 superblock v0/v1");let i=e[t+5],o=e[t+6];kT(i,o);let a=t+16+(n===1?4:0),r=Ta(e,a,i);a+=i;let s=Ta(e,a,i);a+=i;let c=Ta(e,a,i);a+=i;let u=Ta(e,a,i);a+=i,ji(e,a,i*2,"HDF5 root group symbol table entry");let l=Ta(e,a+i,i);return{superblock_version:n,offset_size:i,length_size:o,base_address:r,free_space_address:s,end_of_file_address:c,driver_info_address:u,root_object_header_address:l,checksum_status:"not_present_in_superblock_version"}}function NT(e){let t=[137,72,68,70,13,10,26,10];for(let n=0;n+8<=e.length;n=n===0?512:n*2){if(t.every((i,o)=>e[n+o]===i))return n;if(n>1024*1024*1024)break}return-1}function zG(e){let t=String(e).toLowerCase();return[{id:"generic_hdf5",applicability:"applicable",status:"superblock_only"},{id:"keras_weights_h5",applicability:/weights.*\.h(?:df)?5$/.test(t)?"candidate_from_filename":"unknown",status:"not_assessed_without_object_graph"},{id:"legacy_keras_model_h5",applicability:/\.h(?:df)?5$/.test(t)?"possible":"unknown",status:"not_assessed_without_root_attributes"}]}function OG(e){let t=e?.config?.layers;return Array.isArray(t)?{status:"declared_config_inventory",layers:t.slice(0,1e5).map((n,i)=>({index:i,name:String(n?.config?.name||n?.name||`layer_${i}`),class_name:String(n?.class_name||"unknown")})),execution_order_claim:!1}:{status:"not_materialized",layers:[]}}function gT(e,t){try{return JSON.parse(Jo(e,t))}catch(n){throw new Error(`${t} is not valid JSON: ${n?.message||n}`)}}function RG(e){let t=Math.max(0,e.length-65557),n=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let i=e.length-22;i>=t;i-=1)if(e[i]===80&&e[i+1]===75&&e[i+2]===5&&e[i+3]===6){let o=n.getUint16(i+20,!0);if(i+22+o!==e.length)continue;if(n.getUint16(i+4,!0)!==0||n.getUint16(i+6,!0)!==0||n.getUint16(i+8,!0)!==n.getUint16(i+10,!0))throw new Error("Multi-disk ZIP archives are not supported.");return i}throw new Error("ZIP end-of-central-directory record was not found.")}function IT(e){let t=String(e).replaceAll("\\","/");if(!t||t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.includes("\0")||t.split("/").some(n=>!n||n==="."||n===".."))throw new Error(`Unsafe ZIP member path ${JSON.stringify(e)}.`);return t}function kd(e,t,n){let i=e.find(a=>a.number===t&&a.wire===2);if(!i)throw new Error(`${n} is missing.`);let o=Jo(i.bytes,n);if(!o||o.length>1e5)throw new Error(`${n} is invalid.`);return o}function nh(e,t){let n=e.find(i=>i.number===t&&i.wire===2);return n?Jo(n.bytes,`field ${t}`):null}function zv(e,t,n){let i=0n;for(let o=0n;o<=63n;o+=7n){if(t>=e.length)throw new Error(`${n} contains a truncated varint.`);let a=e[t++];if(i|=BigInt(a&127)<<o,!(a&128))return{value:i,next:t}}throw new Error(`${n} contains an overlong varint.`)}function Ov(e){return e?.wire===0?bl(e.value,"protobuf integer"):null}function bl(e,t){if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(`${t} exceeds the safe integer range.`);return Number(e)}function Jo(e,t){try{return aG.decode(e)}catch{throw new Error(`${t} is not valid UTF-8.`)}}function ih(e,t,n){if(!(e instanceof Uint8Array))throw new Error(`${n} requires Uint8Array bytes.`);if(e.length>t)throw new Error(`${n} exceeds the ${t}-byte parser limit.`)}function CT(e,t){if(!e||typeof e.slice!="function"||!Number.isSafeInteger(Number(e.size))||Number(e.size)<0)throw new Error(`${t} requires a bounded Blob-compatible file.`)}function ji(e,t,n,i){if(!Number.isSafeInteger(t)||!Number.isSafeInteger(n)||t<0||n<0||t+n>e.length)throw new Error(`${i} exceeds the source byte range.`)}function kT(e,t){if(![2,4,8,16,32].includes(e)||![2,4,8,16,32].includes(t))throw new Error(`Unsupported HDF5 address sizes offset=${e}, length=${t}.`)}function Ta(e,t,n){ji(e,t,n,"HDF5 integer");let i=0n;for(let a=0;a<n;a+=1)i|=BigInt(e[t+a])<<BigInt(a*8);let o=(1n<<BigInt(n*8))-1n;return i===o?null:i.toString()}function BG(e){let t=4294967295;for(let n of e){t^=n;for(let i=0;i<8;i+=1)t=t>>>1^(t&1?3988292384:0)}return(t^4294967295)>>>0}var qv="custom:",ST=Object.freeze(["MEASURED","VENDOR_DECLARED","USER_DECLARED"]);var DG=Object.freeze([{key:"core_count_min",label:"System core count (minimum variant)",unit:"cores",kind:"integer",min:1,max:1024,group:"compute",hint:"Use the same minimum and maximum for one exact device. A product family range produces only its documented endpoint variants."},{key:"core_count_max",label:"System core count (maximum variant)",unit:"cores",kind:"integer",min:1,max:1024,group:"compute",hint:"Must not be below the minimum. Static isolation scenarios are suppressed until both endpoints are bound."},{key:"performance_reference_core_count",label:"Peak-throughput reference",unit:"cores",kind:"integer",min:1,max:1024,group:"compute",hint:"Exact number of homogeneous cores represented by Peak throughput. This denominator is required before per-core scaling is calculated."},{key:"effective_peak_gops",label:"Peak throughput",unit:"GOPS",kind:"number",min:.1,max:1e6,group:"compute",hint:"Theoretical peak. The bound divides by this times the utilization."},{key:"compute_utilization_factor",label:"Compute utilization",unit:"fraction",kind:"number",min:.01,max:1,group:"compute",hint:"Fraction of peak a kernel actually reaches. 1.0 makes the estimate a best-case bound, not a latency."},{key:"effective_memory_bandwidth_gbps",label:"Memory bandwidth",unit:"GB/s",kind:"number",min:.25,max:1e4,group:"memory"},{key:"weight_packing_bandwidth_gbps",label:"Weight packing bandwidth",unit:"GB/s",kind:"number",min:.1,max:1e4,group:"memory"},{key:"l1_data_bytes",label:"L1 data cache",unit:"bytes",kind:"integer",min:1024,max:1<<24,group:"memory"},{key:"l2_bytes",label:"L2 cache",unit:"bytes",kind:"integer",min:4096,max:1<<30,group:"memory"},{key:"int8_speedup_estimate",label:"INT8 speedup",unit:"x",kind:"number",min:.1,max:64,group:"compute"},{key:"fp32_compute_factor",label:"FP32 compute factor",unit:"x",kind:"number",min:.1,max:64,group:"compute"},{key:"simd_width_bits",label:"SIMD width",unit:"bits",kind:"integer",min:32,max:2048,group:"isa"},{key:"fp32_lanes",label:"FP32 lanes",unit:"",kind:"integer",min:1,max:256,group:"isa"},{key:"fp16_lanes",label:"FP16 lanes",unit:"",kind:"integer",min:1,max:512,group:"isa"},{key:"int8_lanes",label:"INT8 lanes",unit:"",kind:"integer",min:1,max:1024,group:"isa"},{key:"channel_alignment_multiple",label:"Channel alignment",unit:"",kind:"integer",min:1,max:256,group:"isa"},{key:"in_order",label:"In-order core",unit:"",kind:"boolean",group:"isa"},{key:"dot_product",label:"Dot-product instructions",unit:"",kind:"boolean",group:"isa"},{key:"sve2",label:"SVE2",unit:"",kind:"boolean",group:"isa"},{key:"chain_break_overhead_us_low",label:"Predicted partition-break overhead (low)",unit:"us",kind:"number",min:0,max:1e5,group:"delegate"},{key:"chain_break_overhead_us_high",label:"Predicted partition-break overhead (high)",unit:"us",kind:"number",min:0,max:1e5,group:"delegate"},{key:"xnnpack_kernel_family",label:"XNNPACK kernel family",unit:"",kind:"text",maxLength:64,group:"delegate"},{key:"architecture",label:"Architecture",unit:"",kind:"text",maxLength:128,group:"identity"},{key:"l2_capacity_scope",label:"L2 capacity scope",unit:"",kind:"text",maxLength:128,group:"identity"},{key:"cache_assumption",label:"Cache assumption",unit:"",kind:"text",maxLength:1024,group:"identity"},{key:"cache_source_url",label:"Cache source URL",unit:"",kind:"text",maxLength:512,group:"identity"}]),MG=new Map(DG.map(e=>[e.key,e]));function $G(e){return String(e||"").startsWith(qv)}function TT(e,t=null){if(!e||typeof e!="object")throw new Error("Custom target must be an object");let n=String(e.base||"").trim();if(!n||n.startsWith("{"))throw new Error("Custom target requires a built-in base profile");let i=String(e.id||"").trim();if(!$G(i)||i.length<=qv.length)throw new Error(`Custom target id must start with '${qv}'`);if(i.length>128||![...i].every(d=>{let m=d.codePointAt(0);return m>=32&&m<=126}))throw new Error("Custom target id must be at most 128 printable ASCII characters");let o=String(e.label||"").trim();if(!o||o.length>128)throw new Error("Custom target requires a label of 1-128 characters");let a=String(e.evidence_class||"USER_DECLARED");if(!ST.includes(a))throw new Error(`Evidence class must be one of: ${ST.join(", ")}`);let r=String(e.evidence_note||"").trim();if(r.length>1024)throw new Error("Evidence note exceeds 1024 characters");if(a==="MEASURED"&&!r)throw new Error("A MEASURED custom target requires a note naming the measurement");let s={};for(let[d,m]of Object.entries(e.overrides||{})){if(d==="compute_utilization_by_kernel_class"){s[d]=PG(m);continue}let f=MG.get(d);if(!f)throw new Error(`'${d}' is not a tunable field`);s[d]=LG(f,m)}let c=s.chain_break_overhead_us_low??t?.chain_break_overhead_us_low,u=s.chain_break_overhead_us_high??t?.chain_break_overhead_us_high;if(Number.isFinite(Number(c))&&Number.isFinite(Number(u))&&Number(u)<Number(c))throw new Error("Predicted partition-break overhead high must not be below low");let l=s.core_count_min??t?.core_count_min,_=s.core_count_max??t?.core_count_max;if(Number.isInteger(Number(l))&&Number.isInteger(Number(_))&&Number(_)<Number(l))throw new Error("System core-count maximum must not be below the minimum");let p=s.performance_reference_core_count??t?.performance_reference_core_count;if(Number(p)>0&&Number(l)>0&&Number(_)>0&&![Number(l),Number(_)].includes(Number(p)))throw new Error("Peak-throughput reference cores must match one declared system core-count variant");return{base:n,id:i,label:o,evidence_class:a,evidence_note:r,overrides:s}}function LG(e,t){if(e.kind==="boolean"){if(typeof t!="boolean")throw new Error(`${e.label} must be true or false`);return t}if(e.kind==="text"){let i=String(t??"");if(i.length>e.maxLength)throw new Error(`${e.label} exceeds ${e.maxLength} characters`);return i}let n=Number(t);if(!Number.isFinite(n))throw new Error(`${e.label} must be a number`);if(e.kind==="integer"&&!Number.isInteger(n))throw new Error(`${e.label} must be a whole number`);if(n<e.min||n>e.max)throw new Error(`${e.label} must be between ${e.min} and ${e.max}`);return n}function PG(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Per-kernel utilization must be an object of family to fraction");let t=Object.entries(e);if(t.length>64)throw new Error("At most 64 kernel families can be tuned");let n={};for(let[i,o]of t){if(!/^[a-z0-9_]{1,64}$/.test(i))throw new Error(`Kernel family '${i}' must be lower_snake_case of at most 64 characters`);let a=Number(o);if(!Number.isFinite(a)||a<.01||a>1)throw new Error(`Utilization for '${i}' must be between 0.01 and 1`);n[i]=a}return n}Me();Ce();var BT="deepbom.interface_quantization_contracts.v1.3",qG="SHA-256 over UTF-8 RFC8785-JCS canonical JSON",jG="RFC8785-JCS",FG=/^[a-f0-9]{64}$/,yl="cdx:ai-ml:model:parameter:quantization:";function vl(e){return K(Q(e))}function rh(e){return K(JSON.stringify(e))}function Kv({status:e,scheme:t,granularity:n,scales:i,zeroPoints:o,axis:a,blockSize:r=null,parameterization:s=null}){let c=zT(a),u=zT(r);return{status:String(e||"invalid_or_incomplete"),scheme:String(t||"none"),granularity:String(n||"invalid_or_incomplete"),parameterization:String(s||n||"invalid_or_incomplete"),scales:KG(i),zero_points:ZG(o),axis:c,block_size:u!=null&&u>0?u:null}}function zT(e){if(e==null||e==="")return null;let t=Number(e);return Number.isSafeInteger(t)?t:null}function oh(e){let t=e?.quantization||{};return{direction:Xv(e?.direction),ordinal:Wv(e?.ordinal),tensor_name:String(e?.tensor_name??e?.name??""),dtype:String(e?.dtype||"UNKNOWN").toUpperCase(),shape:Sd(e?.shape),shape_signature:Array.isArray(e?.shape_signature)?Sd(e.shape_signature):null,quantization:Kv({status:t.status,scheme:t.scheme,granularity:t.granularity,parameterization:t.parameterization,scales:t.scales,zeroPoints:t.zero_points,axis:t.axis,blockSize:t.block_size})}}function zd(e,t=null,n={}){return{algorithm:"SHA-256",canonicalization:jG,method:qG,sha256:e,payload_contract:{selection:n.selection||"included_json_pointers_only",included_json_pointers:[...n.includedJsonPointers||[]],excluded_json_pointers:[...n.excludedJsonPointers||[]],interpretation:n.interpretation||"Resolve the listed JSON Pointers relative to the containing contract object, construct the declared payload, canonicalize it with RFC8785-JCS, encode as UTF-8, and hash with SHA-256."},...t?{legacy_v1_1:{method:"SHA-256 over UTF-8 JSON.stringify payload bytes",sha256:t,ordered_payload_fields:[...n.legacyOrderedPayloadFields||[]]}}:{}}}function Zv(e,t,n=""){let i=QG(t),o=Array.isArray(e?.parameters)?e.parameters:[],a=Td(n||e?.subject?.sha256);if(!i.provided)return jv("unbound",o,i,[],a);if(!i.valid)return jv("invalid_declaration",o,i,i.errors.map(f=>({parameter_id:null,field:"declaration",expected:"valid production interface contract",declared:f,evidence_pointer:"/production_interface_contract"})),a);let r=i.contract,s=[],c=Td(r.artifact_sha256);a&&c&&a!==c&&s.push(Al(null,"artifact_sha256",a,c,"/artifact_sha256"));let u=new Map(o.map(f=>[Vv(f.direction,f.ordinal),f])),l=new Map(r.parameters.map(f=>[Vv(f.direction,f.ordinal),f]));for(let[f,g]of u){let h=l.get(f);if(!h){s.push(Al(g.parameter_id,"parameter","present","missing",`/parameters/${Hv(f)}`));continue}UG(g,h,s,f)}for(let[f,g]of l)u.has(f)||s.push(Al(g.parameter_id||f,"parameter","absent","extra",`/parameters/${Hv(f)}`));let _=i.source_kind==="artifact_derived_baseline",p=_?"bound_exact_artifact_baseline":"bound_exact_contract",d=!!(a&&!c),m=!_&&!Td(r.implementation_sha256);return d&&m?p="partial_artifact_and_implementation_hash_missing":d?p="partial_artifact_hash_missing":m&&(p="partial_implementation_hash_missing"),s.some(f=>f.field==="artifact_sha256")?p="contradiction_artifact_hash_mismatch":s.length&&(p="contradiction_interface_contract_mismatch"),jv(p,o,i,s,a)}function QG(e){if(e==null||e==="")return{provided:!1,valid:!0,contract:null,errors:[],source_kind:"none"};let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{provided:!0,valid:!1,contract:null,errors:["Input is not valid JSON."],source_kind:"json"}}if(!t||typeof t!="object"||Array.isArray(t))return{provided:!0,valid:!1,contract:null,errors:["Contract root must be a JSON object."],source_kind:"unknown"};let n=t.bomFormat==="CycloneDX"||t.specFormat==="CycloneDX"?VG(t):null,i=n||t.production_interface_contract||t.interface_contract_ledger||t,o=Array.isArray(i?.parameters)?i.parameters:Array.isArray(i?.inputs)||Array.isArray(i?.outputs)?[...(i.inputs||[]).map((_,p)=>({..._,direction:"input",ordinal:p})),...(i.outputs||[]).map((_,p)=>({..._,direction:"output",ordinal:p}))]:null,a=[...n?.extraction_errors||[]];o||a.push("A parameters array, or inputs/outputs arrays, is required.");let r=[],s=new Set;for(let[_,p]of(o||[]).entries()){let d=GG(p,_);if(!d.valid){a.push(...d.errors.map(f=>`parameters[${_}]: ${f}`));continue}let m=Vv(d.value.direction,d.value.ordinal);s.has(m)&&a.push(`Duplicate parameter identity ${m}.`),s.add(m),r.push(d.value)}let c=i?.artifact_sha256||i?.subject?.sha256||n?.artifact_sha256,u=i?.implementation_sha256||i?.encoder_decoder_sha256,l={schema:String(i?.schema||"deepbom.production_interface_contract.v1"),artifact_sha256:Gv(c,"artifact_sha256",a),implementation_sha256:Gv(u,"implementation_sha256",a),parameters:r};return{provided:!0,valid:a.length===0,contract:l,errors:a,source_kind:n?"cyclonedx_2_draft":t.schema==="deepbom.artifact_derived_interface_baseline.v1"?"artifact_derived_baseline":"deepbom_json"}}function jv(e,t,n,i,o){let a=e.startsWith("contradiction")||e==="invalid_declaration";return{schema:"deepbom.interface_contract_comparison.v1",status:e,evidence_class:a?"DERIVED_FROM_ARTIFACT_AND_DECLARATION":e==="bound_exact_contract"?"DECLARED_RELEASE_BINDING":e==="bound_exact_artifact_baseline"?"DERIVED_FROM_ARTIFACT_BASELINES":"NOT_ASSESSED",expected_artifact_sha256:o||null,declared_artifact_sha256:n.contract?.artifact_sha256||null,implementation_sha256:n.contract?.implementation_sha256||null,expected_parameter_count:t.length,declared_parameter_count:n.contract?.parameters?.length||0,mismatch_count:i.length,mismatches:i,declaration_validation:{source_kind:n.source_kind,valid:n.valid,errors:n.errors},gate_result:a?"block":["bound_exact_contract","bound_exact_artifact_baseline"].includes(e)?"pass":"pending",interpretation_boundary:"A mismatch is an observed deployment-configuration integrity contradiction. An absent declaration is unbound evidence, not a vulnerability or proof of incorrect inference."}}function UG(e,t,n,i){let o=oh(e),a=`/parameters/${Hv(i)}`,r=Td(t.interface_contract_sha256);if(!t.has_structured_contract){r!==e.interface_contract_sha256&&n.push(Al(e.parameter_id,"interface_contract_sha256",e.interface_contract_sha256,r||null,`${a}/interface_contract_sha256`));return}let s=oh(t),c=[["direction",o.direction,s.direction],["ordinal",o.ordinal,s.ordinal],["tensor_name",o.tensor_name,s.tensor_name],["dtype",o.dtype,s.dtype],["shape",o.shape,s.shape],["shape_signature",o.shape_signature,s.shape_signature],["quantization.status",o.quantization.status,s.quantization.status],["quantization.scheme",o.quantization.scheme,s.quantization.scheme],["quantization.granularity",o.quantization.granularity,s.quantization.granularity],["quantization.parameterization",o.quantization.parameterization,s.quantization.parameterization],["quantization.scales",o.quantization.scales,s.quantization.scales],["quantization.zero_points",o.quantization.zero_points,s.quantization.zero_points],["quantization.axis",o.quantization.axis,s.quantization.axis],["quantization.block_size",o.quantization.block_size,s.quantization.block_size]];for(let[l,_,p]of c)Q(_)!==Q(p)&&n.push(Al(e.parameter_id,l,_,p,`${a}/${l.replaceAll(".","/")}`));let u=vl(s);r&&r!==u&&n.push(Al(e.parameter_id,"declared_hash_integrity",u,r,`${a}/interface_contract_sha256`))}function GG(e,t){if(!e||typeof e!="object"||Array.isArray(e))return{valid:!1,errors:["Parameter must be an object."]};let n=Xv(e.direction),i=Wv(e.ordinal??t),o=[];n||o.push("direction must be input or output."),i==null&&o.push("ordinal must be a non-negative integer.");let a=e.quantization&&typeof e.quantization=="object"?e.quantization:{},r=["tensor_name","name","dtype","shape","quantization"].some(b=>Object.hasOwn(e,b)),s=Fv(a.granularity||e.granularity||e.quantization_parameterization),c=Qv(a.scales??e.scales,"quantization.scales",o,{positive:!0}),u=Qv(a.zero_points??e.zero_points,"quantization.zero_points",o,{integer:!0}),l=Uv(e.shape,"shape",o,{required:r,nonNegative:!0}),_=e.shape_signature==null?null:Uv(e.shape_signature,"shape_signature",o),p=Gv(e.interface_contract_sha256,"interface_contract_sha256",o),d=ah(a.axis??e.axis??e.quantized_dimension,"quantization.axis",o),m=ah(a.block_size??e.block_size,"quantization.block_size",o,{positive:!0}),f=s==="not_quantized"||!c.length&&!u.length,g=String(a.status||e.status||(f?"not_quantized":"complete")),h=MT(a.scheme||e.scheme,f);return{valid:o.length===0,errors:o,value:{parameter_id:String(e.parameter_id||`${n}:${i}`),direction:n,ordinal:i,tensor_name:String(e.tensor_name??e.name??""),dtype:String(e.dtype||e.data_type||"UNKNOWN").toUpperCase(),shape:l,shape_signature:_,quantization:{status:g,scheme:h,granularity:s,parameterization:Fv(a.parameterization||e.parameterization||s),scales:c,zero_points:u,axis:d,block_size:m},interface_contract_sha256:p||"",has_structured_contract:r}}}function VG(e){let t=[],n=e.metadata?.component||(e.components||[]).find(u=>u?.type==="machine-learning-model"),i=n?.modelCard?.modelParameters;i||t.push("CycloneDX modelCard.modelParameters is required.");let o=i?.inputs,a=i?.outputs;o!=null&&!Array.isArray(o)&&t.push("CycloneDX modelParameters.inputs must be an array."),a!=null&&!Array.isArray(a)&&t.push("CycloneDX modelParameters.outputs must be an array.");let r=[...(Array.isArray(o)?o:[]).map((u,l)=>OT(u,"input",l,t)),...(Array.isArray(a)?a:[]).map((u,l)=>OT(u,"output",l,t))],s=(n?.hashes||[]).find(u=>String(u?.alg).toUpperCase().replace("-","")==="SHA256")?.content,c=DT(n?.properties,t,"CycloneDX component.properties");return{schema:"deepbom.production_interface_contract.from_cyclonedx_2_draft",artifact_sha256:s,implementation_sha256:c.get("deepbom:production:interfaceImplementationSha256")||null,parameters:r,extraction_errors:t}}function OT(e,t,n,i){let o=`CycloneDX ${t}[${n}].properties`,a=DT(e?.properties,i,o),r=a.get(`${yl}scheme`),s=a.get(`${yl}granularity`),c=RT(a.get(`${yl}scale`),i,`${o}.scale`,{positive:!0}),u=RT(a.get(`${yl}zeroPoint`),i,`${o}.zeroPoint`,{integer:!0}),l=ah(a.get(`${yl}_undefined:blockSize`)||a.get("deepbom:quantization:blockSize"),`${o}.blockSize`,i,{positive:!0}),_=!r&&!s&&!c.length&&!u.length,p=l?"blocked":Fv(s||(_?"not_quantized":c.length>1?"per_axis":"per_tensor"));return{direction:t,ordinal:n,name:e?.name||"",dtype:e?.format?.dataType||"UNKNOWN",shape:e?.shape||[],shape_signature:HG(a.get("deepbom:parameter:shapeSignature"),null,i,`${o}.shapeSignature`),quantization:{status:_?"not_quantized":"complete",scheme:MT(r,_),granularity:p,parameterization:p,scales:c,zero_points:u,axis:ah(a.get(`${yl}axis`),`${o}.axis`,i),block_size:l},interface_contract_sha256:a.get("deepbom:parameter:interfaceContractSha256")||""}}function DT(e,t=[],n="properties"){if(e!=null&&!Array.isArray(e))return t.push(`${n} must be an array.`),new Map;let i=new Map;for(let[o,a]of(e||[]).entries()){let r=String(a?.name||"");(!r||typeof a?.value!="string")&&t.push(`${n}[${o}] must contain a non-empty name and string value.`),i.has(r)&&t.push(`${n} repeats property ${r}.`),i.set(r,String(a?.value??""))}return i}function Xv(e){let t=String(e||"").toLowerCase();return t==="input"||t==="output"?t:""}function Fv(e){let t=String(e||"invalid_or_incomplete").toLowerCase().replaceAll("-","_");return new Set(["per_tensor","per_axis","blocked","not_quantized","invalid_or_incomplete"]).has(t)?t:"invalid_or_incomplete"}function MT(e,t){if(t)return"none";let n=String(e||"affine");return n==="affine_symmetric"||n==="affine_asymmetric"||n.startsWith("_undefined:")?"affine":n}function RT(e,t,n,i={}){if(e==null||e==="")return[];try{let o=JSON.parse(String(e));return Qv(Array.isArray(o)?o:[o],n,t,i)}catch{return t.push(`${n} must be a JSON number or array of numbers.`),[]}}function HG(e,t,n,i){if(e==null||e==="")return t==null?null:Sd(t);try{let o=JSON.parse(String(e));return o===null?null:Array.isArray(o)?Uv(o,i,n):(n.push(`${i} must be a JSON array.`),t==null?null:Sd(t))}catch{return n.push(`${i} must be a JSON array.`),t==null?null:Sd(t)}}function KG(e){return(Array.isArray(e)?e:[]).map(Number).filter(Number.isFinite)}function Qv(e,t,n,{integer:i=!1,positive:o=!1}={}){if(e==null)return[];if(!Array.isArray(e))return n.push(`${t} must be an array.`),[];let a=[];for(let[r,s]of e.entries())typeof s!="number"||!Number.isFinite(s)||i&&!Number.isSafeInteger(s)||o&&!(s>0)?n.push(`${t}[${r}] must be a ${o?"finite positive ":"finite "}${i?"integer":"number"}.`):a.push(s);return a}function Uv(e,t,n,{required:i=!1,nonNegative:o=!1}={}){return e==null?(i&&n.push(`${t} must be an array.`),[]):Array.isArray(e)?e.map((a,r)=>a==null?null:typeof a!="number"||!Number.isSafeInteger(a)||o&&a<0?(n.push(`${t}[${r}] must be ${o?"a non-negative integer or null":"an integer or null"}.`),null):a):(n.push(`${t} must be an array.`),[])}function ZG(e){return(Array.isArray(e)?e:[]).map(Number).filter(Number.isSafeInteger)}function Sd(e){return(Array.isArray(e)?e:[]).map(t=>t==null?null:Number(t))}function Wv(e){let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:null}function Td(e){let t=String(e||"").trim().toLowerCase();return FG.test(t)?t:""}function Gv(e,t,n){if(e==null||e==="")return null;let i=Td(e);return i||n.push(`${t} must be exactly 64 lowercase or uppercase hexadecimal characters.`),i||null}function ah(e,t,n,{positive:i=!1}={}){if(e==null||e==="")return null;let o=typeof e=="number"?e:Number(e);return!Number.isSafeInteger(o)||i&&o<=0?(n.push(`${t} must be ${i?"a positive":"an"} integer.`),null):o}function Vv(e,t){return`${Xv(e)}:${Wv(t)}`}function Al(e,t,n,i,o){return{parameter_id:e,field:t,expected:n,declared:i,evidence_pointer:o}}function Hv(e){return String(e).replaceAll("~","~0").replaceAll("/","~1")}var GT=new Set(["CONV_2D","DEPTHWISE_CONV_2D","FULLY_CONNECTED"]),$T=1e-5,LT=1e-6,PT=1e6,XG=[{id:"normalized_0_1",label:"[0,1] normalized",range:[0,1]},{id:"normalized_minus1_1",label:"[-1,1] normalized",range:[-1,1]},{id:"pixel_0_255",label:"[0,255] pixel domain",range:[0,255]},{id:"signed_code_identity",label:"[-128,127] signed-code identity",range:[-128,127],dtype:"INT8"}];function VT(e){let t=[],n=0;for(let o of e?.ops||[]){if(!GT.has(XT(o)))continue;let a=sh(e,o.inputs?.[0]),r=sh(e,o.inputs?.[1]),s=sh(e,o.inputs?.[2]),c=iV(a),u=UT(r),l=UT(s);if(!(c>0)||!u.length||!l.length)continue;let _=Math.max(u.length,l.length),p=0,d=null,m=[];for(let f=0;f<_;f+=1){let g=u[Math.min(f,u.length-1)],h=l[Math.min(f,l.length-1)],b=c*g;if(!(b>0)||!(h>0))continue;n+=1,m.push(h/g);let A=Math.abs(h-b)/b;(!d||A>p)&&(p=A,d={channel:f,actual:h,expected:b,relative_error:A})}t.push({op_index:o.index,op_name:o.name,input_tensor_index:wl(a),weight_tensor_index:wl(r),bias_tensor_index:wl(s),checked_channels:_,declared_input_scale:c,derived_input_scale_min:Math.min(...m),derived_input_scale_max:Math.max(...m),maximum_relative_error:p,status:p>$T?"fail":"pass",worst_channel:d,formula:"bias_scale[channel] == input_scale * weight_scale[channel]",evidence_json_pointer:`/evidence/static_analysis/ops/${o.index}`})}let i=t.filter(o=>o.status==="fail");return{status:t.length?i.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",checked_groups:t.length,checked_channels:n,mismatch_groups:i.length,maximum_relative_error:oV(t.map(o=>o.maximum_relative_error)),relative_tolerance:$T,method:"bias_scale[channel] == input_scale * weight_scale[channel]",details:t}}function HT(e){let t=new Map;for(let r of e?.ops||[]){if(!GT.has(XT(r)))continue;let s=sh(e,r.inputs?.[1]),c=wl(s);c==null||t.has(c)||t.set(c,{tensor:s,consumers:[]})}for(let r of e?.ops||[]){let s=Number(r.inputs?.[1]);t.has(s)&&t.get(s).consumers.push(r)}let n=[],i=0,o=0;for(let[r,{tensor:s,consumers:c}]of t){let u=String(s?.dtype||"").toUpperCase(),l=(s?.scale_sample||[]).map((h,b)=>({channel:b,scale:Number(h)})).filter(h=>h.scale>0&&Number.isFinite(h.scale));if(!["INT8","UINT8"].includes(u)||l.length<2)continue;let[_,p]=u==="INT8"?[-127,127]:[0,255],d=(s?.zero_point_sample||[]).map(Number),m=Math.max(...l.map(h=>h.scale)),f=Math.min(...l.map(h=>h.scale)),g=[];i+=l.length;for(let{channel:h,scale:b}of l){let A=Number.isFinite(d[h])?d[h]:Number.isFinite(d[0])?d[0]:0,y=Math.max(Math.abs(_-A),Math.abs(p-A)),x=b*y,v=m/b;x<=LT&&v>=PT&&g.push({channel:h,scale:b,zero_point:A,maximum_code_distance:y,maximum_representable_abs:x,maximum_to_channel_scale_ratio:v})}o+=g.length,n.push({tensor_index:r,tensor_name:s?.name||`T${r}`,dtype:u,quantized_dimension:Number(s?.quantized_dimension||0),declared_scale_count:Number(s?.quant_scales||s?.scale_sample?.length||0),assessed_channel_count:l.length,flagged_channel_count:g.length,minimum_scale:f,maximum_scale:m,maximum_to_minimum_scale_ratio:m/f,flagged_channels:g.slice(0,64),flagged_channel_sample_truncated:g.length>64,consumer_ops:c.slice(0,8).map(h=>`#${h.index} ${h.name}`),evidence_json_pointer:`/evidence/static_analysis/tensors/${r}`})}let a=n.filter(r=>r.flagged_channel_count>0);return{status:o?"review":n.length?"pass":"not_applicable",evidence_class:o?"DERIVED_WITH_HEURISTIC_THRESHOLD":"DERIVED",assessed_kernel_tensors:n.length,assessed_channels:i,flagged_kernel_tensors:a.length,flagged_channels:o,maximum_representable_abs_threshold:LT,scale_outlier_ratio_threshold:PT,method:"For each per-axis kernel channel, compute scale[channel] * max(|qmin-zp[channel]|, |qmax-zp[channel]|), using the TFLite symmetric INT8 weight domain [-127,127] and UINT8 [0,255]. Review only channels at or below 1e-6 whose scale is at least 1e6 below the tensor maximum.",interpretation_boundary:"The representable range and scale ratio are exact artifact-derived quantities. Thresholds are methodology heuristics; functional inactivity, QAT failure, and task-accuracy impact are not proven.",details:n}}function ch(e){let n=ea(e).parameters.flatMap(a=>{let r=a.quantization.scalar_real_code_domain;if(a.quantization.status!=="complete"||!r||!["INT8","UINT8"].includes(a.dtype))return[];let[s]=a.quantization.scales,[c]=a.quantization.zero_points;return[{role:a.direction,ordinal:a.ordinal,tensor_index:a.tensor_index,tensor_name:a.tensor_name,dtype:a.dtype,scale:s,zero_point:c,real_range:[r.real_min,r.real_max],tensor_numerical_contract_status:"known_from_artifact_quantization_metadata",source_data_to_tensor_preprocessing_status:"not_embedded_in_artifact",equation:`real_value = ${s} * (quantized_value - ${c})`,evidence_json_pointer:`/evidence/static_analysis/${a.direction}s/${a.ordinal}`}]}),i=n.filter(a=>a.role==="input"),o=n.filter(a=>a.role==="output");return{status:i.length||o.length?"pass":"not_applicable",evidence_class:"DERIVED",formula:"real_value = scale * (quantized_value - zero_point)",inputs:i,outputs:o}}function ea(e={}){let t=[...(e.inputs||[]).map((r,s)=>qT(e,r,"input",s)),...(e.outputs||[]).map((r,s)=>qT(e,r,"output",s))],n=t.filter(r=>r.quantization.status==="complete"),i=WG(t),o={schema:BT,hash_contract:{algorithm:"SHA-256",canonicalization:"RFC8785-JCS",method:"SHA-256 over UTF-8 RFC8785-JCS canonical JSON",selection:"containing_object_after_exclusions",excluded_json_pointers:["/ledger_sha256","/ledger_hash","/generated_at","/subject","/provenance"],interpretation:"Remove ledger_sha256, ledger_hash, and any document-envelope generated_at, subject, and provenance members from the ledger object; canonicalize the remaining contract with RFC8785-JCS, encode it as UTF-8, and hash it with SHA-256.",compatibility:"Per-parameter v1.1 JSON.stringify hashes remain inside each hash descriptor during schema migration."},parameter_count:t.length,quantized_parameter_count:n.length,unquantized_parameter_count:t.filter(r=>r.quantization.status==="not_quantized").length,invalid_or_incomplete_parameter_count:t.filter(r=>r.quantization.status==="invalid_or_incomplete").length,per_tensor_parameter_count:n.filter(r=>r.quantization.granularity==="per_tensor").length,per_axis_parameter_count:n.filter(r=>r.quantization.granularity==="per_axis").length,blocked_parameter_count:n.filter(r=>r.quantization.granularity==="blocked").length,distinct_complete_quantization_contract_count:new Set(n.map(r=>r.quantization.contract_sha256)).size,multiple_complete_quantization_contracts_within_artifact:new Set(n.map(r=>r.quantization.contract_sha256)).size>1,source_preprocessing_contract_status:JG(e),boundary_contract:i,parameters:t,interpretation_boundary:"The ledger records serialized boundary dtype, shape, and affine quantization facts and validates affine value/cardinality consistency. A FLOAT32 boundary is an explicit unquantized storage contract, not missing quantization metadata. This ledger alone does not establish RGB/BGR order, source-value normalization, mean/standard-deviation transforms, resize interpolation, application tensor layout, the production preprocessing implementation, mismatch prevalence, or task accuracy."},a=vl(o);return{...o,ledger_sha256:a,ledger_hash:zd(a,null,{selection:"containing_object_after_exclusions",excludedJsonPointers:["/ledger_sha256","/ledger_hash","/generated_at","/subject","/provenance"],interpretation:"Remove ledger_sha256, ledger_hash, and any document-envelope generated_at, subject, and provenance members from the ledger object; canonicalize the remaining contract with RFC8785-JCS, encode it as UTF-8, and hash it with SHA-256."})}}function WG(e=[]){let t=o=>{let a=o.filter(u=>u.quantization?.status==="complete").length,r=o.filter(u=>u.quantization?.status==="not_quantized").length,s=o.length-a-r,c="not_declared";return s>0?c="invalid_or_incomplete":o.length>0&&a===o.length?c="fully_affine_quantized":o.length>0&&r===o.length?c="fully_unquantized":o.length>0&&(c="mixed_quantized_unquantized"),{status:c,parameter_count:o.length,affine_quantized_parameter_count:a,unquantized_parameter_count:r,invalid_or_incomplete_parameter_count:s,float32_parameter_count:o.filter(u=>u.dtype==="FLOAT32").length,integer_parameter_count:o.filter(u=>["INT8","UINT8","INT16","UINT16","INT32","UINT32"].includes(u.dtype)).length}},n=e.filter(o=>o.direction==="input"),i=e.filter(o=>o.direction==="output");return{schema:"deepbom.interface_boundary_contract.v1",...t(e),inputs:t(n),outputs:t(i),recorded_facts:["direction","ordinal","dtype","shape","shape_signature","affine_quantization"],not_established_by_this_contract:["channel_order","source_value_domain","mean_standard_deviation_normalization","resize_interpolation","application_tensor_layout","semantic_labels"]}}function KT(e){let t=ch(e).inputs.map(i=>{let o=XG.filter(r=>!r.dtype||r.dtype===i.dtype).map(r=>{let s=(r.range[1]-r.range[0])/255,c=Math.max(Math.abs(i.real_range[0]-r.range[0]),Math.abs(i.real_range[1]-r.range[1])),u=Math.max(i.scale,s)*1.01;return{id:r.id,label:r.label,expected_real_range:r.range,maximum_endpoint_error:c,tolerance:u,matches_within_one_quantization_step:c<=u}}).sort((r,s)=>r.maximum_endpoint_error-s.maximum_endpoint_error||r.id.localeCompare(s.id)),a=o.filter(r=>r.matches_within_one_quantization_step);return{...i,status:a.length?"matched_common_convention":"no_common_full_domain_match",matched_convention_ids:a.map(r=>r.id),closest_convention:o[0]||null,convention_candidates:o}}),n=t.filter(i=>i.status==="no_common_full_domain_match");return{status:n.length?"review":t.length?"pass":"not_applicable",evidence_class:"DERIVED_RANGE_WITH_REFERENCE_HEURISTIC",assessed_inputs:t.length,unmatched_inputs:n.length,method:"Compute the exact full quantized-code real range from artifact scale/zero-point metadata. Compare its two endpoints with common [0,1], [-1,1], [0,255], and applicable signed-code identity conventions using a tolerance of one quantization step.",interpretation_boundary:"The real range is artifact-derived. Convention matching is a reference heuristic: an unmatched custom range can be intentional and does not prove bad calibration or an application bug. The production decoder, channel order, resize, normalization, and quantizer remain unobserved until separately bound.",details:t}}function qT(e,t,n,i){let o=jT(t?.interface_scale_values,t?.scale_sample),a=jT(t?.interface_zero_point_values,t?.zero_point_sample),r=QT(t?.quant_scales,o.length),s=QT(t?.quant_zero_points,a.length),c=o.slice(0,r),u=a.slice(0,s),l=Array.isArray(t?.shape)?t.shape.map(Number):[],_=Number.isSafeInteger(Number(t?.quantized_dimension))?Number(t.quantized_dimension):null,p=r===0&&s===0&&!o.length&&!a.length,d=String(t?.quantization_parameterization||"").toLowerCase().replaceAll("-","_"),m=p?"not_quantized":d==="blocked"?"blocked":r===1&&s===1?"per_tensor":r>1&&s>0?"per_axis":"invalid_or_incomplete",f=eV(t?.quantization_block_size),g=YG(m,r,s,_,l,f,t?.quantization_scale_tensor_shape,t?.quantization_cardinality_status,t?.quantization_cardinality_detail),h=nV(t?.dtype),b=o.length===r&&a.length===s&&c.every(D=>Number.isFinite(D)&&D>0)&&u.every(D=>Number.isSafeInteger(D)&&h&&D>=h[0]&&D<=h[1]),A=p?"not_quantized":b&&g.status==="valid"?"complete":"invalid_or_incomplete",y=Kv({status:A,scheme:A==="not_quantized"?"none":"affine",granularity:m,parameterization:m,scales:c,zeroPoints:u,axis:["per_axis","blocked"].includes(m)?_:null,blockSize:f}),x=p?"not_quantized":r===1&&s===1?"per_tensor":r>1&&s>0?"per_axis":"invalid_or_incomplete",v={scheme:A==="not_quantized"?"none":"affine",granularity:x,scales:c,zero_points:u,axis:x==="per_axis"?_:null},I=vl(y),w={...y,quantized_dimension:_,axis_source:t?.quantization_axis_source||null,scale_tensor_shape:FT(t?.quantization_scale_tensor_shape,r),zero_point_tensor_shape:FT(t?.quantization_zero_point_tensor_shape,s)},N=vl(w),S={status:A,...y,affine_mapping_status:A==="not_quantized"?"no_affine_mapping_declared":A==="complete"?"complete_affine_mapping":"invalid_or_incomplete_affine_mapping",scheme_evidence:A==="not_quantized"?"not_applicable":"generic_affine_equation_observed_symmetry_not_encoded",symmetry_classification:A==="not_quantized"?"not_applicable":"not_encoded",scale_count:r,zero_point_count:s,scale_values_complete:o.length===r,zero_point_values_complete:a.length===s,quantized_dimension:_,axis_source:t?.quantization_axis_source||null,axis_applicable:["per_axis","blocked"].includes(m),quantized_dimension_role:["per_axis","blocked"].includes(m)?"semantic_affine_axis":_==null?"not_serialized":"serialized_default_not_semantic_axis",block_size:f,scale_tensor_shape:w.scale_tensor_shape,zero_point_tensor_shape:w.zero_point_tensor_shape,value_vector_shape_basis:[t?.quantization_scale_tensor_shape,t?.quantization_zero_point_tensor_shape].some(D=>Array.isArray(D)&&D.length)?"serialized_or_source_inferred_tensor_shape":A==="not_quantized"?"not_applicable":"derived_flat_affine_value_vector",cardinality_status:g.status,cardinality_reason:g.reason,scalar_real_code_domain:tV(h,c,u),contract_sha256:I,contract_hash:zd(I,rh(v),{includedJsonPointers:["/status","/scheme","/granularity","/parameterization","/scales","/zero_points","/axis","/block_size"],legacyOrderedPayloadFields:["scheme","granularity","scales","zero_points","axis"]}),serialized_quantization_sha256:N,serialized_quantization_hash:zd(N,rh({...v,quantized_dimension:_}),{includedJsonPointers:["/status","/scheme","/granularity","/parameterization","/scales","/zero_points","/axis","/block_size","/quantized_dimension","/axis_source","/scale_tensor_shape","/zero_point_tensor_shape"],legacyOrderedPayloadFields:["scheme","granularity","scales","zero_points","axis","quantized_dimension"]})},O=n==="input"?(e.input_contracts||[]).find(D=>Number(D.tensor_index)===Number(t?.index)):null,B={parameter_id:`${n}:${i}:T${wl(t)??i}`,direction:n,ordinal:i,tensor_index:wl(t),tensor_name:t?.name||"",dtype:String(t?.dtype||"UNKNOWN").toUpperCase(),shape:l,shape_signature:Array.isArray(t?.shape_signature)&&t.shape_signature.length?t.shape_signature.map(Number):null,source_data_to_tensor_preprocessing_status:n==="output"?"not_applicable":ZT(O?.source_data_to_tensor_preprocessing_status),quantization:S},k={direction:n,ordinal:i,name:B.tensor_name,dtype:B.dtype,shape:l,shape_signature:B.shape_signature,quantization:v};return B.interface_contract_sha256=vl(oh(B)),B.interface_contract_hash=zd(B.interface_contract_sha256,rh(k),{includedJsonPointers:["/direction","/ordinal","/tensor_name","/dtype","/shape","/shape_signature","/quantization/status","/quantization/scheme","/quantization/granularity","/quantization/parameterization","/quantization/scales","/quantization/zero_points","/quantization/axis","/quantization/block_size"],legacyOrderedPayloadFields:["direction","ordinal","name","dtype","shape","shape_signature","quantization"]}),B}function YG(e,t,n,i,o,a,r,s,c){if(e==="not_quantized")return{status:"valid",reason:"No affine parameters are declared."};if(e==="per_tensor")return{status:"valid",reason:"One scale and one zero-point are declared."};if(e==="blocked"){if(s==="fail")return{status:"invalid",reason:c||"ONNX blocked-quantization cardinality is invalid."};if(!Number.isSafeInteger(i)||i<0||i>=o.length||!(a>0)||!Array.isArray(r)||r.length!==o.length||t!==n)return{status:"invalid",reason:"Blocked quantization requires a valid axis, positive block size, rank-matched scale shape, and matching scale/zero-point counts."};let l=o.map((d,m)=>m===i?Math.ceil(Number(d)/a):Number(d)),_=l.every((d,m)=>Number.isSafeInteger(d)&&d>=0&&d===Number(r[m])),p=_?l.reduce((d,m)=>d*m,1):null;return _&&Number.isSafeInteger(p)&&t===p?{status:"valid",reason:`Scale tensor shape and ${t} affine value(s) match blocked axis ${i} with block size ${a}.`}:{status:"invalid",reason:`Blocked quantization expected shape ${JSON.stringify(l)} and ${p??"unresolved"} affine value(s); observed scale shape ${JSON.stringify(r)} and ${t}/${n} scale/zero-point value(s).`}}if(e!=="per_axis"||!Number.isSafeInteger(i)||i<0||i>=o.length||t!==n)return{status:"invalid",reason:"Per-axis scale and zero-point cardinality requires a valid serialized axis."};let u=Number(o[i]);return!Number.isSafeInteger(u)||u<0?{status:"not_assessable",reason:`Shape dimension ${i} is dynamic or unbound; serialized vectors remain preserved.`}:u===t?{status:"valid",reason:`${t} scale(s) and zero-point(s) index shape dimension ${i}.`}:{status:"invalid",reason:`Expected ${u} scale(s) and zero-point(s) for shape dimension ${i}; found ${t}/${n}.`}}function jT(e,t){return(Array.isArray(e)?e:Array.isArray(t)?t:[]).map(Number)}function FT(e,t){return Array.isArray(e)&&e.length?e.map(n=>n==null?null:Number(n)):Number.isSafeInteger(t)&&t>0?[t]:null}function ZT(e){let t=String(e||"").trim().toLowerCase();return["embedded_in_artifact","declared_in_artifact","present"].includes(t)?"embedded_in_artifact":["not_applicable"].includes(t)?"not_applicable":"not_embedded_in_artifact"}function JG(e){if(!(Array.isArray(e?.inputs)?e.inputs:[]).length)return"not_applicable";let n=e?.metadata_presence?.preprocessing_contract_status;return ZT(n)}function eV(e){let t=Number(e);return Number.isSafeInteger(t)&&t>0?t:null}function tV(e,t,n){return!e||t.length!==1||n.length!==1?null:{qmin:e[0],qmax:e[1],real_min:(e[0]-n[0])*t[0],real_max:(e[1]-n[0])*t[0],formula:"real=(q-zero_point)*scale"}}function nV(e){return{UINT8:[0,255],INT8:[-128,127],UINT16:[0,65535],INT16:[-32768,32767],UINT32:[0,4294967295],INT32:[-2147483648,2147483647]}[String(e||"").toUpperCase()]||null}function QT(e,t){let n=Number(e);return Number.isSafeInteger(n)&&n>=0?n:t}function sh(e,t){let n=Number(t);return Number.isInteger(n)&&n>=0?(e?.tensors||[])[n]:null}function wl(e){let t=Number.isInteger(e?.index)?e.index:Number(e?.tensor_index);return Number.isInteger(t)&&t>=0?t:null}function iV(e){return Number(e?.scale_sample?.[0]||0)}function UT(e){return(e?.scale_sample||[]).map(Number).filter(t=>t>0&&Number.isFinite(t))}function XT(e){return String(e?.name||"").toUpperCase()}function oV(e){return e.length?Math.max(...e.map(t=>Number(t||0))):0}Me();function Yv(e=[]){return e.some(t=>Array.isArray(t?.shape_signature)&&t.shape_signature.some(n=>Number(n)<0))}function Jv(e=[]){return e.filter(n=>Array.isArray(n?.shape_signature)&&n.shape_signature.some(i=>Number(i)<0)).map(n=>`${n.name||"tensor"}:${l_(n)}`).join(" / ")}function lh(e){let t=e?.predicted_partition_boundaries;return t?.schema==="deepbom.predicted_partition_boundary_edges.v1.1"?t:null}function Od(e){if(e?.quantization_status?.label)return e.quantization_status;let t=String(e?.format||"tflite").toLowerCase();if(!["tflite","onnx"].includes(t))return{classification:"not_assessed_format_contract_unbound",label:"Quantization not assessed",summary:`No normalized ${t||"serialized-artifact"} quantization contract was emitted.`,detail:"Absence of a normalized quantization contract is not evidence that stored tensors or executed kernels are floating-point.",quantized_tensor_percent:null,quantized_compute_mac_percent:null,compute_macs:null,quantized_compute_macs:null,op_state_counts:[],full_integer:null};let n=Number(e?.quantized_tensors||0),i=Number(e?.tensor_count||0),o=i?n/i:0;return{classification:n?"quantization_signals":"not_quantized_float",label:n?"Quantization signals detected":"Not quantized",summary:n?"Quantized tensor or op signals present.":"No quantized tensor or op signal detected.",detail:n?`${C(n)}/${C(i)} tensors quantized (${nn(o)}).`:"",quantized_tensor_percent:o,quantized_compute_mac_percent:0,compute_macs:0,quantized_compute_macs:0,op_state_counts:[{name:"none",count:(e?.ops||[]).length}],full_integer:!1}}function aV(e,t={}){let n=e?.bottleneck_assessment_status==="not_assessed"||e?.macs_status==="not_assessed"||e?.estimated_bytes_status==="not_assessed"||e?.intensity_status==="not_assessed",i=e?.bottleneck_total_us!=null&&Number.isFinite(Number(e.bottleneck_total_us));if(n||!i)return{assessed:!1,reason:e?.bottleneck_reason||e?.macs_reason||e?.estimated_bytes_reason||"required shape, dtype, or target cost inputs are unavailable",computeUs:null,memoryUs:null,packingUs:null,breakUs:null,fallbackUs:null,totalUs:null,coldStartUs:null,steadyStateUs:null,dominantTone:"not-assessed",dominantLabel:"not assessed"};let o=Number(e.bottleneck_compute_us??0),a=Number(e.bottleneck_memory_us??0),r=Number(e.bottleneck_packing_us??0),s=Number(e.bottleneck_break_us??0),c=Number(e.bottleneck_fallback_us??0),u=Number(e.bottleneck_total_us??0),l=Math.max(0,u-r-s),_=e.bottleneck_dominant||"memory",p={compute:"compute-bound",memory:"memory-bound",packing:"packing",break:"break",fallback:"fallback"},d={compute:"compute",memory:"memory traffic",packing:"weight packing",break:"partition planning setup",fallback:"fallback traffic"};return{assessed:!0,reason:null,computeUs:o,memoryUs:a,packingUs:r,breakUs:s,fallbackUs:c,totalUs:u,coldStartUs:u,steadyStateUs:l,dominantTone:p[_]||_,dominantLabel:d[_]||_}}function WT(e,t={},{limit:n=12,operatingPoint:i="steady"}={}){let a=(Array.isArray(e?.ops)?e.ops:[]).map(u=>{let l=aV(u,t),_=i==="cold"?l.coldStartUs:l.steadyStateUs;return{op:u,estimate:{...l,totalUs:_},operatingPoint:i}}).filter(u=>u.estimate.totalUs>0).sort((u,l)=>l.estimate.totalUs-u.estimate.totalUs||Number(u.op.index)-Number(l.op.index)),r=a.slice(0,n),s=nb(a.map(u=>u.estimate.totalUs)),c=nb(r.map(u=>u.estimate.totalUs));return{rows:a,top:r,totalUs:s,topUs:c,otherUs:Math.max(0,s-c)}}function YT(e){let t=Od(e),n=Array.isArray(e?.ops)?e.ops:[],i=String(e?.format||"tflite").toLowerCase(),o=t.op_state_counts||tx(n.map(l=>l.quantization_state||"none")),a=o.filter(l=>["movement","boundary","requantization"].some(_=>String(l.name||"").includes(_))).reduce((l,_)=>l+Number(_.count||0),0),r=o.filter(l=>l.name!=="none").reduce((l,_)=>l+Number(_.count||0),0),s=i==="tflite",c=s?n.filter(l=>Number(l.xnnpack_chain_id)<0).length:null,u=s?n.filter(l=>Number(l.xnnpack_chain_id)<0&&!Number(l.macs||0)).length:null;return{compute_ops_denominator:Number(t.compute_ops||0),quantized_compute_ops:Number(t.quantized_compute_ops||0),quantized_compute_mac_percent:t.quantized_compute_mac_percent==null?null:Number(t.quantized_compute_mac_percent),compute_macs:t.compute_macs==null?null:Number(t.compute_macs),quantized_compute_macs:t.quantized_compute_macs==null?null:Number(t.quantized_compute_macs),all_ops_denominator:n.length,quantized_or_boundary_state_ops:r,quantized_data_movement_or_boundary_ops:a,op_state_counts:o,xnnpack_fallback_or_break_ops:c,zero_mac_fallback_or_break_ops:u,explanation:s?"compute_ops counts MAC-bearing compute operators only; op_state_counts covers every graph operator, including zero-MAC data movement and quantization boundary ops. XNNPACK fallback/break counts are a delegate partition concept and can overlap with quantized_data_movement.":i==="onnx"?"compute_ops counts MAC-bearing compute operators only; op_state_counts covers every graph operator, including Q/DQ boundaries. Execution-provider assignment is a separate source-backed or observed runtime contract.":"This serialized format has no TFLite XNNPACK scope. Quantization state is reported only when a normalized format-specific storage or numerical contract is emitted; absence is NOT_ASSESSED, not zero or floating-point proof."}}function JT(e){let t=e.channel_alignment_status||"none",n=(e.xnnpack_kernel_alignment_multiples||[]).length?e.xnnpack_kernel_alignment_multiples.map(i=>`x${i}`).join("/"):`x${e.channel_alignment_multiple}`;if(t==="misaligned"){let i=Number(e.channel_tail_overhead_percent_min??e.channel_tail_overhead_percent??0),o=Number(e.channel_tail_overhead_percent_max??e.channel_tail_overhead_percent??0);return`C${e.output_channels} vs ${n} / ${Tp(i,o)} tail`}return t==="aligned"?`aligned ${n}`:"-"}nm();var Nr="96a10f289e68fba71d0724e57a68b82bc795aaae",uh="clean";var xl="e8cc84a3ce1996c25e81114b68e8f44a1f665f0eb730ec6db80f4f915d60a2f3",e5="SHA-256 over RFC8785-JCS canonical deepbom.analyzer_build_file_digest_set.v1",t5=Object.freeze(["509 files","SHA-256 over RFC8785-JCS canonical deepbom.analyzer_build_file_digest_set.v1","manifest deepbom.analyzer_build_content_manifest.v1 SHA-256 3736c3ee08c286c75276b4bad3b41eae316e779ce505a6252c5d7dedd62e3e0b","roots: web, pkg/tflite_wasm_audit.js, pkg/tflite_wasm_audit_bg.wasm, package.json, package-lock.json, Cargo.toml, Cargo.lock, build.rs, src, wrangler.jsonc, worker","file excludes: **/.gitignore, web/lib/build-metadata.js, web/samples/mobilenet_v1_025_224_float.tflite, web/samples/sample_cnn_float.onnx","file exclude patterns: ^web\\/lib\\/cyclonedx-(?:20|draft|perspective)(?:-|\\.|$), ^web\\/vendor\\/jsonpath-rfc95\\d+(?:\\.|$)","directory excludes: .git, .wrangler, dist, node_modules, target, web/protected"]),n5="3736c3ee08c286c75276b4bad3b41eae316e779ce505a6252c5d7dedd62e3e0b",rV=Object.freeze({schema:"deepbom.analyzer_build_content_manifest.v1",content_digest:{sha256:"e8cc84a3ce1996c25e81114b68e8f44a1f665f0eb730ec6db80f4f915d60a2f3",method:"SHA-256 over RFC8785-JCS canonical deepbom.analyzer_build_file_digest_set.v1",canonicalization:"RFC8785-JCS",digest_set_schema:"deepbom.analyzer_build_file_digest_set.v1"},selection:{roots:["web","pkg/tflite_wasm_audit.js","pkg/tflite_wasm_audit_bg.wasm","package.json","package-lock.json","Cargo.toml","Cargo.lock","build.rs","src","wrangler.jsonc","worker"],file_excludes:["**/.gitignore","web/lib/build-metadata.js","web/samples/mobilenet_v1_025_224_float.tflite","web/samples/sample_cnn_float.onnx"],file_exclude_patterns:["^web\\/lib\\/cyclonedx-(?:20|draft|perspective)(?:-|\\.|$)","^web\\/vendor\\/jsonpath-rfc95\\d+(?:\\.|$)"],directory_excludes:[".git",".wrangler","dist","node_modules","target","web/protected"],ordering:"UTF-16 code-unit ascending normalized relative paths",path_separator:"/"},generator:{path:"scripts/write-build-metadata.mjs",sha256:"7e2b79958db6a42eb071bf044c08ebe4c8d981421b708be89ff1623e04b802e9",toolchain:{node:"v24.12.0",npm:"11.6.2",rustc:"rustc 1.85.0 (4d91de4e4 2025-02-17)",wasm_pack:"not_available"}},release_inputs:{app_expires_at_epoch_ms:"not_set",app_not_before_epoch_ms:"not_set",app_expiry_days:"not_set"},files:[{path:"Cargo.lock",size:8653,sha256:"34bc474406f9aa1f058fa3433554aae826a7ed2579790cdd2d0ecfe6fe404e1b"},{path:"Cargo.toml",size:982,sha256:"ffee3119e33c8ef9e6aa01ba6fc8c1c3d21e25882912a7a185f6b7bb29f9a2dc"},{path:"build.rs",size:3393,sha256:"960c883d1778e57786f589f915f400145098eaab78d27751bb8604302d0ddd89"},{path:"package-lock.json",size:41289,sha256:"15f3675ea21d84389eaa15c3d98659d4903c90c620a5708e036f1c9fc99923f4"},{path:"package.json",size:27175,sha256:"6c24bf49ec258d515b440d35ec6e06b1be60cd72d05f5e26daaa205e2f500f02"},{path:"pkg/tflite_wasm_audit.js",size:45969,sha256:"159ad6c3596d4d2b3281e8dd01e02d77cc54e062def65ef56225919c06f903d4"},{path:"pkg/tflite_wasm_audit_bg.wasm",size:2024135,sha256:"bcc9e81d9d7929d29b6e510328eb840af3c0e66387c350dc02b7282271dded87"},{path:"src/accumulator_atlas.rs",size:46553,sha256:"a6b31b87ae4ffa909b341d6801cd46ad5d7cd983440302a29e4c411e1657ee6e"},{path:"src/accumulator_reachability.rs",size:62117,sha256:"8a8245b7ca55a695448b1d40080130eff9af447e28bcf56f1dd3a285141188b6"},{path:"src/arena_planner.rs",size:32022,sha256:"79685a98c8374f6d085b5dd78a91b4c3824e4a803b946631c7161b9dda7afa8a"},{path:"src/artifact_byte_ledger.rs",size:14015,sha256:"68ccbc5ee010240ff46989cde9abbc7d88dc4a2a5248fde30efa7736985bd1ae"},{path:"src/block_inventory.rs",size:26908,sha256:"b0ec8f692d40bfdafe35fb6256c195955c7d7b1e10c5483958807950bcc7dbdb"},{path:"src/channel_vitality.rs",size:32833,sha256:"ce68dbb8ffc9be3ba141a7d11b907169d80ac8fb7b662997c31100e54fe59824"},{path:"src/contract_migration.rs",size:45328,sha256:"0732ac3237f53406514b44e4d856336918574770e3a9d37cb862954e464a4e54"},{path:"src/core_isolation.rs",size:13006,sha256:"29c399fd8c5ac4b5509469331dea6c6a6c552a6f5d58b4f167f27c392fbe2a74"},{path:"src/delegation_repair.rs",size:67754,sha256:"95960374174b5ae27a210b5f61c0fe00aba62769032780d4fdb2988fb78b2b38"},{path:"src/deployment_delta.rs",size:42067,sha256:"30643afb3862f6e03ffe08155435cca9a2adc79b95675c64f1ad0fa9215e734b"},{path:"src/deployment_frontier.rs",size:46821,sha256:"305231d5dc0fb9ea579c99f71afa93ae927662f4301ac134b91bf82f8540e462"},{path:"src/dynamic_shape_cost.rs",size:41761,sha256:"3d3b388b91c9b296806fd355a5c795518d1024bcefb3a10b816fc5cdd620126e"},{path:"src/findings.rs",size:26187,sha256:"afcbb7e1cd591d1c3d183a3af33059b24beb281cc64ccc73c9dab640c8c6e250"},{path:"src/influence.rs",size:31221,sha256:"57c266fe2b5867752b4b6016987c46dd750739fa157a63fa6ec5400bca405b0e"},{path:"src/input_counterexample.rs",size:37154,sha256:"0b5ef36751ba52d87564c23885bd843b80dd2627ec1de1446fcad5a5842fdb98"},{path:"src/kernel_witness.rs",size:43799,sha256:"9958b9236abe0ba8df3a749e752f65445163518ba7f583dbeb933ac7e7234ac8"},{path:"src/lib.rs",size:416739,sha256:"bdad60b55f2d1e9c4889c73faf25b6e6f467f0e6f2b17667beadbbe12dd96aa9"},{path:"src/numerical_abi_propagation.rs",size:60335,sha256:"35b2777392eb8fe2d124c69db57bee980d520664134a74f99d8e9dc47d41cbb5"},{path:"src/preprocessing.rs",size:3411,sha256:"a7e97957fa6e31f3bc20692cb0150afee4aa6cc96a3fbae6435029bf20c3325c"},{path:"src/preprocessing_realizability.rs",size:32978,sha256:"0bf81db4c5a7a591c851878ee11d6267d86f0594430af2d5c941120df0f8c7e0"},{path:"src/quantization_lattice.rs",size:67401,sha256:"06ba1170fa9b045dfb4ca55bb4560ecba36128dc7125f02c3ea41d7772587810"},{path:"src/quantization_math.rs",size:4910,sha256:"95eeea699b4b0638b8f4dfe6a27322617a3dc5d9c657d6111e18eef4364b9e96"},{path:"src/redesign.rs",size:105473,sha256:"dce122c6a17e6b2d2f421d2a303f9729355eb545c56f6e6e486b0bbb85d7495c"},{path:"src/report_exports.rs",size:8763,sha256:"837bbba549024c0c6e3d83ebec7aa14d50abd5699cf5712357b0eb2011515253"},{path:"src/requantization_fidelity.rs",size:38059,sha256:"690521a1aafb6aa6813c6736bc51142168ab894f43163f8c43ecfff1d917a11d"},{path:"src/research.rs",size:88981,sha256:"feeeee19c76fa2595c3ce46993adfd25b2bcbb633264d74aa22e94bcfb697d8d"},{path:"src/residual_contract_distortion.rs",size:32489,sha256:"78c43d9e5cde42b281a470dc1df01a6fdcb14090ff66cfd633dd6d1d92ce56ba"},{path:"src/residual_step_response.rs",size:29975,sha256:"8977a79c0017aaa4ebdeb2842956cae379ba6ba6808fe4f8d0cc775af057f178"},{path:"src/rounding_equivalence.rs",size:42588,sha256:"8b5caa0317585c6a0f3b078b4f70713877a6acbb6a2b7f991ebcac79748f92c6"},{path:"src/runtime_version.rs",size:8155,sha256:"402dd8253de3d6b05401c06abc493970fef1661901c07d8e2ddefea19703c37f"},{path:"src/target_profiles.rs",size:55538,sha256:"583b81002dcb4a01f63db1855199c95abd0d35864302b54990a6549bc3efbf1e"},{path:"src/tflite_deep_scopes.rs",size:18853,sha256:"f19829a8a494f2d7bab91ecef4372b3da13b4ccb150897d4d48b026b037c1307"},{path:"src/tflite_metadata.rs",size:70796,sha256:"284cefcf609521d905ecd72dc96e0c52191b0302cd576d5249619172219c7b73"},{path:"src/tflite_operator_names.rs",size:7686,sha256:"5b9449896fd92fbc73f9630ff8e8c108f933451c21e305c912232fc7ee389b14"},{path:"src/tflite_scalar.rs",size:1968,sha256:"ebfdfb2c2800225ea3e8e228a7fd425c4f7f405b0fdff2d78305c4946832c871"},{path:"src/tflite_shape_reconciliation.rs",size:13971,sha256:"c04925d5d91b57264b0f55f72b9feb223c2adb0723415622ce414b47a3223899"},{path:"src/tflite_sparse.rs",size:29251,sha256:"e194f4fa4b1e9a996030209814553f6a0343707b6972dd4eec4c3e477e06d690"},{path:"src/tflite_subgraphs.rs",size:54776,sha256:"3ecdffd7b561b38a0d0919d5470cfd0c2e85fa6ea9a45b6a1f01fc0356abdaf0"},{path:"src/verified_flatbuffer.rs",size:45062,sha256:"a532d8eb2443dedbf80c78dffba95dd5fbcf8117e1b066f7a0ac2d98c13cb1fe"},{path:"src/xnnpack_delegate.rs",size:28807,sha256:"9dab20824659a49e3a4266e74f65072c978bd1fc9b50f3ff8a75a0194da02d96"},{path:"src/xnnpack_rulepack_generated.rs",size:23539,sha256:"b8c31b73e1fc73b6e0d62ad444cfbd458976b94b239fea6029b1652f3a370942"},{path:"web/.well-known/deepbom-signing-keys.json",size:1530,sha256:"5cafa768e6a6582a9bc3f1fb297de7f773847df381f07dc40950f117c87b411f"},{path:"web/NOTICE.txt",size:1578,sha256:"45c9946fdf5a43ae15350b15091f914b00db836b3da91489bc0dc2153aad4cd1"},{path:"web/admin.html",size:5194,sha256:"8be11962cc1d037b42f6711624ab79137aa829ac320d82379a4a289898226c7f"},{path:"web/admin.js",size:19835,sha256:"a5ba57fed53487be1ac145c4b4bf1c27ed3b735847e7f4f7030f701b75edbc18"},{path:"web/app-shell.css",size:42903,sha256:"6db915c3ca5db059778afee834079343c312a16fbcd56a97c7baf1e3a0caa858"},{path:"web/app.js",size:316407,sha256:"cb147c6a7a74fdb63b2b297bf596904374e0ce6f74c169f090d48b5e949831f9"},{path:"web/auth-complete.html",size:443,sha256:"ccc97a6fbee9297366afaad4b7dbfcff2ff9922febc79d71fe0f4d2384b0b5a9"},{path:"web/auth-complete.js",size:797,sha256:"1b5ee5a15f4988bc90148aa8dad5970ce317c43999911257237b127457679e81"},{path:"web/bootstrap.js",size:5069,sha256:"98e3fce5b314c004f6fc91bc35fe2d87a67ba0c42a6aee889fb87c2b1b98a583"},{path:"web/chatgpt/deepbom-app-icon.svg",size:3996,sha256:"03a03b3c520807bc7c2c991c8a89cd589eaf3a7603311d2403d5d8bac5a1c8c9"},{path:"web/chatgpt/deepbom-widget.js",size:57874,sha256:"f29ac76f3d71317e42f3a943e842d4c2e72cd878c4fb9ad40e670a6e7c03486c"},{path:"web/chatgpt/index.html",size:7238,sha256:"432754369fbaf9c7bd8d67afe1ff6d4975c9c497b0d159d3105dcbb67c5113f3"},{path:"web/claude/deepbom-widget.js",size:21485,sha256:"95e8b26836e5ce42606443d0b1d20e0e2ce07c15a7b71f76824161977463f99a"},{path:"web/claude/index.html",size:6365,sha256:"e85cb2471029662e3b8f90f148f0832e5ecdd7962d591b9f5d052f82b0b9a5dc"},{path:"web/device-workspace.css",size:56024,sha256:"19b93b67e4e7f5210427619162f0a8c181ee2f832f71cb092bafa41908ac8c97"},{path:"web/evaluate/engineering/index.html",size:6874,sha256:"59e4721dd0b2d46be142c0ecb60c94ac506ca52d92f738fdad25e1fc607cb099"},{path:"web/evaluate/evaluation.css",size:8436,sha256:"4464acc9390c1d46f1c1eeaa880fc53c13ddbd283a00f92ab82db4005b2f3826"},{path:"web/evaluate/index.html",size:2753,sha256:"c1b78267ad4d76275ae7da55746df9caaa1512d9b5c289b423fbf0f28bc7b311"},{path:"web/evaluate/quality/index.html",size:6510,sha256:"1fba2553f2a3a6153edbe9ef305dd3c8d9645e7e12ca52035522c4c59d18eabf"},{path:"web/evaluate/regulatory/index.html",size:6900,sha256:"d3b5d26f469768da02bd7b7734764280cf9d9623d5305416018cb4293f5c0e98"},{path:"web/execution-placement.css",size:18450,sha256:"ddc3567a6e0a4fe8546668c75685d94a00c4e8d058f9b37f8619904760a0294b"},{path:"web/executorch.js",size:83992,sha256:"1686486d11863ab19e96c736efa373a405a9656bd99941e5658830f083b18d9b"},{path:"web/explorer-evidence.css",size:20142,sha256:"5f28e5ea2822f739ad17ad417ddbfa0664926b8b99b848e48583b672952bfbf9"},{path:"web/explorer-question.css",size:2509,sha256:"3ba6e11e29b61deb4099d5f3f03a3e8fc10ffc0dd4d83599b7dce2cefc3bdbec"},{path:"web/explorer-redesign.css",size:25473,sha256:"6d3a36b4e8909461c62abcd5dd71a3e193dbcbc4f3f5bd0e0c45da1d9684b53a"},{path:"web/for-agents/index.html",size:10286,sha256:"7b7201f6f6e774ed95989038eb4f43bcdf5d4d2e8baebfe46738d74d3a469fbe"},{path:"web/get-started/index.html",size:34103,sha256:"41aab2367f683fdde3868b472783478fbde8ac00ea91c9884fb6e8ef86a9a66a"},{path:"web/get-started/setup.css",size:8603,sha256:"bd09cd804051a9c4dffaca52395d84ce08402cbc137187e2864114178111184a"},{path:"web/get-started/setup.js",size:2257,sha256:"3ae032a5f402310ce6aba588922dfe295b2e02571283f188eab8b859a99740e9"},{path:"web/guides/cli/book.css",size:6265,sha256:"bf7d5f1e680e258d9ec9ceb95201e10815074ee57c2de6aa6a47027654e4abec"},{path:"web/guides/cli/book.js",size:1854,sha256:"297723521764b6debe9ac48ddb7beb99807f8be34373096f50411211d2acf9aa"},{path:"web/guides/cli/index.html",size:23126,sha256:"2cbca39e3e15619b1c47f1f90cbf09e7244d21b870f3bea8aa8c014f74d742f4"},{path:"web/guides/cli/reference/help.txt",size:12049,sha256:"7fd58727a73f35236234ed76b973c0eba0e2288696ee36299ecdafd2ce99e6ab"},{path:"web/guides/cli/reference/index.html",size:22713,sha256:"2765e18a39dd8ea33f547f3d993bbee1a718e877c3f7f303fe9ed6e0cd3ddc68"},{path:"web/guides/compare-model-artifacts/index.html",size:3570,sha256:"00d91fa6f4d95b4afb233ddbe337bf8f235e8d7c044341d1b9f5d3d7285a0988"},{path:"web/guides/index.html",size:3841,sha256:"0e1bf7e2302b44ff8c3332c91ecc878c368174cf2eec2a4f96257a77fb6bd4bd"},{path:"web/guides/inspect-gguf-tensor-encodings/index.html",size:3685,sha256:"a4532bb71c302b2a4f87643caaeb516a0ef20b06b81031197c22e61856746074"},{path:"web/guides/inspect-onnx-quantization/index.html",size:4019,sha256:"09ed170851a15b9c4a6d6aeb27b6a2f4cd3621c852804037eac9cf97155d8f6a"},{path:"web/guides/numerical-evidence/index.html",size:14818,sha256:"de48aaa734adc30e0da921a556d1f1c5e18043f3b6a0594c48e374bb94ba3eeb"},{path:"web/index.html",size:141957,sha256:"42b8ca5d7b71ca027a0fd0e58dfefe4d47870a610f97f448630b46fdf75e88c5"},{path:"web/legal/privacy.html",size:10234,sha256:"607719c60f0fd1e3022807f931d34da27f1dfc8af97b19783c2168c4db0ac212"},{path:"web/legal/support.html",size:1888,sha256:"cd032e5c8a8112a766d501b503e8147c8f6dee7c44d02ef8809b2bb18cc31678"},{path:"web/legal/terms.html",size:1838,sha256:"c328f60488292a230b023a52e2768303555ea9e605ecb5bf0038283b3f3d82fb"},{path:"web/lib/accelerator-binding.js",size:28908,sha256:"541826e43577417d95cd198855af33440cc4134c6e48fec63e61915f7751e4e6"},{path:"web/lib/accelerator-profile-binding.js",size:10120,sha256:"39fc9daa7b939a80005eaa7ebb54c032e4cc5488e07d663c4f6c47055cd08e53"},{path:"web/lib/accelerator-profile-switcher.js",size:4439,sha256:"742bae0a24339e4e802278ed2c207da80453ab9e8eefe7edeee63ec92cbcd315"},{path:"web/lib/access-policy.js",size:877,sha256:"d0a7f1b7fbbc17a9703fca47bfbce5fc8007345fc47926f01d9fa5cd175133bc"},{path:"web/lib/account-ui.js",size:4576,sha256:"0ad59404b936d73c39f1bbbac3129b4097d61e088ebbc736e38c09d7aa913fe1"},{path:"web/lib/accumulator-atlas.js",size:50145,sha256:"1462db21afe2b1a2236fc5022c82d3ea74ecceb16525705e3cb08f9e3e2c59b8"},{path:"web/lib/accumulator-reachability-viewer.js",size:30604,sha256:"d26ce83df265524a662eebdba47cda05670e00aa00dc9d21378b99e8aa3a9b52"},{path:"web/lib/accumulator-reachability-worker.js",size:455,sha256:"ddef70cc6ce7242fbf59578d31aa637c2eb254327c5a6b7d1c1caeafcef11805"},{path:"web/lib/accumulator-reachability.js",size:36760,sha256:"701a6aa143834d7d4d8d9253a8d7746303ae48e06109a6e7602b6b57c33e95c7"},{path:"web/lib/activation-ir.js",size:13032,sha256:"02098b58a2673a5a616d26b189c8761d46c10c5a3afa9b5f66be472771a3156e"},{path:"web/lib/admin-elements.js",size:1172,sha256:"7d4ec292f2a1b15800d40e8192583a5090f1a8bde0c3ca8513fbd8588423263a"},{path:"web/lib/admin-usage.js",size:15041,sha256:"ec866bd7ec5d6bb17baacbc51ebf07e5dd9b362fe0f725267620a7882ac813ab"},{path:"web/lib/analysis-depth-mode.js",size:763,sha256:"d873fdd38bd223bfb0770d45c9cc54d1baa9dfdfff96e1ec85647075278427c2"},{path:"web/lib/analysis-summary-contract.js",size:2021,sha256:"e990c7815bacf2af6560ea57989d2e889c00482e8cbfe2df1668f2ceb525b759"},{path:"web/lib/analysis.js",size:33962,sha256:"fb8ac76122f2d2e526777a0f021d3396c68b9ae532cdf45e430bc8d5ef9b57b6"},{path:"web/lib/app-config.js",size:4772,sha256:"144788f563cd52efea47c1af67d6b740ced2711562b47cc77e5b16ea67d5b99b"},{path:"web/lib/app-deepbom-workspace.js",size:66062,sha256:"bb73716a455c36bd58030c2d368ddbfbfa00f0ff07e17f73b4ae7ecc1b7882dd"},{path:"web/lib/app-graph-workspace.js",size:83094,sha256:"5beff6a42e21a3604f7683a004670f90ad06785d92f98c23f488a2d29c095d47"},{path:"web/lib/app-surface.js",size:5352,sha256:"e296f6bea0e6ba2569cf82dc75ed41329eab56a8abb5588a03fae474d0a9be10"},{path:"web/lib/arena-viewer.js",size:19837,sha256:"5f66bc066690b6c94f819ec767864bd5fed8e75937f90d58014dabe6c9122c61"},{path:"web/lib/artifact-bundle.js",size:32887,sha256:"7fb665614ac80393e2ccbb4b6f1947571ed1d2419268515bcbe43b6714bd965d"},{path:"web/lib/artifact-diff-view.js",size:4395,sha256:"cd4871a53d7524472d644e614e7edbc3ad0466cdca8c7fade22a646517c81aad"},{path:"web/lib/artifact-diff.js",size:11660,sha256:"a6a2a22314ec2ed152584823edda06efdff6e13e583979b6cdb0dafe1893c413"},{path:"web/lib/artifact-dossier-view.js",size:3792,sha256:"890377e4f6afe2d17e7436e4e114e8618f6baa7ca158a21f5dc3fc2d196dbef1"},{path:"web/lib/artifact-evidence-envelope.js",size:24934,sha256:"05d9db50751ea0d3c16c00920dcd083387d75b2b8721e33478a46f849cc45246"},{path:"web/lib/artifact-ir-context.js",size:10774,sha256:"1fd2977ac19cea9bd0a8f042121ebe457d525d7e22e9f81fb772225e4fa60a0f"},{path:"web/lib/artifact-ir-runtime.js",size:9777,sha256:"e8353606d5187eb4f340647f1c1b7e331f6f63c68f67260f7ce01e53a453e732"},{path:"web/lib/artifact-ir-selectors.js",size:1036,sha256:"d002320f6601dcd329abbb499a16c73b3a90cc12eb7636d28e1b4f4b6192aff8"},{path:"web/lib/artifact-ir.js",size:4635,sha256:"2735139e926c0b06f295a2f272c30151318685d6cdea021e4ace76e4218f76aa"},{path:"web/lib/artifact-ir/internal/architecture.js",size:3640,sha256:"430c9d4f1ffea00375dc2d047cafbafaadf527708b7870c21847b8ab827f35e7"},{path:"web/lib/artifact-ir/internal/constants.js",size:342,sha256:"b0869050b42ea362d2e3755539a24496ac3509e9bb255ef7f0f9c6d7655a8e69"},{path:"web/lib/artifact-ir/internal/graph.js",size:22811,sha256:"77e34d107b3e58f940ecc9c8676182f0ce9166b285b5f4d0210bb4af2ea58717"},{path:"web/lib/artifact-ir/internal/identity.js",size:747,sha256:"c3e09a5eba9e800359ba44e0406499bac817df7aea3978941b818c1ff7a4d57d"},{path:"web/lib/artifact-ir/internal/overlays.js",size:5592,sha256:"9c9330de0d732581b7a21c8d5689bbf04b6df8cf6082ec1bdb21b96084068bc1"},{path:"web/lib/artifact-ir/internal/quantization.js",size:10770,sha256:"96bc24d93cc45e2254fddbdb90141048a3589ea2cd4067b6a062dea2bc5ac8ff"},{path:"web/lib/artifact-ir/internal/shared.js",size:3985,sha256:"061f8acbcfcf114f452c65f1418daeff36f769cf84e6bc01763588ca1ac6f9e7"},{path:"web/lib/artifact-ir/internal/storage.js",size:6363,sha256:"6fe93c649f1285b8b95c11d4b6dc1aec6c8e4643563a6cc941bcfef85cb24fca"},{path:"web/lib/artifact-ir/internal/validation.js",size:12282,sha256:"da13d47247205c757c2dcb6f1ccfeb2f9ecf7c7ee951de46f647df7ade0379fe"},{path:"web/lib/artifact-overview.js",size:38439,sha256:"8f824838d2ea94c7e9d042fe1a2dbc1d530bf233db56ed3275ed00230909919b"},{path:"web/lib/artifact-set.js",size:4375,sha256:"c983426078f63122b03e32756276002bd00564be7d73e4103e1fc6ffd0928c3e"},{path:"web/lib/audit-output-contracts.js",size:1242,sha256:"bd07a3f49368dd09c13ad893b06d34e1c3e1b9ed88d5e2b25e81636388f6aaa7"},{path:"web/lib/audit-progress.js",size:3027,sha256:"6f2bcb6686219a4b31323239d5883f12dd89d8d17fc35d9b7a5739f0a60fec96"},{path:"web/lib/audit-ui.js",size:55453,sha256:"78d11ea26cf06817f7f4dab7ae609ebaf2594d8890c6f616f8b348c067f0e9cd"},{path:"web/lib/auth-labels.js",size:8324,sha256:"9d69211829dfc3f6e3820aa4370e4e8b6ce53c837994e7d44fcd470050819e38"},{path:"web/lib/auth-ui.js",size:1558,sha256:"8c0eadcd1e50248f219ab43f2c797cd61b43bfe2768f4e84c4098cd6e07e934e"},{path:"web/lib/backend-placement-projection.js",size:24510,sha256:"3e1b257e3b253096ba478680812ffacbd9e05a33ab60a1d8bf104f6710eed067"},{path:"web/lib/benchmark-ui.js",size:9297,sha256:"4221a996fd864ed09915660151e4655f610a4d8324676e2b17a83390dbbc1fbb"},{path:"web/lib/bom-artifact-reconciliation.js",size:14542,sha256:"77e01b043752415ca25c36b87b067d63dc49f7b2ad4baabcd3b67ccadc0ba37e"},{path:"web/lib/browser-asset-url.js",size:245,sha256:"e5e23365943eae1bc5e09ed81ba427768cdfcc1dc7f7ad453de9c1287a728dea"},{path:"web/lib/bundle.js",size:8544,sha256:"5b19f79e8eec1d08452c5e96e079ca08f6797e9e48aef6a8d9bcc75d1da28cf9"},{path:"web/lib/calibration-validation-ledger.js",size:27452,sha256:"4c782ea9e104eb5d8fada3f1ef3bd869af3270ef149c193683c1f2d29c8c57a5"},{path:"web/lib/calibration-validation-view.js",size:8026,sha256:"014851d6a1d9e1d021e7c5c042bdc72d72fe83651e9d0e9e5ab852fff31aa94c"},{path:"web/lib/channel-vitality-worker.js",size:431,sha256:"b812fa6ccd01ba58452aaa3811752197a9c9fd71e8f4627308b8aecb8eb0aea7"},{path:"web/lib/channel-vitality.js",size:51927,sha256:"0577eab6bdc33cf4976cb100283621bb012e2c3e537500f9cd7c0e1e99c3c9b2"},{path:"web/lib/chatgpt-usage.js",size:9479,sha256:"c7a7ea8f344d765b2d5da0f19a477bc8c3c40b8e6602121b92401e9526eca81f"},{path:"web/lib/citation-ui.js",size:1834,sha256:"cbfd02c4b0127a73b808e7c6c52c12021feab1d2bb0439df5294380e9cbee242"},{path:"web/lib/clipboard.js",size:406,sha256:"8421bf6e0d0d92c3cb0116b9c635bb99413a33b84498fe0908e03dd4327bfa61"},{path:"web/lib/contract-migration.js",size:51279,sha256:"6470305ed13dbbc66580afd687986c590e08eaa7554044150d929bc8206be7c9"},{path:"web/lib/conversion-receipt.js",size:12703,sha256:"0afb07e979cbdae0af6db8c0ab352284f7e3c9643ae9fec612e8c6f7d72b1032"},{path:"web/lib/core-isolation-view.js",size:10856,sha256:"98e4f00100457c9975f0f75704c747bec77362b0d610f8f81dd8e6d5a84eefcf"},{path:"web/lib/coreml-blob.js",size:15937,sha256:"99f9bb5ec6ef5385a2c270dbd5d3810ee3afedac2addee4113bddd9abf1ca981"},{path:"web/lib/coreml-classical-model.js",size:30679,sha256:"b7decd064997c8b5534af216fcc4ec5a33480dcdc0f6e991e3f784b42ca681f1"},{path:"web/lib/coreml-compute-plan.js",size:15024,sha256:"a1bad54a5ae95d2e827d894b1a02f19730a7bdd84c9c19818b1db6d9c6402976"},{path:"web/lib/coreml-deployment-contract.js",size:6764,sha256:"0ace70a8843fd8bd09708ad1994f7c23e9d8e367159dffeb5d07d863e3070a2f"},{path:"web/lib/coreml-exact-integer.js",size:1444,sha256:"f8095189c598944fcd3c841e5b29748bbc73c73fa40009af84bf31c1fbf9ba17"},{path:"web/lib/coreml-metadata-adapter.js",size:162129,sha256:"092f49e9087f848b4f0e9435427385b9b2c4d5a70d3023f0e1de0fde7eff47ea"},{path:"web/lib/coreml-mil-program.js",size:103190,sha256:"5c9bed5e6a11806b1fdbd7812262a145a1aea5fc9e330248d7d17ae5ac67bec1"},{path:"web/lib/coreml-neural-network.js",size:75252,sha256:"8ccea40465aee577dc5f3f160b8c32e0fe85ebee1c5f9d5cad2dc3ac9c98ccee"},{path:"web/lib/corpus-validation-provenance.js",size:2523,sha256:"79552562c429a6988034dbbed832187dd423a406a19c05ae9c5c4300dcc777a9"},{path:"web/lib/cpu-target-binding.js",size:2658,sha256:"63a9da9c81ddc9447484649ae36261ffdb29a8b65b3ffe1eb9c247baedc7fe78"},{path:"web/lib/custom-target-editor.js",size:8627,sha256:"b0e3315c5ca03bae1405416b76d728748bf4fafd0b1109968eec486557856741"},{path:"web/lib/custom-targets.js",size:13316,sha256:"367f3d93d64338de89d8049a4013d497b8f8263354d6479fb9f7d9ebd84e068a"},{path:"web/lib/cyclonedx-component-inventory.js",size:3267,sha256:"03d315f52e04c4c0d36af528c0a8b59155fc98ea0be2b1ca58e701883e5469bb"},{path:"web/lib/cyclonedx-component-metadata.js",size:897,sha256:"3afc4ed0c03e6dd2fc5709a656be71e37d1941492d3b8a814fcafa3aca7e33db"},{path:"web/lib/cyclonedx-identity.js",size:2447,sha256:"50231deaeb15b577ac6ac34b6a758a110bb1ed6e9614a4b03899fd18cc86cd3e"},{path:"web/lib/decision-coverage.js",size:10697,sha256:"5af6f0a5c17cca42b5cb6b3bae48d3e84f3e910f7cd286cc2ead9c9dfbeea6c6"},{path:"web/lib/deepbom-property-taxonomy.js",size:7236,sha256:"0b06940920b5a56406a608268f509e183ba1afa31ed5690e601ad33dbeaaecf5"},{path:"web/lib/deepbom-worker-client.js",size:1886,sha256:"437a7ba5a88b86dd0844c6afa34982e478ba133be5cfe210a4992193ceba4f26"},{path:"web/lib/delegation-repair.js",size:69714,sha256:"2ee19239c7c192b4f34a8563e6a023a544fdbb81f299c16d25250b8b56df4213"},{path:"web/lib/deployment-delta.js",size:40739,sha256:"024a29cbf81b17e97c5b0f93e86712d1182e35da872955000a5ff7f1228ef62f"},{path:"web/lib/deployment-frontier.js",size:47197,sha256:"b6bcd9cc3ea79a0142ec3b5c89dc70f9b1ded1d4e72b82145a1f3b2b0273f30e"},{path:"web/lib/dom.js",size:18563,sha256:"24a0550c72011834778050835e171a0e4f5e559003708847017034edbd40b71e"},{path:"web/lib/download.js",size:1383,sha256:"aa1ff200ea2250ad71c513370169c331569265b8f3a2b0371c66bc040e78432d"},{path:"web/lib/dynamic-shape-cost-conformance.js",size:53246,sha256:"a710dcfde3dc3ec20d820eb5009aeee5cbc35f9e997b5e8581812c4f6b128d53"},{path:"web/lib/dynamic-shape-cost.js",size:63543,sha256:"c36443485233cbb62afaca630dd2d7fcbfdcc204507af40c48213123c20834ea"},{path:"web/lib/edgetpu-compiler-evidence.js",size:7174,sha256:"e283734deec13788ac7da73ca9cdd881b9afec0aa2475db0dde6bf40c814e4c6"},{path:"web/lib/elements.js",size:30855,sha256:"0667884da30a535bbb8f123ccc1df3d45c1e885a73422362ea7242ac256db6e1"},{path:"web/lib/evidence-applicability.js",size:4974,sha256:"52532f4c39378ba9907af6a88ecb2d94bf488c391a0a6801ccb72559247dbb1d"},{path:"web/lib/evidence-class.js",size:1631,sha256:"67f4ee53d405a66bd97a0b15bdb17ff91737950d6fcb2143ba3938386003c23b"},{path:"web/lib/evidence-cursor.js",size:3526,sha256:"1d4c8c586f66a872ef4a5eb8ad00b01059cbb0b4d80413483d4d20b4ee940931"},{path:"web/lib/evidence-level-report.js",size:15395,sha256:"5afb0bf749fdeac9e9c95bdc101f3d29f5dace23eefe656cdb9a5d9d78fcdbe8"},{path:"web/lib/evidence-package-profiles.js",size:11053,sha256:"6d919f6352acebc9c1b8dda27585a3f616d2d1b1ff70b29f79e4c7e878ec377b"},{path:"web/lib/evidence-package-rights.js",size:3080,sha256:"9b1d76628179f09e9d93b9d0eb214222063ec0c8ae0abcc8cd37f8c54cf1305c"},{path:"web/lib/evidence-treemap.js",size:27460,sha256:"c566dc324ae69967b44b20e1c98fa363a4cfbf6c0a8f4da41e6131651f126da5"},{path:"web/lib/evidence-visual-contract.js",size:1193,sha256:"eb668f597fea492bc4b679096f30062692cb6f7c94512c7f0d97787ce62d1adb"},{path:"web/lib/evidence-why-drawer.js",size:4431,sha256:"3eaa96c67a990d457b59522def54a43a0be030106acce817e1e36490c4f33dcc"},{path:"web/lib/exact-rational.js",size:924,sha256:"38d8f710054cce4d4d12c68634c557d431e6719ce68b149b7e3214ef126243c4"},{path:"web/lib/execution-placement-evidence.js",size:42742,sha256:"047de7f1bb550d484fe28120717f9a6de246ecfc886254cc78cc5dcfa1de1464"},{path:"web/lib/execution-placement-view.js",size:36314,sha256:"93a62f9e2185767d0240409a04bcc1c7904f07e8c7aa2927b292003c6f781419"},{path:"web/lib/executorch-build-binding.js",size:25168,sha256:"62acce0b6da002a4b4dacac6e413890536e3ca863fc29c6149cd8576a60a3c31"},{path:"web/lib/executorch-operator-signatures.generated.js",size:114113,sha256:"8c494c1136ba7580bc871c33250666299f18fec72ccc65b539e510f8cee125ac"},{path:"web/lib/explorer-decision-view.js",size:25468,sha256:"6d242da225dc5085218b5652b1187d1757f436b2f5e2f7c68d09befc612b1934"},{path:"web/lib/explorer-question-view.js",size:10454,sha256:"20dbb77fbc8968360c7677d788998518caf776e3eae0b64b7403ce0b8b9f3125"},{path:"web/lib/explorer-redesign.js",size:93257,sha256:"2cb85191cd46208b9a4215c1bb0773031a7bec6e7313acec995ddc2cd5ef32aa"},{path:"web/lib/export-artifacts.js",size:1726,sha256:"29e9e3b05e2b57ccd5c3d4082b341990463f015cdba66f456ef0d9d87993c908"},{path:"web/lib/export-contract-view.js",size:13765,sha256:"e4055726b1d5bf7fa43cd50151d2e4ead1fafd8e80325dcb951c22641ff7fa39"},{path:"web/lib/finding-contract.js",size:3664,sha256:"4db3a98db6f3095caa5f350656cd865f1bab80c1a9ad41277c9a8116a8ee6f4e"},{path:"web/lib/finding-rule-catalog.generated.js",size:166031,sha256:"7d04ec99a4487a4016443052ead21953dff86b0400ff593d361f5bb09e68bedd"},{path:"web/lib/finding-rule-catalog.js",size:821,sha256:"11c07273ceeeca1f9aaa2927d9dca55751fa4c15887473085675fd1123c742f8"},{path:"web/lib/findings-viewer.js",size:13566,sha256:"44c47d13caabf85f25f3a754ea79e75a12e3db6694ddba6eca45a0588d6171be"},{path:"web/lib/flatbuffer-reader.js",size:8059,sha256:"b877bcf9bf65910647731ea5b45f41a9a7d43e39c04e60766bf8ecf8ccffc6a7"},{path:"web/lib/format-audit-tabs.js",size:4073,sha256:"e3ef92a6a956350e7dd4c846d6fff941cebbf89cac597d4c94d98fed4648cd70"},{path:"web/lib/format-capability-view.js",size:42949,sha256:"35932d92108bec379610aa3f2d42f2773288fea22ba861d511fc7f48e5a01a0c"},{path:"web/lib/format-evidence-scope.js",size:16039,sha256:"1dcbce5c27e9d72be31427110c7ceddbc6654f068b11eb8cccc26ec4d74ac272"},{path:"web/lib/format-workflow-ui.js",size:15734,sha256:"aa559155eb27842e10adb325278a765794f153d9a9f7aada277a4e8ea5205588"},{path:"web/lib/format.js",size:11161,sha256:"241853dd3f9aabd45ca571cecab34e099318b6e6bb95e1849b8048d62089f33b"},{path:"web/lib/gate-policy-profiles.js",size:2649,sha256:"840f3481fa0ec94c438257ecb11831c99f3c2c4693b5f546d21dce1867f87c5a"},{path:"web/lib/gguf-backend-contract.generated.js",size:6132,sha256:"87ee27c72551a4e21f85b1d7ba8d48c9b99fc218a8a7e47beafb80b1689c84db"},{path:"web/lib/gguf-backend-contract.js",size:3462,sha256:"7f272f0835cde147a8d0d93ad3e5636b665d27ed704df4645822425401faf93c"},{path:"web/lib/gguf-codebooks.generated.js",size:52438,sha256:"0f749ad42ac914e225cf45eb47e7362ceb9d388f5248a12a4c48904db6db682c"},{path:"web/lib/gguf-runtime-environment.js",size:36848,sha256:"1a250d03bd1a21ee002b6ca2cbd47cb7d5fba91f14936117a6b638ab07b7b199"},{path:"web/lib/graph-export.js",size:14336,sha256:"56c6cc37dd3f822009f828f919d8115a0a2a66891616ab43b63f444f00ceea14"},{path:"web/lib/graph-hierarchy.js",size:8768,sha256:"f004503f219ea387338212223562f8a69e9a5fad5b2bd7675254599537a701f3"},{path:"web/lib/graph-ir.js",size:12010,sha256:"790b4a290db42cdea0e819248edc22abb2a98e36bc828301e62a54d1b6c924e2"},{path:"web/lib/graph-layout.js",size:9674,sha256:"8b9166f51d681562beca4cefe0f5f4ca80f768f7f92472367e9811556780c89d"},{path:"web/lib/graph-topology.js",size:3907,sha256:"c47dd3b704fa54f43f52ae89296863ad80fc2ee4e9bf09b972e288e536ec8fc9"},{path:"web/lib/graph-ui.js",size:44460,sha256:"ced1925451242d92b4458e5035154ca88a235c892a8128d69504cf76c4d04037"},{path:"web/lib/guarded-integer-expression.js",size:7693,sha256:"cceaff5181a415d9b34ffc2a2d1872c798a78bcae56bef486603abfc777eca33"},{path:"web/lib/hash.js",size:1614,sha256:"541aa5058fc2b712a25f00affdd442340a2a9fbcecc0b94b4b4634010b949ffb"},{path:"web/lib/hf-safetensors-contract.js",size:68674,sha256:"f012dbb373e022c44567045ca9a9bc745a8d4803cf647493225e6bec760027e3"},{path:"web/lib/influence.js",size:3284,sha256:"406bca5b20c5d66b668c2a9ebe0c577ae861a39f8474399ee6fb2d61e7f2231a"},{path:"web/lib/input-counterexample-viewer.js",size:20056,sha256:"541d119ff23efec154a65e39a1bbb4f37931b50a4474a44510c6e1a007ae1c52"},{path:"web/lib/input-counterexample.js",size:22907,sha256:"55a76dc863f43cf1b42c0f4da37581bda1df27e1a2ec3e3ac2b670b31a79165e"},{path:"web/lib/insights.js",size:385,sha256:"6a984abf2161cfe6063ba913bdeacd430a257e32a59b2043d0568960a46b9bdd"},{path:"web/lib/interface-contract.js",size:24321,sha256:"8be2d388110999031a7460e29ebf3f70d00b7e0d1ff14012d073fa4e0dac633e"},{path:"web/lib/kernel-inspector.js",size:194040,sha256:"eae6d5d27bd635a5f1ccc89b7525b08ae9dd3dc6e6cc25b384440349ab80ec0f"},{path:"web/lib/kernel-witness-worker.js",size:425,sha256:"f69d02315f5f882e8a450938088e68860026bc6ffab56192b7e925e61ff8ff89"},{path:"web/lib/kernel-witness.js",size:57774,sha256:"ca1de8cae8682debd742209d668854ab6b07a253bbbd1ed5e08554661b649e2a"},{path:"web/lib/litert-qualcomm-evidence.js",size:9216,sha256:"8dd6df0d1885bf18ff3a654ba123cc86f7a700e4fb2270624c70152c0bfe4527"},{path:"web/lib/llm-device-feasibility-view.js",size:7212,sha256:"176f4fb194e5ee905429eb08619c1eafe6c6a96352be5ce75c7a43d3103dc198"},{path:"web/lib/llm-layer-storage.js",size:6425,sha256:"fd31d3e3154b38ffc83d8c5d0585bd26977c6cb4e84e056946cd9c02b0e8e391"},{path:"web/lib/llm-memory-feasibility.js",size:10642,sha256:"f95840327c2d11aae482a3cf9c47376579b2d6fcefb5356e7db8952c2fdd4b5b"},{path:"web/lib/llm-specialized-projection.js",size:12802,sha256:"d2357323fdebe5ed5f80efe3d4d4dff06f3e4d3c59075ec503875b33f034e8e9"},{path:"web/lib/llm-static-memory-placement.js",size:13840,sha256:"660c68cd59e657b247608daf18ee2aad42dbcbfc15e42af03c77f95002487595"},{path:"web/lib/llm-token-budget-scenario.js",size:7838,sha256:"527a344d9feaca65f156da24071d1748ea722c54dfd862e1ed441e9955d3e6fb"},{path:"web/lib/mac-coverage.js",size:5726,sha256:"f44e380b593ca6bdbd8f681b0f139172ea65aeaa055bd100dfe5d792495e79e4"},{path:"web/lib/markdown-report.js",size:11571,sha256:"a8ca6a150f7893bc3076e8239c15ecec8143951dc926f4ee887319df2ade0d08"},{path:"web/lib/mcp-app-client.js",size:5003,sha256:"22459e68e49416dfeac5d075ac7d5c0a16df9f6294d71429c0adb9b304e08636"},{path:"web/lib/metadata-model-adapters.js",size:47270,sha256:"a6462dbddc16402faf0cb4e8aed84297077b00c7859491d40bd0aca66c1e34b3"},{path:"web/lib/metric-coverage.js",size:209094,sha256:"d2cb445a97477e5e623dc6180ae654bab02e52aa67f377a1340bb1daa0397fe2"},{path:"web/lib/modal-accessibility.js",size:2530,sha256:"e84bed83f3ebbe577e496b851b74ba5403c95f60eb2b13f8db151b0d5ae15c6f"},{path:"web/lib/model-file.js",size:15113,sha256:"8f871d7ff5e5ca1ba03a6d05204cb8fb027ab06b08eb6bcacbfd99abf2b83fed"},{path:"web/lib/model-glance.js",size:23524,sha256:"cd409577e872f7885909680bcd4a69f761364e1970d3fabfed73571a7b3b9220"},{path:"web/lib/model-ir-browser-export.js",size:6276,sha256:"9592529067c8fe1d14e84ca54b3322e1033db4fe09b4c4f0009081f83cd4db72"},{path:"web/lib/model-ir-generic-analysis.js",size:7219,sha256:"9c0ff392afc604db33db2c3f959cfb937b7e4f6e231065ce2a15bea070b20422"},{path:"web/lib/model-ir-visualization.js",size:26458,sha256:"50a344e4fc2ef5de5d5dba8d5e5892e0d816630cec333b4e4c3d2dcace6056f3"},{path:"web/lib/model-ir.js",size:28485,sha256:"69b9cbabede9ca91284681d856110c670111bc5b58875f3c1b117176450bf901"},{path:"web/lib/model-ir/internal/blocks.js",size:7339,sha256:"1e31d0445c09067d02e0d383550fbda6254909aa300686736d822eb7fdb54ef8"},{path:"web/lib/model-ir/internal/constants.js",size:597,sha256:"75efcae152fd1f45caa32b64d58c5cf5d2f7423894d2181a2675e2e499a11e4c"},{path:"web/lib/model-ir/internal/native-facts.js",size:3232,sha256:"4ce214b937f84b985171a88744770e4daf3498b6c8344678dddffbd9cc749bfc"},{path:"web/lib/model-ir/internal/profiles.js",size:7434,sha256:"b597cf0ef0a81da2cfe4a30a7737f48965cb00f0046e74023da5f4cd19feafa7"},{path:"web/lib/model-ir/internal/program.js",size:11258,sha256:"66ceed03f5b34060c8a15f13c643ba7c626a85dc99fbdd1846a541408fe2fe9c"},{path:"web/lib/model-ir/internal/shared.js",size:1561,sha256:"ab85e309bfbd59b2bcac64feee1dfd374d22f3038f30bec1048bc70d598368ff"},{path:"web/lib/model-summary.js",size:24304,sha256:"a485a6f4e9000ac6fe2f5d63b3708dbc87379b2c47068a2d30c840cf28b278f8"},{path:"web/lib/node-edge-evidence-overlay.js",size:8655,sha256:"06117f6d5738e6aa6939ca420dd772103a753ce958091d4bcd5ff4c491a7e7c4"},{path:"web/lib/node-view.js",size:80726,sha256:"a5a3c0fa327a0fec1308e4470dbb6edf2054b1c49f559f402e41d37f655015d6"},{path:"web/lib/numerical-abi-propagation-viewer.js",size:35394,sha256:"f9b40f2702041c3e89d41a21f7d88c5fa40163c1f66dc426236cc4f8b04fc308"},{path:"web/lib/numerical-abi-propagation.js",size:40612,sha256:"8a3e3d81fdc06524ebce5e85bc5fc73aba0dbe7d4fc5d6b01989c8ef8505d151"},{path:"web/lib/numerical-ir-panel.js",size:31802,sha256:"e492dab603631aa5cf10f1c16a93a85033e562e42e2a4f2e6ddad6b5d2970b59"},{path:"web/lib/numerical-ir/common.js",size:2963,sha256:"c5ca9dfb76a084a86b1c60a6f357eb7f7b4803886eaa4553d8ea4ad6d5944cbd"},{path:"web/lib/numerical-ir/statistics.js",size:7717,sha256:"f465d34f245aae513d7bf7f07911c47890c8d001613f1c4a90987b1251a7f69d"},{path:"web/lib/numerical-ir/weight-browser-input.js",size:1779,sha256:"0540553952a481a950561f2f165947722fb26dc2347b22809ee68f881fc636c8"},{path:"web/lib/numerical-ir/weight-contracts.js",size:8230,sha256:"8509c60d4379575792ea71183d0ae7ff8e5bb59e5b8f8142937a07819fbe221d"},{path:"web/lib/numerical-ir/weight-math.js",size:11164,sha256:"805aa94555bd6e351307e36606056a60a24f870387ce046524d607d03368c30c"},{path:"web/lib/numerical-ir/weight-sources.js",size:8964,sha256:"f00c75712dfa9de70e66da5e6169c9eb6bbf400a5c3035e9e4354775cad4ebb9"},{path:"web/lib/nvidia-accelerator-profile.js",size:6880,sha256:"100817f6b1d2eec2bc4b0350db4a8708de49c032b6fea61ed9656f7b551dc93f"},{path:"web/lib/offline-device-controller.js",size:7204,sha256:"debb5e0289aea51ec78ac7fb738aa3151f95237083f9c39c611151e41a634665"},{path:"web/lib/on-device-llm-contract.js",size:38126,sha256:"676b15ec62543137108e2b3fb33cd1eb214c90b19ec0694c5575fb8b6b42a9f8"},{path:"web/lib/on-device-llm-runtime-manifest.js",size:21918,sha256:"8d4ac075bba8950a1bf53c0a6685ca7c0bfc46b76bea27c149ec131dd798cc86"},{path:"web/lib/on-device-llm-view.js",size:27305,sha256:"77aed565b8e7e89d1cc8ce9fcb156d54477555dc5e8f7d928b806c001ee894fa"},{path:"web/lib/onnx-benchmark.js",size:16026,sha256:"66e49589c11ea1df2aa4c08f7c12910b6c0feffd5e64d9045c61875c67e5492a"},{path:"web/lib/onnx-container-inference.js",size:25717,sha256:"554b679ca0f6d49ae0a6cd2129323a21e2c051351ccd6f3d5412ccc8fb423535"},{path:"web/lib/onnx-contract-conflict.js",size:17077,sha256:"9bc48c1871f828a65cd7c1da812d27756fd28242521b68d8bfd03566983e9a40"},{path:"web/lib/onnx-dimension-expression.js",size:5584,sha256:"e9c24d6a53514fc6c2b5f740bde9d0f601072dd086bdce500de5419db568d730"},{path:"web/lib/onnx-domain-analysis.js",size:16108,sha256:"df74f73719a872372582bc401c34fb987bacc32c844e4c7588de3850702240b9"},{path:"web/lib/onnx-domain-viewer.js",size:68839,sha256:"f6134845bc2c184a09b28981b4d705134de8d2747bd719fba8691fe726c50436"},{path:"web/lib/onnx-einsum-contract.js",size:3625,sha256:"483ea748096ad2079d50fc88ae812b1130f85f4139bf28968672f801e8225284"},{path:"web/lib/onnx-extended-shape-inference.js",size:92548,sha256:"2df83c9cb64c828ddfd5a28c80ca16ebe56647b0631cb87488406610a2f0bb37"},{path:"web/lib/onnx-external-data-status.js",size:2356,sha256:"eb9ad04924317738dac2eac3aebf6ce8c4fd1908a5c643cd418024f306134e28"},{path:"web/lib/onnx-external-data-structure-binding.js",size:7003,sha256:"cbd2af4a87ddca073e2b5e63d4ffb2f6e3d9566c1116c695c672e813990238e4"},{path:"web/lib/onnx-external-data.js",size:2876,sha256:"aef473c86eac64f4cfb37d2378f3fac2099614486f4e799cc3b471b37d1f02f2"},{path:"web/lib/onnx-ml-imputer-conformance.js",size:13102,sha256:"fa9a10e4405d564d2147afa75eb5428f20aa049383cb47c8b3650ec7f0d69ad1"},{path:"web/lib/onnx-ml-imputer.js",size:16672,sha256:"d16b6341650acfdbbe26f0b51132d3a5d1ef7a612f86795caf9962508a724787"},{path:"web/lib/onnx-ml-label-encoder-conformance.js",size:19439,sha256:"ff0d645a048e7f84c8e3a92080b2ae7475697c81737dcb9ee50258747d6e4362"},{path:"web/lib/onnx-ml-label-encoder.js",size:28827,sha256:"ac0c5c5d02ef956f9af96b700fdc501b162be3eb9918cfe6df344bc5f8cf91ec"},{path:"web/lib/onnx-ml-linear-model-conformance.js",size:23260,sha256:"2fe74a510f45e15b3779caf56ea6a6d7931ee316f834af33f2a4c434133d3ca7"},{path:"web/lib/onnx-ml-linear-model.js",size:35427,sha256:"f04ef72f98951fe26cae261cdb19a16e4c5276f96a56076e5d6f60fcbc6c2510"},{path:"web/lib/onnx-ml-normalizer-conformance.js",size:11722,sha256:"d7e1543cb5d39f777d605380f832d32f9171923ecb6beaf9958193ef33add6e9"},{path:"web/lib/onnx-ml-normalizer.js",size:15660,sha256:"d5a3a82335662fec6d1efd5fcde4c9bd1e9db29a22966c4ce6d69054d629919d"},{path:"web/lib/onnx-ml-one-hot-encoder-conformance.js",size:12939,sha256:"839b60efc245541f69c7b1dc6eb81443ac6da87383774dcbdab6bcf2ef4a4668"},{path:"web/lib/onnx-ml-one-hot-encoder.js",size:17052,sha256:"1acb7b3894a7cab1988e39224c1770207035329d6c661aa7513ee9ac3552dd6d"},{path:"web/lib/onnx-ml-scaler-conformance.js",size:10726,sha256:"8d456a6a3325f2bf8de104ea9bee1d44cedc8d0af12a111ef9c6d6d0619ea05d"},{path:"web/lib/onnx-ml-scaler.js",size:13752,sha256:"80bc0046b10407cde2f30427757ed9e75d2724ca608f89a6fa50682d4b5a8443"},{path:"web/lib/onnx-ml-svm-conformance.js",size:16470,sha256:"ac2946710dae87cb2df660455fdff8a2800f1e9c737ecef67498fec0acaddfb7"},{path:"web/lib/onnx-ml-svm.js",size:52597,sha256:"ff2ae7e29ae395e6c61a5dfc6c70047170598a6f8b1bb2512f79ced057c0c7e1"},{path:"web/lib/onnx-ml-tree-ensemble-conformance.js",size:29336,sha256:"3b9ee05c06d9ed0625cd7e7751b151a17b77b9227df80b651aac77eb36711e35"},{path:"web/lib/onnx-ml-tree-ensemble.js",size:67959,sha256:"2fbeddf9c143db34899ffb63a48378aecf3886b2a54dba40cb3cbcee4e22282d"},{path:"web/lib/onnx-ml-value-inference.js",size:83434,sha256:"55479a55e3695b59b97af5e73a297f83ea01067c3f986a1d183479076c85e959"},{path:"web/lib/onnx-operation-cost.js",size:1207,sha256:"2f50364e6b142432459113c0ac6ac38b5726f0474a776521240ea01f6c4bceb3"},{path:"web/lib/onnx-opset-imports.js",size:3962,sha256:"f44a68399206069b194e46e22c84119012fa134e20d007df5807179e61b60fb9"},{path:"web/lib/onnx-ort-extension-shape-inference.js",size:14268,sha256:"8e15fac0405a9df8b59c3f1c93001bc52381125d7b181475ce11d5013a66578b"},{path:"web/lib/onnx-ort-matmul-shape-inference.js",size:8323,sha256:"ff844d6b589d3f255e42383f84b38c890cf4fdb2baa4b869bc3c86f23a571fe7"},{path:"web/lib/onnx-ort-recurrent-shape-inference.js",size:6336,sha256:"904c8eb0481710c94cbaf947dbb77c8471e8c6565e90aa4b8d148cd64ff4d16c"},{path:"web/lib/onnx-ort-transformer-shape-inference.js",size:16665,sha256:"64c968af5a40c12e04fd240fb5308479f463dd6e1e6f6270550bcdb40b0a7198"},{path:"web/lib/onnx-runtime-shape-binding.js",size:20374,sha256:"4f2db6c8c516dcdb41c84aec9893aadae71e6c92dc91c5de539c13237e110ecc"},{path:"web/lib/onnx-schema-legality.js",size:7187,sha256:"af81ab59cf53d1286492eacaa5cf42f181f21d54d28f9e337088dea33b4c12a4"},{path:"web/lib/onnx-shape-inference.js",size:197662,sha256:"16511660d816ca227a7fd6f5b18312a04a52b70a881803fdd1056155150e0e9e"},{path:"web/lib/onnx-shape-ops.js",size:2209,sha256:"14705c42a9cc89e5939663b159c94670c3d430f196b7eb7752bb0073d2138ded"},{path:"web/lib/onnx-shape-schema-generated.js",size:24656,sha256:"cb8d7111db5e9a97bd7109cba9368ce48f432814e97d35e50b217c210cd69dcc"},{path:"web/lib/onnx-sparse-tensor.js",size:10701,sha256:"165ced8b5a1fd092296ae876385798df95eda6875e9bf92563e3e4a84c473408"},{path:"web/lib/onnx-static-value-evidence.js",size:1930,sha256:"1dccc3d40904d88eb39b7397806bdec9755d2d2319351dd940e647b6b724c9fa"},{path:"web/lib/onnx-tfidf-vectorizer-conformance.js",size:23158,sha256:"d8cb2abd84840324caef8a296da409c7a03a3ab9bc8a900d6f2e96b710b93954"},{path:"web/lib/onnx-tfidf-vectorizer.js",size:23723,sha256:"482d106fbeb04827d4f684bf3b381894ad398056f6e5354fcc6c8be7d7b226b0"},{path:"web/lib/onnx-type-proto.js",size:27706,sha256:"64ae4ca6e66c80e717c54eb2ba022a5590d3738b9e857369923ccc5d1346c0ff"},{path:"web/lib/ort-build-attestation.js",size:11721,sha256:"39f07c00788df072e6228bd613f9d3177f95e248209b0856d97fa891be3e3081"},{path:"web/lib/ort-compatibility-evidence.js",size:35903,sha256:"ccd8549fa08a722c212dd2dc62700bd8707333b0121588e87d47af325fb7f097"},{path:"web/lib/ort-reduced-operator-config.js",size:10858,sha256:"a55653affeb35c412510a111469c0363d0e26bff371c49e8369d1d269c8e6e7f"},{path:"web/lib/ort-selected-build-binding.js",size:5560,sha256:"ced4db25d3058cd11cc568690d1c22946dd736594a0c426bdf218d79f5e17a88"},{path:"web/lib/overview-domain-map.js",size:7529,sha256:"142228ae8f3f13f65dd1dade7c022df737e27b97b37f912162dec98cde0f23d7"},{path:"web/lib/performance-visuals.js",size:117704,sha256:"37b3346f436ad96f8caa1b84644795049fb92b736b90d3b6bf252b31a90ebf83"},{path:"web/lib/placement-comparison.js",size:5482,sha256:"24e94e9c5e45c6f5ff9c24e7dba64acf909e1fecc29efde60ab7128543867504"},{path:"web/lib/preprocess-ui.js",size:2001,sha256:"2078bbad83514502a506133551db66358855afae6f9e5c47364e9a699cd5ad04"},{path:"web/lib/preprocess.js",size:3935,sha256:"5a406429b025c53da5d3428b8c89a24a35cc8b1bea9bab9eb43e930aac0bd24b"},{path:"web/lib/preprocessing-consequence-core.js",size:19181,sha256:"4e60e54f6b1965d5f6ab757df266d4ef88af90caec6d55b704a0baabc016a25a"},{path:"web/lib/preprocessing-consequence-runtime.js",size:8046,sha256:"1e1c0ab5908b155f9bbeb2814915d9cc3edf0d4e81b3be9a1c7c9ee063d09939"},{path:"web/lib/preprocessing-consequence-validator.js",size:11679,sha256:"17597e9b81e232a764848da88b62131f29f4c86364e02d93ca86cb9d145953f8"},{path:"web/lib/preprocessing-consequence-viewer.js",size:23440,sha256:"f56d1fb5af6e7702126d4c941544e4e790653a06859690c0ba6ce782389577c3"},{path:"web/lib/preprocessing-realizability-viewer.js",size:21096,sha256:"d6ef794060abfdf70d2be83ddf254cf44dbed114ed1b7e332e1d81921ade1814"},{path:"web/lib/preprocessing-realizability.js",size:21317,sha256:"f1a412d3e7458068593f180e28ab82125205c5a87dc06892e39a8339b32ba2a3"},{path:"web/lib/protocols.js",size:8818,sha256:"0e24e0e00856df1e0fd5757acb2dac78a48f18d13ff2e7f513ae39b53ae7bcc5"},{path:"web/lib/public-cyclonedx-export.js",size:25087,sha256:"6decee757f1632a8bd718ec0868fd5bb87d6a7493b99f9afe919222e433dafce"},{path:"web/lib/public-evidence-package.js",size:7486,sha256:"ed1c48c9d7cfbc62cea1e41780d591703843ed3db29703ae81a6f472b268ca2a"},{path:"web/lib/public-export.js",size:5583,sha256:"ae7781e44ab3e0ef9a213d400f1837aeef5ca75903cf30aa4dc3cb81625aac4f"},{path:"web/lib/public-key-signature.js",size:10306,sha256:"6044ca306cfd5239dab6f61fa35374282f698d5c683b9e7b5a30a73cd6a3c735"},{path:"web/lib/public-product-contracts.js",size:7420,sha256:"6c45fefbd7f4317bab7e6211e2da9338d21fad393019ad6a6a7055e531ede42f"},{path:"web/lib/public-verification-manifest.js",size:5154,sha256:"ca0e59c5dcd0fa5f9b7a52e71d059b8bcfc28512c590f432038c953d11ea2737"},{path:"web/lib/public-verification-ui.js",size:1601,sha256:"10b3908c7c3f641b1c29d00cc148c132a57c0a1d3a57f12a2bff1fa3b3edc59c"},{path:"web/lib/quant-evidence-chains.js",size:25659,sha256:"f57eed5cf3d8f96ec783e4b55d856c2caf0eff2ca612bbd37d9eeb30d401f6f1"},{path:"web/lib/quant-evidence-view.js",size:23925,sha256:"c33fa3b4e9640398b739b27dec540f23c2856457980a287fadd0c510b3f33fe1"},{path:"web/lib/quant-research-applicability.js",size:12384,sha256:"202cd634a7b6db9b1fabdd0643878b29f1a509da50d21d825e8bdbb4085870c0"},{path:"web/lib/quantization-contract-summary.js",size:29914,sha256:"ac24469aeabfb04b5fa96b3c8b51626f410eaef2ac209197f6476d600f41f24e"},{path:"web/lib/quantization-lattice.js",size:86930,sha256:"e3af077fa2f46ef6403a2a31d29265a1b08350b3e6a24bcb8d863c194eff27c0"},{path:"web/lib/quantization-math.js",size:3689,sha256:"190e0c584d5ff653b75a8dab852bdd329098f905c2e9fe52d08ba5b978163b27"},{path:"web/lib/quantization-research-suite.js",size:7497,sha256:"275b483b9ef2a2f1aca90d104e5561a277a0aacfea5114c96d5c72f9cdea9e9f"},{path:"web/lib/reason-codes.js",size:3433,sha256:"e53d26d8d60c4794c2cd49b479c82b5b98a71a501cde7cb890f10c751a90ad90"},{path:"web/lib/redesign-codegen.js",size:29491,sha256:"d9301b2e20b1de7564d22f1ffacd2fe7628aa3d900fd425bd5ca660623cfbb5e"},{path:"web/lib/report-bundle.js",size:13558,sha256:"d23c53de212d6e8a56df04530415aa8108de3b04a4062f6a21f8a9c5b768f7b1"},{path:"web/lib/report-change-analysis.js",size:3447,sha256:"8182a7a5f030f009a23e753511977903869415144d8cf2eb41bbc8f6ba7dec9d"},{path:"web/lib/report-conformance-common.js",size:3718,sha256:"82b98cd95a4cb92aef4ad9178ea14744077a14a7e49ecac50718c1e379c2abc1"},{path:"web/lib/report-conformance-coreml.js",size:20343,sha256:"b50354fe658de662f14c5b2a2078154674933357de83377ff7d0c583661aa64b"},{path:"web/lib/report-conformance-execution-placement.js",size:908,sha256:"ceaaccf364ab879333027b4b58d748195ded914c2d2d53b684e15e2f917f4376"},{path:"web/lib/report-conformance-onnx-tfidf.js",size:9874,sha256:"eb9419917868e09acd27bf53f536ee1f1ec48ec524a56d4b3cf475645ef17af3"},{path:"web/lib/report-conformance-onnx-tree.js",size:18448,sha256:"1ba6e13fa1be4156555d2b12358fa210ddb3e095193d48dd3fa0f56d900ac1ad"},{path:"web/lib/report-conformance-onnx.js",size:273879,sha256:"4a49b64a07fc87df6319f7065cf10034c0be1bedad8326d91d1d59176c359ed4"},{path:"web/lib/report-conformance-ort-runtime.js",size:9034,sha256:"2baf6baeb86992208c85db50db5c489f07185428064e432fc80c3bdada25eee7"},{path:"web/lib/report-conformance-runtime-helpers.js",size:61731,sha256:"aef9c03af59a16504bf4437fee5d815a1c9e072bc142aaa2548cbba86796c828"},{path:"web/lib/report-conformance-serialized-containers.js",size:36966,sha256:"e33e78f251b3c5b6fe011682c1b38689f955fe4436f99954867bcf9e54e52d4c"},{path:"web/lib/report-conformance-tflite-storage.js",size:30496,sha256:"0577ff0fe6d558b66ddc4505c91b479dcfb4e74fa402d5e08069e6ed8a0c6bb8"},{path:"web/lib/report-conformance.js",size:221838,sha256:"f675afc9863a1fc790c3274b792fe7bacbd812e73d4e2a1f6711ce4a26598041"},{path:"web/lib/report-context.js",size:3927,sha256:"4a5727f0906d6c6ddbce2cfb0bc3040d2530a4d43adae8e93cfd90139600e9ef"},{path:"web/lib/report-engineering-deployment.js",size:30614,sha256:"0718f6d413ddba43a9b66081f51d3f89b396fc9558f79b185b23ca780ec790d8"},{path:"web/lib/report-engineering-derivations.js",size:7907,sha256:"4ef0ff3efc595b7e5457b182bf7ed43b7e5547f455da1ba60ce8d5ac9cb9e1cb"},{path:"web/lib/report-engineering-dynamic-shapes.js",size:8129,sha256:"8b363c6242992c673269eaf16b5207805177882714e83ebc3f6427333e0c4abb"},{path:"web/lib/report-engineering-entry.js",size:195,sha256:"16041e14670b18cc9cd38a19ae2b9c298e87a69543cfcb452643b072bb8a4d35"},{path:"web/lib/report-engineering-interface.js",size:9334,sha256:"9bdbd5b10595ef083e817f13d9c4d27424d6969ed0995a4904ee8eb41f5c8cc7"},{path:"web/lib/report-engineering-kernels.js",size:6965,sha256:"6caed86ebeaccf51e42f77f9d49620387001118320df843b062ccfa8c0edca91"},{path:"web/lib/report-engineering-onnx.js",size:111908,sha256:"464a1db52a50387694e3702bd7f703ccb3bbf5ad3d8438d9bc530ba3cfcb5c8c"},{path:"web/lib/report-engineering-quant-research.js",size:83195,sha256:"2593a58836820c8b1e49e912c8e7dd89f6f60fe5d9d040aedda2b32727aa24cc"},{path:"web/lib/report-engineering-safetensors-quantization.js",size:6885,sha256:"1e983005c8f914b4040b2f7a186499dad391bff325aed513c708b33f4d6e39ba"},{path:"web/lib/report-engineering-serialized.js",size:65203,sha256:"878fb677d2987524f2b00c42abbd04bd06764313102748ce3eeed8993b6dcbe7"},{path:"web/lib/report-engineering-tflite-delegates.js",size:3878,sha256:"69f381ce7a192bd0bdcf020984267c9e71b75a74fafa132486747c0124bb4a86"},{path:"web/lib/report-engineering-tflite-subgraphs.js",size:14592,sha256:"09d2944c233d97868089aca25c1b5848022195d2271b92f1f91670ee9f6478e6"},{path:"web/lib/report-engineering.js",size:264552,sha256:"5579dad1c4533071e9bc5e4859a1d2c035e2053204ee9658f030b6381bc9ab9f"},{path:"web/lib/report-evidence.js",size:81858,sha256:"9e3edeb44d4dff8fe89f11ad8687b682da6a36c322bdf0f5626fa0eab6c72de9"},{path:"web/lib/report-execution-placement.js",size:10673,sha256:"885fbe009a3e41020129d7f1870536d97b7fe916ffcd48b7f7fcb0e6422fa875"},{path:"web/lib/report-export-contracts.js",size:126428,sha256:"f42b943ad878aadd2c9692c37f7096b2c9cb51e3bbba849f94565b4fbcaa09fc"},{path:"web/lib/report-findings.js",size:277256,sha256:"b534da972245d19e631e12194f8bd88e6de56a97e0e2cca384f590ad75774522"},{path:"web/lib/report-integrity.js",size:7267,sha256:"4ff84592676541ed66488021ecc25db15e2f63bb6790c4a5c778f04a76fe80d6"},{path:"web/lib/report-metadata.js",size:23313,sha256:"67196abab4bb37ea5ca92d158c5dcca0726d1d4adfd3f359106feadbaf3f378a"},{path:"web/lib/report-mlbom-compat.js",size:9935,sha256:"11df5b9e6bc7965af4eb63c3e3f55f8a3bbd25c48b3a5f3fac0a99c940939df0"},{path:"web/lib/report-mlbom.js",size:1447,sha256:"5cf13dd801d23b3eb4650224f60df7c61a3dbf13e1cdc1bef19d4b06aa45db52"},{path:"web/lib/report-quantization-contracts.js",size:75351,sha256:"012e2a78b792ee65515b110e750cf4f877335522583b182584598850808f563c"},{path:"web/lib/report-raw-entry.js",size:496,sha256:"c692c3e6a0694693f3c073fd34388db064b3f3c6102ad41ccaf9e63636cc34fd"},{path:"web/lib/report-regulatory-entry.js",size:64,sha256:"3618d07dce1b6fc0f5627ba0498201fd7b9dfb69ea362a1388d4b76f0b04f6e0"},{path:"web/lib/report-regulatory.js",size:18307,sha256:"d7dc13924e8d37e10b99d596886425b4f2b8fbe926834bc4b41e20fd8a5b2b2f"},{path:"web/lib/report-sections.js",size:60016,sha256:"d0f14f95b861792201000d6de7e07bf02e83bb250ca5e419a8c0ff6060e229b3"},{path:"web/lib/report-security-posture.js",size:7651,sha256:"6b616fc950c918907381fdfaf2c2c896699c22e21817169e20af08136cef4e89"},{path:"web/lib/report-store.js",size:17294,sha256:"e2ab2c15551b38b062853de932dade12f4f3bc8474769a70dbeca0f9faab9d95"},{path:"web/lib/report-utils.js",size:8672,sha256:"83ed431b693d469135815d2c5ce7d0b35b0ec0aead7817353aef241488741270"},{path:"web/lib/report.js",size:2832,sha256:"333f6469952b7fb9c575eea170b3ea7cdfeed95b1f735bcbae082c13d217f0a0"},{path:"web/lib/requantization-fidelity.js",size:43815,sha256:"3f14f1a83d834b56d3b1fc10443195090c30c6ac3fe2da2d5657c8bb0bedfcbb"},{path:"web/lib/research-visuals.js",size:10197,sha256:"473195a7393d9ce86d19ed38b105e7adb82e25259656c450dfacbdaf474fa3bf"},{path:"web/lib/research.js",size:71738,sha256:"372ef5a64ce4fdc35eef8b3c4ee15b88fe5a830af5f7c3b5e60e0cc81261f2a2"},{path:"web/lib/residual-contract-distortion-worker.js",size:457,sha256:"c8ced197c93f05882e67a8e070fd7d06286433a863211c0de9ac23a70bd98fd1"},{path:"web/lib/residual-contract-distortion.js",size:44782,sha256:"cebe181ca78e8aeda25911cef52ccfbf32771d3bcaa25ababe6064b53396fd61"},{path:"web/lib/residual-step-response-worker.js",size:439,sha256:"015d02d98d815e96cad0d0a769a4c9077a6339f570f71e8f20fdb53cde969d5d"},{path:"web/lib/residual-step-response.js",size:43635,sha256:"ab462c38e3ffa1f2ff7be66f03dd3964edb16ee6c1ecbca1c9a1a6fe6c669ba8"},{path:"web/lib/review-export.js",size:15054,sha256:"9ac8ef3b69b040f30f97e823132763a687c9d0c725ffbe8d2bc00284169afc0e"},{path:"web/lib/review-policy.js",size:9404,sha256:"4547d33de6fdacae604cca47b22a0953e7bf0bd5fc0e9bfa4d0672b7b13f29c0"},{path:"web/lib/review-summary-view.js",size:6521,sha256:"11db1f256dd0d020c2c2dc0dddfc5fc1b93bedf5f741520b9095d4e8efbdb780"},{path:"web/lib/review-summary.js",size:10804,sha256:"90e866192d9733fc01e62762ef8770e492d5810974e69912e4485a8d3967436b"},{path:"web/lib/rgb-png.js",size:6636,sha256:"83fdee7d9a5725a9243c83c08de46ab39f55b26f79afa894049138c76d82bb6a"},{path:"web/lib/rounding-equivalence-worker.js",size:443,sha256:"99d4f1f6a0ee4db28ab4476129afcf105413c4f0c51fa6e66bcb8224502b5f70"},{path:"web/lib/rounding-equivalence.js",size:57037,sha256:"c8e5b591293d710f5d2470501af64e1288c7d9b4b6ac6b39a75a50cdd5e5a69e"},{path:"web/lib/rule-explanations.js",size:3630,sha256:"ced61760100c5763f8dd2ea195f72a5c4d7b1c879bfd0d08e8656fe59a0b2780"},{path:"web/lib/runtime-backend-evidence-ledger.js",size:8221,sha256:"079a7730873d2eed3a539b86e5c40ef535728a1c5df4e160ea9cf3e50f0308fe"},{path:"web/lib/runtime-data-movement-evidence.js",size:4538,sha256:"7104bf007b75d67af6f2f0af6dac2780744d7dfc86ccb50d6d69988bdd930164"},{path:"web/lib/runtime-evidence-closure.js",size:16122,sha256:"8496f97365db4de46724dc0c2138eb17e41c0cd7692c03e91aeb3beeed4bb271"},{path:"web/lib/runtime-evidence-controller.js",size:10548,sha256:"6f03e82d75f312153c5372ec64f519cd68de86bfc98008ca5daf9cde776c7bc4"},{path:"web/lib/runtime-evidence-sidecar.js",size:17062,sha256:"72771618980755a16a9f3c591077a4a3cf749016c39e4997ded5c5d0570ddcce"},{path:"web/lib/runtime-memory.js",size:18287,sha256:"020c399ec9d0f173f75b824025bd5141de4d43b5ed9ea17edc02a9ca63963d29"},{path:"web/lib/runtime-module-loader.js",size:1937,sha256:"4e3c6abb7bc7b801e7f18f136e83d5f61d170661d4872c1f3eafc11df30ff5a6"},{path:"web/lib/runtime-profile-adapter.js",size:40467,sha256:"77f6baf62d146b838920961c3be7a89c6db8a8afdd579225e443b74581826c30"},{path:"web/lib/runtime-profile-modal.js",size:7457,sha256:"4319369f1b909dd31c720983a1185015650c3427490bf1aed8195eb22d1706da"},{path:"web/lib/runtime.js",size:13127,sha256:"94b25ce1cd8ddaff8dc744a9d711d455c2dcc4a36166d5da2f7d23edb7814a56"},{path:"web/lib/safe-source-artifacts.js",size:64368,sha256:"7802fd544a7508d8d749f704f2ceb1a67f4be70efaf2a5dc8a4804f24e8436cc"},{path:"web/lib/safetensors-quantization-contract.js",size:58754,sha256:"73c6e1943699dd6d22413a06f491a0bc23df8454323c901cd4be654110dc5c84"},{path:"web/lib/safetensors-quantization-export.js",size:2024,sha256:"70d9300b8e38027df8c5ac0c9861b4b99fd14b64fb246f32a9f564e065c53122"},{path:"web/lib/safetensors-quantization-view.js",size:6281,sha256:"ea290d002635e7754fe55be6ee10ac298dfc540a3ea4a03b6bb9b402bdad2cac"},{path:"web/lib/sample-library.js",size:14539,sha256:"4f8931d09d5fd195cb97635938d01ebf0aba094bfd5ee1ac7a28b86c5574c56d"},{path:"web/lib/sample-models.js",size:18933,sha256:"297070b218664f35f387572bf78fceb872ddc85f0ab026eb8a9bf58693b32695"},{path:"web/lib/sample-verification.js",size:5159,sha256:"97b641b8cc38f1cae453402b84b0f003f221b7266a62c6c26f32f3b81a645acc"},{path:"web/lib/semantic-artifact-diff.js",size:14098,sha256:"ae9740f00c93c33764baf90f846a9ad55cd70744c419471b4580e987c8497740"},{path:"web/lib/serialized-tensor-view.js",size:8275,sha256:"ffe04435944a9069e0667c90624cf7a5776565fc8fc84b7fa6a4db519fd25c9f"},{path:"web/lib/service-worker.js",size:1847,sha256:"aad329bb0b5713600d4d9326e0a8dcc2c5b507d7ab9614ec13d3d7e4283719f7"},{path:"web/lib/session-evidence.js",size:20558,sha256:"ec88759a4cb0649b2e46788c139435106157cddacc852ef88b593e7e5c730211"},{path:"web/lib/sha256-sync.js",size:4664,sha256:"7c9b351bcb453e579fc5166c4774313957f75fcc36f6e18d61c3027d0c8abd9b"},{path:"web/lib/signing-key-trust.js",size:7208,sha256:"a53aa5e04809435e988dd2232932b13cb49bbf6aff65b3db10859527e4165e3d"},{path:"web/lib/spdx-artifact-export.js",size:3151,sha256:"668ef678cd44950115cbb4d53ac1611490766b646f29d129c7f39280ac0f9ef0"},{path:"web/lib/static-audit-worker-client.js",size:4150,sha256:"9f68aba5ad8bfa79e7c8dbbcd652ae72d80cc334ca84712024f86e25c1cb88d6"},{path:"web/lib/static-audit-worker-protocol.js",size:1557,sha256:"97bcbf9548a6fae2f8d1989861294693a627fa23376c98e112a25d8dd4570f98"},{path:"web/lib/status.js",size:5536,sha256:"a59af553cfe378d4dfee6cc4aad728ce935101b967aaf5a4ada6adefb8adc057"},{path:"web/lib/storage.js",size:4063,sha256:"974760ad15b82f7a9155b790af54db1db7333f86af4180d5bc3cfd6d95803b10"},{path:"web/lib/strict-json.js",size:2663,sha256:"d2a99f28bba82126fe54430aadef919610e702b80cba7b5ce0308f870fec3462"},{path:"web/lib/target-profiles.generated.js",size:23411,sha256:"191ccdf930f49e3a4e09c1a5d150968728a33fe6aa04eb3e4651f421222aac27"},{path:"web/lib/telemetry.js",size:5941,sha256:"a02037c33a946fbcc678af163e308d1ec6c943285f7fd32314bd3635152880b1"},{path:"web/lib/tensor-inventory.js",size:6248,sha256:"5368dded61c170bb4b2db2a15baff19999efb9c2fbc542e62331935742eadc52"},{path:"web/lib/tensor-numerical-integrity.js",size:60107,sha256:"45108bef49171a2f40e1c477d0d42caf90018044831eeab3bd1ce31321fb2d75"},{path:"web/lib/tensorrt-cyclonedx-properties.js",size:3766,sha256:"9ea1390d0833708d85326bc2cac443e629a7bbb82f2bf0986ba3ca4e1207de9c"},{path:"web/lib/tensorrt-engine-inspector.js",size:16986,sha256:"6f772f7c8280c53affbdacb7ef685c4ff9571833ab8c37a69c6aa198069fb455"},{path:"web/lib/tensorrt-llm-contract.js",size:16801,sha256:"ec625bffb249a3d409197c9c9e08295b2cfae877cf620828f6f512d9bb8ab4df"},{path:"web/lib/tensorrt-llm-source-metadata.js",size:1764,sha256:"e1bad70c4699155aa0b1b011984508f384608f185b452d7b721b9d7016e74814"},{path:"web/lib/tensorrt-profile-cost.js",size:5015,sha256:"07fa4a42582b063ddb4526675b6a6ef59c17113dc19e9d25b3ee3f2b4d937b5e"},{path:"web/lib/tensorrt-source-metadata.js",size:3838,sha256:"2d026449d6e1d0bed34d93a47db30cc322a453151faf1e0579bdfe8ba9329b48"},{path:"web/lib/tensorrt-static-preflight.js",size:26703,sha256:"2684637b2c077d597b5759ff9c4345eb656e7e1e7bd4b3e0c3aeb3fe6892993f"},{path:"web/lib/tflite-accelerator-source-profiles.js",size:10748,sha256:"c5e514ed822212411087b4898e30a8024b50ce90d06421917ef3d510a19b835c"},{path:"web/lib/tflite-analysis-contract.js",size:709,sha256:"0bf420747fdb57fd899887fdcb4e58feeea9b1004f889190da8e2c329c649192"},{path:"web/lib/tflite-benchmark.js",size:4653,sha256:"0b450c19dda30f7cb97a9dd573df39386a6c9a6e7eb80b82dea2d9c253bfe1bf"},{path:"web/lib/tflite-build-configuration-binding.js",size:7763,sha256:"18cf9b94e6008df0231e6e265c8e413f0a2dddf0d2cd643a3378f6eb4303dcd1"},{path:"web/lib/tflite-delegate-compatibility.js",size:8536,sha256:"5d83d1ed938071a182fac564a431a10017e0be8079d265cd54e600cb2002e709"},{path:"web/lib/tflite-delegate-rulepack-metadata.js",size:4234,sha256:"e355e6b15e850cbe5604f55c9e1cf115dafc16e74dd43f5c7ae47d4fc8966c0e"},{path:"web/lib/tflite-profile-info-adapter.js",size:24664,sha256:"7377773bd1e6af514edf7d12cc6ca2b4b182ef3f0a52a3a4eac5cfcc35e5829f"},{path:"web/lib/tflite-runtime-info-adapter.js",size:24763,sha256:"3efdfd2038b9ecc69c3a93546b9959f70fd62ded31f45da9e4350834b26a3332"},{path:"web/lib/tflite-worker-rpc.js",size:2284,sha256:"edcdd7dbb919cfbe73eba9a778bfc96f8ae8b49c821a9d3962689c9beb7117f2"},{path:"web/lib/theme-ui.js",size:3658,sha256:"3957537ebeac861274cec6d78a397ac4c36ef2206e874d6e1c94bbf5c55c098f"},{path:"web/lib/transformer-architecture-projection.js",size:6932,sha256:"fac86b3326273bf29ba0747ff8488b9d5d18b692b155843983676ca4d6dcb358"},{path:"web/lib/visual-export.js",size:70147,sha256:"b9626a26b4e327e1b6c448f18ac6ad7555868ea1b8ae8e27f6b73967dcddb37a"},{path:"web/lib/web-usage.js",size:1808,sha256:"49562ccf0496c61bc8301099d7c7dc7c1dd9626e98b412d5023a3a1423497912"},{path:"web/lib/weight-analysis-view.js",size:14201,sha256:"ac6b4b4d8d9a241ab843b6ee245e6a964705d25907a1c26172040bc87271d491"},{path:"web/lib/weight-analysis.js",size:20482,sha256:"e20f30ad71c233faba37bb4ba433dc1ce3254ac20e634b8101c7f7378e198ea4"},{path:"web/lib/weight-hist.js",size:18729,sha256:"a2f6ddcc20d2e5d783a4003c47e64810ebe0c1e5da63f946b758386efb52e92f"},{path:"web/lib/weight-ir.js",size:7413,sha256:"7bdb6b3b104e7b4c8aa8c724bf468b29b2d559a0c916fac6884b498581497122"},{path:"web/lib/weight-visuals.js",size:10600,sha256:"40d5026a714696213714332d5ac1113858136babf5cdb6b5e3acb612029b894e"},{path:"web/lib/workflow-controller.js",size:12843,sha256:"c42fff5bc558e3948ddf815f93c919948a7c96d75f650f29a1dad8ea0ae8f443"},{path:"web/lib/workflow-copy.js",size:11495,sha256:"7c791110b8de61f15b094fd958dd731617fe507aac5d1b8e299781224990300b"},{path:"web/lib/workspace-navigation.js",size:2516,sha256:"db1355e2eab4eb47800325f81fe95946aa2d408fddc6624fbd8501b89be0c65a"},{path:"web/lib/xnnpack-rulepack-metadata.js",size:905,sha256:"f42250b981488417d038a4e6a778979852e93bfff9c7fa38774d2853af8bd975"},{path:"web/lib/xnnpack-selector-evidence.js",size:24647,sha256:"6b0e751683f7a42c7706cb8eb5f3885e00b2a865a470fe4a7414f669183b3e8a"},{path:"web/lib/zip.js",size:3304,sha256:"2dac7a8a38cf5cdc2b7155c70497a3ecb901aa7a2c36a072d9ea947546a86500"},{path:"web/manifest.webmanifest",size:528,sha256:"227e1e9108746156f974c1f1696f97a37fed7a0ce432c39178600336f154935f"},{path:"web/medical.html",size:528,sha256:"b62539eef4b11e8e8ece32dbc61cdec4392b3cde6e4cc238c3eea60368366650"},{path:"web/og-image.png",size:69488,sha256:"1990d2a0106b007dde3f672ac1e6bef40e24a7d941d2cbcd26ef5410229e105a"},{path:"web/onnx-domain.css",size:4821,sha256:"00a7203c041513ab2ce6fe940436bd5105f72da3c36f10b49660791f62d05d98"},{path:"web/onnx.js",size:270149,sha256:"912e4ab0a2de3aeb06d42e532784c3ed5220b104667aba8dcb10d8b6dc74738d"},{path:"web/reference/quant-policy-boundary-validation.v1.json",size:1905,sha256:"991eb12596486da9841022efaf3b9a13a79f632d5c6349e7ad3dd677a55338f9"},{path:"web/report-workspace.css",size:18027,sha256:"feaec3b381f7c28d65d44a9c587f3b26998dea7e424f8856e0c274dfe18ef5a6"},{path:"web/research-labs.css",size:42583,sha256:"795a0ae56fe7750a767d40a3dde2894300b07e3e2922ca35d56b6a45d301b730"},{path:"web/research-theme.css",size:59715,sha256:"5a165764ace5d958a0036a592bc1d87d1454a162aee6d977b25acda57776a92d"},{path:"web/samples/MNISTClassifier.mlmodel",size:395695,sha256:"816d1a222d5272109166ffc819d7ce44aff923a673884e34d982aa74985ba587"},{path:"web/samples/README.md",size:6158,sha256:"795e3c002938112e341bc6efb686b6b6a5cdcc135c5378474bd15513fba46161"},{path:"web/samples/evidence/gpu_partition_probe.observation.json",size:5884,sha256:"47f4ca813a9b6a22ed7707e32fd2e528ce700bd41416f807fc352998697191f9"},{path:"web/samples/evidence/tensorrt-8.6.1-rtx4060.profile.json",size:3944,sha256:"4162a34889d56c3adad54bfb22e611558918323ed5ff64bfdfcc2aeb8d8b1876"},{path:"web/samples/evidence/tensorrt_supported_probe.observation.json",size:5646,sha256:"0b70b2e788341f6cb09e71185e72d44e89304be806729ffc60e72f964cf048b8"},{path:"web/samples/evidence/tiny_decoder_llm.observation.json",size:5672,sha256:"07dcd52f5c55f8943a64d20ce21f3faebeb4850bf3b6d0f378853a740f50be57"},{path:"web/samples/gpu_partition_probe.onnx",size:1350,sha256:"82a2feef00eb6ab03d82f2b30cd17f4d826e2d8307cb059eccd6a0f3120059b2"},{path:"web/samples/mnist-8.onnx",size:26454,sha256:"2f06e72de813a8635c9bc0397ac447a601bdbfa7df4bebc278723b958831c9bf"},{path:"web/samples/mobilenet_v2_1.0_224_quant.tflite",size:3577760,sha256:"f08d447cde49b4e0446428aa921aff0a14ea589fa9c5817b31f83128e9a43c1d"},{path:"web/samples/nanofable-1m-fp16.safetensors",size:2758256,sha256:"a35fd03f52c12f4e78a246bec1927e9a169377fbb8905dc13165d285010e7a44"},{path:"web/samples/tensorrt_supported_probe.onnx",size:1394,sha256:"15e9cd555dfdedcc4ef6a313e40efcaaf3d18dd2ee502018f335fec084118e47"},{path:"web/samples/tiny_decoder_llm.onnx",size:5798,sha256:"1fa4d75584011ef9223c6ccf815bc2c1830424b637533bc560a5be2f518f22ee"},{path:"web/samples/tinymqa1m.Q4_0.gguf",size:521248,sha256:"cb95a6e10f28b76a1dd71c15560dec5a5eee8943f591ef45d11c129786b22cff"},{path:"web/styles.css",size:266617,sha256:"2c7ea255be3e7a0c01bebb1e364d8f3ae40b7043e1e3301bd891fdb84262cd48"},{path:"web/sw.js",size:16732,sha256:"9a3c79a541e53d858de5a9a81b847b8439b9fabf1cb27cc795c6107da100e880"},{path:"web/test.html",size:2209,sha256:"7c0764f3028779297ec11b0730a6ee29e77753c31c93c95b90415f1adf5c2191"},{path:"web/test.js",size:3867,sha256:"9d053130199dbd57a6d0dded1f8b4d8bd11f6add2972df16c4dc59470c682ce5"},{path:"web/verify.html",size:7685,sha256:"db33e41bafe84c7b903044ff7eb41af6ad64b9c0de634e719c9dffdb4447be4e"},{path:"web/weight-workspace.css",size:13654,sha256:"fd651c3b980aa8a11d4c8dd9ee6f6577a84ffc323a927dcae947d03b161d4c32"},{path:"web/workers/deepbom-analysis-worker.js",size:1340,sha256:"df4509460e1969dbd35ba9835cc83cb83c82c65d8d81fed14654f79c84fe28be"},{path:"web/workers/numerical-ir-worker.js",size:965,sha256:"fb3777c600e06ddfbc3c892ee206d6554c670b65201098ab8b5eba5f6ee33147"},{path:"web/workers/static-audit-worker.js",size:10582,sha256:"5df420a4e885b1909fa77326597645d275f68604a2479d405910d7bf202a32df"},{path:"worker/chatgpt-mcp.js",size:31237,sha256:"3fc8814d0a5649c87db398189d64151308768b55ebdae7db761f42e3551b141a"},{path:"worker/claude-mcp.js",size:20942,sha256:"2b449e5c879e79132426e9da450184adc4fd4ebbf04976131873b942776d2d2d"},{path:"worker/index.js",size:98124,sha256:"4343a530cb47ae6b7fdbd874139cc35f91e2d407ea96d7a0061d1c22bba1dc26"},{path:"worker/test-access.js",size:7237,sha256:"46578b0716f533e5949dca8a60a2931e8572f8377171b471278b5766fddf2b74"},{path:"worker/usage-downloads.js",size:3368,sha256:"6e7b7ea9c146ae72e97109ce2e1a1f5a66f5a9fc2f4cd2b7e2da1933d6812c20"},{path:"worker/usage-metrics.js",size:10859,sha256:"0f2a570e009dec2505a8eaae831fa910b4e8f35695adf116f00f666a5e702a6f"},{path:"worker/usage-summary.js",size:7460,sha256:"a0a384dcf6367be606d02057f5a29446d2a68cd68b3a6fe24435aafd57801167"},{path:"wrangler.jsonc",size:1344,sha256:"23440552b7c1a975cb52687843925a2b73ce870f1fed894e8076887a5d842f7e"}]}),i5="b9a232886762337076d3b5a3d84300d3ac74293aaab2c250ddff0c46340a2c78",o5=Object.freeze(["web/lib/report-metadata.js (report metadata/provenance)","web/lib/reason-codes.js (reason-code labels)","web/lib/xnnpack-rulepack-metadata.js (generated XNNPACK delegate provenance)","src/xnnpack_delegate.rs (source-mapped XNNPACK delegate evaluator)","src/xnnpack_rulepack_generated.rs (generated XNNPACK delegate documentary rules)","reference/xnnpack-readme/README-v2.21.0.md (pinned XNNPACK delegate README snapshot)","reference/xnnpack-readme/rule-manifest-v2.21.0.json (XNNPACK delegate semantic rule manifest)","src/target_profiles.rs (target profiles and target-specific planning contracts)","src/lib.rs (quantization classification and XNNPACK planning rules)","src/lib.rs (TFLite runtime-version floor derivation)","src/runtime_version.rs (pinned TFLite runtime-version floor map)","src/tflite_metadata.rs (TFLite M001 metadata contract parser)","src/accumulator_atlas.rs (exact stored-weight accumulator envelope)","web/lib/accumulator-atlas.js (independent browser accumulator validator)","src/requantization_fidelity.rs (pinned TFLite requantization fidelity solver)","web/lib/requantization-fidelity.js (independent browser requantization validator)","src/kernel_witness.rs (exact quantized kernel extremum witness solver)","web/lib/kernel-witness.js (independent browser kernel witness validator and viewer)","web/lib/kernel-witness-worker.js (independent browser kernel witness verification worker)","src/channel_vitality.rs (exact monotone quantized channel vitality solver)","web/lib/channel-vitality.js (independent browser channel vitality validator and viewer)","web/lib/channel-vitality-worker.js (independent browser channel vitality verification worker)","src/rounding_equivalence.rs (exact fixed-point rounding equivalence solver)","web/lib/rounding-equivalence.js (independent browser rounding equivalence validator and viewer)","web/lib/rounding-equivalence-worker.js (independent browser rounding equivalence verification worker)","src/numerical_abi_propagation.rs (exact numerical ABI graph propagation solver)","web/lib/numerical-abi-propagation.js (independent browser numerical ABI propagation validator)","web/lib/numerical-abi-propagation-viewer.js (numerical ABI propagation atlas viewer and export renderer)","src/quantization_lattice.rs (exhaustive residual output-contract design solver)","web/lib/quantization-lattice.js (independent browser residual contract validator)","src/quantization_math.rs (shared pinned quantization arithmetic)","web/lib/quantization-math.js (independent browser quantization arithmetic)","src/contract_migration.rs (residual contract migration impact solver)","web/lib/contract-migration.js (independent browser migration validator)","src/residual_step_response.rs (exhaustive residual adjacent-code step-response solver)","web/lib/residual-step-response.js (independent browser residual step-response validator)","web/lib/residual-step-response-worker.js (independent browser residual step-response worker)","src/residual_contract_distortion.rs (exhaustive residual contract-distortion solver)","web/lib/residual-contract-distortion.js (independent browser residual contract-distortion validator)","web/lib/residual-contract-distortion-worker.js (independent browser residual contract-distortion worker)","web/lib/xnnpack-selector-evidence.js (public XNNPACK evidence identity and arithmetic adapter)","web/lib/ort-compatibility-evidence.js (public ORT evidence identity and conservation adapter)","web/onnx.js (ONNX rule/reconstruction)","web/lib/onnx-container-inference.js (ONNX rule/reconstruction)","web/lib/onnx-domain-analysis.js (ONNX rule/reconstruction)","web/lib/onnx-external-data.js (ONNX rule/reconstruction)","web/lib/onnx-extended-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ml-imputer-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-imputer.js (ONNX rule/reconstruction)","web/lib/onnx-ml-label-encoder-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-label-encoder.js (ONNX rule/reconstruction)","web/lib/onnx-ml-linear-model-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-linear-model.js (ONNX rule/reconstruction)","web/lib/onnx-ml-normalizer-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-normalizer.js (ONNX rule/reconstruction)","web/lib/onnx-ml-one-hot-encoder-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-one-hot-encoder.js (ONNX rule/reconstruction)","web/lib/onnx-ml-scaler-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-scaler.js (ONNX rule/reconstruction)","web/lib/onnx-ml-svm-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-svm.js (ONNX rule/reconstruction)","web/lib/onnx-ml-tree-ensemble-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-tree-ensemble.js (ONNX rule/reconstruction)","web/lib/onnx-ml-value-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-extension-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-matmul-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-recurrent-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-transformer-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-opset-imports.js (ONNX rule/reconstruction)","web/lib/onnx-schema-legality.js (ONNX rule/reconstruction)","web/lib/onnx-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-runtime-shape-binding.js (ONNX rule/reconstruction)","web/lib/onnx-shape-ops.js (ONNX rule/reconstruction)","web/lib/onnx-shape-schema-generated.js (ONNX rule/reconstruction)","web/lib/onnx-sparse-tensor.js (ONNX rule/reconstruction)","web/lib/onnx-static-value-evidence.js (ONNX rule/reconstruction)","web/lib/onnx-tfidf-vectorizer-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-tfidf-vectorizer.js (ONNX rule/reconstruction)","web/lib/onnx-type-proto.js (ONNX rule/reconstruction)","web/lib/report-findings.js (authoritative finding rules)","web/lib/finding-contract.js (finding evidence-pointer contract)"]);var _h="2026-08-03",Eo="1.105.0",dh="deepbom.rulepack.2026-07-24.63";var Hre=Object.freeze(["input","audit","findings","output"]);var a5="deepbom.finding_evidence_pointer_validation.v1",sV=Object.freeze(["High","Medium","Low","Informational"]),e0=Object.freeze(["artifact_defect","caution","evidence_gap"]),Zre=new Map(sV.map((e,t)=>[e,t]));var en=Object.freeze({schema:"deepbom.xnnpack_delegate_rule_manifest.v1",sourceCommit:"87bbf65b8d23d3f06912b1b2183587e1884bc45c",sourceTagAlias:"v2.21.0",sourceTagCommit:"a481b10260dfdf833a1b16007eead49c1d7febf3",sourcePath:"tensorflow/lite/delegates/xnnpack/README.md",sourceSha256:"85524b3e6acfe5429b9d8b7c1ef47dde79a4543ccbe2f73a0e276f8e7e0eb93c",manifestSha256:"657160ac6438d2a2752bb1574acf6e2057f5d478dcffbb38779212f792033c79",fp32OperatorCount:41,quantizedOperatorCount:24,documentedConstraintCount:133,implementedConstraintCount:133,unmappedConstraintCount:0,runtimeOnlyGlobalRequirementCount:2,conformanceStatus:"source_snapshot_verified_all_artifact_visible_constraints_mapped"});var Pn=Object.freeze({name:"deepbom",displayName:"DEEPBOM / wasm-static-analyzer",version:_h,semanticVersion:Eo,buildCommit:Nr,buildSourceState:uh,buildContentSha256:xl,buildContentHashMethod:e5,buildContentHashBasis:t5,buildContentManifestSha256:n5,rulepackVersion:dh,rulepackSha256:i5,rulepackHashBasis:o5,xnnpackSupportBasis:`TensorFlow Lite XNNPACK delegate README at tensorflow/tensorflow@${en.sourceCommit}; README SHA-256 ${en.sourceSha256}, byte-identical to tag ${en.sourceTagAlias} at ${en.sourceTagCommit}; ${en.implementedConstraintCount}/${en.documentedConstraintCount} artifact-visible op constraints are machine mapped by manifest ${en.manifestSha256}; quantized runtime build flags remain runtime-only requirements; source-enumerated kernel candidates use pinned google/XNNPACK@23a67314f7afdbb76191589ae090d82bf55afbfa`,rulepackProvenance:Object.freeze({xnnpackReadmeUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/delegates/xnnpack/README.md",xnnpackCheckedRef:"tensorflow/tensorflow@87bbf65b8d23d3f06912b1b2183587e1884bc45c",xnnpackReadmeSha256:en.sourceSha256,xnnpackTagAlias:`tensorflow/tensorflow@${en.sourceTagAlias}`,xnnpackTagCommit:en.sourceTagCommit,xnnpackTagReadmeUrl:`https://github.com/tensorflow/tensorflow/blob/${en.sourceTagCommit}/${en.sourcePath}`,xnnpackDelegateRuleManifestSchema:en.schema,xnnpackDelegateRuleManifestSha256:en.manifestSha256,xnnpackDelegateDocumentedConstraintCount:en.documentedConstraintCount,xnnpackDelegateImplementedConstraintCount:en.implementedConstraintCount,xnnpackDelegateUnmappedConstraintCount:en.unmappedConstraintCount,xnnpackDelegateRuntimeOnlyRequirementCount:en.runtimeOnlyGlobalRequirementCount,xnnpackDelegateSourceConformanceStatus:en.conformanceStatus,xnnpackDependencyRef:"google/XNNPACK@23a67314f7afdbb76191589ae090d82bf55afbfa",xnnpackDependencyPinUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/tools/cmake/modules/xnnpack.cmake",xnnpackGemmConfigUrl:"https://github.com/google/XNNPACK/blob/23a67314f7afdbb76191589ae090d82bf55afbfa/src/configs/gemm-config.c",xnnpackGemmConfigSha256:"545f0fd6bab43186819199cf846a1f1cbb5eaa2b1df9b70e5e43431185f2b7f6",xnnpackDwconvConfigUrl:"https://github.com/google/XNNPACK/blob/23a67314f7afdbb76191589ae090d82bf55afbfa/src/configs/dwconv-config.c",xnnpackDwconvConfigSha256:"6ee0ceb2a953ab5cd19651ad652eadf84cd198947acfdd456e1322c787bae9fa",tfliteRuntimeInfoRef:"tensorflow/tensorflow@87bbf65b8d23d3f06912b1b2183587e1884bc45c",tfliteRuntimeInfoProtoUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/proto/model_runtime_info.proto",tfliteRuntimeInfoProtoSha256:"7829c3163339ce7dea01091a5154a06cb302f35573ad51d3af06a2a09b95a8fb",tfliteRuntimeInfoGeneratorUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/model_runtime_info.cc",tfliteRuntimeInfoGeneratorSha256:"9a6edf838fe149c54efe0700bcdc2faf58dd5343f1370538e91bf5ed8a0e11b6",tfliteDelegationMetadataUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/optional_debug_tools.cc",tfliteDelegationMetadataSha256:"607010c8f7aba721bd5d96f45cb08c55226a800e55946da708368d09d4545260",tfliteRuntimeInfoExportDriverUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/tools/benchmark/benchmark_tflite_model.cc",tfliteRuntimeInfoExportDriverSha256:"e26a3e4e26300442b47d27e1b515ccbc85b34425625d60f637faa28973f7a8f7",tfliteConversionMetadataSchemaUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/compiler/mlir/lite/schema/conversion_metadata.fbs",tfliteConversionMetadataSchemaSha256:"2464449e30bfa6032c0218b53a1a83b224c6eda9b5cfd9f12211c4c0017dc20e",tfliteProfilingInfoProtoUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/proto/profiling_info.proto",tfliteProfilingInfoProtoSha256:"dd286650b64ae913cd9db25baa87a1527835fce4201ad407716b4af4f7dafc69",tfliteProfilingListenerUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/tools/benchmark/profiling_listener.cc",tfliteProfilingListenerSha256:"7890e11f356c4a0c92ac19f2c5f1c3187df077d49b0d31f52b2d43c2b4cd5a7a",tfliteProfileSummarizerUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/profile_summarizer.cc",tfliteProfileSummarizerSha256:"de7010e97438b7e233e8ec80c8bb19fcbe435475d4f2cca5ccb8bbc03e4d0f91",tfliteProfileFormatterUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/profile_summary_formatter.cc",tfliteProfileFormatterSha256:"cda02354a7a4c3f1c87263206fd13a64f3c3aae56270e0339a59e4aeae82491f",tfliteProfilerApiSha256:"87f644f353c917464ce6eb82e8c6f893d88d04b7d2311e0f2fbe83a7b2df37db",tfliteSubgraphProfilingSha256:"f1820803ba838bf4261c1cf679ae664a9b29ea3661760d8b3aaae031a135516f",tfliteXnnpackProfilingSha256:"d9a1b2b5b28dd67c2c81e73671470da0c720b1774d48d41832ed7550083f93ad",ortSourceRef:"microsoft/onnxruntime@8c546c37b43caaca1fa25db430dab94b901cf277",ortOperatorKernelsUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/docs/OperatorKernels.md",ortOperatorKernelsSha256:"23ecda7c40bacc71f5362ec01f994f50eab809324587d3e8a2cac46ff707652c",ortWebgpuOperatorsUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/js/web/docs/webgpu-operators.md",ortWebgpuOperatorsSha256:"e60f85a34d43d55cb6f4ea1b97571f6ef57b92c2aeb9b8d99fae50076caa06fe",ortWebnnOperatorsUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/js/web/docs/webnn-operators.md",ortWebnnOperatorsSha256:"b41fe9d30f4270d460a55be8393dc4c539d6e12cc5939c2b8b3c7a074943eeb8",ortCompatibilityMatrixUrl:"https://github.com/microsoft/onnxruntime/blob/d86c44a634c32328c71ffdc0ae1dea8fb0e69a20/docs/reference/compatibility.md",ortCompatibilityMatrixSha256:"b79ae7035295a6009879b4d8f882ff4a9402726e53533b9d3787fe50e0a42664",onnxOperatorSchemaUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/onnx/defs/operator_sets.h",onnxOperatorSchemaSha256:"d1c94c1b4b890350a5ff8cc8bf24bd062b09b7a0689293afb1fdc1f7e987b479",onnxOperatorSchemaHistoryUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/docs/Changelog.md",onnxOperatorSchemaHistorySha256:"315293e31dd0f415efc7dd821380b53418845f3a719a4930c8df87a30023b6e3",onnxMlOperatorSchemaUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/onnx/defs/operator_sets_ml.h",onnxMlOperatorSchemaSha256:"fa3d663df091a0cadc85d902a12d84d7465bfec8cf7433861f82b99f921278a4",onnxIrSchemaUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/onnx/onnx.in.proto",onnxIrSchemaSha256:"f4cbc198df3a0f3f4519d4d38cd2262e8f84057583b7313e2d0f981b3f68c213",ortContribOperatorSchemaUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/docs/ContribOperators.md",ortContribOperatorSchemaSha256:"a00b931b8df0db12e03c3346ef9d1abc84200156e1910acaa40dd622711978c9",arenaPlannerRef:"tensorflow/tensorflow@87bbf65b8d23d3f06912b1b2183587e1884bc45c",arenaPlannerUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/arena_planner.cc",simpleMemoryArenaUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/simple_memory_arena.cc",arenaTensorAlignmentBytes:64,tfliteQuantizeMultiplierUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/kernels/internal/quantization_util.cc",tfliteQuantizeMultiplierSha256:"22e46f15663437c407298f5230545600faa2f6b2f1b46488e20c97ff3a5c96f9",tfliteConvolutionQuantizationParamsUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/kernels/kernel_util.cc",tfliteConvolutionQuantizationParamsSha256:"fb03b532b1f510ccf5d7d169eeebcc408791677c97cbce235893560b4379da49",tfliteFixedPointExecutionUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/kernels/internal/common.cc",tfliteFixedPointExecutionSha256:"ba5308bf76383d600d033c948fe0659710939e6f1f15a800b5413e5fc822ddfa",litertRuntimeBasis:"TensorFlow Lite XNNPACK delegate README at the pinned tensorflow/tensorflow commit above",note:"Delegation remains PREDICTED. Source-enumerated kernel configuration sets retain unresolved compile/runtime selectors and never claim an executed microkernel; runtime delegate/profiler evidence is authoritative."}),schemas:Object.freeze({staticAnalysis:"deepbom.static_analysis.v1.68",serializedContainerAnalysis:"deepbom.static_analysis.container.v1",coreMlStaticAnalysis:"deepbom.static_analysis.coreml.v1.1",execuTorchStaticAnalysis:"deepbom.static_analysis.executorch.v1.1",artifactMetadata:"deepbom.artifact_metadata.v1.4",inputTensorContract:"deepbom.input_tensor_contract.v1",dynamicShapeCostContract:"deepbom.dynamic_shape_cost_contract.v2.2",onnxExternalData:"deepbom.onnx_external_data.v1.3",onnxExternalArtifactSet:"deepbom.onnx_external_artifact_set.v1.2",onnxExternalRuntimeBinding:"deepbom.onnx_external_runtime_binding.v1",onnxShapeInference:"deepbom.onnx_shape_inference.v1.30",onnxExtendedShapeInference:"deepbom.onnx_extended_shape_inference.v1.6",onnxContainerValueInference:"deepbom.onnx_container_value_inference.v1",onnxTfIdfVectorizerInference:"deepbom.onnx_tfidf_vectorizer_inference.v1",onnxMlValueInference:"deepbom.onnx_ml_value_inference.v1.12",onnxTensorDataTypeContract:"deepbom.onnx_tensor_data_type_contract.v1",onnxTypeProtoContract:"deepbom.onnx_type_proto_contract.v1",onnxSparseTensorContract:"deepbom.onnx_sparse_tensor_contract.v1.2",deploymentFrontier:"deepbom.deployment_frontier.v1.6",deploymentDelta:"deepbom.deployment_delta.v1.1",delegationRepair:"deepbom.delegation_repair.v1.3",quantizationLattice:"deepbom.quantization_lattice.v1.4",accumulatorAtlas:"deepbom.accumulator_atlas.v1.3",requantizationFidelity:"deepbom.requantization_fidelity.v1",kernelExtremumWitness:"deepbom.kernel_extremum_witness.v1",channelVitality:"deepbom.channel_vitality.v1",roundingEquivalence:"deepbom.rounding_equivalence.v1",accumulatorReachability:"deepbom.accumulator_reachability.v1",numericalAbiPropagation:"deepbom.numerical_abi_propagation.v1.1",inputCounterexample:"deepbom.input_counterexample.v1",preprocessingRealizability:"deepbom.preprocessing_realizability.v1",preprocessingConsequence:"deepbom.preprocessing_consequence_atlas.v1",contractMigration:"deepbom.contract_migration.v1",residualStepResponse:"deepbom.residual_step_response.v1",residualContractDistortion:"deepbom.residual_contract_distortion.v1.1",modelStructure:"deepbom.model_structure.v1.4",quantizationEvidence:"deepbom.quantization_evidence.v1.19",quantizationContractChecks:"deepbom.quantization_contract_checks.v1.18",runtimeEvidence:"deepbom.runtime_evidence.v1.16",runtimeEvidenceSidecar:"deepbom.runtime_evidence_sidecar.v1",runtimeAssignment:"deepbom.runtime_assignment.v1.10",runtimeSelectorContext:"deepbom.runtime_selector_context.v1.1",tfliteDelegateBuildInventory:"deepbom.tflite_delegate_build_inventory.v1",runtimeSelectorObservation:"deepbom.runtime_selector_observation.v1",nativeRuntimeCollector:"deepbom.native_runtime_collector.v1.1",runtimeMemory:"deepbom.runtime_memory.v1",arenaRuntimeReconciliation:"deepbom.arena_runtime_reconciliation.v1",ortProfileAdapter:"deepbom.ort_profile_adapter.v2.2",onnxRuntimeShapeBinding:"deepbom.onnx_runtime_shape_binding.v2",ortNativeCapture:"deepbom.ort_native_capture.v1.5",ortNativeProfile:"deepbom.ort_native_profile.v1.4",tfliteRuntimeInfoAdapter:"deepbom.tflite_runtime_info_adapter.v2",tfliteBenchmarkProfileAdapter:"deepbom.tflite_benchmark_profile_adapter.v1",runtimeAssignmentComparison:"deepbom.runtime_assignment_comparison.v1.4",executionPlacementEvidence:"deepbom.execution_placement_evidence.v1",placementComparison:"deepbom.placement_comparison.v1",predictedRuntimeBoundarySummary:"deepbom.predicted_runtime_boundary_summary.v1",observedPartitionBoundaryEdges:"deepbom.observed_partition_boundary_edges.v1",weightIndicatorEvidence:"deepbom.weight_indicator_evidence.v1.1",securityPosture:"deepbom.security_posture.v1.3",findingsRegister:"deepbom.findings_register.v1.51",findingEvidencePointerValidation:a5,metricCoverageManifest:"deepbom.metric_coverage_manifest.v1.55",decisionCoverage:"deepbom.decision_coverage.v1.11",engineeringEvidence:"deepbom.engineering_evidence.v1.80",conformanceReport:"deepbom.conformance_report.v1.77",xnnpackSelectorEvidence:"deepbom.xnnpack_selector_evidence.v2",tfliteDelegateSourceRulepack:"deepbom.tflite_delegate_source_rulepack.v1",ortSourceCompatibility:"deepbom.ort_source_compatibility.v1.15",ortEpPortabilityFrontier:"deepbom.ort_ep_portability_frontier.v2",analyzerBuildContentManifest:"deepbom.analyzer_build_content_manifest.v1",packageDigestSet:"deepbom.package_member_digest_set.v1",attestation:"deepbom.attestation.v2.2",engineeringReport:"deepbom.engineering_report.v1.79",regulatoryReport:"deepbom.regulatory_report.v1.12",engineeringBundle:"deepbom.engineering_bundle.v1.82",regulatoryBundle:"deepbom.regulatory_bundle.v1.50"})});var s5="deepbom.quant_research_coverage.v1",cV=new Set(["full_integer","mixed_integer"]),lV=Object.freeze([Jn("weight_scale_integrity","Weight scale integrity","weight_integrity",!1),Jn("quantization_lattice","Residual quantization lattice","quantization_lattice"),Jn("accumulator_atlas","Accumulator atlas","accumulator_atlas"),Jn("requantization_fidelity","Requantization fidelity","requantization_fidelity"),Jn("kernel_extremum_witness","Kernel extremum witness","kernel_extremum_witness"),Jn("channel_vitality","Channel vitality","channel_vitality"),Jn("rounding_equivalence","Rounding equivalence","rounding_equivalence"),Jn("accumulator_reachability","Accumulator reachability","accumulator_reachability"),Jn("numerical_abi_propagation","Numerical ABI propagation","numerical_abi_propagation"),Jn("input_counterexample","Input counterexample","input_counterexample"),Jn("preprocessing_realizability","Preprocessing realizability","preprocessing_realizability"),Jn("preprocessing_consequence","Preprocessing consequence",null),Jn("contract_migration","Residual contract migration","contract_migration"),Jn("residual_step_response","Residual step response","residual_step_response"),Jn("residual_contract_distortion","Residual contract distortion","residual_contract_distortion")]);function Jn(e,t,n,i=!0){return Object.freeze({id:e,label:t,evidenceKey:n,requiresIntegerActivations:i})}function uV(e){if(String(e?.format||"tflite").toLowerCase()!=="tflite")return Ir("not_applicable_format","Not applicable","Quantized TFLite research contracts do not apply to this artifact format.","QR-CLASS-FORMAT");let t=String(e?.quantization_status?.classification||""),n=new Map((e?.quantization_status?.op_state_counts||[]).map(i=>[String(i.name||""),Number(i.count||0)]));return t==="full_integer"||t==="integer_internal_float_io"?Ir("full_integer","Full-integer activation path",`Quantized compute activations, weights, and outputs expose the integer arithmetic contracts required by the advanced labs.${t==="integer_internal_float_io"?" Integer compute is present behind explicit floating-point model I/O boundaries.":""}`,"QR-CLASS-FULL-INTEGER",t):t==="mixed_quantization"||Number(e?.quantization_status?.quantized_compute_ops||0)>0?Ir("mixed_integer","Mixed integer/float path","At least one integer compute region is present, but advanced-lab coverage can be partial at floating-point boundaries.","QR-CLASS-MIXED",t):t==="dynamic_range_or_weight_only"?Number(n.get("weight_only_or_dynamic_range")||0)>0?Ir("dynamic_range","Dynamic-range quantized","Stored 8-bit compute weights are present while compute activation inputs and outputs remain floating-point. Integer activation, accumulator, requantization, residual-code, and preprocessing-code proofs are outside this artifact contract.","QR-CLASS-DYNAMIC-RANGE",t):Ir("weight_only","Reduced-precision weight-only","Reduced-precision storage signals exist without an artifact-visible integer activation compute path. Weight storage checks apply; integer activation-path proofs do not.","QR-CLASS-WEIGHT-ONLY",t):["qdq_signals_only","float16_weight_storage"].includes(t)&&gV(e)?Ir("weight_only","Reduced-precision weight-only","Reduced-precision constant storage is expanded through DEQUANTIZE operators into a floating-point compute path. Integer activation, accumulator, requantization, residual-code, and preprocessing-code proofs do not apply.","QR-CLASS-WEIGHT-ONLY",t):t==="not_quantized_float"||!hV(e)?Ir("float","Floating-point","No artifact-visible quantized storage and integer activation compute contract is available to the quantization research labs.","QR-CLASS-FLOAT",t):Ir("weight_only","Quantization signals without integer activation path","Quantization metadata or boundary signals exist, but no complete integer activation compute contract is established.","QR-CLASS-WEIGHT-ONLY",t)}function _V(e){let t=uV(e),n=lV.map(r=>dV(e,t,r)),i=r=>n.filter(r).length,o=i(r=>r.class_supported),a=i(r=>r.artifact_applicable);return{schema:s5,evidence_class:"DERIVED",artifact_class:t.id,artifact_class_label:t.label,artifact_class_reason_code:t.reasonCode,artifact_class_detail:t.detail,source_quantization_classification:t.sourceClassification,lab_count:n.length,class_supported_lab_count:o,class_excluded_lab_count:n.length-o,artifact_applicable_lab_count:a,assessed_lab_count:i(r=>r.status==="assessed"),partial_lab_count:i(r=>r.status==="partial"),not_assessed_lab_count:i(r=>r.status==="not_assessed"),not_applicable_lab_count:i(r=>r.status==="not_applicable"),scan_denominator_policy:"Group artifacts by artifact_class. Exclude not_applicable labs from defect-free and defect-rate denominators; report not_assessed and rejected evidence separately from observed absence.",labs:n}}function c5(e,t){return(e?.quant_research_coverage?.schema===s5?e.quant_research_coverage:_V(e)).labs.find(i=>i.id===t)||null}function dV(e,t,n){if(!(n.requiresIntegerActivations?cV.has(t.id):!["float","not_applicable_format"].includes(t.id)))return{id:n.id,label:n.label,evidence_key:n.evidenceKey,class_supported:!1,artifact_applicable:!1,status:"not_applicable",reason_code:t.reasonCode,reason:t.detail,render_policy:"common_empty"};if(n.id==="preprocessing_consequence")return{id:n.id,label:n.label,evidence_key:null,class_supported:!0,artifact_applicable:!0,status:"not_assessed",reason_code:"QR-RUNTIME-INPUT-REQUIRED",reason:"This local runtime consequence lab becomes assessed only after an eligible preprocessing witness and runtime execution are bound.",render_policy:"lab"};if(n.id==="weight_scale_integrity"){let s=Number(e?.weight_integrity?.quantized_constant_tensors_scanned||0);return{id:n.id,label:n.label,evidence_key:n.evidenceKey,class_supported:!0,artifact_applicable:s>0,status:s>0?"assessed":"not_applicable",reason_code:s>0?"QR-WEIGHT-SCALES-ASSESSED":"QR-NO-QUANTIZED-CONSTANTS",reason:s>0?`${s} quantized constant tensor(s) were decoded for scale/grid/integrity checks.`:"No decodable quantized constant tensor is present.",render_policy:s>0?"lab":"common_empty"}}let o=e?.[n.evidenceKey],a=pV(o),r=a!=="not_applicable";return{id:n.id,label:n.label,evidence_key:n.evidenceKey,class_supported:!0,artifact_applicable:r,status:a,reason_code:mV(o,a),reason:fV(o,a),render_policy:a==="not_applicable"||a==="not_assessed"&&l5(o)?"common_empty":"lab"}}function pV(e){if(!e||typeof e!="object")return"not_assessed";let t=String(e.status||e.assessment_status||"not_assessed").toLowerCase();return t==="assessed"?"assessed":t==="partial"?l5(e)?"not_assessed":"partial":t==="not_applicable"?"not_applicable":"not_assessed"}function l5(e){let t=t0(e),n=r5(e,["assessed_op_count","assessed_add_count","assessed_source_count","assessed_witness_count"],t.filter(o=>o?.assessment_status==="assessed").length),i=r5(e,["candidate_op_count","candidate_add_count","source_op_count"],t.length);return n===0&&i>0}function r5(e,t,n=0){let i=Number.isFinite(n)?n:0;for(let o of t){let a=Number(e?.[o]);Number.isFinite(a)&&(i=Math.max(i,a))}return i}function t0(e){for(let t of["ops","residual_adds","sources","candidates"])if(Array.isArray(e?.[t]))return e[t];return[]}function mV(e,t){if(t==="assessed")return"QR-EVIDENCE-ASSESSED";if(t==="partial")return"QR-EVIDENCE-PARTIAL";let n=t0(e).find(i=>i.assessment_status!=="assessed")?.reason_code;return String(e?.reason_code||n||(t==="not_applicable"?"QR-GRAPH-NOT-APPLICABLE":"QR-EVIDENCE-NOT-ASSESSED"))}function fV(e,t){if(t==="assessed")return"The emitted evidence ledger is assessed.";if(t==="partial")return"The artifact contains both assessed and explicitly unassessed evidence rows.";let n=t0(e).find(i=>i.assessment_status!=="assessed");return String(e?.reason||e?.detail||n?.reason||n?.status_detail||(t==="not_applicable"?"The required graph pattern is absent.":"No assessable evidence row was emitted."))}function Ir(e,t,n,i,o=""){return{id:e,label:t,detail:n,reasonCode:i,sourceClassification:o}}function hV(e){return Number(e?.quantized_tensors||0)>0||Number(e?.quantization_status?.int8_tensors||0)>0||Number(e?.quantization_status?.uint8_tensors||0)>0}function gV(e){return(e?.tensors||[]).some(t=>t?.constant_buffer===!0&&["FLOAT16","BFLOAT16","INT8","UINT8","INT4","UINT4"].includes(String(t.dtype||"")))}var a0=new Set(["CONV_2D","DEPTHWISE_CONV_2D","FULLY_CONNECTED"]),ph=2,Rd=2147483647;function d5(e){let t=String(e?.format||"tflite").toLowerCase();if(t==="onnx")return yV(e);if(t!=="tflite")return bV(e,t);let n=VT(e),i=HT(e),o=kV(e),a=OV(e),r=ro(e,"accumulator_atlas",()=>RV(e)),s=ro(e,"requantization_fidelity",()=>BV(e)),c=ro(e,"kernel_extremum_witness",()=>DV(e)),u=ro(e,"channel_vitality",()=>MV(e)),l=ro(e,"rounding_equivalence",()=>$V(e)),_=ro(e,"accumulator_reachability",()=>LV(e)),p=ro(e,"numerical_abi_propagation",()=>PV(e)),d=ro(e,"input_counterexample",()=>qV(e)),m=ro(e,"preprocessing_realizability",()=>jV(e)),f=ro(e,"contract_migration",()=>SV(e)),g=ro(e,"residual_step_response",()=>TV(e)),h=ro(e,"residual_contract_distortion",()=>zV(e)),b=ch(e),A=KT(e),y=FV(e),x=QV(e),v=UV(e),I=[n,o,a,r,s,c,u,l,_,p,d,m,f,g,h,b,y,x,v],w=I.some(O=>O.status==="fail")?"fail":I.some(O=>O.status==="pass")?"pass":"not_applicable",N=[i,A,o,a,s,c,u,l,_,p,d,m,f,g,h,y,v],S=N.some(O=>O.status==="review")?"review":N.some(O=>O.status==="pass")?"clear":"not_applicable";return{schema:Pn.schemas.quantizationContractChecks,status:w,contract_integrity_status:w,quantization_design_review_status:S,status_semantics:"Contract integrity reports deterministic artifact-contract violations only. Design review reports threshold/configuration signals without changing contract pass/fail.",evidence_class:"DERIVED",method:"Deterministic graph-edge and quantization-metadata checks over the deployment artifact.",bias_scale:n,representable_kernel_channels:i,residual_add:o,weight_zero_point:a,accumulator_bound:r,requantization_fidelity:s,kernel_extremum_witness:c,channel_vitality:u,rounding_equivalence:l,accumulator_reachability:_,numerical_abi_propagation:p,input_counterexample:d,preprocessing_realizability:m,contract_migration:f,residual_step_response:g,residual_contract_distortion:h,io_dequantization:b,input_quantization_convention:A,missing_quantization_metadata:y,qdq_boundaries:x,kernel_quantization:v}}function bV(e,t){let n=e?.quantization_status||null,i=t==="safetensors"?e?.safetensors?.quantization_contract||null:t==="gguf"?e?.gguf?.type_traits_source||e?.gguf?.backend_compatibility||null:t==="coreml"?e?.coreml?.quantization_contract||n:null,o=String(i?.assessment_status||i?.status||n?.assessment_status||n?.status||"not_assessed").toLowerCase(),a=["fail","failed","invalid"].some(u=>o.includes(u)),r=t==="gguf"&&e?.gguf?.payload_coverage_status==="complete_without_gaps_or_overlaps"&&Number(n?.unsupported_encoding_tensor_count||0)===0&&/^[0-9a-f]{64}$/.test(String(e?.gguf?.type_traits_source?.type_traits_source_sha256||""))&&/^[0-9a-f]{64}$/.test(String(e?.gguf?.type_traits_source?.block_layout_source_sha256||"")),s=r||o==="assessed"||o.startsWith("assessed_")||o==="complete"||o==="pass",c=a?"fail":s?"pass":"not_assessed";return{schema:Pn.schemas.quantizationContractChecks,format_contract:`${t||"serialized"} serialized quantization/storage contract`,status:c,contract_integrity_status:c,quantization_design_review_status:"not_assessed",status_semantics:"Only a normalized format-specific serialized quantization contract can establish storage or numerical quantization state. Missing metadata is NOT_ASSESSED and is not relabeled as floating-point or zero quantization.",evidence_class:s||a?"OBSERVED/DERIVED":"NOT_ASSESSED",method:"Preserve the analyzer-emitted format-specific storage/quantization contract without applying TFLite fixed-point or ONNX Q/DQ rules across formats.",serialized_contract:{status:r?"assessed_source_pinned_storage_contract":o,quantization_status:n,format_contract:i,interpretation_boundary:"This contract does not establish executed kernel precision, runtime dequantization/fusion, task accuracy, or deployment performance."}}}function ro(e,t,n){let i=c5(e,t);return i?.class_supported?n():yt(`${i?.reason||"This lab is outside the normalized artifact class"} (${i?.reason_code||"QR-CLASS-NOT-APPLICABLE"}).`)}function yV(e){let t=AV(e),n=vV(e),i=yt("TFLite tensor scale vectors are not substituted for ONNX Q/DQ parameter bindings."),o=yt("Residual ADD scale checks require quantized tensor contracts on both ONNX Add inputs; no QLinearAdd standard operator is assumed."),a=wV(e),r=xV(e),s=yt("Pinned TFLite Q0.31 requantization encoding does not apply to ONNX execution-provider kernels."),c=yt("Pinned TFLite per-channel integer extremum witnesses do not apply to ONNX execution-provider kernels."),u=yt("Pinned TFLite fixed-point channel-vitality proofs do not apply to ONNX execution-provider kernels."),l=yt("Pinned TFLite default/single-rounding interval-hull equivalence proofs do not apply to ONNX execution-provider kernels."),_=yt("Pinned TFLite bounded-sum accumulator reachability proofs do not apply to ONNX execution-provider kernels."),p=yt("TFLite fixed-point build-mode divergence propagation does not apply to ONNX execution-provider kernels."),d=yt("TFLite fixed-point model-input tensor counterexamples do not apply to ONNX execution-provider kernels."),m=yt("TFLite constructive input-witness preprocessing counterfactuals do not apply to ONNX execution-provider kernels."),f=yt("TFLite residual containment-contract migration does not apply to ONNX execution-provider kernels."),g=yt("TFLite residual local code-step response geometry does not apply to ONNX execution-provider kernels."),h=yt("TFLite residual containment-contract distortion geometry does not apply to ONNX execution-provider kernels."),b=ch(e),A=EV(e),y=NV(e),x=IV(e),v=[t,n,a,r],I=v.some(N=>N.status==="fail")?"fail":v.some(N=>N.status==="pass")?"pass":"not_applicable",w=[a,x,A].some(N=>N.status==="review")?"review":"clear";return{schema:Pn.schemas.quantizationContractChecks,format_contract:"ONNX standard-domain QuantizeLinear/DequantizeLinear/QLinearConv/QLinearMatMul",status:I,contract_integrity_status:I,quantization_design_review_status:w,status_semantics:"Contract integrity reports deterministic ONNX parameter/signature violations. Runtime QDQ fusion and execution-provider lowering are not inferred from graph syntax.",evidence_class:"DERIVED",method:"Deterministic binding of embedded ONNX TensorProto scale/zero-point parameters to standard-domain Q/DQ and QLinear signatures.",parameter_integrity:t,bias_scale:n,representable_kernel_channels:i,residual_add:o,weight_zero_point:a,accumulator_bound:r,requantization_fidelity:s,kernel_extremum_witness:c,channel_vitality:u,rounding_equivalence:l,accumulator_reachability:_,numerical_abi_propagation:p,input_counterexample:d,preprocessing_realizability:m,contract_migration:f,residual_step_response:g,residual_contract_distortion:h,io_dequantization:b,missing_quantization_metadata:A,qdq_boundaries:y,kernel_quantization:x}}function AV(e){let t=e?.onnx_quantization_binding||{},n=t.bindings||[],i=n.filter(a=>a.status==="fail"),o=n.filter(a=>String(a.status||"").startsWith("not_assessed"));return{status:i.length?"fail":n.length&&!o.length?"pass":"not_applicable",evidence_class:"DERIVED",checked_bindings:n.length,valid_bindings:n.filter(a=>a.status==="pass").length,invalid_bindings:i.length,unresolved_bindings:o.length,integer_compute_without_real_scale_count:Number(t.integer_compute_without_real_scale_count||0),method:t.method||"ONNX quantization parameter binding was not emitted.",details:n}}function vV(e){let t=[],n=0;for(let o of Qe(e)||[]){if(o.name!=="QLinearConv"||Number(o.inputs?.[8])<0)continue;let a=Fi(e,o.inputs[0]),r=Fi(e,o.inputs[3]),s=Fi(e,o.inputs[8]),c=i0(e,a)[0]||0,u=i0(e,r);if(!(c>0)||!u.length||!s)continue;let l=u.map(f=>c*f),_=h5(s.shape),p=Number(r?.shape?.[0]||l.length),d=String(s.dtype||"").toUpperCase()==="INT32",m=_===p;n+=l.length,t.push({op_index:o.index,op_name:o.name,input_tensor_index:qn(a),weight_tensor_index:qn(r),bias_tensor_index:qn(s),checked_channels:l.length,expected_bias_scales:l.slice(0,256),expected_scale_count:l.length,bias_dtype:s.dtype,bias_element_count:_,output_channel_count:p,status:d&&m?"pass":"fail",reasons:[d?"":"QLinearConv bias must be INT32",m?"":"bias element count must equal output channels"].filter(Boolean),formula:"implicit_bias_scale[channel] = x_scale * w_scale[channel]",contract_note:"ONNX QLinearConv stores INT32 bias values without a separate bias-scale TensorProto; the real-value scale is implicit in the operator contract.",evidence_json_pointer:`/evidence/static_analysis/ops/${o.index}`})}let i=t.filter(o=>o.status==="fail");return{status:t.length?i.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",contract_kind:"onnx_implicit_qlinearconv_bias_scale",checked_groups:t.length,checked_channels:n,mismatch_groups:i.length,maximum_relative_error:null,relative_tolerance:null,method:"implicit_bias_scale[channel] = x_scale * w_scale[channel]; verify INT32 dtype and output-channel cardinality",details:t}}function wV(e){let t=[];for(let o of p5(e)){let a=f5(e,o),r=String(o.dtype||"").toUpperCase(),s=r==="INT8"?[-128,127]:r==="UINT8"?[0,255]:null,c=!s||a.some(_=>_<s[0]||_>s[1]||!Number.isInteger(_)),u=!1,l=r==="UINT8"&&a.some(_=>_!==0);t.push({tensor_index:qn(o),tensor_name:o.name||"",dtype:r,zero_points:a,legal_range:s,out_of_range:c,symmetric_int8_violation:u,asymmetric_uint8_observed:l,status:c?"fail":"pass",formula:"qmin <= zero_point <= qmax; ONNX QLinear signed weights are not assumed symmetric",evidence_json_pointer:`/evidence/static_analysis/tensors/${qn(o)}`})}let n=t.filter(o=>o.status==="fail"),i=t.filter(o=>o.status==="review");return{status:t.length?n.length?"fail":i.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_tensors:t.length,violation_tensors:n.length,asymmetric_uint8_tensors:t.filter(o=>o.asymmetric_uint8_observed).length,converter_lineage_status:"not_assessable_from_artifact",details:t}}function xV(e){let t=[];for(let i of Qe(e)||[]){if(!["QLinearConv","QLinearMatMul","ConvInteger","MatMulInteger"].includes(i.name))continue;let o=Fi(e,i.inputs?.[0]),a=Fi(e,i.inputs?.[["QLinearConv","QLinearMatMul"].includes(i.name)?3:1]),r=CV(i,a),s=u5(e,o),c=u5(e,a);if(!(r>0)||!(s>0)||!(c>0))continue;let u=r*s*c,l=u/Rd;t.push({op_index:i.index,op_name:i.name,input_tensor_index:qn(o),weight_tensor_index:qn(a),accumulation_terms:r,input_integer_magnitude_bound:s,weight_integer_magnitude_bound:c,worst_case_absolute_accumulator:u,int32_max:Rd,int32_ratio:l,status:l>=1?"fail":"pass",formula:"accumulation_terms * max_abs(q_input-zp_input) * max_abs(q_weight-zp_weight) / INT32_MAX",evidence_json_pointer:`/evidence/static_analysis/ops/${i.index}`})}let n=t.filter(i=>i.status==="fail");return{status:t.length?n.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",checked_ops:t.length,overflow_risk_ops:n.length,maximum_int32_ratio:mh(t.map(i=>i.int32_ratio)),accumulator_dtype:"INT32",details:t}}function EV(e){let t=e?.onnx_quantization_binding||{},n=(t.bindings||[]).filter(i=>i.status!=="pass").map(i=>({op_index:i.op_index,op_name:i.op_name,tensor_name:i.tensor_name,role:i.role,classification:i.status==="fail"?"invalid_quantization_parameter_contract":"quantization_parameter_not_assessed",status:i.status==="fail"?"fail":"review",reasons:i.reasons||[],evidence_json_pointer:`/evidence/static_analysis/onnx_quantization_binding/bindings/${(t.bindings||[]).indexOf(i)}`}));return{status:n.some(i=>i.status==="fail")?"fail":n.length?"review":t.binding_count?"pass":"not_applicable",evidence_class:"DERIVED",tensors_without_metadata:n.length,review_tensors:n.filter(i=>i.status==="review").length,not_applicable_tensors:0,details:n}}function NV(e){let t=e?.onnx_quantization_binding||{};return{status:"pass",evidence_class:"OBSERVED",explicit_qdq_ops:Number(t.explicit_qdq_boundary_count||0),mid_graph_quantization_holes:null,runtime_materialization_status:"not_assessed_static_graph_only",details:t.boundary_edges||[]}}function IV(e){let t=p5(e),n=t.flatMap(i=>i0(e,i));return{status:t.length?"pass":"not_applicable",evidence_class:"DERIVED",kernel_tensors:t.length,per_tensor_kernel_tensors:t.filter(i=>Number(i.quant_scales||0)===1).length,per_channel_kernel_tensors:t.filter(i=>Number(i.quant_scales||0)>1).length,depthwise_per_tensor_kernel_tensors:0,minimum_weight_scale:n.length?Math.min(...n):null,maximum_weight_scale:n.length?Math.max(...n):null,maximum_to_minimum_scale_ratio:n.length?Math.max(...n)/Math.min(...n):null}}function p5(e){let t=new Set,n=new Map;for(let i of Qe(e)||[])for(let o of i.outputs||[])Number(o)>=0&&n.set(Number(o),i);for(let i of Qe(e)||[]){if(["QLinearConv","QLinearMatMul"].includes(i.name)&&Number(i.inputs?.[3])>=0&&t.add(Number(i.inputs[3])),!["Conv","Gemm","MatMul"].includes(i.name))continue;let o=n.get(Number(i.inputs?.[1])),a=o?.name==="DequantizeLinear"?o:null;a&&Number(a.inputs?.[0])>=0&&t.add(Number(a.inputs[0]))}return[...t].map(i=>Fi(e,i)).filter(i=>i&&Number(i.quant_scales||0)>0)}function CV(e,t){let n=(t?.shape||[]).map(i=>Math.max(1,Number(i)||1));return["QLinearConv","ConvInteger"].includes(e.name)&&n.length>=4?n.slice(1).reduce((i,o)=>i*o,1):n.length>=2?n.at(-2):0}function m5(e,t){return(e?.onnx_quantization_binding?.bindings||[]).find(n=>n.tensor_name===t?.name&&n.scale_values?.length)||null}function i0(e,t){return(m5(e,t)?.scale_values||t?.scale_sample||[]).map(Number).filter(n=>n>0&&Number.isFinite(n))}function f5(e,t){return(m5(e,t)?.zero_point_values||t?.zero_point_sample||[]).map(Number)}function u5(e,t){let n=String(t?.dtype||"").toUpperCase(),[i,o]=n==="INT8"?[-128,127]:n==="UINT8"?[0,255]:[0,0];if(i===0&&o===0)return 0;let a=f5(e,t),r=a.length?a:[0];return Math.max(...r.map(s=>Math.max(Math.abs(i-s),Math.abs(o-s))))}function yt(e){return{status:"not_applicable",evidence_class:"NOT_APPLICABLE",reason:e,checked_ops:0,review_ops:0,maximum_input_scale_ratio:0,review_threshold_ratio:ph,details:[]}}function kV(e){let t=[],n=e?.quantization_lattice?.residual_adds||[],i=new Map(n.map((a,r)=>[Number(a.op_index),{row:a,index:r}]));for(let a of Qe(e)||[]){if(Cr(a)!=="ADD")continue;let r=Fi(e,a.inputs?.[0]),s=Fi(e,a.inputs?.[1]),c=Fi(e,a.outputs?.[0]),u=n0(r),l=n0(s);if(!(u>0)||!(l>0))continue;let _=Math.max(u,l)/Math.min(u,l),p=i.get(Number(a.index))||null,d=p?.row?.assessment_status==="assessed"?p.row:null;t.push({op_index:a.index,op_name:a.name,input_tensor_indices:[qn(r),qn(s)],output_tensor_index:qn(c),input_scales:[u,l],output_scale:n0(c)||null,input_scale_ratio:_,status:_>=ph?"review":"pass",review_threshold_ratio:ph,exhaustive_legal_code_pair_count:d?.enumerated_code_pair_count??null,legal_domain_escape_pair_count:d?.range_escape_pair_count??null,legal_domain_escape_pair_ratio:d?.range_escape_pair_ratio??null,fixed_zero_point_containment_scale_ratio:d?.fixed_zero_point_containment?.scale_ratio_to_current??null,globally_finest_containment_scale_ratio:d?.globally_finest_containment?.scale_ratio_to_current??null,globally_finest_containment_zero_point_delta:d?.globally_finest_containment?.signed_zero_point_delta??null,globally_finest_containment_clamp_pair_count:d?.globally_finest_containment?.rounded_projection_clamp_pair_count??null,formula:"max(input_scale_0,input_scale_1) / min(input_scale_0,input_scale_1)",evidence_json_pointer:p?`/evidence/static_analysis/quantization_lattice/residual_adds/${p.index}`:`/evidence/static_analysis/ops/${a.index}`})}let o=t.filter(a=>a.status==="review");return{status:t.length?o.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_ops:t.length,review_ops:o.length,maximum_input_scale_ratio:mh(t.map(a=>a.input_scale_ratio)),containment_design_ops:t.filter(a=>a.globally_finest_containment_scale_ratio!=null).length,maximum_global_finest_containment_scale_ratio:HV(t.map(a=>a.globally_finest_containment_scale_ratio)),review_threshold_ratio:ph,threshold_class:"HEURISTIC",details:t}}function SV(e){let t=e?.contract_migration;if(!t)return yt("Residual containment-contract migration analysis was not emitted.");let n=(t.migrations||[]).flatMap((o,a)=>(o.scenarios||[]).map((r,s)=>({source_add_op_index:o.source_add_op_index,output_tensor_index:o.output_tensor_index,design:r.design,candidate_output_scale:r.candidate_output_scale,candidate_output_zero_point:r.candidate_output_zero_point,scale_ratio_to_current:r.scale_ratio_to_current,signed_zero_point_delta:r.signed_zero_point_delta,direct_consumer_count:o.direct_consumer_count,assessed_consumer_count:r.assessed_consumer_count,unassessed_consumer_count:r.unassessed_consumer_count,assessed_kernel_channels:r.assessed_kernel_channel_count,changed_multiplier_encodings:r.multiplier_encoding_changed_channel_count,changed_multiplier_shifts:r.multiplier_shift_changed_channel_count,changed_bias_codes:r.bias_code_changed_channel_count,bias_int32_overflow_channels:r.bias_int32_overflow_channel_count,changed_add_parameter_encodings:r.add_parameter_encoding_changed_count,reachable_downstream_ops:o.reachable_downstream_op_count,maximum_downstream_edge_depth:o.maximum_downstream_edge_depth,status:r.unassessed_consumer_count||r.bias_int32_overflow_channel_count?"review":"pass",evidence_json_pointer:`/evidence/static_analysis/contract_migration/migrations/${a}/scenarios/${s}`}))),i=n.filter(o=>o.status==="review");return{status:n.length?i.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_residual_contracts:t.residual_contract_count,checked_candidate_scenarios:n.length,direct_consumers:t.direct_consumer_count,assessed_consumer_scenarios:t.assessed_consumer_scenario_count,unassessed_consumer_scenarios:t.unassessed_consumer_scenario_count,assessed_kernel_channel_scenarios:t.assessed_kernel_channel_scenario_count,changed_multiplier_encoding_channel_scenarios:t.multiplier_encoding_changed_channel_scenario_count,changed_multiplier_shift_channel_scenarios:t.multiplier_shift_changed_channel_scenario_count,changed_bias_code_channel_scenarios:t.bias_code_changed_channel_scenario_count,bias_int32_overflow_channel_scenarios:t.bias_int32_overflow_channel_scenario_count,changed_add_parameter_encoding_scenarios:t.add_parameter_encoding_changed_scenario_count,structural_downstream_op_union:t.reachable_downstream_op_union_count,maximum_downstream_edge_depth:t.maximum_downstream_edge_depth,bound_class:"counterfactual_reexport_parameter_regeneration",method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function TV(e){let t=e?.residual_step_response;if(!t)return yt("Residual step-response analysis was not emitted.");let n=(t.residual_adds||[]).flatMap((i,o)=>(i.contracts||[]).map((a,r)=>({op_index:i.op_index,design:a.design,output_scale:a.output_scale,output_zero_point:a.output_zero_point,rounded_projection_clamp_pair_count:a.rounded_projection_clamp_pair_count,visible_transition_count:a.visible_transition_count,silent_transition_count:a.silent_transition_count,both_branches_visible_cell_count:a.both_branches_visible_cell_count,neither_branch_visible_cell_count:a.neither_branch_visible_cell_count,removed_rounded_clamp_pairs_vs_current:a.removed_rounded_clamp_pairs_vs_current,additional_silent_transitions_vs_current:a.additional_silent_transitions_vs_current,transition_ledger_sha256:a.transition_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/residual_step_response/residual_adds/${o}/contracts/${r}`})));return{status:t.assessed_add_count?t.unassessed_add_count?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_residual_adds:t.assessed_add_count,checked_contracts:t.contract_response_count,exact_branch_transitions:t.total_transition_count,exact_joint_interior_cells:t.total_joint_interior_cell_count,current_silent_transitions:t.current_silent_transition_count,containment_additional_silent_transitions:t.containment_additional_silent_transition_count,containment_removed_rounded_clamp_pairs:t.containment_removed_rounded_clamp_pair_count,maximum_containment_silent_ratio_increase:t.maximum_containment_silent_ratio_increase,bound_class:"uniform_legal_code_local_distinguishability",method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function zV(e){let t=e?.residual_contract_distortion;if(!t)return yt("Residual contract-distortion analysis was not emitted.");let n=(t.residual_adds||[]).flatMap((i,o)=>(i.scenarios||[]).map((a,r)=>({op_index:i.op_index,design:a.design,candidate_output_scale:a.candidate_output_scale,candidate_output_zero_point:a.candidate_output_zero_point,enumerated_pair_count:a.enumerated_pair_count,rescued_current_clamp_pair_count:a.rescued_current_clamp_pair_count,changed_represented_value_pair_count:a.changed_represented_value_pair_count,ideal_error_improved_pair_count:a.ideal_error_improved_pair_count,ideal_error_worsened_pair_count:a.ideal_error_worsened_pair_count,sign_class_changed_pair_count:a.sign_class_changed_pair_count,root_mean_square_contract_delta_current_steps:a.root_mean_square_contract_delta_current_steps,p99_absolute_contract_delta_current_steps:a.p99_absolute_contract_delta_current_steps,pair_ledger_sha256:a.pair_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/residual_contract_distortion/residual_adds/${o}/scenarios/${r}`})));return{status:t.assessed_add_count?t.unassessed_add_count?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_residual_adds:t.assessed_add_count,checked_candidate_scenarios:t.scenario_count,exact_pair_comparisons:t.total_enumerated_pair_count,rescued_current_clamp_pair_instances:t.rescued_current_clamp_pair_instance_count,candidate_clamped_pairs:t.candidate_clamped_pair_count,changed_represented_value_pairs:t.changed_represented_value_pair_count,ideal_error_improved_pairs:t.ideal_error_improved_pair_count,ideal_error_worsened_pairs:t.ideal_error_worsened_pair_count,ideal_error_equal_within_tolerance_pairs:t.ideal_error_equal_within_tolerance_pair_count,sign_class_changed_pairs:t.sign_class_changed_pair_count,maximum_rms_contract_delta_current_steps:t.maximum_rms_contract_delta_current_steps,maximum_p99_contract_delta_current_steps:t.maximum_p99_contract_delta_current_steps,bound_class:"uniform_legal_code_contract_counterfactual",method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function OV(e){let t=[],n=new Set;for(let a of Qe(e)||[]){if(!a0.has(Cr(a)))continue;let r=Fi(e,a.inputs?.[1]),s=qn(r);if(s==null||n.has(s)||!o0(r).length)continue;n.add(s);let c=String(r?.dtype||"").toUpperCase(),u=(r?.zero_point_sample||[]).map(Number),l=c==="INT8"?[-128,127]:c==="UINT8"?[0,255]:null,_=l?u.some(m=>m<l[0]||m>l[1]):!1,p=c==="INT8"&&u.some(m=>m!==0),d=c==="UINT8";t.push({tensor_index:s,tensor_name:r?.name||"",dtype:c,zero_points:u,legal_range:l,out_of_range:_,symmetric_int8_violation:p,asymmetric_uint8_observed:d,status:_||p?"fail":d?"review":"pass",formula:c==="INT8"?"weight_zero_point[channel] == 0":"qmin <= zero_point <= qmax",evidence_json_pointer:`/evidence/static_analysis/tensors/${s}`})}let i=t.filter(a=>a.status==="fail"),o=t.filter(a=>a.asymmetric_uint8_observed);return{status:t.length?i.length?"fail":o.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_tensors:t.length,violation_tensors:i.length,asymmetric_uint8_tensors:o.length,converter_lineage_status:o.length?"not_assessable_from_artifact":"not_applicable",details:t}}function RV(e){let t=String(e?.format||"tflite").toLowerCase()==="tflite"?e?.accumulator_atlas:null;if(t?.assessed_op_count){let o=(t.ops||[]).map((a,r)=>a.assessment_status==="assessed"?{op_index:a.op_index,op_name:a.op_name,input_tensor_index:a.input_tensor_index,weight_tensor_index:a.weight_tensor_index,weight_tensor_name:a.weight_tensor_name,accumulation_terms:a.accumulation_terms_per_channel,assessed_channels:a.assessed_channel_count,overflow_channels:a.int32_overflow_channel_count,overflow_channel_indices:[...a.overflow_channel_indices||[]],maximum_absolute_accumulator_decimal:a.maximum_absolute_accumulator_decimal,int32_max:Rd,int32_ratio:a.maximum_int32_ratio,required_signed_bits:a.maximum_required_signed_bits,int32_headroom_bits:a.minimum_int32_headroom_bits,metadata_only_magnitude_bound_decimal:a.metadata_only_magnitude_bound_decimal,metadata_only_int32_ratio:a.metadata_only_int32_ratio,exact_tightening_factor:a.exact_tightening_factor,status:a.int32_overflow_channel_count?"fail":"pass",formula:a.formula,channel_ledger_sha256:a.channel_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/accumulator_atlas/ops/${r}`}:null).filter(Boolean);return{status:t.int32_overflow_channel_count?"fail":"pass",evidence_class:"DERIVED",bound_class:"exact_stored_weight_channel_integer_domain",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,overflow_risk_ops:t.overflow_op_count,overflow_risk_channels:t.int32_overflow_channel_count,maximum_int32_ratio:t.maximum_int32_ratio,maximum_absolute_accumulator_decimal:t.maximum_absolute_accumulator_decimal,maximum_required_signed_bits:t.maximum_required_signed_bits,minimum_int32_headroom_bits:t.minimum_int32_headroom_bits,maximum_metadata_only_int32_ratio:mh(o.map(a=>a.metadata_only_int32_ratio)),accumulator_dtype:"INT32",source_commit:t.source_commit,method:t.method,interpretation_boundary:t.interpretation_boundary,details:o}}let n=[];for(let o of Qe(e)||[]){if(!a0.has(Cr(o)))continue;let a=Fi(e,o.inputs?.[0]),r=Fi(e,o.inputs?.[1]),s=VV(o,r),c=_5(a),u=_5(r);if(!(s>0)||!(c>0)||!(u>0))continue;let l=s*c*u,_=l/Rd;n.push({op_index:o.index,op_name:o.name,input_tensor_index:qn(a),weight_tensor_index:qn(r),accumulation_terms:s,input_integer_magnitude_bound:c,weight_integer_magnitude_bound:u,worst_case_absolute_accumulator:l,int32_max:Rd,int32_ratio:_,status:_>=1?"fail":"pass",formula:"accumulation_terms * max_abs(q_input-zp_input) * max_abs(q_weight-zp_weight) / INT32_MAX",evidence_json_pointer:`/evidence/static_analysis/ops/${o.index}`})}let i=n.filter(o=>o.status==="fail");return{status:n.length?i.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",checked_ops:n.length,overflow_risk_ops:i.length,maximum_int32_ratio:mh(n.map(o=>o.int32_ratio)),bound_class:"metadata_only_legal_code_magnitude_bound",accumulator_dtype:"INT32",details:n}}function BV(e){let t=e?.requantization_fidelity;if(!t?.assessed_op_count)return yt("No accumulator-bounded quantized TFLite Conv/Depthwise/FC channel exposed a complete input, weight, and output scale contract.");let n=(t.ops||[]).map((o,a)=>o.assessment_status==="assessed"?{op_index:o.op_index,op_name:o.op_name,input_tensor_index:o.input_tensor_index,weight_tensor_index:o.weight_tensor_index,output_tensor_index:o.output_tensor_index,weight_scale_mode:o.weight_scale_mode,assessed_channels:o.assessed_channel_count,shift_range:[o.minimum_shift,o.maximum_shift],maximum_relative_multiplier_error:o.maximum_relative_multiplier_error,maximum_multiplier_error_ppm:o.maximum_multiplier_error_ppm,maximum_encoding_drift_bound_codes:o.maximum_encoding_drift_bound_codes,maximum_default_double_rounding_bound_codes:o.maximum_default_double_rounding_bound_codes,maximum_single_rounding_bound_codes:o.maximum_single_rounding_bound_codes,default_pre_shift_overflow_channels:o.default_pre_shift_overflow_channel_count,single_rounding_encoding_divergence_channels:o.single_rounding_encoding_divergence_channel_count,channel_ledger_sha256:o.channel_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/requantization_fidelity/ops/${a}`}:null).filter(Boolean);return{status:t.default_pre_shift_overflow_channel_count>0||t.single_rounding_encoding_divergence_channel_count>0?"review":"pass",evidence_class:"DERIVED",bound_class:"pinned_q0_31_encoding_and_conservative_pre_clamp_rounding",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,fixed_point_bound_channels:t.fixed_point_bound_channel_count,build_flag_status:"TFLITE_SINGLE_ROUNDING_not_embedded_in_artifact",default_pre_shift_overflow_channels:t.default_pre_shift_overflow_channel_count,single_rounding_encoding_divergence_channels:t.single_rounding_encoding_divergence_channel_count,half_code_encoding_drift_channels:t.half_code_encoding_drift_channel_count,one_code_encoding_drift_channels:t.one_code_encoding_drift_channel_count,shift_range:[t.minimum_shift,t.maximum_shift],maximum_relative_multiplier_error:t.maximum_relative_multiplier_error,maximum_multiplier_error_ppm:t.maximum_multiplier_error_ppm,maximum_encoding_drift_bound_codes:t.maximum_encoding_drift_bound_codes,maximum_default_double_rounding_bound_codes:t.maximum_default_double_rounding_bound_codes,maximum_single_rounding_bound_codes:t.maximum_single_rounding_bound_codes,source_commit:t.source_commit,source_references:t.source_references,formula:t.rounding_bound_formula,interpretation_boundary:t.interpretation_boundary,details:n}}function DV(e){let t=e?.kernel_extremum_witness;if(!t?.assessed_op_count)return yt("No quantized convolution-family channel exposed a complete stored-weight extremum and pinned fixed-point projection contract.");let n=(t.ops||[]).map((i,o)=>i.assessment_status==="assessed"?{op_index:i.op_index,op_name:i.op_name,assessed_channels:i.assessed_channel_count,terms_per_channel:i.accumulation_terms_per_channel,witness_assignments:i.witness_assignment_count,fixed_point_endpoint_evaluations:i.fixed_point_endpoint_evaluation_count,default_ideal_mismatch_endpoints:i.default_ideal_mismatch_endpoint_count,single_ideal_mismatch_endpoints:i.single_ideal_mismatch_endpoint_count,build_mode_divergent_endpoints:i.build_mode_divergent_endpoint_count,default_activation_clamped_endpoints:i.default_activation_clamped_endpoint_count,collapsed_extrema_channels:i.default_collapsed_extrema_channel_count,maximum_default_ideal_delta_codes:i.maximum_default_ideal_delta_codes,witness_ledger_sha256:i.witness_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/kernel_extremum_witness/ops/${o}`}:null).filter(Boolean);return{status:t.build_mode_divergent_endpoint_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",bound_class:"canonical_full_valid_receptive_field_legal_code_extrema",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,fixed_point_checked_channels:t.fixed_point_assessed_channel_count,canonical_witness_assignments:t.witness_assignment_count,fixed_point_endpoint_evaluations:t.fixed_point_endpoint_evaluation_count,default_ideal_mismatch_endpoints:t.default_ideal_mismatch_endpoint_count,single_ideal_mismatch_endpoints:t.single_ideal_mismatch_endpoint_count,build_mode_divergent_endpoints:t.build_mode_divergent_endpoint_count,default_activation_clamped_endpoints:t.default_activation_clamped_endpoint_count,collapsed_extrema_channels:t.default_collapsed_extrema_channel_count,maximum_default_ideal_delta_codes:t.maximum_default_ideal_delta_codes,build_flag_status:"TFLITE_SINGLE_ROUNDING_not_embedded_in_artifact",source_commit:t.source_commit,source_references:t.source_references,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function MV(e){let t=e?.channel_vitality;if(!t?.assessed_op_count)return yt("No quantized convolution-family channel exposed complete exact endpoints under both pinned fixed-point build paths.");let n=(t.ops||[]).map((i,o)=>i.assessment_status==="assessed"?{op_index:i.op_index,op_name:i.op_name,assessed_channels:i.assessed_channel_count,constant_accumulator_channels:i.constant_accumulator_channel_count,dual_mode_constant_output_channels:i.dual_mode_constant_output_channel_count,nonconstant_accumulator_dual_mode_constant_channels:i.nonconstant_accumulator_dual_mode_constant_channel_count,mode_dependent_constant_output_channels:i.mode_dependent_constant_output_channel_count,minimum_default_inclusive_code_span:i.minimum_default_inclusive_code_span,minimum_single_inclusive_code_span:i.minimum_single_inclusive_code_span,default_constant_channel_indices:i.default_constant_channel_indices,single_constant_channel_indices:i.single_constant_channel_indices,mode_dependent_constant_channel_indices:i.mode_dependent_constant_channel_indices,source_witness_ledger_sha256:i.source_witness_ledger_sha256,vitality_ledger_sha256:i.vitality_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/channel_vitality/ops/${o}`}:null).filter(Boolean);return{status:t.nonconstant_accumulator_dual_mode_constant_channel_count||t.mode_dependent_constant_output_channel_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",proof_domain:"full_valid_receptive_field_legal_input_code_domain",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,fixed_point_checked_channels:t.fixed_point_assessed_channel_count,constant_accumulator_channels:t.constant_accumulator_channel_count,dual_mode_constant_output_channels:t.dual_mode_constant_output_channel_count,nonconstant_accumulator_dual_mode_constant_channels:t.nonconstant_accumulator_dual_mode_constant_channel_count,mode_dependent_constant_output_channels:t.mode_dependent_constant_output_channel_count,post_bias_negative_locked_channels:t.post_bias_negative_locked_channel_count,post_bias_positive_locked_channels:t.post_bias_positive_locked_channel_count,default_full_activation_span_channels:t.default_full_activation_span_channel_count,single_full_activation_span_channels:t.single_full_activation_span_channel_count,span_histogram:t.span_histogram,source_commit:t.source_commit,source_references:t.source_references,constant_proof:t.constant_proof,span_definition:t.span_definition,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function $V(e){let t=e?.rounding_equivalence;if(!t?.assessed_op_count)return yt("No quantized convolution-family channel exposed a complete int32 post-bias interval under both pinned TFLite fixed-point build paths.");let n=(t.ops||[]).map((i,o)=>i.assessment_status==="assessed"?{op_index:i.op_index,op_name:i.op_name,assessed_channels:i.assessed_channel_count,equivalent_channels:i.equivalent_channel_count,divergent_channels:i.divergent_channel_count,interval_state_count_decimal:i.interval_state_count_decimal,divergent_state_count_decimal:i.divergent_state_count_decimal,divergent_state_ratio:i.divergent_state_ratio,default_lower_state_count_decimal:i.default_lower_state_count_decimal,default_higher_state_count_decimal:i.default_higher_state_count_decimal,maximum_absolute_output_delta:i.maximum_absolute_output_delta,maximum_pair_segment_count:i.maximum_pair_segment_count,maximum_divergent_region_count:i.maximum_divergent_region_count,source_witness_ledger_sha256:i.source_witness_ledger_sha256,source_requantization_ledger_sha256:i.source_requantization_ledger_sha256,equivalence_ledger_sha256:i.equivalence_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/rounding_equivalence/ops/${o}`}:null).filter(Boolean);return{status:t.divergent_channel_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",proof_domain:"closed_post_bias_int32_interval_hull",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,equivalent_channels:t.equivalent_channel_count,divergent_channels:t.divergent_channel_count,divergent_ops:t.divergent_op_count,interval_state_count_decimal:t.interval_state_count_decimal,divergent_state_count_decimal:t.divergent_state_count_decimal,divergent_state_ratio:t.divergent_state_ratio,default_lower_state_count_decimal:t.default_lower_state_count_decimal,default_higher_state_count_decimal:t.default_higher_state_count_decimal,maximum_absolute_output_delta:t.maximum_absolute_output_delta,exact_pair_segments:t.pair_segment_count,divergent_regions:t.divergent_region_count,divergence_histogram:t.divergence_histogram,build_flag_status:"TFLITE_SINGLE_ROUNDING_not_embedded_in_artifact",source_commit:t.source_commit,source_references:t.source_references,equivalence_proof:t.equivalence_proof,segmentation_bound:t.segmentation_bound,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function LV(e){let t=e?.accumulator_reachability;if(!t?.candidate_op_count)return yt("No TFLite quantized accumulator channel was available for bounded-sum reachability analysis.");let n=(t.ops||[]).map((i,o)=>({op_index:i.op_index,op_name:i.op_name,assessment_status:i.assessment_status,assessed_channels:i.assessed_channel_count,complete_integer_interval_channels:i.complete_integer_interval_channel_count,complete_modular_lattice_channels:i.complete_modular_lattice_channel_count,partial_band_channels:i.partial_band_channel_count,singleton_channels:i.singleton_channel_count,exact_reachable_divergent_channels:i.exact_reachable_divergent_channel_count,unresolved_divergent_channels:i.unresolved_divergent_channel_count,interval_divergent_state_count_decimal:i.interval_divergent_state_count_decimal,exact_reachable_divergent_state_count_decimal:i.exact_reachable_divergent_state_count_decimal,provably_unreachable_divergent_state_count_decimal:i.provably_unreachable_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:i.unresolved_divergent_state_count_decimal,maximum_lattice_gcd:i.maximum_lattice_gcd??null,source_witness_ledger_sha256:i.source_witness_ledger_sha256,source_rounding_equivalence_ledger_sha256:i.source_rounding_equivalence_ledger_sha256,reachability_ledger_sha256:i.reachability_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/accumulator_reachability/ops/${o}`}));return{status:t.exact_reachable_divergent_channel_count||t.unresolved_divergent_channel_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",proof_domain:"full_valid_kernel_local_independent_legal_input_codes",candidate_ops:t.candidate_op_count,assessed_ops:t.assessed_op_count,unassessed_ops:t.unassessed_op_count,assessed_channels:t.assessed_channel_count,complete_integer_interval_channels:t.complete_integer_interval_channel_count,complete_modular_lattice_channels:t.complete_modular_lattice_channel_count,partial_band_channels:t.partial_band_channel_count,singleton_channels:t.singleton_channel_count,exact_reachable_divergent_channels:t.exact_reachable_divergent_channel_count,unresolved_divergent_channels:t.unresolved_divergent_channel_count,interval_only_divergent_channels:t.interval_only_divergent_channel_count,interval_state_count_decimal:t.interval_state_count_decimal,certified_reachable_state_count_decimal:t.certified_reachable_state_count_decimal,provably_unreachable_state_count_decimal:t.provably_unreachable_state_count_decimal,unresolved_state_count_decimal:t.unresolved_state_count_decimal,interval_divergent_state_count_decimal:t.interval_divergent_state_count_decimal,exact_reachable_divergent_state_count_decimal:t.exact_reachable_divergent_state_count_decimal,provably_unreachable_divergent_state_count_decimal:t.provably_unreachable_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:t.unresolved_divergent_state_count_decimal,exact_reachable_divergent_ratio:t.exact_reachable_divergent_ratio,maximum_lattice_gcd:t.maximum_lattice_gcd,source_commit:t.source_commit,source_references:t.source_references,bounded_sum_proof:t.bounded_sum_proof,state_conservation:t.state_conservation,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function PV(e){let t=e?.numerical_abi_propagation;if(!t?.candidate_source_op_count)return yt("No TFLite rounding-equivalence source op was available for structural output propagation analysis.");let n=(t.sources||[]).map((i,o)=>({op_index:i.op_index,op_name:i.op_name,assessment_status:i.assessment_status,divergent_channels:i.divergent_channel_count,divergent_state_count_decimal:i.divergent_state_count_decimal,local_reachability_status:i.local_reachability_status,exact_reachable_divergent_channels:i.exact_reachable_divergent_channel_count,exact_reachable_divergent_state_count_decimal:i.exact_reachable_divergent_state_count_decimal,provably_unreachable_divergent_state_count_decimal:i.provably_unreachable_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:i.unresolved_divergent_state_count_decimal,reachable_ops:i.reachable_op_count,reachable_model_outputs:i.reachable_model_output_tensor_count,exact_model_output_graph_route_count_decimal:i.exact_model_output_graph_route_count_decimal??null,reconvergence_ops:i.reconvergence_op_count,single_branch_merges:i.single_branch_merge_op_count,predicted_boundary_edges:i.predicted_boundary_edge_count,assessed_boundary_logical_payload_bytes:i.assessed_boundary_logical_payload_bytes,source_equivalence_ledger_sha256:i.source_equivalence_ledger_sha256,source_reachability_ledger_sha256:i.source_reachability_ledger_sha256,propagation_ledger_sha256:i.propagation_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/numerical_abi_propagation/sources/${o}`}));return{status:t.output_reachable_source_op_count||t.unassessed_source_op_count?"review":"pass",evidence_class:"DERIVED",propagation_semantics:"tensor_level_structural_potential_not_observed_numerical_effect",candidate_sources:t.candidate_source_op_count,divergent_sources:t.divergent_source_op_count,equivalent_sources:t.equivalent_source_op_count,unassessed_sources:t.unassessed_source_op_count,local_reachability_unassessed_sources:t.local_reachability_unassessed_source_op_count,output_reachable_sources:t.output_reachable_source_op_count,output_isolated_sources:t.output_isolated_source_op_count,exact_local_counterexample_sources:t.exact_local_counterexample_source_op_count,residue_excluded_divergence_sources:t.residue_excluded_divergence_source_op_count,unresolved_divergence_sources:t.unresolved_divergence_source_op_count,exact_output_reachable_sources:t.exact_output_reachable_source_op_count,interval_divergent_state_count_decimal:t.interval_divergent_state_count_decimal,exact_local_divergent_state_count_decimal:t.exact_local_divergent_state_count_decimal,residue_excluded_divergent_state_count_decimal:t.residue_excluded_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:t.unresolved_divergent_state_count_decimal,graph_edges:t.graph_edge_count,source_corridor_edge_instances:t.source_corridor_edge_instance_count,unique_reachable_ops:t.unique_reachable_op_count,unique_reachable_tensors:t.unique_reachable_tensor_count,unique_predicted_boundary_edges:t.unique_predicted_boundary_edge_count,unique_predicted_boundary_logical_payload_bytes:t.unique_predicted_boundary_logical_payload_bytes??null,exact_source_corridor_edge_instances:t.exact_source_corridor_edge_instance_count,exact_unique_reachable_ops:t.exact_unique_reachable_op_count,exact_unique_reachable_tensors:t.exact_unique_reachable_tensor_count,exact_unique_predicted_boundary_edges:t.exact_unique_predicted_boundary_edge_count,exact_unique_predicted_boundary_logical_payload_bytes:t.exact_unique_predicted_boundary_logical_payload_bytes??null,maximum_model_output_op_hops:t.maximum_model_output_op_hops??null,maximum_model_output_graph_route_count_decimal:t.maximum_model_output_graph_route_count_decimal??null,graph_cycle_status:t.graph_cycle_status,graph_ledger_sha256:t.graph_ledger_sha256,route_definition:t.route_definition,ranking_definition:t.ranking_definition,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function qV(e){let t=e?.input_counterexample;if(!t||t.status==="not_computed_internal_scope")return yt("The model-input tensor counterexample constructor was not available in this analysis scope.");let n=(t.sources||[]).map((i,o)=>({op_index:i.op_index,op_name:i.op_name,input_tensor_index:i.input_tensor_index??null,input_origin:i.input_origin,classification:i.classification,exact_reachable_divergent_channels:i.exact_reachable_divergent_channel_count,exact_reachable_divergent_state_count_decimal:i.exact_reachable_divergent_state_count_decimal,reachable_model_outputs:i.reachable_model_output_tensor_count,exact_model_output_graph_route_count_decimal:i.exact_model_output_graph_route_count_decimal??null,representative_witness_index:i.representative_witness_index??null,reachability_ledger_sha256:i.source_reachability_ledger_sha256,propagation_ledger_sha256:i.source_propagation_ledger_sha256,witness_ledger_sha256:i.representative_witness_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/input_counterexample/sources/${o}`}));return{status:t.tensor_abi_constructive_source_op_count>0||t.upstream_activation_unresolved_source_op_count>0?"review":"pass",evidence_class:"DERIVED",proof_semantics:"complete_quantized_model_input_tensor_exists_for_exact_source_output_code_divergence",exact_local_sources:t.exact_local_source_op_count,direct_model_input_sources:t.direct_model_input_source_op_count,tensor_abi_constructive_sources:t.tensor_abi_constructive_source_op_count,upstream_activation_unresolved_sources:t.upstream_activation_unresolved_source_op_count,not_assessed_sources:t.not_assessed_source_op_count,tensor_abi_constructive_channels:t.tensor_abi_constructive_channel_count,tensor_abi_constructive_divergent_state_count_decimal:t.tensor_abi_constructive_divergent_state_count_decimal,output_reachable_constructive_sources:t.output_reachable_constructive_source_op_count,representative_witnesses:t.representative_witness_count,source_classification_conservation:t.source_classification_conservation,portfolio_ledger_sha256:t.portfolio_ledger_sha256,method:t.method,proof_scope:t.proof_scope,interpretation_boundary:t.interpretation_boundary,details:n}}function jV(e){let t=e?.preprocessing_realizability;return!t||t.status==="not_computed_internal_scope"||!t.candidate_evaluation_count?yt("No eligible constructive NHWC RGB input witness was available for preprocessing counterfactual analysis."):{status:t.exact_tensor_realization_candidate_count>0&&t.non_exact_candidate_count>0?"review":"pass",evidence_class:"DERIVED",assessment_kind:t.assessment_kind,proof_semantics:"finite_256_code_source_domain_inverse_under_explicit_candidate_contract",source_witnesses:t.source_witness_count,eligible_image_witnesses:t.eligible_image_witness_count,candidate_contracts:t.candidate_contract_count,candidate_evaluations:t.candidate_evaluation_count,assessed_candidates:t.assessed_candidate_count,exact_tensor_realization_candidates:t.exact_tensor_realization_candidate_count,non_exact_candidates:t.non_exact_candidate_count,exact_contract_ids:t.exact_contract_ids,best_non_exact_contract_id:t.best_non_exact_contract_id,best_non_exact_unrealizable_elements:t.best_non_exact_unrealizable_element_count??null,candidate_conservation:t.candidate_conservation,portfolio_ledger_sha256:t.portfolio_ledger_sha256,method:t.method,proof_scope:t.proof_scope,interpretation_boundary:t.interpretation_boundary,details:(t.candidates||[]).map((n,i)=>({contract_id:n.contract_id,contract_label:n.contract_label,tensor_channel_order:n.tensor_channel_order,exact_tensor_realization:n.exact_tensor_realization,exact_tensor_elements:n.exact_tensor_element_count,unrealizable_tensor_elements:n.unrealizable_tensor_element_count,minimum_total_absolute_tensor_code_error_decimal:n.minimum_total_absolute_tensor_code_error_decimal,maximum_absolute_tensor_code_error:n.maximum_absolute_tensor_code_error,reachable_tensor_codes_by_channel:(n.channel_maps||[]).map(o=>o.reachable_tensor_code_count),tensor_code_holes_by_channel:(n.channel_maps||[]).map(o=>o.tensor_code_hole_count),nearest_rgb_fixture_sha256:n.nearest_rgb_fixture_sha256,candidate_ledger_sha256:n.candidate_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/preprocessing_realizability/candidates/${i}`}))}}function FV(e){let t=Number(e?.quantized_tensors||0)>0,n=[];if(t)for(let o of Xt(e)||[]){if(Number(o?.quant_scales||0)>0)continue;let a=GV(e,o);n.push({tensor_index:qn(o),tensor_name:o?.name||"",dtype:o?.dtype||"UNKNOWN",classification:a,metadata_expected:a!=="shape_or_configuration",status:a==="shape_or_configuration"?"not_applicable":"review",evidence_json_pointer:`/evidence/static_analysis/tensors/${qn(o)}`})}let i=n.filter(o=>o.status==="review");return{status:t?i.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",tensors_without_metadata:n.length,review_tensors:i.length,not_applicable_tensors:n.length-i.length,details:n}}function QV(e){let t=(Qe(e)||[]).filter(n=>["QUANTIZE","DEQUANTIZE"].includes(Cr(n))).map(n=>({op_index:n.index,op_name:n.name,input_tensor_indices:(n.inputs||[]).map(Number),output_tensor_indices:(n.outputs||[]).map(Number),estimated_bytes:Number(n.estimated_bytes||0),evidence_json_pointer:`/evidence/static_analysis/ops/${n.index}`}));return{status:"pass",evidence_class:"OBSERVED",explicit_qdq_ops:t.length,mid_graph_quantization_holes:Number(e?.quant_hole_count||0),details:t}}function UV(e){let t=new Map;for(let a of Qe(e)||[]){if(!a0.has(Cr(a)))continue;let r=Fi(e,a.inputs?.[1]),s=qn(r);s!=null&&o0(r).length&&t.set(s,{op:a,weight:r})}let n=[...t.values()],i=n.flatMap(({weight:a})=>o0(a)),o=n.filter(({op:a,weight:r})=>Cr(a)==="DEPTHWISE_CONV_2D"&&Number(r?.quant_scales||0)===1).length;return{status:n.length?o?"review":"pass":"not_applicable",evidence_class:"DERIVED",kernel_tensors:n.length,per_tensor_kernel_tensors:n.filter(({weight:a})=>Number(a?.quant_scales||0)===1).length,per_channel_kernel_tensors:n.filter(({weight:a})=>Number(a?.quant_scales||0)>1).length,depthwise_per_tensor_kernel_tensors:o,minimum_weight_scale:i.length?Math.min(...i):null,maximum_weight_scale:i.length?Math.max(...i):null,maximum_to_minimum_scale_ratio:i.length?Math.max(...i)/Math.min(...i):null}}function GV(e,t){let i=(Qe(e)||[]).filter(a=>(a.inputs||[]).includes(Number(t?.index))).map(Cr),o=String(t?.dtype||"").toUpperCase();return["RESHAPE","SHAPE","STRIDED_SLICE","PACK","CONCATENATION"].some(a=>i.includes(a))||["INT32","INT64"].includes(o)&&(t?.constant_buffer||h5(t?.shape)<=8)?"shape_or_configuration":t?.constant_buffer?"constant":"activation"}function _5(e){let t=String(e?.dtype||"").toUpperCase(),[n,i]=t==="INT8"?[-128,127]:t==="UINT8"?[0,255]:[0,0];if(n===0&&i===0)return 0;let o=(e?.zero_point_sample||[0]).map(Number);return Math.max(...o.map(a=>Math.max(Math.abs(n-a),Math.abs(i-a))))}function VV(e,t){let n=(t?.shape||[]).map(i=>Math.max(1,Number(i)||1));return Cr(e)==="DEPTHWISE_CONV_2D"&&n.length>=4?n[1]*n[2]:n.length>=2?n.slice(1).reduce((i,o)=>i*o,1):0}function Fi(e,t){let n=Number(t);return Number.isInteger(n)&&n>=0?(Xt(e)||[])[n]:null}function qn(e){let t=Number.isInteger(e?.index)?e.index:Number(e?.tensor_index);return Number.isInteger(t)&&t>=0?t:null}function n0(e){return Number(e?.scale_sample?.[0]||0)}function o0(e){return(e?.scale_sample||[]).map(Number).filter(t=>t>0&&Number.isFinite(t))}function Cr(e){return String(e?.name||"").toUpperCase()}function mh(e){return e.length?Math.max(...e.map(t=>Number(t||0))):0}function HV(e){let t=e.filter(n=>n!=null).map(Number).filter(Number.isFinite);return t.length?Math.max(...t):null}function h5(e){return Array.isArray(e)&&e.length&&e.every(t=>Number(t)>0)?e.reduce((t,n)=>t*Number(n),1):0}var KV={integration:"integration requirement",integration_verification:"integration verification",execution_provider_compatibility:"execution-provider compatibility",quantization:"deployment-risk (requires confirmation)",quantization_design_review:"quantization design review",quantization_calibration_review:"quantization calibration review",numerical_structure_review:"numerical structure review",delegate:"deployment-risk (requires confirmation)",packing:"optimization opportunity",memory_cache:"deployment-resource verification",channel_alignment:"optimization opportunity",runtime:"deployment-risk (requires confirmation)",runtime_compatibility:"runtime compatibility",evidence_reproducibility:"evidence reproducibility",lineage:"lineage requirement",synthetic_sensitivity:"deployment-risk (requires confirmation)",integrity:"defect / integrity concern",limitation:"limitation"},fh=Object.freeze({"EA-IOC-0001":["/evidence/static_analysis/inputs/0","/evidence/static_analysis/metadata_presence/documented_preprocessing"],"EA-DYN-0001":["/evidence/static_analysis/dynamic_shape_cost_contract","/evidence/static_analysis/inputs"],"EA-OUT-0001":["/evidence/static_analysis/outputs/0","/evidence/static_analysis/metadata_presence/output_semantics_documented"],"EA-LIN-0001":["/evidence/static_analysis/metadata_presence"],"EA-PROV-0001":["/evidence/static_analysis/target_profile","/analyzer_metadata"],"EA-RUN-0001":["/evidence/static_analysis/runtime_compat"],"EA-GRF-0001":["/evidence/static_analysis/subgraphs","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0004":["/evidence/static_analysis/onnx_external_data","/evidence/static_analysis/size_breakdown/external_data_tensor_count","/evidence/static_analysis/weight_integrity/tensor_results"],"EA-CML-0001":["/evidence/static_analysis/weight_integrity/parameters"],"EA-CML-0002":["/evidence/static_analysis/weight_integrity/parameters"],"EA-CML-0003":["/evidence/static_analysis/weight_integrity"],"EA-WGT-0001":["/evidence/static_analysis/weight_integrity/zero_kernel_slice_details"],"EA-QNT-0100":["/evidence/static_analysis/weight_integrity/quant_grid_detail","/evidence/static_analysis/weight_integrity/quant_grid_details"],"EA-QNT-0101":["/evidence/quantization/quantization_contract_checks/kernel_quantization"],"EA-QNT-0102":["/evidence/quantization/quantization_contract_checks/bias_scale"],"EA-QNT-0103":["/evidence/quantization/quantization_contract_checks/residual_add"],"EA-QNT-0104":["/evidence/quantization/quantization_contract_checks/weight_zero_point"],"EA-QNT-0105":["/evidence/quantization/quantization_contract_checks/parameter_integrity"],"EA-QNT-0106":["/evidence/quantization/quantization_contract_checks/accumulator_bound","/evidence/static_analysis/accumulator_atlas"],"EA-QNT-0107":["/evidence/quantization/quantization_contract_checks/requantization_fidelity","/evidence/static_analysis/requantization_fidelity"],"EA-QNT-0108":["/evidence/static_analysis/quantization_lattice","/evidence/static_analysis/contract_migration","/evidence/quantization/quantization_contract_checks/residual_add","/evidence/quantization/quantization_contract_checks/contract_migration"],"EA-QNT-0109":["/evidence/static_analysis/residual_step_response","/evidence/quantization/quantization_contract_checks/residual_step_response"],"EA-QNT-0110":["/evidence/static_analysis/residual_contract_distortion","/evidence/quantization/quantization_contract_checks/residual_contract_distortion"],"EA-QNT-0111":["/evidence/static_analysis/kernel_extremum_witness","/evidence/quantization/quantization_contract_checks/kernel_extremum_witness"],"EA-QNT-0112":["/evidence/static_analysis/channel_vitality","/evidence/quantization/quantization_contract_checks/channel_vitality"],"EA-QNT-0113":["/evidence/static_analysis/rounding_equivalence","/evidence/quantization/quantization_contract_checks/rounding_equivalence"],"EA-QNT-0114":["/evidence/static_analysis/numerical_abi_propagation","/evidence/quantization/quantization_contract_checks/numerical_abi_propagation"],"EA-QNT-0115":["/evidence/static_analysis/accumulator_reachability","/evidence/quantization/quantization_contract_checks/accumulator_reachability"],"EA-QNT-0116":["/evidence/static_analysis/input_counterexample","/evidence/quantization/quantization_contract_checks/input_counterexample"],"EA-DEL-0004":["/evidence/static_analysis/delegation_repair/runtime_build_risks"],"EA-QNT-0117":["/evidence/static_analysis/preprocessing_realizability","/evidence/quantization/quantization_contract_checks/preprocessing_realizability"],"EA-QNT-0118":["/evidence/quantization/quantization_contract_checks/representable_kernel_channels"],"EA-QNT-0119":["/evidence/quantization/quantization_contract_checks/input_quantization_convention","/evidence/static_analysis/inputs"],"EA-QNT-0001":["/evidence/static_analysis/quant_holes","/evidence/static_analysis/quant_hole_count"],"EA-DEL-0001":["/evidence/static_analysis/xnnpack_chains","/evidence/static_analysis/ops"],"EA-QNT-0002":["/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-DEL-0002":["/evidence/static_analysis/predicted_partition_boundaries"],"EA-DEL-0003":["/evidence/runtime_results/runtime_assignment/comparison"],"EA-MEM-0001":["/evidence/static_analysis/tensor_liveness"],"EA-MEM-0002":["/evidence/static_analysis/tensor_arena_plan","/evidence/runtime_results/runtime_assignment/runtime_memory","/evidence/runtime_results/runtime_assignment/arena_reconciliation"],"EA-PKG-0001":["/evidence/static_analysis/ops"],"EA-CHN-0001":["/evidence/static_analysis/ops","/evidence/static_analysis/target_profile"],"EA-RUN-0002":["/evidence/runtime_results/runtime_basin"],"EA-RUN-0003":["/evidence/runtime_results/preprocessing_consequence_atlas"],"EA-ONX-0001":["/evidence/static_analysis/onnx_domain_analysis/external_custom_domains"],"EA-ONX-0002":["/evidence/static_analysis/onnx_domain_analysis/recursive_function_cycles","/evidence/static_analysis/onnx_domain_analysis/duplicate_function_ids"],"EA-ONX-0003":["/evidence/static_analysis/onnx_domain_analysis/functions"],"EA-ONX-0005":["/evidence/static_analysis/ort_compatibility_evidence/execution_providers","/evidence/static_analysis/ort_ep_portability_frontier"],"EA-ONX-0006":["/evidence/static_analysis/onnx_shape_inference/declaration_conflicts","/evidence/static_analysis/tensors"],"EA-ONX-0071":["/evidence/static_analysis/onnx_shape_inference/semantic_contract_conflicts","/evidence/static_analysis/onnx_shape_inference/rule_unresolved_nodes","/evidence/static_analysis/tensors"],"EA-ONX-0072":["/evidence/static_analysis/onnx_shape_inference/conditionally_invalid_node_output_count","/evidence/static_analysis/onnx_shape_inference/conditional_invalid_variant_count","/evidence/static_analysis/tensors"],"EA-ONX-0007":["/evidence/static_analysis/onnx_shape_inference/opset_import_contract","/evidence/static_analysis/onnx_shape_inference/schema_form_rows","/evidence/static_analysis/onnx_shape_inference/source_documents"],"EA-ONX-0008":["/evidence/static_analysis/onnx_shape_inference/shape_scope","/evidence/static_analysis/onnx_shape_inference/extended_scope_inference","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/partial_rows","/evidence/static_analysis/onnx_domain_analysis/functions"],"EA-ONX-0009":["/evidence/static_analysis/onnx_shape_inference/extended_scope_inference","/evidence/static_analysis/onnx_shape_inference/shape_scope"],"EA-ONX-0010":["/evidence/static_analysis/onnx_type_proto_contract/invalid_rows","/evidence/static_analysis/onnx_type_proto_contract/source_sha256"],"EA-ONX-0011":["/evidence/static_analysis/onnx_sparse_tensor_contract/invalid_rows","/evidence/static_analysis/onnx_sparse_tensor_contract/source_sha256"],"EA-ONX-0012":["/evidence/static_analysis/onnx_shape_inference/container_value_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/container_value_inference/source_documents"],"EA-ONX-0013":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents"],"EA-ONX-0014":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents"],"EA-ONX-0015":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0016":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0017":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0018":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0019":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0020":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0021":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0022":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0023":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0024":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0025":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0026":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0027":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0028":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0029":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0030":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0031":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0032":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0033":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0034":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0035":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0036":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0037":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0038":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0039":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0040":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0042":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0043":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0044":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0045":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0046":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0047":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0048":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0049":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/tensors"],"EA-ONX-0050":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0051":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0052":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0053":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0054":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0055":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0056":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0057":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0058":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0059":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0060":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0061":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents"],"EA-ONX-0062":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0063":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0064":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0065":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0066":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/source_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0067":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/source_documents","/evidence/static_analysis/ops"],"EA-ONX-0068":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/source_documents","/evidence/static_analysis/tensors"],"EA-ONX-0069":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows","/evidence/static_analysis/ops"],"EA-ONX-0070":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/partial_rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows"],"EA-SYN-0001":["/evidence/weight_indicators/deploy_curvature_basin"],"EA-LIM-0001":["/evidence/static_analysis"]}),ZV=Object.freeze({OBSERVED:"high","OBSERVED/DERIVED":"high","OBSERVED/NOT_ASSESSABLE":"high",SOURCE_PINNED_AND_DERIVED:"high",SOURCE_PINNED_AND_OBSERVED:"high",DERIVED:"high",DERIVED_FROM_OBSERVED_RUNTIME:"high",NOT_ASSESSABLE:"high",HEURISTIC:"medium",ESTIMATED:"medium",PREDICTED:"medium",MEASURED_SYNTHETIC:"medium",PROXY:"low"});function Z({id:e,category:t,title:n,evidence:i,priority:o,op:a="",tensor:r="",observation:s="",interpretation:c="",recommendation:u="",relevance:l="",findingClass:_="",findingKind:p="",origin:d="report_synthesis",sourceRuleId:m="",evidenceJsonPointers:f=null,methodVersion:g="",confidence:h="",affectedTensorCount:b=null,assessedTensorCount:A=null,affectedTensors:y=null,affectedTensorsTruncated:x=!1}){return{finding_id:e,origin:d,source_rule_id:m||`deepbom.report_findings.${e}.v1`,evidence_json_pointers:f||fh[e]||["/"],method_version:g||Pn.schemas.findingsRegister,confidence:h||ZV[i]||"not_declared",confidence_scope:"Confidence describes the evidence extraction or deterministic method, not the likelihood or severity of a product effect.",category:t,finding_kind:p||XV({category:t,evidence:i}),finding_class:_||KV[t]||"engineering review",title:n,evidence_class:i,technical_priority:o,affected_operator:a,affected_tensor:r,...Number.isSafeInteger(b)?{affected_tensor_count:b}:{},...Number.isSafeInteger(A)?{assessed_tensor_count:A}:{},...Array.isArray(y)?{affected_tensors:y}:{},...Array.isArray(y)?{affected_tensors_truncated:x===!0}:{},observation:s,interpretation:c,possible_effects:WV(t),recommendation:u,limitations:i==="NOT_ASSESSABLE"?"Model artifact alone is insufficient.":"Confirm with target runtime and/or representative data where applicable.",regulatory_relevance:l}}function XV({category:e,evidence:t}){let n=String(t||"").toUpperCase();return["NOT_ASSESSABLE","DECLARED_UNVERIFIED"].includes(n)||["lineage","limitation","evidence_completeness","evidence_reproducibility"].includes(e)?"evidence_gap":["integrity","numerical_integrity","input_contract","output_contract","integration_verification"].includes(e)&&["OBSERVED","DERIVED","OBSERVED/DERIVED","SOURCE_PINNED_AND_OBSERVED"].includes(n)?"artifact_defect":"caution"}function WV(e){return{integration:["preprocessing mismatch","label-map mismatch","application contract drift"],integration_verification:["runtime support gap","release-manifest omission","deployment reproducibility gap"],quantization:["quantization sensitivity","calibration review priority","backend-specific numerical drift"],quantization_design_review:["quantization design review","converter lineage review","representative regression planning"],quantization_calibration_review:["calibration range review","representative histogram review","quantization sensitivity triage"],numerical_structure_review:["model-content structure review","representative regression planning","converter/checkpoint triage"],delegate:["fallback latency","copy traffic","runtime partition overhead"],packing:["first-run latency","weight repacking cost","benchmark warmup sensitivity"],memory_cache:["reduced cache reuse","memory-traffic latency","bandwidth pressure"],channel_alignment:["SIMD lane padding","scalar tail overhead","micro-kernel inefficiency"],runtime:["backend-specific latency anomaly","numeric drift","silent fallback"],evidence_reproducibility:["report reproducibility gap","audit-trace ambiguity","target-profile drift"],lineage:["source-artifact traceability gap","converter drift","release-manifest omission"],synthetic_sensitivity:["output plateau","rank instability under perturbation"],limitation:["not assessable from deployment artifact alone"]}[e]||["engineering review priority"]}function hh(e,{runtimeEvidence:t=null,runtimeBasinResult:n=null,deepBomResult:i=null,deployCurvatureResult:o=null,analyzerMetadata:a=Pn}={}){let r=a&&typeof a=="object"?a:Pn,s=[],c=Qe(e)||[],u=(e?.format||"tflite")==="onnx",l=e?.format==="coreml"?e?.weight_integrity:null;if(String(l?.schema||"").startsWith("deepbom.coreml.")){let $=String(l.schema).includes("mlprogram"),ee=String(l.schema).includes("classical")||String(l.schema).includes("pipeline"),ne=$?"Core ML MIL constants":ee?"Core ML serialized numerical parameters":"Core ML WeightParams",ge=Array.isArray(l.parameters)?l.parameters:[],le=he=>`${he.pipeline_model_name?`${he.pipeline_model_name}/`:""}${he.layer_name||he.tensor_name||he.pipeline_model_type||`tensor_${he.tensor_index??"?"}`}/${he.role||"constant"}`,ue=ge.filter(he=>Number(he.numerical_integrity?.nonfinite_count||0)>0);ue.length&&s.push(Z({id:"EA-CML-0001",category:"integrity",title:"Core ML serialized constants contain non-finite values",evidence:"OBSERVED",priority:"High",op:ne,tensor:ue.slice(0,8).map(le).join(", "),observation:`${C(l.nonfinite_value_count||0)} NaN or infinity value(s) were decoded from ${C(ue.length)} Core ML constant payload(s): ${ue.slice(0,8).map(he=>`${le(he)} (${C(he.numerical_integrity.nonfinite_count||0)})`).join("; ")}.`,interpretation:`This is direct numerical evidence from serialized ${$?"MIL immediate/package-blob constant bytes":ee?"classical coefficient, support-vector, threshold, or nested pipeline parameter bytes":"WeightParams bytes"}, not a runtime or task-accuracy inference.`,recommendation:"Reject the release artifact, trace the affected exporter/checkpoint values, regenerate it, and require a clean payload scan before execution validation.",relevance:"serialized numerical integrity; release gating"}));let xt=ge.filter(he=>(l.schema.includes("mlprogram")||["weights","data","support_vectors","coefficients"].includes(he.role)||String(he.role||"").startsWith("weights_"))&&he.numerical_integrity?.all_zero===!0&&he.value_count>0);xt.length&&s.push(Z({id:"EA-CML-0002",category:"numerical_structure_review",title:"Core ML serialized constants are exactly all-zero",evidence:"DERIVED",priority:"Medium",op:ne,tensor:xt.slice(0,8).map(le).join(", "),observation:`${C(xt.length)}/${C(l.assessed_parameter_count||0)} assessed ${$?"MIL constant":ee?"numerical parameter":"WeightParams"} payload(s) contain only exact zero values.`,interpretation:"Exact all-zero storage is deterministic; whether a zero bias is intentional or a zero kernel is defective depends on its bound layer role.",recommendation:"Review zero kernels as release blockers and verify zero bias/offset parameters against the source checkpoint and export manifest.",relevance:"weight payload integrity; exporter verification"})),Number(l.parameter_count||0)>Number(l.assessed_parameter_count||0)&&s.push(Z({id:"EA-CML-0003",category:"limitation",title:"Core ML constant numerical coverage is partial",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"Informational",op:ne,observation:`${C(l.assessed_parameter_count||0)}/${C(l.parameter_count||0)} ${$?"MIL constant":ee?"serialized numerical parameter":"WeightParams"} payload(s) were numerically assessed; ${Number.isSafeInteger(l.payload_bytes)?`${C(l.assessed_payload_bytes||0)}/${C(l.payload_bytes)} payload bytes assessed`:"the external package payload byte denominator remains unbound"}.`,interpretation:"Unimplemented layer cardinality or encoding semantics remain explicit and are not converted to a clean zero-anomaly result.",recommendation:"Use a source-pinned decoder for every listed storage contract before treating Core ML payload integrity as complete.",relevance:"analysis coverage; evidence completeness"}))}let _=e?.format==="gguf"?e.gguf:null;_&&(_.invalid_tensor_cardinality_count>0||_.invalid_tensor_offset_count>0||_.overlapping_tensor_range_count>0)&&s.push(Z({id:"EA-GGF-0001",category:"integrity",findingKind:"artifact_defect",title:"GGUF tensor descriptors violate the serialized storage layout",evidence:"OBSERVED/DERIVED",priority:"High",op:"GGUF tensor directory",observation:`${C(_.invalid_tensor_cardinality_count||0)} tensor row cardinality violation(s), ${C(_.invalid_tensor_offset_count||0)} invalid offset(s), and ${C(_.overlapping_tensor_range_count||0)} overlapping known range(s) were observed. Invalid offsets include ${C(_.out_of_bounds_tensor_range_count||0)} out-of-bounds range(s); these counts are not additive.`,interpretation:"Declared row dimensions must satisfy the source-pinned GGML block size; offsets must satisfy alignment and file bounds. An unsupported encoding alone does not trigger this defect. Unassessable byte lengths remain unknown.",recommendation:"Inspect the named GGUF tensor descriptors and the exporter or quantizer, regenerate the artifact, and repeat the storage-layout checks before runtime validation.",relevance:"serialized storage integrity; release gating",evidenceJsonPointers:["/evidence/static_analysis/gguf","/evidence/static_analysis/tensors"]}));let p=e?.tensor_numerical_integrity;if(p){let $=Array.isArray(p.tensor_records)?p.tensor_records:[],ee=$.filter(ue=>Number(ue.nan_value_count||0)+Number(ue.positive_infinity_value_count||0)+Number(ue.negative_infinity_value_count||0)>0),ne=$.filter(ue=>Number(ue.invalid_encoding_value_count||0)>0||Number(ue.nonfinite_scale_block_count||0)>0),ge=[...new Map([...ee,...ne].map(ue=>[ue.tensor_index,ue])).values()];ge.length&&s.push(Z({id:"EA-SER-0001",category:"numerical_integrity",findingKind:"artifact_defect",title:"Serialized tensor payload contains non-finite or invalid numerical values",evidence:"OBSERVED/DERIVED",priority:"High",op:"serialized tensor payload",tensor:ge.slice(0,8).map(ue=>ue.tensor_name).join(", "),observation:`${C(p.nonfinite_value_count||0)} non-finite decoded value(s), ${C(p.invalid_encoding_value_count||0)} invalid encoded value(s), and ${C(p.nonfinite_scale_block_count||0)} block(s) with non-finite scale metadata were found by a full payload scan. Affected tensors: ${ge.slice(0,8).map(ue=>`${ue.tensor_name} (${C(ue.nan_value_count||0)} NaN, ${C(Number(ue.positive_infinity_value_count||0)+Number(ue.negative_infinity_value_count||0))} Inf, ${C(ue.invalid_encoding_value_count||0)} invalid)`).join("; ")}${ge.length>8?`; plus ${C(ge.length-8)} more`:""}.`,interpretation:"The values are read from the declared serialized tensor ranges. For GGUF block encodings, numerical values are derived with the pinned llama.cpp dequantization formulas; this is not a task-accuracy claim.",recommendation:"Reject the release artifact, inspect the named source tensors and exporter/quantizer path, regenerate the artifact, and require a clean full-payload scan before runtime validation.",relevance:"serialized numerical integrity; release gating",evidenceJsonPointers:["/evidence/static_analysis/tensor_numerical_integrity"]}));let le=$.filter(ue=>ue.status==="assessed_full_payload"&&ue.all_zero);if(le.length){let ue=Number(p.assessed_tensor_count||0),xt=Z({id:"EA-SER-0002",category:"numerical_structure_review",title:"One or more serialized tensor payloads are exactly all-zero",evidence:"DERIVED",priority:"Medium",op:"serialized tensor payload",tensor:le.slice(0,8).map(he=>he.tensor_name).join(", "),affectedTensorCount:le.length,assessedTensorCount:ue,affectedTensors:le.slice(0,64).map(he=>he.tensor_name),affectedTensorsTruncated:le.length>64,observation:`${C(le.length)}/${C(p.assessed_tensor_count||0)} fully decoded tensor payload(s) contain only exact zero values: ${le.slice(0,8).map(he=>`${he.tensor_name} (${C(he.value_count||0)} values)`).join("; ")}${le.length>8?`; plus ${C(le.length-8)} more`:""}.`,interpretation:"Exact all-zero storage is deterministic evidence about the serialized tensor, but its functional effect cannot be inferred without an executable graph and consumer semantics.",recommendation:"Confirm that each all-zero tensor is intentional in the source checkpoint/export manifest; for executable models, join it to consumer operators and representative-output regression.",relevance:"weight payload integrity; export verification",evidenceJsonPointers:["/evidence/static_analysis/tensor_numerical_integrity/tensor_records"]});xt.title=`${C(le.length)} of ${C(ue)} assessed serialized tensor payloads are exactly all-zero`,s.push(xt)}p.status!=="assessed"&&s.push(Z({id:"EA-SER-0003",category:"limitation",title:"Some serialized tensor payload semantics are not assessed",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"Informational",op:"serialized tensor payload",observation:`${C(p.assessed_tensor_count||0)}/${C(p.tensor_count||0)} tensor payloads and ${C(p.assessed_tensor_bytes||0)}/${C(p.declared_tensor_bytes||0)} declared tensor bytes were numerically decoded. ${C(p.unassessed_tensor_count||0)} tensor(s) remain explicit: ${(p.limitations||[]).slice(0,6).map(ue=>`${ue.tensor_name} ${ue.dtype}: ${ue.reason}`).join("; ")||"reason ledger unavailable"}.`,interpretation:"Byte-range conservation is reported separately; no numerical result is inferred for an encoding whose source semantics are not implemented or whose storage cardinality is invalid.",recommendation:"Use a source-pinned decoder for the listed encodings or convert to an assessed dtype before treating payload integrity as complete.",relevance:"analysis coverage; evidence completeness",evidenceJsonPointers:["/evidence/static_analysis/tensor_numerical_integrity/limitations"]}))}let d=d5(e),m=t?.preprocessingConsequenceResult||t?.preprocessing_consequence_atlas||null,f=(e?.inputs||[])[0],g=(e?.input_contracts||[]).find($=>$.tensor_index===f?.index)||(e?.input_contracts||[])[0];if(f&&!e?.metadata_presence?.documented_preprocessing){let $=Object.prototype.hasOwnProperty.call(e?.metadata_presence||{},"documented_preprocessing")?"/evidence/static_analysis/metadata_presence/documented_preprocessing":"/evidence/static_analysis/metadata_presence/preprocessing_contract_status",ee=Number.isFinite(g?.expected_range_low)&&Number.isFinite(g?.expected_range_high)?`[${Number(g.expected_range_low).toPrecision(9)}, ${Number(g.expected_range_high).toPrecision(9)}]`:"not emitted";s.push(Z({id:"EA-IOC-0001",category:"integration",title:"Preprocessing contract is not embedded",evidence:"OBSERVED",priority:"High",op:"Input 0",observation:`The artifact exposes ${f.dtype||"unknown"} ${g5(f.shape)} input. Tensor layout is ${g?.layout||"not determined"} (${g?.layout_evidence_class||"NOT_ASSESSABLE"}; ${g?.layout_status||"no structured layout contract"}); tensor numerical status is ${g?.tensor_numerical_contract_status||"not assessed"} with scalar real range ${ee}. Source decoding, resize policy, interpolation, RGB/BGR order, and normalization remain undocumented.`,interpretation:"The model artifact alone does not define the application-side input transformation needed for reproducible runtime or accuracy results.",recommendation:"Bind a versioned preprocessing specification and its checksum to the artifact release manifest.",relevance:"integration contract; deployment reproducibility",evidenceJsonPointers:["/evidence/static_analysis/inputs/0",...g?["/evidence/static_analysis/input_contracts/0"]:[],$]}))}let h=e?.dynamic_shape_cost_contract,b=YE(e);if(Number(h?.dynamic_tensor_count||0)>0&&b.status!=="assumption_bound_batch_one"){let $=Number(h.unresolved_dynamic_compute_op_count||0),ee=Number(h.total_macs_unresolved_op_count||0),ne=Number(h.liveness?.unresolved_candidate_program_point_count||0),ge=h.total_macs_formula?.expression||h.total_macs_formula_status||"not assessed",le=h.liveness?.peak_live_payload_formula?.expression||h.liveness?.peak_live_payload_max_formula?.expression||h.liveness?.peak_selection_status||"not assessed";s.push(Z({id:"EA-DYN-0001",category:"integration",title:"Dynamic dimensions are not bound to approved deployment scenarios",evidence:"DERIVED",priority:$>0||ee>0||ne>0?"High":"Medium",op:"Dynamic tensor contract",observation:`${C(h.dynamic_tensor_count)} dynamic tensor(s) map to ${C(h.symbol_count||0)} symbol(s). Exact dynamic compute formulas ${C(h.op_formula_count||0)}/${C(h.dynamic_compute_op_count||0)}; dynamic-op unresolved ${C($)}; total-MAC blockers ${C(ee)}. Total MAC expression: ${ge}. Symbolic live-payload peak: ${le}; unresolved live-set program points ${C(ne)}. Dimension bounds status: ${h.dimension_bounds_status||"not assessed"}.`,interpretation:"The emitted polynomials are exact after runtime dimensions are bound, but the artifact contains no approved shape portfolio or numeric bounds. A concrete stored TFLite shape is an example projection, not a worst-case memory or latency claim.",recommendation:"Bind a versioned deployment shape portfolio or explicit dimension bounds, evaluate every emitted cost formula for those scenarios, and attach artifact-bound runtime assignment, allocation, and latency captures for the approved extrema.",relevance:"capacity planning; dynamic input contract; runtime reproducibility",evidenceJsonPointers:fh["EA-DYN-0001"]}))}m?.status==="assessed"&&Number(m.output_changed_candidate_count||0)>0&&s.push(Z({id:"EA-RUN-0003",category:"runtime",title:"Counterfactual preprocessing contracts diverge at captured model outputs",evidence:"MEASURED_SYNTHETIC",priority:"Medium",op:"Model input to declared outputs",observation:`${C(m.candidate_count)} explicit contract input(s) were replayed twice through ${m.runtime?.name||"LiteRT.js"} ${m.runtime?.version||""} ${m.runtime?.backend||"WASM"}. They collapsed to ${C(m.unique_input_tensor_count)} unique input tensor(s) and ${C(m.unique_output_tensor_set_count)} unique output tensor set(s). ${C(m.output_changed_candidate_count)} candidate(s) changed output values; ${C(m.top1_changed_candidate_count)} changed the raw first-output argmax index. Maximum changed output elements ${C(m.maximum_output_changed_element_count)}; maximum absolute raw output delta ${C(m.maximum_output_absolute_difference)}. Portfolio SHA-256 ${m.portfolio_ledger_sha256}.`,interpretation:"This establishes output sensitivity for the analyzer-generated counterfactual tensors in the captured browser runtime. It does not identify the production preprocessing path, attach labels to output indices, estimate representative frequency, or establish an accuracy or user-impact change.",recommendation:"Replay the versioned production decoder/resize/channel/normalization implementation with representative regression inputs, bind its source and binary hashes, and compare declared output tensors and application decisions against the approved reference pipeline.",relevance:"input integration verification; browser-local numerical replay"}));let A=(e?.outputs||[])[0];A&&!e?.metadata_presence?.output_semantics_documented&&s.push(Z({id:"EA-OUT-0001",category:"integration",title:"Output interpretation contract is not embedded",evidence:"OBSERVED",priority:"Medium",op:"Output 0",observation:oH(e,A),interpretation:"The graph can expose mathematical tensor structure, but application semantics such as class ordering, label mapping, and consumer-side postprocessing are not established by shape and dtype alone.",recommendation:"Attach and hash the output label mapping and application-side interpretation specification.",relevance:"integration contract; result interpretation"}));let y=e?.conversion_receipt;s.push(Z(y?{id:"EA-LIN-0001",category:"lineage",title:"Conversion receipt is output-bound; remaining release lineage is not established",evidence:"DECLARED_UNVERIFIED",priority:"Medium",op:"Release manifest",observation:`Receipt ${y.receipt_sha256} declares ${C(y.receipt?.source_artifacts?.length||0)} source artifact(s), converter ${y.receipt?.converter?.name||"not declared"} ${y.receipt?.converter?.version||""}, and environment manifest ${y.receipt?.converter?.environment?.manifest_sha256||"not declared"}. The output SHA-256 and format exactly match the active deployment artifact. Converter execution, calibration dataset use, build pipeline identity, software release ID, model requirement ID, and previous released artifact remain outside the observed artifact binding unless separately supplied.`,interpretation:"The output identity is observed. Source, converter, invocation, and environment statements are hash-bound declarations and were not re-executed or independently observed by this audit.",recommendation:"Verify the receipt against the controlled build pipeline and bind any applicable calibration dataset, software release, requirement, approval, and prior-artifact identities in the release record.",relevance:"release traceability; configuration management",evidenceJsonPointers:["/evidence/static_analysis/conversion_receipt"]}:{id:"EA-LIN-0001",category:"lineage",title:"Source checkpoint and conversion lineage were not provided",evidence:"NOT_ASSESSABLE",priority:"High",op:"Release manifest",observation:"The artifact/report context does not provide source checkpoint SHA-256, export framework/version, converter version, export configuration, quantization/calibration configuration, representative dataset ID, build pipeline ID, software release ID, model requirement ID, or previous released artifact SHA-256.",interpretation:"The deployment artifact can be structurally analyzed, but it does not by itself establish traceability from training checkpoint to released runtime artifact.",recommendation:"Bind checkpoint-to-artifact lineage in the release manifest and include immutable hashes/IDs for source checkpoint, converter/framework, export options, calibration inputs where applicable, pipeline, software release, requirement, and previous artifact.",relevance:"release traceability; configuration management"}));let x=iH(t),v=r.buildSourceState&&r.buildSourceState!=="clean",I=u?"":e?.target_profile?.profile_sha256||"",w=String(e?.format||"tflite").toLowerCase()==="tflite",N=[r.semanticVersion?"":"DeepBOM semantic version",r.buildCommit?"":"analyzer commit",v?"dirty analyzer source state":"",r.buildContentSha256?"":"analyzer bundle content SHA-256",r.rulepackSha256?"":"rulepack SHA-256",w&&!I?"target-profile SHA-256":""].filter(Boolean);if(N.length&&s.push(Z({id:"EA-PROV-0001",category:"evidence_reproducibility",title:u?"Analyzer/rulepack immutable identity is incomplete or dirty":"Analyzer/rulepack/target-profile immutable identity is incomplete or dirty",evidence:"OBSERVED",priority:"High",op:"Report metadata",observation:`Reproducibility gap(s): ${N.join(", ")}. Analyzer commit ${r.buildCommit||"not embedded"}; source state ${r.buildSourceState||"not embedded"}; bundle content SHA-256 ${r.buildContentSha256||"not embedded"}; rulepack SHA-256 ${r.rulepackSha256||"not embedded"}; target-profile SHA-256 ${w?I||"not embedded":"not applicable to this artifact-only format assessment"}.`,interpretation:`Date/version strings help humans, but a dirty analyzer commit does not identify the executed source; immutable analyzer, bundle-content, and rulepack identifiers${u?"":" plus the selected target-profile identifier"} are needed to reproduce exported evidence exactly.`,recommendation:`Build release reports from a clean analyzer tree; for dirty development builds, embed the bundle content SHA-256 and still report the dirty source state explicitly. Embed analyzer and rulepack identifiers${u?"":" plus the selected target-profile identifier"} in every exported report and signed bundle.`,relevance:"evidence reproducibility; audit traceability",evidenceJsonPointers:w?fh["EA-PROV-0001"]:["/analyzer_metadata"]})),u){let $=e?.onnx_domain_analysis||{},ee=e?.onnx_external_data||{},ne=e?.onnx_shape_inference||{},ge=e?.onnx_type_proto_contract||{},le=e?.onnx_sparse_tensor_contract||{},ue=ne.declaration_conflicts||[],xt=ne.semantic_contract_conflicts||[],he=(Xt(e)||[]).filter(z=>(z.conditional_shape_contract?.variant_failures||[]).some(R=>R?.status==="invalid")),He=(ne.schema_form_rows||[]).filter(z=>z.status==="fail"),st=(ne.opset_import_contract?.rows||[]).filter(z=>z.status==="fail"),Re=ne.shape_scope||{},de=ne.extended_scope_inference||{},Xi=(de.function_call_rows||[]).filter(z=>z.status==="fail"),Ha=(de.control_flow_rows||[]).filter(z=>z.status==="fail"),po=(de.sequence_map_rows||[]).filter(z=>z.status==="fail"),zo=(de.control_flow_rows||[]).filter(z=>z.status==="partial"),Vr=(de.sequence_map_rows||[]).filter(z=>z.status==="partial"),Hr=(de.scope_rows||[]).filter(z=>z.status==="partial"),Wi=ge.invalid_rows||[],pn=le.invalid_rows||[],Kr=ne.container_value_inference?.failed_rows||[],ce=ne.ml_value_inference||{},iu=ce.failed_rows||[],Ep=ce.partial_rows||[],ou=(ce.rows||[]).filter(z=>Number(z.duplicate_key_count||0)>0),pc=(ce.rows||[]).filter(z=>z.op_name==="DictVectorizer"&&Number(z.duplicate_vocabulary_count||0)>0),au=(ce.rows||[]).filter(z=>Number(z.active_duplicate_key_count||0)>0),ru=(ce.rows||[]).filter(z=>Number(z.exact_truncated_feature_count_per_batch||0)>0),su=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>R==="binarizer_non_finite_threshold"||R==="binarizer_static_input_contains_non_finite_or_unsafe_value")),cu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("binarizer_dtype_unsupported_by_pinned_ort_cpu")),lu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("normalizer_signed_integer_abs_or_square_overflow")),uu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("normalizer_negative_signed_max_divisor")),_u=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("normalizer_integer_to_float32_precision_loss")),du=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>R==="normalizer_non_finite_float32_projection"||R==="normalizer_static_input_contains_non_finite_or_unsafe_value")),pu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("scaler_pinned_ort_attribute_or_shape_contract_invalid")),mu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("scaler_integer_to_float32_precision_loss")),fu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("scaler_non_finite_parameter_input_or_output")),hu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_pinned_ort_attribute_or_shape_contract_invalid")),gu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_attribute_length_outside_onnx_one_or_feature_count")),bu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_schema_dtype_missing_pinned_ort_cpu_kernel")),yu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_non_finite_imputed_or_output")),Au=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_pinned_ort_attribute_contract_invalid")),vu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_duplicate_categories_last_write_wins")),wu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_unknown_categories_all_zero_encoding")),xu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_unknown_category_guaranteed_runtime_failure")),Eu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_schema_dtype_missing_pinned_ort_cpu_kernel")),Nu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_noncanonical_zeros_boolean")),Iu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_numeric_to_int64_cast_not_representable")),Cu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_schema_dtype_pair_missing_pinned_ort_cpu_kernel")),ku=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>["label_encoder_v4_schema_last_vs_ort_first_duplicate_conflict","label_encoder_v1_duplicate_class_runtime_last_index"].includes(R))),Su=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_v2_schema_bitwise_nan_vs_ort_unmatched")),Tu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_artifact_known_default_path_reached")),zu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_non_finite_mapping_state")),Ou=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_pinned_ort_runtime_contract_invalid")),Ru=(ce.rows||[]).filter(z=>["LinearClassifier","LinearRegressor"].includes(z.op_name)&&(z.risk_codes||[]).some(R=>R.endsWith("pinned_ort_runtime_contract_invalid"))),Bu=(ce.rows||[]).filter(z=>Number(z.linear_unused_coefficient_count||0)>0||Number(z.linear_ignored_intercept_count||0)>0),Du=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("linear_regressor_schema_dtype_missing_pinned_ort_cpu_kernel")),Mu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>["linear_classifier_single_score_post_transform_noop","linear_classifier_binary_probit_second_score_unwritten","linear_classifier_binary_post_transform_ignored_for_complement_expansion","linear_regressor_single_target_post_transform_noop","linear_regressor_probit_may_emit_non_finite"].includes(R))),$u=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("linear_classifier_multi_class_nonzero_ignored_by_pinned_ort")),Lu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("linear_classifier_duplicate_labels_ambiguous_output_semantics")),Pu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>["linear_classifier_non_finite_parameter_or_reference_score","linear_classifier_reference_decision_boundary","linear_regressor_non_finite_parameter_or_reference_score"].includes(R))),Zr=(ce.rows||[]).filter(z=>["SVMClassifier","SVMRegressor"].includes(z.op_name)),qu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_pinned_ort_runtime_contract_invalid","svm_regressor_pinned_ort_runtime_contract_invalid"].includes(R))),ju=Zr.filter(z=>(z.risk_codes||[]).includes("svm_classifier_onnx_vs_pinned_ort_score_width_mismatch")),Fu=Zr.filter(z=>(z.risk_codes||[]).includes("svm_regressor_schema_dtype_missing_pinned_ort_cpu_kernel")),Qu=Zr.filter(z=>(z.risk_codes||[]).includes("svm_regressor_post_transform_ignored_by_pinned_ort")),Uu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_serialized_parameters_ignored_by_pinned_ort","svm_regressor_serialized_parameters_ignored_by_pinned_ort","svm_classifier_linear_mode_forces_linear_kernel","svm_regressor_linear_mode_forces_linear_kernel"].includes(R))),Gu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_non_finite_parameter_or_reference_score","svm_classifier_reference_decision_boundary","svm_regressor_non_finite_parameter_or_reference_score","svm_regressor_reference_decision_boundary"].includes(R))),Vu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_duplicate_labels_ambiguous_output_semantics","svm_classifier_probability_scores_receive_additional_post_transform","svm_classifier_binary_probit_second_score_unwritten","svm_classifier_binary_post_transform_uses_complement_expansion","svm_regressor_noncanonical_one_class_flag"].includes(R))),Xr=(ce.rows||[]).filter(z=>["TreeEnsemble","TreeEnsembleClassifier","TreeEnsembleRegressor"].includes(z.op_name)),Hu=Xr.filter(z=>z.tree_pinned_ort_contract_status==="fail"&&z.tree_pinned_cpu_dtype_gap!==!0),Ku=Xr.filter(z=>z.tree_pinned_cpu_dtype_gap===!0),Zu=Xr.filter(z=>z.tree_deprecated_operator===!0),Xu=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_ensemble_nonleaf_weights_ignored_by_pinned_ort","tree_ensemble_single_target_additional_leaf_weights_ignored_by_pinned_ort","tree_ensemble_shared_subtree_not_strict_tree","tree_ensemble_v5_shared_subtree_not_strict_tree","tree_ensemble_v5_unreachable_serialized_nodes_or_leaves"].includes(R))),Wu=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_ensemble_v5_duplicate_membership_values","tree_ensemble_v5_zero_member_differs_from_pinned_onnx_reference_parser"].includes(R))),Yu=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_classifier_duplicate_labels_ambiguous_output_semantics","tree_classifier_binary_post_transform_leaves_score_unwritten","tree_regressor_single_target_post_transform_noop","tree_ensemble_v5_single_target_post_transform_noop","tree_classifier_binary_single_base_value_semantics_underspecified","tree_classifier_pinned_ort_binary_label_index_semantics"].includes(R))),Ju=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_ensemble_non_finite_parameter_or_reference_score","tree_ensemble_reference_decision_boundary"].includes(R))),jg=ne.tfidf_vectorizer_inference||{},Fg=jg.rows||[],e_=jg.failed_rows||[],t_=Fg.filter(z=>(z.risk_codes||[]).includes("tfidf_weight_coordinate_semantics_divergence")),n_=Fg.filter(z=>Number(z.exact_ort_reference_divergent_output_count||0)>0),i_=Fg.filter(z=>(z.risk_codes||[]).some(R=>["tfidf_ngram_counts_ignore_pool_prefix","tfidf_duplicate_ngram_outside_active_length_range","tfidf_multiple_ngrams_share_output_coordinate"].includes(R))),Qg=(jg.partial_rows||[]).filter(z=>["not_assessed_output_element_limit","not_assessed_work_limit"].includes(z.static_execution_status));if(Wi.length){let z=Wi.slice(0,8).map(R=>`${R.scope} ${R.role} ${R.value_name}: ${(R.reason_codes||[]).join("/")||"invalid TypeProto"}`);s.push(Z({id:"EA-ONX-0010",category:"integrity",title:"ONNX TypeProto declaration violates the pinned IR contract",evidence:"SOURCE_PINNED_AND_OBSERVED",priority:"High",op:`${C(Wi.length)} invalid type declaration(s)`,observation:`${z.join("; ")}${Wi.length>z.length?`; plus ${C(Wi.length-z.length)} more in structured evidence`:""}.`,interpretation:"A required ValueInfo name/type/shape, recursive TypeProto oneof, tensor element type, dimension oneof, sequence/optional child, or map key/value contract is malformed under the pinned ONNX IR. Dense tensor shape, MAC, payload, liveness, browser input, and provider conclusions are suppressed where the declared value kind is not a valid dense tensor contract.",recommendation:"Reject the artifact for release, run the same pinned ONNX checker, repair the exporter or serialized TypeProto, and require zero TypeProto contract failures before runtime qualification.",relevance:"artifact integrity; value type system; downstream metric validity"}))}if(pn.length){let z=pn.slice(0,8).map(R=>`${R.scope} ${R.sparse_tensor_name||"unnamed"}: ${(R.reason_codes||[]).join("/")||"invalid SparseTensorProto"}`);s.push(Z({id:"EA-ONX-0011",category:"integrity",title:"ONNX SparseTensorProto storage violates the pinned IR contract",evidence:"SOURCE_PINNED_AND_OBSERVED",priority:"High",op:`${C(pn.length)} invalid sparse tensor record(s)`,observation:`${z.join("; ")}${pn.length>z.length?`; plus ${C(pn.length-z.length)} more in structured evidence`:""}.`,interpretation:"The values/indices/dense-shape/NNZ tuple or exact decoded index order, uniqueness, or bounds violates the pinned SparseTensorProto contract. Logical dense size and operator arithmetic must not be trusted until the sparse storage is repaired.",recommendation:"Reject the artifact for release, regenerate values and INT64 indices in strictly ascending unique order within the declared dense shape, verify every external component, and require a zero-failure sparse contract report.",relevance:"artifact integrity; sparse initializer storage; downstream metric validity"}))}if(Kr.length){let z=Kr.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${(R.reason_codes||[]).join("/")||"container value contract failure"}`);s.push(Z({id:"EA-ONX-0012",category:"integrity",title:"ONNX Sequence or Optional value contract is deterministically invalid",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Kr.length)} invalid container-value node(s)`,observation:`${z.join("; ")}${Kr.length>z.length?`; plus ${C(Kr.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned ONNX Sequence/Optional type inference proves an element-type mismatch, scalar/index/range defect, split inconsistency, concat incompatibility, or access to a provably empty optional. The affected graph path is invalid independently of execution-provider choice.",recommendation:"Reject the artifact for release, repair the exporter or graph constants, run the pinned ONNX checker/reference inferencer, and require zero container-value contract failures before runtime qualification.",relevance:"artifact integrity; ONNX value type system; runtime validity"}))}if(iu.length){let z=iu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name||"ONNX-ML"}: ${(R.reason_codes||[]).join("/")||"value-contract failure"}`);s.push(Z({id:"EA-ONX-0013",category:"integrity",title:"ONNX-ML value contract is deterministically invalid",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(iu.length)} invalid supported ONNX-ML value-contract node(s)`,observation:`${z.join("; ")}${iu.length>z.length?`; plus ${C(iu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned ai.onnx.ml-1 semantics prove an input type/rank defect, invalid Binarizer threshold, invalid Normalizer dtype/rank/mode, invalid CastMap mode or bound, missing/conflicting vocabulary, key/vocabulary mismatch, disallowed map value type, CategoryMapper category-array defect, FeatureVectorizer variadic-width/batch defect, ArrayFeatureExtractor empty or out-of-bounds index contract, or ZipMap feature-to-key mismatch. The affected output contract is invalid independently of execution-provider choice.",recommendation:"Reject the artifact for release, repair the exporter attributes and input TypeProto, run the pinned ONNX checker/reference inferencer, and require zero ONNX-ML value-contract failures before runtime qualification.",relevance:"artifact integrity; tensor/map value typing; classifier and feature-vector contracts; ONNX-ML runtime validity"}))}if(ou.length){let z=ou.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.duplicate_key_count||0)} duplicate occurrence(s) among ${C(R.class_key_count||0)} key(s)`);s.push(Z({id:"EA-ONX-0014",category:"integration_verification",title:"ONNX-ML ZipMap class labels contain duplicate map keys",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(ou.length)} affected ZipMap node(s); ${C(ce.duplicate_class_key_count||0)} duplicate occurrence(s)`,observation:`${z.join("; ")}${ou.length>z.length?`; plus ${C(ou.length-z.length)} more in structured evidence`:""}.`,interpretation:"A map cannot preserve separate score columns under the same key. The artifact's class-label list therefore cannot provide a one-to-one externally consumable mapping for every score column, even though duplicate labels are not promoted here to an invented OpSchema rejection.",recommendation:"Regenerate the artifact with unique class labels, verify class-key cardinality against the final score dimension, and test the consumer's decoded label-to-score contract before release.",relevance:"classifier correctness; output information loss; application integration"}))}if(pc.length){let z=pc.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.duplicate_vocabulary_count||0)} duplicate occurrence(s) among ${C(R.vocabulary_count||0)} vocabulary entries`);s.push(Z({id:"EA-ONX-0015",category:"integration_verification",title:"ONNX-ML DictVectorizer vocabulary repeats output columns",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(pc.length)} affected DictVectorizer node(s); ${C(pc.reduce((R,Ke)=>R+Number(Ke.duplicate_vocabulary_count||0),0))} duplicate occurrence(s)`,observation:`${z.join("; ")}${pc.length>z.length?`; plus ${C(pc.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU implementation intentionally accepts duplicate vocabulary entries and emits one output column per entry. Repeated entries therefore copy the same map value into multiple columns; this is valid runtime behavior, but it changes feature dimensionality and can silently duplicate a downstream feature.",recommendation:"Confirm that repeated feature columns are intentional, bind vocabulary order and cardinality to the downstream model contract, and regenerate with unique vocabulary entries when duplicated features are not required.",relevance:"feature-vector correctness; output column identity; application integration"}))}if(au.length){let z=au.slice(0,8).map(R=>`#${te(R.node_index)} ${R.mapping_direction||"UNRESOLVED"}: ${C(R.active_duplicate_key_count||0)} active duplicate occurrence(s) among ${C(R.category_pair_count||0)} pair(s)`);s.push(Z({id:"EA-ONX-0016",category:"integration_verification",title:"ONNX-ML CategoryMapper active keys overwrite earlier mappings",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(au.length)} affected CategoryMapper node(s); ${C(ce.duplicate_category_active_key_count||0)} active duplicate occurrence(s)`,observation:`${z.join("; ")}${au.length>z.length?`; plus ${C(au.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU constructor inserts category pairs in source order into an unordered map, so a repeated active-direction key replaces its earlier value. The artifact remains executable, but at least one declared category pair is unreachable and the externally visible mapping is not one-to-one with the attribute arrays.",recommendation:"Regenerate the artifact with unique keys for the active input direction, verify the retained last value against the application label contract, and require zero active duplicate categories before release.",relevance:"categorical mapping correctness; label identity; application integration"}))}if(ru.length){let z=ru.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.exact_truncated_feature_count_per_batch||0)} feature value(s) discarded per batch row across ${C(R.truncated_input_count||0)} input(s)`);s.push(Z({id:"EA-ONX-0017",category:"integration_verification",title:"ONNX-ML FeatureVectorizer deterministically truncates input features",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(ru.length)} affected FeatureVectorizer node(s); ${C(ce.exact_feature_vectorizer_truncated_feature_count_per_batch||0)} discarded feature value(s) per batch row`,observation:`${z.join("; ")}${ru.length>z.length?`; plus ${C(ru.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU implementation copies only min(actual row width, inputdimensions[i]) values from each input. The remaining source values are not represented in the output. This is executable behavior rather than an OpSchema failure, but it is deterministic information loss when the configured width is smaller than the artifact-known input row width.",recommendation:"Confirm that every discarded feature is intentional, bind inputdimensions and source tensor shapes to the downstream feature contract, and regenerate the graph with matching widths when truncation is not required.",relevance:"feature-vector correctness; deterministic information loss; downstream input identity"}))}if(su.length){let z=su.slice(0,8).map(R=>`#${te(R.node_index)} threshold ${R.threshold_value_text||"unresolved"}: ${(R.risk_codes||[]).join("/")}`);s.push(Z({id:"EA-ONX-0018",category:"integration_verification",title:"ONNX-ML Binarizer contains a non-finite numerical contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(su.length)} affected Binarizer node(s)`,observation:`${z.join("; ")}${su.length>z.length?`; plus ${C(su.length-z.length)} more in structured evidence`:""}.`,interpretation:"A NaN or infinite threshold produces a degenerate comparison contract, while the pinned ORT CPU Binarizer rejects a non-finite FLOAT32 input at execution. The ONNX artifact may remain schema-valid, but its output can collapse to a constant code or fail on the pinned CPU path.",recommendation:"Regenerate the model with a finite threshold and finite initializer values, verify the exact zero/one counts in the Engineering Report, and execute a bound ORT profile before release.",relevance:"numerical integrity; deterministic output collapse; runtime compatibility"}))}if(cu.length){let z=cu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0019",category:"runtime_compatibility",title:"ONNX-ML Binarizer dtype has no pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(cu.length)} affected Binarizer node(s)`,observation:`${z.join("; ")}${cu.length>z.length?`; plus ${C(cu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The artifact is valid under the pinned ONNX Binarizer-1 schema, but the pinned ORT CPU provider registers this operator only for FLOAT32. A FLOAT64, INT32, or INT64 Binarizer therefore has a deterministic schema/runtime support gap on that execution path.",recommendation:"Convert the Binarizer input/output contract to FLOAT32 or bind and capture an execution provider that demonstrably supports the artifact dtype; require successful provider assignment and execution before release.",relevance:"runtime compatibility; execution-provider assignment; deployment validity"}))}if(lu.length){let z=lu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"} ${R.normalizer_mode||"UNKNOWN"}: ${C(R.normalizer_signed_overflow_value_count||0)} value(s)`);s.push(Z({id:"EA-ONX-0020",category:"integrity",title:"ONNX-ML Normalizer reaches signed integer overflow in the pinned CPU arithmetic",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(lu.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_signed_overflow_value_count||0)} overflowing value(s)`,observation:`${z.join("; ")}${lu.length>z.length?`; plus ${C(lu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU implementation applies signed abs for L1 or signed x*x for L2 before casting to FLOAT32. INT32/INT64 minimum abs and magnitudes above the exact square limit therefore enter C++ signed-overflow territory; DEEPBOM suppresses a fabricated output instead of assigning deterministic numerical semantics to undefined arithmetic.",recommendation:"Reject this CPU execution contract, insert a safe FLOAT32 cast before Normalizer or regenerate bounded integer inputs, and verify the corrected graph against a pinned ORT session before release.",relevance:"numerical integrity; undefined signed arithmetic; runtime validity"}))}if(uu.length){let z=uu.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.normalizer_negative_max_divisor_row_count||0)} all-negative row(s); divisors ${(R.normalizer_divisor_preview||[]).join("/")||"not previewed"}`);s.push(Z({id:"EA-ONX-0021",category:"integration_verification",title:"ONNX-ML Normalizer MAX uses a negative signed maximum",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(uu.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_negative_max_divisor_row_count||0)} row(s)`,observation:`${z.join("; ")}${uu.length>z.length?`; plus ${C(uu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned operator divides by max(x), not max(abs(x)). An all-negative row therefore uses a negative divisor, flips output signs, and sets the least-negative input to +1. This is source-defined behavior but is frequently mistaken for max-absolute normalization.",recommendation:"Confirm signed-MAX semantics against the training/export pipeline; use L1/L2 or an explicit absolute-value reduction when max-absolute normalization was intended, then bind a reference output test to the artifact.",relevance:"feature preprocessing semantics; sign behavior; application contract"}))}if(_u.length){let z=_u.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}: ${C(R.normalizer_integer_float32_rounding_count||0)} changed value(s)`);s.push(Z({id:"EA-ONX-0022",category:"integration_verification",title:"ONNX-ML Normalizer integer inputs lose precision at the required FLOAT32 projection",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(_u.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_integer_float32_rounding_count||0)} changed integer value(s)`,observation:`${z.join("; ")}${_u.length>z.length?`; plus ${C(_u.length-z.length)} more in structured evidence`:""}.`,interpretation:"Normalizer-1 always emits FLOAT32. Artifact-known INT32/INT64 values outside exact FLOAT32 integer spacing are rounded before or during the pinned row arithmetic, so distinct integer inputs can become numerically indistinguishable without violating the ONNX schema.",recommendation:"Quantify whether the changed integers are semantically distinct features, rescale or cast upstream under an explicit contract, and compare pinned ORT outputs against the exporter reference before release.",relevance:"numerical precision; feature identity; reference-output verification"}))}if(du.length){let z=du.slice(0,8).map(R=>`#${te(R.node_index)} ${R.normalizer_mode||"UNKNOWN"}: ${R.normalizer_non_finite_output_count==null?"input not safely decodable":`${C(R.normalizer_non_finite_output_count)} non-finite output(s)`}`);s.push(Z({id:"EA-ONX-0023",category:"integrity",title:"ONNX-ML Normalizer has a statically non-finite numerical path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(du.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_non_finite_output_count||0)} proven non-finite output(s)`,observation:`${z.join("; ")}${du.length>z.length?`; plus ${C(du.length-z.length)} more in structured evidence`:""}.`,interpretation:"Finite source values can still overflow the pinned FLOAT32 square/sum path and produce Infinity/Infinity or another non-finite projection; explicitly non-finite source constants are also unsafe. Such outputs cannot be promoted as valid static tensors or stable downstream features.",recommendation:"Reject the affected numerical path, rescale or sanitize the input before normalization, and require finite outputs from the pinned ORT native fixture and representative runtime inputs.",relevance:"numerical integrity; non-finite propagation; downstream runtime validity"}))}if(pu.length){let z=pu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.scaler_parameter_contract_reason||"invalid pinned-runtime contract"}`);s.push(Z({id:"EA-ONX-0024",category:"runtime_compatibility",title:"ONNX-ML Scaler is valid by schema but invalid for the pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(pu.length)} affected Scaler node(s)`,observation:`${z.join("; ")}${pu.length>z.length?`; plus ${C(pu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Scaler-1 marks scale and offset optional in the ONNX schema, but the pinned ORT CPU implementation requires both arrays to be present, nonempty, equal in length, and either scalar or equal to dimension 0 for rank 1 and dimension 1 otherwise; rank-0 input is rejected. This is a deterministic schema/runtime compatibility gap, not an execution-provider prediction.",recommendation:"Emit explicit scale and offset arrays satisfying the pinned feature-stride contract, reject rank-0 input, and require successful construction plus reference-output execution in the pinned ORT session before release.",relevance:"runtime compatibility; attribute contract; deployment validity"}))}if(mu.length){let z=mu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}: ${C(R.scaler_integer_float32_rounding_count||0)} changed value(s)`);s.push(Z({id:"EA-ONX-0025",category:"integration_verification",title:"ONNX-ML Scaler integer inputs lose precision at FLOAT32 projection",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(mu.length)} affected Scaler node(s); ${C(ce.exact_scaler_integer_float32_rounding_count||0)} changed integer value(s)`,observation:`${z.join("; ")}${mu.length>z.length?`; plus ${C(mu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned Scaler CPU kernel emits FLOAT32. Artifact-known INT32 or INT64 inputs outside exact FLOAT32 integer spacing are rounded before the source-ordered offset-then-scale arithmetic, so distinct feature values may become identical without violating the ONNX schema.",recommendation:"Verify that changed integers are not semantically distinct, rescale or cast upstream under an explicit contract, and compare the exact pinned ORT outputs with the exporter reference.",relevance:"numerical precision; feature identity; reference-output verification"}))}if(fu.length){let z=fu.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.scaler_non_finite_parameter_count||0)} non-finite parameter(s), ${R.scaler_non_finite_output_count==null?"output unassessed":`${C(R.scaler_non_finite_output_count)} non-finite output(s)`}`);s.push(Z({id:"EA-ONX-0026",category:"integrity",title:"ONNX-ML Scaler has a statically non-finite affine path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(fu.length)} affected Scaler node(s); ${C(ce.exact_scaler_non_finite_parameter_count||0)} non-finite parameter(s); ${C(ce.exact_scaler_non_finite_output_count||0)} proven non-finite output(s)`,observation:`${z.join("; ")}${fu.length>z.length?`; plus ${C(fu.length-z.length)} more in structured evidence`:""}.`,interpretation:"A NaN or infinite scale/offset, an unsafe source constant, or finite affine arithmetic that overflows FLOAT32 can create a non-finite output. DEEPBOM preserves the exact canonical parameter text but does not propagate a non-finite result as a valid downstream static tensor.",recommendation:"Reject the affected numerical path, regenerate finite parameters or bounded inputs, and require finite reference outputs from the pinned ORT native fixture and representative runtime data.",relevance:"numerical integrity; non-finite propagation; downstream runtime validity"}))}if(hu.length){let z=hu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.imputer_parameter_contract_reason||"invalid pinned-runtime contract"}`);s.push(Z({id:"EA-ONX-0027",category:"runtime_compatibility",title:"ONNX-ML Imputer contract is invalid for the pinned ORT CPU implementation",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(hu.length)} affected Imputer node(s)`,observation:`${z.join("; ")}${hu.length>z.length?`; plus ${C(hu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT Imputer constructor and compute path require exactly one nonempty imputed-value list whose numeric family matches the input, and reject rank-0 tensors. A malformed or mismatched contract cannot be treated as a merely unknown runtime value path.",recommendation:"Emit one nonempty imputed-value list matching the input dtype family, use rank-1 or higher tensor input, and require successful construction plus exact reference-output execution with the pinned ORT package.",relevance:"runtime compatibility; missing-value contract; deployment validity"}))}if(gu.length){let z=gu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.imputer_imputed_value_count||0)} values for feature stride ${R.imputer_feature_stride==null?"unresolved":C(R.imputer_feature_stride)}; ${C(R.imputer_ignored_imputed_value_count||0)} ignored`);s.push(Z({id:"EA-ONX-0028",category:"integration_verification",title:"ONNX-ML Imputer silently ignores trailing imputed values in the pinned ORT kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(gu.length)} affected Imputer node(s); ${C(ce.exact_imputer_ignored_imputed_value_count||0)} ignored trailing value(s)`,observation:`${z.join("; ")}${gu.length>z.length?`; plus ${C(gu.length-z.length)} more in structured evidence`:""}.`,interpretation:"ONNX prose permits an imputed-value length of one or the feature count F. The pinned ORT CPU implementation accepts other nonempty lengths but uses only element zero, so the artifact can run while silently discarding configured values. This is source-observed runtime behavior, not a provider prediction.",recommendation:"Regenerate the artifact with exactly one imputed value or exactly F values, reject scalar-first fallback in release policy, and compare the pinned ORT output against exporter expectations.",relevance:"feature semantics; silent configuration loss; runtime portability"}))}if(bu.length){let z=bu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0029",category:"runtime_compatibility",title:"ONNX-ML Imputer dtype is schema-valid but lacks a pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(bu.length)} affected Imputer node(s)`,observation:`${z.join("; ")}${bu.length>z.length?`; plus ${C(bu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Imputer-1 permits FLOAT64 and INT32 in the ONNX schema, but the pinned ORT CPU registration provides FLOAT32 and INT64 kernels only. A schema-valid artifact can therefore fail session initialization on the pinned CPU execution path.",recommendation:"Convert the Imputer path to FLOAT32 or INT64 under an explicit numerical contract, or bind runtime evidence from a selected provider that implements the declared dtype before release.",relevance:"schema/runtime gap; execution-provider compatibility; session initialization"}))}if(yu.length){let z=yu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.imputer_non_finite_imputed_value_count||0)} non-finite imputed value(s), ${R.imputer_non_finite_output_count==null?"output unassessed":`${C(R.imputer_non_finite_output_count)} non-finite output(s)`}`);s.push(Z({id:"EA-ONX-0030",category:"integrity",title:"ONNX-ML Imputer has a statically non-finite output path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(yu.length)} affected Imputer node(s); ${C(ce.exact_imputer_non_finite_imputed_value_count||0)} non-finite imputed value(s); ${C(ce.exact_imputer_non_finite_output_count||0)} proven non-finite output(s)`,observation:`${z.join("; ")}${yu.length>z.length?`; plus ${C(yu.length-z.length)} more in structured evidence`:""}.`,interpretation:"A non-finite imputed value or retained non-finite source value can leave NaN or infinity in the exact output. A NaN replacement marker is valid and is not itself flagged when it produces finite replacements; the finding is tied to the resulting imputed/output path.",recommendation:"Use finite imputed values, define whether retained non-finite inputs are permitted, and require finite pinned-runtime outputs before downstream feature consumption.",relevance:"numerical integrity; missing-value sanitization; downstream validity"}))}if(Au.length){let z=Au.slice(0,8).map(R=>`#${te(R.node_index)} ${R.onehot_parameter_contract_reason||"invalid category contract"}`);s.push(Z({id:"EA-ONX-0031",category:"runtime_compatibility",title:"ONNX-ML OneHotEncoder category contract is invalid for the pinned ORT CPU implementation",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Au.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${Au.length>z.length?`; plus ${C(Au.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned constructor requires exactly one nonempty cats_int64s or cats_strings list, and the active list must match the input family. A missing, dual, or mismatched vocabulary is a deterministic construction defect rather than an unknown data-dependent path.",recommendation:"Emit exactly one nonempty vocabulary attribute matching the input dtype family, then require successful construction and exact output parity with the pinned ORT CPU fixture.",relevance:"runtime compatibility; categorical feature contract; session initialization"}))}if(vu.length){let z=vu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.onehot_duplicate_category_count||0)} duplicate(s); unreachable column(s) ${(R.onehot_unreachable_duplicate_column_indices||[]).join(", ")||"none"}`);s.push(Z({id:"EA-ONX-0032",category:"integration_verification",title:"ONNX-ML OneHotEncoder vocabulary contains unreachable duplicate columns",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(vu.length)} affected OneHotEncoder node(s); ${C(ce.exact_onehot_unreachable_duplicate_column_count||0)} unreachable column(s)`,observation:`${z.join("; ")}${vu.length>z.length?`; plus ${C(vu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT lookup overwrites earlier indices when a category repeats. The final duplicate owns the active one-hot column, leaving every earlier duplicate column permanently zero and making vocabulary width larger than the reachable encoding space.",recommendation:"Deduplicate the vocabulary while preserving the intended category order, retrain or remap downstream feature indices as needed, and verify exact encoded vectors before release.",relevance:"categorical feature identity; unreachable dimensions; downstream coefficient alignment"}))}if(wu.length){let z=wu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.onehot_exact_unknown_input_count||0)} unknown value(s) [${(R.onehot_unknown_input_preview||[]).join(", ")||"none"}]`);s.push(Z({id:"EA-ONX-0033",category:"input_contract",title:"ONNX-ML OneHotEncoder maps artifact-known unknown categories to all-zero slices",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(wu.length)} affected OneHotEncoder node(s); ${C(ce.exact_onehot_unknown_input_count||0)} unknown input value(s)`,observation:`${z.join("; ")}${wu.length>z.length?`; plus ${C(wu.length-z.length)} more in structured evidence`:""}.`,interpretation:"With zeros enabled, each unknown category is encoded as an all-zero vector. That representation can collide with missing-feature conventions and carries no explicit unknown bucket unless the surrounding feature contract defines one.",recommendation:"Document and test the unknown-category policy, add an explicit unknown category when downstream semantics require distinction, and compare representative feature vectors against training-time preprocessing.",relevance:"preprocessing parity; unknown-category semantics; feature collision"}))}if(xu.length){let z=xu.slice(0,8).map(R=>`#${te(R.node_index)} zeros=0 with ${C(R.onehot_exact_unknown_input_count||0)} artifact-known unknown value(s)`);s.push(Z({id:"EA-ONX-0034",category:"runtime_compatibility",title:"ONNX-ML OneHotEncoder has an artifact-proven unknown-category runtime failure",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(xu.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${xu.length>z.length?`; plus ${C(xu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU kernel returns failure when zeros is zero and a category is absent from the vocabulary. Exact artifact-known input values prove that this branch is reached, so output propagation is suppressed.",recommendation:"Repair the vocabulary or enable a reviewed unknown policy, then require successful pinned-runtime execution for the exact fixture and production-representative categorical inputs.",relevance:"deterministic runtime failure; preprocessing contract; release blocking"}))}if(Eu.length){let z=Eu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0035",category:"runtime_compatibility",title:"ONNX-ML OneHotEncoder dtype is schema-valid but lacks a pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Eu.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${Eu.length>z.length?`; plus ${C(Eu.length-z.length)} more in structured evidence`:""}.`,interpretation:"OneHotEncoder-1 permits INT32 in the ONNX schema, while the pinned ORT CPU registration provides INT64, FLOAT32, FLOAT64, and STRING kernels. A schema-valid INT32 node can fail provider kernel resolution.",recommendation:"Convert the categorical tensor to INT64 or bind measured assignment evidence from a selected provider that implements INT32 before release.",relevance:"schema/runtime gap; execution-provider compatibility; session initialization"}))}if(Nu.length){let z=Nu.slice(0,8).map(R=>`#${te(R.node_index)} zeros=${R.onehot_zeros_value}`);s.push(Z({id:"EA-ONX-0036",category:"integration_verification",title:"ONNX-ML OneHotEncoder uses a noncanonical boolean value for zeros",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Nu.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${Nu.length>z.length?`; plus ${C(Nu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The schema describes zeros as a boolean encoded by INT64. The pinned kernel treats every nonzero integer as enabled, but a value outside 0 or 1 depends on permissive boolean coercion and can reduce portability across validators or runtimes.",recommendation:"Canonicalize zeros to 0 or 1 and preserve the intended unknown-category behavior in preprocessing and runtime tests.",relevance:"attribute portability; boolean contract; runtime consistency"}))}if(Iu.length){let z=Iu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.onehot_numeric_to_int64_invalid_count||0)} unrepresentable value(s) [${(R.onehot_unknown_input_preview||[]).join(", ")||"none"}]`);s.push(Z({id:"EA-ONX-0037",category:"integrity",title:"ONNX-ML OneHotEncoder input cannot be represented by the pinned numeric-to-INT64 lookup cast",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Iu.length)} affected OneHotEncoder node(s); ${C(ce.exact_onehot_numeric_to_int64_invalid_count||0)} unrepresentable value(s)`,observation:`${z.join("; ")}${Iu.length>z.length?`; plus ${C(Iu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned numeric kernel converts FLOAT32/FLOAT64 inputs to INT64 before lookup. NaN, infinity, or a finite value outside the signed INT64 range does not have a portable representable result, so DEEPBOM refuses to emulate implementation-undefined conversion behavior.",recommendation:"Constrain categorical inputs to finite signed-INT64-representable values, regenerate the artifact fixture, and require exact native ORT parity before downstream use.",relevance:"numeric conversion integrity; undefined cast avoidance; categorical identity"}))}if(Ru.length){let z=Ru.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.linear_pinned_ort_contract_reason||"pinned ORT runtime contract failure"}`);s.push(Z({id:"EA-ONX-0038",category:"runtime_compatibility",title:"ONNX-ML linear model violates the pinned ORT CPU runtime contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Ru.length)} affected linear-model node(s)`,observation:`${z.join("; ")}${Ru.length>z.length?`; plus ${C(Ru.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized node can satisfy part of the ONNX schema while still failing the pinned ORT CPU constructor or compute path because required runtime attributes, rank, feature count, coefficient cardinality, labels, targets, or dtype do not satisfy that implementation's executable contract.",recommendation:"Treat the affected node as release blocking, repair the exact reason recorded in structured evidence, and require both zero static contract failures and a successful pinned native ORT fixture before deployment qualification.",relevance:"deterministic runtime failure; ONNX/ORT contract gap; release blocking"}))}if(Bu.length){let z=Bu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${C(R.linear_unused_coefficient_count||0)} coefficient(s) and ${C(R.linear_ignored_intercept_count||0)} intercept(s) ignored`);s.push(Z({id:"EA-ONX-0039",category:"integrity",title:"ONNX-ML linear model carries parameters ignored by the pinned ORT kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Bu.length)} affected node(s); ${C(ce.exact_linear_unused_coefficient_count||0)} unused coefficient(s); ${C(ce.exact_linear_ignored_intercept_count||0)} ignored intercept(s)`,observation:`${z.join("; ")}${Bu.length>z.length?`; plus ${C(Bu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned kernel consumes only targets/classes multiplied by feature count coefficients, ignores trailing coefficients, and ignores a LinearRegressor intercept vector unless its length exactly equals targets. The artifact therefore contains serialized model state that does not affect the selected runtime result.",recommendation:"Regenerate the node with exact coefficient and intercept cardinalities, compare outputs with the training pipeline, and reject unexplained dead parameters from signed release artifacts.",relevance:"parameter conservation; exporter correctness; hidden dead state"}))}if(Du.length){let z=Du.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0040",category:"runtime_compatibility",title:"ONNX-ML LinearRegressor dtype is schema-valid but lacks a pinned ORT CPU compute path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Du.length)} affected LinearRegressor node(s)`,observation:`${z.join("; ")}${Du.length>z.length?`; plus ${C(Du.length-z.length)} more in structured evidence`:""}.`,interpretation:"LinearRegressor-1 permits FLOAT64, INT32, and INT64 in the pinned ONNX schema, but the pinned ORT CPU compute implementation executes only FLOAT32 and returns an unsupported-input error for the other schema-valid types.",recommendation:"Convert the input contract to FLOAT32 or bind measured assignment and successful execution evidence from another selected provider before release.",relevance:"schema/runtime gap; execution-provider compatibility; deterministic CPU failure"}))}if(Mu.length){let z=Mu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name} ${R.linear_post_transform||"unresolved"}: ${(R.risk_codes||[]).filter(Ke=>Ke.includes("post_transform")||Ke.includes("probit")).join("/")}`);s.push(Z({id:"EA-ONX-0042",category:"numerical_integrity",title:"ONNX-ML linear post-transform has a pinned ORT semantic gap or unsafe branch",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Mu.length)} affected linear-model node(s)`,observation:`${z.join("; ")}${Mu.length>z.length?`; plus ${C(Mu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned source inspection proves one of the following: a single-score transform is a no-op, binary complement expansion bypasses the requested non-PROBIT transform, binary PROBIT does not populate the added second-class score slot, or regressor PROBIT can produce non-finite values outside its mathematical input domain.",recommendation:"Do not infer probabilities from the operator name alone. Replace the hazardous transform or make it explicit outside the node, compare exact score tensors with a pinned native ORT fixture, and document whether consumers expect raw margins or transformed values.",relevance:"score semantics; probability contract; numerical safety"}))}if($u.length){let z=$u.slice(0,8).map(R=>`#${te(R.node_index)} multi_class=${R.linear_multi_class_value||"unresolved"}`);s.push(Z({id:"EA-ONX-0043",category:"integration_verification",title:"ONNX-ML LinearClassifier multi_class intent is ignored by the pinned ORT CPU implementation",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C($u.length)} affected LinearClassifier node(s)`,observation:`${z.join("; ")}${$u.length>z.length?`; plus ${C($u.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned constructor parses and stores multi_class, but the selected CPU compute path does not consult it. A nonzero serialized value therefore communicates model intent without changing execution.",recommendation:"Remove reliance on multi_class for runtime behavior, validate the exact multiclass score and label contract against training-time reference outputs, and pin that parity fixture to the deployment runtime.",relevance:"ignored operator intent; multiclass semantics; runtime parity"}))}if(Lu.length){let z=Lu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.linear_duplicate_label_count||0)} duplicate label value(s)`);s.push(Z({id:"EA-ONX-0044",category:"output_contract",title:"ONNX-ML LinearClassifier contains duplicate class labels",evidence:"OBSERVED/DERIVED",priority:"Medium",op:`${C(Lu.length)} affected LinearClassifier node(s)`,observation:`${z.join("; ")}${Lu.length>z.length?`; plus ${C(Lu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Multiple score columns map to the same externally visible label. Argmax can still select an index, but downstream consumers cannot reconstruct a unique class identity from the emitted label value.",recommendation:"Make every serialized class label unique, regenerate the classifier, and verify label-map order together with score-column order in the application contract.",relevance:"label identity; output decoding; class-map integrity"}))}if(Pu.length){let z=Pu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${C(R.linear_non_finite_parameter_count||0)} non-finite parameter(s), ${C(R.linear_reference_non_finite_raw_score_count||0)} non-finite reference score(s), ${C(R.linear_reference_decision_boundary_count||0)} exact zero-margin decision(s)`);s.push(Z({id:"EA-ONX-0045",category:"numerical_integrity",title:"ONNX-ML linear model has non-finite arithmetic or a reference decision-boundary instability",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(Pu.length)} affected linear-model node(s)`,observation:`${z.join("; ")}${Pu.length>z.length?`; plus ${C(Pu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Non-finite coefficients, intercepts, inputs, or derived scalar reference scores invalidate ordinary ranking semantics. For binary classifiers, an exact zero raw margin also sits on the pinned greater-than-zero decision boundary, where small accumulation-order differences can change the emitted label.",recommendation:"Reject non-finite model state, inspect zero-margin fixtures as numerical boundary cases, and compare pinned native ORT outputs across intended CPU feature profiles before release.",relevance:"numerical integrity; decision stability; microkernel accumulation sensitivity"}))}if(Cu.length){let z=Cu.slice(0,8).map(R=>`#${te(R.node_index)} v${R.resolved_schema_version} ${R.input_dtype}->${R.output_dtype}`);s.push(Z({id:"EA-ONX-0046",category:"runtime_compatibility",title:"ONNX-ML LabelEncoder dtype pair lacks a pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Cu.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${Cu.length>z.length?`; plus ${C(Cu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The versioned ONNX schema accepts the serialized input/output element types, but the pinned ORT CPU registration does not provide that exact typed pair. Static shape remains valid while CPU kernel resolution is not.",recommendation:"Use a dtype pair present in the pinned CPU registration ledger or bind measured assignment and successful execution from the selected deployment provider before release.",relevance:"schema/runtime compatibility; execution-provider resolution; categorical preprocessing"}))}if(ku.length){let z=ku.slice(0,8).map(R=>`#${te(R.node_index)} v${R.resolved_schema_version}: ${C(R.label_encoder_duplicate_key_count||0)} duplicate(s), ${C(R.label_encoder_schema_runtime_mismatch_count||0)} artifact-known mismatch(es)`);s.push(Z({id:"EA-ONX-0047",category:"integrity",title:"ONNX-ML LabelEncoder duplicate keys have versioned or runtime-dependent ownership",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(ku.length)} affected LabelEncoder node(s); ${C(ce.exact_label_encoder_duplicate_key_hit_count||0)} exact duplicate-key hit(s)`,observation:`${z.join("; ")}${ku.length>z.length?`; plus ${C(ku.length-z.length)} more in structured evidence`:""}.`,interpretation:"LabelEncoder-4 specifies that the last repeated key wins, while the pinned ORT CPU implementation inserts with emplace and retains the first value. Version 1 string classes also resolve repeated labels to the final index in the pinned runtime without an equally explicit schema rule. When artifact-known inputs reach the duplicated key, DEEPBOM reports both outputs and suppresses exact downstream value propagation.",recommendation:"Remove duplicate keys, preserve the intended unique mapping order, and compare the repaired node against both the pinned ONNX reference semantics and native ORT before release.",relevance:"deterministic output divergence; label identity; exporter integrity"}))}if(Su.length){let z=Su.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.label_encoder_nan_key_count||0)} NaN key(s)`);s.push(Z({id:"EA-ONX-0048",category:"runtime_compatibility",title:"LabelEncoder-2 NaN lookup contract differs from the pinned ORT CPU equality path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Su.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${Su.length>z.length?`; plus ${C(Su.length-z.length)} more in structured evidence`:""}.`,interpretation:"The version 2 ONNX documentation promises bitwise float-key comparison so a NaN key can be mapped. The pinned ORT version 2 implementation uses its ordinary float hash/equality map, where NaN lookup does not match; version 4 introduces explicit NaN-aware equality. This is a source-backed cross-version semantic gap.",recommendation:"Do not use NaN as a LabelEncoder-2 key. Upgrade to a reviewed version 4 mapping or replace NaN before lookup, then require native ORT parity for the exact fixture.",relevance:"NaN semantics; version migration; preprocessing parity"}))}if(Tu.length){let z=Tu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.label_encoder_exact_default_count||0)} / ${C(R.label_encoder_exact_input_value_count||0)} exact input(s) -> ${R.label_encoder_default_value}`);s.push(Z({id:"EA-ONX-0049",category:"input_contract",title:"ONNX-ML LabelEncoder artifact-known inputs reach the default mapping path",evidence:"OBSERVED/DERIVED",priority:"Medium",op:`${C(Tu.length)} affected LabelEncoder node(s); ${C(ce.exact_label_encoder_default_count||0)} defaulted value(s)`,observation:`${z.join("; ")}${Tu.length>z.length?`; plus ${C(Tu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Exact artifact-known input values are absent from the serialized key set and therefore emit the active default. That behavior may be intentional unknown-category handling, but it is a concrete preprocessing event rather than an untested possibility.",recommendation:"Confirm that the default value is reserved and documented, verify downstream handling, and add representative unknown-category fixtures to the release contract.",relevance:"unknown-category policy; preprocessing contract; downstream interpretation"}))}if(zu.length){let z=zu.slice(0,8).map(R=>`#${te(R.node_index)} key/value non-finite ${C(R.label_encoder_non_finite_key_count||0)} / ${C(R.label_encoder_non_finite_value_count||0)}`);s.push(Z({id:"EA-ONX-0050",category:"numerical_integrity",title:"ONNX-ML LabelEncoder mapping contains non-finite numeric state",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(zu.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${zu.length>z.length?`; plus ${C(zu.length-z.length)} more in structured evidence`:""}.`,interpretation:"NaN or infinity is serialized as a key, mapped value, or default. Equality and downstream numerical behavior are version-sensitive, and a non-finite emitted value can invalidate ordinary feature or label interpretation.",recommendation:"Replace non-finite mapping state with explicit finite sentinel categories, document the conversion, and require exact schema/reference/runtime parity before release.",relevance:"numerical integrity; category identity; downstream safety"}))}if(Ou.length){let z=Ou.slice(0,8).map(R=>`#${te(R.node_index)} v${R.resolved_schema_version}: ${C(R.label_encoder_key_count||0)} key(s) / ${C(R.label_encoder_value_count||0)} value(s)`);s.push(Z({id:"EA-ONX-0051",category:"runtime_compatibility",title:"ONNX-ML LabelEncoder violates the pinned ORT key/value cardinality contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Ou.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${Ou.length>z.length?`; plus ${C(Ou.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized LabelEncoder version does not require equal key/value counts at ONNX schema inference time, but the pinned ORT CPU constructor rejects the mismatch before execution. The ONNX-derived output shape and type remain valid; executable CPU behavior does not.",recommendation:"Emit exactly one value for every key, rerun the pinned ONNX/ORT parity fixture, and reject the artifact until the runtime contract passes.",relevance:"deterministic runtime failure; exporter integrity; categorical preprocessing"}))}if(qu.length){let z=qu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.svm_pinned_ort_contract_reason||"pinned ORT runtime contract failure"}`);s.push(Z({id:"EA-ONX-0052",category:"runtime_compatibility",title:"ONNX-ML SVM violates the pinned ORT CPU executable contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(qu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${qu.length>z.length?`; plus ${C(qu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The artifact cannot execute on the pinned ORT CPU path because its constructor/runtime parameter layout is invalid. This includes the source-proven case where ONNX permits kernel_params to be omitted but the pinned ORT constructor still requires the attribute to exist, as well as invalid vector, feature, coefficient, support-vector, rho, or probability cardinalities.",recommendation:"Repair the exact row-level contract reason, preserve an explicit empty or three-value kernel_params attribute as required by the pinned runtime, and require a successful serialized native ORT fixture before release.",relevance:"deterministic runtime failure; ONNX/ORT contract gap; release blocking"}))}if(ju.length){let z=ju.slice(0,8).map(R=>`#${te(R.node_index)} classes=${C(R.svm_class_label_count||0)}, ONNX width=${C(R.svm_schema_score_width||0)}, pinned ORT width=${C(R.svm_pinned_ort_score_width||0)}`);s.push(Z({id:"EA-ONX-0053",category:"integrity",title:"SVMClassifier ONNX score shape conflicts with pinned ORT output width",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(ju.length)} affected SVMClassifier node(s)`,observation:`${z.join("; ")}${ju.length>z.length?`; plus ${C(ju.length-z.length)} more in structured evidence`:""}.`,interpretation:"For a multiclass SVC without probability parameters, the ONNX schema describes one score per class while the pinned ORT kernel emits pairwise decision scores. At four or more classes, C and C(C-1)/2 differ, so downstream shape propagation would be false and is deliberately suppressed.",recommendation:"Do not release against an inferred [N,C] score contract. Add probability parameters or normalize the score interface outside the node, then bind the repaired serialized model to native ORT output-shape and value parity tests.",relevance:"schema/runtime divergence; output ABI; deterministic shape conflict"}))}if(Fu.length){let z=Fu.slice(0,8).map(R=>`#${te(R.node_index)} SVMRegressor ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0054",category:"runtime_compatibility",title:"SVMRegressor dtype is schema-valid but lacks the pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Fu.length)} affected SVMRegressor node(s)`,observation:`${z.join("; ")}${Fu.length>z.length?`; plus ${C(Fu.length-z.length)} more in structured evidence`:""}.`,interpretation:"SVMRegressor-1 permits FLOAT64, INT32, and INT64 inputs in the pinned ONNX schema, but the pinned ORT CPU registration exposes only FLOAT32. Static output type and shape do not establish an executable CPU path.",recommendation:"Convert the input contract to FLOAT32 or attach observed successful assignment and execution evidence from the intended provider before deployment qualification.",relevance:"schema/runtime gap; execution-provider compatibility; deterministic CPU failure"}))}if(Qu.length){let z=Qu.slice(0,8).map(R=>`#${te(R.node_index)} post_transform=${R.svm_post_transform||"UNRESOLVED"}`);s.push(Z({id:"EA-ONX-0055",category:"integrity",title:"SVMRegressor post_transform is serialized but ignored by pinned ORT CPU",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Qu.length)} affected SVMRegressor node(s)`,observation:`${z.join("; ")}${Qu.length>z.length?`; plus ${C(Qu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned constructor stores post_transform, but its Compute path writes the raw regressor result without applying it. Consumers that interpret the output as LOGISTIC, SOFTMAX, SOFTMAX_ZERO, or PROBIT receive a different numerical contract from the serialized intent.",recommendation:"Use post_transform=NONE and apply an explicit reviewed transform outside SVMRegressor, or select a runtime with measured matching semantics and pin exact output fixtures.",relevance:"silent semantic divergence; output interpretation; runtime parity"}))}if(Uu.length){let z=Uu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: unused support/coeff/rho/prob=${C(R.svm_unused_support_vector_value_count||0)}/${C(R.svm_unused_coefficient_count||0)}/${C(R.svm_unused_rho_count||0)}/${C(R.svm_unused_probability_parameter_count||0)}, kernel=${R.svm_kernel_type||"UNRESOLVED"}`);s.push(Z({id:"EA-ONX-0056",category:"integrity",title:"ONNX-ML SVM carries ignored parameters or a kernel overridden by runtime mode",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Uu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${Uu.length>z.length?`; plus ${C(Uu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned kernel consumes only its source-defined layout, ignores trailing serialized values, and forces LINEAR behavior when the support-vector count selects linear mode. The signed artifact therefore contains state or kernel intent that does not affect execution.",recommendation:"Regenerate exact-cardinality attributes, make the selected linear/SVC mode explicit, remove dead state, and compare repaired outputs with the training-time model and pinned native runtime.",relevance:"parameter conservation; exporter correctness; hidden dead state"}))}if(Gu.length){let z=Gu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: non-finite parameter/reference=${C(R.svm_non_finite_parameter_count||0)}/${C(R.svm_reference_non_finite_score_count||0)}, boundary=${C(R.svm_reference_decision_boundary_count||0)}`);s.push(Z({id:"EA-ONX-0057",category:"integrity",title:"ONNX-ML SVM has non-finite arithmetic or a reference decision-boundary case",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(Gu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${Gu.length>z.length?`; plus ${C(Gu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Non-finite parameters or scalar reference scores invalidate ordinary margin/probability semantics. An exact zero decision value is also sensitive to the executed MLAS accumulation and platform transcendental path, which static source analysis does not observe.",recommendation:"Reject non-finite state and validate every boundary fixture on pinned runtime builds across intended CPU feature profiles before release.",relevance:"numerical integrity; decision stability; microkernel and libm sensitivity"}))}if(Vu.length){let z=Vu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${(R.risk_codes||[]).filter(Ke=>Ke.startsWith("svm_")&&!Ke.includes("runtime_contract")).join("/")}`);s.push(Z({id:"EA-ONX-0058",category:"integrity",title:"ONNX-ML SVM exposes a source-backed label, transform, or flag semantic hazard",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Vu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${Vu.length>z.length?`; plus ${C(Vu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned source proves an externally visible ambiguity or special branch: duplicate class labels, a second transform after SVC probability coupling, binary complement expansion, an unwritten PROBIT score slot, or a noncanonical one_class value treated as true.",recommendation:"Canonicalize labels and flags, remove implicit transform branches, and lock the complete label/score tensor contract with serialized native ORT parity fixtures.",relevance:"output ABI; classification semantics; deterministic runtime behavior"}))}if(Hu.length){let z=Hu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.tree_pinned_ort_contract_reason||R.tree_onnx_contract_reason||"pinned executable contract failure"}`);s.push(Z({id:"EA-ONX-0059",category:"runtime_compatibility",title:"ONNX-ML TreeEnsemble violates a pinned executable topology or parameter contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Hu.length)} affected TreeEnsemble node(s)`,observation:`${z.join("; ")}${Hu.length>z.length?`; plus ${C(Hu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized tree cannot be executed under the pinned ONNX/ORT contract because a required tensor or tuple cardinality, root, child, feature, node identity, cycle, class/target, weight, mode, aggregate, transform, rank, or dtype invariant fails. Output propagation is suppressed instead of treating an initializer default as a result.",recommendation:"Repair the exact row-level reason, require a zero-failure topology ledger, and run the serialized fixture through the pinned native ORT CPU build before release.",relevance:"deterministic runtime failure; tree topology integrity; release blocking"}))}if(Ku.length){let z=Ku.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0060",category:"runtime_compatibility",title:"TreeEnsemble dtype is schema-valid but lacks the pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Ku.length)} affected TreeEnsemble node(s)`,observation:`${z.join("; ")}${Ku.length>z.length?`; plus ${C(Ku.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned schema permits this input type, but the pinned CPU registration does not: generic TreeEnsemble-5 has no FLOAT16 CPU kernel and legacy TreeEnsembleRegressor has no INT32 or INT64 CPU kernel. A valid inferred output type does not establish an executable CPU path.",recommendation:"Convert to a pinned CPU-supported dtype or attach observed successful assignment and value-parity evidence from the intended execution provider before qualification.",relevance:"schema/runtime gap; execution-provider compatibility; session initialization"}))}if(Zu.length){let z=Zu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}-${C(R.resolved_schema_version||5)}`);s.push(Z({id:"EA-ONX-0061",category:"integration_verification",title:"Legacy TreeEnsemble operator remains serialized at the deprecation opset",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Zu.length)} deprecated legacy TreeEnsemble node(s)`,observation:`${z.join("; ")}${Zu.length>z.length?`; plus ${C(Zu.length-z.length)} more in structured evidence`:""}.`,interpretation:"TreeEnsembleClassifier and TreeEnsembleRegressor are deprecated at ai.onnx.ml opset 5 in favor of indexed TreeEnsemble-5. Existing runtime behavior can remain valid, but exporter and future-provider portability now depend on a legacy contract.",recommendation:"Plan a controlled conversion to TreeEnsemble-5 and bind pre/post conversion outputs, labels, aggregate mode, transform behavior, and missing-value paths to exact parity fixtures.",relevance:"operator lifecycle; exporter portability; runtime maintenance"}))}if(Xu.length){let z=Xu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: orphan ${C(R.tree_orphan_node_or_leaf_count||0)}, ignored nonleaf/single-target weights ${C(R.tree_ignored_nonleaf_weight_count||0)}/${C(R.tree_single_target_ignored_weight_count||0)}, multiple-parent nodes ${C(R.tree_multiple_parent_node_count||0)}`);s.push(Z({id:"EA-ONX-0062",category:"integrity",title:"TreeEnsemble contains unreachable, ignored, or non-tree serialized state",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Xu.length)} affected TreeEnsemble node(s); ${C(ce.exact_tree_ensemble_unused_weight_count||0)} unused weight(s); ${C(ce.exact_tree_ensemble_orphan_node_or_leaf_count||0)} orphan node/leaf record(s)`,observation:`${z.join("; ")}${Xu.length>z.length?`; plus ${C(Xu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned runtime semantics ignore weights attached to nonleaves and additional single-target leaf IDs; generic roots can also leave serialized nodes or leaves unreachable, while shared subtrees violate strict-tree ownership. The signed artifact therefore carries state that is dead or structurally surprising even when execution succeeds.",recommendation:"Regenerate a strict reachable forest with one parent per nonroot and only runtime-consumed leaf weights, then require exact weight conservation and output parity.",relevance:"parameter conservation; exporter integrity; hidden dead state"}))}if(Wu.length){let z=Wu.slice(0,8).map(R=>`#${te(R.node_index)} MEMBER values/duplicates/separators ${C(R.tree_membership_value_count||0)}/${C(R.tree_membership_duplicate_value_count||0)}/${C(R.tree_membership_separator_count||0)}: ${(R.risk_codes||[]).filter(Ke=>Ke.includes("membership")||Ke.includes("zero_member")).join("/")}`);s.push(Z({id:"EA-ONX-0063",category:"integration_verification",title:"TreeEnsemble-5 MEMBER set has duplicate values or a pinned reference/runtime divergence",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Wu.length)} affected TreeEnsemble-5 node(s); ${C(ce.exact_tree_ensemble_membership_duplicate_value_count||0)} duplicate member value(s)`,observation:`${z.join("; ")}${Wu.length>z.length?`; plus ${C(Wu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Duplicate MEMBER values add no branch information, and a zero member exposes a source-pinned divergence: ORT tests membership correctly while the pinned ONNX Python reference parser terminates its set loop on zero. Static path selection follows the selected ORT semantics and records the reference disagreement.",recommendation:"Deduplicate every membership set, avoid zero until the reference path is fixed or explicitly waive the divergence, and pin branch outcomes for zero, NaN, present, and absent members in native ORT fixtures.",relevance:"branch semantics; reference/runtime parity; test portability"}))}if(Yu.length){let z=Yu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${(R.risk_codes||[]).filter(Ke=>Ke.startsWith("tree_")).join("/")}`);s.push(Z({id:"EA-ONX-0064",category:"integrity",title:"TreeEnsemble exposes a source-backed label, base-value, transform, or binary-score hazard",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Yu.length)} affected TreeEnsemble node(s); ${C(ce.exact_tree_ensemble_reference_unwritten_score_count||0)} unwritten reference score slot(s)`,observation:`${z.join("; ")}${Yu.length>z.length?`; plus ${C(Yu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned source proves an externally visible special branch: duplicate labels, INT64 binary index semantics, underspecified one-base-value handling, a single-target transform that becomes a no-op, or a binary transform path that leaves a score slot unwritten. The operator name alone is insufficient to infer the application score contract.",recommendation:"Canonicalize labels and base values, remove implicit no-op/unwritten transform cases, and bind every label plus complete score tensor to serialized native ORT parity fixtures.",relevance:"output ABI; classification semantics; deterministic runtime behavior"}))}if(Ju.length){let z=Ju.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: non-finite parameter/reference ${C(R.tree_non_finite_parameter_count||0)}/${C(R.tree_reference_non_finite_score_count||0)}, boundary ${C(R.tree_reference_decision_boundary_count||0)}`);s.push(Z({id:"EA-ONX-0065",category:"integrity",title:"TreeEnsemble has non-finite arithmetic or an exact reference decision-boundary case",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(Ju.length)} affected TreeEnsemble node(s)`,observation:`${z.join("; ")}${Ju.length>z.length?`; plus ${C(Ju.length-z.length)} more in structured evidence`:""}.`,interpretation:"Non-finite thresholds, weights, inputs, or scalar reference scores invalidate ordinary comparison and ranking semantics. An exact zero classifier decision also lies on a branch where runtime floating reduction order can change the selected label; the report therefore does not claim runtime-bit-exact scores.",recommendation:"Reject non-finite state and execute every boundary fixture on pinned runtime builds across intended CPU feature profiles and execution providers before release.",relevance:"numerical integrity; decision stability; runtime reduction sensitivity"}))}if(e_.length){let z=e_.slice(0,8).map(R=>`#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"TfIdfVectorizer contract failure"}`);s.push(Z({id:"EA-ONX-0066",category:"runtime_compatibility",title:"TfIdfVectorizer violates a pinned schema or ORT CPU execution contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(e_.length)} invalid TfIdfVectorizer node(s)`,observation:`${z.join("; ")}${e_.length>z.length?`; plus ${C(e_.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized mode, gram bounds, skip count, pool type, level boundaries, whole-n-gram divisibility, definition/index/weight cardinality, output coordinate, duplicate active n-gram, input rank, or dtype cannot satisfy the pinned executable contract. Static output propagation is suppressed.",recommendation:"Regenerate the vectorizer with one type-matched nonempty pool, monotone in-bounds ngram_counts, one index and optional finite weight per n-gram, unique active n-grams, and a rank-one or positive-batch rank-two input; require native ORT parity before release.",relevance:"deterministic runtime failure; text feature ABI; release blocking"}))}if(t_.length){let z=t_.slice(0,8).map(R=>`#${te(R.node_index)} ${R.mode}: ${C(R.exact_weight_coordinate_value_disagreement_count||0)} value disagreement(s) across ${C(R.exact_weight_coordinate_disagreement_count||0)} remapped n-gram(s)`);s.push(Z({id:"EA-ONX-0067",category:"integrity",title:"TfIdfVectorizer weight mapping differs between ONNX prose and pinned executable sources",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(t_.length)} affected weighted vectorizer node(s)`,observation:`${z.join("; ")}${t_.length>z.length?`; plus ${C(t_.length-z.length)} more in structured evidence`:""}.`,interpretation:"The ONNX schema text associates weights[i] with pool n-gram i, while both the pinned ONNX reference implementation and ORT CPU kernel read weights[ngram_indexes[i]]. A non-identity remap with unequal values therefore changes the feature vector relative to the prose contract.",recommendation:"Canonicalize ngram_indexes to identity order or reorder weights so pool-index and output-coordinate interpretations are numerically identical, then bind exact vectors from the intended runtime.",relevance:"feature semantics; reference contract divergence; model portability"}))}if(n_.length){let z=n_.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.exact_ort_reference_divergent_output_count||0)} / ${C(R.exact_output_value_count||0)} output value(s)`);s.push(Z({id:"EA-ONX-0068",category:"numerical_behavior",title:"TfIdfVectorizer ORT repeated FLOAT32 weighting differs from ONNX reference arithmetic",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(n_.length)} exact static node(s)`,observation:`${z.join("; ")}${n_.length>z.length?`; plus ${C(n_.length-z.length)} more in structured evidence`:""}.`,interpretation:"For weighted TFIDF, ORT adds the FLOAT32 weight once per hit, while the ONNX Python reference multiplies the final integer frequency by the weight and casts once. Repeated rounding can produce different finite FLOAT32 outputs even with identical matches.",recommendation:"Use the intended runtime as the feature-vector authority, retain the exact divergent coordinates as a regression fixture, and avoid assuming ONNX reference bit parity for repeated weighted terms.",relevance:"numerical ABI; runtime/reference parity; downstream classifier inputs"}))}if(i_.length){let z=i_.slice(0,8).map(R=>`#${te(R.node_index)}: ${(R.risk_codes||[]).filter(Ke=>Ke.includes("pool_prefix")||Ke.includes("duplicate_ngram")||Ke.includes("share_output")).join("/")}`);s.push(Z({id:"EA-ONX-0069",category:"integration_verification",title:"TfIdfVectorizer contains ignored, duplicate, or coordinate-aliased feature state",evidence:"OBSERVED/DERIVED",priority:"Medium",op:`${C(i_.length)} noncanonical vectorizer node(s)`,observation:`${z.join("; ")}${i_.length>z.length?`; plus ${C(i_.length-z.length)} more in structured evidence`:""}.`,interpretation:"A nonzero first ngram_counts offset leaves a pool prefix unread, duplicate inactive n-grams retain dead serialized state, and shared output coordinates merge distinct n-gram counts. These may execute but obscure feature ownership and converter intent.",recommendation:"Serialize a zero-based compact pool with unique n-grams and one output coordinate per feature unless aggregation is an explicitly tested application contract.",relevance:"feature ownership; dead state; exporter reproducibility"}))}if(Qg.length&&s.push(Z({id:"EA-ONX-0070",category:"evidence_completeness",title:"TfIdfVectorizer exact static execution exceeds the emitted analysis bound",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Informational",op:`${C(Qg.length)} bounded residual node(s)`,observation:Qg.slice(0,8).map(z=>`#${te(z.node_index)} ${z.static_execution_status}; work ${C(z.exact_static_work_units??0)}; output width ${C(z.exact_output_width??0)}`).join("; "),interpretation:"The artifact contract and output shape remain deterministic, but materializing every static output or enumerating every bounded skip path would exceed the declared browser work limit. No synthetic zero vector is emitted.",recommendation:"Run the pinned native fixture or raise the audited bound in a controlled build with memory and denial-of-service tests; keep the result partial until complete arithmetic is independently reconstructed.",relevance:"evidence completeness; bounded analysis; denial-of-service resistance"})),ue.length){let z=ue.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name} ${R.tensor_name} ${R.field}: declared ${R.declared}, inferred ${R.inferred}`);s.push(Z({id:"EA-ONX-0006",category:"integrity",title:"ONNX declared tensor contract contradicts deterministic shape inference",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(ue.length)} declared/inferred conflict(s)`,observation:`${z.join("; ")}${ue.length>z.length?`; plus ${C(ue.length-z.length)} more in structured evidence`:""}.`,interpretation:"The artifact declares a dtype, rank, or concrete dimension that contradicts a deterministic local rule under the imported graph contract. The analyzer preserves the artifact declaration and does not replace it with the inferred value. Downstream MAC, payload, liveness, and runtime compatibility conclusions that depend on the disputed tensor are not trustworthy until the artifact is repaired.",recommendation:"Reject the artifact for release, run the pinned ONNX checker and reference shape inference, correct the exporter or stale value_info/output declaration, regenerate the model, and require a zero-conflict DeepBOM report before runtime qualification.",relevance:"artifact integrity; shape contract; downstream metric validity"}))}if(xt.length){let z=xt.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.reason}`);s.push(Z({id:"EA-ONX-0071",category:"integrity",title:"ONNX operator contract is deterministically invalid",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(xt.length)} semantic contract conflict(s)`,observation:`${z.join("; ")}${xt.length>z.length?`; plus ${C(xt.length-z.length)} more in structured evidence`:""}.`,interpretation:"Artifact-known shapes, controls, or attributes violate the pinned operator contract. This is not missing analysis or an unknown runtime dimension. The invalid output and every dependent node are causally blocked, so downstream arithmetic, payload, liveness, and provider conclusions are not promoted.",recommendation:"Reject the artifact for release, repair the exporter or serialized control/shape contract, regenerate the model, and require zero semantic-contract conflicts before runtime qualification.",relevance:"artifact integrity; operator semantics; downstream metric validity"}))}if(he.length){let z=new Map;for(let Ke of he)for(let Ot of Ke.conditional_shape_contract?.variant_failures||[]){if(Ot?.status!=="invalid")continue;let zt=JSON.stringify({reason:Ot.reason||"conditional_shape_variant_invalid",conditions:Ot.conditions||[]});z.has(zt)||z.set(zt,{tensor:Ke,failure:Ot})}let R=[...z.values()].slice(0,8).map(({tensor:Ke,failure:Ot})=>{let zt=(Ot.conditions||[]).map(T1=>`${T1.key}=${T1.value}`).join(" & ")||"condition not named";return`T${C(Ke.index)} ${Ke.name||"unnamed"}: ${Ot.reason||"conditional shape variant invalid"} under ${zt}`});s.push(Z({id:"EA-ONX-0072",category:"integrity",title:"ONNX runtime branch has a deterministically invalid tensor contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(ne.conditionally_invalid_node_output_count||he.length)} conditionally invalid output(s); ${C(ne.conditional_invalid_variant_count||z.size)} invalid variant record(s)`,observation:`${R.join("; ")}${z.size>R.length?`; plus ${C(z.size-R.length)} more unique branch failure(s) in structured evidence`:""}.`,interpretation:"At least one finite, artifact-derived control-flow branch produces a tensor rank or dimension contract that a downstream pinned ONNX operator cannot accept. Viable branches are retained, but the model-wide MAC, payload, and liveness totals are not promoted through the invalid branch.",recommendation:"Constrain and serialize the external input contract so the invalid branch is unreachable, or repair the branch/operator graph. Re-run the pinned ONNX checker and require zero conditionally invalid outputs before release qualification.",relevance:"artifact integrity; conditional control flow; downstream metric validity"}))}if(He.length||st.length){let z=He.slice(0,8).map(Ot=>`#${te(Ot.node_index)} ${Ot.op_name} at opset ${Ot.imported_opset??"unresolved"}: ${(Ot.reason_codes||[]).join("/")||"formal schema failure"}`),R=st.slice(0,Math.max(0,8-z.length)).map(Ot=>`opset import #${Ot.index} ${Ot.domain}@${Ot.version}: ${(Ot.reason_codes||[]).join("/")||"invalid import"}`),Ke=He.length+st.length;s.push(Z({id:"EA-ONX-0007",category:"integrity",title:"ONNX opset import or node violates the pinned schema contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(st.length)} invalid OperatorSetIdProto import(s); ${C(He.length)} invalid NodeProto schema form(s)`,observation:`${[...R,...z].join("; ")}${Ke>R.length+z.length?`; plus ${C(Ke-R.length-z.length)} more in structured evidence`:""}.`,interpretation:"A domain import has no valid positive version, or the node's operator availability, formal input/output cardinality or omission, attribute name, required attribute, AttributeProto discriminator, or value-field type contradicts the greatest pinned ONNX schema version allowed by the model. Repeated valid imports are retained separately and resolved to the highest referenced version under the serialized ModelProto contract. Shape inference is suppressed only where the effective import or node form is invalid, so downstream size, MAC, liveness, and provider-precheck values cannot silently inherit unspecified semantics.",recommendation:"Reject the artifact for release, run the pinned ONNX checker, correct the exporter/opset declaration or node form, regenerate the model, and require zero OpSchema formal-contract failures before runtime qualification.",relevance:"artifact integrity; opset legality; downstream metric validity"}))}if(Xi.length||Ha.length||po.length){let z=Xi.slice(0,6).map(zt=>`${zt.function_id} at ${zt.scope}/#${te(zt.node_index)}: ${(zt.reason_codes||[]).join("/")||"call contract failed"}`),R=Ha.slice(0,Math.max(0,6-z.length)).map(zt=>`${zt.op_name} at ${zt.scope}/#${te(zt.node_index)}: ${(zt.reason_codes||[]).join("/")||"body inference failed"}`),Ke=po.slice(0,Math.max(0,6-z.length-R.length)).map(zt=>`SequenceMap at ${zt.scope}/#${te(zt.node_index)}: ${(zt.reason_codes||[]).join("/")||"body inference failed"}`),Ot=Xi.length+Ha.length+po.length;s.push(Z({id:"EA-ONX-0009",category:"integrity",title:"Reachable ONNX function or graph-body contract fails recursive shape inference",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Xi.length)} FunctionProto call failure(s); ${C(Ha.length)} If/Loop/Scan failure(s); ${C(po.length)} SequenceMap failure(s)`,observation:`${[...z,...R,...Ke].join("; ")}${Ot>z.length+R.length+Ke.length?`; plus ${C(Ot-z.length-R.length-Ke.length)} more in structured evidence`:""}.`,interpretation:"A reachable local-function binding, function/model opset contract, referenced attribute, branch/body cardinality, tensor or sequence type, SequenceMap length, or control-flow axis contract is invalid under the pinned ONNX semantics. The affected output is not inferred and downstream shape-dependent metrics remain invalid or incomplete.",recommendation:"Reject the artifact for release, run the same pinned ONNX checker/reference inferencer, repair the exporter function or graph-body contract, and require zero recursive-scope failures before runtime qualification.",relevance:"artifact integrity; local functions; control flow; sequence mapping; downstream metric validity"}))}if(Number(Re.reachable_exclusion_count||0)>0||Number(Re.reachable_scope_unresolved_output_count||0)>0||zo.length||Vr.length||Hr.length||Ep.length){let z=[...zo.map(R=>`${R.op_name} ${R.scope}/#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"runtime-dependent control"}`),...Vr.map(R=>`SequenceMap ${R.scope}/#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"runtime-dependent sequence"}`),...Hr.map(R=>`${R.scope}: ${(R.reason_codes||[]).join("/")||`${C(R.unresolved_output_count||0)} unresolved output(s)`}`),...Ep.map(R=>`${R.op_name||"ONNX-ML"} ${R.scope}/#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"runtime-dependent map cardinality"}`)].slice(0,8);s.push(Z({id:"EA-ONX-0008",category:"integration_verification",title:"Reachable ONNX shape scopes retain explicit static-analysis residuals",evidence:"OBSERVED/NOT_ASSESSABLE",priority:Number(ne.unknown_node_output_count||0)>0?"High":"Medium",op:`${C(Re.unassessed_reachable_node_count||0)} residual reachable node(s); ${C(zo.length)} partial control-flow node(s); ${C(Vr.length)} partial SequenceMap node(s); ${C(Hr.length)} partial recursive scope(s); ${C(Ep.length)} partial ONNX-ML value-contract node(s)`,observation:`${C(Re.executed_reachable_scope_count||0)} reachable scope(s) were recursively executed and ${C(Re.fully_assessed_reachable_scope_count||0)} were fully assessed; ${C(Re.unassessed_reachable_node_count||0)} unsupported, schema-invalid, or failed-rule node(s), ${C(Re.reachable_scope_unresolved_output_count||0)} unresolved scope output(s), and ${C(Ep.length)} runtime-cardinality ONNX-ML residual(s) remain.${z.length?` Residual examples: ${z.join("; ")}.`:""}`,interpretation:"The residual count is reconciled against exact structural inventory, recursive execution evidence, and source-pinned partial control-flow/container/map rows. Dynamic Loop control, SequenceMap length, ZipMap batch/feature cardinality, or dense CastMap input cardinality remains explicitly unresolved even when the surrounding TypeProto is known. Downstream shape, container-state, MAC, payload, liveness, and provider conclusions that depend on these residuals remain partial.",recommendation:"Inspect the named residual rows, add or repair the missing pinned operator/type rule, and retain pinned ONNX checker/reference inference plus ORT session evidence before promoting dependent metrics to complete.",relevance:"shape completeness; control flow; local functions; downstream metric validity"}))}let S1=Math.max(0,Number(ee.tensor_count||0)-Number(ee.verified_payload_count||0));(S1>0||Number(ee.payload_verification_failed_count||0)>0)&&s.push(Z({id:"EA-ONX-0004",category:"integrity",title:"ONNX external TensorProto payload coverage is incomplete",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"High",op:`${C(ee.tensor_count)} external TensorProto reference(s)`,observation:`${C(ee.entry_count)} external_data record(s); ${C(ee.verified_payload_count)} verified, ${C(ee.payload_verification_failed_count||0)} failed verification, ${C(S1)} incomplete, ${C(ee.malformed_reference_count)} malformed reference(s). Verified payload ${mn(ee.verified_payload_bytes||0)}; declared ${ee.declared_payload_bytes==null?"not fully declared":mn(ee.declared_payload_bytes)}.`,interpretation:"Graph structure is visible, but any unavailable range prevents complete constant-byte, decoded-value, duplicate-payload, weight-integrity, and quantization-contract conclusions.",recommendation:"Select every model-relative external_data sidecar, correct range/checksum failures, and retain the emitted sidecar SHA-256 plus tensor range ledger in the release manifest.",relevance:"artifact integrity; weight verification; reproducible packaging"})),Number($.external_custom_node_count||0)>0&&s.push(Z({id:"EA-ONX-0001",category:"integration_verification",title:"External ONNX custom-op registry is required",evidence:"DERIVED",priority:"High",op:($.external_custom_domains||[]).join(" / "),observation:`${C($.external_custom_node_count)} node(s) in ${($.external_custom_domains||[]).join(" / ")} are neither standard ONNX/ONNX-ML, pinned ORT contrib schemas, nor artifact-defined local functions.`,interpretation:"The artifact cannot be executed by a stock ORT build unless a matching custom-op library or execution provider registers these schemas and kernels.",recommendation:"Bind the custom-op registry/library version, source commit, binary SHA-256, supported target matrix, and an observed ORT assignment profile to the release.",relevance:"runtime integration; custom operator provenance"})),($.duplicate_function_ids||[]).length||($.recursive_function_cycles||[]).length?s.push(Z({id:"EA-ONX-0002",category:"integrity",title:"ONNX local function registry is ambiguous or recursive",evidence:"OBSERVED",priority:"High",op:"FunctionProto registry",observation:`${C(($.duplicate_function_ids||[]).length)} duplicate function ID(s); ${C(($.recursive_function_cycles||[]).length)} recursive dependency cycle(s).`,interpretation:"Static function resolution is not unique or terminates in a recursive cycle, so deterministic expansion and source-rule support assessment cannot be concluded.",recommendation:"Remove duplicate domain/name/overload definitions and recursive dependencies, then regenerate and validate the artifact with ONNX checker and the pinned deployment runtime.",relevance:"artifact integrity; deterministic runtime resolution"})):Number($.model_local_function_call_count||0)>0&&s.push(Z({id:"EA-ONX-0003",category:"integration_verification",title:"Model-local ONNX functions require observed runtime resolution",evidence:"DERIVED",priority:"Medium",op:`${C($.model_local_function_call_count)} local function call(s)`,observation:"FunctionProto definitions and dependencies are present in the artifact and are not external custom-op registry requirements; direct EP kernel rows do not prove how ORT inlines or assigns their bodies.",interpretation:"The function composition is structurally known, while graph optimization and execution-provider assignment remain runtime decisions.",recommendation:"Capture a graph-optimization-disabled ORT profile for original-node identity and a production-optimization profile for final EP assignment; retain both with runtime/build hashes.",relevance:"execution-provider assignment; runtime reproducibility",evidenceJsonPointers:e?.ort_compatibility_evidence?["/evidence/static_analysis/onnx_domain_analysis/functions","/evidence/static_analysis/ort_compatibility_evidence/execution_providers"]:["/evidence/static_analysis/onnx_domain_analysis/functions"]}));let o_=(e?.ort_compatibility_evidence?.execution_providers||[]).flatMap(z=>(z.ops||[]).filter(R=>R.definite_source_exclusion).map(R=>({ep:z.execution_provider,row:R})));if(o_.length){let z=o_.slice(0,8).map(({ep:R,row:Ke})=>{let Ot=(Ke.artifact_conditions||[]).filter(zt=>zt.status==="DEFINITE_FAIL");return`${R} #${te(Ke.op_index)} ${Ke.op_name}: ${Ot.map(zt=>`${zt.condition_id} (${zt.observed})`).join(" / ")||Ke.status}`});s.push(Z({id:"EA-ONX-0005",category:"execution_provider_compatibility",title:"Pinned ORT EP source conditions exclude artifact nodes",evidence:"DERIVED",priority:"Medium",op:`${C(o_.length)} node-provider exclusion(s)`,observation:`${z.join("; ")}${o_.length>z.length?`; plus ${C(o_.length-z.length)} more in raw evidence`:""}.`,interpretation:"The operator/schema version is registered, but an artifact-visible dtype, rank, constant-input, output-count, or explicit-attribute value contradicts a pinned source condition. This is a definite source-candidate exclusion, not an observed runtime assignment failure.",recommendation:"Review the exact condition ledger, select a compatible EP or artifact contract, and bind an optimization-disabled plus production ORT assignment profile before release.",relevance:"execution-provider compatibility; deployment planning; runtime verification"}))}}if(!u&&Number(e?.subgraphs||1)>1){let $=e?.tflite_subgraph_deep_analysis||{};s.push(Z({id:"EA-GRF-0001",category:"limitation",title:"Cross-subgraph execution aggregation requires runtime invocation counts",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"Medium",op:`${C($.assessed_subgraph_count||0)} of ${C(e.subgraphs)} subgraphs independently assessed`,observation:`${C(e.subgraphs)} serialized subgraphs are inventoried and ${C($.assessed_subgraph_count||0)} receive independent per-op MAC, liveness, ArenaPlanner, quantization, weight-integrity, fixed-point, and source-pinned XNNPACK candidate ledgers. Those local rows are intentionally not summed across control flow.`,interpretation:"IF branches are conditional and WHILE, reduce, scatter, or initialization computations can execute zero, one, or multiple times. Serialized nested-op counts therefore cannot be promoted to complete whole-model execution totals without invocation evidence.",recommendation:"Use each emitted subgraph row for local review and import observed invocation counts and runtime placement before computing a whole-execution cost, arena, delegation, or latency total.",relevance:"analysis coverage; control-flow integrity; deployment verification"}))}if((e?.format||"tflite")==="tflite"&&!x){let $=e?.runtime_compat||{},ee=$.derived_min_runtime_version||"not determined",ne=$.runtime_floor_status==="complete_for_observed_builtin_op_versions";s.push(Z({id:"EA-RUN-0001",category:"integration_verification",title:"Bundled runtime version was not provided",evidence:"NOT_ASSESSABLE",priority:"Medium",op:"Runtime",observation:`Observed mapped-op necessary floor ${ee}; builtin op-version map coverage ${C($.mapped_operator_code_count||0)}/${C($.builtin_operator_code_count||0)} (${$.runtime_floor_status||"coverage status not emitted"}); declared min_runtime_version ${$.min_runtime_version||"not embedded"}; highest observed operator version ${$.max_op_version||1}; deployed LiteRT/TFLite runtime build not provided.`,interpretation:ne?"Every observed builtin op code/version is covered by the pinned necessary-floor map, but compatibility of the application bundle still cannot be concluded without the exact runtime version and build flags.":"The emitted number is only a partial necessary floor for mapped builtin op versions. Unmapped op versions and the absent application runtime prevent an effective compatibility conclusion.",recommendation:"Record the exact LiteRT/TFLite runtime build and build flags, resolve every unmapped builtin op version, and execute the artifact on that binary before claiming compatibility.",relevance:"integration verification; deployment reproducibility"}))}let S=e?.weight_integrity||{};if(Number(S.zero_kernel_slice_count||0)>0){let $=Array.isArray(S.zero_kernel_slice_details)?S.zero_kernel_slice_details:[],ee=$.filter(de=>["INT8","UINT8"].includes(String(de.dtype||"").toUpperCase())),ne=$.length>0&&ee.length===$.length,ge=new Map((e?.channel_vitality?.ops||[]).map(de=>[Number(de.op_index),de])),le=[];for(let de of $){let Xi=new Set((de.exact_zero_channels||[]).map(Number)),Ha=(de.consumer_ops||[]).map(po=>Number(String(po).match(/^#(\d+)/)?.[1])).filter(Number.isInteger);for(let po of Ha){let zo=ge.get(po);if(!zo||zo.assessment_status!=="assessed")continue;let Vr=new Set((zo.default_constant_channel_indices||[]).map(Number)),Hr=new Set((zo.single_constant_channel_indices||[]).map(Number));for(let Wi of Xi){if(!Vr.has(Wi)||!Hr.has(Wi))continue;let pn=(de.channels||[]).findIndex(Kr=>Number(Kr)===Wi);le.push({tensorIndex:de.tensor_index,opIndex:po,channel:Wi,biasCode:pn>=0?de.bias_code_sample?.[pn]:null,biasUtilization:pn>=0?de.bias_int32_utilization_sample?.[pn]:null})}}}let ue=$.length?$.slice(0,4).map(de=>{let Xi=(de.channels||[]).slice(0,16).join(", "),Ha=(de.exact_zero_channels||[]).slice(0,16).join(", "),po=(de.scale_sample||[]).slice(0,3).map(pn=>Number(pn).toExponential(3)).join(", ")||"-",zo=(de.zero_point_sample||[]).slice(0,3).join(", ")||"-",Vr=de.bias_tensor_name?`${de.bias_tensor_name} ${de.bias_dtype||""}; real bias sample ${(de.bias_value_sample||[]).slice(0,3).map(pn=>Number(pn).toExponential(3)).join(", ")||"not decoded"}; raw code sample ${(de.bias_code_sample||[]).slice(0,3).map(pn=>C(pn)).join(", ")||"not decoded"}; INT32 use ${(de.bias_int32_utilization_sample||[]).slice(0,3).map(pn=>nn(pn)).join(", ")||"not assessed"}`:"bias not decoded",Hr=["INT8","UINT8"].includes(String(de.dtype||"").toUpperCase())?`; scale/zp ${po}/${zo}`:"",Wi=de.zero_slice_arithmetic_share==null?"":`; zero-slice arithmetic proxy ${nn(de.zero_slice_arithmetic_share)}`;return`${de.tensor_name||`T${de.tensor_index}`} ${de.dtype||""} ${(de.shape||de.tensor_shape||[]).join("x")||"shape unknown"}: near-zero decoded slice channel(s) ${Xi}${Number(de.channel_count||0)>16?", ...":""}; exact-zero stored subset ${Ha||"none"}${Hr}; ${Vr}; consumers ${(de.consumer_ops||[]).join(" / ")||"-"}${Wi}`}).join(" | "):`${C(S.zero_kernel_slice_count||0)} near-zero decoded kernel slice(s), including ${C(S.exact_zero_kernel_slice_count||0)} exact-zero stored slice(s), across ${C(S.zero_kernel_slice_tensors||0)} tensor(s)`,xt=$.filter(de=>de.zero_slice_arithmetic_share!=null),he=xt.reduce((de,Xi)=>de+Number(Xi.zero_slice_arithmetic_share),0),He=$.reduce((de,Xi)=>de+Number(Xi.consumer_mac_percent||0),0),st=ne?"after applying artifact quantization scale/zero-point metadata":"in decoded stored-value space",Re=xt.length?` Static zero-slice arithmetic-waste proxy ${nn(he)} of assessed model MACs (direct-consumer MACs x flagged output slices / kernel output channels; not latency or accuracy impact).`:` Direct-consumer MAC share upper bound ${nn(He)} (triage scope only; not zero-slice arithmetic, latency, or accuracy impact).`;s.push(Z({id:"EA-WGT-0001",category:"numerical_structure_review",title:le.length?"Exact-zero kernel slices converge with constant-output channel proof":"Near-zero decoded kernel slices require functional review",evidence:le.length?"DERIVED":"OBSERVED",priority:le.length?"High":Number(S.exact_zero_kernel_slice_count||0)?"Medium":"Informational",op:$.flatMap(de=>de.consumer_ops||[]).slice(0,4).join(", ")||"constant tensor",tensor:$.slice(0,4).map(de=>de.tensor_name||`T${de.tensor_index}`).join(", ")||"-",observation:`${C(S.zero_kernel_slice_count||0)} decoded kernel output slice(s) are near-zero ${st}; ${C(S.exact_zero_kernel_slice_count||0)} are exact-zero in stored centered-code space. ${ue}.${Re}${le.length?` Cross-ledger join proves ${C(le.length)} exact-zero coordinate(s) also emit one constant output code under both pinned fixed-point paths: ${le.slice(0,12).map(de=>`T${de.tensorIndex}/#${te(de.opIndex)}/ch${de.channel}${de.biasCode==null?"":` bias ${C(de.biasCode)} (${nn(de.biasUtilization)} INT32)`}`).join(", ")}.`:""}`,interpretation:le.length?"The listed coordinates are exact local constant-output channels under both pinned TFLite fixed-point paths, not merely low-norm or scale-spread heuristics. This still does not prove the declared model outputs or task metric are invariant because downstream graph paths and representative inputs remain separate evidence.":"Functional channel inactivity is NOT_ASSESSABLE from kernel weights alone because bias, fused activation, residual paths, downstream consumers, and task behavior can still carry or transform signal.",recommendation:le.length?"Treat the convergent coordinates as a high-priority export defect review: compare against the source checkpoint/QAT graph, inspect raw INT32 bias generation, re-export, and run representative plus adversarial output regression before release.":"Classify as a defect only when kernel slice exact-zero, channel-output proof, downstream effect, and representative-output regression are joined. Until then, review bias values, fused activation, residual/downstream consumers, converter lineage, and representative regression.",relevance:ne?"quantized weight structure; numerical structure review":"weight numerical structure review",findingClass:le.length?"exact cross-ledger numerical proof":"",evidenceJsonPointers:["/evidence/static_analysis/weight_integrity/zero_kernel_slice_details",...le.length?["/evidence/static_analysis/channel_vitality/ops"]:[]]}))}(Number(S.low_grid_utilization_tensors||0)>0||Number(S.saturated_quantized_tensors||0)>0)&&s.push(Z({id:"EA-QNT-0100",category:"quantization_calibration_review",title:"Quantized constant grid utilization requires calibration review",evidence:"HEURISTIC",priority:Number(S.saturated_quantized_tensors||0)>0?"High":"Medium",op:"constant tensors",observation:`${S.quant_grid_detail||`${C(S.low_grid_utilization_tensors||0)} low-utilization tensor(s), ${C(S.saturated_quantized_tensors||0)} saturated tensor(s).`} Alert threshold is HEURISTIC: <25% 8-bit level utilization for tensors with at least 256 elements, or >1% endpoint saturation.`,interpretation:"The utilization and saturation values are deterministically derived from artifact constants; the alert threshold is a methodology heuristic for calibration review, not a task-accuracy claim.",recommendation:"Review calibration/QAT histograms for the flagged constants and compare representative-output drift against a re-calibrated export.",relevance:"quantization calibration integrity",evidenceJsonPointers:[...Object.prototype.hasOwnProperty.call(S,"quant_grid_detail")?["/evidence/static_analysis/weight_integrity/quant_grid_detail"]:[],...Array.isArray(S.quant_grid_details)?["/evidence/static_analysis/weight_integrity/quant_grid_details"]:[]]}));let O=d?.representable_kernel_channels;if(Number(O?.flagged_channels||0)>0){let $=(O.details||[]).filter(ne=>Number(ne.flagged_channel_count||0)>0),ee=$.slice(0,6).map(ne=>{let ge=(ne.flagged_channels||[]).slice(0,8),le=ge.length?Math.min(...ge.map(ue=>Number(ue.maximum_representable_abs))):0;return`${ne.tensor_name||`T${ne.tensor_index}`}: ${C(ne.flagged_channel_count)} channel(s), indices ${ge.map(ue=>ue.channel).join(", ")||"not emitted"}, minimum sampled max |real weight| ${Za(le)}, scale spread ${Za(ne.maximum_to_minimum_scale_ratio)}x`}).join(" | ");s.push(Z({id:"EA-QNT-0118",category:"quantization_design_review",title:"Near-zero representable kernel channels require QAT review",evidence:"HEURISTIC",priority:"Medium",op:$.flatMap(ne=>ne.consumer_ops||[]).slice(0,6).join(", ")||"quantized compute kernels",tensor:$.slice(0,6).map(ne=>ne.tensor_name||`T${ne.tensor_index}`).join(", "),observation:`${C(O.flagged_channels)} of ${C(O.assessed_channels)} assessed per-axis kernel channel(s) meet both review thresholds: maximum representable |real weight| <=${Za(O.maximum_representable_abs_threshold)} and scale outlier ratio >=${Za(O.scale_outlier_ratio_threshold)}x. ${ee}.`,interpretation:"The code-domain range and scale ratios are deterministic artifact-derived values. The thresholds are methodology heuristics: they identify numerically collapsed relative channels, but do not by themselves prove a dead activation channel, QAT failure, or task-accuracy loss because bias, fan-in, fused activation, residual paths, and downstream behavior remain unassessed.",recommendation:"Inspect the named QAT/calibration layer histograms, verify the matching bias-scale contract, and compare representative outputs against a re-export with repaired per-axis ranges before classifying the channel as functionally dead.",relevance:"per-axis quantization range integrity; QAT calibration review",evidenceJsonPointers:fh["EA-QNT-0118"]}))}let k=(d?.input_quantization_convention?.details||[]).filter($=>$.status==="no_common_full_domain_match");if(k.length){let $=k.slice(0,4).map(ee=>{let ne=ee.closest_convention;return`Input ${ee.ordinal} ${ee.dtype} scale ${Number(ee.scale).toExponential(5)}, zp ${ee.zero_point}, exact full-code range [${ee.real_range.map(ge=>Number(ge).toExponential(5)).join(", ")}]; closest ${ne?.label||"none"} endpoint error ${ne?Number(ne.maximum_endpoint_error).toExponential(5):"N/A"}`}).join(" | ");s.push(Z({id:"EA-QNT-0119",category:"integration_verification",title:"Input quantization range does not match a common full-domain preprocessing convention",evidence:"DERIVED_WITH_REFERENCE_HEURISTIC",priority:"Medium",op:`${C(k.length)} quantized model input(s)`,observation:`${$}. The real ranges are exactly reconstructed from artifact scale/zero-point metadata; the convention comparison uses a one-quantization-step endpoint tolerance.`,interpretation:"This does not prove that calibration or application preprocessing is wrong: a custom asymmetric range can be intentional. It does prove that [0,1], [-1,1], [0,255], and applicable signed-code identity conventions cannot explain the full declared code domain within the disclosed tolerance.",recommendation:"Bind the production decoder-to-tensor preprocessing specification and checksum, state the intended real input domain explicitly, and replay representative tensors to confirm that application quantization uses the artifact scale and zero-point.",relevance:"input numerical contract; calibration lineage; deployment reproducibility"}))}let D=eH(e);if(D.length&&Number(e?.per_channel_tensors||0)===0){let $=D.map(ne=>`#${te(ne.op.index)} ${ne.op.name}`).join(", "),ee=[...new Set(D.map(ne=>ne.weight?.name||`T${ne.op.inputs?.[1]}`))].join(", ");s.push(Z({id:"EA-QNT-0101",category:"quantization_design_review",title:"Depthwise convolution weights use per-tensor quantization",evidence:"DERIVED",priority:"Medium",op:$,tensor:ee,observation:`${C(D.length)} quantized DEPTHWISE_CONV_2D op(s) use a single weight scale; per-channel tensors observed: ${C(e?.per_channel_tensors||0)}. Complete affected-op inventory: ${$}.`,interpretation:"Per-tensor depthwise weight quantization is a design-review signal for mobile CNNs because channel distributions are forced onto one shared scale; it is not a confirmed defect without representative accuracy or calibration evidence.",recommendation:"Prefer per-channel/per-axis weight quantization for depthwise kernels where the target runtime supports it. Escalate to High only when accuracy regression, calibration error, or a product requirement is present.",relevance:"quantization configuration; converter lineage"}))}let q=(d.bias_scale?.details||[]).filter($=>$.status==="fail"),L=(d.parameter_integrity?.details||[]).filter($=>$.status!=="pass");if(L.length){let $=L.filter(ne=>ne.status==="fail"),ee=$[0]||L[0];s.push(Z({id:"EA-QNT-0105",category:$.length?"integrity":"quantization",title:$.length?"ONNX quantization parameter contract is invalid":"ONNX quantization parameters could not be fully assessed",evidence:"DERIVED",priority:$.length?"High":"Medium",op:`#${te(ee.op_index)} ${ee.op_name}`,tensor:ee.tensor_name||"-",observation:`${C($.length)} invalid and ${C(L.length-$.length)} unresolved Q/DQ or QLinear parameter binding(s). Representative ${ee.role}: ${(ee.reasons||[ee.status]).join(", ")}.`,interpretation:$.length?"Embedded scale, zero-point, axis, dtype, or cardinality values violate the selected ONNX standard operator contract.":"The artifact references quantization parameters that are missing, external, unsupported, or not shape-resolvable in this browser-only input set.",recommendation:$.length?"Block release of this artifact until the ONNX quantization parameters are regenerated or independently corrected and output parity is verified.":"Supply the external initializer data or regenerate a self-contained artifact, then rerun the deterministic contract check.",relevance:"ONNX quantization numerical contract"}))}if(q.length){let $=q[0];s.push(Z({id:"EA-QNT-0102",category:"quantization",title:"Bias quantization scale does not match input-scale times weight-scale",evidence:"DERIVED",priority:"High",op:`#${te($.op_index)} ${$.op_name}`,tensor:`T${$.bias_tensor_index}`,observation:d.bias_scale.contract_kind==="onnx_implicit_qlinearconv_bias_scale"?`${C(q.length)} QLinearConv bias group(s) violate the INT32 dtype or output-channel cardinality contract. ${$.reasons?.join(", ")||"invalid signature"}.`:`${C(q.length)} bias tensor group(s) violate the TFLite bias-scale contract at relative tolerance ${d.bias_scale.relative_tolerance}; largest relative error ${nn($.maximum_relative_error)} (channel ${$.worst_channel?.channel}: actual=${Number($.worst_channel?.actual||0).toExponential(4)}, expected=${Number($.worst_channel?.expected||0).toExponential(4)}).`,interpretation:d.bias_scale.contract_kind==="onnx_implicit_qlinearconv_bias_scale"?"ONNX QLinearConv requires INT32 bias with one element per output channel; its real-value scale is implicitly x_scale times w_scale.":"For quantized TFLite conv/FC kernels, bias scale must match input_scale x weight_scale. A mismatch can silently change arithmetic meaning.",recommendation:d.bias_scale.contract_kind==="onnx_implicit_qlinearconv_bias_scale"?"Regenerate the QLinearConv node with an INT32 bias of exactly one element per output channel, then verify reference-output parity.":"Regenerate the artifact with a converter that preserves the TFLite bias quantization contract, or block release until runtime behavior is verified against reference outputs.",relevance:"quantization numerical contract"}))}let F=(d.residual_add?.details||[]).filter($=>$.status==="review").sort(($,ee)=>Number(ee.input_scale_ratio||0)-Number($.input_scale_ratio||0)||Number($.op_index||0)-Number(ee.op_index||0));if(F.length){let $=F[0];s.push(Z({id:"EA-QNT-0103",category:"quantization",title:"Residual ADD input scales require requantization review",evidence:"DERIVED",priority:$.input_scale_ratio>=8?"High":"Medium",op:`#${te($.op_index)} ADD`,observation:`${C(F.length)} ADD op(s) have input scale ratio >=${d.residual_add.review_threshold_ratio}. Largest ratio ${$.input_scale_ratio.toFixed(2)}x; input scales ${$.input_scales.map(ee=>ee.toExponential(4)).join(" / ")}; output scale ${$.output_scale==null?"none":$.output_scale.toExponential(4)}.${$.exhaustive_legal_code_pair_count==null?"":` Exhaustive legal-code geometry: ${C($.legal_domain_escape_pair_count)} / ${C($.exhaustive_legal_code_pair_count)} endpoint escapes; globally finest containment ${Number($.globally_finest_containment_scale_ratio).toFixed(3)}x scale with zero-point delta ${Number($.globally_finest_containment_zero_point_delta)>=0?"+":""}${$.globally_finest_containment_zero_point_delta} and ${C($.globally_finest_containment_clamp_pair_count)} projected clamps.`}`,interpretation:"Residual merges with widely different scales can force requantization and reduce precision on one branch. The containment design is exhaustive uniform legal-code geometry, not an observed activation or accuracy result.",recommendation:"Inspect QAT/calibration for the residual branch pair and compare representative outputs. Treat the emitted containment contract only as a re-export counterfactual; changing output quantization requires regenerating and validating downstream contracts rather than editing this tensor in isolation.",relevance:"quantized residual arithmetic"}))}let P=e?.quantization_lattice||null,X=new Map((P?.residual_adds||[]).map($=>[Number($.op_index),$])),j=(P?.domain_escape_ranking_op_indices||[]).map($=>X.get(Number($))).find($=>$?.assessment_status==="assessed"&&Number($.range_escape_pair_count||0)>0&&$.globally_finest_containment);if(j){let $=j.globally_finest_containment,ee=j.fixed_zero_point_containment,ne=(e?.contract_migration?.migrations||[]).find(ue=>Number(ue.source_add_op_index)===Number(j.op_index)),ge=ne?.scenarios?.find(ue=>ue.design==="globally_finest_minimum_containment"),le=ge?` Re-export impact is deterministically scoped to ${C(ne.direct_consumer_count)} direct parameter consumer(s): ${C(ge.assessed_kernel_channel_count)} kernel channel(s), ${C(ge.multiplier_encoding_changed_channel_count)} changed Q0.31 encoding(s), ${C(ge.multiplier_shift_changed_channel_count)} changed shift(s), ${C(ge.bias_code_changed_channel_count)} changed bias code(s), ${C(ge.bias_int32_overflow_channel_count)} candidate INT32 bias overflow(s), and ${C(ge.add_parameter_encoding_changed_count)} changed direct-ADD parameter encoding(s). Its structural behavior radius is ${C(ne.reachable_downstream_op_count)} reachable op(s) at maximum edge depth ${C(ne.maximum_downstream_edge_depth)}.`:" Direct-consumer parameter regeneration was not assessed.";s.push(Z({id:"EA-QNT-0108",category:"quantization_design_review",title:"Residual ADD output contract does not contain the complete legal code domain",evidence:"DERIVED",priority:"Informational",op:`#${te(j.op_index)} ADD`,tensor:Number.isInteger(j.output_tensor_index)?`T${j.output_tensor_index}`:"quantized ADD output",observation:`${C(P.range_escape_add_count)} / ${C(P.assessed_add_count)} assessed ADD output contract(s) exclude part of the uniform legal input-code sum domain. Top #${te(j.op_index)} has ${C(j.range_escape_pair_count)} / ${C(j.enumerated_code_pair_count)} endpoint escapes and ${C(j.rounded_projection_clamp_pair_count)} ideal projected clamps. Fixed-zero-point containment is ${ee?`${Number(ee.scale_ratio_to_current).toFixed(3)}x scale with ${C(ee.rounded_projection_clamp_pair_count)} clamps`:"unavailable"}; the globally finest full-containment contract is ${Number($.scale_ratio_to_current).toFixed(3)}x scale with zero-point delta ${Number($.signed_zero_point_delta)>=0?"+":""}${$.signed_zero_point_delta} and ${C($.rounded_projection_clamp_pair_count)} clamps.${le}`,interpretation:"The counterfactual is exhaustive over uniform legal integer-code pairs. It proves output-contract geometry, not activation frequency, calibration quality, task accuracy, or executed fixed-point behavior.",recommendation:"Use the containment frontier and Contract Migration Impact ledger to scope a calibration or QAT re-export experiment. Regenerate the listed direct-consumer Q0.31 parameters and INT32 bias constants, verify every channel ledger, then validate representative and adversarial outputs. Do not patch the output tensor alone; reachable downstream ops are a behavior-impact radius, not a claim that every one needs metadata replacement.",relevance:"residual output quantization contract design",methodVersion:P.method_version}))}let J=e?.residual_step_response,W=J?.retention_cost_ranking_op_indices?.[0],se=(J?.residual_adds||[]).find($=>$.op_index===W),Y=se?.contracts?.find($=>$.design==="current_artifact_contract"),U=se?.contracts?.find($=>$.design==="globally_finest_minimum_containment");se&&Y&&U&&s.push(Z({id:"EA-QNT-0109",category:"quantization_design_review",title:"Residual containment has an exact local step-visibility trade-off",evidence:"DERIVED",priority:"Informational",op:`#${te(se.op_index)} ADD`,tensor:Number.isInteger(se.output_tensor_index)?`T${se.output_tensor_index}`:"quantized ADD output",observation:`Across ${C(J.total_transition_count)} exhaustive adjacent branch transitions and ${C(J.total_joint_interior_cell_count)} joint interior cells, both containment candidates remove ${C(J.containment_removed_rounded_clamp_pair_count)} rounded clamp-pair instances in aggregate and add ${C(J.containment_additional_silent_transition_count)} silent transition instances versus their current contracts. Highest retention cost is #${te(se.op_index)}: current has ${C(Y.rounded_projection_clamp_pair_count)} clamp pairs and ${C(Y.silent_transition_count)} silent transitions; globally finest containment has ${C(U.rounded_projection_clamp_pair_count)} and ${C(U.silent_transition_count)}, respectively (${U.additional_silent_transitions_vs_current>=0?"+":""}${C(U.additional_silent_transitions_vs_current)} silent). Both-branch-visible interior cells change from ${C(Y.both_branches_visible_cell_count)} to ${C(U.both_branches_visible_cell_count)}.`,interpretation:"This is exact local distinguishability over uniformly enumerated legal integer codes. It is not an activation distribution, entropy or mutual-information estimate, runtime branch-activity measurement, calibration verdict, or task-accuracy result.",recommendation:"Use the Residual Step Response ledger alongside domain containment and Contract Migration Impact when designing a calibration or QAT re-export experiment. Compare clamp removal, branch-specific silent transitions, and joint influence fields, then validate representative and adversarial task outputs before selecting a contract.",relevance:"residual output-contract local code-step geometry",methodVersion:J.method_version}));let re=e?.residual_contract_distortion,H=re?.distortion_ranking_op_indices?.[0],fe=(re?.residual_adds||[]).find($=>$.op_index===H),Te=fe?.scenarios?.find($=>$.design==="globally_finest_minimum_containment");fe&&Te&&s.push(Z({id:"EA-QNT-0110",category:"quantization_design_review",title:"Clamp containment redistributes residual projection error across the legal code domain",evidence:"DERIVED",priority:"Informational",op:`#${te(fe.op_index)} ADD`,tensor:Number.isInteger(fe.output_tensor_index)?`T${fe.output_tensor_index}`:"quantized ADD output",observation:`Across ${C(re.total_enumerated_pair_count)} exact current-versus-containment pair comparisons, the candidates rescue ${C(re.rescued_current_clamp_pair_instance_count)} current rounded-clamp instances and retain ${C(re.candidate_clamped_pair_count)} candidate clamps. Ideal projection error decreases for ${C(re.ideal_error_improved_pair_count)} pairs, increases for ${C(re.ideal_error_worsened_pair_count)}, and is equal within the declared binary64 tolerance for ${C(re.ideal_error_equal_within_tolerance_pair_count)}; ${C(re.sign_class_changed_pair_count)} represented-value sign classes change. Highest RMS displacement is #${te(fe.op_index)}. Its globally finest candidate rescues ${C(Te.rescued_current_clamp_pair_count)} clamps, changes ${C(Te.changed_represented_value_pair_count)} represented values, improves / worsens ${C(Te.ideal_error_improved_pair_count)} / ${C(Te.ideal_error_worsened_pair_count)} pairs, and has RMS / p99 / maximum displacement ${Number(Te.root_mean_square_contract_delta_current_steps).toFixed(3)} / ${Number(Te.p99_absolute_contract_delta_current_steps).toFixed(3)} / ${Number(Te.maximum_absolute_contract_delta_current_steps).toFixed(3)} current output steps. Its uniform mean absolute ideal-projection error delta is ${Number(Te.signed_mean_absolute_ideal_error_delta).toExponential(4)} real units.`,interpretation:"The candidates remove rare, large clamp errors while introducing smaller rounding changes over many interior code pairs. Pair counts are uniform-domain geometry, not activation probabilities; neither the lower mean error nor the larger worsened-pair count establishes task quality.",recommendation:"Use the Distortion Atlas with the Step Response and Contract Migration ledgers to choose re-export experiments. Validate representative and adversarial task outputs, especially around sign-class changes and the reported worst pair witnesses, before selecting a containment contract.",relevance:"residual output-contract counterfactual distortion geometry",methodVersion:re.method_version}));let ve=e?.kernel_extremum_witness,gt=ve?.witness_ranking_op_indices?.[0],ut=(ve?.ops||[]).find($=>$.op_index===gt),Pt=ut?.worst_channel||ut?.top_channels?.[0];if(Number(ve?.build_mode_divergent_endpoint_count||0)>0&&ut&&Pt){let $=[Pt.minimum,Pt.maximum].find(ee=>Number(ee?.build_mode_output_delta_codes||0)!==0)||Pt.maximum;s.push(Z({id:"EA-QNT-0111",category:"quantization_design_review",title:"Pinned TFLite fixed-point build modes produce concrete endpoint code differences",evidence:"DERIVED",priority:"Informational",op:`#${te(ut.op_index)} ${ut.op_name}`,tensor:`${ut.output_tensor_name||`T${ut.output_tensor_index}`} channel ${Pt.channel_index}`,observation:`${C(ve.witness_assignment_count)} canonical legal-code term assignments and ${C(ve.fixed_point_endpoint_evaluation_count)} pinned fixed-point endpoint executions expose ${C(ve.build_mode_divergent_endpoint_count)} default-versus-TFLITE_SINGLE_ROUNDING output-code difference(s). Default versus direct ideal differs at ${C(ve.default_ideal_mismatch_endpoint_count)} endpoint(s); single-rounding versus direct ideal differs at ${C(ve.single_ideal_mismatch_endpoint_count)}. The maximum absolute deltas are ${C(ve.maximum_default_ideal_delta_codes||0)} and ${C(ve.maximum_single_ideal_delta_codes||0)} output code(s), respectively. Reproducible witness: #${te(ut.op_index)} channel ${Pt.channel_index} ${$.endpoint}; ideal/default/single output codes ${C($.ideal_output_code)} / ${C($.default_output_code)} / ${C($.single_output_code)}; pattern SHA-256 ${Pt.witness_pattern_sha256}.`,interpretation:"The artifact does not embed the runtime compile-time rounding mode. These are exact synthetic full-valid receptive-field endpoints under pinned TensorFlow source semantics, not an observed runtime mismatch, an activation frequency, a full-model input, or an accuracy estimate.",recommendation:"Bind the deployed runtime commit, binary hash, compile flags, and TFLITE_SINGLE_ROUNDING state to the release. Replay the exported Witness JSON against the target runtime and treat the observed target result as authoritative for that build.",relevance:"quantized kernel reproducibility and runtime-build provenance",methodVersion:ve.method_version}))}let bt=e?.channel_vitality,En=(bt?.vitality_ranking_op_indices||[]).map($=>(bt?.ops||[]).find(ee=>ee.op_index===$)).find($=>Number($?.nonconstant_accumulator_dual_mode_constant_channel_count||0)>0);if(Number(bt?.nonconstant_accumulator_dual_mode_constant_channel_count||0)>0&&En){let $=(En.top_channels||[]).filter(He=>BigInt(He.accumulator_span_decimal||"0")!==0n&&He.dual_mode_constant),ee=(En.top_channels||[]).filter(He=>He.mode_dependent_constant),ne=He=>He.length?He.map(st=>`ch ${st.channel_index}: post-bias ${st.post_bias_minimum_decimal}..${st.post_bias_maximum_decimal}, default preclamp ${st.default_minimum_preclamp_code}..${st.default_maximum_preclamp_code} -> output ${st.default_minimum_output_code}..${st.default_maximum_output_code} (${st.default_constant_reason}), single preclamp ${st.single_minimum_preclamp_code}..${st.single_maximum_preclamp_code} -> output ${st.single_minimum_output_code}..${st.single_maximum_output_code} (${st.single_constant_reason})`).join(" / "):"coordinates retained in the structured vitality ledger",ge=(Qe(e)||[]).find(He=>Number(He.index)===Number(En.op_index)),le=(bt.ops||[]).filter(He=>Number(He.dual_mode_constant_output_channel_count||0)>0),ue=le.map(He=>{let st=new Set(He.single_constant_channel_indices||[]),Re=(He.default_constant_channel_indices||[]).filter(de=>st.has(de));return`#${te(He.op_index)} ${He.op_name} [${Re.join(", ")||"indices unavailable"}]`}),xt=le.map(He=>`#${te(He.op_index)} ${He.op_name}`).join(", "),he=le.map(He=>{let st=(Qe(e)||[]).find(Re=>Number(Re.index)===Number(He.op_index));return Number.isInteger(Number(st?.outputs?.[0]))?`T${Number(st.outputs[0])}`:null}).filter(Boolean).join(", ");s.push(Z({id:"EA-QNT-0112",category:"quantization_design_review",title:"Legal input-code domain cannot activate quantized output channels",evidence:"DERIVED",priority:"High",op:xt||`#${te(En.op_index)} ${En.op_name}`,tensor:he||(Number.isInteger(Number(ge?.outputs?.[0]))?`T${Number(ge.outputs[0])}`:"quantized kernel output"),observation:`${C(bt.assessed_channel_count)} channels were joined to exact stored-weight post-bias endpoints and both pinned TFLite fixed-point paths. ${C(bt.dual_mode_constant_output_channel_count)} channel(s) are constant under both paths: ${C(bt.constant_accumulator_channel_count)} have a constant post-bias accumulator and ${C(bt.nonconstant_accumulator_dual_mode_constant_channel_count)} retain a variable accumulator yet collapse to one output code. Complete dual-mode constant-channel inventory: ${ue.join(" / ")}. Highest-ranked detailed coordinates at #${te(En.op_index)}: ${ne($)}. ${C(bt.mode_dependent_constant_output_channel_count)} channel(s) change constant classification with TFLITE_SINGLE_ROUNDING; ${ne(ee)}. Op vitality ledger SHA-256 ${En.vitality_ledger_sha256}.`,interpretation:"Equal endpoint outputs are an exact consequence of monotone positive-multiplier projection and clamp over the full-valid receptive-field legal-code domain. This is not observed runtime activation frequency, a full-model reachability claim, edge-padding behavior, delegate execution evidence, or a task-accuracy result.",recommendation:"Inspect the listed channels in the QAT or conversion graph, calibration ranges, bias, and activation contract. Re-export candidate artifacts, replay the selected channel proofs against the pinned runtime build, and compare representative plus adversarial task outputs before release.",relevance:"quantized channel vitality and fixed-point projection collapse",methodVersion:bt.method_version}))}let M=e?.rounding_equivalence,Le=(M?.equivalence_ranking_op_indices||[]).map($=>(M?.ops||[]).find(ee=>ee.op_index===$)).find($=>Number($?.divergent_channel_count||0)>0),tt=Le?.top_channels?.find($=>BigInt($.divergent_state_count_decimal||"0")>0n);if(Number(M?.divergent_channel_count||0)>0&&Le&&tt){let $=(Qe(e)||[]).find(ee=>Number(ee.index)===Number(Le.op_index));s.push(Z({id:"EA-QNT-0113",category:"quantization_design_review",title:"Pinned TFLite rounding build modes are not bit-exact over the accumulator interval hull",evidence:"DERIVED",priority:"Informational",op:`#${te(Le.op_index)} ${Le.op_name}`,tensor:Number.isInteger(Number($?.outputs?.[0]))?`T${Number($.outputs[0])} channel ${tt.channel_index}`:`quantized kernel output channel ${tt.channel_index}`,observation:`${C(M.assessed_channel_count)} channels and ${C(M.interval_state_count_decimal)} post-bias integer interval states were partitioned exactly into ${C(M.pair_segment_count)} maximal ordered-output-pair segments. ${C(M.divergent_channel_count)} channel(s) across ${C(M.divergent_op_count)} op(s) contain ${C(M.divergent_state_count_decimal)} default-versus-TFLITE_SINGLE_ROUNDING state difference(s) (${nn(M.divergent_state_ratio)} of the interval-hull portfolio); ${nn(Number(M.default_higher_state_count_decimal||0)/Math.max(1,Number(M.divergent_state_count_decimal||0)))} of divergent states are default-higher and ${nn(Number(M.default_lower_state_count_decimal||0)/Math.max(1,Number(M.divergent_state_count_decimal||0)))} are default-lower; maximum absolute delta ${C(M.maximum_absolute_output_delta)} output code. First ranked counterexample: #${te(Le.op_index)} channel ${tt.channel_index}, accumulator ${tt.first_divergent_accumulator_decimal}, default/single outputs ${tt.first_default_output_code}/${tt.first_single_output_code}; last counterexample ${tt.last_divergent_accumulator_decimal}; op certificate SHA-256 ${Le.equivalence_ledger_sha256}.`,interpretation:"This is an exact build-mode equivalence certificate over each closed post-bias int32 interval hull. Interior accumulator integers can be unreachable because legal dot products are discrete and correlated, so the state ratio is not an activation probability, observed mismatch rate, or accuracy estimate. The artifact does not embed the runtime compile-time rounding mode.",recommendation:"Bind the TensorFlow/LiteRT source commit, runtime binary hash, compile flags, and TFLITE_SINGLE_ROUNDING state to the release. Replay the exported first counterexample and representative full-model inputs on every target build when bit-exact reproducibility is required.",relevance:"quantized bit-exact reproducibility and runtime-build provenance",methodVersion:M.method_version}))}let ze=e?.accumulator_reachability,dn=(ze?.reachability_ranking_op_indices||[]).map($=>(ze?.ops||[]).find(ee=>ee.op_index===$)).find($=>BigInt($?.exact_reachable_divergent_state_count_decimal||"0")>0n),uo=dn?.top_channels?.find($=>BigInt($.exact_reachable_divergent_state_count_decimal||"0")>0n);if(BigInt(ze?.exact_reachable_divergent_state_count_decimal||"0")>0n&&dn&&uo){let $=(Qe(e)||[]).find(ee=>Number(ee.index)===Number(dn.op_index));s.push(Z({id:"EA-QNT-0115",category:"quantization_design_review",title:"Pinned rounding build modes differ at constructively reachable kernel-local accumulator states",evidence:"DERIVED",priority:"Informational",op:`#${te(dn.op_index)} ${dn.op_name}`,tensor:Number.isInteger(Number($?.outputs?.[0]))?`T${Number($.outputs[0])} channel ${uo.channel_index}`:`quantized kernel output channel ${uo.channel_index}`,observation:`${C(ze.assessed_channel_count)} channels were decomposed into bounded absolute-centered-weight denominations and intersected with the exact rounding pair partition. Of ${C(ze.interval_divergent_state_count_decimal)} interval-hull differences, ${C(ze.exact_reachable_divergent_state_count_decimal)} are constructively kernel-local reachable (${nn(ze.exact_reachable_divergent_ratio)}), ${C(ze.provably_unreachable_divergent_state_count_decimal)} are excluded by lattice residue, and ${C(ze.unresolved_divergent_state_count_decimal)} remain congruence-compatible but unproven. ${C(ze.complete_integer_interval_channel_count)} channel(s) have complete integer coverage, ${C(ze.complete_modular_lattice_channel_count)} complete modular coverage, ${C(ze.partial_band_channel_count)} endpoint-band proofs, and ${C(ze.singleton_channel_count)} singleton accumulators. Ranked exact counterexample: #${te(dn.op_index)} channel ${uo.channel_index}, accumulator ${uo.first_exact_reachable_divergent_accumulator_decimal}, default/single outputs ${uo.first_default_output_code}/${uo.first_single_output_code}; op reachability SHA-256 ${dn.reachability_ledger_sha256}.`,interpretation:"The counterexample is exact for a full-valid kernel-local receptive field under independently selectable legal quantized input codes. It is stronger than interval-only exposure, but it is not proof that upstream model activations or a real model input realize the local assignment, that padding sites are free, that a declared output changes, or that the state occurs at runtime.",recommendation:"Export the aggregate coefficient witness and realize it as a concrete local input-code assignment, then replay the pinned default and TFLITE_SINGLE_ROUNDING kernels. Follow with paired full-model tests on captured representative and adversarial inputs before assigning model-output or task-level impact.",relevance:"constructive quantized numerical ABI counterexamples and cross-build reproducibility",methodVersion:ze.method_version}))}let E=e?.numerical_abi_propagation,T=(E?.propagation_ranking_op_indices||[]).map($=>(E?.sources||[]).find(ee=>ee.op_index===$)).find($=>$?.local_reachability_status==="exact_local_counterexample"&&$.reachable_model_output_tensor_count>0);if(Number(E?.exact_output_reachable_source_op_count||0)>0&&T){let $=T.model_output_paths?.[0];s.push(Z({id:"EA-QNT-0114",category:"quantization_design_review",title:"Exact kernel-local fixed-point counterexample has a structural path to declared model outputs",evidence:"DERIVED",priority:"Informational",op:`#${te(T.op_index)} ${T.op_name}`,tensor:$?`T${$.output_tensor_index} ${$.output_tensor_name}`:"declared model output",observation:`${C(E.exact_local_counterexample_source_op_count)} of ${C(E.divergent_source_op_count)} divergent source op(s) contain at least one constructively reachable kernel-local counterexample and ${C(E.exact_output_reachable_source_op_count)} of those have structural corridors to declared outputs. The divergent-state partition is ${C(E.exact_local_divergent_state_count_decimal)} exact reachable, ${C(E.residue_excluded_divergent_state_count_decimal)} residue-excluded, and ${C(E.unresolved_divergent_state_count_decimal)} unresolved. Exact-qualified corridors span ${C(E.exact_unique_reachable_op_count)} ops, ${C(E.exact_unique_reachable_tensor_count)} tensors, and ${C(E.exact_unique_predicted_boundary_edge_count)} predicted execution-domain edge(s) carrying ${E.exact_unique_predicted_boundary_logical_payload_bytes==null?"an incompletely assessed payload":mn(E.exact_unique_predicted_boundary_logical_payload_bytes)}. Ranked source #${te(T.op_index)} has ${C(T.exact_reachable_divergent_state_count_decimal)} exact local difference(s) and reaches the output through ${C(T.exact_model_output_graph_route_count_decimal)} exact graph route(s); reachability SHA-256 ${T.source_reachability_ledger_sha256}; propagation SHA-256 ${T.propagation_ledger_sha256}.`,interpretation:"The source counterexample is exact for one full-valid kernel-local receptive field under independent legal input codes. Its downstream corridor is structural only: it does not prove that a full-model input realizes the local assignment or that cancellation, requantization, pooling, clamp, runtime lowering, and task semantics preserve a declared-output difference.",recommendation:"Bind the deployed runtime build and TFLITE_SINGLE_ROUNDING state, then run paired full-model output comparisons across those builds. Prioritize exported source corridors with high route multiplicity, residual reconvergence, and predicted execution-domain crossings; treat observed target outputs as authoritative.",relevance:"numerical ABI compatibility, output reproducibility, and cross-build validation planning",methodVersion:E.method_version}))}let it=e?.input_counterexample,De=it?.witnesses?.[0],tn=De?(it.sources||[]).find($=>$.op_index===De.source_op_index):null;Number(it?.tensor_abi_constructive_source_op_count||0)>0&&De&&tn&&s.push(Z({id:"EA-QNT-0116",category:"quantization_design_review",title:"Pinned rounding ABI has a complete model-input counterexample",evidence:"DERIVED",priority:"Medium",op:`#${te(De.source_op_index)} ${De.source_op_name}`,tensor:`T${De.model_input_tensor_index} ${De.model_input_tensor_name} -> T${De.source_output_tensor_index} channel ${De.source_channel_index}`,observation:`${C(it.tensor_abi_constructive_source_op_count)} of ${C(it.exact_local_source_op_count)} exact-local divergent source op(s) is constructively realizable by a complete declared model-input tensor. The representative ${De.model_input_shape.join("x")} ${De.model_input_dtype} tensor contains ${C(De.model_input_element_count)} elements, fills all positions with zero-point code ${De.full_tensor_fill_code}, and applies ${C(De.sparse_override_count)} unique overrides in a full-valid ${De.effective_patch_shape.join("x")} patch. Its exact dot ${C(De.dot_product_decimal)} plus bias ${C(De.bias_decimal)} reaches accumulator ${C(De.post_bias_accumulator_decimal)}, producing default/single-rounding output codes ${De.default_output_code}/${De.single_rounding_output_code}. The source has ${C(tn.exact_reachable_divergent_channel_count)} constructive channel(s), ${C(tn.exact_reachable_divergent_state_count_decimal)} exact divergent state(s), and ${C(tn.exact_model_output_graph_route_count_decimal||0)} structural declared-output route(s). Full tensor SHA-256 ${De.full_model_input_tensor_sha256}; witness ledger SHA-256 ${De.witness_ledger_sha256}.`,interpretation:"This is the action-bearing apex of the same rounding-build provenance chain documented by EA-QNT-0111, 0113, 0115, and 0114; those records remain Informational evidence stages rather than duplicate Medium actions. The certificate is exact at the quantized model tensor ABI, but it does not establish that an application's image or audio preprocessing can emit the tensor, that the deployed runtime selects either pinned rounding path, or that the one-code source difference survives to a declared model output or changes task behavior.",recommendation:"Bind one runtime-build action: replay the exported raw input tensor on clean, binary-hashed runtime builds with default and TFLITE_SINGLE_ROUNDING configurations and compare source-op and declared-output tensors bit-for-bit. Separately test whether the documented production preprocessing contract can realize or approximate the certified tensor; keep structural route multiplicity distinct from observed output impact.",relevance:"constructive model-input numerical ABI compatibility and cross-build release validation",methodVersion:it.method_version}));let qt=e?.preprocessing_realizability,Ga=(qt?.candidates||[]).filter($=>$.exact_tensor_realization),Gr=(qt?.candidates||[]).filter($=>$.status==="assessed"&&!$.exact_tensor_realization);if(Ga.length&&Gr.length&&De){let $=Gr.find(he=>he.contract_id===qt.best_non_exact_contract_id)||Gr[0],ee=[...Gr].sort((he,He)=>He.unrealizable_tensor_element_count-he.unrealizable_tensor_element_count)[0],ne=(qt.candidates||[]).find(he=>he.contract_id==="unit_interval_rgb"),ge=ne?` The [0,1] RGB convention reaches ${ne.channel_maps.map(he=>`${C(he.reachable_tensor_code_count)}/256`).join(", ")} tensor codes by channel and leaves ${ne.channel_maps.map(he=>C(he.tensor_code_hole_count)).join(", ")} code holes.`:"",le=(qt.candidates||[]).find(he=>he.contract_id==="center_128_div_128_rgb"),ue=(qt.candidates||[]).find(he=>he.contract_id==="minus_one_to_one_rgb"),xt=le&&ue?` Artifact range matching and witness realizability answer different questions: the declared affine range matches the common [-1,1] endpoint convention within one artifact step, while exact code reproduction is achieved by \`${le.pixel_to_real_formula}\`; the textbook \`${ue.pixel_to_real_formula}\` formula leaves ${C(ue.unrealizable_tensor_element_count)} witness element(s) one or more tensor codes away.`:"";s.push(Z({id:"EA-QNT-0117",category:"integration_verification",findingKind:"caution",title:"The exact ABI witness depends materially on the source preprocessing contract",evidence:"DERIVED",priority:"Medium",op:`#${te(De.source_op_index)} ${De.source_op_name}`,tensor:`T${De.model_input_tensor_index} ${De.model_input_tensor_name}`,observation:`${C(qt.candidate_evaluation_count)} explicit 8-bit image preprocessing counterfactual(s) were exhaustively evaluated over all 256 source codes per channel. ${C(qt.exact_tensor_realization_candidate_count)} contract(s) reproduce all ${C(De.model_input_element_count)} witness elements exactly: ${qt.exact_contract_ids.join(", ")}. ${C(qt.non_exact_candidate_count)} do not. Best non-exact ${$.contract_id} leaves ${C($.unrealizable_tensor_element_count)} element(s) unrealizable with minimum total absolute tensor-code error ${C($.minimum_total_absolute_tensor_code_error_decimal)}; ${ee.contract_id} leaves ${C(ee.unrealizable_tensor_element_count)} element(s) unrealizable.${ge}${xt} Exact fixture SHA-256 ${Ga[0].nearest_rgb_fixture_sha256}; portfolio SHA-256 ${qt.portfolio_ledger_sha256}.`,interpretation:"The finite-domain result is exact for each named formula, channel permutation, saturation rule, and half-away rounding equation. It does not reveal which preprocessing implementation the application deploys; the artifact does not bind decoder, resize, color order, normalization, or quantizer behavior. A candidate mismatch is not evidence that the production app is wrong unless its contract is independently matched to that row.",recommendation:"Bind the production preprocessing implementation and checksum to the release, match it to an explicit formula and channel order, then replay the corresponding exported PNG and raw tensor through the production decoder-to-tensor path. Compare the produced tensor SHA-256 before performing paired runtime-build output tests.",relevance:"source-data contract reproducibility, numerical ABI replay, and integration validation",methodVersion:qt.method_version}))}let ua=(d.weight_zero_point?.details||[]).filter($=>$.status==="fail"||$.status==="review");if(ua.length){let $=ua[0],ee=ua.filter(Re=>Re.asymmetric_uint8_observed).length,ne=ua.filter(Re=>Re.status==="fail").length,ge=ua.filter(Re=>Re.dtype==="INT8").length,le=$.status==="fail",ue=`${$.tensor_name||`T${$.tensor_index}`} ${$.dtype} zero-point(s) ${$.zero_points.join(", ")||"not emitted"}`,xt=/toco/i.test(String(e?.metadata_presence?.description||"")),he=Number(e?.metadata_presence?.conversion_metadata_entry_count||0)===0,He=(Qe(e)||[]).filter(Re=>Re.name==="DEPTHWISE_CONV_2D"&&String(Re.quant_scale_mode||"").toLowerCase().includes("per-tensor")).length,st=xt?` Root-cause synthesis: artifact description is ${JSON.stringify(e.metadata_presence.description)}; CONVERSION_METADATA is ${he?"absent":"present"}; ${C(ee)} asymmetric UINT8 kernel tensor(s), ${C(He)} per-tensor depthwise op(s), and ${C(e?.per_channel_tensors||0)} per-channel tensor(s) are observed; runtime floor is ${e?.runtime_compat?.effective_min_runtime_version||e?.runtime_compat?.derived_min_runtime_version||"not derived"}. These facts are jointly consistent with a legacy TOCO UINT8 export, while the exact converter binary/version remains unbound.`:"";s.push(Z({id:"EA-QNT-0104",category:le?"quantization":"quantization_design_review",title:le?"Weight zero-point metadata is invalid":"Asymmetric UINT8 weight quantization observed",evidence:le?"OBSERVED":"DERIVED",priority:le?"High":"Medium",op:"Conv/Depthwise/FC kernel",tensor:le?$.tensor_name||`T${$.tensor_index}`:`${C(ee)} UINT8 kernel tensor(s); representative ${$.tensor_name||`T${$.tensor_index}`}`,observation:le?ue:`Invalid zero-points: ${C(ne)}. Symmetric INT8 violations: ${ge?C(ua.filter(Re=>Re.symmetric_int8_violation).length):"not applicable, no INT8 weight tensors"}. Asymmetric UINT8 weight tensors observed: ${C(ee)}. Representative example: ${ue}.${st}`,interpretation:le?u?"Weight zero-point metadata is outside the legal ONNX quantized dtype contract. ONNX QLinear signed weights are not assumed symmetric.":"Weight zero-point metadata is outside the legal dtype contract or violates the symmetric INT8 weight expectation.":xt?"The artifact directly joins a TOCO description with UINT8 asymmetric/per-tensor quantization evidence. This is a source-artifact lineage diagnosis, not proof of the exact TOCO release, command line, calibration data, or training provenance.":"The artifact directly shows UINT8 weight dtype, non-zero zero-point metadata, and per-tensor asymmetric quantization. This pattern is commonly associated with older UINT8 conversion paths, but exact converter lineage is not embedded in the artifact.",recommendation:le?"Regenerate or repair the quantized artifact before release, then confirm outputs against reference data.":"Record converter lineage and compatibility reason; prefer modern per-channel symmetric INT8 exports when supported by the deployment runtime.",relevance:"quantization metadata integrity; converter lineage",findingClass:le?"":"conversion-lineage review"}))}let So=d.accumulator_bound;if(So?.bound_class==="exact_stored_weight_channel_integer_domain"&&Number(So.overflow_risk_channels||0)>0){let ee=(So.details||[]).filter(ge=>ge.status==="fail").sort((ge,le)=>Number(le.maximum_int32_ratio||0)-Number(ge.maximum_int32_ratio||0))[0]||{},ne=(ee.overflow_channel_indices||[]).slice(0,16);s.push(Z({id:"EA-QNT-0106",category:"integrity",title:"Exact stored-weight accumulator envelope exceeds INT32",evidence:"DERIVED",priority:"High",op:Number.isInteger(ee.op_index)?`#${te(ee.op_index)} ${ee.op_name||"quantized op"}`:"quantized Conv/Depthwise/FC",tensor:ee.weight_tensor_name||(Number.isInteger(ee.weight_tensor_index)?`T${ee.weight_tensor_index}`:"constant weight tensor"),observation:`${C(So.overflow_risk_channels)} output channel(s) across ${C(So.overflow_risk_ops)} op(s) exceed the signed INT32 interval under the exact stored-weight legal-code envelope. Maximum absolute envelope ${So.maximum_absolute_accumulator_decimal||"not emitted"}; required width ${So.maximum_required_signed_bits||"not emitted"} signed bits. Representative overflow channels: ${ne.length?ne.join(", "):"see structured evidence"}.`,interpretation:"For the pinned TFLite reference integer accumulation algebra, at least one legal full-field input-code assignment can exceed INT32 before or after stored bias. This is a deterministic arithmetic-domain defect signal, not an observed overflow frequency or a claim about a backend that may widen or transform accumulation.",recommendation:"Block release for an INT32 reference path. Re-export with safer input/weight scales or reduced fan-in, or bind observed runtime evidence proving a wider/saturating accumulation contract and verify representative plus adversarial output parity before accepting the artifact.",relevance:"quantized integer arithmetic integrity; runtime accumulator contract"}))}let _a=d.requantization_fidelity;if(_a?.bound_class==="pinned_q0_31_encoding_and_conservative_pre_clamp_rounding"&&(Number(_a.default_pre_shift_overflow_channels||0)>0||Number(_a.single_rounding_encoding_divergence_channels||0)>0)){let $=Number(_a.default_pre_shift_overflow_channels||0),ee=Number(_a.single_rounding_encoding_divergence_channels||0),ne=(_a.details||[]).filter(ge=>Number(ge.default_pre_shift_overflow_channels||0)>0||Number(ge.single_rounding_encoding_divergence_channels||0)>0).sort((ge,le)=>Number(le.default_pre_shift_overflow_channels||0)-Number(ge.default_pre_shift_overflow_channels||0)||Number(le.single_rounding_encoding_divergence_channels||0)-Number(ge.single_rounding_encoding_divergence_channels||0)||Number(ge.op_index||0)-Number(le.op_index||0))[0]||{};s.push(Z({id:"EA-QNT-0107",category:"quantization",title:$?"Pinned default requantization pre-shift exceeds INT32":"Requantization encoding depends on TFLITE_SINGLE_ROUNDING",evidence:"DERIVED",priority:$?"High":"Medium",op:Number.isInteger(ne.op_index)?`#${te(ne.op_index)} ${ne.op_name||"quantized op"}`:"quantized Conv/Depthwise/FC",tensor:Number.isInteger(ne.output_tensor_index)?`T${ne.output_tensor_index}`:"quantized output tensor",observation:`${C($)} channel(s) exceed the default double-rounding INT32 positive pre-shift contract; ${C(ee)} channel(s) receive a different saturated multiplier/shift under TFLITE_SINGLE_ROUNDING. Artifact shift range ${_a.shift_range?.join(" .. ")||"not emitted"}; maximum encoding drift ${Za(_a.maximum_encoding_drift_bound_codes||0)} output codes.`,interpretation:"The result is exact for the pinned source preparation rules, full intermediate accumulator envelope, and post-bias requantization domain, but the deployment artifact does not embed the TFLITE_SINGLE_ROUNDING compile flag or prove which backend executes the op.",recommendation:$?"Do not accept the default reference integer path without binding the runtime build flags and an observed execution assignment. Re-export scales or use a verified path that avoids the unsafe positive pre-shift, then compare output parity on adversarial inputs.":"Bind the runtime build manifest and record TFLITE_SINGLE_ROUNDING explicitly. Preserve the matching channel ledger in release evidence and verify output parity for the affected operators.",relevance:"quantized requantization integrity; runtime build reproducibility"}))}let Ni=u_(c.filter($=>$.quant_risk==="risk"||$.quant_risk==="warn"),$=>($.quant_scale_ratio_meaningful?Math.log10(Math.max(1,$.quant_scale_ratio||0)):0)+Number($.quant_scale_cv||0)*1.5+($.quant_zero_point_status==="out-of-range"?Math.abs($.quant_zero_point_offset||0)/32:0));if(Ni){let $=Ni.quant_scale_ratio_meaningful?`meaningful scale ratio ${Za(Ni.quant_scale_ratio||0)}`:"scale ratio not meaningful for this tensor contract";s.push(Z({id:"EA-QNT-0001",category:"quantization",title:"Quantization numerical contract review trigger",evidence:"DERIVED",priority:Ni.quant_risk==="risk"?"High":"Medium",op:`#${te(Ni.index)} ${Ni.name}`,tensor:"-",observation:`${$}, CV ${Number(Ni.quant_scale_cv||0).toFixed(2)}, zero-point status ${Ni.quant_zero_point_status||"none"}; emitted op predicate ${Ni.quant_risk||"review"}.`,interpretation:"Artifact metadata indicates a quantization contract requiring review. CV is descriptive and is not, by itself, the risk predicate or evidence of accumulated rounding error.",recommendation:"Inspect exact scale channels, stored centered codes, bias-scale consistency, and the source checkpoint. Select QAT or calibration changes only after representative output comparison identifies the corresponding mechanism.",relevance:"quantization verification support; software technical characterization"}))}let _o=(e?.fallback_traffic_by_op_family||[])[0];_o&&Number(_o.byte_percent||0)>=.01&&s.push(Z({id:"EA-DEL-0001",category:"delegate",title:"Predicted fallback tensor traffic concentration",evidence:"PREDICTED",priority:Number(_o.byte_percent||0)>=.06?"High":"Medium",observation:`${_o.name}: ${mn(_o.estimated_bytes||0)} (${nn(_o.byte_percent||0)})`,interpretation:"A small number of op families may dominate predicted fallback/copy traffic.",recommendation:"Confirm with target runtime delegate logs and op-level profiling; consider graph rewrite if confirmed.",relevance:"runtime compatibility; performance verification input"}));let{top:dc,totalUs:Qn}=WT(e,e?.target_profile||{},{limit:3}),Hi=dc.find($=>String($.op?.name||"").toUpperCase()==="DEQUANTIZE");if(Hi&&Qn>0){let $=Hi.estimate.totalUs/Qn,ee=dc.indexOf(Hi)+1;s.push(Z({id:"EA-QNT-0002",category:"quantization",title:"DEQUANTIZE op dominates static bottleneck estimate",evidence:"ESTIMATED",priority:ee===1?"High":"Medium",op:`#${te(Hi.op.index)} DEQUANTIZE`,observation:`Static bottleneck rank #${ee}: ${tb(Hi.estimate.totalUs)} / ${nn($)} of total static estimate`,interpretation:"An INT8 model with FLOAT32 output requires a full DEQUANTIZE pass over all output elements before the result is usable. For this target's memory bandwidth estimate, this copy dominates the graph's static bottleneck. This is not represented in the INT8 speedup estimate, which focuses on compute ops.",recommendation:"Set inference output type to INT8 in the TFLite converter to eliminate this pass, then dequantize externally if needed. Alternatively, keep FLOAT32 output and accept the overhead, but confirm with on-device profiling.",relevance:"quantization deployment architecture; runtime performance characterization"}))}let Ii=[...e?.delegation_repair?.runtime_build_risks||[]].sort(($,ee)=>Number(ee.affected_conditionally_delegatable_mac_ratio||0)-Number($.affected_conditionally_delegatable_mac_ratio||0))[0];if(Ii&&Number(Ii.affected_conditionally_delegatable_op_count||0)>0){let $=Number(Ii.absent_condition_remaining_conditionally_delegatable_op_count||0)===0;s.push(Z({id:"EA-DEL-0004",category:"delegate",title:$?"Required quantized XNNPACK build condition is not artifact-bound and conditional coverage collapses to zero":"Required quantized XNNPACK build condition is not artifact-bound",evidence:"PREDICTED",priority:$||Number(Ii.affected_conditionally_delegatable_mac_ratio||0)>=.5?"High":"Medium",op:`${C(Ii.affected_conditionally_delegatable_op_count)} conditionally delegatable op(s)`,observation:`\`${Ii.required_build_configuration}\` is required by the pinned rulepack but is not embedded in the model or bound runtime manifest. If the build condition is absent, conditionally delegatable coverage changes from ${C(Ii.baseline_conditionally_delegatable_op_count)} to ${C(Ii.absent_condition_remaining_conditionally_delegatable_op_count)} op(s), affecting ${nn(Ii.affected_conditionally_delegatable_mac_ratio)} of modeled MACs and ${C(Ii.affected_predicted_delegate_segment_count)} predicted delegate segment(s).`,interpretation:`${Ii.interpretation_boundary} For legacy QU8, the pinned source describes support as experimental; static artifact eligibility must not be read as observed runtime assignment.`,recommendation:"Bind the deployed TFLite/XNNPACK commit, binary SHA-256, build configuration, and delegate assignment trace. Treat the no-flag scenario as the release default until the required flag is proven in the runtime manifest.",relevance:"runtime build reproducibility; conditional delegate coverage",findingClass:"runtime-build configuration risk"}))}let da=Number(e?.xnnpack_effective_chain_breaks||0),Ki=lh(e),To=Ki?.edges||[];if(da||To.length){let $=c.filter(Re=>Re.xnnpack_chain_break),ee=$.filter(Re=>["RESHAPE","SQUEEZE","EXPAND_DIMS","SHAPE"].includes(String(Re.name||"").toUpperCase())),ne=Number.isFinite(Ki?.summed_edge_payload_bytes),ge=Number(ne?Ki.summed_edge_payload_bytes:Ki?.assessed_edge_payload_bytes||0),le=To.length?` Graph-derived ${ne?"summed logical edge payload":"assessed partial edge payload"} ${mn(ge)} across ${Bd(To.length,"predicted internal partition edge")}: ${To.slice(0,3).map(Re=>`T${Re.tensor_index} ${Re.tensor_name||"-"} ${Re.producer_domain}->${Re.consumer_domain} ${Re.payload_bytes==null?"payload not assessed":mn(Re.payload_bytes)}`).join(" / ")}.`:"",ue=$.length>0&&ee.length===$.length?" All listed break ops are shape-only candidates; runtime may alias or elide copies.":"",xt=[...new Set($.map(Re=>String(Re.name||"").toUpperCase()).filter(Boolean))],he=(e?.delegation_repair?.export_interventions||[]).find(Re=>Re.id==="se_global_pool_keepdims"),He=he?` The exact SE motif portfolio matches ${C(he.block_count)} block(s) and its fixed-graph assignment proxy changes delegate segments by ${C(he.signed_delegate_segment_count)}, boundary edges by ${C(he.signed_boundary_edge_count)}, and logical boundary payload by ${mn(Math.abs(Number(he.signed_boundary_payload_bytes||0)))}; excluded rank4 MEAN ${(he.unmatched_rank4_mean_op_indices||[]).map(Re=>`#${te(Re)}`).join(", ")||"none"}.`:"",st=he?"Re-export the matched squeeze-excitation reductions with keepdims=True, remove the paired rank-restoring EXPAND_DIMS nodes, then re-audit the transformed artifact and confirm assignment in the bound runtime.":ee.length===$.length?"Check delegate coverage logs on the target runtime before treating this as confirmed latency; profile before rewriting structural/view operators.":`Confirm the predicted ${xt.slice(0,3).join(", ")||"non-delegated op"} fallback using target-runtime delegate logs and profiling before modifying the graph, delegate configuration, or affected operator implementation.`;s.push(Z({id:"EA-DEL-0002",category:"delegate",title:"Predicted partition boundaries requiring runtime confirmation",evidence:"PREDICTED",priority:da>=4||To.length>=8?"High":"Medium",op:$.slice(0,3).map(Re=>`#${te(Re.index)} ${Re.name}`).join(", ")||"",observation:`${Bd(da,"non-structural predicted partition break")}; ${Bd(ee.length,"predicted non-delegated shape operation")}; ${Bd(To.length,"graph-derived internal execution-domain edge")}.${le}${ue}${He}`,interpretation:"Producer/consumer tensor edges and logical payloads are graph-derived from the static predicted assignment. The artifact alone cannot determine whether the runtime materializes copies, aliases buffers, converts layouts, or incurs measurable latency.",recommendation:st,relevance:"runtime compatibility; software architecture characterization"}))}let je=t?.runtimeAssignmentEvidence||t?.runtime_assignment||null,Un=je?.comparison||null,xp=Number(Un?.placement_assessment?.mismatch_count||0),tu=Number(Un?.boundary_comparison?.mismatch_count||0);if(xp||tu){let $=Un?.mac_comparison?.mismatch_mac_ratio,ee=(Un.mismatches||[]).slice(0,5);s.push(Z({id:"EA-DEL-0003",category:"delegate",title:"Observed runtime assignment differs from static delegation prediction",evidence:"DERIVED_FROM_OBSERVED_RUNTIME",priority:Number($||0)>=.1||tu>=4?"High":"Medium",op:ee.map(ne=>`#${te(ne.op_index)} ${ne.op_name}`).join(", "),observation:`${C(xp)} classified op placement mismatch(es): ${C(Un.placement_assessment?.overpredicted_delegation_count||0)} overpredicted and ${C(Un.placement_assessment?.underpredicted_delegation_count||0)} underpredicted; ${C(tu)} assessed graph-edge boundary mismatch(es); MAC-weighted mismatch ${$==null?"not assessed":nn($)}.${ee.length?` Top rows: ${ee.map(ne=>`#${te(ne.op_index)} ${ne.op_name} ${ne.classification}`).join(" / ")}.`:""}`,interpretation:"The pinned static rulepack does not reproduce the imported runtime/build assignment for this artifact and target-profile digest. Build flags, delegate version, operator lowering, dynamic preparation, or a stale rule may explain the difference; this is not by itself a model correctness defect.",recommendation:"Retain the runtime binary/build identity and verbose partition log, inspect each mismatch against the pinned delegate source, and update the target profile or rulepack only after the runtime-specific cause is established.",relevance:"runtime compatibility; delegation-rule validation; performance reproducibility"}))}let wt=je?.arena_reconciliation||null;if(wt){let $=wt.peak_delta_bytes,ee=Number(wt.runtime_only_allocation_count||0)>0||Number(wt.missing_observed_allocation_count||0)>0||Number(wt.size_mismatch_count||0)>0||Number(wt.alias_mismatch_count||0)>0,ne=Number(wt.offset_mismatch_count||0)>0;if(ee||ne||Number($||0)!==0){let ge=$==null?"not assessed":`${$>0?"+":$<0?"-":""}${mn(Math.abs($))}`;s.push(Z({id:"EA-MEM-0002",category:"memory_cache",title:"Observed TFLite arena allocation differs from the declared-shape projection",evidence:"DERIVED_FROM_OBSERVED_RUNTIME",priority:Number($||0)>0||ee?"Medium":"Informational",op:"ArenaPlanner post-commit allocation",observation:`Pinned runtime peak ${mn(wt.observed_peak_combined_arena_bytes)} versus declared-shape projection ${wt.projected_combined_arena_bytes==null?"not assessed":mn(wt.projected_combined_arena_bytes)}; peak delta ${ge}. Root allocations projected/observed ${C(wt.projected_root_allocation_count)}/${C(wt.observed_root_allocation_count)}; runtime-only ${C(wt.runtime_only_allocation_count)}, missing observed ${C(wt.missing_observed_allocation_count)}, size differences ${C(wt.size_mismatch_count)}, offset differences ${C(wt.offset_mismatch_count)}, alias differences ${C(wt.alias_mismatch_count)}. Prepare-time runtime temporaries ${C(wt.runtime_temporary_allocation_count)} totaling ${mn(wt.runtime_temporary_interval_bytes)} across allocation intervals.`,interpretation:"The difference is observed for this pinned runtime build and invocation. It is not automatically a defect: delegate replacement, Prepare-time tensor creation or resize, allocation-type changes, and execution-plan rewrites can legitimately change arena roots, sizes, aliases, and offsets.",recommendation:"Retain this allocation ledger with the runtime binary and invocation shapes; inspect runtime-only, missing, and size-different tensors against Prepare and delegation logs before changing model topology or capacity budgets. Account for delegate buffers, scratch, custom allocators, and process memory separately.",relevance:"runtime memory capacity; static-planner validation; deployment reproducibility"}))}}let Va=u_(c,$=>Number($.row_working_set_ratio||0));if(Number(Va?.row_working_set_ratio||0)>=.9){let $=Number(Va.row_working_set_bytes||0),ee=Number(e?.target_profile?.l1_data_bytes||0),ne=Number(e?.target_profile?.l2_bytes||0),ge=Number(Va.row_working_set_ratio||0),le=ne>0?$/ne:null,ue=ge>1;s.push(Z({id:"EA-MEM-0001",category:"memory_cache",title:"L1 row working-set pressure",evidence:"ESTIMATED",priority:ge>3?"High":"Medium",op:`#${te(Va.index)} ${Va.name}`,observation:`${mn($)} row working set / ${mn(ee)} L1D = ${ge.toFixed(2)}x; ${le==null?"L2 reference not emitted":`L2: ${mn($)} / ${mn(ne)} = ${le.toFixed(2)}x`}.`,interpretation:`Static row working-set estimate ${ue?"exceeds":"is within 10% of"} the selected target L1D reference. Code, other live data, associativity, and runtime scratch leave less usable capacity than the nominal cache size.`,recommendation:"Validate executed tiling and L1D refill/miss counters on the target; consider smaller spatial tiles, channel alignment, or graph changes only if this op is latency-dominant.",relevance:"computational resource characterization"}))}let nu=u_(c.filter($=>$.weight_packing_risk==="warn"),$=>Number($.weight_packing_overhead_us||0));if(nu){let $=c.filter(ne=>ne.weight_packing_risk==="warn").length,ee=Number(nu.weight_packing_overhead_us||0);s.push(Z({id:"EA-PKG-0001",category:"packing",title:"Weight packing warmup cost watchlist",evidence:"ESTIMATED",priority:"Informational",op:`#${te(nu.index)} ${nu.name}`,observation:`${Bd($,"op")} exceeded the static packing-watch threshold; largest estimate ${tb(ee)}. ${nu.weight_packing_detail||"No packing detail emitted."}`,interpretation:"Static weight-byte, setup, and target-bandwidth estimates indicate potential one-time interpreter preparation or first-invocation packing cost; this is not steady-state Invoke latency. Escalate only if the configured cold-start budget is tight.",recommendation:"Warm up before measuring steady-state latency, and report preparation/first-invocation packing separately from p50/p90 Invoke results.",relevance:"runtime performance characterization; benchmark protocol"}))}let Zi=u_(c.filter($=>$.channel_alignment_status==="misaligned"),$=>Number($.channel_tail_overhead_percent||0));if(Zi){let $=Number(Zi.channel_tail_overhead_percent_min??Zi.channel_tail_overhead_percent??0),ee=Number(Zi.channel_tail_overhead_percent_max??Zi.channel_tail_overhead_percent??0);s.push(Z({id:"EA-CHN-0001",category:"channel_alignment",title:"SIMD/micro-kernel channel tail overhead",evidence:"ESTIMATED",priority:Number(Zi.macs||0)/Math.max(1,Number(e?.total_macs||0))>=.05&&Number(Zi.channel_tail_overhead_percent||0)>=.25?"Medium":"Low",op:`#${te(Zi.index)} ${Zi.name}`,observation:`${nH(Zi.channel_alignment_detail||JT(Zi))} Modeled candidate-set lane utilization: ${Tp(1-ee,1-$)}; op MAC share ${(Number(Zi.macs||0)/Math.max(1,Number(e?.total_macs||0))*100).toFixed(1)}%; model-level impact not estimated.`,interpretation:"Actual overhead depends on runtime kernel selection, packing, and tail handling, and is not confirmed from the artifact alone.",recommendation:"Verify with a profiler or an aligned-head variant before acting; treat as an optimization opportunity, not a deployment defect.",relevance:"runtime performance verification input"}))}let qg=n?.backend_interpretations?.find($=>$.severity==="warn");qg&&s.push(Z({id:"EA-RUN-0002",category:"runtime",title:"Browser backend path mismatch",evidence:"MEASURED_SYNTHETIC",priority:"Medium",observation:`${qg.backend}: ${qg.note}`,interpretation:"Browser accelerator availability does not imply native delegate speed or numeric equivalence.",recommendation:"Use target runtime profiling for deployment claims and keep browser result as compatibility evidence.",relevance:"execution integrity; runtime compatibility"}));let k1=o?.drift_consistency?.warning;return k1&&s.push(Z({id:"EA-SYN-0001",category:"synthetic_sensitivity",title:"Synthetic perturbation plateau or saturation",evidence:"MEASURED_SYNTHETIC",priority:"Medium",observation:k1,interpretation:"Local synthetic perturbation does not show a monotonic amplitude response; this can happen with quantized plateaus.",recommendation:"Repeat with prepared/calibration inputs and compare output-specific drift before drawing robustness conclusions.",relevance:"numerical consistency; verification planning"})),s.push(Z({id:"EA-LIM-0001",category:"limitation",title:"Representative-data validation not assessable",evidence:"NOT_ASSESSABLE",priority:"Low",observation:"No training, validation, clinical, or representative calibration dataset is included in the deployment artifact.",interpretation:"Accuracy, clinical benefit, bias, subgroup performance, and generalizability cannot be concluded from this artifact alone.",recommendation:"Link this artifact report to external validation, calibration, and risk-management records.",relevance:"technical documentation boundary; regulatory limitation statement"})),s}function YV(e,t){return Number.isInteger(t)&&t>=0?(Xt(e)||[])[t]:null}function JV(e){return["INT8","UINT8"].includes(String(e?.dtype||"").toUpperCase())||Number(e?.quant_scales||0)>0}function eH(e){return(e?.format||"tflite")!=="tflite"?[]:(Qe(e)||[]).filter(t=>String(t.name||"").toUpperCase()==="DEPTHWISE_CONV_2D").map(t=>({op:t,weight:YV(e,Number(t.inputs?.[1]))})).filter(t=>JV(t.weight)&&Number(t.weight?.quant_scales||0)<=1)}function tH(e){let t=e?.scale_sample||[];return Number(t[0]||0)}function g5(e=[]){return Array.isArray(e)&&e.length?e.join("x"):"unknown-shape"}function Bd(e,t,n=`${t}s`){let i=Number(e||0);return`${C(i)} ${i===1?t:n}`}function nH(e){let t=String(e||"").trim();return t?/[.!?]$/.test(t)?t:`${t}.`:""}function iH(e={}){return e?.bundledRuntimeVersion||e?.litertRuntimeVersion||e?.tfliteRuntimeVersion||e?.runtimeVersion||""}function oH(e,t){let n=t?.dtype||"unknown",i=g5(t?.shape),o=tH(t),a=(t?.zero_point_sample||[])[0],r=["INT8","UINT8"].includes(String(n).toUpperCase())&&o>0?` Output dequantization contract: real_value = scale ${o} * (q - zero_point ${a??0}); implied representable range ${aH(n,o,a)}; include this in the application-side interpretation spec.`:"",s=Number.isInteger(t?.index)?t.index:Number(t?.tensor_index),c=Number.isFinite(s)?(Qe(e)||[]).find(u=>(u.outputs||[]).includes(s)):null;if(c){let u=String(c.name||"producer").toUpperCase();return u==="SOFTMAX"?`Output transform observed as SOFTMAX #${te(c.index)} producing ${n} ${i} output. Semantic class mapping, label order, and application-side output contract are not embedded.${r}`:`The graph output is produced by ${u} #${te(c.index)} as ${n} ${i}; no terminal SOFTMAX is observed, so probability semantics are NOT_ASSESSABLE from the artifact alone. No semantic label map, class ordering, or application-side output contract is embedded.${r}`}return`The artifact exposes ${n} ${i} output, but no semantic label map, class ordering, or application-side output contract is embedded.${r}`}function aH(e,t,n=0){let i=String(e||"").toUpperCase()==="INT8"?127:255,o=String(e||"").toUpperCase()==="INT8"?-128:0,a=Number(n||0),r=Number(t||0);return r>0?`[${(r*(o-a)).toExponential(4)}, ${(r*(i-a)).toExponential(4)}]`:"not computable"}function gh(e={},t={},n=0){let i=String(t.format||e.format||"unknown").toLowerCase(),o=(e.histogram||[]).filter(h=>/CUSTOM|FLEX|SELECT/i.test(h.name||"")),a=e.onnx_domain_analysis||null,r=a?[...a.external_custom_domains||[]]:[...new Set((Qe(e)||[]).map(h=>String(h.domain||"").trim()).filter(h=>h&&!["ai.onnx","ai.onnx.ml"].includes(h)))].sort(),s=Number(e.onnx_external_data_tensor_count||0),c=e.onnx_external_data||{},u=Number(c.verified_payload_count||0),l=Number(c.payload_verification_failed_count||0),_=Math.max(0,s-u),p=sH(e.opsets),d=rH(e,i,p),m=i==="onnx"?r.length?`external custom registry domains ${r.join(" / ")}`:`no external custom registry domain; ${a?.model_local_function_call_count||0} model-local function call(s); ${a?.ort_contrib_node_count||0} ORT contrib node(s)`:"external domains not applicable",f=i==="onnx"?s?`${s} ONNX external-data tensor(s): ${u} verified, ${l} failed verification, ${_} incomplete; ${Number(c.verified_payload_bytes||0)} verified payload byte(s)`:"no ONNX external-data tensor detected":"external data not applicable",g=cH(e,e.file_size||n||0,i);return{format:i,sha256:t.sha256||e.model_sha256||"pending-browser-export",file_size_bytes:e.file_size||n||0,schema_or_opset:d,tflite_version:e.version||"",onnx_ir_version:e.onnx_ir_version||0,onnx_producer:e.producer||"",onnx_opsets:p,graph_name:e.graph_name||"",subgraph_count:e.subgraph_count||1,custom_like_ops:o,external_domains:r,onnx_domain_analysis_status:a?.status||(i==="onnx"?"not_assessed":"not_applicable"),external_data_tensor_count:s,external_data_verified_tensor_count:u,external_data_verification_failed_count:l,external_data_incomplete_tensor_count:_,external_data_integrity_status:s===0||_===0?"complete":l>0?"verification_failed":"incomplete",external_data_summary:f,...g,summary:[d,o.length?`custom-like ${o.map(h=>`${h.name}:${h.count}`).join(" / ")}`:"no custom-like op family",m,f,g.tflite_buffer_summary].join("; ")}}function rH(e,t,n){return t==="onnx"?`IR ${e.onnx_ir_version||"unknown"} / opset ${n||"unknown"}`:t==="tflite"?`TFLite schema ${e.version||"unknown"}`:t==="gguf"?`GGUF v${e.gguf?.version||"unknown"}`:t==="safetensors"?"SafeTensors format (unversioned)":t==="coreml"?`Core ML specification ${e.coreml?.specification_version||"unknown"}`:t==="executorch"?`ExecuTorch ${String(e.executorch_container||"artifact").toUpperCase()} schema ${e.version??"unknown"}`:t==="unknown"?"Unknown artifact format":`${t} format; version not declared`}function sH(e=[]){return(e||[]).map(t=>`${t.domain||"ai.onnx"}:${t.version||"unknown"}`).join(" / ")}function cH(e={},t=0,n="unknown"){let i={tflite_constant_tensor_count:0,tflite_unique_constant_regions:0,tflite_constant_buffer_bytes:0,tflite_largest_constant_buffer_bytes:0,tflite_duplicate_constant_regions:0,tflite_out_of_bounds_tensor_buffers:0,tflite_buffer_summary:"TFLite tensor buffer posture not applicable"};if(n!=="tflite")return i;let o=(Xt(e)||[]).filter(p=>Number(p.buffer_data_length||0)>0),a=new Map,r=0;for(let p of o){let d=Number(p.buffer_data_offset||0),m=Number(p.buffer_data_length||0),f=`${d}:${m}`;a.set(f,(a.get(f)||0)+1),t&&d+m>t&&(r+=1)}let s=0,c=0,u=0;for(let[p,d]of a.entries()){let m=Number(p.split(":")[1]||0);s+=m,c=Math.max(c,m),d>1&&(u+=d-1)}let l=r?`${r} tensor constant buffer reference(s) exceed artifact byte length`:"all tensor constant buffers fit within artifact bytes",_=u?`${u} duplicate/shared non-empty tensor buffer region reference(s)`:"no duplicate non-empty tensor buffer regions";return{tflite_constant_tensor_count:o.length,tflite_unique_constant_regions:a.size,tflite_constant_buffer_bytes:s,tflite_largest_constant_buffer_bytes:c,tflite_duplicate_constant_regions:u,tflite_out_of_bounds_tensor_buffers:r,tflite_buffer_summary:`${o.length} tensor constant buffer(s), ${a.size} unique region(s), ${l}, ${_}`}}Ce();Me();Ce();Me();Ce();var y5="deepbom.artifact_set.v1",r0=/^[a-f0-9]{64}$/;function s0({filename:e,format:t,sha256:n,byteLength:i}){let o=Number(i);return c0({schema:y5,evidence_class:"OBSERVED_ACQUISITION",source:{kind:"local",canonical_locator:`local:${e}`,immutability:{kind:"sha256",value:n}},subject:{filename:e,format:t,sha256:n,byte_length:{decimal:String(o),number:o},identity_basis:"artifact_file_bytes"},files:[{role:"primary",path:e,sha256:n,byte_length:{decimal:String(o),number:o}}],trust:{remote_code_execution:"forbidden",pickle_execution:"forbidden",model_code_execution:"forbidden"}})}function c0(e){let t=w5(e);return delete t.artifact_set_sha256,v5(t),Object.freeze({...t,artifact_set_sha256:K(Q(t))})}function A5(e){let t=w5(e),n=String(t.artifact_set_sha256||"").toLowerCase();if(delete t.artifact_set_sha256,v5(t),!r0.test(n)||K(Q(t))!==n)throw new Error("Artifact-set SHA-256 is invalid.");return Object.freeze({...t,artifact_set_sha256:n})}function v5(e){if(e?.schema!==y5||e.evidence_class!=="OBSERVED_ACQUISITION")throw new Error("Artifact-set identity is invalid.");let t=e.source;if(!t||!["local","huggingface","https","gcs"].includes(t.kind)||!El(t.canonical_locator,2048)||!El(t.immutability?.kind,80)||!El(t.immutability?.value,256))throw new Error("Artifact-set source binding is invalid.");if(!Array.isArray(e.files)||!e.files.length||e.files.length>2e4)throw new Error("Artifact-set file inventory is invalid.");if(e.subject!=null){if(!El(e.subject.filename,1024)||!El(e.subject.format,80)||!r0.test(String(e.subject.sha256||""))||!El(e.subject.identity_basis,120))throw new Error("Artifact-set subject identity is invalid.");b5(e.subject.byte_length)}let n=new Set;for(let i of e.files){if(!["primary","sidecar","shard","manifest","configuration"].includes(i.role)||!lH(i.path)||n.has(i.path)||!r0.test(String(i.sha256||"")))throw new Error("Artifact-set file identity is invalid.");b5(i.byte_length),n.add(i.path)}if(e.files.filter(i=>i.role==="primary").length!==1)throw new Error("Artifact-set requires exactly one primary file.");if(e.trust?.model_code_execution!=="forbidden"||e.trust?.pickle_execution!=="forbidden"||e.trust?.remote_code_execution!=="forbidden")throw new Error("Artifact-set code-execution boundary is invalid.")}function b5(e){let t=String(e?.decimal||"");if(!/^\d+$/.test(t)||BigInt(t)<0n)throw new Error("Artifact-set byte length is invalid.");let n=BigInt(t),i=n<=BigInt(Number.MAX_SAFE_INTEGER)?Number(n):null;if((e.number==null?null:Number(e.number))!==i)throw new Error("Artifact-set byte length representations differ.")}function lH(e){let t=String(e||"").replaceAll("\\","/");return t.length>0&&t.length<=1024&&!t.startsWith("/")&&!/^[A-Za-z]:/.test(t)&&t.split("/").every(n=>n&&n!=="."&&n!=="..")}function El(e,t){let n=String(e||"").trim();return n.length>0&&n.length<=t}function w5(e){return JSON.parse(JSON.stringify(e))}Me();Ce();Me();Ce();var yh="deepbom.accelerator_profile.v1",Dd=/^[a-f0-9]{64}$/,uH=/^\d+\.\d+$/;function x5(e){let t=I5(e);return delete t.profile_sha256,N5(t),Object.freeze({...t,profile_sha256:K(Q(t))})}function E5(e){if(!e||e.schema!==yh)throw new Error("NVIDIA accelerator profile schema is invalid.");let t=I5(e),n=String(t.profile_sha256||"").toLowerCase();if(delete t.profile_sha256,N5(t),!Dd.test(n)||n!==K(Q(t)))throw new Error("NVIDIA accelerator profile SHA-256 is invalid.");return Object.freeze({...t,profile_sha256:n})}function N5(e){if(e.schema!==yh||e.evidence_class!=="OBSERVED_HOST_TOOLING")throw new Error("NVIDIA accelerator profile identity is invalid.");if(!Number.isFinite(Date.parse(e.collection?.collected_at))||!so(e.collection?.platform,80)||!so(e.collection?.architecture,80)||!so(e.collection?.collector,120)||!so(e.collection?.collector_version,80))throw new Error("NVIDIA accelerator profile collection identity is invalid.");if(!Array.isArray(e.devices)||!e.devices.length||e.devices.length>64)throw new Error("NVIDIA accelerator device inventory is invalid.");let t=new Set;for(let o of e.devices){if(!Number.isSafeInteger(o.index)||o.index<0||t.has(o.index)||!so(o.name,300)||!uH.test(String(o.compute_capability||""))||!so(o.driver_version,80)||!Dd.test(String(o.uuid_sha256||""))||!Dd.test(String(o.pci_bus_id_sha256||"")))throw new Error("NVIDIA accelerator device identity is invalid.");t.add(o.index),_H(o.memory_total_bytes,"device memory");for(let[a,r,s]of[["maximum SM clock",o.maximum_sm_clock_mhz,"maximum_sm_clock_mhz"],["maximum memory clock",o.maximum_memory_clock_mhz,"maximum_memory_clock_mhz"]]){if(r!=null&&(!Number.isSafeInteger(r)||r<=0))throw new Error(`NVIDIA accelerator ${a} is invalid.`);if(r==null&&!o.unexposed_fields?.includes(s))throw new Error(`NVIDIA accelerator ${a} absence is not declared.`)}if(o.uuid!=null&&!so(o.uuid,160))throw new Error("NVIDIA accelerator raw UUID is invalid.");if(o.pci_bus_id!=null&&!so(o.pci_bus_id,80))throw new Error("NVIDIA accelerator raw PCI bus ID is invalid.");if(o.sm_count!=null||o.memory_bus_width_bits!=null)throw new Error("NVIDIA accelerator profile must not infer fields not exposed by the collector contract.")}if(JSON.stringify([...e.devices].sort((o,a)=>o.index-a.index))!==JSON.stringify(e.devices))throw new Error("NVIDIA accelerator devices must be sorted by index.");if(bh(e.software?.nvidia_driver,"NVIDIA driver",!0),bh(e.software?.cuda_driver_api,"CUDA driver API",!1),bh(e.software?.cuda_toolkit,"CUDA toolkit",!1),bh(e.software?.tensorrt,"TensorRT",!1),e.devices.some(o=>o.driver_version!==e.software.nvidia_driver.version))throw new Error("NVIDIA accelerator device and software driver versions differ.");let n=e.collection?.tools;if(!Array.isArray(n)||!n.length||n.length>16||!n.some(o=>o.role==="nvidia_smi"&&o.status==="observed"))throw new Error("NVIDIA accelerator collector tool inventory is invalid.");for(let o of n){if(!so(o.role,80)||!["observed","execution_failed","not_installed"].includes(o.status))throw new Error("NVIDIA accelerator tool status is invalid.");if(o.status==="observed"||o.status==="execution_failed"){if(!so(o.executable_name,200)||!Dd.test(String(o.executable_sha256||""))||!Dd.test(String(o.observation_sha256||"")))throw new Error("NVIDIA accelerator observed tool identity is invalid.")}else if(o.executable_name!=null||o.executable_sha256!=null||o.observation_sha256!=null)throw new Error("NVIDIA accelerator absent tool must not carry invented identity.")}let i=e.roofline_contract;if(i?.status!=="not_assessable_missing_exact_hardware_contract"||i.theoretical_compute_ceiling!=null||i.theoretical_memory_bandwidth!=null||!Array.isArray(i.missing_fields)||!i.missing_fields.includes("sm_count")||!i.missing_fields.includes("memory_bus_width_bits"))throw new Error("NVIDIA accelerator roofline boundary is invalid.");if(!so(e.interpretation_boundary,1200))throw new Error("NVIDIA accelerator profile interpretation boundary is invalid.")}function bh(e,t,n){if(!e||!["observed","not_installed","not_exposed"].includes(e.status))throw new Error(`${t} status is invalid.`);if(n&&e.status!=="observed")throw new Error(`${t} must be observed.`);if(e.status==="observed"&&!so(e.version,120))throw new Error(`${t} version is invalid.`);if(e.status!=="observed"&&e.version!=null)throw new Error(`${t} absent status must not carry a version.`)}function _H(e,t){let n=String(e?.decimal||"");if(!/^\d+$/.test(n)||BigInt(n)<=0n)throw new Error(`NVIDIA accelerator ${t} exact value is invalid.`);let i=BigInt(n),o=i<=BigInt(Number.MAX_SAFE_INTEGER)?Number(i):null;if((e.number==null?null:Number(e.number))!==o)throw new Error(`NVIDIA accelerator ${t} number does not match its exact decimal value.`)}function so(e,t){let n=String(e||"").trim();return n&&n.length<=t}function I5(e){return JSON.parse(JSON.stringify(e))}var C5="deepbom.accelerator_profile_binding.v1",dH=/^[a-f0-9]{64}$/;function k5(e,t,{deviceIndex:n=null}={}){if(!Ah(t?.sha256))throw new Error("NVIDIA accelerator profile sidecar SHA-256 is required.");let i=E5(t?.document),o=pH(i.devices,n),a={schema:C5,status:"observed_host_profile_bound_selected_build_unbound",evidence_class:"OBSERVED_HOST_TOOLING/DERIVED_CONDITIONAL_CAPACITY",source:t?.path||null,source_sha256:t.sha256,profile_sha256:i.profile_sha256,selected_device:{index:o.index,name:o.name,compute_capability:o.compute_capability,driver_version:o.driver_version,memory_total_bytes:T5(o.memory_total_bytes),uuid_sha256:o.uuid_sha256,pci_bus_id_sha256:o.pci_bus_id_sha256},software:i.software,selected_build:{status:"not_bound",evidence_class:"NOT_ASSESSABLE",required_evidence:["runtime_binary_and_library_hashes","compiled_provider_or_backend_registry","precision_and_builder_flags"]},roofline:i.roofline_contract,llm_accelerator_residency:mH(e,o.memory_total_bytes),interpretation_boundary:"This binding proves the selected host-observed NVIDIA device, driver-facing software inventory, and exact physical VRAM reported by the collector. It does not prove that a CUDA, TensorRT, ORT, or other backend was compiled into the selected application; it does not prove provider assignment, engine selection, runtime allocation, latency, throughput, or fit. LLM capacity rows compare static serialized-storage plus logical-state lower bounds with physical VRAM under their stated simultaneous-residency assumption only."};return Object.freeze({...a,binding_sha256:K(Q(a))})}function S5(e){let t=JSON.parse(JSON.stringify(e||null)),n=String(t?.binding_sha256||"").toLowerCase();if(t&&delete t.binding_sha256,!t||t.schema!==C5||t.status!=="observed_host_profile_bound_selected_build_unbound"||!Ah(t.profile_sha256)||!Ah(t.source_sha256)||t.selected_build?.status!=="not_bound"||t.selected_build?.evidence_class!=="NOT_ASSESSABLE"||t.selected_device?.uuid!=null||t.selected_device?.pci_bus_id!=null)throw new Error("NVIDIA accelerator profile binding structure is invalid.");T5(t.selected_device?.memory_total_bytes);for(let i of t.llm_accelerator_residency?.scenarios||[])if(i.fit_claim!=="not_emitted"||!String(i.status||"").includes("lower_bound"))throw new Error("NVIDIA accelerator LLM residency claim boundary is invalid.");if(!Ah(n)||n!==K(Q(t)))throw new Error("NVIDIA accelerator profile binding SHA-256 is invalid.");return Object.freeze({...t,binding_sha256:n})}function pH(e,t){if(t==null){if(e.length!==1)throw new Error("The accelerator profile contains multiple devices; --accelerator-device is required.");return e[0]}let n=e.find(i=>i.index===t);if(!n)throw new Error(`NVIDIA accelerator device index ${t} is not present in the profile.`);return n}function mH(e,t){let n=e?.on_device_llm;if(!n)return{status:"not_applicable_non_llm_artifact",evidence_class:"NOT_APPLICABLE",scenarios:[],fit_claim:"not_emitted"};let i=za(t),o=n.memory_feasibility,a=[],r=e?.llm_token_budget_scenario||e?.cli_context_scenario;za(r?.memory_feasibility?.static_lower_bound_bytes)!=null&&za(r?.memory_feasibility?.logical_state_bytes||r?.memory_feasibility?.logical_kv_state_bytes)!=null&&a.push({scenario_source:"cli_declared",state_kind:r?.state_projection?.state_kind||"transformer_kv",context_length:r.context_length,batch_size:r.batch_size,storage_bits:r.state_storage_bits,logical_state_bytes:r.memory_feasibility.logical_state_bytes||r.memory_feasibility.logical_kv_state_bytes,static_lower_bound_bytes:r.memory_feasibility.static_lower_bound_bytes});for(let l of Array.isArray(o?.static_scenarios)?o.static_scenarios:[])a.push({scenario_source:"artifact_registered_matrix",...l});if(i==null||!a.length)return{status:"not_assessable_static_lower_bound_unavailable",evidence_class:"NOT_ASSESSABLE",scenarios:[],fit_claim:"not_emitted"};let s=n.storage?.layer_storage,c=s?.status==="assessed_exact_serialized_layer_storage"&&s?.conservation?.status==="pass"&&Array.isArray(s.layers)&&s.layers.every((l,_)=>l.layer_index===_&&za(l.serialized_bytes)!=null),u=a.map(l=>{let _=za(l.static_lower_bound_bytes);if(_==null)return null;let p=_>i,d={scenario_source:l.scenario_source,state_kind:l.state_kind,context_length:l.context_length,batch_size:l.batch_size,storage_bits:l.storage_bits,physical_vram_bytes:Ls(i),simultaneous_all_accelerator_lower_bound_bytes:Ls(_),status:p?"simultaneous_residency_lower_bound_exceeds_physical_vram":"simultaneous_residency_lower_bound_at_or_below_physical_vram_fit_unresolved",deficit_bytes:p?Ls(_-i):null,headroom_after_lower_bound_bytes:p?null:Ls(i-_),fit_claim:"not_emitted"};return c&&(d.serialized_layer_offload=fH(s,l.logical_state_bytes,i)),d}).filter(Boolean);return{status:u.some(l=>l.status==="simultaneous_residency_lower_bound_exceeds_physical_vram")?"assessed_with_insufficient_scenarios":"assessed_lower_bounds_do_not_prove_fit",evidence_class:"OBSERVED_SERIALIZED_STORAGE/OBSERVED_HOST_VRAM/DERIVED_CONDITIONAL_SCENARIO",capacity_scope:"selected_nvidia_device_physical_vram",residency_assumption:o?.residency_assumption||null,scenarios:u,fit_claim:"not_emitted",boundary:"A row exceeding physical VRAM proves that the stated simultaneous all-accelerator lower-bound scenario is insufficient. A row at or below VRAM does not prove fit. Serialized layer offload rows count serialized bytes only and exclude backend repacking, workspace, allocator overhead, replicas, application allocations, and runtime placement."}}function fH(e,t,n){let i=za(t),o=za(e.non_layer_bytes);if(i==null||o==null)return null;let a=[...e.layers].sort((u,l)=>l.layer_index-u.layer_index),r=i+o,s=0,c=[];if(r<=n)for(let u of a){let l=za(u.serialized_bytes);if(l==null||r+l>n)break;r+=l,s+=1,c.push(u.layer_index)}return{policy:"highest_index_first_serialized_bytes",non_layer_and_state_lower_bound_bytes:Ls(i+o),maximum_layer_count_not_exceeding_physical_vram_lower_bound:s,selected_layer_indices:c.sort((u,l)=>u-l),accounted_accelerator_lower_bound_bytes:Ls(r),status:i+o>n?"non_layer_and_state_lower_bound_exceeds_physical_vram":"serialized_lower_bound_not_exceeding_physical_vram_fit_unresolved",fit_claim:"not_emitted"}}function za(e){return e&&typeof e=="object"&&/^(?:0|[1-9]\d*)$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^(?:0|[1-9]\d*)$/.test(e)?BigInt(e):typeof e=="bigint"&&e>=0n?e:Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function T5(e){let t=za(e);if(t==null)throw new Error("NVIDIA accelerator memory value is invalid.");return Ls(t)}function Ls(e){return{decimal:String(e),number:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}}function Ah(e){return typeof e=="string"&&dH.test(e)}Me();Ce();var hH="deepbom.accelerator_binding.v1",wh=Object.freeze(["serialized_artifact","source_eligibility","selected_build","compiled_plan","observed_assignment","measured_execution"]),gH=/^[a-f0-9]{64}$/,bH=new Set(["apple","google","nvidia","qualcomm","android","onnxruntime","tensorflow"]),yH=new Set(["gpu","npu","tpu","heterogeneous_accelerator"]),AH=new Set(["source_rulepack","selected_build_attestation","compiled_plan_import","runtime_evidence_import","observed_host_profile"]);function ta(e){let t=B5(e);return Object.freeze({...t,binding_sha256:K(Q(t))})}function l0(e){let t=JSON.parse(JSON.stringify(e||null)),n=String(t?.binding_sha256||"").toLowerCase();t&&delete t.binding_sha256;let i=B5(t);if(!Ai(n)||n!==K(Q(i)))throw new Error("Accelerator binding SHA-256 is invalid.");return Object.freeze({...i,binding_sha256:n})}function u0(e,t){if(t?.schema!=="deepbom.coreml_compute_plan.v1"||t?.artifact?.sha256!==e?.model_sha256||!Ai(t?.normalized_manifest_sha256))throw new Error("Core ML accelerator binding requires an identity-bound normalized MLComputePlan.");return ta({profile_id:`apple_coreml_${String(t.configuration?.compute_units||"all").toLowerCase()}`,provider:"apple",backend:"coreml",device_class:"heterogeneous_accelerator",binding_source:"compiled_plan_import",evidence_stage:"compiled_plan",artifact_sha256:e.model_sha256,source_rulepack_sha256:t.runtime?.coremltools_compute_plan_source_sha256||null,selected_build_sha256:null,compiled_plan_sha256:t.normalized_manifest_sha256,runtime_trace_sha256:null,configuration:{compute_units:t.configuration?.compute_units||null,function_name:t.configuration?.function_name||null,compiled_model_content_sha256:t.runtime?.compiled_model_content_sha256||null,macos_version:t.runtime?.macos_version||null,os_build:t.runtime?.os_build||null,hardware_model:t.runtime?.hardware_model||null},coverage:{assessed_operation_count:t.summary?.mapped_operation_count??null,preferred_compute_device_counts:t.summary?.preferred_compute_device_counts||{},unresolved_operation_count:t.summary?.unresolved_device_usage_count??null},claims:No("compiled_plan"),interpretation_boundary:"This binding records MLComputePlan anticipated device usage for one compiled Core ML model and compute-unit configuration. It does not establish executed CPU, GPU, or Neural Engine assignment, physical transfer, latency, or task correctness."})}function _0(e,t){if(t?.schema!=="deepbom.accelerator_profile_binding.v1"||!Ai(t?.binding_sha256)||!Ai(t?.profile_sha256))throw new Error("NVIDIA accelerator binding requires a validated host profile binding.");return ta({profile_id:`nvidia_cuda_device_${t.selected_device?.index??0}`,provider:"nvidia",backend:"cuda",device_class:"gpu",binding_source:"observed_host_profile",evidence_stage:"serialized_artifact",artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:null,selected_build_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,host_profile_sha256:t.profile_sha256,configuration:{device_index:t.selected_device?.index??null,compute_capability:t.selected_device?.compute_capability||null,driver_version:t.selected_device?.driver_version||null,physical_vram_bytes:t.selected_device?.memory_total_bytes||null},coverage:{selected_build:"not_bound",assignment:"not_observed",execution:"not_measured"},claims:No("serialized_artifact"),interpretation_boundary:"The NVIDIA host profile is observed, but the selected CUDA, TensorRT, or ONNX Runtime build is not bound. No provider inclusion, layer assignment, execution, latency, or fit claim is emitted."})}function d0(e,t){if(t?.schema!=="deepbom.edgetpu_compiler_evidence.v1"||t?.artifact_sha256!==e?.model_sha256||!Ai(t?.evidence_sha256))throw new Error("Edge TPU accelerator binding requires validated compiler evidence for the active artifact.");return ta({profile_id:"google_edgetpu_compiler",provider:"google",backend:"edgetpu_compiler",device_class:"tpu",binding_source:"compiled_plan_import",evidence_stage:"compiled_plan",artifact_sha256:e.model_sha256,source_rulepack_sha256:null,selected_build_sha256:t.compiler.binary_sha256,compiled_plan_sha256:t.compiled_artifact_sha256,runtime_trace_sha256:null,configuration:{compiler_version:t.compiler.version,invocation_sha256:t.invocation_sha256,compiler_report_sha256:t.compiler_report_sha256},coverage:t.summary,claims:No("compiled_plan"),interpretation_boundary:"The Edge TPU compiler report binds mapped and unmapped serialized TFLite operations to one compiler binary, invocation, and compiled artifact. It is not an observed device assignment, transfer, latency, or successful execution trace."})}function p0(e,t){if(t?.schema!=="deepbom.litert_qualcomm_compiler_dispatch_evidence.v1"||t?.artifact_sha256!==e?.model_sha256||!Ai(t?.evidence_sha256))throw new Error("LiteRT Qualcomm accelerator binding requires validated compiler evidence for the active artifact.");return ta({profile_id:"litert_qualcomm_qnn_compiled_plan",provider:"qualcomm",backend:"litert_qnn",device_class:"npu",binding_source:"compiled_plan_import",evidence_stage:"compiled_plan",artifact_sha256:e.model_sha256,source_rulepack_sha256:t.source.rulepack_sha256,selected_build_sha256:t.compiler.binary_sha256,compiled_plan_sha256:t.compiled_plan_sha256,runtime_trace_sha256:null,configuration:{litert_commit:t.source.litert_commit,compiler_name:t.compiler.name,compiler_version:t.compiler.version,invocation_sha256:t.invocation_sha256,dispatch_status:t.dispatch.status,dispatch_runtime_binary_sha256:t.dispatch.runtime_binary_sha256,dispatch_evidence_sha256:t.dispatch.evidence_sha256},coverage:t.summary,claims:No("compiled_plan"),interpretation_boundary:t.interpretation_boundary})}function m0(e){return String(e?.format||"").toLowerCase()!=="tflite"||!Ai(e?.model_sha256)?[]:Rp(e).map(t=>{let n=t.profile_id==="tflite_coreml_delegate";return ta({profile_id:t.profile_id,provider:n?"apple":"qualcomm",backend:n?"tflite_coreml_delegate":"litert_qnn",device_class:n?"heterogeneous_accelerator":"npu",binding_source:"source_rulepack",evidence_stage:"source_eligibility",artifact_sha256:e.model_sha256,source_rulepack_sha256:t.source.rulepack_sha256,selected_build_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:{source_repository:t.source.repository,source_commit:t.source.commit,source_path:t.source.support_path},coverage:{assessed_operation_count:t.op_count,source_candidate_operation_count:t.state_counts.CONDITIONALLY_ELIGIBLE,definite_exclusion_count:t.state_counts.DEFINITE_EXCLUSION,unresolved_operation_count:t.state_counts.UNRESOLVED},claims:No("source_eligibility"),interpretation_boundary:t.interpretation_boundary})})}function f0(e,t){let n=t?.build_profile,i=t?.parser_observation,o=t?.engine_inspector_evidence;if(!n||!i&&!o)return null;let a=o?"compiled_plan":"selected_build";return ta({profile_id:n.execution_path==="ort_tensorrt_ep"?"onnxruntime_tensorrt_ep":"nvidia_tensorrt_native",provider:"nvidia",backend:n.execution_path==="ort_tensorrt_ep"?"ort_tensorrt_ep":"tensorrt",device_class:n.dla_core==null?"gpu":"heterogeneous_accelerator",binding_source:o?"compiled_plan_import":"selected_build_attestation",evidence_stage:a,artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:null,selected_build_sha256:i?.collector?.binary_sha256||null,compiled_plan_sha256:o?.engine?.sha256||null,runtime_trace_sha256:null,configuration:{build_profile_sha256:n.profile_sha256,execution_path:n.execution_path,precision:n.precision,device_id:n.device_id,device_compute_capability:n.device_compute_capability,dla_core:n.dla_core,allow_gpu_fallback:n.allow_gpu_fallback},coverage:{parser_observation_status:i?"observed":"not_bound",engine_inspector_status:o?.status||"not_bound",graph_operation_count:e?.ops?.length??null,projection_state_counts:t?.projection?.state_counts||{}},claims:No(a),interpretation_boundary:o?"The serialized TensorRT engine and inspector metadata are bound to the ONNX artifact and build profile. Selected tactics are engine metadata, not timing, physical transfer, memory allocation, task accuracy, or executed original-op assignment.":"TensorRT parser acceptance was observed for the selected binary and build profile. Engine build, optimized layers, tactics, execution, transfer, latency, and task accuracy remain unobserved."})}function vH(e,t){let n=t?.runtimeAssignmentEvidence||t?.runtime_assignment||t,i=Array.isArray(n?.assignments)?n.assignments:[];if(!i.length||String(n?.artifact_sha256||"").toLowerCase()!==String(e?.model_sha256||"").toLowerCase())return[];let o=new Map;for(let r of i){let s=EH(r?.provider);s&&(o.has(s.backend)||o.set(s.backend,{identity:s,rows:[]}),o.get(s.backend).rows.push(r))}let a=K(Q(n));return[...o.values()].map(({identity:r,rows:s})=>{let c=s.some(IH);return ta({profile_id:`${r.provider}_${r.backend}`,provider:r.provider,backend:r.backend,device_class:r.device_class,binding_source:"runtime_evidence_import",evidence_stage:c?"measured_execution":"observed_assignment",artifact_sha256:e.model_sha256,source_rulepack_sha256:null,selected_build_sha256:n.runtime_binary_sha256||n.binary_sha256||null,compiled_plan_sha256:null,runtime_trace_sha256:a,configuration:{runtime_name:n.runtime?.name||n.runtime_name||null},coverage:{observed_assignment_count:s.length,graph_operation_count:e?.ops?.length??null},claims:No(c?"measured_execution":"observed_assignment"),interpretation_boundary:"Provider assignment is imported from identity-bound runtime evidence. Timing is claimed only when additive per-row timing fields are present; physical transfer and unreported runtime internals remain outside this binding."})})}function h0(e,t=null){let n=e?.tflite_delegate_compatibility_evidence;if(n?.schema!=="deepbom.tflite_delegate_source_rulepack.v1"||!Ai(n?.rulepack_sha256))return[];let i=t?.tflite_delegate_build_inventory||null;return(n.profiles||[]).map(o=>{let a=o.id==="tflite_gpu",s=(a?i?.gpu?.compiled_status==="enabled_by_declared_cmake_option":i?.nnapi?.compiled_status==="enabled_by_declared_cmake_option_and_android_gate")&&Ai(i?.build_manifest_sha256)?"selected_build":"source_eligibility";return ta({profile_id:o.id,provider:a?"tensorflow":"android",backend:o.id,device_class:a?"gpu":"npu",binding_source:s==="selected_build"?"selected_build_attestation":"source_rulepack",evidence_stage:s,artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:n.rulepack_sha256,selected_build_sha256:s==="selected_build"?i.build_manifest_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:a?{compiled_status:i?.gpu?.compiled_status||"not_bound",quantized_model_flag_status:i?.gpu?.quantized_model_flag_status||"not_bound",experimental_flags:i?.gpu?.experimental_flags??null}:{compiled_status:i?.nnapi?.compiled_status||"not_bound",runtime_feature_level:i?.nnapi?.runtime_feature_level??null,accelerator_identity:i?.nnapi?.accelerator_identity||null,capability_source:i?.nnapi?.capability_source||"not_collected"},coverage:{assessed_operation_count:o.assessed_graph_op_count??e?.ops?.length??null,source_candidate_operation_count:o.source_candidate_after_artifact_precheck_count??null,definite_exclusion_count:o.definite_exclusion_count??null},claims:No(s),interpretation_boundary:s==="selected_build"?"The delegate source profile and selected-build inventory are bound. Device acceptance, partition assignment, physical transfer, execution, and latency remain unobserved.":"Pinned source registration and artifact-visible prechecks identify candidates only. Selected-build inclusion, device acceptance, partition assignment, execution, and latency remain unobserved."})})}function wH(e,t=null){let n=e?.ort_compatibility_evidence;if(!n||n.assessment_status!=="complete")return[];let i=Array.isArray(n.execution_providers)?n.execution_providers:[],o=t?.source?.adapter?.native_capture?.selected_build_provider_binding||t?.selected_build_provider_binding||null,a=new Map((o?.bindings||[]).filter(c=>c?.bundled===!0&&c?.source_profile).map(c=>[c.source_profile,c])),r=o?.source_build_attestation?.attestation_sha256||null,s=[];for(let c of i){let u=NH(c?.execution_provider);if(!u||!Ai(c?.source_sha256))continue;let l={assessed_operation_count:c.assessed_op_count??e?.ops?.length??null,source_candidate_operation_count:c.source_candidate_after_artifact_precheck_count??null,definite_exclusion_count:c.artifact_precheck_definite_fail_op_count??null,unresolved_operation_count:c.artifact_precheck_unresolved_op_count??null};s.push(ta({profile_id:`ort_${c.execution_provider}`,...u,binding_source:"source_rulepack",evidence_stage:"source_eligibility",artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:c.source_sha256,selected_build_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:{ort_source_commit:n.source_commit||null,execution_provider:c.execution_provider,source_id:c.source_id||null},coverage:l,claims:No("source_eligibility"),interpretation_boundary:"Pinned ONNX Runtime provider registrations and artifact-visible prechecks establish source eligibility only. Selected-build inclusion, GetCapability partitioning, optimized assignment, physical transfer, execution, latency, and task correctness remain unobserved."}));let _=a.get(c.execution_provider);!_||!Ai(r)||s.push(ta({profile_id:`ort_${c.execution_provider}`,...u,binding_source:"selected_build_attestation",evidence_stage:"selected_build",artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:c.source_sha256,selected_build_sha256:r,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:{ort_source_commit:n.source_commit||null,execution_provider:c.execution_provider,backend_name:_.backend_name,supported_backends_sha256:o.supported_backends_sha256||null},coverage:l,claims:No("selected_build"),interpretation_boundary:"The selected ONNX Runtime build attestation includes this provider and is cross-referenced to its pinned source profile. GetCapability acceptance, graph transforms, optimized assignment, physical transfer, execution, latency, and task correctness remain unobserved."}))}return s}function R5(e,t=null,n=null){let i=Ai(n)?{...e,model_sha256:n}:e,o=[...Array.isArray(i?.accelerator_bindings)?i.accelerator_bindings:[]];if(!Ai(i?.model_sha256))return xh(o);i?.accelerator_profile_binding&&o.push(_0(i,i.accelerator_profile_binding));let a=i?.coreml_compute_plan||(t?.schema==="deepbom.coreml_compute_plan.v1"?t:null)||t?.coreml_compute_plan||null;a&&o.push(u0(i,a)),i?.edgetpu_compiler_evidence&&o.push(d0(i,i.edgetpu_compiler_evidence)),i?.litert_qualcomm_evidence&&o.push(p0(i,i.litert_qualcomm_evidence));let r=f0(i,i?.tensorrt_static_preflight);return r&&o.push(r),o.push(...h0(i,t)),o.push(...m0(i)),o.push(...wH(i,t)),o.push(...vH(i,t)),xh(o)}function xh(...e){let t=new Map;for(let n of e.flat(1/0).filter(Boolean)){let i=l0(n),o=`${i.profile_id}\0${i.evidence_stage}\0${i.binding_sha256}`;t.set(o,i)}return[...t.values()].sort((n,i)=>n.profile_id.localeCompare(i.profile_id)||wh.indexOf(n.evidence_stage)-wh.indexOf(i.evidence_stage)||n.binding_sha256.localeCompare(i.binding_sha256))}function B5(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Accelerator binding must be an object.");let t=vh(e.evidence_stage,wh,"accelerator evidence stage"),n={schema:hH,profile_id:O5(e.profile_id,"accelerator profile id"),provider:vh(e.provider,bH,"accelerator provider"),backend:O5(e.backend,"accelerator backend"),device_class:vh(e.device_class,yH,"accelerator device class"),binding_source:vh(e.binding_source,AH,"accelerator binding source"),evidence_stage:t,artifact_sha256:Ps(e.artifact_sha256,"artifact SHA-256"),source_rulepack_sha256:Md(e.source_rulepack_sha256,"source rulepack SHA-256"),selected_build_sha256:Md(e.selected_build_sha256,"selected build SHA-256"),compiled_plan_sha256:Md(e.compiled_plan_sha256,"compiled plan SHA-256"),runtime_trace_sha256:Md(e.runtime_trace_sha256,"runtime trace SHA-256"),host_profile_sha256:Md(e.host_profile_sha256,"host profile SHA-256"),configuration:z5(e.configuration,"accelerator configuration"),coverage:z5(e.coverage,"accelerator coverage"),claims:xH(e.claims,t),interpretation_boundary:CH(e.interpretation_boundary,"accelerator interpretation boundary")};if(t==="source_eligibility"&&!n.source_rulepack_sha256)throw new Error("Source-eligibility binding requires source_rulepack_sha256.");if(t==="selected_build"&&!n.selected_build_sha256)throw new Error("Selected-build binding requires selected_build_sha256.");if(t==="compiled_plan"&&!n.compiled_plan_sha256)throw new Error("Compiled-plan binding requires compiled_plan_sha256.");if(["observed_assignment","measured_execution"].includes(t)&&!n.runtime_trace_sha256)throw new Error(`${t} binding requires runtime_trace_sha256.`);return n}function No(e){let t=wh.indexOf(e);return{source_eligibility:t>=1,selected_build:t>=2,compiled_plan:t>=3,observed_assignment:t>=4,measured_execution:t>=5}}function xH(e,t){let n=No(t);for(let i of Object.keys(n))if(e?.[i]!==n[i])throw new Error(`Accelerator claim ${i} is inconsistent with evidence stage ${t}.`);return n}function EH(e){let t=String(e||"").toLowerCase();return/tensorrt/.test(t)?{provider:"nvidia",backend:"tensorrt",device_class:"gpu"}:/cuda/.test(t)?{provider:"nvidia",backend:"cuda",device_class:"gpu"}:/qnn/.test(t)?{provider:"qualcomm",backend:"qnn",device_class:"npu"}:/nnapi/.test(t)?{provider:"android",backend:"nnapi",device_class:"npu"}:/coreml/.test(t)?{provider:"apple",backend:"coreml",device_class:"heterogeneous_accelerator"}:/directml/.test(t)?{provider:"onnxruntime",backend:"directml",device_class:"gpu"}:/webgpu/.test(t)?{provider:"onnxruntime",backend:"webgpu",device_class:"gpu"}:/webnn/.test(t)?{provider:"onnxruntime",backend:"webnn",device_class:"heterogeneous_accelerator"}:/gpu/.test(t)?{provider:"tensorflow",backend:"tflite_gpu",device_class:"gpu"}:null}function NH(e){return{cuda:{provider:"nvidia",backend:"ort_cuda",device_class:"gpu"},directml:{provider:"onnxruntime",backend:"ort_directml",device_class:"gpu"},webgpu:{provider:"onnxruntime",backend:"ort_webgpu",device_class:"gpu"},webnn:{provider:"onnxruntime",backend:"ort_webnn",device_class:"heterogeneous_accelerator"},qnn:{provider:"qualcomm",backend:"ort_qnn",device_class:"npu"},coreml:{provider:"apple",backend:"ort_coreml",device_class:"heterogeneous_accelerator"},nnapi:{provider:"android",backend:"ort_nnapi",device_class:"npu"}}[String(e||"").toLowerCase()]||null}function IH(e){return[e?.duration_us,e?.duration_sum_us].some(t=>{if(t==null||t===""||typeof t=="boolean")return!1;let n=Number(t);return Number.isFinite(n)&&n>=0})}function z5(e,t){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new Error(`${t} must be an object.`);return JSON.parse(Q(e))}function vh(e,t,n){let i=String(e||"").trim();if(!(typeof t?.has=="function"?t.has(i):Array.isArray(t)&&t.includes(i)))throw new Error(`${n} is invalid.`);return i}function O5(e,t){let n=String(e||"").trim();if(!/^[a-z0-9][a-z0-9_.-]{0,127}$/.test(n))throw new Error(`${t} is invalid.`);return n}function CH(e,t){let n=String(e||"").trim();if(!n||n.length>2e3)throw new Error(`${t} is invalid.`);return n}function Ps(e,t){let n=String(e||"").toLowerCase();if(!Ai(n))throw new Error(`${t} is invalid.`);return n}function Md(e,t){return e==null||e===""?null:Ps(e,t)}function Ai(e){return typeof e=="string"&&gH.test(e)}var Eh=/^[a-f0-9]{64}$/,D5=new Set(["default_assumption","explicit_id","profile_file"]);function g0(e,{bindingSource:t,sourceInput:n=null}={}){let i=String(e?.id||"").trim(),o=String(e?.profile_sha256||"").trim().toLowerCase();if(!i)throw new Error("CPU cost target profile id is required.");if(!Eh.test(o))throw new Error("CPU cost target profile SHA-256 is required.");if(!D5.has(t))throw new Error("CPU cost target binding source is invalid.");let a={schema:"deepbom.cpu_cost_target_binding.v1",profile_id:i,profile_sha256:o,binding_source:t,host_observed:!1,source_input:t==="profile_file"?M5(n):null};return b0(a),a}function b0(e){if(e?.schema!=="deepbom.cpu_cost_target_binding.v1")throw new Error("CPU cost target binding schema is invalid.");if(!String(e.profile_id||"").trim())throw new Error("CPU cost target binding profile id is missing.");if(!Eh.test(String(e.profile_sha256||"")))throw new Error("CPU cost target binding profile SHA-256 is invalid.");if(!D5.has(e.binding_source))throw new Error("CPU cost target binding source is invalid.");if(e.host_observed!==!1)throw new Error("CPU cost target profiles are planning inputs and cannot claim host observation.");if(e.binding_source==="profile_file")M5(e.source_input);else if(e.source_input!=null)throw new Error("Built-in CPU target bindings cannot carry a profile-file source input.");return e}function M5(e){let t={filename:String(e?.filename||"").trim(),byte_length:Number(e?.byte_length),source_sha256:String(e?.source_sha256||"").toLowerCase(),normalized_profile_sha256:String(e?.normalized_profile_sha256||"").toLowerCase(),duplicate_key_validation:String(e?.duplicate_key_validation||"")};if(!t.filename||!Number.isSafeInteger(t.byte_length)||t.byte_length<=0||!Eh.test(t.source_sha256)||!Eh.test(t.normalized_profile_sha256)||t.duplicate_key_validation!=="complete")throw new Error("CPU cost target profile-file source input is invalid.");return t}var kH="deepbom.mac_coverage.v1",$5=new Set(["gguf","safetensors"]);function qs(e={},t=null){let n=String(e?.format||"unknown").toLowerCase(),i=e?.mac_assessment||null,o=t||e?.quantization_status||{},a=Ih(i?.compute_ops),r=Ih(o?.compute_ops),s=SH(e?.ops),c=a??r??s,u=Ih(i?.assessed_compute_ops),l=P5(i?.status);if($5.has(n))return Nh(n,"not_applicable_weight_container",0,0,"serialized_format_has_no_execution_graph");if(l){let _=u??(y0(l)?c:null),p=n==="tflite"&&y0(l)?"assessed":l;return Nh(n,p,c,_,_==null?"assessed_compute_operator_count_not_emitted":null)}if(n==="tflite"&&Array.isArray(e?.ops)&&Ch(e?.total_macs)!=null){let _=e.ops.every(p=>Ch(p?.macs)!=null);return Nh(n,_?"assessed":"not_assessed_incomplete_mac_ledger",c,_?c:null,_?null:"one_or_more_serialized_operators_lack_mac_evidence")}return Nh(n,"not_assessed",c,u,"format_adapter_did_not_emit_a_complete_mac_assessment")}function L5(e={},t=null,n=null){let i=String(e?.format||"unknown").toLowerCase(),o=t||e?.quantization_status||{},a=n||qs(e,o),r=Ih(o?.quantized_compute_ops),s=Ch(o?.quantized_compute_mac_percent);return $5.has(i)?{operator_status:"not_applicable_weight_container",operator_reason:"serialized_format_has_no_execution_graph",mac_status:"not_applicable_weight_container",mac_reason:"serialized_format_has_no_execution_graph"}:s!=null?{operator_status:r==null?"not_assessed_quantized_operator_count_unavailable":"assessed",operator_reason:r==null?"quantized_compute_operator_count_not_emitted":null,mac_status:"assessed",mac_reason:null}:A0(a)?i==="coreml"&&r==null?{operator_status:"not_assessed_execution_precision_not_serialized",operator_reason:"serialized_weights_do_not_establish_executed_operator_precision",mac_status:"not_assessed_execution_precision_not_serialized",mac_reason:"serialized_weights_do_not_establish_which_compute_operators_execute_quantized"}:{operator_status:r==null?"not_assessed_quantized_operator_count_unavailable":"assessed",operator_reason:r==null?"quantized_compute_operator_count_not_emitted":null,mac_status:"not_assessed_quantization_contract_unavailable",mac_reason:"quantized_compute_mac_ledger_not_emitted"}:{operator_status:r==null?"not_assessed_quantized_operator_count_unavailable":"assessed",operator_reason:r==null?"quantized_compute_operator_count_not_emitted":null,mac_status:"not_assessed_mac_coverage_incomplete",mac_reason:a.reason||a.status}}function A0(e){return e?.compute_ops!=null&&e?.assessed_compute_ops===e.compute_ops&&y0(e?.status)}function Nh(e,t,n,i,o){if(n!=null&&i!=null&&i>n)throw new Error("MAC coverage assessed compute operators exceed the compute-operator denominator.");return Object.freeze({schema:kH,format:e,status:t,compute_ops:n,assessed_compute_ops:i,unassessed_compute_ops:n==null||i==null?null:n-i,reason:o})}function y0(e){let t=P5(e);return!!t&&!/not_assessed|incomplete|partial|unresolved|failed/.test(t)&&/assessed|complete/.test(t)}function P5(e){return String(e||"").trim().toLowerCase().replaceAll("-","_")}function Ih(e){if(e==null||e==="")return null;let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:null}function Ch(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function SH(e){return Array.isArray(e)?e.reduce((t,n)=>t+(Ch(n?.macs)>0?1:0),0):null}var kh=Object.freeze(["OBSERVED","SOURCE_BACKED","DERIVED","DERIVED_WITH_HEURISTIC_THRESHOLD","PREDICTED","ESTIMATED","DECLARED_UNVERIFIED","MEASURED","NOT_ASSESSABLE","NOT_APPLICABLE"]),q5=new Set(kh);function j5(e,t="NOT_ASSESSABLE"){let n=String(e||"").trim().toUpperCase().replaceAll("-","_").replaceAll(" ","_");return q5.has(n)?n:n.includes("NOT_ASSESSABLE")||n.includes("NOT_ASSESSED")?"NOT_ASSESSABLE":n.includes("NOT_APPLICABLE")?"NOT_APPLICABLE":n.includes("MEASURED")||n.includes("OBSERVED_RUNTIME")||n.includes("IMPORTED_IDENTITY_BOUND_RUNTIME_EVIDENCE")?"MEASURED":n.includes("PREDICTED")?"PREDICTED":n.includes("ESTIMATED")?"ESTIMATED":n.includes("SOURCE_BACKED")||n.includes("SOURCE_BASED")||n.includes("SOURCE_PINNED")?"SOURCE_BACKED":n.includes("DECLARED")?"DECLARED_UNVERIFIED":n.includes("HEURISTIC")?"DERIVED_WITH_HEURISTIC_THRESHOLD":n.includes("DERIVED")?"DERIVED":n.includes("OBSERVED")?"OBSERVED":q5.has(t)?t:"NOT_ASSESSABLE"}Pd();var jH=Object.freeze(["exact","symbolic","partial","not_applicable"]),FH=new Set(["gguf","safetensors"]);function qd(e){return!e||typeof e!="object"||Array.isArray(e)||(e.total_macs===void 0&&(e.total_macs=null),e.total_macs_decimal===void 0&&(e.total_macs_decimal=null),e.mac_confidence=jd(e)),e}function jd(e={}){let t=String(e?.mac_confidence||e?.mac_assessment?.confidence||"").trim().toLowerCase().replaceAll("-","_");if(jH.includes(t))return t;let n=String(e?.format||"unknown").toLowerCase();if(FH.has(n))return"not_applicable";let i=qs(e);if(String(i.status||"").toLowerCase().includes("not_applicable")||i.compute_ops===0&&i.assessed_compute_ops===0)return"not_applicable";if(A0(i)&&QH(e.total_macs)!=null)return"exact";let a=String(e?.dynamic_shape_cost_contract?.total_macs_formula_status||e?.mac_assessment?.formula_status||"").toLowerCase();return(e?.dynamic_shape_cost_contract?.total_macs_formula??e?.mac_assessment?.total_macs_formula??null)&&/exact_symbolic|symbolic_exact/.test(a)?"symbolic":"partial"}function QH(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}var K5="deepbom.artifact_evidence_envelope.v1",UH=/^[a-f0-9]{64}$/i,GH=Object.freeze({tflite:["artifact_identity","graph","interfaces","tensor_payloads","affine_quantization","metadata","associated_files","runtime_floor","static_cost","tflite_arena","xnnpack_contracts","quantization_proofs","artifact_byte_integrity"],onnx:["artifact_identity","graph","interfaces","tensor_payloads","affine_quantization","metadata","external_data","runtime_floor","static_cost","opset_contracts","recursive_types","control_flow","onnx_runtime_contracts","llm_serialized_graph","tensorrt_static_preflight"],gguf:["artifact_identity","tensor_inventory","tensor_payloads","block_quantization","metadata","runtime_requirements","llm_architecture","llm_tokenizer","llm_layer_storage","llm_state_projection","llm_compute_scenario","llm_memory_feasibility","llm_static_memory_placement","llm_runtime_contract","medical_deployment_declaration"],safetensors:["artifact_identity","tensor_inventory","tensor_payloads","tensor_payload_ranges","metadata","llm_architecture","llm_tokenizer","llm_layer_storage","llm_state_projection","llm_compute_scenario","llm_memory_feasibility","llm_static_memory_placement","llm_runtime_contract","medical_deployment_declaration"],coreml:["artifact_identity","package_inventory","graph","interfaces","tensor_payloads","affine_quantization","metadata","runtime_requirements","static_cost"]});function qe(e){return String(e??"").trim()}function co(e){let t=qe(e).toLowerCase();return UH.test(t)?t:null}function Oa(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Z5(e){return[...new Set(e.filter(Boolean))]}function X5(e,t="NOT_ASSESSABLE"){return j5(e,t)}function VH(e){let t=e?.metadata_presence||{};return{status:qe(t.status||"not_assessed"),evidence_class:t.status==="assessed"?"OBSERVED":"NOT_ASSESSABLE",producer_name:qe(t.producer_name)||null,producer_version:qe(t.producer_version)||null,model_version:qe(t.metadata_model_version||t.model_version)||null,author:qe(t.metadata_author)||null,license:qe(t.metadata_license)||null,description:qe(t.metadata_model_description||t.description)||null,preprocessing_contract_status:qe(t.preprocessing_contract_status||"not_declared"),output_semantics_documented:t.output_semantics_documented===!0}}function HH(e){let t=e?.onnx_external_data||{},n=t.tensors||[];return(t.supplied_files||[]).filter(i=>i?.used===!0&&co(i.sha256)).map(i=>{let o=qe(i.path),a=n.filter(c=>qe(c.sidecar_path)===o),r=Z5(a.map(c=>qe(c.payload_status))),s=a.length>0&&a.every(c=>c.payload_status==="verified");return{role:"external_weights",path:o,byte_length:Oa(i.byte_length),sha256:co(i.sha256),sha1:qe(i.sha1)||null,required:!0,evidence_class:"OBSERVED",verification_status:s?"payload_range_cardinality_and_hash_verified":`payload_verification_incomplete:${r.join(",")||"reference_status_unavailable"}`}})}function KH(e){let t=e?.metadata_presence||{};return(t.packed_associated_files||[]).filter(i=>co(i?.payload_sha256)).map(i=>({role:"associated_file",path:qe(i.name||i.path),byte_length:Oa(i.decoded_size??i.uncompressed_size),sha256:co(i.payload_sha256),sha1:null,required:(t.output_associated_files||[]).some(o=>o?.name===i?.name),evidence_class:"OBSERVED",verification_status:qe(i.status||i.payload_status||"archive_payload_verified")}))}function ZH(e){return(e?.artifact_bundle?.files||[]).filter(t=>co(t?.sha256)).map(t=>({role:qe(t.role||"supporting_file"),path:qe(t.path||t.name),byte_length:Oa(t.byte_length??t.size),sha256:co(t.sha256),sha1:null,required:t.required!==!1,evidence_class:X5(t.evidence_class,"OBSERVED"),verification_status:qe(t.verification_status||"hash_verified")}))}function XH(e){let t=[...HH(e),...KH(e),...ZH(e)],n=new Set;return t.filter(i=>{let o=`${i.sha256}:${i.path}`;return n.has(o)?!1:(n.add(o),!0)})}function WH(e,t){let n=new Set(GH[t]||["artifact_identity"]),i=new Map,o=(s,c,u=!0)=>{!n.has(s)||i.has(s)||i.set(s,c==null?"unavailable":u?"assessed":"partial")},a=(s,c,u)=>{!n.has(s)||i.has(s)||i.set(s,YH(u,c))};if(o("artifact_identity",e),o("graph",Qe(e)&&Xt(e)),o("interfaces",e?.inputs&&e?.outputs),t==="onnx"){let s=e?.weight_integrity;o("tensor_payloads",s||e?.onnx_external_data_structure_binding,s?.status==="assessed"&&s?.coverage_status==="complete")}else o("tensor_payloads",e?.weight_integrity||e?.tensor_numerical_integrity||Xt(e),e?.tensor_numerical_integrity?e.tensor_numerical_integrity.status==="assessed":t==="coreml"?e?.weight_integrity?.status==="assessed":!0);o("affine_quantization",Xt(e)),o("metadata",e?.metadata_presence),t==="onnx"&&Number(e?.onnx_external_data?.tensor_count||0)===0?o("external_data",e?.onnx_external_data,!0):e?.onnx_external_data_structure_binding?o("external_data",e.onnx_external_data_structure_binding,!1):a("external_data",e?.onnx_external_data,e?.onnx_external_data?.status),o("associated_files",e?.metadata_presence,e?.metadata_presence?.associated_file_archive_status!=="partial"),a("runtime_floor",e?.runtime_compat||e?.ort_compatibility_evidence,e?.runtime_compat?.status||e?.runtime_compat?.assessment_status||e?.ort_compatibility_evidence?.status),o("static_cost",e?.mac_assessment||(t==="tflite"&&Oa(e?.total_macs)!=null?Qe(e):null),t==="coreml"?e?.mac_assessment?.status==="assessed_all_decoded_compute_ops"&&Oa(e?.total_macs)!=null:!0),a("tflite_arena",e?.tensor_arena_plan,e?.tensor_arena_plan?.status),a("xnnpack_contracts",e?.xnnpack_selector_assessment_status,e?.xnnpack_selector_assessment_status),a("quantization_proofs",e?.quant_research_coverage||e?.channel_vitality,e?.quant_research_coverage?.status||e?.channel_vitality?.status),a("artifact_byte_integrity",e?.artifact_byte_integrity,e?.artifact_byte_integrity?.status),a("opset_contracts",e?.onnx_domain_analysis,e?.onnx_domain_analysis?.status),a("recursive_types",e?.onnx_type_proto_contract,e?.onnx_type_proto_contract?.status),a("control_flow",e?.onnx_shape_inference,e?.onnx_shape_inference?.status),a("onnx_runtime_contracts",e?.ort_compatibility_evidence,e?.ort_compatibility_evidence?.status),o("tensor_inventory",Xt(e)||e?.tensor_inventory),a("block_quantization",e?.gguf?.quantization||e?.quantization_status,e?.gguf?.quantization?.status||e?.quantization_status?.status),o("metadata",e?.metadata_presence||e?.metadata),o("package_inventory",e?.artifact_bundle),a("runtime_requirements",e?.runtime_compat||e?.runtime_requirements||e?.gguf?.backend_compatibility,e?.runtime_compat?.status||e?.runtime_requirements?.status||e?.gguf?.backend_compatibility?.status),o("tensor_payload_ranges",e?.tensor_inventory),a("llm_architecture",e?.on_device_llm?.architecture,e?.on_device_llm?.status),a("llm_tokenizer",e?.on_device_llm?.tokenizer,e?.on_device_llm?.tokenizer?.status),a("llm_layer_storage",e?.on_device_llm?.storage?.layer_storage,e?.on_device_llm?.storage?.layer_storage?.status),a("llm_state_projection",e?.on_device_llm?.state?.kv_projection,e?.on_device_llm?.state?.kv_projection?.status),a("llm_recurrent_state_projection",e?.on_device_llm?.state?.recurrent_projection,e?.on_device_llm?.state?.recurrent_projection?.status),a("llm_compute_scenario",e?.on_device_llm?.compute?.projection,e?.on_device_llm?.compute?.projection?.status),a("llm_memory_feasibility",e?.on_device_llm?.memory_feasibility,e?.on_device_llm?.memory_feasibility?.status),a("llm_static_memory_placement",e?.on_device_llm?.static_memory_placement,e?.on_device_llm?.static_memory_placement?.status),a("llm_runtime_contract",e?.on_device_llm?.runtime_contract,e?.on_device_llm?.runtime_contract?.status),a("llm_serialized_graph",e?.on_device_llm?.serialized_graph,e?.on_device_llm?.serialized_graph?.status),a("tensorrt_static_preflight",e?.tensorrt_static_preflight,e?.tensorrt_static_preflight?.status),a("tensorrt_llm_static_contract",e?.on_device_llm?.tensorrt_llm,e?.on_device_llm?.tensorrt_llm?.status),a("medical_deployment_declaration",e?.on_device_llm?.medical_ai_claim_boundary,"not_declared_in_artifact");for(let s of n)i.has(s)||i.set(s,"unavailable");let r=s=>[...i].filter(([,c])=>c===s).map(([c])=>c);return{schema:"deepbom.artifact_capability_manifest.v1",format:t,declared_capabilities:[...n],assessed:r("assessed"),partial:r("partial"),unavailable:r("unavailable"),conservation:{declared:n.size,classified:i.size,valid:n.size===i.size}}}function YH(e,t){if(t==null)return"unavailable";let n=qe(e).toLowerCase().replaceAll("-","_");return!n||/not_assessed|not_declared|not_selected|unavailable|unbound|external|unknown/.test(n)?"unavailable":/invalid|failed|partial|incomplete|unresolved|unsupported/.test(n)?"partial":/assessed|complete|observed|verified|source_candidate|available|decoded|bound/.test(n)?"assessed":"partial"}function JH(e,t){let n=Array.isArray(t?.findings)?t.findings:null;if(!n)try{n=hh(e,{runtimeEvidence:t?.runtimeEvidence||null,analyzerMetadata:t?.analyzerMetadata})}catch{n=[]}return n.map((i,o)=>({id:qe(i.finding_id||i.id||i.code||`finding-${o+1}`),title:qe(i.title||i.name||"Static analysis finding"),severity:qe(i.technical_priority||i.severity||"info").toLowerCase(),finding_kind:e0.includes(i.finding_kind)?i.finding_kind:"caution",status:qe(i.status||"open"),evidence_class:X5(i.evidence_class||i.evidenceClass,"DERIVED"),source_evidence_class:qe(i.evidence_class||i.evidenceClass)||null,summary:qe(i.observation||i.summary||i.description||i.detail),interpretation:qe(i.interpretation)||null,recommendation:qe(i.recommendation)||null,...Number.isSafeInteger(i.affected_tensor_count)?{affected_tensor_count:i.affected_tensor_count}:{},...Number.isSafeInteger(i.assessed_tensor_count)?{assessed_tensor_count:i.assessed_tensor_count}:{},...Array.isArray(i.affected_tensors)?{affected_tensors:i.affected_tensors.map(qe).filter(Boolean)}:{},...Array.isArray(i.affected_tensors)?{affected_tensors_truncated:i.affected_tensors_truncated===!0}:{},...Number.isSafeInteger(i.affected_tensor_count)?{affected_tensor_count:i.affected_tensor_count}:{},...Number.isSafeInteger(i.assessed_tensor_count)?{assessed_tensor_count:i.assessed_tensor_count}:{},...Array.isArray(i.affected_tensors)?{affected_tensors:i.affected_tensors.map(qe).filter(Boolean)}:{},...Array.isArray(i.affected_tensors)?{affected_tensors_truncated:i.affected_tensors_truncated===!0}:{},source_pointers:Z5([i.evidence_json_pointer,...i.evidence_json_pointers||[],...i.evidence_pointers||[]].map(qe)),rule_id:qe(i.source_rule_id||i.rule_id||i.ruleId)||null}))}function eK(e,t){if(t==="tflite")return{schema_version:e?.schema_version??null,subgraph_count:e?.subgraphs??null,metadata_schema_identifier:e?.metadata_presence?.metadata_schema_identifier||null,arena_contract_schema:e?.tensor_arena_plan?.schema||null,xnnpack_rulepack_schema:e?.xnnpack_delegate_assessment?.schema||null,artifact_byte_integrity:e?.artifact_byte_integrity||null};if(t==="onnx")return{ir_version:e?.onnx_ir_version??null,opsets:e?.opsets||[],producer:e?.producer||e?.metadata_presence?.producer_name||null,domain_contract_schema:e?.onnx_domain_analysis?.schema||null,shape_contract_schema:e?.onnx_shape_inference?.schema||null,contract_conflict_capsule:e?.onnx_contract_conflict||null,quantization_binding_schema:e?.onnx_quantization_binding?.schema||null,external_data_structure_binding:e?.onnx_external_data_structure_binding||null,on_device_llm:e?.on_device_llm||null,tensorrt_static_preflight:e?.tensorrt_static_preflight||null};let n=e?.format_extensions?.[t]||e?.[t]||null;return["gguf","safetensors"].includes(t)?{...n,tensor_numerical_integrity:e?.tensor_numerical_integrity||null,on_device_llm:e?.on_device_llm||null}:t==="coreml"?{...n,weight_integrity:e?.weight_integrity||null,package_blob_integrity:e?.coreml_blob_integrity||null,tensor_liveness:e?.tensor_liveness||null,size_breakdown:e?.size_breakdown||null,mac_assessment:e?.mac_assessment||null}:t==="executorch"?{container:e?.executorch_container||null,version:e?.version??null,program:e?.executorch_program||null,flat_tensor:e?.executorch_flat_tensor||null,planned_memory:e?.tensor_liveness||null,size_breakdown:e?.size_breakdown||null,mac_assessment:e?.mac_assessment||null}:n}function Fs(e={},t={}){let n=qe(e.format||t.format||"unknown").toLowerCase(),i=e?.llm_token_budget_scenario||e?.cli_context_scenario||null,o=qs(e),a=ea(e),r=XH(e),s=JH(e,t),c={filename:qe(e.filename||t.filename||"model"),format:n,sha256:co(t.hash||e.model_sha256),hash_basis:qe(e?.artifact_bundle?.hash_basis||"artifact_file_bytes_sha256"),byte_length:Oa(t.fileSizeBytes??e.file_size_bytes??e.file_size),schema_or_opset:qe(t.schemaOrOpset||e.schema_or_opset)||null},u={schema:K5,generated_at:qe(t.generatedAt)||null,identity:c,artifact_set:e?.artifact_set||null,conversion_receipt:e?.conversion_receipt||null,cpu_cost_target_binding:e?.cpu_cost_target_binding||null,accelerator_profile_binding:e?.accelerator_profile_binding||null,...i?{llm_token_budget_scenario:i}:{},accelerator_bindings:R5(e,t.runtimeEvidence||t.runtimeAssignmentEvidence||null,c.sha256),policy_identity:e?.policy_identity||null,capabilities:WH(e,n),interfaces:a,graph:{operator_count:["gguf","safetensors"].includes(n)?null:Oa(e.operator_count??Qe(e)?.length),tensor_count:Oa(e.tensor_count??Xt(e)?.length),total_macs:Oa(e.total_macs),mac_confidence:jd(e),mac_assessment_status:o.status,mac_coverage:o},external_files:r,metadata:VH(e),findings:s,...t.structuredDetails?{structured_details:t.structuredDetails}:{},format_extensions:{[n]:eK(e,n)},provenance:t.provenance||null,evidence_boundary:"Serialized artifact facts and deterministic static derivations. Declarations and runtime measurements are accepted only through separately identified inputs."},l=Wa(u);return{...l,envelope_sha256:K(Q(l))}}function w0(e){let t=[];if(e?.schema!==K5&&t.push("schema_mismatch"),(!qe(e?.identity?.format)||e.identity.format==="unknown")&&t.push("format_unbound"),e?.identity?.sha256&&!co(e.identity.sha256)&&t.push("invalid_artifact_sha256"),e?.artifact_set)try{A5(e.artifact_set)}catch{t.push("invalid_artifact_set")}if(e?.conversion_receipt)try{Ld(e.conversion_receipt,{filename:e.identity.filename,format:e.identity.format,sha256:e.identity.sha256,byte_length_decimal:e.identity.byte_length==null?null:String(e.identity.byte_length)})}catch{t.push("invalid_conversion_receipt")}if(e?.cpu_cost_target_binding)try{b0(e.cpu_cost_target_binding)}catch{t.push("invalid_cpu_cost_target_binding")}if(e?.accelerator_profile_binding)try{S5(e.accelerator_profile_binding)}catch{t.push("invalid_accelerator_profile_binding")}if(e?.llm_token_budget_scenario){let i={...e.llm_token_budget_scenario},o=i.scenario_sha256;delete i.scenario_sha256,(i.schema!=="deepbom.llm_token_budget_scenario.v1"||!co(o)||o!==K(Q(i)))&&t.push("invalid_llm_token_budget_scenario")}Array.isArray(e?.accelerator_bindings)||t.push("accelerator_bindings_missing");for(let i of e?.accelerator_bindings||[])try{l0(i)}catch{t.push(`invalid_accelerator_binding:${qe(i?.profile_id)||"unknown"}`)}e?.policy_identity&&!tK(e.policy_identity)&&t.push("invalid_policy_identity"),Array.isArray(e?.interfaces?.parameters)||t.push("interface_ledger_missing");for(let i of e?.external_files||[])co(i.sha256)||t.push(`invalid_external_file_sha256:${i.path}`),qe(i.path)||t.push("external_file_path_missing");for(let i of e?.findings||[])kh.includes(i.evidence_class)||t.push(`invalid_evidence_class:${i.id}`),e0.includes(i.finding_kind)||t.push(`invalid_finding_kind:${i.id}`);let n={...e};return delete n.envelope_sha256,e?.envelope_sha256!==K(Q(n))&&t.push("envelope_sha256_mismatch"),{valid:t.length===0,errors:t}}function tK(e){return e?.schema==="deepbom.gate_policy_profile.v1"?["engineering","regulatory"].includes(e?.profile)&&e?.mode==="builtin_evidence_gate":e?.schema==="deepbom.review_policy.v1"&&co(e?.policy_sha256)&&co(e?.source_file_sha256)&&["observe","enforce"].includes(e?.mode)}Gf();Ce();function Th({artifactSha256:e="",generatedAt:t="",profile:n="document"}={}){let i=K(`${Rh(e)||"unbound"}
|
|
31
|
+
`)),c}async function N3(e,t,n){let i=mt.resolve(e,c_[t]);await Jg(e,i);let o=await J1(i);if(!o)return{schema:Ac,action:"remove",target:t,applied:!1,status:"not_installed",destination:Sp(mt.relative(e,i)),changes:[]};let a=[];for(let c of o.managed_files||[]){let u=await eb(mt.join(i,c.path));(!u||yc(u)!==c.sha256)&&a.push(c.path)}if(a.length)throw new Error(`Refusing to remove modified agent integration files: ${a.join(", ")}.`);let r={schema:Ac,action:"remove",target:t,applied:!!n,status:n?"removed":"changes_pending",destination:Sp(mt.relative(e,i)),changes:[...(o.managed_files||[]).map(c=>({path:c.path,status:"remove"})),{path:s_,status:"remove"}],next_command:n?null:`deepbom integrate remove ${t} --apply`};if(!n)return r;for(let c of o.managed_files||[])await kp(mt.join(i,c.path),{force:!0});await kp(mt.join(i,s_),{force:!0});let s=[...new Set((o.managed_files||[]).map(c=>mt.dirname(mt.join(i,c.path))))].sort((c,u)=>u.length-c.length);for(let c of s)await Z1(c,e);return await Z1(i,e),r}async function Y1(e,t,n,i){let o=mt.resolve(e,c_[n]);await Jg(e,o);let a=await J1(o),r=new Map((a?.managed_files||[]).map(l=>[l.path,l.sha256])),s=[],c=[];for(let[l,_]of t){let p=Buffer.from(_,"utf8"),d=await eb(mt.join(o,l)),m="add";d&&yc(d)===yc(p)?m="unchanged":d&&r.get(l)===yc(d)?m="update_managed":d&&(m="conflict",c.push(l)),s.push({path:l,status:m,sha256:yc(p)})}let u=s.every(l=>l.status==="unchanged");return{target:n,destination:Sp(mt.relative(e,o)),status:c.length?"conflict":u?"current":a?"outdated":"not_installed",installed_version:a?.version||null,available_version:i,installed_agent_contract:a?.agent_contract||null,available_agent_contract:Ro,conflicts:c,files:s}}function I3(e){let t=String(e||"").trim().toLowerCase();if(!Object.hasOwn(c_,t))throw new Error("Agent integration target must be codex, claude-code, or generic.");return t}async function J1(e){let t=await eb(mt.join(e,s_));if(!t)return null;let n=JSON.parse(t.toString("utf8"));if(n.schema!==Ac||n.owner!=="deepbom"||!Array.isArray(n.managed_files))throw new Error(`Invalid DEEPBOM integration manifest: ${mt.join(e,s_)}`);return n}async function Jg(e,t){let n=mt.relative(e,t);if(!n||n.startsWith("..")||mt.isAbsolute(n))throw new Error("Agent integration destination must stay below the current directory.");let i=e;for(let o of n.split(mt.sep)){i=mt.join(i,o);try{let a=await X1(i);if(a.isSymbolicLink())throw new Error(`Agent integration refuses symbolic-link path components: ${i}`);if(!a.isDirectory())throw new Error(`Agent integration path component is not a directory: ${i}`)}catch(a){if(a?.code==="ENOENT")break;throw a}}}async function K1(e,t){let n=`${e}.${process.pid}.tmp`,i=`${e}.${process.pid}.bak`;await x3(n,t,{mode:384});let o=await Yg(e);try{o&&await Wg(e,i),await Wg(n,e),o&&await kp(i,{force:!0})}catch(a){throw await kp(n,{force:!0}),o&&await Yg(i)&&!await Yg(e)&&await Wg(i,e),a}}async function Yg(e){try{return await X1(e),!0}catch(t){if(t?.code==="ENOENT")return!1;throw t}}async function Z1(e,t){let n=e;for(;n.startsWith(`${t}${mt.sep}`);){try{await w3(n)}catch{return}n=mt.dirname(n)}}async function eb(e){try{return await v3(e)}catch(t){if(t?.code==="ENOENT")return null;throw t}}function yc(e){return A3("sha256").update(e).digest("hex")}function Sp(e){return e.replaceAll(mt.sep,"/")}function ex(e){return Array.isArray(e)&&e.length?`[${e.join("x")}]`:"[]"}function l_(e){let t=ex(e?.shape),n=e?.shape_signature;if(!Array.isArray(n)||!n.length)return t;let i=ex(n);return i===t?t:`${t} sig=${i}`}function C(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(Number(e||0))}function Za(e){let t=Number(e||0);return t?t.toExponential(2):"0"}function nn(e){let t=Number(e||0)*100,n=Object.is(Math.round(t*10)/10,-0)?0:t;if(n!==0&&Math.abs(n)<1e-4)return`${n.toExponential(2)}%`;let i=n!==0&&Math.abs(n)<.1?4:1;return`${new Intl.NumberFormat("en-US",{maximumFractionDigits:i}).format(n)}%`}function Tp(e,t){let n=Number(e),i=Number(t);if(!Number.isFinite(n)||!Number.isFinite(i))return"Not assessed";let o=nn(n),a=nn(i);return Math.abs(i-n)<=1e-12||o===a?o:`${o} to ${a}`}function mn(e){let t=Number(e||0);return t>=1024*1024?`${new Intl.NumberFormat("en-US",{maximumFractionDigits:1}).format(t/(1024*1024))} MiB`:t>=1024?`${new Intl.NumberFormat("en-US",{maximumFractionDigits:1}).format(t/1024)} KiB`:`${C(t)} B`}function tb(e){if(e==null||e==="")return"Not assessed";let t=Number(e);return!Number.isFinite(t)||t<0?"Not assessed":t>=1e3?`${(t/1e3).toFixed(2)} ms`:t>=10?`${t.toFixed(1)} us`:`${t.toFixed(2)} us`}function u_(e,t){let n=null,i=-1/0;for(let o of e){let a=Number(t(o)||0);a>i&&(n=o,i=a)}return n}function nb(e){return e.reduce((t,n)=>t+Number(n||0),0)}function tx(e){let t=new Map;for(let n of e||[])t.set(n,(t.get(n)||0)+1);return[...t.entries()].sort(([n],[i])=>String(n).localeCompare(String(i))).map(([n,i])=>({name:n,count:i}))}function te(e){return String(e).padStart(3,"0")}function Qe(e){return Array.isArray(e?.ops)?e.ops:[]}function Xt(e){return Array.isArray(e?.tensors)?e.tensors:[]}var rx="deepbom.backend_placement_projection.v1",C3="deepbom.backend_workload_envelope.v1",ct=Object.freeze({CONDITIONALLY_ELIGIBLE:"CONDITIONALLY_ELIGIBLE",DEFINITE_EXCLUSION:"DEFINITE_EXCLUSION",UNRESOLVED:"UNRESOLVED"}),Bo=new Set(Object.values(ct)),k3=Object.freeze({BOOL:8,UINT1:1,UINT2:2,INT2:2,UINT3:3,UINT4:4,INT4:4,FLOAT4E2M1:4,UINT6:6,INT8:8,UINT8:8,FLOAT8E4M3FN:8,FLOAT8E4M3FNUZ:8,FLOAT8E5M2:8,FLOAT8E5M2FNUZ:8,FLOAT8E8M0:8,FLOAT16:16,BFLOAT16:16,INT16:16,UINT16:16,FLOAT32:32,INT32:32,UINT32:32,FLOAT64:64,INT64:64,UINT64:64,COMPLEX64:64,COMPLEX128:128});function ki({analysis:e,profileId:t,label:n,evidenceClass:i,rows:o,scopeId:a="main_graph",source:r=null,interpretationBoundary:s=null}){if(!e||!Array.isArray(e.ops)||!Array.isArray(e.tensors))throw new Error("Backend placement projection requires operator and tensor ledgers.");if(!String(t||"").trim()||!String(n||"").trim()||!String(i||"").trim())throw new Error("Backend placement projection identity is incomplete.");let c=_x(e.ops),u=S3(c,o),l=T3(e,c,a),_=O3(c,u),p=px(u),d=l.edges.map(h=>{let b=u.get(h.producer_op_index).state,A=u.get(h.consumer_op_index).state;return{...h,producer_state:b,consumer_state:A,transition:`${b}->${A}`,crosses_state_boundary:b!==A}}),m=d.filter(h=>h.crosses_state_boundary),f=dx(m),g={schema:rx,method_version:"1.0.0",profile_id:String(t),label:String(n),evidence_class:String(i),scope_id:String(a),source:r,assessment_status:"assessed_independent_static_projection",artifact_sha256:String(e.model_sha256||""),op_count:c.length,state_counts:p,rows:c.map(h=>({scope_id:String(a),op_index:h.index,op_name:String(h.value?.name||""),state:u.get(h.index).state,reason_codes:u.get(h.index).reason_codes,unresolved_predicates:u.get(h.index).unresolved_predicates})),segment_count:_.length,segments:_,graph_edge_count:d.length,graph_edges:d,boundary_edge_count:m.length,boundary_edges:m,boundary_payload:f,conservation:{op_state_count:Object.values(p).reduce((h,b)=>h+b,0),op_count_status:Object.values(p).reduce((h,b)=>h+b,0)===c.length?"complete":"failed",segment_op_count:_.reduce((h,b)=>h+b.op_count,0),segment_count_status:_.reduce((h,b)=>h+b.op_count,0)===c.length?"complete":"failed",edge_classified_count:d.length,edge_count_status:d.length===l.edges.length?"complete":"failed"},interpretation_boundary:s||"Independent source-backed eligibility projection. Segments do not establish selected-build acceptance or runtime assignment. Boundary payload is serialized-shape logical exposure, not observed transfer, copy, or latency."};return g.workload_envelope=sx(e,g),sb(g,{analysis:e}),g}function sx(e,t){let n=_x(On(e?.ops)),i=new Map(On(t?.rows).map(u=>[Number(u.op_index),u]));if(n.length!==i.size||n.some(u=>!i.has(u.index)))throw new Error("Backend workload envelope requires complete placement state coverage.");let o=new Map(On(e?.tensors).map((u,l)=>[Number.isSafeInteger(Number(u?.index))?Number(u.index):l,u])),a=Object.fromEntries([...Bo].map(u=>[u,[]]));for(let u of n)a[i.get(u.index).state].push(u);let r=Object.fromEntries([...Bo].map(u=>[u,nx(a[u],o)])),s=nx(n,o),c=r[ct.CONDITIONALLY_ELIGIBLE];return{schema:C3,method_version:"1.0.0",profile_id:t.profile_id,scope_id:t.scope_id,evidence_class:"DERIVED_FROM_ARTIFACT_AND_STATIC_ELIGIBILITY",status:"assessed_artifact_workload_without_backend_cost_model",total:s,by_state:r,conditionally_eligible_mac_share:ob(c.complete_macs_decimal,s.complete_macs_decimal),conditionally_eligible_mac_share_decimal:ab(c.complete_macs_decimal,s.complete_macs_decimal),conditionally_eligible_logical_byte_share:ob(c.complete_logical_bytes_decimal,s.complete_logical_bytes_decimal),conditionally_eligible_logical_byte_share_decimal:ab(c.complete_logical_bytes_decimal,s.complete_logical_bytes_decimal),boundary_payload:R3(t.boundary_payload),backend_cost_model:{status:"not_assessed",peak_compute:null,memory_bandwidth:null,occupancy:null,shader_or_kernel_selection:null,latency:null,reason:"The artifact and source-eligibility ledger do not bind a selected device, generated shader/kernel, occupancy, backend memory plan, measured bandwidth, or runtime timing."},method:"Partition exact serialized-graph MAC and logical-op-byte ledgers by independent static eligibility state; derive a MAC-equivalent arithmetic-intensity descriptor only when every op in that state has assessed MAC and logical-byte values. Preserve output dtype counts from serialized tensor contracts.",interpretation_boundary:"This envelope describes artifact workload associated with a source-backed eligibility state. It is not a GPU roofline, accepted partition, executed workload, transfer volume, occupancy estimate, kernel choice, or latency prediction."}}function cx(e){return On(e?.rows).map(t=>({op_index:t.op_index,state:t.artifact_precheck_status==="source_candidate_partial"?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:t.artifact_precheck_status==="source_candidate_partial"?[]:On(t.definite_exclusion_reasons).map(Xa),unresolved_predicates:t.artifact_precheck_status==="source_candidate_partial"?On(t.unresolved_predicates).map(Xa):[]}))}function lx(e){return On(e?.ops).map((t,n)=>{let i=Number.isSafeInteger(Number(t?.index))?Number(t.index):n,o=Number(t?.xnnpack_chain_id)>=0&&t?.xnnpack_supported!==!1,a=Xa(t?.xnnpack_reason||t?.xnnpack_break_class||"xnnpack_not_conditionally_delegatable"),r=Xa(t?.xnnpack_build_requirement||"");return{op_index:i,state:o?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:o?[]:[a],unresolved_predicates:o&&r?[r]:[]}})}function ux(e){return On(e?.ops).map(t=>{let n=new Set(["MODEL_LOCAL_FUNCTION_REQUIRES_RUNTIME_RESOLUTION","EXTERNAL_CUSTOM_REGISTRY_REQUIRED","OP_SCHEMA_VERSION_NOT_RESOLVED"]).has(String(t.status||"")),i=t.artifact_precheck_status==="ARTIFACT_PRECHECK_UNRESOLVED",a=t.source_candidate_after_artifact_precheck===!0&&!i?ct.CONDITIONALLY_ELIGIBLE:i||n?ct.UNRESOLVED:ct.DEFINITE_EXCLUSION;return{op_index:t.op_index,state:a,reason_codes:a===ct.DEFINITE_EXCLUSION?[Xa(t.artifact_precheck_status||t.status||"source_exclusion")]:[],unresolved_predicates:a===ct.UNRESOLVED?[Xa(t.artifact_precheck_status||t.status||"unresolved")]:On(t.unresolved_source_condition_fragments).map(Xa)}})}function sb(e,{analysis:t=null}={}){let n=[];(!e||e.schema!==rx)&&n.push("schema mismatch"),(!e?.profile_id||!e?.label||!e?.evidence_class||!e?.scope_id)&&n.push("identity incomplete"),(!Number.isSafeInteger(e?.op_count)||e.op_count<0)&&n.push("op count invalid");let i=On(e?.rows);(i.length!==e?.op_count||new Set(i.map(_=>`${_.scope_id}:${_.op_index}`)).size!==i.length||i.some(_=>_.scope_id!==e.scope_id||!Number.isSafeInteger(_.op_index)||!Bo.has(_.state)))&&n.push("op-state ledger invalid");let o=px(new Map(i.map(_=>[_.op_index,_])));for(let _ of Bo)Number(e?.state_counts?.[_])!==o[_]&&n.push(`state count mismatch: ${_}`);let a=On(e?.segments),r=0;for(let _ of a){if(!Bo.has(_.state)||_.start_position!==r||_.end_position!==_.start_position+_.op_count-1||_.op_count<=0){n.push("segment ledger invalid");break}r=_.end_position+1}(r!==e?.op_count||Number(e?.segment_count)!==a.length)&&n.push("segments do not conserve ops");let s=On(e?.graph_edges),c=new Set;for(let _ of s){let p=`${_.scope_id}:${_.producer_op_index}:${_.consumer_op_index}:${_.tensor_index}`;if(c.has(p)||_.scope_id!==e.scope_id||!Bo.has(_.producer_state)||!Bo.has(_.consumer_state)||_.crosses_state_boundary!==(_.producer_state!==_.consumer_state)||_.transition!==`${_.producer_state}->${_.consumer_state}`||_.logical_payload_bytes==null==!_.logical_payload_reason){n.push("graph edge ledger invalid");break}c.add(p)}let u=s.filter(_=>_.crosses_state_boundary);(Number(e?.graph_edge_count)!==s.length||Number(e?.boundary_edge_count)!==u.length||On(e?.boundary_edges).length!==u.length)&&n.push("edge counts do not conserve graph edges");let l=dx(u);if(JSON.stringify(e?.boundary_payload)!==JSON.stringify(l)&&n.push("boundary payload does not reproduce"),t&&JSON.stringify(e?.workload_envelope)!==JSON.stringify(sx(t,e))&&n.push("workload envelope does not reproduce"),(e?.conservation?.op_count_status!=="complete"||e?.conservation?.segment_count_status!=="complete"||e?.conservation?.edge_count_status!=="complete")&&n.push("conservation status incomplete"),t&&(String(e.artifact_sha256||"")!==String(t.model_sha256||"")&&n.push("artifact binding mismatch"),e.op_count!==On(t.ops).length&&n.push("analysis op count mismatch")),n.length)throw new Error(`Backend placement projection is invalid: ${n.join("; ")}`);return!0}function _x(e){let t=new Set;return e.map((n,i)=>{let o=Number.isSafeInteger(Number(n?.index))?Number(n.index):i;if(t.has(o))throw new Error(`Operator identity duplicates op #${o}.`);return t.add(o),{index:o,position:i,value:n}})}function S3(e,t){if(!Array.isArray(t)||t.length!==e.length)throw new Error("Backend state rows must cover every operator exactly once.");let n=new Set(e.map(o=>o.index)),i=new Map;for(let o of t){let a=Number(o?.op_index);if(!Number.isSafeInteger(a)||!n.has(a)||i.has(a)||!Bo.has(o?.state))throw new Error(`Backend state identity is invalid at op #${String(o?.op_index)}.`);i.set(a,{state:o.state,reason_codes:ax(o.reason_codes),unresolved_predicates:ax(o.unresolved_predicates)})}return i}function T3(e,t,n){let i=new Set(t.map(c=>c.index)),o=new Map;for(let[c,u]of e.tensors.entries()){let l=Number.isSafeInteger(Number(u?.index))?Number(u.index):c;if(o.has(l))throw new Error(`Tensor identity duplicates tensor #${l}.`);o.set(l,u)}let a=new Map,r=new Map;for(let c of t){for(let u of rb(c.value?.outputs)){if(a.has(u)&&a.get(u)!==c.index)throw new Error(`Tensor #${u} has multiple producers in ${n}.`);a.set(u,c.index)}for(let u of rb(c.value?.inputs))r.has(u)||r.set(u,new Set),r.get(u).add(c.index)}let s=[];for(let[c,u]of a)if(i.has(u))for(let l of r.get(c)||[]){if(l===u||!i.has(l))continue;let _=o.get(c),p=z3(_);s.push({scope_id:String(n),producer_op_index:u,consumer_op_index:l,tensor_index:c,tensor_name:_?String(_.name||""):null,tensor_dtype:_?String(_.dtype||""):null,tensor_shape:_&&Array.isArray(_.shape)?_.shape.map(Number):null,logical_payload_bytes:p.bytes,logical_payload_status:p.status,logical_payload_reason:p.reason})}return s.sort((c,u)=>c.producer_op_index-u.producer_op_index||c.consumer_op_index-u.consumer_op_index||c.tensor_index-u.tensor_index),{edges:s}}function z3(e){if(!e)return{bytes:null,status:"not_assessed",reason:"tensor_descriptor_missing"};if(!Array.isArray(e.shape))return{bytes:null,status:"not_assessed",reason:"shape_not_declared"};if(e.shape.some(o=>!Number.isSafeInteger(Number(o))||Number(o)<0))return{bytes:null,status:"not_assessed",reason:"shape_dynamic_or_invalid"};if(Array.isArray(e.shape_signature)&&e.shape_signature.length&&(e.shape_signature.length!==e.shape.length||e.shape_signature.some((o,a)=>!Number.isSafeInteger(Number(o))||Number(o)<0||Number(o)!==Number(e.shape[a]))))return{bytes:null,status:"not_assessed",reason:"shape_signature_not_statically_bound"};let t=k3[String(e.dtype||"").toUpperCase()];if(!t)return{bytes:null,status:"not_assessed",reason:"dtype_width_unknown"};let n=1n;for(let o of e.shape)n*=BigInt(Number(o));let i=(n*BigInt(t)+7n)/8n;return i>BigInt(Number.MAX_SAFE_INTEGER)?{bytes:null,status:"not_assessed",reason:"payload_exceeds_safe_integer"}:{bytes:Number(i),status:"assessed_serialized_static_shape",reason:null}}function O3(e,t){let n=[];for(let i of e){let o=t.get(i.index).state,a=n.at(-1);a?.state===o?(a.end_position=i.position,a.end_op_index=i.index,a.op_count+=1):n.push({segment_index:n.length,state:o,start_position:i.position,end_position:i.position,start_op_index:i.index,end_op_index:i.index,op_count:1})}return n}function dx(e){let t=e.filter(a=>Number.isSafeInteger(a.logical_payload_bytes)),n=ib(t.map(a=>a.logical_payload_bytes)),i=new Map;for(let a of e)i.has(a.tensor_index)||i.set(a.tensor_index,a.logical_payload_bytes);let o=[...i.values()].filter(Number.isSafeInteger);return{semantics:"summed_logical_edge_payload_not_observed_transfer",edge_count:e.length,assessed_edge_count:t.length,unassessed_edge_count:e.length-t.length,assessed_edge_payload_bytes:n,summed_edge_payload_bytes:t.length===e.length?n:null,unique_tensor_count:i.size,assessed_unique_tensor_count:o.length,assessed_unique_tensor_payload_bytes:ib(o),unique_tensor_payload_bytes:o.length===i.size?ib(o):null}}function nx(e,t){let n=e.map(p=>ix(p.value,"macs")),i=e.map(p=>ix(p.value,"estimated_bytes")),o=n.filter(p=>p!=null),a=i.filter(p=>p!=null),r=ox(o),s=ox(a),c=o.length===e.length?r:null,u=a.length===e.length?s:null,l={},_=0;for(let p of e)for(let d of rb(p.value?.outputs)){_+=1;let m=String(t.get(d)?.dtype||"UNKNOWN").toUpperCase();l[m]=(l[m]||0)+1}return{op_count:e.length,assessed_mac_op_count:o.length,unassessed_mac_op_count:e.length-o.length,assessed_macs_decimal:r.toString(),assessed_macs:zp(r),complete_macs_decimal:c?.toString()??null,complete_macs:c==null?null:zp(c),assessed_logical_byte_op_count:a.length,unassessed_logical_byte_op_count:e.length-a.length,assessed_logical_bytes_decimal:s.toString(),assessed_logical_bytes:zp(s),complete_logical_bytes_decimal:u?.toString()??null,complete_logical_bytes:u==null?null:zp(u),mac_equivalent_ops_per_logical_byte:c!=null&&u!=null&&u>0n?ob((c*2n).toString(),u.toString()):null,mac_equivalent_ops_per_logical_byte_decimal:c!=null&&u!=null&&u>0n?ab((c*2n).toString(),u.toString()):null,intensity_status:c==null||u==null?"not_assessed_incomplete_mac_or_logical_byte_ledger":u===0n?"not_applicable_zero_logical_bytes":"derived_complete_artifact_ledger",output_tensor_reference_count:_,output_dtype_reference_counts:Object.fromEntries(Object.entries(l).sort(([p],[d])=>p.localeCompare(d)))}}function ix(e,t){if(!e||e[t]==null||String(e[`${t}_status`]||"")==="not_assessed")return null;let n=Number(e[t]);return Number.isSafeInteger(n)&&n>=0?n:null}function ob(e,t){if(e==null||t==null)return null;let n=BigInt(e),i=BigInt(t);return i>0n&&n<=BigInt(Number.MAX_SAFE_INTEGER)&&i<=BigInt(Number.MAX_SAFE_INTEGER)?Number(n)/Number(i):null}function ab(e,t,n=12){if(e==null||t==null)return null;let i=BigInt(e),o=BigInt(t);if(o<=0n)return null;let a=10n**BigInt(n),r=(i*a+o/2n)/o,s=r/a,c=String(r%a).padStart(n,"0").replace(/0+$/,"");return c?`${s}.${c}`:s.toString()}function ox(e){return e.reduce((t,n)=>t+BigInt(n),0n)}function zp(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}function R3(e){return e==null?e:JSON.parse(JSON.stringify(e))}function px(e){let t=Object.fromEntries([...Bo].map(n=>[n,0]));for(let n of e.values())Bo.has(n.state)&&(t[n.state]+=1);return t}function rb(e){return On(e).map(Number).filter(t=>Number.isSafeInteger(t)&&t>=0)}function ax(e){return[...new Set(On(e).map(Xa).filter(Boolean))].sort()}function Xa(e){return String(e?.id||e?.reason_code||e||"").trim()}function ib(e){let t=e.reduce((n,i)=>n+i,0);if(!Number.isSafeInteger(t))throw new Error("Backend placement payload sum exceeds the safe integer range.");return t}function On(e){return Array.isArray(e)?e:[]}var B3=/^--define\s+([^=\s;]+)=([^\s;]+)$/,D3=new Set(["declared_present","observed_runtime_capability_present"]);function mx(e,t){if(!e)return{status:"pending_runtime_evidence_not_imported",evidence_class:"NOT_ASSESSED",value:null};let n=String(t||"").split(";")[0].trim();if(!n)return{status:"pending_required_configuration_not_declared",evidence_class:"NOT_ASSESSED",value:null};let i=M3(n),o=e?.selector_context?.build?.compile_definitions;if(i&&Array.isArray(o)){let r=o.find(s=>String(s?.name||"")===i.name);if(r){let s=String(r.value??"").trim();return s===i.value?{status:"declared_present",evidence_class:"DECLARED_RUNTIME_BUILD",value:n}:{status:"contradiction_required_configuration_value",evidence_class:"DECLARED_RUNTIME_BUILD",value:`--define ${i.name}=${s}`}}}let a=String(e?.runtime?.build||"").trim();if(!a)return{status:"pending_imported_runtime_build_not_declared",evidence_class:"NOT_ASSESSED",value:null};if(i){let r=$3(a).filter(s=>s.name===i.name);if(r.some(s=>s.value===i.value))return{status:"declared_present",evidence_class:"DECLARED_RUNTIME_BUILD",value:n};if(r.length)return{status:"contradiction_required_configuration_value",evidence_class:"DECLARED_RUNTIME_BUILD",value:r.map(s=>`--define ${s.name}=${s.value}`).join("; ")}}else if(L3(a,n))return{status:"declared_present",evidence_class:"DECLARED_RUNTIME_BUILD",value:n};return{status:"contradiction_required_configuration_absent",evidence_class:"DECLARED_RUNTIME_BUILD",value:a}}function fx(e,t){let n=Array.isArray(t)?t:[];return n.length>0&&n.every(i=>mx(e,i?.required_build_configuration).status==="declared_present")}function hx(e,t){if(Number(t?.affected_source_candidate_op_count||0)===0)return Gn("not_applicable_no_affected_source_candidates","NOT_APPLICABLE",null);if(!e)return Gn("pending_runtime_evidence_not_imported","NOT_ASSESSED",null);let n=e.tflite_delegate_build_inventory;if(!n)return Gn("pending_delegate_build_inventory_not_imported","NOT_ASSESSED",null);switch(t?.id){case"tflite_gpu_delegate_compiled":return n.gpu?.compiled_status==="enabled_by_declared_cmake_option"?Gn("partial_gpu_delegate_compiled_target_backend_unobserved",n.evidence_class,n.gpu.compiled_status):String(n.gpu?.compiled_status||"").startsWith("disabled_")?Gn("contradiction_gpu_delegate_not_compiled",n.evidence_class,n.gpu.compiled_status):Gn("pending_gpu_build_option_not_declared","NOT_ASSESSED",n.gpu?.compiled_status??null);case"tflite_gpu_allow_quant_ops":return n.gpu?.quantized_model_flag_status==="enabled_by_declared_runtime_option"?Gn("declared_present",n.evidence_class,n.gpu.experimental_flags):n.gpu?.quantized_model_flag_status==="disabled_by_declared_runtime_option"?Gn("contradiction_quantized_model_flag_disabled",n.evidence_class,n.gpu.experimental_flags):Gn("pending_gpu_runtime_option_not_declared","NOT_ASSESSED",null);case"tflite_nnapi_delegate_compiled":return n.nnapi?.compiled_status==="enabled_by_declared_cmake_option_and_android_gate"?Gn("declared_present",n.evidence_class,n.nnapi.compiled_status):String(n.nnapi?.compiled_status||"").startsWith("disabled_")?Gn("contradiction_nnapi_delegate_not_compiled",n.evidence_class,n.nnapi.compiled_status):Gn("pending_nnapi_build_gate_unresolved","NOT_ASSESSED",n.nnapi?.compiled_status??null);case"tflite_nnapi_feature_level":{let i=n.nnapi?.runtime_feature_level,o=String(n.nnapi?.accelerator_identity||"").trim();if(i==null||!o)return Gn("pending_nnapi_runtime_capability_query","NOT_ASSESSED",null);let a=n.nnapi.capability_source==="android_nnapi_runtime_query";return Gn(a?"observed_runtime_capability_present":"partial_declared_runtime_capability_not_observed",a?"OBSERVED_RUNTIME_CAPABILITY":n.evidence_class,`${i}; ${o}`)}default:return Gn("unsupported_delegate_requirement","NOT_ASSESSED",t?.id??null)}}function gx(e,t){let n=(Array.isArray(t)?t:[]).map(o=>({id:o?.id??null,profile:o?.profile??null,affected_source_candidate_op_count:Number(o?.affected_source_candidate_op_count||0),binding:hx(e,o)})),i=n.filter(o=>o.binding.status!=="not_applicable_no_affected_source_candidates");return{rows:n,applicable_requirement_count:i.length,satisfied_requirement_count:i.filter(o=>cb(o.binding)).length,contradiction_count:i.filter(o=>o.binding.status.startsWith("contradiction_")).length,pending_or_partial_count:i.filter(o=>!cb(o.binding)&&!o.binding.status.startsWith("contradiction_")).length,all_applicable_requirements_bound:i.length>0&&i.every(o=>cb(o.binding))}}function cb(e){return D3.has(String(e?.status||""))}function M3(e){let t=B3.exec(String(e||"").trim());return t?{name:t[1],value:t[2]}:null}function $3(e){let t=[],n=/(?:^|[\s;])--define\s+([^=\s;]+)=([^\s;]+)/g;for(let i of String(e||"").matchAll(n))t.push({name:i[1],value:i[2]});return t}function L3(e,t){return String(e||"").split(/[\s;,]+/).includes(String(t||""))}function Gn(e,t,n){return{status:e,evidence_class:t||"NOT_ASSESSED",value:n}}var bx="deepbom.placement_comparison.v1";function Op(e,t,{selectedProfileIds:n=null}={}){let i=Array.isArray(t)?t:[],o=new Map(i.map(c=>[String(c.profile_id),c]));if(o.size!==i.length)throw new Error("Placement comparison profile IDs must be unique.");let a=n==null?[...o.keys()]:[...new Set(n.map(String))];for(let c of a)if(!o.has(c))throw new Error(`Placement comparison profile is unavailable: ${c}.`);let r=a.map(c=>q3(o.get(c))),s={schema:bx,method_version:"1.0.0",artifact_sha256:String(e?.model_sha256||""),format:String(e?.format||"unknown").toLowerCase(),graph_op_count:Array.isArray(e?.ops)?e.ops.length:0,available_profile_ids:[...o.keys()],selected_profile_ids:a,rows:r,assessment_status:r.length?"assessed_independent_profiles":"not_applicable_no_static_profiles",conservation:{selected_profile_count:a.length,emitted_row_count:r.length,all_rows_cover_graph:r.every(c=>c.op_count===(Array.isArray(e?.ops)?e.ops.length:0))},interpretation_boundary:"N-way comparison of independent source-backed or compiler-observed placement profiles over one canonical graph and tensor ledger. It does not infer provider priority, joint partitioning, physical transfer, generated kernels, latency, or task correctness."};return lb(s,e,i),s}function lb(e,t=null,n=null){let i=[];e?.schema!==bx&&i.push("schema mismatch"),(!Array.isArray(e?.available_profile_ids)||!Array.isArray(e?.selected_profile_ids)||!Array.isArray(e?.rows))&&i.push("profile inventories missing"),new Set(e?.available_profile_ids||[]).size!==(e?.available_profile_ids||[]).length&&i.push("available profile IDs duplicate"),new Set(e?.selected_profile_ids||[]).size!==(e?.selected_profile_ids||[]).length&&i.push("selected profile IDs duplicate"),(e?.rows||[]).length!==(e?.selected_profile_ids||[]).length&&i.push("selected profile rows do not conserve selection");for(let o of e?.rows||[]){let a=Number(o.conditionally_eligible_ops)+Number(o.definite_exclusion_ops)+Number(o.unresolved_ops);(!e.selected_profile_ids.includes(o.profile_id)||a!==o.op_count||o.op_count!==e.graph_op_count)&&i.push(`profile row does not conserve graph ops: ${o.profile_id}`)}if(t&&(String(e.artifact_sha256||"")!==String(t.model_sha256||"")&&i.push("artifact binding mismatch"),Number(e.graph_op_count)!==(Array.isArray(t.ops)?t.ops.length:0)&&i.push("graph op count mismatch")),n){let o=n.map(a=>String(a.profile_id));JSON.stringify(e.available_profile_ids)!==JSON.stringify(o)&&i.push("available profile inventory mismatch")}if((!e?.conservation?.all_rows_cover_graph||e?.conservation?.selected_profile_count!==e?.conservation?.emitted_row_count)&&i.push("comparison conservation failed"),i.length)throw new Error(`Placement comparison is invalid: ${i.join("; ")}`);return!0}function P3(e){let t=`${e?.profile_id||""} ${e?.label||""}`.toLowerCase();return/(gpu|directml|webgpu|webnn|nnapi|qnn|coreml|edgetpu|tpu|npu|tensorrt|cuda|rocm|metal|vulkan|opencl)/.test(t)?"accelerator":/(cpu|xnnpack|wasm)/.test(t)?"cpu":"other"}function q3(e){let t=e.state_counts||{},n=e.workload_envelope||{};return{profile_id:String(e.profile_id),label:String(e.label),profile_class:P3(e),evidence_class:String(e.evidence_class||"NOT_ASSESSED"),assessment_status:String(e.assessment_status||"not_assessed"),op_count:Number(e.op_count||0),conditionally_eligible_ops:Number(t.CONDITIONALLY_ELIGIBLE||0),definite_exclusion_ops:Number(t.DEFINITE_EXCLUSION||0),unresolved_ops:Number(t.UNRESOLVED||0),segment_count:Number(e.segment_count||0),boundary_edge_count:Number(e.boundary_edge_count||0),boundary_payload:e.boundary_payload||null,conditionally_eligible_mac_share_decimal:n.conditionally_eligible_mac_share_decimal??null,conditionally_eligible_logical_byte_share_decimal:n.conditionally_eligible_logical_byte_share_decimal??null,unresolved_condition_type_count:new Set((e.rows||[]).flatMap(i=>i.unresolved_predicates||[])).size,source:e.source||null,interpretation_boundary:e.interpretation_boundary}}Me();Ce();var Q3="87bbf65b8d23d3f06912b1b2183587e1884bc45c",U3="e8b1ea421cf527584589213c8f5127a8ae8cc997",db=Object.freeze({repository:"https://github.com/tensorflow/tensorflow",commit:Q3,support_path:"tensorflow/lite/delegates/coreml/coreml_delegate.mm",support_sha256:"c09aa345581353ac6be2dfb3a5f7be218ed976f3388a5d4dad1e88a4bda0f0f1",builder_path:"tensorflow/lite/delegates/coreml/builders/op_builder.cc",builder_sha256:"e2f024d0d74befd5dc06f8cf731fe33d1556c6b46cd457a0ccd85019e465156f",partition_helper_header_path:"tensorflow/lite/delegates/utils.h",partition_helper_header_sha256:"390a88c51785f87c1d4c31c27427e6246605d450fc4edfa534c68277c6cb8cc9",partition_helper_source_path:"tensorflow/lite/delegates/utils.cc",partition_helper_source_sha256:"7026cd7e00360b3e528a8a53d91b4ca1f7fb05ccbcad9c6f784fc6df02913464"}),pb=Object.freeze({ADD:1,AVERAGE_POOL_2D:1,CONCATENATION:1,CONV_2D:1,DEPTHWISE_CONV_2D:2,FULLY_CONNECTED:6,HARD_SWISH:1,LOGISTIC:1,MAX_POOL_2D:1,MEAN:1,MIRROR_PAD:1,MUL:1,PAD:1,PADV2:1,RELU:1,RELU_N1_TO_1:1,RELU6:1,RESHAPE:1,RESIZE_BILINEAR:1,SOFTMAX:1,TANH:1,TRANSPOSE_CONV:1}),mb=Object.freeze({repository:"https://github.com/google-ai-edge/LiteRT",commit:U3,support_path:"litert/vendors/qualcomm/compiler/Qualcomm_QNN_Compiler.md",support_sha256:"873a6d442010aa1e448b90bfa5601424627e00fa4475cf012eea32fd87205e3f",compiler_path:"litert/vendors/qualcomm/compiler/qnn_compiler_plugin.cc",compiler_sha256:"2c71cf954ac906786b1f56bc053a570708cccc0e7cc25e56e704777d2c251623",dispatch_path:"litert/vendors/qualcomm/dispatch/dispatch_api.cc",dispatch_sha256:"87ef37e5071b86d4bb7fa63fdf9bb5465b205a1290998310f1e84a5aaaa51b12",supported_soc_path:"litert/vendors/qualcomm/supported_soc.csv",supported_soc_sha256:"a9b77234cadaae2b40a99018d3e2f4fc7cbac7267125599a3b09e90f6b9050f7"}),fb=new Set(["ABS","ADD","ARG_MAX","ARG_MIN","AVERAGE_POOL_2D","BATCH_MATMUL","BATCH_TO_SPACE_ND","BROADCAST_TO","CAST","CEIL","CONCATENATION","CONV_2D","CONV_3D","COS","CUMSUM","DEPTH_TO_SPACE","DEPTHWISE_CONV_2D","DEQUANTIZE","DIV","DYNAMIC_UPDATE_SLICE","ELU","EMBEDDING_LOOKUP","EQUAL","EXP","FLOOR","FLOOR_DIV","FLOOR_MOD","FULLY_CONNECTED","GATHER","GATHER_ND","GELU","GREATER","GREATER_EQUAL","HARD_SWISH","L2_NORMALIZATION","L2_POOL_2D","LEAKY_RELU","LESS","LESS_EQUAL","LOG","LOGICAL_AND","LOGICAL_NOT","LOGICAL_OR","LOGISTIC","MAXIMUM","MAX_POOL_2D","MEAN","MINIMUM","MIRROR_PAD","MUL","NEG","NOT_EQUAL","ONE_HOT","PACK","PAD","PADV2","POW","PRELU","QUANTIZE","REDUCE_ALL","REDUCE_ANY","REDUCE_MAX","REDUCE_MIN","RELU","RELU_0_TO_1","RELU6","RELU_N1_TO_1","RESHAPE","RESIZE_BILINEAR","RESIZE_NEAREST_NEIGHBOR","REVERSE_V2","ROUND","RSQRT","SELECT","SELECT_V2","SIGN","SIN","SLICE","SOFTMAX","SPACE_TO_BATCH_ND","SPACE_TO_DEPTH","SPLIT","SPLIT_V","SQRT","SQUARE","SQUARED_DIFFERENCE","STABLEHLO_COMPOSITE","STRIDED_SLICE","SUB","SUM","TANH","TILE","TOPK_V2","TRANSPOSE","TRANSPOSE_CONV","UNPACK"]),vx=Ix("tflite_coreml",db,Object.keys(pb)),wx=Ix("litert_qualcomm_qnn",mb,[...fb]);function Rp(e){return String(e?.format||"").toLowerCase()!=="tflite"||!Array.isArray(e?.ops)||!Array.isArray(e?.tensors)?[]:[ki({analysis:e,profileId:"tflite_coreml_delegate",label:"TFLite Core ML delegate",evidenceClass:"SOURCE_PINNED_ARTIFACT_PRECHECK",rows:G3(e),source:{...db,rulepack_sha256:vx},interpretationBoundary:"Pinned TensorFlow Core ML delegate registration, FP16GraphPartitionHelper, serialized op version, constant-FP16 DEQUANTIZE full-versus-partial delegation rule, and visible first-input dtype precheck. Op-specific validators, selected Apple OS/Core ML version and options, delegate build, compiled partition, device selection, execution, and latency remain unresolved."}),ki({analysis:e,profileId:"litert_qualcomm_qnn",label:"LiteRT Qualcomm QNN compiler",evidenceClass:"SOURCE_PINNED_ARTIFACT_PRECHECK",rows:H3(e),source:{...mb,rulepack_sha256:wx},interpretationBoundary:"Pinned LiteRT Qualcomm compiler legalization registry precheck. Per-op legalization predicates, selected QNN SDK/plugin build, SoC/backend capability, compiled QNN graph, dispatch, execution, transfer, and latency remain unresolved until identity-bound evidence is imported."})]}function xx(){return Object.freeze({schema:"deepbom.tflite_additional_accelerator_source_manifest.v1",profiles:[{id:"tflite_coreml_delegate",source:db,rulepack_sha256:vx,registered_op_count:Object.keys(pb).length},{id:"litert_qualcomm_qnn",source:mb,rulepack_sha256:wx,registered_op_count:fb.size}]})}function G3(e){let t=e.ops.map((r,s)=>{let c=Nx(r,s),u=String(r?.name||"UNKNOWN");if(u==="DEQUANTIZE")return V3(e,r,c);let l=pb[u];if(l==null)return Jr(c,"builtin_operator_not_registered_in_pinned_coreml_delegate_source");let _=Number(r?.version??1);if(!Number.isSafeInteger(_)||_<1)return __(c,"serialized_op_version_invalid_or_missing");if(_>l)return Jr(c,`serialized_op_version_${_}_exceeds_coreml_maximum_${l}`);let d=K3(e,r,u==="TRANSPOSE_CONV"?2:0);if(d&&d!=="FLOAT32")return Jr(c,`coreml_delegate_first_runtime_input_dtype_${d}_is_not_float32`);let m=["selected_apple_os_coreml_version_and_delegate_build","coreml_op_specific_validator_and_partition_acceptance"];return d||m.push("first_runtime_input_dtype_not_resolved"),_b(c,m)});if(!t.filter(r=>r.fp16_constant_dequantize===!0).length)return t;let i=t.filter(r=>r.fp16_constant_dequantize!==!0),o=i.some(r=>r.state===ct.DEFINITE_EXCLUSION),a=i.some(r=>r.state===ct.UNRESOLVED);return t.map(r=>r.fp16_constant_dequantize!==!0?r:o?Jr(r.op_index,"fp16_constant_dequantize_kept_on_cpu_during_partial_coreml_delegation"):a?__(r.op_index,"fp16_constant_dequantize_full_delegation_condition_unresolved"):_b(r.op_index,["all_non_dequantize_nodes_must_be_accepted_by_the_selected_coreml_delegate_build","coreml_delegate_full_graph_partition_and_option_limits"]))}function V3(e,t,n){let i=Ex(e,t,0);if(!i)return __(n,"dequantize_input_tensor_contract_not_resolved");let o=String(i.dtype||"").toUpperCase();return o?o!=="FLOAT16"?Jr(n,`dequantize_input_dtype_${o}_is_not_constant_float16`):i.constant_buffer===!1?Jr(n,"float16_dequantize_input_is_not_a_serialized_constant"):i.constant_buffer!==!0?__(n,"float16_dequantize_constant_storage_not_resolved"):{op_index:n,state:ct.UNRESOLVED,reason_codes:[],unresolved_predicates:["fp16_constant_dequantize_full_delegation_condition_pending"],fp16_constant_dequantize:!0}:__(n,"dequantize_input_dtype_not_resolved")}function H3(e){return e.ops.map((t,n)=>{let i=Nx(t,n),o=String(t?.name||"UNKNOWN");return fb.has(o)?_b(i,["qnn_legalization_predicates_selected_sdk_plugin_soc_and_backend"]):Jr(i,"litert_opcode_not_registered_in_pinned_qualcomm_compiler_support_registry")})}function K3(e,t,n){return String(Ex(e,t,n)?.dtype||"").toUpperCase()||null}function Ex(e,t,n){let i=Number(t?.inputs?.[n]);return!Number.isSafeInteger(i)||i<0?null:e.tensors.find((o,a)=>Number(o?.index??a)===i)||null}function _b(e,t){return{op_index:e,state:ct.CONDITIONALLY_ELIGIBLE,reason_codes:[],unresolved_predicates:t}}function Jr(e,t){return{op_index:e,state:ct.DEFINITE_EXCLUSION,reason_codes:[t],unresolved_predicates:[]}}function __(e,t){return{op_index:e,state:ct.UNRESOLVED,reason_codes:[],unresolved_predicates:[t]}}function Nx(e,t){let n=Number(e?.index);return Number.isSafeInteger(n)?n:t}function Ix(e,t,n){return K(Q({schema:"deepbom.source_rulepack_identity.v1",id:e,source:t,registered_ops:[...n].sort()}))}Me();Ce();var hb="deepbom.edgetpu_compiler_evidence.v1",Cx=/^[a-f0-9]{64}$/,Z3=new Set(["mapped","unmapped"]);function gb(e,t,{fileSha256:n=null}={}){if(String(t?.format||"").toLowerCase()!=="tflite"||!Array.isArray(t?.ops))throw new Error("Edge TPU compiler evidence requires a decoded TFLite artifact.");let i=typeof e=="string"?JSON.parse(e):e;if(!i||i.schema!==hb)throw new Error(`Edge TPU compiler evidence must use ${hb}.`);let o=vc(i.artifact_sha256,"artifact SHA-256");if(o!==vc(t.model_sha256,"active artifact SHA-256"))throw new Error("Edge TPU compiler evidence is not bound to the active artifact.");let a={name:Bp(i.compiler?.name,"compiler name"),version:Bp(i.compiler?.version,"compiler version"),binary_sha256:vc(i.compiler?.binary_sha256,"compiler binary SHA-256")},r=Y3(i.invocation?.options),s=K(Q({options:r}));if(i.invocation?.sha256!=null&&vc(i.invocation.sha256,"invocation SHA-256")!==s)throw new Error("Edge TPU compiler invocation SHA-256 does not reproduce from normalized options.");let c=W3(i.operations,t.ops),u=c.filter(p=>p.mapping==="mapped").length,l={operation_count:c.length,mapped_operation_count:u,unmapped_operation_count:c.length-u,mapping_coverage_ratio:c.length?u/c.length:null};if(i.summary&&Q(i.summary)!==Q(l))throw new Error("Edge TPU compiler evidence summary does not reproduce from operation rows.");let _={schema:hb,evidence_class:"COMPILER_OBSERVED_COMPILED_ARTIFACT_BOUND",artifact_sha256:o,compiler:a,invocation:{options:r},invocation_sha256:s,compiled_artifact_sha256:vc(i.compiled_artifact_sha256,"compiled artifact SHA-256"),compiler_report_sha256:vc(i.compiler_report_sha256||n,"compiler report SHA-256"),operations:c,summary:l,execution_status:"not_observed_compiler_evidence_only",interpretation_boundary:"The compiler report establishes mapped and unmapped serialized TFLite operations for one compiler binary, invocation, and compiled artifact. It does not establish device execution, physical transfer, latency, task accuracy, or release readiness."};return Object.freeze({..._,evidence_sha256:K(Q(_))})}function X3(e,t){let n=JSON.parse(JSON.stringify(e||null)),i=String(n?.evidence_sha256||"").toLowerCase();n&&delete n.evidence_sha256;let o=gb({schema:n?.schema,artifact_sha256:n?.artifact_sha256,compiler:n?.compiler,invocation:{options:n?.invocation?.options,sha256:n?.invocation_sha256},compiled_artifact_sha256:n?.compiled_artifact_sha256,compiler_report_sha256:n?.compiler_report_sha256,operations:n?.operations,summary:n?.summary},t);if(!Cx.test(i)||o.evidence_sha256!==i)throw new Error("Edge TPU compiler evidence SHA-256 is invalid.");return e}function kx(e,t){return X3(t,e),ki({analysis:e,profileId:"google_edgetpu_compiled_plan",label:"Google Edge TPU compiler result",evidenceClass:t.evidence_class,rows:t.operations.map(n=>({op_index:n.op_index,state:n.mapping==="mapped"?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:n.mapping==="mapped"?[]:[n.reason],unresolved_predicates:n.mapping==="mapped"?["device_execution_not_observed"]:[]})),source:{compiler_name:t.compiler.name,compiler_version:t.compiler.version,compiler_binary_sha256:t.compiler.binary_sha256,compiled_artifact_sha256:t.compiled_artifact_sha256,compiler_report_sha256:t.compiler_report_sha256},interpretationBoundary:t.interpretation_boundary})}function W3(e,t){if(!Array.isArray(e)||e.length!==t.length)throw new Error("Edge TPU compiler evidence must classify every serialized graph operation exactly once.");return e.map((n,i)=>{let o=Number(n?.op_index),a=t[i],r=Number.isSafeInteger(Number(a?.index))?Number(a.index):i;if(!Number.isSafeInteger(o)||o!==r)throw new Error(`Edge TPU compiler operation index mismatch at row ${i}.`);let s=Bp(n?.op_name,`operation name ${o}`);if(s!==String(a?.name||""))throw new Error(`Edge TPU compiler operation name mismatch at #${o}.`);let c=String(n?.mapping||"");if(!Z3.has(c))throw new Error(`Edge TPU compiler mapping is invalid at #${o}.`);let u=n?.reason==null?null:Bp(n.reason,`operation reason ${o}`);if(c==="unmapped"&&!u)throw new Error(`Unmapped Edge TPU operation #${o} requires a reason.`);return{op_index:o,op_name:s,mapping:c,reason:u}})}function Y3(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"||!t.trim()||t.length>1024))throw new Error("Edge TPU compiler options must be a bounded string array.");return e.map(t=>t.trim())}function Bp(e,t){let n=String(e||"").trim();if(!n||n.length>1024)throw new Error(`Edge TPU ${t} is invalid.`);return n}function vc(e,t){let n=String(e||"").toLowerCase();if(!Cx.test(n))throw new Error(`Edge TPU ${t} is invalid.`);return n}Me();Ce();var bb="deepbom.litert_qualcomm_compiler_dispatch_evidence.v1",Sx=/^[a-f0-9]{64}$/,J3=new Set(["compiled","not_compiled"]),eB=new Set(["not_observed","loaded","invoked"]);function yb(e,t,{fileSha256:n=null}={}){if(String(t?.format||"").toLowerCase()!=="tflite"||!Array.isArray(t?.ops))throw new Error("LiteRT Qualcomm evidence requires a decoded TFLite artifact.");let i=typeof e=="string"?JSON.parse(e):e;if(i?.schema!==bb)throw new Error(`LiteRT Qualcomm evidence must use ${bb}.`);let o=ma(i.artifact_sha256,"artifact SHA-256");if(o!==ma(t.model_sha256,"active artifact SHA-256"))throw new Error("LiteRT Qualcomm evidence is not bound to the active artifact.");let a=xx().profiles.find(b=>b.id==="litert_qualcomm_qnn"),r=oB(i.source?.litert_commit,"LiteRT source commit");if(r!==a.source.commit)throw new Error("LiteRT Qualcomm evidence source commit differs from the analyzer source profile.");let s=ma(i.source?.rulepack_sha256,"source rulepack SHA-256");if(s!==a.rulepack_sha256)throw new Error("LiteRT Qualcomm evidence rulepack SHA-256 differs from the analyzer source profile.");let c={name:Dp(i.compiler?.name,"compiler name"),version:Dp(i.compiler?.version,"compiler version"),binary_sha256:ma(i.compiler?.binary_sha256,"compiler binary SHA-256")},u=iB(i.invocation?.options,"compiler options"),l=K(Q({options:u}));if(i.invocation?.sha256!=null&&ma(i.invocation.sha256,"invocation SHA-256")!==l)throw new Error("LiteRT Qualcomm invocation SHA-256 does not reproduce from normalized options.");let _=nB(i.operations,t.ops),p=_.filter(b=>b.compile_status==="compiled").length,d=String(i.dispatch?.status||"not_observed");if(!eB.has(d))throw new Error("LiteRT Qualcomm dispatch status is invalid.");let m=i.dispatch?.runtime_binary_sha256==null?null:ma(i.dispatch.runtime_binary_sha256,"dispatch runtime binary SHA-256"),f=i.dispatch?.evidence_sha256==null?null:ma(i.dispatch.evidence_sha256,"dispatch evidence SHA-256");if(d!=="not_observed"&&(!m||!f))throw new Error("Observed LiteRT Qualcomm dispatch state requires runtime binary and dispatch evidence SHA-256 values.");let g={operation_count:_.length,compiled_operation_count:p,not_compiled_operation_count:_.length-p,dispatch_status:d};if(i.summary&&Q(i.summary)!==Q(g))throw new Error("LiteRT Qualcomm summary does not reproduce from operation and dispatch evidence.");let h={schema:bb,evidence_class:"COMPILER_OBSERVED_COMPILED_ARTIFACT_BOUND",artifact_sha256:o,source:{litert_commit:r,rulepack_sha256:s},compiler:c,invocation:{options:u},invocation_sha256:l,compiled_plan_sha256:ma(i.compiled_plan_sha256,"compiled QNN plan SHA-256"),source_file_sha256:ma(i.source_file_sha256||n,"evidence source-file SHA-256"),operations:_,dispatch:{status:d,runtime_binary_sha256:m,evidence_sha256:f},summary:g,interpretation_boundary:d==="not_observed"?"Compiler evidence binds source, compiler binary, options, operation legalization results, and compiled QNN plan. Dispatch, device assignment, execution, physical transfer, latency, and task correctness are not observed.":"Compiler and dispatch evidence bind one QNN plan and runtime binary. Per-source-op execution, physical transfer, latency, and task correctness are not inferred unless separately measured and identity-bound."};return Object.freeze({...h,evidence_sha256:K(Q(h))})}function tB(e,t){let n=JSON.parse(JSON.stringify(e||null)),i=String(n?.evidence_sha256||"").toLowerCase();n&&delete n.evidence_sha256;let o=yb({...n,invocation:{...n?.invocation,sha256:n?.invocation_sha256}},t,{fileSha256:n?.source_file_sha256});if(!Sx.test(i)||i!==o.evidence_sha256)throw new Error("LiteRT Qualcomm evidence SHA-256 is invalid.");return e}function Tx(e,t){return tB(t,e),ki({analysis:e,profileId:"litert_qualcomm_qnn_compiled_plan",label:"LiteRT Qualcomm compiled QNN plan",evidenceClass:t.evidence_class,rows:t.operations.map(n=>({op_index:n.op_index,state:n.compile_status==="compiled"?ct.CONDITIONALLY_ELIGIBLE:ct.DEFINITE_EXCLUSION,reason_codes:n.compile_status==="compiled"?[]:[n.reason],unresolved_predicates:n.compile_status==="compiled"?[t.dispatch.status==="not_observed"?"qnn_dispatch_not_observed":"per_source_op_execution_not_observed"]:[]})),source:{...t.source,compiler_binary_sha256:t.compiler.binary_sha256,compiled_plan_sha256:t.compiled_plan_sha256,dispatch_status:t.dispatch.status,dispatch_runtime_binary_sha256:t.dispatch.runtime_binary_sha256},interpretationBoundary:t.interpretation_boundary})}function nB(e,t){if(!Array.isArray(e)||e.length!==t.length)throw new Error("LiteRT Qualcomm evidence must classify every serialized graph operation exactly once.");return e.map((n,i)=>{let o=Number.isSafeInteger(Number(t[i]?.index))?Number(t[i].index):i,a=Number(n?.op_index);if(!Number.isSafeInteger(a)||a!==o)throw new Error(`LiteRT Qualcomm operation index mismatch at row ${i}.`);let r=Dp(n?.op_name,`operation name ${a}`);if(r!==String(t[i]?.name||""))throw new Error(`LiteRT Qualcomm operation name mismatch at #${a}.`);let s=String(n?.compile_status||"");if(!J3.has(s))throw new Error(`LiteRT Qualcomm compile status is invalid at #${a}.`);let c=n?.reason==null?null:Dp(n.reason,`operation reason ${a}`);if(s==="not_compiled"&&!c)throw new Error(`LiteRT Qualcomm non-compiled operation #${a} requires a reason.`);return{op_index:a,op_name:r,compile_status:s,reason:c}})}function iB(e,t){if(!Array.isArray(e)||e.some(n=>typeof n!="string"||!n.trim()||n.length>1024))throw new Error(`LiteRT Qualcomm ${t} must be a bounded string array.`);return e.map(n=>n.trim())}function Dp(e,t){let n=String(e||"").trim();if(!n||n.length>1024)throw new Error(`LiteRT Qualcomm ${t} is invalid.`);return n}function oB(e,t){let n=String(e||"").toLowerCase();if(!/^[a-f0-9]{40}$/.test(n))throw new Error(`LiteRT Qualcomm ${t} is invalid.`);return n}function ma(e,t){let n=String(e||"").toLowerCase();if(!Sx.test(n))throw new Error(`LiteRT Qualcomm ${t} is invalid.`);return n}var Rx="deepbom.execution_placement_evidence.v1",zx=Object.freeze(["artifact_observed","source_pinned_eligibility","configuration_bound","runtime_evidence"]);function Ab(e,t=null){if(!e||typeof e!="object")throw new Error("Execution placement requires analysis evidence.");let n=String(e.format||"").toLowerCase(),i=rB(t),o;if(n==="tflite")o=sB(e,i);else if(n==="onnx")o=cB(e,i);else if(n==="coreml")o=lB(e,i);else if(n==="gguf")o=uB(e,i);else if(n==="safetensors")o=_B(e);else if(n==="executorch")o=dB(e);else throw new Error(`Execution placement does not support format: ${n||"missing"}.`);let a=aB(o,{analysis:e});if(!a.valid)throw new Error(`Execution placement evidence is invalid: ${a.issues.join("; ")}`);return o}function aB(e,{analysis:t=null}={}){let n=[];if(!e||typeof e!="object")return{valid:!1,issues:["evidence must be an object"]};e.schema!==Rx&&n.push("schema mismatch"),["tflite","onnx","coreml","gguf","safetensors","executorch"].includes(e.format)||n.push("unsupported format"),(!Number.isSafeInteger(e.artifact_item_count)||e.artifact_item_count<0)&&n.push("artifact item count is invalid"),(!Array.isArray(e.levels)||e.levels.length!==zx.length||e.levels.some((s,c)=>s?.id!==zx[c]||!s.label||!s.state||!s.tone||!s.evidence_class||!s.detail))&&n.push("evidence level ladder is incomplete or out of order");let i=e.flow||{},o=Array.isArray(i.segments)?i.segments:[];(!Number.isSafeInteger(i.scope_item_count)||i.scope_item_count<0)&&n.push("flow scope item count is invalid"),(!Number.isSafeInteger(i.covered_item_count)||i.covered_item_count<0||i.covered_item_count>i.scope_item_count)&&n.push("flow covered item count is invalid");let a=0;for(let s of o){if(!Number.isSafeInteger(s.start_position)||!Number.isSafeInteger(s.end_position)||!Number.isSafeInteger(s.item_count)||s.item_count<=0||s.start_position!==a||s.end_position!==s.start_position+s.item_count-1||!s.key||!s.label||!s.tone){n.push("flow segment positions or cardinality are invalid");break}a=s.end_position+1}o.length&&a!==i.scope_item_count&&n.push("flow segments do not conserve the scope item count"),!o.length&&i.rendered_item_count!==0&&n.push("empty flow has a non-zero rendered count"),o.length&&i.rendered_item_count!==a&&n.push("rendered flow count does not match its segments");for(let s of Rt(e.portfolios))if(!s.id||!s.label||!s.evidence_class||!Number.isSafeInteger(s.candidate_count)||s.candidate_count<0||!Number.isSafeInteger(s.total_count)||s.total_count<s.candidate_count){n.push("source portfolio count or identity is invalid");break}for(let s of Rt(e.static_profiles))try{sb(s,{analysis:t})}catch(c){n.push(String(c?.message||c));break}try{lb(e.placement_comparison,t,Rt(e.static_profiles))}catch(s){n.push(String(s?.message||s))}for(let s of Rt(e.configuration_preflights))if(!s?.schema||!s?.status||!s?.trust_boundary||!Number.isSafeInteger(s.blocking_issue_count)||!Number.isSafeInteger(s.unresolved_issue_count)){n.push("configuration preflight summary is invalid");break}let r=e.levels?.[3];if(e.format==="coreml"&&r?.state!=="NOT OBSERVED"&&n.push("Core ML plan was promoted to observed runtime evidence"),e.format==="coreml"&&e.portfolios.length&&e.portfolios.reduce((s,c)=>s+c.candidate_count,0)!==i.scope_item_count&&n.push("Core ML anticipated-device counts do not conserve the plan rows"),e.format==="safetensors"&&(o.length||e.portfolios.length)&&n.push("SafeTensors contains fabricated placement evidence"),["tflite","onnx"].includes(e.format)&&e.runtime_observation?.status==="observed"&&e.runtime_observation.covered_item_count!==i.covered_item_count&&n.push("runtime assignment coverage differs from flow coverage"),t){let s=String(t.format||"").toLowerCase(),c=e.format==="gguf"||e.format==="safetensors"?ft(t.tensor_count):Rt(t.ops).length;e.format!==s&&n.push("analysis format binding mismatch"),e.artifact_item_count!==c&&n.push("analysis item-count binding mismatch"),String(e.artifact_sha256||"")!==String(t.model_sha256||"")&&n.push("analysis SHA-256 binding mismatch")}return{valid:n.length===0,issues:n}}function rB(e){return!e||typeof e!="object"?null:e.runtimeAssignmentEvidence||e.runtime_assignment||e}function sB(e,t){let n=Rt(e.ops),i=Bx(t,n),o=i.rows.length>0;o&&Mp(e,t,"TFLite runtime assignment");let a=o&&i.rows.length===n.length,r=n.filter(y=>Ox(y.xnnpack_chain_id,-1)>=0).length,s=Rt(e.delegation_repair?.runtime_build_risks);if(s.find(y=>y.baseline_conditionally_delegatable_op_count!=null&&ft(y.baseline_conditionally_delegatable_op_count)!==r))throw new Error("TFLite runtime-build risk baseline differs from the canonical XNNPACK candidate count.");let u=e.tflite_delegate_compatibility_evidence,l=o||fx(t,s),p=gx(t,u?.build_requirements).all_applicable_requirements_bound,d=o||l||p||!!(t?.runtime_identity||t?.runtime_identity_status==="bound"),m=Rt(u?.profiles).filter(y=>!/xnnpack/i.test(`${y.id||""} ${y.label||""}`)).map(y=>d_(y.id||y.label,y.label||y.id,ft(y.source_candidate_after_artifact_precheck_count),n.length,"SOURCE_PINNED_ARTIFACT_PRECHECK","artifact-visible source candidates")),f=Array.isArray(e.tensors)?[ki({analysis:e,profileId:"xnnpack_cpu",label:"XNNPACK CPU",evidenceClass:"SOURCE_PINNED_PREDICTED",rows:lx(e),source:{rule_basis:e.delegation_rule_basis||null,selector_assessment_status:e.xnnpack_selector_assessment_status||null},interpretationBoundary:"CPU baseline derived from the pinned XNNPACK conditional-delegation ledger. It is not an accepted partition, selected microkernel, measured CPU workload, or timing result."}),...Rt(u?.profiles).filter(y=>Rt(y?.rows).length===n.length).map(y=>ki({analysis:e,profileId:y.id,label:y.label||y.id,evidenceClass:y.evidence_class||"SOURCE_PINNED/DERIVED_PARTIAL",rows:cx(y),source:{tensorflow_source_commit:u.tensorflow_source_commit||null,rulepack_sha256:u.rulepack_sha256||null}})),...Rp(e)]:[];e.edgetpu_compiler_evidence&&f.push(kx(e,e.edgetpu_compiler_evidence)),e.litert_qualcomm_evidence&&f.push(Tx(e,e.litert_qualcomm_evidence));let g=new Set(["xnnpack",...m.map(y=>y.id)]),h=f.filter(y=>y.profile_id!=="xnnpack_cpu"&&!g.has(y.profile_id)).map(y=>d_(y.profile_id,y.label,y.state_counts.CONDITIONALLY_ELIGIBLE,y.op_count,y.evidence_class,"independent conditionally eligible operations")),b=o?Mx(n,i.byOp):p_(n,y=>{let x=Ox(y.xnnpack_chain_id,-1);return x>=0?[`xnn-${x}`,`XNNPACK C${x}`,"candidate"]:[`cpu-${y.xnnpack_break_class||"fallback"}`,"CPU fallback",fB(y)]},$x),A=u?`XNNPACK ${r}/${n.length} candidate ops; GPU, NNAPI, Core ML, and Qualcomm QNN artifact-visible candidates are separate source-pinned profiles.`:`XNNPACK ${r}/${n.length} candidate ops; Core ML and Qualcomm QNN source prechecks are loaded. GPU/NNAPI profiles require the protected source ledger for this run.`;return wc(e,{format:"tflite",itemKind:"serialized_operator",itemCount:n.length,title:"TFLite Execution Placement",subtitle:o?"Observed delegate assignment":"XNNPACK predicted partition + alternate delegate eligibility",state:o?a?"RUNTIME OBSERVED":"PARTIAL RUNTIME OBSERVATION":"SOURCE-PINNED PREDICTION",tone:o&&a?"complete":"partial",banner:!l&&s.length?mB(s,r,n.length):null,levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${n.length} serialized operators and their tensor contracts; the artifact does not select a delegate or runtime build.`),Et("source_pinned_eligibility","Source-pinned eligibility","ASSESSED","partial","SOURCE_PINNED_PREDICTED",A),Et("configuration_bound","Configuration-bound",d?"BOUND":"UNBOUND",d?"partial":"missing",d?"CONFIGURATION_BOUND":"NOT_OBSERVED",o?"The imported runtime assignment binds the executed configuration.":l&&p?"XNNPACK requirements and the TFLite GPU/NNAPI selected-build inventory are bound; device acceptance remains separate.":l?"XNNPACK build requirements are bound; TFLite GPU/NNAPI selected-build availability remains separate.":p?"TFLite GPU/NNAPI selected-build inventory is bound; XNNPACK build requirements and device acceptance remain separate.":d?"A runtime identity is bound, but backend-specific build requirements remain separately assessed.":"Selected delegate build flags and device capability are not embedded in TFLite."),Et("runtime_evidence","Runtime evidence",o?a?"OBSERVED":"PARTIAL OBSERVED":"NOT OBSERVED",o?a?"complete":"partial":"missing",o?"OBSERVED_RUNTIME":"NOT_OBSERVED",o?`${i.rows.length}/${n.length} original-op assignments are identity-bound.`:"Executed delegate partitions, lowering, copies, and kernels require an imported target trace.")],flow:xc(o?"Observed assignment flow":"Conditional XNNPACK partition flow",o?"OBSERVED_RUNTIME_ASSIGNMENT":"SOURCE_PINNED_PREDICTED_PARTITION",n.length,o?i.rows.length:n.length,b),portfolios:[d_("xnnpack","XNNPACK",r,n.length,"SOURCE_PINNED_PREDICTED","conditionally delegatable operators"),...m,...h],staticProfiles:f,note:o?"Observed rows apply only to the imported runtime capture; static XNNPACK and alternate-delegate ledgers remain separate comparisons.":u?"Each delegate/compiler row is an independent source eligibility or imported compiler-result portfolio. They are not combined into a fictitious multi-delegate partition.":"Core ML and Qualcomm QNN profiles remain independent source prechecks. GPU/NNAPI profiles are not loaded in this run, and no multi-backend priority or assignment is inferred.",runtimeObservation:Dx(i,n.length)})}function cB(e,t){let n=Rt(e.ops),i=Rt(e.ort_compatibility_evidence?.execution_providers),o=e.tensorrt_static_preflight,a=Bx(t,n),r=a.rows.length>0;r&&Mp(e,t,"ONNX runtime assignment");let s=r&&a.rows.length===n.length,c=t?.source?.adapter?.native_capture?.selected_build_provider_binding,u=r||!!c,l=i.map(p=>d_(p.execution_provider||p.id||p.label,p.label||p.execution_provider,ft(p.source_candidate_after_artifact_precheck_count),n.length,"SOURCE_PINNED_ARTIFACT_PRECHECK","source candidates after artifact precheck")),_=Array.isArray(e.tensors)?i.filter(p=>Rt(p?.ops).length===n.length).map(p=>ki({analysis:e,profileId:p.execution_provider||p.id||p.label,label:p.label||p.execution_provider||p.id,evidenceClass:p.support_evidence_class||"SOURCE_PINNED_ARTIFACT_PRECHECK",rows:ux(p),source:{source_id:p.source_id||null,source_ref:p.source_ref||null,source_sha256:p.source_sha256||null}})):[];return o?.projection&&_.push(o.projection),wc(e,{format:"onnx",itemKind:"modelproto_operator",itemCount:n.length,title:"ONNX Execution Placement",subtitle:r?"Observed ORT provider assignment":"Per-EP source eligibility portfolios",state:r?s?"RUNTIME OBSERVED":"PARTIAL RUNTIME OBSERVATION":i.length?"SOURCE-PINNED ELIGIBILITY":"SOURCE LEDGER NOT LOADED",tone:r?s?"complete":"partial":i.length?"partial":"missing",banner:r?null:"A provider-priority partition is intentionally not inferred from source registration alone. ORT graph optimization, provider order, selected build, GetCapability acceptance, and CPU fallback must be bound before a joint flow exists.",levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${n.length} ModelProto operators, domains, opsets, and serialized graph contracts are decoded.`),Et("source_pinned_eligibility","Source-pinned eligibility",i.length?`${i.length} EP PROFILES`:"NOT LOADED",i.length?"partial":"missing",i.length?"SOURCE_PINNED_ARTIFACT_PRECHECK":"NOT_ASSESSED",i.length?"Each EP is assessed independently against pinned registrations and artifact-visible predicates.":"Load the source-backed ORT compatibility ledger to evaluate supported EP profiles."),Et("configuration_bound","Configuration-bound",u?"BUILD BOUND":"UNBOUND",u?"partial":"missing",u?"CONFIGURATION_BOUND":"NOT_OBSERVED",u?r&&!c?"Imported runtime assignment binds the executed provider configuration; a separate selected-build inventory was not emitted.":"Selected package/source build provider inventory is bound; GetCapability acceptance is still not inferred.":"ORT version/build, provider priority, reduced-op configuration, and device are not selected by the ONNX artifact."),Et("runtime_evidence","Runtime evidence",r?s?"OBSERVED":"PARTIAL OBSERVED":"NOT OBSERVED",r?s?"complete":"partial":"missing",r?"OBSERVED_RUNTIME":"NOT_OBSERVED",r?`${a.rows.length}/${n.length} original-op provider assignments are bound to the imported profile.`:"Actual EP assignment, optimized nodes, lowering, memory pattern, and kernels require a bound ORT profile.")],flow:xc(r?"Observed EP assignment flow":"EP candidate portfolios",r?"OBSERVED_RUNTIME_ASSIGNMENT":"INDEPENDENT_SOURCE_ELIGIBILITY_PORTFOLIOS",r?n.length:0,r?a.rows.length:0,r?Mx(n,a.byOp):[]),portfolios:l,staticProfiles:_,configurationPreflights:o?[pB(o)]:[],note:r?"The flow is reconstructed from imported observed provider rows; it is not backfilled from static eligibility.":"Candidate counts answer whether each EP remains source-eligible. They do not answer which EP wins when providers are registered together.",runtimeObservation:Dx(a,n.length)})}function lB(e,t){let n=Rt(e.ops),i=t?.schema==="deepbom.coreml_compute_plan.v1"?t:null,o=Rt(i?.structure?.rows);if(i&&Mp(e,i,"Core ML compute plan"),i&&o.length!==n.length)throw new Error("Core ML compute-plan operation count differs from the serialized graph.");if(i&&o.some((s,c)=>ft(s.op_index)!==ft(n[c]?.index)))throw new Error("Core ML compute-plan operation order differs from the serialized graph.");let a=e.coreml?.deployment_floor||{},r=o.length?p_(o,s=>{let c=s.preferred_compute_device||"not determined";return[c,c,"anticipated"]},s=>ft(s.op_index)):[];return wc(e,{format:"coreml",itemKind:"serialized_operation",itemCount:n.length,title:"Core ML Execution Placement",subtitle:i?"MLComputePlan anticipated device usage":"Serialized graph + runtime-plan boundary",state:i?"ANTICIPATED - NOT EXECUTED":"RUNTIME PLAN REQUIRED",tone:i?"estimated":"missing",banner:i?"MLComputePlan preferred/supported compute devices and estimated relative cost are runtime-produced planning estimates for one compiled model and compute-unit configuration. They are not observed execution placement or measured timing.":null,levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${n.length} serialized Core ML operation${n.length===1?"":"s"} and interface contracts are decoded for this representation.`),Et("source_pinned_eligibility","Source-pinned eligibility",a.status==="assessed"?"OS FLOOR DERIVED":"PARTIAL",a.status==="assessed"?"complete":"partial","SOURCE_PINNED_DERIVED","Serialized specification features determine a necessary OS/Core ML floor; they do not select CPU, GPU, or Neural Engine."),Et("configuration_bound","Configuration-bound",i?"PLAN BOUND":"UNBOUND",i?"estimated":"missing",i?"ANTICIPATED_RUNTIME_PLAN":"NOT_OBSERVED",i?`${i.configuration.compute_units}; compiled model and exact operation order are identity-bound.`:"Compile the model on Apple hardware and export an identity-bound MLComputePlan."),Et("runtime_evidence","Runtime evidence","NOT OBSERVED","missing","NOT_OBSERVED","Executed placement, fusion, allocation, and latency require a separate Apple runtime trace; MLComputePlan is not promoted to observed evidence.")],flow:xc(i?"Anticipated preferred-device runs":"No placement flow available",i?"ANTICIPATED_MLCOMPUTEPLAN":"NOT_ASSESSED",o.length,o.length,r),portfolios:i?Object.entries(hB(o,s=>s.preferred_compute_device||"not determined")).map(([s,c])=>d_(s,s,c,o.length,"ANTICIPATED_RUNTIME_PLAN","anticipated operations")):[],note:i?i.boundary:"Static Core ML decoding stops at artifact structure and OS availability. Placement is intentionally left unresolved.",runtimeObservation:{status:"not_observed",covered_item_count:0,total_item_count:n.length,rejected_row_count:0}})}function uB(e,t){let n=t?.schema==="deepbom.gguf_runtime_environment.v2"?t:null;n&&Mp(e,n,"GGUF runtime environment");let i=n?.compute_graph||null,o=ft(i?.graph_count),a=Rt(i?.graphs);if(i&&o!==a.length)throw new Error("GGUF scheduler graph count differs from its graph inventory.");let r=o>0?a[0]:null,s=Rt(r?.scheduled_nodes);if(o>0&&(!r||!s.length))throw new Error("GGUF runtime evidence declares a captured graph without scheduled-node rows.");if(s.some(_=>!String(_?.backend||"").trim()))throw new Error("GGUF scheduled-node evidence lacks a backend assignment.");let c=o>0,u=e.gguf?.backend_compatibility||{},l=s.length?p_(s,_=>{let p=_.backend||"unresolved";return[p,p,p==="unresolved"?"missing":"observed"]},(_,p)=>ft(_.scheduled_index??_.node_index??p)):[];return wc(e,{format:"gguf",itemKind:"serialized_tensor",itemCount:ft(e.tensor_count),title:"GGUF Execution Placement",subtitle:c?"Observed instrumented GGML scheduler assignment":"Artifact prerequisites + external offload contract",state:c?"RUNTIME OBSERVED":n?"CONFIGURATION BOUND":"EXECUTION GRAPH EXTERNAL",tone:c?"complete":n?"partial":"missing",banner:n&&!c?"The imported manifest binds the selected llama.cpp build, backend, device, context, batch, and GPU-layer request, but no generated scheduler graph was captured. Configuration is bound; execution placement is not observed.":null,levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${ft(e.tensor_count)} tensors and GGML storage contracts are decoded. GGUF does not serialize an execution DAG.`),Et("source_pinned_eligibility","Source-pinned eligibility",u.status==="source_candidate"?"CANDIDATE":u.status==="invalid"?"EXCLUDED":"UNRESOLVED",u.status==="source_candidate"?"partial":"missing",u.status==="source_candidate"?"SOURCE_PINNED_PREREQUISITE":"NOT_ASSESSED","Pinned llama.cpp architecture, storage, backend build-option, and registration prerequisites are assessed without inventing layer offload."),Et("configuration_bound","Configuration-bound",n?"BOUND":"UNBOUND",n?"partial":"missing",n?"CONFIGURATION_BOUND":"NOT_OBSERVED",n?`${n.selection.requested_backend_label}; n_gpu_layers=${n.selection.gpu_layers}; context=${n.selection.context_size}; batch=${n.selection.batch_size}.`:"Engine build, backend inventory, n_gpu_layers, split policy, context, batch, and device remain external."),Et("runtime_evidence","Runtime evidence",c?"OBSERVED":"NOT OBSERVED",c?"complete":"missing",c?"OBSERVED_RUNTIME":"NOT_OBSERVED",c?`${o} generated graph(s), ${i.split_count} scheduler split(s), and ${i.successful_dispatch_count}/${i.dispatch_count} successful dispatch(es) are captured.`:"Per-node backend assignment and scheduler transitions require the pinned instrumented llama.cpp trace.")],flow:xc(c?"Observed scheduled-node backend flow - first captured graph":"No serialized placement flow",c?"OBSERVED_GGML_SCHEDULER_GRAPH":"NOT_SERIALIZED",s.length,s.length,l),portfolios:[],note:c?i.interpretation_boundary:"Architecture and storage compatibility do not determine generated GGML nodes, layer offload, tensor residency, or backend transitions.",runtimeObservation:{status:c?"observed":"not_observed",covered_item_count:s.length,total_item_count:s.length,rejected_row_count:0}})}function _B(e){return wc(e,{format:"safetensors",itemKind:"serialized_tensor",itemCount:ft(e.tensor_count),title:"SafeTensors Execution Placement",subtitle:"Checkpoint-container boundary",state:"NOT ASSESSABLE FROM CONTAINER",tone:"na",banner:"SafeTensors contains named tensor payloads, dtypes, shapes, and byte ranges. It does not contain an executable graph, runtime provider order, device policy, or placement trace, so a delegation map would be fabricated evidence.",levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",`${ft(e.tensor_count)} tensor descriptors and their payload ranges are assessed.`),Et("source_pinned_eligibility","Source-pinned eligibility","NOT APPLICABLE","na","NOT_APPLICABLE","A bound config can derive a canonical architecture scenario, but that scenario is not an executed framework graph or backend-eligibility proof."),Et("configuration_bound","Configuration-bound","EXTERNAL","missing","NOT_OBSERVED","Bind the framework graph, preprocessing, runtime build, provider order, device policy, and cache/offload settings that consume this checkpoint."),Et("runtime_evidence","Runtime evidence","EXTERNAL","missing","NOT_OBSERVED","Import support requires a future framework-specific execution-trace schema; no generic placement is inferred today.")],flow:xc("Placement unavailable by format semantics","NOT_APPLICABLE",0,0,[]),portfolios:[],note:"This explicit non-assessment is a format fact, not a missing parser feature.",runtimeObservation:{status:"not_applicable",covered_item_count:0,total_item_count:0,rejected_row_count:0}})}function dB(e){let t=Rt(e.ops),n=e.executorch_container==="pte",i=e.executorch_program?.selected_build_binding||null,o=i?.selected_build||null,a=i?.status==="CONTRADICTION_SELECTED_BUILD_CANNOT_SATISFY_SERIALIZED_PROGRAM",r=n&&t.length?p_(t,c=>{let u=c.instruction_kind==="DelegateCall",l=u?String(c.name||"serialized delegate"):"portable instruction";return[u?l:"portable",l,u?"anticipated":"artifact"]},(c,u)=>ft(c.index??u)):[],s=t.filter(c=>c.instruction_kind==="DelegateCall").length;return wc(e,{format:"executorch",itemKind:n?"serialized_instruction":"named_tensor_data",itemCount:t.length,title:"ExecuTorch Execution Placement",subtitle:n?"Serialized AOT instruction and delegate flow":"FT01 data-container boundary",state:n?s?"SERIALIZED DELEGATE CALLS":"PORTABLE INSTRUCTIONS SERIALIZED":"NOT APPLICABLE TO PTD",tone:n?"partial":"na",banner:n?`ET12 delegate calls and backend IDs are artifact-observed AOT lowering evidence. ${o?a?"The imported selected-build attestation contradicts the serialized program inventory.":"The imported selected-build attestation covers the serialized backend and operator identities, but does not prove loading or execution.":"No selected runtime build or binary inventory is bound."}`:"FT01 stores named tensor/blob segments and no execution plan.",levels:[Et("artifact_observed","Artifact observed","OBSERVED","complete","ARTIFACT_OBSERVED",n?`${t.length} ordered ET12 instruction(s), including ${s} serialized delegate call(s), are decoded.`:`${e.tensor_count||0} FT01 named tensor/blob descriptor(s) are decoded.`),Et("source_pinned_eligibility","Source-pinned eligibility",i?"BACKEND REGISTRY PINNED":"SCHEMA PINNED","complete",i?"SOURCE_PINNED_BACKEND_REGISTRY":"SOURCE_PINNED_SCHEMA",i?`${i.source_registry?.backend_count||0} standard backend IDs are bound to the pinned ExecuTorch source registry; serialized identity still does not establish selected-build linkage.`:"The ET12/FT01 wire contract is pinned to the declared ExecuTorch source release; backend implementation eligibility is not inferred from the backend ID alone."),Et("configuration_bound","Configuration-bound",n?o?a?"CONTRADICTION":"ATTESTED":"UNBOUND":"NOT APPLICABLE",n?o?a?"conflict":"complete":"missing":"na",n?o?a?"ATTESTED_BUILD_CONTRADICTION":"ATTESTED_SELECTED_BUILD":"NOT_OBSERVED":"NOT_APPLICABLE",n?o?`${i.delegate_bindings?.length||0} delegate and ${i.kernel_bindings?.length||0} kernel identity binding(s) were compared with attested build inventories; device capability and initialization remain unobserved.`:"The serialized compile specs are observed, but the matching runtime binary, registered backend implementation, device, and allocator configuration are not bound.":"FT01 does not select a consuming PTE or runtime configuration."),Et("runtime_evidence","Runtime evidence","NOT OBSERVED","missing","NOT_OBSERVED","Delegate loading, executed instruction placement, runtime allocation, kernels, physical transfers, and latency require native ExecuTorch evidence.")],flow:xc(n?"Serialized instruction placement flow":"Placement unavailable by format semantics",n?"ARTIFACT_SERIALIZED_AOT_FLOW":"NOT_APPLICABLE",n?t.length:0,n?t.length:0,r),portfolios:[],note:n?"This flow reports serialized KernelCall and DelegateCall boundaries. It is not an execution trace and does not expose delegate-internal operations.":"FT01 is external tensor/blob data, not an executable graph.",runtimeObservation:{status:n?"not_observed":"not_applicable",covered_item_count:0,total_item_count:n?t.length:0,rejected_row_count:0}})}function wc(e,t){let n=t.staticProfiles||[];return{schema:Rx,method_version:"1.0.0",format:t.format,artifact_sha256:String(e.model_sha256||""),artifact_item_kind:t.itemKind,artifact_item_count:t.itemCount,title:t.title,subtitle:t.subtitle,state:t.state,tone:t.tone,banner:t.banner||null,levels:t.levels,flow:t.flow,portfolios:t.portfolios,static_profiles:n,placement_comparison:Op(e,n),configuration_preflights:t.configurationPreflights||[],interpretation_boundary:t.note,runtime_observation:t.runtimeObservation}}function Bx(e,t){let n=Rt(e?.assignments||e?.runtime_assignment?.assignments),i=new Set(t.map(a=>ft(a.index))),o=new Map;for(let a of n){let r=Number(a?.op_index),s=String(a?.provider||a?.observed_provider||"").trim();if(!Number.isSafeInteger(r)||!s)throw new Error("Runtime assignment row lacks a valid original-op index or provider.");if(!i.has(r))throw new Error(`Runtime assignment references out-of-scope op #${r}.`);if(o.has(r))throw new Error(`Runtime assignment duplicates original op #${r}.`);o.set(r,{...a,op_index:r,provider:s})}return{rows:[...o.values()],byOp:o,rawCount:n.length}}function Dx(e,t){return{status:e.rows.length?"observed":"not_observed",covered_item_count:e.rows.length,total_item_count:t,rejected_row_count:e.rawCount-e.rows.length}}function Mx(e,t){return p_(e,n=>{let o=t.get(ft(n.index))?.provider||"unresolved";return[o,o,o==="unresolved"?"missing":"observed"]},$x)}function p_(e,t,n=(i,o)=>o){let i=[];return e.forEach((o,a)=>{let[r,s,c]=t(o,a),u=n(o,a),l=i.at(-1);l?.key===r?(l.item_count+=1,l.end_position=a,l.end_item_id=u):i.push({key:r,label:s,tone:c,start_position:a,end_position:a,start_item_id:u,end_item_id:u,item_count:1})}),i}function xc(e,t,n,i,o){return{label:e,evidence_basis:t,scope_item_count:n,covered_item_count:i,rendered_item_count:o.reduce((a,r)=>a+r.item_count,0),segments:o}}function d_(e,t,n,i,o,a){return{id:String(e||t||"unknown"),label:String(t||e||"unknown"),candidate_count:n,total_count:i,evidence_class:o,detail:a,tone:"partial"}}function Et(e,t,n,i,o,a){return{id:e,label:t,state:n,tone:i,evidence_class:o,detail:a}}function pB(e){let t=e.engine_inspector_evidence||null;return{schema:e.schema,label:"TensorRT Preflight",status:e.status,evidence_class:e.evidence_class,build_profile_sha256:e.build_profile?.profile_sha256||null,execution_path:e.build_profile?.execution_path||null,blocking_issue_count:ft(e.blocking_issue_count),unresolved_issue_count:ft(e.unresolved_issue_count),profile_cost_status:e.optimization_profile_cost?.status||"not emitted",profile_cost_scenario_count:ft(e.optimization_profile_cost?.scenario_count),optimization_profile_cost:e.optimization_profile_cost||null,engine_inspector:t?{schema:t.schema,status:t.status,evidence_class:t.evidence_class,engine_sha256:t.engine?.sha256||null,engine_byte_length:ft(t.engine?.byte_length),profiling_verbosity:t.inspector?.profiling_verbosity||null,schema_generation:t.inspector?.schema_generation||null,execution_context_bound:t.inspector?.execution_context_bound===!0,engine_layer_count:ft(t.engine_layer_count),io_tensor_count:ft(t.io_tensor_count),tactic_annotated_layer_count:ft(t.tactic_annotated_layer_count),multi_source_metadata_layer_count:ft(t.multi_source_metadata_layer_count),dynamic_dimension_tensor_count:ft(t.dynamic_dimension_tensor_count),layer_type_inventory:Rt(t.layer_type_inventory),data_type_inventory:Rt(t.data_type_inventory),source_mapping_status:t.source_mapping_status||null,artifact_engine_relation:t.artifact_engine_relation||null,interpretation_boundary:t.interpretation_boundary||null}:null,issues:Rt(e.issues),trust_boundary:e.trust_boundary,interpretation_boundary:e.interpretation_boundary}}function mB(e,t,n){let i=[...new Set(e.map(a=>a.required_build_configuration).filter(Boolean))],o=i.length?i.join("; "):"unspecified selected-runtime build requirement";return`Conditional assignment: ${t}/${n} XNNPACK candidates depend on unbound selected-runtime build configuration (${o}). If the requirement is absent, the candidate partition changes; no executed assignment is claimed.`}function fB(e){let t=String(e.xnnpack_break_class||"");return t==="structural"?"structural":t==="memory-traffic"?"traffic":t==="high-adjacent-mac-exposure"?"compute":"fallback"}function $x(e,t){return ft(e?.index??t)}function Mp(e,t,n){let i=String(e?.model_sha256||"").toLowerCase(),o=String(t?.artifact_sha256||t?.artifact?.sha256||"").toLowerCase();if(!/^[a-f0-9]{64}$/.test(i)||o!==i)throw new Error(`${n} is not bound to the active artifact SHA-256.`);let a=String(e?.target_profile?.profile_sha256||"").toLowerCase();if(a&&String(t?.target_profile_sha256||t?.target_profile?.profile_sha256||"").toLowerCase()!==a)throw new Error(`${n} is not bound to the active target profile SHA-256.`)}function hB(e,t){let n={};for(let i of e){let o=String(t(i));n[o]=(n[o]||0)+1}return n}function Rt(e){return Array.isArray(e)?e:[]}function ft(e){let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:0}function Ox(e,t=0){let n=Number(e);return Number.isSafeInteger(n)?n:t}var die=Object.freeze({generic:Object.freeze({label:"Model artifact",depth:"Bounded artifact evidence audit",assessed:"Artifact identity and only the format facts explicitly exposed by the selected bounded adapter",runtimeBoundary:"Execution graph, runtime order, placement, latency, quality, and safety remain unobserved unless the artifact or imported evidence explicitly establishes them",nextProof:"Bind the executable deployment artifact, runtime identity, and representative task-output acceptance evidence required by the intended use",stagedDescriptor:"bounded static artifact audit",dashboardTitle:"Model Artifact Evidence",dashboardCopy:"Observed serialized facts are separated from derived structure and unassessed runtime behavior.",runLabel:"Run Bounded Static Audit",completion:"Bounded static artifact audit complete"}),tflite:Object.freeze({label:"TFLite",depth:"Deep graph and deployment-model audit",assessed:"Every serialized SubGraph and control-flow reference, independent per-subgraph tensor/quantization/cost/ArenaPlanner/source-pinned XNNPACK candidate proofs, all-subgraph sparse storage, and target model",runtimeBoundary:"Nested control-flow invocation counts, actual delegate assignment, materialized copies, selected microkernel, and device latency require imported runtime evidence",nextProof:"Import a target delegate assignment and runtime capture, then bind deployment requirements and representative task-output acceptance evidence",stagedDescriptor:"target-bound static graph and deployment audit",dashboardTitle:"TFLite Deployment Evidence",dashboardCopy:"Artifact facts, selected-target estimates, and conditional XNNPACK compatibility are separated from imported runtime observations.",runLabel:"Run TFLite Static Audit",completion:"TFLite static deployment audit run complete"}),onnx:Object.freeze({label:"ONNX",depth:"Static graph and ORT compatibility audit",assessed:"ModelProto graph, bounded shape/type inference, MAC coverage, Q/DQ contracts, serialized LLM graph signals, opsets, independent source-backed ORT EP portfolios, and optional TensorRT native-parser or ORT-EP preflight evidence",runtimeBoundary:"Source eligibility and native TensorRT parser capability acceptance are not ORT TensorRT GetCapability assignment or execution: actual provider assignment, lowering, kernels, memory pattern, and device latency require bound runtime rows",nextProof:"Import a target ORT profile with provider assignment and runtime identity, then bind deployment requirements and representative task-output acceptance evidence",stagedDescriptor:"static graph, opset, shape, and ORT compatibility audit",dashboardTitle:"ONNX Graph And Runtime Compatibility",dashboardCopy:"Serialized graph evidence and source-backed EP compatibility are shown without claiming observed provider assignment.",runLabel:"Run ONNX Static Audit",completion:"ONNX static graph audit run complete"}),gguf:Object.freeze({label:"GGUF",depth:"Container and tensor-payload audit",assessed:"Header, architecture and tokenizer metadata, tensor directory, GGML storage encodings, payload ranges, source-pinned numerical integrity, registered canonical-decoder parameter/KV/compute scenarios, lower-bound-only memory feasibility, and llama.cpp backend prerequisites",runtimeBoundary:"GGUF does not serialize an execution DAG or per-op placement; selected llama.cpp build, backend, context, offload, kernels, and latency require bound runtime evidence",nextProof:"Bind the consuming engine, backend, context, batch, and target runtime capture before making execution or latency claims",stagedDescriptor:"container, tensor encoding, and payload-integrity audit",dashboardTitle:"GGUF Container Evidence",dashboardCopy:"Stored tensor encodings and byte conservation are assessed without inventing an operator graph or runtime compute precision.",runLabel:"Audit GGUF Container",completion:"GGUF container audit run complete"}),safetensors:Object.freeze({label:"SafeTensors",depth:"Checkpoint and shard-integrity audit",assessed:"Header, tensor dtype and shape inventory, exact byte ranges, full-payload numerical integrity, shard-index completeness, source-pinned dense/MoE/SSM architecture and state scenarios, lower-bound-only memory feasibility, plus optional TensorRT-LLM TP/PP/CP, build-limit, quantization, and logical-KV configuration bound to a model-source digest",runtimeBoundary:"A checkpoint plus configuration still does not serialize the executable forward graph. TensorRT-LLM configuration also does not prove engine tactics, per-rank weight residency, preprocessing, runtime cache allocation, occupancy, throughput, or latency",nextProof:"Bind the executable graph, preprocessing contract, runtime configuration, and task-output acceptance evidence that consume this checkpoint",stagedDescriptor:"checkpoint inventory, payload, and shard-integrity audit",dashboardTitle:"SafeTensors Checkpoint Evidence",dashboardCopy:"Tensor storage and shard identity are assessed; graph and deployment behavior remain outside this container contract.",runLabel:"Audit SafeTensors Checkpoint",completion:"SafeTensors checkpoint integrity audit run complete"}),coreml:Object.freeze({label:"Core ML",depth:"Model/package contract and serialized-program audit",assessed:"Package identity, interfaces, decoded NeuralNetwork and ML Program DAGs, GLM/SVM/TreeEnsemble contracts, named Pipeline stage graphs, shape/arithmetic/liveness costs, numerical payload integrity, and a source-bound OS floor",runtimeBoundary:"For NeuralNetwork and ML Program only, MLComputePlan can add anticipated compute-device usage and relative cost; classical/pipeline execution plus all executed placement, fusion, allocation, and latency require Apple runtime evidence",nextProof:"Import an identity-bound MLComputePlan, then add executed Apple runtime placement and representative task-output acceptance evidence",stagedDescriptor:"model/package contract, serialized graph, and weight-encoding audit",dashboardTitle:"Core ML Serialized Artifact Evidence",dashboardCopy:"Decoded model and package contracts are separated from unobserved native Core ML execution behavior.",runLabel:"Audit Core ML Artifact",completion:"Core ML model/package audit run complete"}),executorch:Object.freeze({label:"ExecuTorch",depth:"Serialized execution-plan, delegate, tensor, and AOT memory audit",assessed:"ET12 execution plans, ordered instructions, EValue contracts, 209 source-pinned portable operator signatures, matching KernelCall input/output direction and nominal tensor-contraction MACs, serialized delegate IDs and compile specs, processed-payload byte identities and public-schema root envelopes, optional selected-build/backend/operator/binary attestation, segment conservation, AOT planned buffers, and FT01 named external tensor data",runtimeBoundary:"Custom or signature-mismatched KernelCall rows and delegate-internal semantics remain unbound; a build attestation does not establish dead-strip behavior, backend initialization, executed placement, runtime allocation, kernels, physical transfers, correctness, or latency",nextProof:"Add deepbom.executorch-build.json and required PTD data to close selected-build identity, then import native executed delegate, allocation, transfer, and timing evidence",stagedDescriptor:"serialized execution-plan, segment, delegate, and AOT memory audit",dashboardTitle:"ExecuTorch Program Evidence",dashboardCopy:"Observed ET12/FT01 contracts, source-described payload envelopes, and optional selected-build identity are separated from delegate-internal semantics and unobserved runtime behavior.",runLabel:"Audit ExecuTorch Artifact",completion:"ExecuTorch static program audit run complete"}),graphdef:vb("TensorFlow GraphDef"),savedmodel:vb("TensorFlow SavedModel protobuf"),tensorflow_protobuf:vb("TensorFlow protobuf"),hdf5:Lx("HDF5"),keras:Px("Keras archive","config.json layer order or explicit keras_history references"),pt2:Px("PyTorch PT2 archive","the first bounded models/*.json ExportedProgram graph"),pytorch_checkpoint:Lx("PyTorch checkpoint")});function vb(e){return Object.freeze({label:e,depth:"Preview bounded serialized-graph audit",assessed:"Serialized protobuf node identities and referenced data/control dependencies within the explicitly materialized graph scope",runtimeBoundary:"Model I/O completeness, tensor shapes and types, kernels, execution schedule, placement, latency, quality, and safety are not inferred from the bounded preview",nextProof:"Bind the complete package and a deployment/runtime contract before making execution or performance claims",stagedDescriptor:"preview bounded serialized-graph audit",dashboardTitle:`${e} Evidence`,dashboardCopy:"Serialized node dependencies are shown without object construction or graph execution.",runLabel:`Audit ${e}`,completion:`${e} preview static audit complete`})}function Lx(e){return Object.freeze({label:e,depth:"Preview safe-envelope audit",assessed:"Container identity, bounded member or header facts, and explicitly readable declarative metadata",runtimeBoundary:"No framework objects are constructed and no executable graph, calculation order, tensor semantics, runtime placement, latency, quality, or safety is claimed",nextProof:"Use an exported deployment graph or a separately bound converter/runtime receipt for semantic and execution analysis",stagedDescriptor:"preview safe-envelope and risk-inventory audit",dashboardTitle:`${e} Safe Envelope`,dashboardCopy:"The container is inspected without unsafe deserialization or framework object construction.",runLabel:`Inspect ${e} Safely`,completion:`${e} safe-envelope audit complete`})}function Px(e,t){return Object.freeze({label:e,depth:"Preview bounded declarative-graph and safe-envelope audit",assessed:`Archive identity and dependency relationships serialized by ${t}`,runtimeBoundary:"Framework objects, payload pickles, custom code, lowering, kernels, runtime scheduling, placement, latency, quality, and safety are not executed or inferred",nextProof:"Bind separately observed framework/runtime evidence when execution behavior is relevant",stagedDescriptor:"preview bounded declarative-graph audit",dashboardTitle:`${e} Evidence`,dashboardCopy:"Serialized declarative dependencies are separated from framework execution and runtime behavior.",runLabel:`Audit ${e}`,completion:`${e} preview static audit complete`})}var gB="deepbom.public_product_contracts.v1",bB=Object.freeze([Ji("tflite","stable","stable","stable","source_bounded","Full FlatBuffer artifact analysis; placement remains a source/build projection until runtime evidence is imported."),Ji("onnx","stable","stable","stable","source_bounded","Full protobuf and external-data analysis; execution-provider assignment is never inferred from eligibility."),Ji("gguf","stable","not_applicable","stable_storage_encoding","not_applicable","GGUF serializes tensor storage and architecture metadata, not an executable operator DAG."),Ji("safetensors","stable","not_applicable","stable_metadata_bound","not_applicable","SafeTensors serializes named tensor storage; graph and placement require a separately bound executable artifact."),Ji("coreml","preview","preview","preview","imported_evidence_only","NeuralNetwork and ML Program evidence is supported; compressed and flexible contracts remain fixture-bounded."),Ji("executorch","preview","preview","limited","selected_build_required","ET12/FT01 parsing is bounded; backend and operator completeness require selected-build evidence."),Ji("graphdef","preview","preview","tensor_content_only","not_assessed","GraphDef node, referenced data/control dependencies, and bounded Placeholder/Const tensor contracts are decoded without execution; explicit model I/O, arbitrary op output contracts, kernels, and runtime schedule are not claimed."),Ji("savedmodel","preview","preview","package_identity_only","not_assessed","The first serialized MetaGraph and SignatureDef tensor contracts are decoded. A selected directory is completely path/size/SHA-256 bound, while variable, asset, extra-MetaGraph, kernel, and runtime semantics remain explicitly incomplete."),Ji("hdf5","preview","not_applicable","not_assessed","not_applicable","Safe-envelope preview parses the HDF5 superblock only; no Keras objects, groups, datasets, links, tensor values, or graph are claimed."),Ji("keras","preview","declarative_config_graph","archive_identity_only","not_applicable","Bounded Sequential or explicit keras_history layer dependencies are projected from config.json without constructing Keras objects, lowering layers, or asserting runtime order."),Ji("pt2","preview","declarative_json_graph","archive_identity_only","not_applicable","The first bounded PT2 models/*.json dependency graph is projected without torch.export.load, pickle loading, native code, kernel, or runtime claims."),Ji("pytorch_checkpoint","preview","not_applicable","not_assessed","not_applicable","Safe-envelope preview inventories archive and pickle opcodes/globals without torch.load, object construction, imports, or executable-graph claims.")]),yB=Object.freeze([eo("deepbom.agent_contract.v1","stable","Reviewed Agent metadata and Skill content are versioned independently from the analyzer engine."),eo("deepbom.cli_capabilities.v1","stable","Additive fields only within v1; removals or semantic changes require a new schema id."),eo("deepbom.artifact_evidence_envelope.v1","stable","Canonical cross-format automation envelope."),eo("deepbom.artifact_ir.v2","stable","Canonical artifact evidence identity, graph/storage topology, and overlay contract."),eo("deepbom.model_ir.v1","preview","Format-neutral program, logical tensor, serialized storage, binding, quantization, architecture, and runtime-layer contract. Preview fields may change additively until migration gates pass; source binding to artifact_ir.v2 is mandatory."),eo("deepbom.model_summary.v1","preview","Deterministic table projection of Model IR operations, reversible structural groups, or serialized storage. It does not infer trainability or runtime order."),eo("deepbom.model_ir_visualization_manifest.v1","preview","Deterministic monochrome A4 projection of Model IR subjects. Canonical SVG and derivative PNG do not assert regulatory approval or standard conformance."),eo("deepbom.semantic_artifact_diff.v1","stable","Same-format graph, storage, and quantization-contract comparison derived from two Artifact IR documents."),eo("deepbom.review_summary.v1","stable","Structured source for bounded human summaries; rendered prose is not a machine API."),eo("sarif-2.1.0/deepbomFinding-v1","stable","Finding identity and artifact fingerprints are stable; additive SARIF properties are allowed."),eo("cyclonedx-1.7-json","stable_projection","CycloneDX 1.7 is the only product ML-BOM export contract."),eo("format_specific_analysis","compatibility_surface","Richer native analysis may add or revise fields; automation should consume the envelope or Artifact IR.")]),AB=jx({schema:gB,format_maturity:bB,machine_contracts:yB,release_policy:{schema:"deepbom.release_channel_policy.v1",version_axes:{engine:"release/version.json; changes with product releases",agent_contract:"deepbom.agent_contract.v1@1.0.0; changes only with the reviewed Agent surface",evidence_contract:"deepbom.artifact_evidence_envelope.v1@1.0.0; changes only with incompatible evidence semantics"},stable_channel:{source_channel:"release",npm_dist_tag:"latest",version_pattern:"MAJOR.MINOR.PATCH",promotion_gate:"clean full quality, deploy, six-platform channel matrix, and installed-channel equivalence",target_minimum_interval_days:14,interval_exception:"P0 correctness or security fix with a bounded regression fixture"},prerelease_channel:{source_channel:"prerelease",npm_dist_tag:"next",version_pattern:"MAJOR.MINOR.PATCH-(alpha|beta|rc).N",promotion_gate:"affected quality tiers and channel packaging pass; never promoted to latest"},development_channel:{source_channel:"dev",publishable:!1,version_pattern:"MAJOR.MINOR.PATCH-dev"}}});function qx(){return JSON.parse(JSON.stringify(AB))}function Ji(e,t,n,i,o,a){return Object.freeze({format:e,overall:[t,n,i].includes("preview")||[t,n,i].includes("limited")?"preview":"stable",parser:t,serialized_graph:n,quantization:i,execution_placement:o,interpretation_boundary:a})}function eo(e,t,n){return Object.freeze({schema:e,stability:t,compatibility_boundary:n})}function jx(e){if(!e||typeof e!="object"||Object.isFrozen(e))return e;Object.freeze(e);for(let t of Object.values(e))jx(t);return e}var vB=Object.freeze({tflite:Object.freeze({id:"tflite",label:"TFLite",extensions:[".tflite"],load:"full",analyzer:"wasm",executable:!1,capabilities:["static_analysis","artifact_export","runtime_execution","target_profiles","protected_source_analysis","experimental_tflite_research","multi_projection_geometry"]}),onnx:Object.freeze({id:"onnx",label:"ONNX",extensions:[".onnx"],load:"full_or_external_data",analyzer:"javascript",executable:!1,capabilities:["static_analysis","artifact_export","runtime_execution","target_profiles","protected_source_analysis"]}),gguf:Object.freeze({id:"gguf",label:"GGUF",extensions:[".gguf"],load:"progressive_header",analyzer:"javascript_metadata",executable:!1,capabilities:["metadata_analysis","artifact_export"]}),safetensors:Object.freeze({id:"safetensors",label:"SafeTensors",extensions:[".safetensors"],load:"declared_header",analyzer:"javascript_metadata",executable:!1,capabilities:["metadata_analysis","artifact_export"]}),coreml:Object.freeze({id:"coreml",label:"Core ML",extensions:[".mlmodel",".mlpackage"],load:"file_or_package",analyzer:"javascript_metadata",executable:!1,capabilities:["metadata_analysis","serialized_graph_analysis","weight_encoding_analysis","artifact_export"]}),executorch:Object.freeze({id:"executorch",label:"ExecuTorch",extensions:[".pte",".ptd"],load:"full_or_external_data",analyzer:"javascript",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","artifact_export"]}),tensorflow_protobuf:Object.freeze({id:"tensorflow_protobuf",label:"TensorFlow GraphDef / SavedModel protobuf",extensions:[".pb"],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),graphdef:Object.freeze({id:"graphdef",label:"TensorFlow GraphDef",extensions:[],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),savedmodel:Object.freeze({id:"savedmodel",label:"TensorFlow SavedModel protobuf",extensions:[],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["static_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),hdf5:Object.freeze({id:"hdf5",label:"HDF5 safe envelope",extensions:[".h5",".hdf5"],load:"full_bounded",analyzer:"javascript_safe_envelope",executable:!1,capabilities:["metadata_analysis","safe_envelope","artifact_export"]}),keras:Object.freeze({id:"keras",label:"Keras archive bounded static preview",extensions:[".keras"],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["metadata_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),pt2:Object.freeze({id:"pt2",label:"PyTorch PT2 bounded static preview",extensions:[".pt2"],load:"full_bounded",analyzer:"javascript_safe_static",executable:!1,capabilities:["metadata_analysis","serialized_graph_analysis","safe_envelope","artifact_export"]}),pytorch_checkpoint:Object.freeze({id:"pytorch_checkpoint",label:"PyTorch checkpoint safe envelope",extensions:[".pt",".pth",".ckpt"],load:"full_bounded",analyzer:"javascript_safe_envelope",executable:!0,capabilities:["metadata_analysis","safe_envelope","artifact_export"]}),pytorch_pickle:Object.freeze({id:"pytorch_pickle",label:"Legacy PyTorch unsafe pickle alias",extensions:[],load:"rejected",analyzer:"none",executable:!0,capabilities:[]}),unsupported:Object.freeze({id:"unsupported",label:"Unsupported",extensions:[],load:"rejected",analyzer:"none",executable:!1,capabilities:[]})});function wb(e,t){let n=String(e||"").toLowerCase();for(let i of Object.values(vB))if(i.extensions.some(o=>n.endsWith(o)))return i.id;return t?.length>=8&&t[4]===84&&t[5]===70&&t[6]===76&&t[7]===51?"tflite":t?.length>=8&&(t[4]===69&&t[5]===84&&t[6]===49&&t[7]===50||t[4]===70&&t[5]===84&&t[6]===48&&t[7]===49)?"executorch":t?.length>=4&&t[0]===71&&t[1]===71&&t[2]===85&&t[3]===70?"gguf":t?.length>=8&&t[0]===137&&t[1]===72&&t[2]===68&&t[3]===70&&t[4]===13&&t[5]===10&&t[6]===26&&t[7]===10?"hdf5":wB(t)?"safetensors":t?.length>=4&&t[0]===8?"onnx":"unsupported"}function wB(e){if(!e||e.length<9||e[8]!==123)return!1;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=t.getUint32(0,!0);return t.getUint32(4,!0)===0&&n>=2&&n<=100*1024*1024}nl();Me();Ce();var _A="deepbom.onnx_contract_conflict_capsule.v1",ok=/^[a-f0-9]{64}$/,ak="scope:onnx:main_graph";function mA(e){return String(e?.format||"").toLowerCase()!=="onnx"||(e.onnx_contract_conflict=pq(e)),e}function pq(e){if(String(e?.format||"").toLowerCase()!=="onnx")return null;let t=sk(e.model_sha256||e.artifact_sha256);if(!t)throw new Error("ONNX contract-conflict evidence requires the analyzed artifact SHA-256.");let n=e.onnx_shape_inference,i=e.dynamic_shape_cost_contract;if(!n||!i)return nk({schema:_A,status:"NOT_ASSESSED",evidence_class:"NOT_ASSESSABLE",artifact:tk(e,t),analyzer_contracts:{onnx_shape_inference:n?.schema||null,dynamic_shape_cost:i?.schema||null},summary:xq(),root_conflicts:[],condition_bound_conflicts:[],affected_values:[],downstream_blocked_nodes:[],blocked_mac_rows:[],method:"No capsule is derived unless both the ONNX shape ledger and dynamic-cost ledger are present.",interpretation_boundary:"NOT_ASSESSED is not evidence that the serialized contract is valid."});let o=Fe(n.declaration_conflicts).map((h,b)=>hq(h,b)),a=Fe(n.semantic_contract_conflicts).map((h,b)=>gq(h,b)),r=[...o,...a],s=Aq(r),c=bq(e.tensors),u=wq(c),l=new Set(Fe(e.ops).flatMap(h=>Sq(h.outputs))),_=Fe(e.tensors).filter((h,b)=>l.has(pA(h,b))&&Cq(h)).map((h,b)=>yq(h,pA(h,b),s)),p=Fe(n.rule_unresolved_nodes).filter(h=>String(h?.reason||"").startsWith("blocked_by_upstream_contract_conflict:")).map(h=>({subject_ref:ef(h.node_index),node_index:yo(h.node_index),op_name:Ye(h.op_name)||"UNKNOWN",reason:Ye(h.reason)||"blocked_by_upstream_contract_conflict",blocking_tensor_name:Ye(h.blocked_by?.tensor_name)||Ye(h.reason).split(":").slice(1).join(":"),root_conflict_refs:dA(h.blocked_by?.root_conflict||h.blocked_by,s,u)})),d=Fe(i.total_macs_unresolved_ops).filter(h=>h?.resolution_class==="artifact_contract_conflict").map(h=>({subject_ref:ef(h.op_index),op_index:yo(h.op_index),op_name:Ye(h.op_name)||"UNKNOWN",reason:Ye(h.reason)||"artifact_contract_conflict",blocking_values:Fe(h.blocking_tensors).map(b=>({subject_ref:fA(b.index),tensor_index:yo(b.index),tensor_name:Ye(b.name),role:Ye(b.role)||"unknown"})),root_conflict_refs:hA(Fe(h.root_conflicts).flatMap(b=>dA(b,s,u)))})),m=Nq(d,"op_name"),f={unconditional_root_conflict_count:r.length,declaration_root_conflict_count:o.length,semantic_root_conflict_count:a.length,condition_bound_invalid_variant_count:c.length,invalid_node_output_count:ik(n.invalid_node_output_count),conditionally_invalid_node_output_count:ik(n.conditionally_invalid_node_output_count),downstream_blocked_node_count:p.length,blocked_mac_row_count:d.length,blocked_mac_op_histogram:m,unresolved_root_reference_count:[..._,...p,...d].filter(h=>h.root_conflict_refs.length===0).length},g=r.length>0||c.length>0;return nk({schema:_A,status:g?"INVALID_CONTRACT":"ASSESSED_NO_CONFLICT",evidence_class:"OBSERVED_DERIVED",artifact:tk(e,t),analyzer_contracts:{onnx_shape_inference:n.schema||null,dynamic_shape_cost:i.schema||null},summary:f,root_conflicts:r,condition_bound_conflicts:c,affected_values:_,downstream_blocked_nodes:p,blocked_mac_rows:d,method:"Normalize the source-pinned ONNX shape-inference conflict ledger and dynamic-cost blocker ledger without re-running inference. Preserve serialized declarations, deterministic inferences, condition predicates, native indices, canonical Artifact IR subject references, and exact blocker denominators.",interpretation_boundary:"INVALID_CONTRACT prevents affected shape and MAC rows from being promoted to exact values. The capsule does not repair the model, infer runtime dimensions, prove ONNX Runtime execution, or establish task quality."})}function mq(e,t=null){if(e?.schema!==_A)throw new Error("ONNX contract-conflict capsule schema is invalid.");if(!ok.test(String(e?.artifact?.sha256||"")))throw new Error("ONNX contract-conflict capsule artifact SHA-256 is invalid.");let n=K(Q(Eq(e)));if(e.capsule_sha256!==n)throw new Error("ONNX contract-conflict capsule digest does not match its canonical content.");let i=e.summary||{};fr(i.unconditional_root_conflict_count,Fe(e.root_conflicts).length,"unconditional root conflicts"),fr(i.declaration_root_conflict_count,Fe(e.root_conflicts).filter(s=>s.kind==="declared_inferred_conflict").length,"declaration roots"),fr(i.semantic_root_conflict_count,Fe(e.root_conflicts).filter(s=>s.kind==="operator_semantic_conflict").length,"semantic roots"),fr(i.condition_bound_invalid_variant_count,Fe(e.condition_bound_conflicts).length,"condition-bound variants"),fr(i.downstream_blocked_node_count,Fe(e.downstream_blocked_nodes).length,"downstream blocked nodes"),fr(i.blocked_mac_row_count,Fe(e.blocked_mac_rows).length,"blocked MAC rows"),fr(Iq(i.blocked_mac_op_histogram),Fe(e.blocked_mac_rows).length,"blocked MAC histogram");let o=Number(i.unconditional_root_conflict_count||0)+Number(i.condition_bound_invalid_variant_count||0)>0?"INVALID_CONTRACT":e.status==="NOT_ASSESSED"?"NOT_ASSESSED":"ASSESSED_NO_CONFLICT";if(e.status!==o)throw new Error("ONNX contract-conflict capsule status does not match its conflict counts.");let a=new Set([...Fe(e.root_conflicts),...Fe(e.condition_bound_conflicts)].map(s=>s.conflict_ref)),r=[...Fe(e.affected_values),...Fe(e.downstream_blocked_nodes),...Fe(e.blocked_mac_rows)];for(let s of r)for(let c of Fe(s.root_conflict_refs))if(!a.has(c))throw new Error(`ONNX contract-conflict capsule contains an unresolved root reference: ${c}`);return fr(i.unresolved_root_reference_count,r.filter(s=>Fe(s.root_conflict_refs).length===0).length,"unresolved root references"),t&&fq(e,t),e}function fq(e,t){if(t?.artifact?.sha256!==e.artifact.sha256)throw new Error("ONNX conflict capsule and Artifact IR identify different artifact bytes.");let n=new Set(Fe(t?.graph?.operators).map(o=>o.id)),i=new Set(Fe(t?.graph?.values).map(o=>o.id));for(let o of[...Fe(e.root_conflicts),...Fe(e.downstream_blocked_nodes),...Fe(e.blocked_mac_rows)])if(o.subject_ref&&!n.has(o.subject_ref))throw new Error(`ONNX conflict operator subject is absent from Artifact IR: ${o.subject_ref}`);for(let o of[...Fe(e.condition_bound_conflicts),...Fe(e.affected_values)])if(o.subject_ref&&!i.has(o.subject_ref))throw new Error(`ONNX conflict value subject is absent from Artifact IR: ${o.subject_ref}`);for(let o of Fe(e.blocked_mac_rows))for(let a of Fe(o.blocking_values))if(a.subject_ref&&!i.has(a.subject_ref))throw new Error(`ONNX conflict blocking value is absent from Artifact IR: ${a.subject_ref}`)}function hq(e,t){return{conflict_ref:`onnx-conflict:declaration:${t}`,kind:"declared_inferred_conflict",subject_ref:ef(e.node_index),node_index:yo(e.node_index),op_name:Ye(e.op_name)||"UNKNOWN",tensor_name:Ye(e.tensor_name),field:Ye(e.field)||"contract",declared:e.declared??null,inferred:e.inferred??null}}function gq(e,t){return{conflict_ref:`onnx-conflict:semantic:${t}`,kind:"operator_semantic_conflict",subject_ref:ef(e.node_index),node_index:yo(e.node_index),op_name:Ye(e.op_name)||"UNKNOWN",output_names:Fe(e.output_names).map(Ye).filter(Boolean),reason:Ye(e.reason)||"operator_contract_invalid",details:e.details??null}}function bq(e){let t=[];for(let[n,i]of Fe(e).entries()){let o=i?.conditional_shape_contract||i?.conditionalShapeContract||{};for(let[a,r]of Fe(o.variant_failures).entries()){if(r?.status!=="invalid")continue;let s=pA(i,n);t.push({conflict_ref:`onnx-conflict:conditional:${s}:${a}`,kind:"condition_bound_invalid_variant",subject_ref:fA(s),tensor_index:s,tensor_name:Ye(i?.name)||`tensor_${s}`,variant_index:a,reason:Ye(r.reason)||"conditionally_invalid_tensor_contract",conditions:structuredClone(Fe(r.conditions)),details:r.details??null})}}return t}function yq(e,t,n){let i=e.contract_conflict||e.contractConflict||{};return{subject_ref:fA(t),tensor_index:t,tensor_name:Ye(e.name)||`tensor_${t}`,reason:Ye(i.reason)||"invalid_serialized_tensor_contract",root_conflict_refs:dA(i.root_conflict||i.rootConflict||i,n,new Map)}}function Aq(e){let t=new Map;for(let n of e)for(let i of vq(n))for(let o of rk(i))t.has(o)||t.set(o,n.conflict_ref);return t}function vq(e){let t=[],n=e,i=new Set;for(;n&&typeof n=="object"&&!i.has(n);)i.add(n),(n.node_index!=null||n.reason||n.tensor_name)&&t.push(n),n=n.details;return t}function wq(e){let t=new Map;for(let n of e){let i=`${n.tensor_name}|${n.reason}|${Q(n.conditions||[])}`;t.has(i)||t.set(i,n.conflict_ref)}return t}function dA(e,t,n){if(!e||typeof e!="object")return[];let i=rk(e).map(r=>t.get(r)).filter(Boolean);if(i.length)return hA(i);let o=`${Ye(e.tensor_name)}|${Ye(e.reason)}|${Q(e.conditions||[])}`,a=n.get(o);return a?[a]:[]}function rk(e){let t=yo(e.node_index);return hA([`${t}|${Ye(e.tensor_name)}|${Ye(e.field)}|${Ye(e.reason)}`,`${t}|${Ye(e.tensor_name)}|${Ye(e.field)}|`,`${t}|||${Ye(e.reason)}`,`${t}|${Ye(e.output_names?.[0])}||${Ye(e.reason)}`])}function tk(e,t){let n=e?.artifact_set?.source||{};return{sha256:t,filename:Ye(e.filename)||"model.onnx",byte_length:kq(e.file_size_bytes??e.file_size),artifact_set_sha256:sk(e?.artifact_set?.artifact_set_sha256),source_locator:Ye(n.canonical_locator)||null,source_revision:Ye(n.revision||n.immutability?.revision)||null}}function xq(){return{unconditional_root_conflict_count:0,declaration_root_conflict_count:0,semantic_root_conflict_count:0,condition_bound_invalid_variant_count:0,invalid_node_output_count:0,conditionally_invalid_node_output_count:0,downstream_blocked_node_count:0,blocked_mac_row_count:0,blocked_mac_op_histogram:[],unresolved_root_reference_count:0}}function nk(e){let t={...e,capsule_sha256:K(Q(e))};return mq(t)}function Eq(e){let{capsule_sha256:t,...n}=e||{};return n}function Nq(e,t){let n=new Map;for(let i of e){let o=Ye(i?.[t])||"UNKNOWN";n.set(o,(n.get(o)||0)+1)}return[...n.entries()].sort((i,o)=>o[1]-i[1]||i[0].localeCompare(o[0])).map(([i,o])=>({name:i,count:o}))}function Iq(e){return Fe(e).reduce((t,n)=>t+Number(n?.count||0),0)}function ef(e){let t=yo(e);return t==null?null:`operator:${ak}:${t}`}function fA(e){let t=yo(e);return t==null?null:`value:${ak}:${t}`}function Cq(e){return e?.contract_status==="invalid"||e?.contractStatus==="invalid"}function pA(e,t){return yo(e?.index)??t}function yo(e){let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:null}function ik(e){return yo(e)??0}function kq(e){let t=Number(e);return Number.isFinite(t)&&t>=0?t:null}function Sq(e){return Fe(e).map(yo).filter(t=>t!=null)}function sk(e){let t=Ye(e).toLowerCase();return ok.test(t)?t:null}function fr(e,t,n){if(Number(e)!==t)throw new Error(`ONNX contract-conflict capsule does not conserve ${n}.`)}function hA(e){return[...new Set(e.filter(Boolean))]}function Fe(e){return Array.isArray(e)?e:[]}function Ye(e){return String(e??"").trim()}SA();wA();gf();var LA=Object.freeze({repository:"ggml-org/llama.cpp",source_commit:"7bd8282c37fcd9c4d7236106d664761a23318f18",files:{architecture_registry:{path:"src/llama-arch.cpp",sha256:"1f35546f88f825289efb30c779ec9f71d41dfad74c35b898260d3510a86c997c"},build_options:{path:"ggml/CMakeLists.txt",sha256:"1858523f1703dc31505447a3e162de5f56b6cc5325f9eaad2e0cc8688769737f"},backend_build_rules:{path:"ggml/src/CMakeLists.txt",sha256:"b4210d3aded4f4d217209624f981ecb5c65b1592eca7e049ff14b13c60743cb5"},hip_build_rules:{path:"ggml/src/ggml-hip/CMakeLists.txt",sha256:"a9761856c498862828f88d791643d15dea65ec58d189d2d21a1891f3a506bb30"},backend_registration:{path:"ggml/src/ggml-backend-reg.cpp",sha256:"c0a61f47e7af0359cfff41317ae8e68717960483d141983bba914733b1f68906"},scheduler:{path:"ggml/src/ggml-backend.cpp",sha256:"507577061d22e673a4f002bb215c65aa9c63b88a4e6d1586f52c74ca0b98fa07"}}}),PA=Object.freeze(["clip","llama","llama4","deci","falcon","grok","gpt2","gptj","gptneox","mpt","baichuan","starcoder","refact","bert","modern-bert","nomic-bert","nomic-bert-moe","neo-bert","jina-bert-v2","jina-bert-v3","eurobert","bloom","stablelm","qwen","qwen2","qwen2moe","qwen2vl","qwen3","qwen3moe","qwen3next","qwen3vl","qwen3vlmoe","qwen35","qwen35moe","phi2","phi3","phimoe","plamo","plamo2","plamo3","codeshell","orion","internlm2","minicpm","minicpm3","gemma","gemma2","gemma3","gemma3n","gemma4","gemma4-assistant","gemma-embedding","starcoder2","mamba","mamba2","jamba","falcon-h1","xverse","command-r","cohere2","cohere2moe","dbrx","olmo","olmo2","olmoe","openelm","arctic","deepseek","deepseek2","deepseek2-ocr","deepseek32","deepseek4","chatglm","glm4","glm4moe","glm-dsa","bitnet","t5","t5encoder","jais","jais2","nemotron","nemotron_h","nemotron_h_moe","exaone","exaone4","exaone-moe","rwkv6","rwkv6qwen2","rwkv7","arwkv7","granite","granitemoe","granitehybrid","chameleon","wavtokenizer-dec","plm","bailingmoe","bailingmoe2","dots1","arcee","afmoe","laguna","ernie4_5","ernie4_5-moe","hunyuan-moe","hunyuan-dense","hunyuan_vl","hy_v3","smollm3","gpt-oss","lfm2","lfm2moe","dream","smallthinker","llada","llada-moe","seed_oss","grovemoe","apertus","minimax-m2","minimax-m3","cogvlm","rnd1","pangu-embedded","mistral3","eagle3","dflash","mistral4","paddleocr","mimo2","step35","llama-embed","maincoder","kimi-linear","talkie","mellum","nanbeige"]),tS=Object.freeze([{id:"cpu",label:"CPU",cmake_option:"GGML_CPU",compiled_registration_macro:"GGML_USE_CPU",registration_function:"ggml_backend_cpu_reg",declared_default:"ON",runtime_disable_condition:null},{id:"cuda",label:"CUDA",cmake_option:"GGML_CUDA",compiled_registration_macro:"GGML_USE_CUDA",registration_function:"ggml_backend_cuda_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"hip",label:"HIP",cmake_option:"GGML_HIP",compiled_registration_macro:"GGML_USE_CUDA",registration_function:"ggml_backend_cuda_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"metal",label:"Metal",cmake_option:"GGML_METAL",compiled_registration_macro:"GGML_USE_METAL",registration_function:"ggml_backend_metal_reg",declared_default:"${GGML_METAL_DEFAULT}",runtime_disable_condition:null},{id:"vulkan",label:"Vulkan",cmake_option:"GGML_VULKAN",compiled_registration_macro:"GGML_USE_VULKAN",registration_function:"ggml_backend_vk_reg",declared_default:"OFF",runtime_disable_condition:"GGML_DISABLE_VULKAN environment variable must be absent"},{id:"sycl",label:"SYCL",cmake_option:"GGML_SYCL",compiled_registration_macro:"GGML_USE_SYCL",registration_function:"ggml_backend_sycl_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"webgpu",label:"WebGPU",cmake_option:"GGML_WEBGPU",compiled_registration_macro:"GGML_USE_WEBGPU",registration_function:"ggml_backend_webgpu_reg",declared_default:"OFF",runtime_disable_condition:null},{id:"blas",label:"BLAS",cmake_option:"GGML_BLAS",compiled_registration_macro:"GGML_USE_BLAS",registration_function:"ggml_backend_blas_reg",declared_default:"${GGML_BLAS_DEFAULT}",runtime_disable_condition:null},{id:"openvino",label:"OpenVINO",cmake_option:"GGML_OPENVINO",compiled_registration_macro:"GGML_USE_OPENVINO",registration_function:"ggml_backend_openvino_reg",declared_default:"OFF",runtime_disable_condition:null}]),Cae=Object.freeze({patch_id:"deepbom.ggml_scheduler_trace.v1",trace_protocol:"DEEPBOM_GGML_TRACE_V1",patch_path:"native/llama-cpp/deepbom-ggml-scheduler-trace.patch",patch_sha256:"156f8278172c596657c221ff4937585bcf21a7bc3f08fdc29bf43447b955770f",scheduler_source_original_sha256:"507577061d22e673a4f002bb215c65aa9c63b88a4e6d1586f52c74ca0b98fa07",scheduler_source_patched_sha256:"e027f8876ee9dd04a0b2f0c992b89709ed1a5174011aa5046b488e8aba6af844"});function Zj(){return{...LA,files:Object.fromEntries(Object.entries(LA.files).map(([e,t])=>[e,{...t}]))}}function nS(e,t){let n=typeof e?.architecture=="string"&&e.architecture!=="not_declared"?e.architecture:null,i=n?PA.includes(n):!1,o=Array.isArray(t)?t:[],a=o.filter(u=>u.storage_status!=="assessed"),r=[...new Set(o.map(u=>u.dtype).filter(Boolean))].sort(),s=n?i?a.length?"definite_exclusion_invalid_or_unknown_tensor_storage":"source_candidate_build_and_graph_unbound":"definite_exclusion_architecture_not_registered":"not_assessed_architecture_not_declared",c=tS.map(u=>({...u,assessment_status:s,architecture_registry_match:i,serialized_storage_precheck:a.length?"definite_fail":"passed_known_source_pinned_layouts",build_option_binding:"not_bound_to_selected_runtime_binary",backend_registration_evidence:"source_registration_candidate_only",operator_support_evidence:"not_assessable_without_runtime_constructed_graph_and_backend_device",execution_evidence_class:"NOT_OBSERVED"}));return{schema:"deepbom.gguf_backend_compatibility.v1",status:s.startsWith("definite_exclusion")?"invalid":i&&!a.length?"source_candidate":"not_assessed",evidence_class:"OBSERVED/SOURCE_PINNED",architecture:n,architecture_registry_match:i,pinned_architecture_count:PA.length,tensor_count:o.length,encoding_count:r.length,encodings:r,invalid_or_unknown_storage_tensor_count:a.length,invalid_or_unknown_storage_tensors:a.slice(0,128).map(u=>({tensor_index:u.index,tensor_name:u.name,dtype:u.dtype,storage_status:u.storage_status})),selected_backend_profile_id:null,selected_runtime_build_manifest_status:"not_bound",execution_graph_status:"not_serialized_by_gguf",compatibility_conclusion:"not_concluded",profiles:c,source:Zj(),method:"Match general.architecture against the pinned llama.cpp registry, validate every serialized tensor layout against pinned GGML traits, and enumerate backend CMake option plus compiled registration gates. Do not infer runtime graph operator support, device availability, offload, fallback, or execution.",boundary:"A source candidate is not an executable compatibility result. Bind the exact llama.cpp binary/build manifest and an artifact-identified runtime capture to conclude backend availability or execution."}}Ce();Me();function Ve(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer`);return BigInt(e)}function nt(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function iS({hiddenSize:e,intermediateSize:t,layerCount:n,attentionHeadCount:i,kvHeadCount:o,headWidth:a,contextLength:r,expertCount:s,activeExpertCount:c}){let u=Ve(e,"hidden size"),l=Ve(t,"intermediate size"),_=Ve(n,"layer count"),p=Ve(i,"attention head count"),d=Ve(o,"KV head count"),m=Ve(a,"head width"),f=Ve(r,"context length"),g=Ve(s,"expert count"),h=Ve(c,"active expert count");if(h>g)throw new Error("active expert count cannot exceed expert count");let b=p*m,A=d*m,y=u*b*2n+u*A*2n,x=u*g,v=u*l*3n,I=v*g*_,w=v*h,N=y+x+w,S=N*_,O=f*(f+1n)/2n,B=b*O*2n*_,k=b*f*2n*_;return{schema:"deepbom.sparse_moe_decoder_projection.v1",status:"assessed_source_bound_active_path_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",expert_count:Number(g),active_expert_count_per_token:Number(h),routing_fraction_of_experts:Number(h)/Number(g),router_macs_per_layer_per_token:nt(x),expert_matrix_parameters_per_expert_per_layer:nt(v),total_expert_matrix_parameters_all_layers:nt(I),active_expert_matrix_macs_per_layer_per_token:nt(w),attention_projection_macs_per_layer_per_token:nt(y),active_projection_macs_per_layer_per_token:nt(N),active_projection_macs_all_layers_per_token:nt(S),prefill_active_core_macs_at_declared_context:nt(S*f+B),decode_active_core_macs_at_declared_context:nt(S+k),formula:"router H*E + top_k*(3*H*I) + Q/K/V/O projections; attention QK/PV uses the declared all-global causal scenario",boundary:"Total expert parameters describe serialized expert-matrix residency. Active MAC rows assume exactly top-k experts are evaluated for each token and exclude routing implementation overhead, token sorting, capacity policy, expert imbalance, communication, fusion, activation, normalization, and backend lowering."}}function qA({layerCount:e,intermediateSize:t,stateSize:n,convolutionKernel:i}){let o=Ve(e,"layer count"),a=Ve(t,"intermediate size"),r=Ve(n,"state size"),s=Ve(i,"convolution kernel"),c=a*s,u=a*r,l=o*(c+u);return{schema:"deepbom.ssm_recurrent_state_projection.v1",status:"assessed_element_cardinality",evidence_class:"OBSERVED/SOURCE_PINNED/DERIVED",layer_count:Number(o),intermediate_size:Number(a),state_size:Number(r),convolution_kernel:Number(s),convolution_state_elements_per_layer_per_batch:nt(c),ssm_state_elements_per_layer_per_batch:nt(u),recurrent_state_elements_all_layers_per_batch:nt(l),context_dependency:"constant_per_batch_after_initialization",formula:"layers * intermediate_size * (conv_kernel + state_size) elements per batch",boundary:"This is recurrent cache cardinality from the pinned MambaCache tensor shapes, not transformer KV state. It excludes allocator alignment, temporary selective-scan tensors, paging, residency, and backend-private workspaces."}}function oS({hiddenSize:e,intermediateSize:t,layerCount:n,stateSize:i,timeStepRank:o,convolutionKernel:a,contextLength:r=null}){let s=Ve(e,"hidden size"),c=Ve(t,"intermediate size"),u=Ve(n,"layer count"),l=Ve(i,"state size"),_=Ve(o,"time-step rank"),p=Ve(a,"convolution kernel"),d=s*c*2n,m=c*(_+l*2n),f=_*c,g=c*s,h=c*p,b=d+m+f+g+h,A=b*u,y=r==null?null:Ve(r,"context length");return{schema:"deepbom.ssm_linear_compute_projection.v1",status:"assessed_source_bound_projection_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",input_projection_macs_per_layer_per_token:nt(d),state_parameter_projection_macs_per_layer_per_token:nt(m),time_step_projection_macs_per_layer_per_token:nt(f),output_projection_macs_per_layer_per_token:nt(g),depthwise_convolution_macs_per_layer_per_token_steady_state:nt(h),accounted_macs_per_layer_per_token:nt(b),accounted_macs_all_layers_per_token:nt(A),accounted_macs_all_layers_at_declared_context:y==null?null:nt(A*y),formula:"H*(2I) + I*(R+2S) + R*I + I*H + I*K MACs per layer per token",boundary:"The row counts pinned linear projections and steady-state depthwise convolution only. Selective-scan discretization, recurrent elementwise updates, activation, normalization, residual addition, optimized parallel scan, temporary tensors, and backend fusion are intentionally excluded rather than estimated."}}function aS({vocabularySize:e,hiddenSize:t,intermediateSize:n,attentionLayerCount:i,mambaLayerCount:o,denseFeedForwardLayerCount:a,expertFeedForwardLayerCount:r,attentionHeadCount:s,kvHeadCount:c,headWidth:u,contextLength:l,expertCount:_,activeExpertCount:p,stateSize:d,timeStepRank:m,convolutionKernel:f,mambaIntermediateSize:g}){let h=Ve(t,"hidden size"),b=Ve(n,"feed-forward intermediate size"),A=Ve(i,"attention layer count"),y=Ve(o,"Mamba layer count"),x=BigInt(a),v=BigInt(r);if(x<0n||v<0n||x+v!==A+y)throw new Error("Jamba feed-forward layer counts must be non-negative and conserve total layers");let I=Ve(s,"attention head count"),w=Ve(c,"KV head count"),N=Ve(u,"head width"),S=Ve(l,"context length"),O=Ve(_,"expert count"),B=Ve(p,"active expert count");if(B>O)throw new Error("active expert count cannot exceed expert count");let k=Ve(g,"Mamba intermediate size"),D=Ve(d,"state size"),q=Ve(m,"time-step rank"),L=Ve(f,"convolution kernel"),F=I*N,P=w*N,j=(h*F*2n+h*P*2n)*A,W=(h*k*2n+k*(q+D*2n)+q*k+k*h+k*L)*y,se=h*b*3n,Y=se*x,U=h*O,re=se*B,H=(U+re)*v,fe=se*O*v,Te=j+W+Y+H,ve=S*(S+1n)/2n,gt=F*ve*2n*A,ut=F*S*2n*A,Pt=h*Ve(e,"vocabulary size");return{schema:"deepbom.hybrid_jamba_compute_projection.v1",status:"assessed_source_bound_component_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",attention_layer_count:Number(A),mamba_layer_count:Number(y),dense_feed_forward_layer_count:Number(x),expert_feed_forward_layer_count:Number(v),attention_projection_macs_all_attention_layers_per_token:nt(j),mamba_projection_and_depthwise_macs_all_mamba_layers_per_token:nt(W),dense_feed_forward_macs_all_dense_layers_per_token:nt(Y),active_moe_macs_all_expert_layers_per_token:nt(H),total_expert_matrix_parameters_all_expert_layers:nt(fe),accounted_projection_macs_all_layers_per_token:nt(Te),prefill_accounted_core_macs_at_declared_context:nt(Te*S+gt),decode_accounted_core_macs_at_declared_context:nt(Te+ut),output_projection_macs_per_logit_position:nt(Pt),decode_with_one_logit_position_macs:nt(Te+ut+Pt),formula:"attention Q/K/V/O on attention layers + Mamba pinned linear/depthwise terms on Mamba layers + dense FFN or router/top-k expert FFN according to the configured layer schedules",boundary:"The component scenario follows pinned Jamba layer schedules. Attention uses an all-global causal scenario. Selective-scan arithmetic, activations, normalization, routing implementation, temporary tensors, fusion, communication, and backend lowering are excluded rather than estimated."}}function rS(e,{batches:t=[1,2,4],storageBits:n=[8,16,32]}={}){let i=e?.recurrent_state_elements_all_layers_per_batch?.decimal;if(!/^\d+$/.test(String(i||"")))return[];let o=BigInt(i);return t.flatMap(a=>n.map(r=>{if(!Number.isSafeInteger(a)||a<=0||!Number.isSafeInteger(r)||r<=0||r%8!==0)throw new Error("state scenario dimensions must be positive whole-byte integers");return{batch_size:a,storage_bits:r,logical_bytes:nt(o*BigInt(a)*BigInt(r/8)),evidence_class:"DERIVED_CONDITIONAL_SCENARIO"}}))}var yf="deepbom.on_device_llm_runtime_manifest.v2",Xj="deepbom.on_device_llm_runtime_manifest.v1",sS=new Set(["DECLARED","OBSERVED_RUNTIME"]),Wj=new Set(["cpu","accelerator","unresident"]),Yj=new Set([yf,Xj]),jA=Object.freeze(["graph_workspace_bytes","scratch_bytes","packing_and_replica_bytes","allocator_overhead_bytes","backend_private_bytes","other_runtime_bytes"]);function yn(e){return e&&typeof e=="object"&&/^\d+$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^\d+$/.test(e)||Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function mi(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function Ho(e){return Number.isSafeInteger(e)&&e>0?e:null}function ol(e){return typeof e=="string"&&/^[a-f0-9]{64}$/.test(e)?e:null}function bf(e){return typeof e=="string"&&e.trim()?e.trim():null}function al(e,t,n){let i=e?.evidence_class;return sS.has(i)||n.push({code:"LLM_RUNTIME_SECTION_EVIDENCE_INVALID",path:t,observed:i??null}),sS.has(i)?i:null}function Jj(e,t,n,i){let o=yn(e?.state?.kv_projection?.elements_per_token_per_batch),a=yn(e?.state?.recurrent_projection?.recurrent_state_elements_all_layers_per_batch);return o!=null&&a!=null?{kind:"hybrid_kv_ssm",logicalBytes:(o*BigInt(t)+a)*BigInt(n)*BigInt(i/8)}:o!=null?{kind:"transformer_kv",logicalBytes:o*BigInt(t)*BigInt(n)*BigInt(i/8)}:a!=null?{kind:"ssm_recurrent",logicalBytes:a*BigInt(n)*BigInt(i/8)}:null}function lS(e,{contexts:t=[512,2048,8192],batches:n=[1,2,4],storageBits:i=[8,16,32]}={}){let o=yn(e?.state?.kv_projection?.elements_per_token_per_batch),a=yn(e?.state?.recurrent_projection?.recurrent_state_elements_all_layers_per_batch);if(o==null&&a==null)return[];let r=Ho(e?.architecture?.context_length);return(o==null?[null]:[...new Set(t.filter(Ho).map(c=>r?Math.min(c,r):c))].sort((c,u)=>c-u)).flatMap(c=>n.filter(Ho).flatMap(u=>i.filter(l=>Ho(l)&&l%8===0).map(l=>({state_kind:o!=null&&a!=null?"hybrid_kv_ssm":o!=null?"transformer_kv":"ssm_recurrent",context_length:c,batch_size:u,storage_bits:l,logical_bytes:mi((o!=null?o*BigInt(c)+(a||0n):a)*BigInt(u)*BigInt(l/8)),evidence_class:"DERIVED_CONDITIONAL_SCENARIO"}))))}function uS(e,t,n){if(!e?.document)return{schema:yf,status:"not_artifact_bound",evidence_class:"NOT_ASSESSABLE",required_bindings:cS(),source:null,issues:[]};let i=e.document,o=[];(!i||typeof i!="object"||Array.isArray(i))&&o.push({code:"LLM_RUNTIME_MANIFEST_NOT_OBJECT"}),Yj.has(i?.schema)||o.push({code:"LLM_RUNTIME_MANIFEST_SCHEMA_INVALID",observed:i?.schema??null});let a=ol(t?.artifact_bundle?.model_source_sha256)||ol(t?.model_sha256);(!a||ol(i?.artifact?.sha256)!==a)&&o.push({code:"LLM_RUNTIME_ARTIFACT_SHA256_MISMATCH",expected:a,observed:i?.artifact?.sha256??null}),String(i?.artifact?.format||"").toLowerCase()!==String(t?.format||"").toLowerCase()&&o.push({code:"LLM_RUNTIME_ARTIFACT_FORMAT_MISMATCH"});let r=al(i?.runtime,"/runtime",o),s={evidence_class:r,engine:bf(i?.runtime?.engine),version:bf(i?.runtime?.version),source_repository:bf(i?.runtime?.source_repository),source_commit:/^[a-f0-9]{40}$/.test(String(i?.runtime?.source_commit||""))?i.runtime.source_commit:null,binary_sha256:ol(i?.runtime?.binary_sha256),build_configuration_sha256:ol(i?.runtime?.build_configuration_sha256)};for(let W of["engine","version","binary_sha256","build_configuration_sha256"])s[W]||o.push({code:"LLM_RUNTIME_IDENTITY_FIELD_MISSING",field:W});let c=al(i?.deployment,"/deployment",o),u=Ho(i?.deployment?.context_length),l=Ho(i?.deployment?.batch_size),_=Ho(i?.deployment?.state_storage_bits);(!u||!l||!_||_%8!==0)&&o.push({code:"LLM_RUNTIME_DEPLOYMENT_DIMENSION_INVALID"});let p=Ho(n?.architecture?.context_length);u&&p&&u>p&&o.push({code:"LLM_RUNTIME_CONTEXT_EXCEEDS_DECLARED_ARCHITECTURE",declared:p,observed:u});let d=al(i?.weight_residency,"/weight_residency",o),m=yn(i?.weight_residency?.artifact_serialized_tensor_bytes),f=yn(n?.storage?.serialized_tensor_bytes_decimal);(m==null||f==null||m!==f)&&o.push({code:"LLM_RUNTIME_SERIALIZED_WEIGHT_BYTES_MISMATCH",expected:f==null?null:String(f),observed:m==null?null:String(m)});let g=yn(i?.weight_residency?.runtime_weight_bytes),h=yn(i?.weight_residency?.cpu_bytes),b=yn(i?.weight_residency?.accelerator_bytes),A=yn(i?.weight_residency?.unresident_bytes);([g,h,b,A].some(W=>W==null)||h+b+A!==g)&&o.push({code:"LLM_RUNTIME_WEIGHT_RESIDENCY_CONSERVATION_FAILED"});let y=al(i?.layer_placement,"/layer_placement",o),x=Ho(n?.architecture?.layer_count),v=Ho(i?.layer_placement?.layer_count),I=Array.isArray(i?.layer_placement?.assignments)?i.layer_placement.assignments:[];(!x||v!==x||I.length!==x)&&o.push({code:"LLM_RUNTIME_LAYER_ASSIGNMENT_CARDINALITY_MISMATCH",expected:x,observed:I.length});let w=new Set;for(let W of I)!Number.isSafeInteger(W?.layer_index)||W.layer_index<0||W.layer_index>=(x||0)||w.has(W.layer_index)||!Wj.has(W?.location)?o.push({code:"LLM_RUNTIME_LAYER_ASSIGNMENT_INVALID",row:W}):w.add(W.layer_index);let N=al(i?.state_cache,"/state_cache",o),S=u&&l&&_&&_%8===0?Jj(n,u,l,_):null,O=yn(i?.state_cache?.logical_bytes);(!S||i?.state_cache?.kind!==S.kind||O!==S.logicalBytes)&&o.push({code:"LLM_RUNTIME_STATE_LOGICAL_BYTES_MISMATCH",expected_kind:S?.kind||null,expected_bytes:S?String(S.logicalBytes):null});let B=yn(i?.state_cache?.allocated_bytes),k=yn(i?.state_cache?.resident_bytes),D=yn(i?.state_cache?.page_size_bytes),q=yn(i?.state_cache?.resident_page_count),L=yn(i?.state_cache?.total_page_count),F=i?.state_cache?.paging_enabled;(typeof F!="boolean"||B==null||k==null||k>B)&&o.push({code:"LLM_RUNTIME_STATE_ALLOCATION_INVALID"}),F&&(D==null||D===0n||q==null||L==null||q>L||k!==D*q||B!==D*L)&&o.push({code:"LLM_RUNTIME_STATE_PAGING_CONSERVATION_FAILED"}),!F&&[D,q,L].some(W=>W!=null)&&o.push({code:"LLM_RUNTIME_NONPAGED_STATE_HAS_PAGE_FIELDS"});let P=eF(i,o),j=[r,c,d,y,N,P?.evidence_class].filter(Boolean).includes("OBSERVED_RUNTIME"),J={capture_id:bf(i?.capture?.capture_id),collected_at:typeof i?.capture?.collected_at=="string"&&!Number.isNaN(Date.parse(i.capture.collected_at))?i.capture.collected_at:null,device_identity_sha256:ol(i?.capture?.device_identity_sha256),source_file_sha256:e.sha256||null};return j&&(!J.capture_id||!J.collected_at||!J.device_identity_sha256)&&o.push({code:"LLM_RUNTIME_OBSERVED_CAPTURE_IDENTITY_INCOMPLETE"}),{schema:i?.schema||yf,status:o.length?"invalid":j?"artifact_bound_observed_runtime":"artifact_bound_declared_runtime",evidence_class:o.length?"INVALID":j?"DECLARED_AND_OBSERVED_RUNTIME":"DECLARED",source:e.path||null,source_sha256:e.sha256||null,runtime:s,deployment:{evidence_class:c,context_length:u,batch_size:l,state_storage_bits:_},weight_residency:{evidence_class:d,artifact_serialized_tensor_bytes:m==null?null:mi(m),runtime_weight_bytes:g==null?null:mi(g),cpu_bytes:h==null?null:mi(h),accelerator_bytes:b==null?null:mi(b),unresident_bytes:A==null?null:mi(A)},layer_placement:{evidence_class:y,layer_count:v,assignments:I,accelerator_layer_count:I.filter(W=>W.location==="accelerator").length,cpu_layer_count:I.filter(W=>W.location==="cpu").length,unresident_layer_count:I.filter(W=>W.location==="unresident").length},state_cache:{evidence_class:N,kind:i?.state_cache?.kind||null,logical_bytes:O==null?null:mi(O),allocated_bytes:B==null?null:mi(B),resident_bytes:k==null?null:mi(k),paging_enabled:F===!0,page_size_bytes:D==null?null:mi(D),resident_page_count:q==null?null:mi(q),total_page_count:L==null?null:mi(L)},working_memory:P,capture:J,required_bindings:cS(),issue_count:o.length,issues:o,boundary:P?"DECLARED sections describe requested configuration; OBSERVED_RUNTIME sections require capture identity. Exclusive primary weight residency, logical state bytes, and the six working-memory categories are conserved independently. The accounted allocation is not process RSS, device-pool fit, application memory, operating-system reserve, kernel selection, latency, or task quality.":"DECLARED sections describe requested configuration; OBSERVED_RUNTIME sections require capture identity. Exclusive primary weight residency and logical state bytes are conserved independently. Runtime packing, replicas, workspaces, allocator overhead, backend-private allocations, kernel selection, latency, and task quality are not inferred."}}function cS(){return["runtime_engine_version_binary_and_build","context_batch_and_state_dtype","exclusive_weight_residency","complete_layer_placement","state_allocation_and_paging","capture_identity_for_observed_sections"]}function eF(e,t){let n=e?.working_memory;if(n==null)return null;if(e?.schema!==yf)return t.push({code:"LLM_RUNTIME_WORKING_MEMORY_REQUIRES_V2"}),null;let i=al(n,"/working_memory",t),o={},a=0n;for(let u of jA){let l=yn(n?.[u]);l==null?t.push({code:"LLM_RUNTIME_WORKING_MEMORY_CATEGORY_INVALID",field:u}):(o[u]=mi(l),a+=l)}let r=yn(n?.accounted_nonweight_runtime_bytes);(r==null||r!==a)&&t.push({code:"LLM_RUNTIME_WORKING_MEMORY_CONSERVATION_FAILED",expected:String(a),observed:r==null?null:String(r)});let s=n?.coverage,c=i==="OBSERVED_RUNTIME"?"complete_observed_runtime_categories":i==="DECLARED"?"complete_declared_runtime_categories":null;return s!==c&&t.push({code:"LLM_RUNTIME_WORKING_MEMORY_COVERAGE_INVALID",expected:c,observed:s??null}),{evidence_class:i,coverage:c,...Object.fromEntries(jA.map(u=>[u,o[u]||null])),accounted_nonweight_runtime_bytes:mi(a),category_count:jA.length,boundary:"All six runtime-allocation categories are explicit and arithmetically conserved. Completeness is the manifest producer's declared or observed capture scope; the section is not process RSS and does not include application memory or operating-system reserve."}}var _S="deepbom.llm_memory_feasibility.v1.1",Af="All serialized tensor bytes and the logical state bytes are simultaneously resident in one aggregate primary-memory budget; storage-backed weight paging, remote execution, and capacity split across independently constrained memory pools are excluded.",tF=1024n**2n,wo=1024n**3n,nF=Object.freeze([["512 MiB",512n*tF],["1 GiB",wo],["2 GiB",2n*wo],["4 GiB",4n*wo],["8 GiB",8n*wo],["16 GiB",16n*wo],["24 GiB",24n*wo],["32 GiB",32n*wo],["48 GiB",48n*wo],["64 GiB",64n*wo],["96 GiB",96n*wo],["128 GiB",128n*wo]].map(([e,t])=>Object.freeze({label:e,bytes:String(t)})));function Ko(e){return e&&typeof e=="object"&&/^\d+$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^\d+$/.test(e)?BigInt(e):typeof e=="bigint"&&e>=0n?e:Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function rn(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function dS(e,t){let n=Ko(e),i=Ko(t);return n==null?{status:"not_assessable_lower_bound_unbound",deficit_bytes:null,headroom_after_lower_bound_bytes:null,fit_claim:"not_emitted"}:i==null?{status:"lower_bound_derived_capacity_unbound",deficit_bytes:null,headroom_after_lower_bound_bytes:null,fit_claim:"not_emitted"}:{status:n>i?"lower_bound_exceeds_capacity":"lower_bound_at_or_below_capacity_fit_unresolved",deficit_bytes:n>i?rn(n-i):null,headroom_after_lower_bound_bytes:n<=i?rn(i-n):null,fit_claim:"not_emitted"}}function vf(e,t){let n=null,i=0;for(let o of t){let a=BigInt(o.bytes);e>a?i+=1:n==null&&(n=o.label)}return{first_capacity_not_exceeded:n||`>${t.at(-1)?.label||"largest reference tier"}`,lower_bound_exceeded_capacity_count:i}}function iF(e,t,n){let i=Array.isArray(e?.state?.scenario_matrix)?e.state.scenario_matrix:[];if(!i.length){let o=vf(t,n);return[{state_kind:"state_contract_unbound",context_length:null,batch_size:null,storage_bits:null,serialized_weight_floor_bytes:rn(t),logical_state_bytes:null,static_lower_bound_bytes:rn(t),evidence_class:"OBSERVED_SERIALIZED_STORAGE",...o}]}return i.map(o=>{let a=Ko(o.logical_bytes);if(a==null)return null;let r=t+a;return{state_kind:o.state_kind,context_length:o.context_length??null,batch_size:o.batch_size,storage_bits:o.storage_bits,serialized_weight_floor_bytes:rn(t),logical_state_bytes:rn(a),static_lower_bound_bytes:rn(r),evidence_class:"OBSERVED_STORAGE_PLUS_DERIVED_CONDITIONAL_STATE",...vf(r,n)}}).filter(Boolean)}function oF(e,t){let n=e?.runtime_contract;if(!n||!["artifact_bound_declared_runtime","artifact_bound_observed_runtime"].includes(n.status))return null;let i=Ko(n.weight_residency?.cpu_bytes),o=Ko(n.weight_residency?.accelerator_bytes),a=Ko(n.state_cache?.resident_bytes),r=Ko(n.state_cache?.allocated_bytes);if([i,o,a,r].some(_=>_==null))return null;let s=i+o+a,c=Ko(n.working_memory?.accounted_nonweight_runtime_bytes),u=i+o+r,l=c==null?null:u+c;return{status:l!=null?n.status==="artifact_bound_observed_runtime"?"assessed_observed_accounted_primary_allocation":"assessed_declared_accounted_primary_allocation":n.status==="artifact_bound_observed_runtime"?"assessed_observed_primary_residency_lower_bound":"assessed_declared_primary_residency_lower_bound",evidence_class:n.evidence_class,context_length:n.deployment?.context_length??null,batch_size:n.deployment?.batch_size??null,state_storage_bits:n.deployment?.state_storage_bits??null,exclusive_weight_resident_bytes:rn(i+o),state_resident_bytes:rn(a),state_allocated_bytes:rn(r),primary_resident_lower_bound_bytes:rn(s),primary_allocated_lower_bound_bytes:rn(u),working_memory_accounted_bytes:c==null?null:rn(c),primary_allocated_accounted_bytes:l==null?null:rn(l),allocation_accounting_status:l==null?"working_memory_categories_unbound":n.working_memory.coverage,capacity_scope:"Aggregate CPU plus accelerator primary residency. Per-pool capacity constraints are not assessed.",resident_capacity_assessment:vf(s,t),allocated_capacity_assessment:vf(l??u,t),fit_claim:"not_emitted",boundary:l==null?"Exclusive primary weight residency plus state-cache residency/allocation from the bound manifest. Working-memory categories are unbound, so the allocated value remains a lower bound. CPU and accelerator bytes are aggregated and do not establish fit within either pool.":"Exclusive primary weight residency, state allocation, and six explicitly conserved working-memory categories from the bound manifest. The accounted value aggregates CPU and accelerator allocations and is not process RSS or a per-pool fit claim; application memory and operating-system reserve remain external."}}function pS(e,{capacityTiers:t=nF}={}){let n=t.map(r=>({label:String(r.label),bytes:String(r.bytes)}));if(!n.length||n.some((r,s)=>!r.label||!/^\d+$/.test(r.bytes)||BigInt(r.bytes)<=0n||s>0&&BigInt(r.bytes)<=BigInt(n[s-1].bytes)))throw new Error("LLM memory capacity tiers must be non-empty, positive, and strictly increasing");let i=Ko(e?.storage?.serialized_tensor_bytes_decimal);if(i==null)return{schema:_S,status:"not_assessable_serialized_weight_bytes_unbound",evidence_class:"NOT_ASSESSABLE",capacity_scope:"single_aggregate_primary_memory_budget",residency_assumption:Af,reference_capacity_tiers:n.map(r=>({label:r.label,bytes:rn(BigInt(r.bytes))})),static_scenarios:[],runtime_primary_residency:null,fit_claim:"not_emitted",boundary:"No fit claim is emitted because exact serialized tensor bytes are unavailable."};let o=iF(e,i,n),a=o.map(r=>Ko(r.static_lower_bound_bytes)).filter(r=>r!=null);return{schema:_S,status:o.some(r=>r.logical_state_bytes==null)?"partial_serialized_weight_floor_only":"assessed_static_lower_bound_scenarios",evidence_class:o.some(r=>r.logical_state_bytes==null)?"OBSERVED":"OBSERVED/DERIVED_CONDITIONAL_SCENARIO",capacity_scope:"single_aggregate_primary_memory_budget",residency_assumption:Af,serialized_weight_floor_bytes:rn(i),minimum_static_lower_bound_bytes:a.length?rn(a.reduce((r,s)=>r<s?r:s)):null,maximum_static_lower_bound_bytes:a.length?rn(a.reduce((r,s)=>r>s?r:s)):null,reference_capacity_tiers:n.map(r=>({label:r.label,bytes:rn(BigInt(r.bytes))})),static_scenarios:o,runtime_primary_residency:oF(e,n),fit_claim:"not_emitted",boundary:"Under the explicit simultaneous-residency assumption, static rows add exact serialized tensor bytes to logical KV/SSM state bytes. A smaller aggregate capacity is insufficient only under that assumption. A capacity at or above the lower bound is not proven sufficient. A v2 artifact-bound runtime manifest may separately account for working-memory categories, but per-pool capacity, application memory, and operating-system reserve remain external."}}var wf="deepbom.llm_layer_storage.v1";function mS(e){if(typeof e=="bigint")return e>=0n?e:null;if(Number.isSafeInteger(e)&&e>=0)return BigInt(e);let t=String(e??"");return/^(?:0|[1-9]\d*)$/.test(t)?BigInt(t):null}function Ns(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:e.toString()}}function aF(e,t){if(e==="gguf")return{id:"gguf_block_namespace",expression:"^blk\\.([0-9]+)\\.",regex:/^blk\.([0-9]+)\./,evidence:"OBSERVED_SERIALIZED_GGUF_TENSOR_NAMESPACE"};if(e!=="safetensors")return null;let n=t?.kind==="ssm_recurrent";return{id:n?"hf_mamba_backbone_layer_namespace":"hf_decoder_model_layer_namespace",expression:n?"^backbone\\.layers\\.([0-9]+)\\.":"^model\\.layers\\.([0-9]+)\\.",regex:n?/^backbone\.layers\.([0-9]+)\./:/^model\.layers\.([0-9]+)\./,evidence:"SOURCE_REGISTERED_HF_CANONICAL_TENSOR_NAMESPACE"}}function fS(e,t,n){let i=String(e?.format||"").toLowerCase(),o=aF(i,t),a="Exact serialized tensor bytes grouped by a source-registered or format-canonical layer namespace. These bytes are not runtime packing, replicas, allocator usage, residency, offload capacity, engine workspace, or physical transfer.";if(!o)return{schema:wf,status:"not_applicable_format",evidence_class:"NOT_APPLICABLE",format:i,boundary:a};let r=Number(t?.layer_count);if(!Number.isSafeInteger(r)||r<=0)return{schema:wf,status:"not_assessable_layer_count_unbound",evidence_class:"NOT_ASSESSABLE",format:i,namespace:{id:o.id,expression:o.expression,evidence:o.evidence},boundary:a};let s=Array.isArray(e?.tensors)?e.tensors:[],c=[],u=[];for(let[v,I]of s.entries()){let w=mS(I?.byte_length_decimal??I?.byte_length);w==null&&u.push({tensor_index:Number.isSafeInteger(Number(I?.index))?Number(I.index):v,tensor_name:String(I?.name||"")}),c.push({tensor:I,position:v,bytes:w})}if(u.length)return{schema:wf,status:"invalid_serialized_tensor_byte_contract",evidence_class:"OBSERVED_INVALID",format:i,expected_layer_count:r,invalid_byte_tensor_count:u.length,invalid_byte_tensors:u.slice(0,256),namespace:{id:o.id,expression:o.expression,evidence:o.evidence},boundary:a};let l=Array.from({length:r},(v,I)=>({layer_index:I,tensor_count:0,bytes:0n})),_=0n,p=0,d=[];for(let v of c){let I=String(v.tensor?.name||""),w=o.regex.exec(I);if(!w){_+=v.bytes,p+=1;continue}let N=Number(w[1]);if(!Number.isSafeInteger(N)||N<0||N>=r){d.push({tensor_index:Number.isSafeInteger(Number(v.tensor?.index))?Number(v.tensor.index):v.position,tensor_name:I,layer_index:N});continue}l[N].tensor_count+=1,l[N].bytes+=v.bytes}let m=c.reduce((v,I)=>v+I.bytes,0n),f=l.reduce((v,I)=>v+I.bytes,0n),g=mS(n?.byte_length_decimal??n?.byte_length),h=l.filter(v=>v.tensor_count===0).map(v=>v.layer_index),b=f+_===m&&g!=null&&m===g,A=d.length?"invalid_layer_index_out_of_range":b?h.length?"partial_layer_namespace_coverage":"assessed_exact_serialized_layer_storage":"invalid_storage_conservation",y=l.filter(v=>v.tensor_count>0),x=y.map(v=>v.bytes).sort((v,I)=>v<I?-1:v>I?1:0);return{schema:wf,status:A,evidence_class:A.startsWith("invalid")?"OBSERVED_INVALID":A.startsWith("partial")?`${o.evidence}/PARTIAL`:`${o.evidence}/DERIVED_EXACT_INTEGER`,format:i,namespace:{id:o.id,expression:o.expression,evidence:o.evidence},expected_layer_count:r,observed_layer_count:y.length,missing_layer_indices:h,unexpected_layer_tensor_count:d.length,unexpected_layer_tensors:d.slice(0,256),serialized_tensor_count:c.length,layer_tensor_count:l.reduce((v,I)=>v+I.tensor_count,0),non_layer_tensor_count:p,serialized_tensor_bytes:Ns(m),expected_serialized_tensor_bytes:g==null?null:Ns(g),layer_bytes:Ns(f),non_layer_bytes:Ns(_),minimum_populated_layer_bytes:x.length?Ns(x[0]):null,maximum_populated_layer_bytes:x.length?Ns(x.at(-1)):null,conservation:{status:b?"pass":"fail",equation:"sum(layer.serialized_bytes) + non_layer_bytes = sum(tensor.byte_length) = tensor_storage_summary.byte_length"},layers:l.map(v=>({layer_index:v.layer_index,tensor_count:v.tensor_count,serialized_bytes:Ns(v.bytes)})),boundary:a}}Me();Ce();var QA="deepbom.llm_static_memory_profile.v1",xS="deepbom.llm_static_memory_placement.v1",hS=new Set(["cpu","accelerator"]),rF=new Set(["highest_index_first","lowest_index_first"]),gS=4096;function Ef(e,t,n){if(!n?.document)return lF();let i=sF(n.document,e,t),o=e?.storage?.layer_storage;if(o?.status!=="assessed_exact_serialized_layer_storage"||o?.conservation?.status!=="pass")throw new Error("LLM static memory placement requires an exact conserved layer-storage ledger.");let a=o.layers||[];if(!a.length||a.length>gS||a.some((b,A)=>b.layer_index!==A||xf(b.serialized_bytes)==null))throw new Error(`LLM static memory placement requires 1-${gS} contiguous exact layer rows.`);let r=cF(e,i.policy),s=rl(r.bytes,"logical state bytes"),c=rl(o.non_layer_bytes,"non-layer serialized bytes"),u=a.map(b=>rl(b.serialized_bytes,`layer ${b.layer_index} serialized bytes`)),l=u.reduce((b,A)=>b+A,0n),_=rl(o.serialized_tensor_bytes,"serialized tensor bytes");if(l+c!==_)throw new Error("LLM layer and non-layer bytes do not conserve against serialized tensor bytes.");let p=i.policy.layer_order==="highest_index_first"?a.map(b=>b.layer_index).reverse():a.map(b=>b.layer_index),d=new Set,m=0n,f=[];for(let b=0;b<=a.length;b+=1){if(b>0){let w=p[b-1];d.add(w),m+=u[w]}let A=l-m,y=A+(i.policy.non_layer_pool==="cpu"?c:0n)+(i.policy.state_pool==="cpu"?s:0n),x=m+(i.policy.non_layer_pool==="accelerator"?c:0n)+(i.policy.state_pool==="accelerator"?s:0n),v=bS(y,i.capacities.cpu_bytes,i.reserves.cpu_bytes),I=bS(x,i.capacities.accelerator_bytes,i.reserves.accelerator_bytes);f.push({accelerator_layer_count:b,accelerator_layer_indices:[...d].sort((w,N)=>w-N),cpu_layer_count:a.length-b,cpu_layer_serialized_bytes:sn(A),accelerator_layer_serialized_bytes:sn(m),cpu_accounted_lower_bound_bytes:sn(y),accelerator_accounted_lower_bound_bytes:sn(x),cpu_capacity_assessment:v,accelerator_capacity_assessment:I,status:v.exceeds||I.exceeds?"accounted_lower_bound_exceeds_at_least_one_pool":"accounted_lower_bound_not_exceeding_pools_fit_unresolved"})}let g=f.filter(b=>b.status==="accounted_lower_bound_not_exceeding_pools_fit_unresolved"),h={schema:QA,artifact:i.artifact,capacities:vS(i.capacities),reserves:vS(i.reserves),policy:i.policy};return{schema:xS,status:g.length?"assessed_lower_bound_candidates":"assessed_all_candidates_exceed_lower_bound",evidence_class:"OBSERVED_SERIALIZED_STORAGE/DERIVED_CONDITIONAL_STATIC_LOWER_BOUND",source:n.path||null,source_sha256:ES(n.sha256)?n.sha256:null,normalized_profile:h,normalized_profile_sha256:K(Q(h)),layer_count:a.length,serialized_tensor_bytes:sn(_),layer_serialized_bytes:sn(l),non_layer_serialized_bytes:sn(c),logical_state:r,candidate_count:f.length,candidates:f,lower_bound_not_exceeding_candidate_count:g.length,minimum_accelerator_layer_count_not_disproven:g.length?g[0].accelerator_layer_count:null,maximum_accelerator_layer_count_not_disproven:g.length?g.at(-1).accelerator_layer_count:null,fit_claim:"not_emitted",conservation:{status:"pass",equation:"layer_serialized_bytes + non_layer_serialized_bytes = serialized_tensor_bytes; every candidate assigns each serialized byte and logical-state byte to exactly one declared pool"},boundary:"Candidates are exact only for serialized tensor bytes and the logical KV/SSM state under the declared profile. Exceeding either effective pool capacity proves that candidate insufficient under these assumptions. Not exceeding both capacities does not prove fit because runtime-expanded or repacked weights, replicas, workspace, allocator overhead, backend-private allocations, application memory, operating-system reserve beyond the declared reserve, and physical placement remain unbound."}}function sF(e,t,n){if(!e||typeof e!="object"||Array.isArray(e)||e.schema!==QA)throw new Error(`LLM static memory profile must use ${QA}.`);let i=wS(e.artifact?.sha256,"profile artifact SHA-256"),o=wS(n?.artifact_bundle?.model_source_sha256||n?.model_sha256,"active model-source SHA-256"),a=String(e.artifact?.format||"").toLowerCase();if(i!==o||a!==String(t?.format||"").toLowerCase())throw new Error("LLM static memory profile is not bound to the active artifact identity.");let r={cpu_bytes:yS(e.capacities?.cpu_bytes,"CPU capacity"),accelerator_bytes:yS(e.capacities?.accelerator_bytes,"accelerator capacity")},s={cpu_bytes:AS(e.reserves?.cpu_bytes,"CPU reserve"),accelerator_bytes:AS(e.reserves?.accelerator_bytes,"accelerator reserve")};if(s.cpu_bytes>=r.cpu_bytes||s.accelerator_bytes>=r.accelerator_bytes)throw new Error("Each LLM memory reserve must be smaller than its declared pool capacity.");let c=String(e.policy?.layer_order||""),u=String(e.policy?.non_layer_pool||""),l=String(e.policy?.state_pool||"");if(!rF.has(c)||!hS.has(u)||!hS.has(l))throw new Error("LLM memory policy must bind layer order, non-layer pool, and state pool.");let _=FA(e.policy?.batch_size,"batch size"),p=FA(e.policy?.state_storage_bits,"state storage bits");if(p%8!==0)throw new Error("LLM state storage bits must be byte-aligned.");let d=e.policy?.context_length==null?null:FA(e.policy.context_length,"context length");return{artifact:{format:a,sha256:i},capacities:r,reserves:s,policy:{layer_order:c,non_layer_pool:u,state_pool:l,context_length:d,batch_size:_,state_storage_bits:p}}}function cF(e,t){let n=BigInt(t.state_storage_bits/8),i=xf(e?.state?.kv_projection?.elements_per_token_per_batch),o=xf(e?.state?.recurrent_projection?.recurrent_state_elements_all_layers_per_batch);if(i!=null&&o!=null){if(t.context_length==null)throw new Error("Hybrid KV/SSM placement requires a declared context length.");let a=i*BigInt(t.context_length),r=(a+o)*BigInt(t.batch_size);return{kind:"hybrid_kv_ssm",context_length:t.context_length,batch_size:t.batch_size,storage_bits:t.state_storage_bits,kv_elements_per_batch:sn(a),recurrent_elements_per_batch:sn(o),bytes:sn(r*n)}}if(i!=null){if(t.context_length==null)throw new Error("Transformer KV placement requires a declared context length.");let a=i*BigInt(t.context_length)*BigInt(t.batch_size)*n;return{kind:"transformer_kv",context_length:t.context_length,batch_size:t.batch_size,storage_bits:t.state_storage_bits,bytes:sn(a)}}if(o!=null){if(t.context_length!=null)throw new Error("SSM recurrent-state placement must not declare a context length.");let a=o*BigInt(t.batch_size)*n;return{kind:"ssm_recurrent",context_length:null,batch_size:t.batch_size,storage_bits:t.state_storage_bits,bytes:sn(a)}}throw new Error("LLM static memory placement requires a complete KV or recurrent-state contract.")}function bS(e,t,n){let i=t-n,o=e>i;return{declared_capacity_bytes:sn(t),declared_reserve_bytes:sn(n),effective_capacity_bytes:sn(i),accounted_lower_bound_bytes:sn(e),status:o?"accounted_lower_bound_exceeds_effective_capacity":"accounted_lower_bound_at_or_below_effective_capacity_fit_unresolved",exceeds:o,deficit_bytes:o?sn(e-i):null,headroom_after_accounted_lower_bound_bytes:o?null:sn(i-e),fit_claim:"not_emitted"}}function lF(){return{schema:xS,status:"not_bound",evidence_class:"NOT_ASSESSABLE",required_profile:["artifact_identity","cpu_and_accelerator_capacities","per_pool_reserves","layer_order","non_layer_pool","state_pool","context_batch_and_state_storage_width"],candidates:[],fit_claim:"not_emitted",boundary:"No per-pool placement result is emitted until an artifact-bound static memory profile declares both capacities, reserves, and residency policy."}}function xf(e){return e&&typeof e=="object"&&/^(?:0|[1-9]\d*)$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^(?:0|[1-9]\d*)$/.test(e)?BigInt(e):typeof e=="bigint"&&e>=0n?e:Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function rl(e,t){let n=xf(e);if(n==null)throw new Error(`${t} must be an exact non-negative integer.`);return n}function yS(e,t){let n=rl(e,t);if(n<=0n)throw new Error(`${t} must be positive.`);return n}function AS(e,t){return rl(e,t)}function FA(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`);return e}function sn(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function vS(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,sn(n)]))}function ES(e){return typeof e=="string"&&/^[a-f0-9]{64}$/.test(e)}function wS(e,t){if(!ES(e))throw new Error(`${t} must be a lowercase SHA-256 digest.`);return e}Me();Ce();var Nf=Object.freeze({repository:"NVIDIA/TensorRT-LLM",release:"v1.2.0",commit:"51f5ef32b695f421dd27727f3935052015c945f9",files:Object.freeze([Object.freeze({path:"tensorrt_llm/builder.py",sha256:"306ced17abe40cc8d25fa1acc749a54f3896e7f97940c2f2d2e4ab8529913eb1",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/builder.py",purpose:"EngineConfig serialization, BuildConfig limits, KV-cache type, plugin configuration, and weight-streaming declaration."}),Object.freeze({path:"tensorrt_llm/models/modeling_utils.py",sha256:"dc739812818f215be4ee625a11ae2418df9d18e79542385952f3a9f0f01ff442",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/models/modeling_utils.py",purpose:"PretrainedConfig architecture dimensions, distributed mapping, and quantization/KV-cache quantization fields."}),Object.freeze({path:"tensorrt_llm/mapping.py",sha256:"ef149fde47ab5bd23a8a4d88da6fa61752d5213e5d425f1d08bead9545e57d42",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/mapping.py",purpose:"world_size = tp_size x pp_size x cp_size and pipeline-layer partition rules."}),Object.freeze({path:"tensorrt_llm/llmapi/kv_cache_type.py",sha256:"761cd0a9412bba588c741c82dcbe64433eba5f863db323310c5f71c539b6e917",url:"https://github.com/NVIDIA/TensorRT-LLM/blob/51f5ef32b695f421dd27727f3935052015c945f9/tensorrt_llm/llmapi/kv_cache_type.py",purpose:"Serialized KV-cache type vocabulary."})])});var HA="deepbom.tensorrt_llm_static_deployment_contract.v1",uF="deepbom.tensorrt_llm_artifact_binding.v1",UA=/^[a-f0-9]{64}$/;function NS(e,t,{engineConfig:n=null,binding:i=null}={}){if(!n?.document)return _F();let o=[],a=n.document;if(!a||typeof a!="object"||Array.isArray(a))return dF("engine_config_not_object",n,o);let r=If(a.pretrained_config,"pretrained_config",o),s=If(a.build_config,"build_config",o),c=If(r.mapping,"pretrained_config.mapping",o),u=If(r.quantization,"pretrained_config.quantization",o),l=$n(c.world_size,"mapping.world_size",o),_=$n(c.tp_size,"mapping.tp_size",o),p=$n(c.pp_size,"mapping.pp_size",o),d=$n(c.cp_size??1,"mapping.cp_size",o);[l,_,p,d].every(P=>P!=null)&&l!==_*p*d&&o.push(Ln("parallel_world_size_mismatch",`${l} != ${_} x ${p} x ${d}`));let m=$n(r.num_hidden_layers,"pretrained_config.num_hidden_layers",o),f=hF(c.pp_partition,p,m,o),g=$n(s.max_input_len,"build_config.max_input_len",o),h=$n(s.max_seq_len,"build_config.max_seq_len",o),b=$n(s.max_batch_size,"build_config.max_batch_size",o),A=$n(s.max_num_tokens,"build_config.max_num_tokens",o),y=Cf(s.opt_num_tokens,"build_config.opt_num_tokens",o);g!=null&&h!=null&&g>h&&o.push(Ln("input_exceeds_sequence_limit",`${g} > ${h}`)),y!=null&&A!=null&&y>A&&o.push(Ln("optimal_tokens_exceed_maximum",`${y} > ${A}`));let x={name:GA(r.architecture,"pretrained_config.architecture",o),dtype:GA(r.dtype,"pretrained_config.dtype",o),hidden_size:$n(r.hidden_size,"pretrained_config.hidden_size",o),intermediate_size:$n(r.intermediate_size,"pretrained_config.intermediate_size",o),layer_count:m,attention_head_count:$n(r.num_attention_heads,"pretrained_config.num_attention_heads",o),kv_head_count:$n(r.num_key_value_heads,"pretrained_config.num_key_value_heads",o),head_size:$n(r.head_size,"pretrained_config.head_size",o),vocabulary_size:Cf(r.vocab_size,"pretrained_config.vocab_size",o),maximum_position_embeddings:Cf(r.max_position_embeddings,"pretrained_config.max_position_embeddings",o)},v=fF(x,t?.architecture||{});v.some(P=>P.status==="mismatch")&&o.push(Ln("source_architecture_mismatch","TensorRT-LLM engine config differs from the artifact-bound architecture contract."));let I=mF(e),w=pF(i,n,I,e?.artifact_bundle?.files||[],o),N=gF(u.kv_cache_quant_algo,x.dtype),S=bF(x,h,b,N),O=$n(s.max_beam_width,"build_config.max_beam_width",o),B=GA(s.kv_cache_type,"build_config.kv_cache_type",o),k=VA(s.strongly_typed,"build_config.strongly_typed",o),D=VA(s.weight_streaming,"build_config.weight_streaming",o),q=Cf(u.group_size,"quantization.group_size",o),L=yF(u.has_zero_point,"quantization.has_zero_point",o),F={schema:HA,method_version:"1.0.0",status:o.length?"invalid":w.status==="artifact_bound"?"artifact_bound_configuration":"candidate_configuration_unbound",evidence_class:w.status==="artifact_bound"?"OBSERVED_CONFIG/SOURCE_PINNED/ARTIFACT_BOUND/DERIVED":"OBSERVED_CONFIG/SOURCE_PINNED/UNBOUND_CANDIDATE",engine_config:{path:n.path||null,byte_length:n.byte_length??null,sha256:n.sha256||null,version:a.version??null,canonical_content_sha256:K(Q(a))},artifact_binding:w,architecture:x,architecture_comparison:v,parallelism:{world_size:l,tensor_parallel_size:_,pipeline_parallel_size:p,context_parallel_size:d,layer_partition_per_pipeline_rank:f,layer_partition_conservation:f&&m!=null&&f.reduce((P,X)=>P+X,0)===m?"complete":"not_assessable",weight_bytes_per_rank:null,weight_bytes_per_rank_reason:"Tensor parallelism and pipeline parallelism do not imply uniform byte sharding for embeddings, LM heads, replicated parameters, plugins, quantized packing, or managed weights. Per-rank engine or builder evidence is required."},build_limits:{max_input_length:g,max_sequence_length:h,maximum_batch_size:b,maximum_beam_width:O,maximum_batched_tokens:A,optimal_batched_tokens:y,kv_cache_type:B,strongly_typed:k,weight_streaming:D,plugin_config_sha256:s.plugin_config&&typeof s.plugin_config=="object"?K(Q(s.plugin_config)):null},quantization:{weight_activation_algorithm:u.quant_algo??null,kv_cache_algorithm:u.kv_cache_quant_algo??null,group_size:q,has_zero_point:L,excluded_module_count:Array.isArray(u.exclude_modules)?u.exclude_modules.length:0},kv_cache_scenario:S,issues:o,issue_count:o.length,source_basis:Nf,trust_boundary:{browser_engine_deserialization:"prohibited",browser_engine_execution:"prohibited",accepted_input:"Hash-bound UTF-8 JSON engine configuration and optional artifact-binding manifest only."},interpretation_boundary:"This contract validates serialized TensorRT-LLM configuration, parallelism conservation, artifact binding, and a conditional logical KV-state scenario where dimensions are complete. It does not build or deserialize an engine, establish per-rank weight residency, tactic/kernel selection, workspace or allocator memory, GPU occupancy, throughput, latency, accuracy, or device feasibility."};return F.contract_sha256=K(Q(F)),F}function _F(){return{schema:HA,status:"not_selected",evidence_class:"NOT_ASSESSABLE",source_basis:Nf}}function dF(e,t,n){n.push(Ln(e,"TensorRT-LLM engine configuration cannot be assessed."));let i={schema:HA,status:"invalid",evidence_class:"OBSERVED_INVALID",engine_config:{path:t?.path||null,sha256:t?.sha256||null},issues:n,issue_count:n.length,source_basis:Nf};return i.contract_sha256=K(Q(i)),i}function pF(e,t,n,i,o){if(!e?.document)return{status:"not_selected",source_artifact_sha256:null,engine_config_sha256:null,engine_file_count:0};let a=e.document;if(a?.schema!==uF||!UA.test(String(a.source_artifact_sha256||""))||!UA.test(String(a.engine_config_sha256||"")))return o.push(Ln("binding_manifest_invalid","TensorRT-LLM binding manifest schema or digest is invalid.")),{status:"invalid",source_artifact_sha256:a?.source_artifact_sha256||null,engine_config_sha256:a?.engine_config_sha256||null,engine_file_count:0};a.source_artifact_sha256!==n&&o.push(Ln("binding_artifact_digest_mismatch","Binding manifest does not identify the selected model-source artifact.")),a.engine_config_sha256!==t.sha256&&o.push(Ln("binding_engine_config_digest_mismatch","Binding manifest does not identify the selected TensorRT-LLM engine config."));let r=new Map(i.map(c=>[c.path,c])),s=Array.isArray(a.engine_files)?a.engine_files:[];for(let c of s)(!c||typeof c.path!="string"||!UA.test(String(c.sha256||""))||r.get(c.path)?.sha256!==c.sha256)&&o.push(Ln("binding_engine_file_mismatch",`Engine component ${c?.path||"<unknown>"} is absent or hash-divergent in the selected bundle.`));return{status:"artifact_bound",source_artifact_sha256:a.source_artifact_sha256,engine_config_sha256:a.engine_config_sha256,engine_file_count:s.length,manifest_path:e.path||null,manifest_sha256:e.sha256||null}}function mF(e){return String(e?.artifact_bundle?.model_source_sha256||e?.model_sha256||"").toLowerCase()}function fF(e,t){return[["hidden_size","hidden_size"],["intermediate_size","intermediate_size"],["layer_count","layer_count"],["attention_head_count","attention_head_count"],["kv_head_count","kv_head_count"],["head_size","head_width"],["vocabulary_size","vocabulary_size"],["maximum_position_embeddings","context_length"]].map(([i,o])=>{let a=e[i],r=t[o];return{engine_field:i,artifact_field:o,engine_value:a,artifact_value:r,status:a==null||r==null?"not_comparable":a===r?"match":"mismatch"}})}function hF(e,t,n,i){if(e!=null){if(!Array.isArray(e)||e.some(s=>!Number.isSafeInteger(Number(s))||Number(s)<0))return i.push(Ln("pipeline_partition_invalid","mapping.pp_partition must contain non-negative integer layer counts.")),null;let r=e.map(Number);return t!=null&&r.length!==t&&i.push(Ln("pipeline_partition_rank_count_mismatch",`${r.length} partition entries for pp_size ${t}.`)),n!=null&&r.reduce((s,c)=>s+c,0)!==n&&i.push(Ln("pipeline_partition_layer_count_mismatch","Pipeline partition does not conserve layer count.")),r}if(t==null||n==null)return null;let o=Math.floor(n/t),a=n%t;return Array.from({length:t},(r,s)=>o+(s<a?1:0))}function gF(e,t){let n=String(e||"").toUpperCase();if(n.includes("FP4")||n.includes("INT4"))return 4;if(n.includes("FP8")||n.includes("INT8"))return 8;let i=String(t||"").toLowerCase();return["float16","bfloat16","half"].includes(i)?16:["float32","float"].includes(i)?32:null}function bF(e,t,n,i){if(![e.layer_count,e.kv_head_count,e.head_size,t,n,i].every(s=>Number.isSafeInteger(s)&&s>0))return{status:"not_assessable_incomplete_dimensions",logical_bytes:null};let a=2n*BigInt(e.layer_count)*BigInt(e.kv_head_count)*BigInt(e.head_size)*BigInt(t)*BigInt(n),r=(a*BigInt(i)+7n)/8n;return{status:"derived_conditional_logical_state",evidence_class:"OBSERVED_CONFIG/DERIVED_CONDITIONAL",context_length:t,batch_size:n,storage_bits:i,logical_elements_decimal:String(a),logical_bytes:{value:r<=BigInt(Number.MAX_SAFE_INTEGER)?Number(r):null,decimal:String(r)},boundary:"Logical full-context KV cardinality from serialized TensorRT-LLM dimensions. Runtime block allocation, reserved capacity, beam sharing, eviction, reuse, fragmentation, and residency are not included."}}function If(e,t,n){return!e||typeof e!="object"||Array.isArray(e)?(n.push(Ln("required_object_missing",t)),{}):e}function GA(e,t,n){let i=String(e??"").trim();return i||n.push(Ln("required_text_missing",t)),i||null}function $n(e,t,n){let i=Number(e);return!Number.isSafeInteger(i)||i<=0?(n.push(Ln("positive_integer_invalid",t)),null):i}function Cf(e,t,n){return e==null?null:$n(e,t,n)}function VA(e,t,n){return typeof e!="boolean"?(n.push(Ln("boolean_not_explicit",t)),null):e}function yF(e,t,n){return e==null?null:VA(e,t,n)}function Ln(e,t){return{code:e,detail:t}}var IS="deepbom.on_device_llm_contract.v2",AF=Object.freeze(["do_sample","temperature","top_p","top_k","typical_p","min_p","max_new_tokens","min_new_tokens","repetition_penalty","num_beams","bos_token_id","eos_token_id","pad_token_id"]),Is=Object.freeze(["intended_use","patient_population","clinical_workflow","human_oversight","task_and_acceptance_metrics","evaluation_dataset_and_lineage","prompt_and_output_constraints","privacy_and_phi_handling","postmarket_monitoring_plan"]);function br(e){return typeof e=="string"&&e.trim()?e.trim():null}function kt(e){return Number.isSafeInteger(e)&&e>0?e:null}function ZA(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function sl(e){return e&&typeof e=="object"&&/^\d+$/.test(String(e.decimal||""))?BigInt(e.decimal):Number.isSafeInteger(e)&&e>=0||typeof e=="string"&&/^\d+$/.test(e)?BigInt(e):null}function vF(e,t){let n=Array.isArray(t?.encodings)?t.encodings.map(o=>({...o})):[],i=(e?.tensors||[]).map(o=>({index:Number.isSafeInteger(Number(o.index))?Number(o.index):null,name:String(o.name||""),dtype:String(o.dtype||"UNKNOWN"),shape:Array.isArray(o.shape)?o.shape.map(a=>Number.isSafeInteger(Number(a))?Number(a):null):[],byte_length:Number.isSafeInteger(Number(o.byte_length))?Number(o.byte_length):Number.isSafeInteger(Number(o.initializer_available_bytes))?Number(o.initializer_available_bytes):Number.isSafeInteger(Number(o.initializer_bytes))?Number(o.initializer_bytes):Number.isSafeInteger(Number(o.buffer_data_length))?Number(o.buffer_data_length):null})).sort((o,a)=>Number(o.index??0)-Number(a.index??0)||String(o.name).localeCompare(String(a.name)));return{encoding_signature_schema:"deepbom.llm_serialized_encoding_signature.v1",encoding_inventory:n,encoding_inventory_sha256:K(Q(n)),encoding_inventory_signature_basis:"SHA-256 over UTF-8 RFC8785-JCS canonical JSON of the complete emitted encoding_inventory array. Rows are ordered by exact serialized bytes descending, then dtype.",tensor_encoding_assignment_sha256:K(Q(i)),tensor_encoding_assignment_signature_basis:"SHA-256 over UTF-8 RFC8785-JCS canonical JSON of tensor rows sorted by numeric index then name and projected to index, name, dtype, shape, and byte_length.",recipe_interpretation:"Content-addressed serialized encoding inventory and tensor-to-encoding assignment only. Quantizer command, converter build, importance matrix, source checkpoint, and recipe authenticity are not inferred."}}function wF(e){let t=sl(e?.elements_per_token_per_batch),n=sl(e?.elements_at_context_batch_one);return t==null||n==null?[]:[8,16,32].map(i=>({storage_bits:i,bytes_per_token_per_batch:ZA(t*BigInt(i/8)),bytes_at_declared_context_batch_one:ZA(n*BigInt(i/8)),evidence_class:"DERIVED_CONDITIONAL_SCENARIO"}))}function xF(e){return!e||typeof e!="object"||Array.isArray(e)?{}:Object.fromEntries(AF.filter(t=>Object.hasOwn(e,t)).map(t=>[t,e[t]]))}function KA(e){return(Array.isArray(e)?e:e==null?[]:[e]).filter(n=>Number.isSafeInteger(n))}function CS(e){let t=e?.document;if(!t)return{status:"not_selected",evidence_class:"NOT_ASSESSABLE",source:null,sha256:null,byte_length:null,coverage:{declared:0,required:Is.length,declared_fields:[],missing:[...Is]},issues:[]};let n=[];(!t||typeof t!="object"||Array.isArray(t))&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_NOT_OBJECT"}),t?.schema!=="deepbom.on_device_llm_deployment_declaration.v1"&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_SCHEMA_INVALID",observed:t?.schema??null});for(let a of Is){let r=t?.[a];r!=null&&(["task_and_acceptance_metrics","evaluation_dataset_and_lineage"].includes(a)?(!Array.isArray(r)||!r.length||r.some(s=>!s||typeof s!="object"||Array.isArray(s)))&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_ARRAY_INVALID",field:a}):(typeof r!="string"||!r.trim())&&n.push({code:"LLM_DEPLOYMENT_DECLARATION_TEXT_INVALID",field:a}))}let i=Is.filter(a=>{let r=t?.[a];return Array.isArray(r)?r.length>0:typeof r=="string"&&!!r.trim()}),o=Is.filter(a=>!i.includes(a));return{status:n.length?"invalid":o.length?"declared_unverified_partial":"declared_unverified_complete",evidence_class:"DECLARED_UNVERIFIED",source:e?.path||null,sha256:e?.sha256||null,byte_length:e?.byte_length??null,coverage:{declared:i.length,required:Is.length,declared_fields:i,missing:o},issues:n}}function EF(e,t){let n=e?.tokenizer_config?.document||null,i=e?.generation_config?.document||null,o=e?.architecture_config?.document||null,a=[],r=kt(t?.vocabulary_size);for(let[p,d]of[["architecture_config",o],["generation_config",i]])for(let m of["bos_token_id","eos_token_id","pad_token_id"])for(let f of KA(d?.[m]))r!=null&&(f<0||f>=r)&&a.push({code:"LLM_SPECIAL_TOKEN_ID_OUT_OF_RANGE",source:p,field:m,value:f,vocabulary_size:r});for(let p of["bos_token_id","eos_token_id","pad_token_id"]){let d=KA(o?.[p]),m=KA(i?.[p]);d.length&&m.length&&JSON.stringify(d)!==JSON.stringify(m)&&a.push({code:"LLM_GENERATION_TOKEN_ID_CONFLICT",field:p,architecture_config:d,generation_config:m})}let s=br(n?.chat_template),c=e?.chat_template||null,u=s?K(s):null;u&&c?.sha256&&u!==c.sha256&&a.push({code:"LLM_CHAT_TEMPLATE_AMBIGUOUS",tokenizer_config_sha256:u,chat_template_file_sha256:c.sha256});let _=Object.values(e||{}).filter(p=>p?.path&&p?.sha256).map(p=>({role:p.role,path:p.path,byte_length:p.byte_length,sha256:p.sha256})).sort((p,d)=>p.path.localeCompare(d.path)).filter(p=>["tokenizer_config","tokenizer_definition","special_token_map","chat_template"].includes(p.role));return{status:a.length?"invalid":_.length?"partially_bound":"not_selected",evidence_class:_.length?"OBSERVED/DECLARED_UNVERIFIED":"NOT_ASSESSABLE",definition_files:_,tokenizer_config:n?{model_max_length:kt(n.model_max_length),padding_side:br(n.padding_side),truncation_side:br(n.truncation_side)}:null,chat_template:u?{status:c?.sha256===u?"identical_dual_declaration":"declared_in_tokenizer_config",sha256:u,source:"tokenizer_config.json"}:c?{status:"declared_in_file",sha256:c.sha256,source:c.path}:{status:"not_selected"},generation:i?{status:"declared_unverified",source:e.generation_config.path,sha256:e.generation_config.sha256,values:xF(i)}:{status:"not_selected",values:{}},issues:a}}function NF(e){let t=e?.gguf?.semantic_contract||{},n=t.architecture_fields||{};return{source_status:t.status||"not_declared",source_evidence_class:t.evidence_class||"NOT_ASSESSABLE",architecture:{family:br(t.architecture),kind:"dense_transformer_decoder",architecture_names:[],context_length:kt(t.context_length),vocabulary_size:kt(t.tokenizer?.vocabulary_count),hidden_size:kt(t.embedding_length),intermediate_size:kt(t.feed_forward_length),layer_count:kt(t.block_count),attention_head_count:kt(t.attention_head_count),kv_head_count:kt(t.attention_head_count_kv),head_width:kt(t.attention_key_length||t.derived_attention_head_width),gqa_query_heads_per_kv_head:kt(t.derived_gqa_query_heads_per_kv_head),position_encoding:t.position_encoding||{status:Object.keys(n).some(i=>i.startsWith("rope."))?"declared":"not_declared"}},tokenizer:{...t.tokenizer,evidence_class:t.tokenizer?.status==="assessed"?"OBSERVED":"NOT_ASSESSABLE",definition_files:[],chat_template:t.tokenizer?.chat_template||{status:"not_declared"}},generation:{status:"not_embedded_as_runtime_policy",values:{}},kv_state_projection:t.kv_state_projection||null,compute_projection:t.compute_projection||null,issues:t.issues||[]}}function IF(e,t){let n=e?.safetensors?.hf_architecture_contract||{},i=n?.fields||{},o={family:br(n.model_type),kind:br(n.architecture_kind)||"dense_transformer_decoder",architecture_names:Array.isArray(n.architectures)?n.architectures:[],context_length:kt(i.max_position_embeddings),vocabulary_size:kt(i.vocab_size),hidden_size:kt(i.hidden_size),intermediate_size:kt(i.intermediate_size),layer_count:kt(i.num_hidden_layers),attention_head_count:kt(i.num_attention_heads),kv_head_count:kt(i.num_key_value_heads),head_width:kt(i.head_dim),gqa_query_heads_per_kv_head:kt(n.gqa_query_heads_per_kv_head),position_encoding:n.position_encoding||{status:"not_projected_from_registered_config"},moe:n.moe_projection||null,ssm:n.recurrent_state_projection?{state_size:kt(i.state_size),convolution_kernel:kt(i.conv_kernel),expansion_factor:Number.isFinite(i.expand)&&i.expand>0?i.expand:null,time_step_rank:kt(i.time_step_rank),recurrent_layer_count:kt(n.recurrent_state_projection?.layer_count)}:null},a=EF(t,o),r=CS(t?.deployment_declaration);return{source_status:n.status||"not_assessed_config_not_selected",source_evidence_class:n.evidence_class||"NOT_ASSESSABLE",architecture:o,tokenizer:a,generation:a.generation,kv_state_projection:n.kv_state_projection||null,recurrent_state_projection:n.recurrent_state_projection||null,compute_projection:n.compute_projection||null,deployment_declaration:r,issues:[...n.issues||[],...a.issues,...r.issues]}}var CF=new Set(["ATTENTION","MULTIHEADATTENTION","GROUPQUERYATTENTION","PAGEDATTENTION","ROTARYEMBEDDING","EMBEDLAYERNORMALIZATION","SKIPLAYERNORMALIZATION","MATMULNBITS","GATEDRELATIVEPOSITIONBIAS","BIASGELU","FASTGELU"]);function kF(e){return String(e||"").replace(/[^A-Za-z0-9]/g,"").toUpperCase()}function SF(e){let t={BOOL:8,INT4:4,UINT4:4,INT8:8,UINT8:8,FLOAT16:16,BFLOAT16:16,INT16:16,UINT16:16,FLOAT32:32,INT32:32,UINT32:32,FLOAT64:64,INT64:64,UINT64:64}[String(e?.dtype||"").toUpperCase()],n=Array.isArray(e?.shape_signature)&&e.shape_signature.length?e.shape_signature:e?.shape;if(!t||!Array.isArray(n)||!n.length||n.some(o=>!Number.isSafeInteger(Number(o))||Number(o)<0))return null;let i=n.reduce((o,a)=>o*BigInt(a),1n);return ZA((i*BigInt(t)+7n)/8n)}function TF(e){let t=String(e?.format||"").toLowerCase(),n=t==="onnx"?e?.onnx_external_data_structure_binding:null;if(n?.range_conservation_status==="complete"){let l=sl(n.declared_element_count),_=sl(n.declared_payload_bytes),p=(n.encoding_inventory||[]).map(d=>{let m=sl(d.element_count),f=sl(d.declared_payload_bytes);return{dtype:String(d.dtype||"UNKNOWN"),tensor_count:Number(d.tensor_count||0),element_count:m!=null&&m<=BigInt(Number.MAX_SAFE_INTEGER)?Number(m):null,element_count_decimal:m==null?null:String(m),byte_length:f!=null&&f<=BigInt(Number.MAX_SAFE_INTEGER)?Number(f):null,byte_length_decimal:f==null?null:String(f),effective_bits_per_element:d.effective_bits_per_element??null}});return{status:"assessed_serialized_constant_structure_payload_values_not_assessed",element_count:l<=BigInt(Number.MAX_SAFE_INTEGER)?Number(l):null,element_count_decimal:String(l),byte_length:_<=BigInt(Number.MAX_SAFE_INTEGER)?Number(_):null,byte_length_decimal:String(_),unique_byte_length:n.unique_payload_bytes?.number??null,unique_byte_length_decimal:n.unique_payload_bytes?.decimal??null,effective_bits_per_element:l>0n?Number(_*8000000n/l)/1e6:null,numerical_payload_decode:n.numerical_payload_decode,encodings:p,format:t}}let o=(Array.isArray(e?.tensors)?e.tensors:[]).filter(l=>l?.constant_buffer===!0||Number(l?.initializer_available_bytes||l?.initializer_bytes||l?.buffer_data_length||0)>0),a=e?.size_breakdown||{},r=Number.isSafeInteger(Number(a.available_initializer_bytes))?Number(a.available_initializer_bytes):Number.isSafeInteger(Number(a.constant_bytes))?Number(a.constant_bytes):null,s=Number.isSafeInteger(Number(a.available_initializer_scalar_elements))?Number(a.available_initializer_scalar_elements):Number.isSafeInteger(Number(a.stored_scalar_elements))?Number(a.stored_scalar_elements):null,c=new Map;for(let l of o){let _=String(l.dtype||"UNKNOWN"),p=Number(l.initializer_available_bytes||l.initializer_bytes||l.buffer_data_length||0),d=Number(l.initializer_stored_elements||0),m=c.get(_)||{dtype:_,tensor_count:0,element_count:0,byte_length:0};m.tensor_count+=1,Number.isSafeInteger(d)&&d>=0&&(m.element_count+=d),Number.isSafeInteger(p)&&p>=0&&(m.byte_length+=p),c.set(_,m)}let u=[...c.values()].sort((l,_)=>_.byte_length-l.byte_length||l.dtype.localeCompare(_.dtype)).map(l=>({dtype:l.dtype,tensor_count:l.tensor_count,element_count:l.element_count,element_count_decimal:String(l.element_count),byte_length:l.byte_length,byte_length_decimal:String(l.byte_length),effective_bits_per_element:l.element_count?l.byte_length*8/l.element_count:null}));return{status:r==null?"not_assessed_constant_storage":"assessed_serialized_constant_storage",element_count:s,element_count_decimal:s==null?null:String(s),byte_length:r,byte_length_decimal:r==null?null:String(r),effective_bits_per_element:r!=null&&s?r*8/s:null,encodings:u,format:t}}function zF(e){let t=Array.isArray(e?.ops)?e.ops:[],n=Array.isArray(e?.tensors)?e.tensors:[],i=t.map((l,_)=>({op_index:Number.isSafeInteger(Number(l?.index))?Number(l.index):_,name:String(l?.name||"UNKNOWN"),domain:br(l?.domain),version:Number.isSafeInteger(Number(l?.version))?Number(l.version):null,normalized_name:kF(l?.name)})),o=l=>i.filter(_=>l.has(_.normalized_name)).length,a=i.filter(l=>CF.has(l.normalized_name)),r={matrix_multiply:o(new Set(["MATMUL","BATCHMATMUL","FULLYCONNECTED","GEMM"])),softmax:o(new Set(["SOFTMAX","LOGSOFTMAX"])),normalization:o(new Set(["LAYERNORMALIZATION","RMSNORMALIZATION","L2NORMALIZATION"])),embedding_gather:o(new Set(["GATHER","GATHERND","EMBEDLAYERNORMALIZATION"])),elementwise_activation:o(new Set(["GELU","FASTGELU","SILU","SWISH","BIASGELU"]))},s=r.matrix_multiply>=2&&r.softmax>=1&&r.normalization>=1,u=[...e?.inputs||[],...e?.outputs||[]].filter(l=>/(?:^|[._/])(past|present|cache|key|value|kv)(?:[._/]|$)/i.test(String(l?.name||""))).map(l=>({tensor_index:Number.isSafeInteger(Number(l?.index))?Number(l.index):null,name:String(l?.name||""),dtype:String(l?.dtype||"UNKNOWN"),shape:Array.isArray(l?.shape_signature)&&l.shape_signature.length?l.shape_signature:Array.isArray(l?.shape)?l.shape:[],logical_bytes_if_static:SF(l),classification:"serialized_name_candidate_not_semantic_proof"}));return{schema:"deepbom.serialized_llm_graph_evidence.v1",status:a.length?"explicit_transformer_operator_evidence_present":s?"transformer_like_motif_candidate":"no_serialized_llm_specific_evidence",evidence_class:a.length?"OBSERVED_SERIALIZED_OPERATOR_SEMANTICS":s?"OBSERVED_GRAPH_WITH_HEURISTIC_CLASSIFICATION":"OBSERVED_NOT_DETECTED",graph_op_count:i.length,graph_signature_sha256:K(Q(i)),explicit_operator_count:a.length,explicit_operators:a,primitive_counts:r,transformer_motif_candidate:s,external_state_candidate_count:u.length,external_state_candidates:u,interpretation_boundary:"An explicit Attention-family operator establishes only its serialized operator semantics, not that the model is a language model. A decomposed MatMul/Softmax/normalization motif is heuristic and may represent vision or another attention workload. Interface names identify candidates only. Architecture family, layer count, KV layout, tokenizer, generation policy, task, and accuracy remain unbound without identity-bound metadata."}}function OF(e){let t=zF(e);return{source_status:t.status,source_evidence_class:t.evidence_class,architecture:{family:null,kind:"not_established_from_serialized_graph_alone",architecture_names:[],context_length:null,vocabulary_size:null,hidden_size:null,intermediate_size:null,layer_count:null,attention_head_count:null,kv_head_count:null,head_width:null,gqa_query_heads_per_kv_head:null,position_encoding:{status:"not_established"}},tokenizer:{status:"not_embedded_or_identity_bound",evidence_class:"NOT_ASSESSABLE",definition_files:[],chat_template:{status:"not_selected"}},generation:{status:"not_embedded_or_identity_bound",values:{}},kv_state_projection:null,recurrent_state_projection:null,compute_projection:null,graph:t,storage:TF(e),issues:[]}}function Zo(e={},{sidecars:t={}}={}){let n=String(e?.format||"").toLowerCase(),i=n==="gguf"?NF(e):n==="safetensors"?IF(e,t):["onnx","tflite"].includes(n)?OF(e):null;if(!i)return{schema:IS,status:"not_applicable_format",evidence_class:"NOT_APPLICABLE",format:n};let o=i.storage||e?.tensor_storage_summary||{},a=vF(e,o),r=fS(e,i.architecture,o),s=["gguf","safetensors"].includes(n)&&/assessed/.test(i.source_status)&&!/not_assessed/.test(i.source_status),c=String(r.status||"").startsWith("invalid"),u=i.source_status==="invalid"||i.source_status==="invalid_config"||i.issues.length>0||c,l=i.deployment_declaration||CS(null),_={schema:IS,status:u?"invalid":s?"assessed_static_artifact_contract":"partial_architecture_contract",evidence_class:s?"OBSERVED/SOURCE_BACKED/DERIVED":i.source_evidence_class,format:n,artifact_role:n==="gguf"?br(e?.metadata?.["general.type"])||"model":n==="safetensors"?"model_tensor_repository":"serialized_executable_graph",architecture:i.architecture,storage:{status:o.status||"not_assessed",serialized_parameter_count:o.element_count??null,serialized_parameter_count_decimal:o.element_count_decimal??null,serialized_tensor_bytes:o.byte_length??null,serialized_tensor_bytes_decimal:o.byte_length_decimal??null,effective_bits_per_parameter:o.effective_bits_per_element??null,...a,layer_storage:r,basis:"Reused from deepbom.tensor_storage_summary.v1; no independent recount."},tokenizer:i.tokenizer,generation:i.generation,state:{kv_projection:i.kv_state_projection,recurrent_projection:i.recurrent_state_projection,storage_scenarios:wF(i.kv_state_projection),recurrent_storage_scenarios:rS(i.recurrent_state_projection),scenario_matrix:[],scenario_boundary:i.kv_state_projection&&i.recurrent_state_projection?"Hybrid byte rows sum transformer KV elements for the selected context with context-independent SSM recurrent elements, then apply batch and storage width. They are not runtime allocation, residency, paging, or device-memory measurements.":i.recurrent_state_projection?"Recurrent-state byte rows are conditional on batch and storage width, remain context-independent under the pinned Mamba cache shape, and are not runtime allocation, residency, paging, or device-memory measurements.":"KV byte rows are conditional on context, batch, and cache storage width. They are not runtime allocation, residency, paging, or device-memory measurements."},compute:{projection:i.compute_projection,boundary:"Architecture equations are static scenarios, not a serialized execution graph, lowered kernel count, latency estimate, or throughput measurement."},serialized_graph:i.graph||null,runtime_contract:null,tensorrt_llm:null,memory_feasibility:null,static_memory_placement:null,medical_ai_claim_boundary:{status:l.status==="not_selected"?"not_established_by_model_artifact":l.status,declaration:l,required_external_evidence:l.coverage?.missing||[...Is],established:["artifact_identity","serialized_tensor_storage","declared_architecture_fields","conditional_state_and_compute_scenarios_where_complete"],not_established:["task_accuracy","clinical_validity","clinical_utility","safety_effectiveness","runtime_assignment","release_readiness"]},issue_count:i.issues.length+(c?1:0),issues:[...i.issues,...c?[{code:"LLM_LAYER_STORAGE_CONTRACT_INVALID",status:r.status}]:[]]};return _.state.scenario_matrix=lS(_),_.runtime_contract=uS(t?.runtime_manifest,e,_),_.tensorrt_llm=NS(e,_,{engineConfig:t?.tensorrt_llm_engine_config||null,binding:t?.tensorrt_llm_binding||null}),_.runtime_contract.gguf_backend_prerequisites=n==="gguf"&&e?.gguf?.backend_compatibility||null,_.memory_feasibility=pS(_),_.static_memory_placement=Ef(_,e,t?.static_memory_profile),_.runtime_contract.status==="invalid"&&(_.status="invalid",_.issues=[..._.issues,..._.runtime_contract.issues],_.issue_count=_.issues.length),_}var md=Object.freeze({awq:Object.freeze({repository:"casper-hansen/AutoAWQ",commit:"5f3785dcaa107ca76f5fa5355f459370c86f82d6",path:"awq/modules/linear/gemm.py",sha256:"073e1faa28ce167349606ee2d0ad6362a1f978fe08ca07298da3c6b977123081",layout:"WQLinear_GEMM"}),gptq:Object.freeze({repository:"ModelCloud/GPTQModel",release:"7.3.5",commit:"a752a7cebeaa5feb499e0b038895f745572ab0fa",path:"gptqmodel/nn_modules/qlinear/__init__.py",sha256:"63c03283af6a1452b1427f88340e992795dfc8169e06f52a4500d692b01486d4",layout:"GPTQQuantLinear classic INT32-compatible packed state"}),hqq:Object.freeze({repository:"mobiusml/hqq",commit:"d88a488ec8aa2d58362ef2038a52bca862db2e74",path:"hqq/core/quantize.py",sha256:"a76a054ba4382d9552f563c468296771cddf53dcd9f4ce6655f94fe18e653daa",layout:"HQQLinear encoded SafeTensors state"}),"compressed-tensors":Object.freeze({repository:"vllm-project/compressed-tensors",release:"0.9.4",commit:"8aa8b822c8f6dac6272bb0749a498e3297b88510",path:"src/compressed_tensors/compressors/quantized_compressors/pack_quantized.py",sha256:"48f207964f1ec22a762dc8e0902c34d8adb51247d448549df6a42a2f43ede5e3",layout:"pack-quantized"})}),RF=Object.freeze({hqq:Object.freeze([Object.freeze({path:"hqq/core/bitpack.py",sha256:"19499f1c72e5f2422e7c90d83ab370e006bbbbad0ede3020b7e356688d99fca8"}),Object.freeze({path:"hqq/core/utils.py",sha256:"808316e4337f6a6305b97844c729a5b70a072052ae5c1c69b793834a143fdf60"}),Object.freeze({path:"hqq/models/base.py",sha256:"4823d53d2992a0eada577cc8bc5c58202eca33d15b792ec50dc03ab63fdf7dc6"}),Object.freeze({repository:"huggingface/transformers",commit:"8cb5963cc22174954e7dca2c0a3320b7dc2f4edc",path:"src/transformers/utils/quantization_config.py",sha256:"30af0253da4122a03c4d758cada0dfaccdd89ddb725b7f698f45be135ddb5358"})]),"compressed-tensors":Object.freeze([Object.freeze({path:"src/compressed_tensors/quantization/quant_config.py",sha256:"33149471be5d3aa30de8b1720f92b687c5f44ef12d716200a22509a83d9d1c61"}),Object.freeze({path:"src/compressed_tensors/quantization/quant_args.py",sha256:"b0aa5bf0370d39b89d8d78cda25d539ff222877657072712a7e7f2cfaf131a16"}),Object.freeze({path:"src/compressed_tensors/quantization/quant_scheme.py",sha256:"cb3d2831b6f0a7b4195d777693928826ef90e9a4ea836f76f55754cd9eefcac3"}),Object.freeze({path:"src/compressed_tensors/quantization/lifecycle/apply.py",sha256:"391fba42637da45446b5e60c0406adbb64f9a87bad42dec8c378c7e0320bbc49"}),Object.freeze({path:"src/compressed_tensors/quantization/lifecycle/initialize.py",sha256:"498e3e1495a9552ba9423bafcbbaeb21cd2915853d7112f92e8d4ac9f512be85"})])}),hd="deepbom.safetensors_quantization_contract.v1.2",RS=Object.freeze(["method","bits","group_size","zero_point","sym","version","desc_act","checkpoint_format"]);function gd(e,t,{sidecars:n={}}={}){let i=UF(e,n);if(!i.length)return zf("not_applicable_no_quantization_declaration","No supported quantization declaration was selected with the SafeTensors repository.");let o=i.map(GF),a=bd(o.map(d=>d.method).filter(Boolean));if(a.length!==1||!md[a[0]])return zf("not_assessed_unsupported_or_conflicting_method",`Expected one supported quantization method; observed ${a.join(", ")||"none"}.`,{declarations:o});let r=a[0];if(r==="hqq")return BF(i,t);if(r==="compressed-tensors")return DF(i,t);let s=VF(o),c=HF(o),u=KF(r,c),l=ZF(t).map(d=>r==="awq"?XF(d,c):WF(d,c));l.length||u.push("quantization_declaration_has_no_packed_module_tensors");let _=s.length+u.length+l.reduce((d,m)=>d+m.issues.length,0),p=md[r];return{schema:hd,status:_?"fail":"assessed",evidence_class:"OBSERVED/DERIVED_FROM_PINNED_FORMAT_SOURCE",method:r,bits:c.bits??null,group_size:c.group_size??null,zero_point:c.zero_point??null,symmetric:c.sym??null,implementation_version:c.version??null,checkpoint_format:c.checkpoint_format??null,pack_word_bits:32,pack_factor:fd(c.bits)?32/c.bits:null,storage_word_bits:32,codes_per_storage_word:fd(c.bits)?32/c.bits:null,granularity:"per_group_weight",logical_group_axis:"input_features",declaration_count:o.length,declarations:o,declaration_conflicts:s,config_issues:u,module_count:l.length,valid_module_count:l.filter(d=>d.status==="pass").length,invalid_module_count:l.filter(d=>d.status!=="pass").length,logical_weight_element_count:fi(l,"logical_weight_element_count"),packed_weight_code_capacity:fi(l,"packed_weight_code_capacity"),logical_weight_bits:fi(l,"logical_weight_bits"),packed_weight_storage_bits:fi(l,"packed_weight_storage_bits"),packing_padding_bits:fi(l,"packing_padding_bits"),packing_conservation_status:l.every(d=>d.packing_conservation_status==="exact_no_padding")?"exact_no_padding":"invalid",scale_element_count:fi(l,"scale_element_count"),zero_point_code_capacity:fi(l,"zero_point_code_capacity"),packed_tensor_bytes:l.reduce((d,m)=>d+m.packed_tensor_bytes,0),source:p,source_files:Rf(r),modules:l,boundary:r==="gptq"?"This contract validates the classic INT32 qweight/qzeros/scales/g_idx state against the pinned GPTQModel layout. Other GPTQModel pack dtypes, planar formats, calibration quality, reconstructed weight accuracy, kernel selection, runtime support, and task quality are not inferred.":"This contract validates selected config ownership, packed tensor identities, dtypes, shapes, group cardinality, and code capacity against one pinned implementation layout. It does not establish calibration quality, reconstructed weight accuracy, kernel selection, runtime support, or task quality."}}function BF(e,t){let n=md.hqq,i=e.map(g=>({path:g.path,...MF(g.value)})),o=i.filter(g=>g.mode==="invalid").map(g=>g.path);if(o.length)return zf("not_assessed_hqq_quantization_config_invalid","HQQ quant_config does not contain a source-compatible static or module-tagged weight contract.",{source:n,source_files:Rf("hqq"),declaration_paths:e.map(g=>g.path),unsupported_paths:o});let a=bd(i.map(g=>JSON.stringify({mode:g.mode,static_config:g.static_config,dynamic_configs:g.dynamic_configs,skip_modules:g.skip_modules}))),r=a.length>1?[{field:"hqq_quant_config",values:a,paths:i.map(g=>g.path)}]:[],s=i[0],c=[];(s.mode==="static"?[s.static_config]:Object.values(s.dynamic_configs)).forEach(g=>$F(g,c));let l=PF(t),_=new Set(l.map(g=>SS(g.name)));if(s.mode==="dynamic")for(let g of Object.keys(s.dynamic_configs))_.has(g)||c.push(`dynamic_config_target_has_no_encoded_module:${g}`);let p=l.map(g=>{let h=SS(g.name),b=s.mode==="static"?s.static_config:s.dynamic_configs[h]||null,A=s.skip_modules.some(y=>g.name===y||g.name.endsWith(`.${y}`));return FF(g,b,{tag:h,excluded:A,ownership_mode:s.mode})});p.length||c.push("hqq_declaration_has_no_encoded_W_q_modules");let d=cl(p,"bits"),m=cl(p,"group_size"),f=cl(p,"logical_weight_axis");return MS({method:"hqq",declarations:i,conflicts:r,configIssues:c,modules:p,source:n,bits:d,groupSize:m,symmetric:null,zeroPoint:null,granularity:s.mode==="dynamic"?"module_scoped_per_group_weight":"per_group_weight",logicalGroupAxis:f,storageWordBits:d==null?null:Tf[d]?.storageBits??null,codesPerStorageWord:d==null?null:Tf[d]?.codes??null,extra:{configuration_scope:s.mode==="dynamic"?"source_bound_module_tag":"global_static",module_tag_rule:"Remove path components equal to model or layers and every numeric component, then join the remainder with dots.",configured_module_tag_count:s.mode==="dynamic"?Object.keys(s.dynamic_configs).length:null,shard_ownership:jS(p)},boundary:"This contract validates HQQ encoded SafeTensors metadata, module-tag ownership, source-defined grouping, packed shape, shard ownership, and bit capacity. It does not infer reconstructed values, calibration quality, runtime backend, or task quality."})}function DF(e,t){let n=md["compressed-tensors"],i=e.map(g=>({path:g.path,config:LF(g.value)})),o=i.filter(g=>!g.config).map(g=>g.path);if(o.length)return zf("not_assessed_compressed_tensors_config_invalid","compressed-tensors analysis requires a pack-quantized config_groups object with named targets.",{source:n,source_files:Rf("compressed-tensors"),declaration_paths:e.map(g=>g.path),unsupported_paths:o});let a=bd(i.map(g=>JSON.stringify(g.config))),r=a.length>1?[{field:"compressed_tensors_config",values:a,paths:i.map(g=>g.path)}]:[],s=i[0].config,c=[],u=TS(t).filter(g=>g.weight_packed).map(g=>{let h=BS(g.name,s);if(h.status!=="selected")return OS(g,[h.reason],h);let b=h.scheme.weights,A=qF(b);return A.length?OS(g,A,h,YA(g,h.scheme)):QF(g,b,h)});u.length||c.push("compressed_tensors_declaration_has_no_weight_packed_modules");let l=u.flatMap(g=>g.activation_contracts||[]),_=jF(TS(t),u,s),p=[...l,..._];for(let g of _)for(let h of g.issues||[])c.push(`${g.module_name}:${g.kind}:${h}`);let d=cl(u,"bits"),m=cl(u,"group_size"),f=cl(u,"symmetric");return MS({method:"compressed-tensors",declarations:i.map(g=>({path:g.path,...g.config})),conflicts:r,configIssues:c,modules:u,source:n,bits:d,groupSize:m,symmetric:f,zeroPoint:f==null?null:!f,granularity:"module_scoped_weight",logicalGroupAxis:1,storageWordBits:32,codesPerStorageWord:null,extra:{configuration_scope:"source_bound_target_precedence",target_precedence:["global ignore","exact module name","regex module name","module class name"],config_group_count:s.groups.length,activation_quantization_contracts:p,activation_quantization_contract_count:p.length,shard_ownership:jS(u,p),regex_contract:"Python re.match semantics are reproduced only for the explicitly accepted ASCII-compatible regex subset; unsupported constructs fail closed during config parsing."},boundary:"This contract applies the pinned compressed-tensors target and ignore precedence per packed Linear module, validates source-defined pack-quantized layout, original shape metadata, group scale cardinality, optional packed zero points, activation companion ownership, shard ownership, and exact INT32 storage padding. It does not infer dynamic activation values, unpacked weights, runtime kernels, or task quality."})}var Tf=Object.freeze({8:Object.freeze({name:"8bit_u8",dtype:"U8",storageBits:8,codes:1}),6:Object.freeze({name:"8bit_u8",dtype:"U8",storageBits:8,codes:1}),5:Object.freeze({name:"8bit_u8",dtype:"U8",storageBits:8,codes:1}),4:Object.freeze({name:"4bit_u8",dtype:"U8",storageBits:8,codes:2}),3:Object.freeze({name:"3bit_32",dtype:"I32",storageBits:32,codes:10}),2:Object.freeze({name:"2bit_u8",dtype:"U8",storageBits:8,codes:4}),1.58:Object.freeze({name:"2bit_u8",dtype:"U8",storageBits:8,codes:4}),1:Object.freeze({name:"1bit_u8",dtype:"U8",storageBits:8,codes:8})});function kS(e){let t=Xo(e?.weight_quant_params)?e.weight_quant_params:e;if(!Xo(t))return null;let n=tQ(t.nbits??t.bits),i=t.group_size==null?null:ul(t.group_size),o=ul(t.axis??1),a=Cs(t.view_as_float)??!1,r=Cs(t.channel_wise)??!0;return n==null||o==null?null:{bits:n,group_size:i,axis:o,view_as_float:a,channel_wise:r}}function MF(e){let t=Xo(e?.quant_config)?e.quant_config:e,n=Array.isArray(e?.skip_modules)?e.skip_modules.filter(a=>typeof a=="string"):[],i=kS(t);if(i)return{mode:"static",static_config:i,dynamic_configs:{},skip_modules:n};if(!Xo(t))return{mode:"invalid",static_config:null,dynamic_configs:{},skip_modules:n};let o={};for(let[a,r]of Object.entries(t)){let s=kS(r);if(!a||!s)return{mode:"invalid",static_config:null,dynamic_configs:{},skip_modules:n};o[a]=s}return Object.keys(o).length?{mode:"dynamic",static_config:null,dynamic_configs:o,skip_modules:n}:{mode:"invalid",static_config:null,dynamic_configs:{},skip_modules:n}}function $F(e,t){Tf[e.bits]||t.push("hqq_bits_not_source_registered"),e.group_size!=null&&(!Number.isSafeInteger(e.group_size)||e.group_size<1||e.group_size%8)&&t.push("hqq_group_size_must_be_null_or_positive_multiple_of_8"),[0,1].includes(e.axis)||t.push("hqq_axis_must_be_zero_or_one"),e.channel_wise!==!0&&t.push("hqq_encoded_group_contract_requires_channel_wise_true"),e.view_as_float===!0&&t.push("hqq_float_view_storage_not_supported_without_compute_dtype_contract")}function SS(e){return String(e||"").split(".").filter(t=>t!=="model"&&t!=="layers"&&!/^\d+$/.test(t)).join(".")}function kf(e){if(!Xo(e))return null;let t=e.group_size==null?null:ul(e.group_size),n=ks(e.strategy)??(t>0?"group":t===-1?"channel":"tensor");return{bits:ul(e.num_bits??8),group_size:t,symmetric:Cs(e.symmetric)??!0,strategy:n,type:ks(e.type||"int"),dynamic:Cs(e.dynamic)??!1,actorder:ks(e.actorder)}}function LF(e){let t=ks(e?.format);if(t!=="pack-quantized"||!Xo(e?.config_groups))return null;let n=[];for(let[o,a]of Object.entries(e.config_groups)){if(!Xo(a)||!Array.isArray(a.targets)||!a.targets.length||a.targets.some(r=>typeof r!="string"||!r))return null;for(let r of a.targets)if(r.startsWith("re:")&&!zS(r.slice(3)))return null;n.push({name:o,targets:[...a.targets],weights:a.weights==null?null:kf(a.weights),input_activations:a.input_activations==null?null:kf(a.input_activations),output_activations:a.output_activations==null?null:kf(a.output_activations)})}if(!n.length)return null;Xo(e.kv_cache_scheme)&&n.push({name:"kv_cache",targets:["re:.*self_attn$"],weights:null,input_activations:null,output_activations:kf(e.kv_cache_scheme),kv_cache:!0});let i=Array.isArray(e.ignore)?e.ignore.filter(o=>typeof o=="string"&&o):[];for(let o of i)if(o.startsWith("re:")&&!zS(o.slice(3)))return null;return{format:t,groups:n,ignore:i}}function PF(e){return DS(e,/^(.*)\.(W_q|scale|zero|shape|nbits|group_size|axis|packing|view_as_float)$/)}function TS(e){return DS(e,/^(.*)\.(weight_packed|weight_scale|weight_shape|weight_zero_point|weight_g_idx|input_scale|input_zero_point|output_scale|output_zero_point|k_scale|v_scale)$/)}function BS(e,t,n="Linear"){let i=XA(e,n,t.ignore);if(i.length)return{status:"ignored",reason:"packed_module_matches_global_ignore",matched_ignore_targets:i};let o=new Map;for(let l of t.groups)for(let _ of l.targets)o.set(_,l);let a=XA(e,n,[...o.keys()]);if(!a.length)return{status:"unmatched",reason:"packed_module_has_no_matching_config_target",matched_targets:[]};let r=a.map(l=>o.get(l)),c=r.filter(l=>!l.kv_cache)[0]||r[0],u=r.find(l=>l.kv_cache)||null;return!c.weights&&!u?{status:"unmatched",reason:"matching_config_target_has_no_weight_scheme",matched_targets:a}:u&&c!==u&&c.output_activations&&u.output_activations?{status:"conflict",reason:"kv_cache_and_module_scheme_both_define_output_activations",matched_targets:a}:{status:"selected",matched_targets:a,selected_group:c.name,target_precedence_match:a[0],scheme:u&&c!==u?{...c,output_activations:u.output_activations,kv_cache_merged:!0}:c}}function XA(e,t,n){let i=[...n||[]].sort((a,r)=>{let s=a.startsWith("re:")?1:0,c=r.startsWith("re:")?1:0;return s-c||a.localeCompare(r)}),o=a=>i.filter(r=>{if(r.startsWith("re:"))try{return new RegExp(r.slice(3)).exec(a)?.index===0}catch{return!1}return r===a});return[...o(e),...t?o(t):[]]}function zS(e){if(!e||!/^[\x20-\x7e]+$/.test(e)||/\(\?|\\[AZ]|\\[pP]|\\N\{|\\g</.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}function qF(e){let t=[];return e?((!Number.isSafeInteger(e.bits)||e.bits<1||e.bits>8)&&t.push("compressed_tensors_bits_must_be_between_1_and_8"),(!Number.isSafeInteger(e.group_size)||e.group_size<1)&&t.push("compressed_tensors_group_size_must_be_positive"),e.type!=="int"&&t.push("compressed_tensors_pack_quantized_weight_type_must_be_int"),e.strategy!=="group"&&t.push("compressed_tensors_pack_quantized_weight_strategy_must_be_group"),e.dynamic!==!1&&t.push("compressed_tensors_packed_weight_scheme_must_be_static"),t):["selected_config_group_has_no_weight_scheme"]}function YA(e,t){let n=[];for(let[i,o]of[["input",t?.input_activations],["output",t?.output_activations]]){if(!o)continue;let a=e[`${i}_scale`]||null,r=e[`${i}_zero_point`]||null,s=[],c=o.strategy==="token"?[1,1]:[1];o.dynamic?(a||r)&&s.push("dynamic_activation_contract_has_serialized_scale_or_zero_point"):(a?gi(a.shape||[],c)||s.push("static_activation_scale_shape_mismatch"):s.push("static_activation_scale_missing"),!o.symmetric&&!r&&s.push("asymmetric_static_activation_zero_point_missing"),r&&!gi(r.shape||[],c)&&s.push("static_activation_zero_point_shape_mismatch")),n.push({module_name:e.name,kind:`${i}_activation`,status:s.length?"fail":o.dynamic?"assessed_config_dynamic_runtime_values":"assessed_static_serialized_companions",issues:s,config:o,scale_tensor:a?ll(a):null,zero_point_tensor:r?ll(r):null,boundary:o.dynamic?"Scale and zero point are computed from runtime activation values and are not serialized numerical constants.":"Serialized companion identity and shape are validated; calibration quality and runtime quantization error are not inferred."})}return n}function jF(e,t,n){let i=new Set(t.map(a=>a.name)),o=[];for(let a of e.filter(r=>!i.has(r.name))){if(a.k_scale||a.v_scale){let s=n.groups.find(u=>u.kv_cache&&XA(a.name,null,u.targets).length),c=[];s||c.push("serialized_kv_scale_has_no_matching_kv_cache_scheme");for(let u of["k_scale","v_scale"])a[u]&&(gi(a[u].shape||[],[1])||c.push(`${u}_shape_must_be_scalar_cardinality_one`));o.push({module_name:a.name,kind:"kv_cache",status:c.length?"fail":"assessed_static_serialized_kv_scales",issues:c,config:s?.output_activations||null,k_scale_tensor:a.k_scale?ll(a.k_scale):null,v_scale_tensor:a.v_scale?ll(a.v_scale):null,boundary:"Serialized KV scale tensor identity and scalar cardinality are validated; cache allocation, runtime values, and attention execution are not inferred."});continue}let r=BS(a.name,n,null);r.status==="selected"&&o.push(...YA(a,r.scheme))}return o}function DS(e,t){let n=new Map;for(let i of e||[]){let o=String(i.name||"").match(t);o&&(n.has(o[1])||n.set(o[1],{name:o[1]}),n.get(o[1])[o[2]]=i)}return[...n.values()].sort((i,o)=>i.name.localeCompare(o.name))}function FF(e,t,n={}){let i=Of(e,["W_q","scale","zero","shape","nbits","group_size","axis","packing"]),o=ev(e.shape,"shape",i),a=Sf(e.nbits,"nbits",i),r=Sf(e.group_size,"group_size",i),s=Sf(e.axis,"axis",i),c=JF(e.packing,"packing",i),u=e.view_as_float?Sf(e.view_as_float,"view_as_float",i):0;o&&(o.length!==2||o.some(O=>!Number.isSafeInteger(O)||O<1))&&i.push("shape_metadata_must_be_positive_rank_two"),t||i.push("module_not_selected_by_hqq_dynamic_config"),n.excluded&&i.push("encoded_module_matches_hqq_skip_modules");let l=t&&o?t.group_size??(t.axis===1?o[1]:o[0]):t?.group_size??null;a!=null&&t&&a!==t.bits&&i.push("nbits_metadata_config_mismatch"),r!=null&&l!=null&&r!==l&&i.push("group_size_metadata_config_mismatch"),s!=null&&t&&s!==t.axis&&i.push("axis_metadata_config_mismatch"),(t?.view_as_float===!0||u!==0)&&i.push("view_as_float_metadata_not_supported");let _=a??t?.bits??null,p=s??t?.axis??null,d=r??l,m=Tf[_];c!=null&&c!==m?.name&&i.push("packing_metadata_source_layout_mismatch");let f=o?BigInt(o[0])*BigInt(o[1]):0n;(!Number.isSafeInteger(d)||d<1)&&i.push("effective_group_size_not_resolved"),[0,1].includes(p)||i.push("effective_axis_not_resolved"),m||i.push("effective_hqq_bits_not_source_registered"),f&&Number.isSafeInteger(d)&&f%BigInt(d)&&i.push("logical_weight_count_not_divisible_by_group_size");let g=f&&Number.isSafeInteger(d)&&f%BigInt(d)===0n?Number(f/BigInt(d)):null,h=g==null||![0,1].includes(p)?null:p===1?[g,d]:[d,g],b=h?p===1?[h[0],1]:[1,h[1]]:null,A=WA(e.scale,"scale",i),y=WA(e.zero,"zero",i);A&&b&&!gi(A,b)&&i.push("scale_shape_mismatch"),y&&b&&!gi(y,b)&&i.push("zero_shape_mismatch");let x=h&&m?Math.ceil(h[0]/m.codes):null,v=x==null?null:[x,h[1]],I=Ca(e.W_q,"W_q",m?.dtype||"unknown",i);I&&v&&!gi(I,v)&&i.push("W_q_shape_mismatch"),m&&m.codes!==10&&h&&h[0]%m.codes&&i.push("source_packer_requires_first_axis_divisible_by_pack_factor");let w=I&&m?hi(I)*BigInt(m.storageBits):0n,N=tv(f,_),S=w-N;return S<0n&&i.push("packed_storage_capacity_below_logical_bits"),m?.codes===10&&S>=BigInt(I?.[1]||0)*32n&&i.push("hqq_3bit_padding_exceeds_one_padded_pack_row"),JA(e,i,{input:o?.[1]??null,output:o?.[0]??null,groupSize:d,groups:g,bits:_,logical:f,physical:w,padding:S,packedCodeCapacity:I&&m?hi(I)*BigInt(m.codes):0n,scales:A?hi(A):0n,zeroes:y?hi(y):0n,storageBits:m?.storageBits??null,codesPerWord:m?.codes??null,packing:m?.name??null,tensors:["W_q","scale","zero","shape","nbits","group_size","axis","packing","view_as_float"],logicalAxis:p,storedGroupAxis:p,zeroStorage:"floating_affine_zero",payloadModule:{qweight:e.W_q,scales:e.scale,qzeros:e.zero},zeroMode:"finite_affine_value",zeroCodeCapacity:y?hi(y):0n,ownership:n})}function QF(e,t,n={}){let i=["weight_packed","weight_scale","weight_shape",...t.symmetric?[]:["weight_zero_point"],...t.actorder==="group"||t.actorder==="dynamic"?["weight_g_idx"]:[]],o=Of(e,i),a=YA(e,n.scheme);for(let h of a)for(let b of h.issues)o.push(`${h.kind}:${b}`);let r=Ca(e.weight_packed,"weight_packed","I32",o),s=WA(e.weight_scale,"weight_scale",o),c=ev(e.weight_shape,"weight_shape",o);e.weight_shape&&!["I64","I32"].includes(e.weight_shape.dtype)&&o.push("weight_shape_dtype_must_be_I64_or_I32"),c&&(c.length!==2||c.some(h=>!Number.isSafeInteger(h)||h<1))&&o.push("weight_shape_metadata_must_be_positive_rank_two");let u=c?.[0]??r?.[0]??null,l=c?.[1]??(s?s[1]*t.group_size:null),_=l!=null?Math.ceil(l/t.group_size):null;l!=null&&l%t.group_size&&o.push("input_features_not_divisible_by_group_size"),r&&u!=null&&l!=null&&!gi(r,[u,Math.ceil(l*t.bits/32)])&&o.push("weight_packed_shape_mismatch"),s&&u!=null&&_!=null&&!gi(s,[u,_])&&o.push("weight_scale_shape_mismatch"),c&&r&&r[0]!==c[0]&&o.push("weight_shape_output_mismatch");let p=0n;if(t.symmetric&&e.weight_zero_point&&o.push("weight_zero_point_present_for_symmetric_scheme"),!t.symmetric&&e.weight_zero_point){let h=Ca(e.weight_zero_point,"weight_zero_point","I32",o),b=u!=null&&_!=null?[Math.ceil(u*t.bits/32),_]:null;h&&b&&!gi(h,b)&&o.push("weight_zero_point_packed_shape_mismatch"),p=h?hi(h)*BigInt(Math.floor(32/t.bits)):0n}if(e.weight_g_idx){let h=qS(e.weight_g_idx,"weight_g_idx","I32",o);h&&l!=null&&h[0]!==l&&o.push("weight_g_idx_shape_mismatch")}let d=l!=null&&u!=null?BigInt(l)*BigInt(u):0n,m=tv(d,t.bits),f=r?hi(r)*32n:0n,g=f-m;return g<0n&&o.push("packed_storage_capacity_below_logical_bits"),u!=null&&g>=BigInt(u)*32n&&o.push("packed_storage_padding_exceeds_one_word_per_row"),JA(e,o,{input:l,output:u,groupSize:t.group_size,groups:_,bits:t.bits,logical:d,physical:f,padding:g,packedCodeCapacity:d,scales:s?hi(s):0n,zeroes:p,storageBits:32,codesPerWord:null,packing:"dense_cross_element_int32",tensors:["weight_packed","weight_scale","weight_shape","weight_zero_point","weight_g_idx"],logicalAxis:1,storedGroupAxis:1,zeroStorage:t.symmetric?"omitted_symmetric_zero":"packed_along_output_axis",payloadModule:{qweight:e.weight_packed,scales:e.weight_scale,qzeros:e.weight_zero_point,g_idx:e.weight_g_idx},zeroMode:t.symmetric?"absent":"packed_code",zeroCodeCapacity:p,symmetric:t.symmetric,ownership:n,activationContracts:a})}function OS(e,t,n={},i=[]){return JA(e,[...t],{input:null,output:null,groupSize:null,groups:null,bits:null,logical:0n,physical:0n,padding:0n,packedCodeCapacity:0n,scales:0n,zeroes:0n,storageBits:32,codesPerWord:null,packing:"not_assessed",tensors:["weight_packed","weight_scale","weight_shape","weight_zero_point","weight_g_idx","input_scale","input_zero_point","output_scale","output_zero_point"],logicalAxis:1,storedGroupAxis:1,zeroStorage:"not_assessed",symmetric:null,ownership:n,activationContracts:i})}function JA(e,t,n){let i=$S(n.payloadModule||{},n,t);return{name:e.name,status:t.length?"fail":"pass",issues:t,input_features:n.input,output_features:n.output,group_size:n.groupSize,group_count:n.groups,logical_weight_axis:n.logicalAxis,stored_group_axis:n.storedGroupAxis,bits:n.bits,storage_word_bits:n.storageBits,codes_per_storage_word:n.codesPerWord,symmetric:n.symmetric??null,packing_layout:n.packing,logical_weight_element_count:n.logical.toString(),packed_weight_code_capacity:n.packedCodeCapacity.toString(),logical_weight_bits:n.logicalBits?.toString?.()??tv(n.logical,n.bits).toString(),packed_weight_storage_bits:n.physical.toString(),packing_padding_bits:n.padding.toString(),packing_conservation_status:n.padding<0n?"invalid":n.padding===0n?"exact_no_padding":"exact_with_source_defined_padding",scale_element_count:n.scales.toString(),zero_point_code_capacity:n.zeroes.toString(),zero_point_storage_transform:n.zeroStorage,packed_tensor_bytes:n.tensors.filter(o=>e[o]).reduce((o,a)=>o+Number(e[a].byte_length||0),0),quantization_payload_integrity:i,tensors:Object.fromEntries(n.tensors.filter(o=>e[o]).map(o=>[o,ll(e[o])])),ownership:n.ownership||null,activation_contracts:n.activationContracts||[],shard_paths:bd(n.tensors.filter(o=>e[o]?.shard_path).map(o=>e[o].shard_path))}}function MS({method:e,declarations:t,conflicts:n,configIssues:i,modules:o,source:a,bits:r,groupSize:s,symmetric:c,zeroPoint:u,granularity:l,logicalGroupAxis:_,storageWordBits:p,codesPerStorageWord:d,boundary:m,extra:f={}}){let g=n.length+i.length+o.reduce((h,b)=>h+b.issues.length,0);return{schema:hd,status:g?"fail":"assessed",evidence_class:"OBSERVED/DERIVED_FROM_PINNED_FORMAT_SOURCE",method:e,bits:r,group_size:s,zero_point:u,symmetric:c,implementation_version:null,checkpoint_format:e==="compressed-tensors"?"pack-quantized":"encoded_state_dict",pack_word_bits:p,pack_factor:d,storage_word_bits:p,codes_per_storage_word:d,granularity:l,logical_group_axis:_,declaration_count:t.length,declarations:t,declaration_conflicts:n,config_issues:i,module_count:o.length,valid_module_count:o.filter(h=>h.status==="pass").length,invalid_module_count:o.filter(h=>h.status!=="pass").length,logical_weight_element_count:fi(o,"logical_weight_element_count"),packed_weight_code_capacity:fi(o,"packed_weight_code_capacity"),logical_weight_bits:fi(o,"logical_weight_bits"),packed_weight_storage_bits:fi(o,"packed_weight_storage_bits"),packing_padding_bits:fi(o,"packing_padding_bits"),packing_conservation_status:o.every(h=>h.packing_conservation_status==="exact_no_padding")?"exact_no_padding":o.every(h=>h.packing_conservation_status!=="invalid")?"exact_with_source_defined_padding":"invalid",scale_element_count:fi(o,"scale_element_count"),zero_point_code_capacity:fi(o,"zero_point_code_capacity"),packed_tensor_bytes:o.reduce((h,b)=>h+b.packed_tensor_bytes,0),source:a,source_files:Rf(e),modules:o,boundary:m,...f}}function UF(e,t){let n=[];Xo(e?.quantization_config)&&n.push({path:"config.json#/quantization_config",value:e.quantization_config});for(let i of["quant_config","quantize_config","quantization_config"]){let o=t?.[i];Xo(o?.document)&&n.push({path:o.path||`${i}.json`,value:o.document})}return n}function GF(e){let t=e.value;return{path:e.path,method:ks(t.quant_method),bits:ul(t.bits??t.w_bit),group_size:ul(t.group_size??t.q_group_size),zero_point:Cs(t.zero_point),sym:Cs(t.sym),version:ks(t.version),desc_act:Cs(t.desc_act),checkpoint_format:ks(t.checkpoint_format??t.format)}}function VF(e){let t=[];for(let n of RS){let i=bd(e.map(o=>o[n]).filter(o=>o!=null));i.length>1&&t.push({field:n,values:i,paths:e.filter(o=>o[n]!=null).map(o=>o.path)})}return t}function HF(e){let t={};for(let n of RS)t[n]=e.map(i=>i[n]).find(i=>i!=null)??null;return t}function KF(e,t){let n=[];return fd(t.bits)||n.push("bits_must_be_a_positive_divisor_of_32"),(!Number.isSafeInteger(t.group_size)||t.group_size===0||t.group_size<-1)&&n.push("group_size_must_be_positive_or_minus_one"),e==="awq"&&t.zero_point==null&&n.push("awq_zero_point_declaration_missing"),e==="awq"&&t.version&&t.version!=="gemm"&&n.push("only_source_pinned_awq_gemm_layout_is_assessed"),n}function ZF(e){let t=new Map;for(let n of e||[]){let i=String(n.name||"").match(/^(.*)\.(qweight|qzeros|scales|g_idx)$/);i&&(t.has(i[1])||t.set(i[1],{name:i[1]}),t.get(i[1])[i[2]]=n)}return[...t.values()].sort((n,i)=>n.name.localeCompare(i.name))}function XF(e,t){let n=Of(e,["qweight","scales",...t.zero_point===!1?[]:["qzeros"]]),i=fd(t.bits)?32/t.bits:null,o=Ca(e.qweight,"qweight","I32",n),a=Ca(e.scales,"scales","F16",n),r=e.qzeros?Ca(e.qzeros,"qzeros","I32",n):null;e.g_idx&&n.push("awq_gemm_layout_does_not_define_g_idx");let s=o?.[0]??null,c=o&&i?o[1]*i:null,u=FS(t.group_size,s),l=s!=null&&u?Math.ceil(s/u):null;return s!=null&&u&&s%u&&n.push("input_features_not_divisible_by_group_size"),a&&l!=null&&c!=null&&!gi(a,[l,c])&&n.push("scales_shape_mismatch"),r&&l!=null&&o&&!gi(r,[l,o[1]])&&n.push("qzeros_shape_mismatch"),t.zero_point===!1&&e.qzeros&&n.push("qzeros_present_while_zero_point_is_false"),LS(e,n,{input:s,output:c,groups:l,groupSize:u,pack:i,bits:t.bits,qweight:o,scales:a,qzeros:r,zeroStorage:"packed_unsigned_zero_code"})}function WF(e,t){let n=Of(e,["qweight","qzeros","scales","g_idx"]),i=fd(t.bits)?32/t.bits:null,o=Ca(e.qweight,"qweight","I32",n),a=Ca(e.scales,"scales","F16",n),r=Ca(e.qzeros,"qzeros","I32",n),s=qS(e.g_idx,"g_idx","I32",n),c=s?.[0]??(o&&i?o[0]*i:null),u=o?.[1]??null,l=FS(t.group_size,c),_=c!=null&&l?Math.ceil(c/l):null;return c!=null&&i&&c%i&&n.push("input_features_not_divisible_by_pack_factor"),u!=null&&i&&u%i&&n.push("output_features_not_divisible_by_pack_factor"),o&&c!=null&&u!=null&&i&&!gi(o,[c/i,u])&&n.push("qweight_shape_mismatch"),a&&_!=null&&u!=null&&!gi(a,[_,u])&&n.push("scales_shape_mismatch"),r&&_!=null&&u!=null&&i&&!gi(r,[_,u/i])&&n.push("qzeros_shape_mismatch"),LS(e,n,{input:c,output:u,groups:_,groupSize:l,pack:i,bits:t.bits,qweight:o,scales:a,qzeros:r,gIdx:s,zeroStorage:"packed_zero_code_minus_one"})}function YF(e){let t=e?.numerical_integrity;return e?t?.status!=="assessed_full_payload"?{status:"not_assessed_full_payload_unavailable"}:{status:"assessed_full_payload",payload_sha256:t.payload_sha256||null,value_count:t.value_count??null,finite_value_count:t.finite_value_count??null,nonfinite_value_count:Number(t.nan_value_count||0)+Number(t.positive_infinity_value_count||0)+Number(t.negative_infinity_value_count||0),minimum_finite:t.minimum_finite??t.minimum_finite_decimal??null,maximum_finite:t.maximum_finite??t.maximum_finite_decimal??null,distinct_finite_values:t.distinct_finite_values??null,distinct_value_status:t.distinct_value_status||null,semantic:t.quantization_metadata_integrity||null}:{status:"not_applicable_absent"}}function $S(e,t,n){let i=Object.fromEntries(["qweight","qzeros","scales","g_idx"].filter(c=>e[c]).map(c=>[c,YF(e[c])])),o=i.scales;o?.status==="assessed_full_payload"&&(o.nonfinite_value_count!==0||!(Number(o.minimum_finite)>0)||o.semantic?.role==="scale"&&o.semantic.nonpositive_scale_count!==0)&&n.push("scales_payload_must_be_finite_and_positive");let a=i.g_idx;if(a?.status==="assessed_full_payload"){let c=Number(a.minimum_finite),u=Number(a.maximum_finite);(a.nonfinite_value_count!==0||a.semantic?.integer_value_contract===!1||!Number.isSafeInteger(c)||c<0||!Number.isSafeInteger(u)||t.groups!=null&&u>=t.groups)&&n.push("g_idx_payload_outside_group_domain"),t.groups!=null&&Number.isSafeInteger(a.distinct_finite_values)&&a.distinct_finite_values!==t.groups&&n.push("g_idx_group_cardinality_mismatch")}let r=i.qzeros,s=t.zeroMode||(r?"packed_code":"absent");if(r?.status==="assessed_full_payload"&&s==="finite_affine_value"&&r.nonfinite_value_count!==0&&n.push("zero_payload_must_be_finite"),r?.status==="assessed_full_payload"&&s==="packed_code"&&t.bits){let c=r.semantic?.packed_lane_profiles?.find(_=>_.bits===t.bits),u=t.zeroCodeCapacity??(t.qzeros&&t.pack?hi(t.qzeros)*BigInt(t.pack):null),l=typeof u=="bigint"&&u<=BigInt(Number.MAX_SAFE_INTEGER)?Number(u):null;!c||l==null||c.lane_count!==l?n.push("qzeros_packed_lane_cardinality_mismatch"):r.selected_packed_lane_profile=c}return{schema:"deepbom.safetensors.quantization_payload_integrity.v1",zero_point_payload_mode:s,status:Object.values(i).some(c=>c.status==="not_assessed_full_payload_unavailable")?"partial":n.some(c=>/payload|g_idx_group|qzeros_packed/.test(c))?"fail":"assessed",tensors:i}}function LS(e,t,n){let i=n.input!=null&&n.output!=null?BigInt(n.input)*BigInt(n.output):0n,o=n.qweight&&n.pack?hi(n.qweight)*BigInt(n.pack):0n,a=n.scales?hi(n.scales):0n,r=n.qzeros&&n.pack?hi(n.qzeros)*BigInt(n.pack):0n,s=$S(e,{...n,zeroMode:e.qzeros?"packed_code":"absent",zeroCodeCapacity:r},t);return{name:e.name,status:t.length?"fail":"pass",issues:t,input_features:n.input,output_features:n.output,bits:n.bits,group_size:n.groupSize,group_count:n.groups,logical_weight_axis:1,stored_group_axis:0,logical_weight_element_count:i.toString(),packed_weight_code_capacity:o.toString(),logical_weight_bits:(i*BigInt(n.bits||0)).toString(),packed_weight_storage_bits:n.qweight?(hi(n.qweight)*32n).toString():"0",packing_padding_bits:n.qweight?(hi(n.qweight)*32n-i*BigInt(n.bits||0)).toString():"0",packing_conservation_status:o===i?"exact_no_padding":"invalid",scale_element_count:a.toString(),zero_point_code_capacity:r.toString(),zero_point_storage_transform:n.zeroStorage,packed_tensor_bytes:[e.qweight,e.qzeros,e.scales,e.g_idx].filter(Boolean).reduce((c,u)=>c+Number(u.byte_length||0),0),quantization_payload_integrity:s,tensors:Object.fromEntries(["qweight","qzeros","scales","g_idx"].filter(c=>e[c]).map(c=>[c,ll(e[c])]))}}function Of(e,t){return t.filter(n=>!e[n]).map(n=>`missing_${n}`)}function Rf(e){return[md[e],...RF[e]||[]].map(n=>({...n}))}function PS(e,t,n){if(!e)return null;let i=e.numerical_integrity||{};return!String(i.decoded_values_status||"").startsWith("complete_")||!Array.isArray(i.decoded_values)?(n.push(`${t}_small_value_payload_not_decoded`),null):i.decoded_values}function ev(e,t,n){let i=PS(e,t,n);if(!i)return null;let o=i.map(eQ);return o.some(a=>a==null)?(n.push(`${t}_contains_non_integer_metadata`),null):o}function Sf(e,t,n){let i=PS(e,t,n);if(!i)return null;if(i.length!==1)return n.push(`${t}_metadata_must_be_scalar`),null;let o=Number(i[0]);return Number.isFinite(o)?o:(n.push(`${t}_metadata_must_be_finite`),null)}function JF(e,t,n){let i=ev(e,t,n);return i?e.dtype!=="U8"||i.some(o=>o<0||o>127)?(n.push(`${t}_metadata_must_be_ascii_U8`),null):String.fromCharCode(...i):null}function eQ(e){try{let t=BigInt(String(e));return t>=BigInt(Number.MIN_SAFE_INTEGER)&&t<=BigInt(Number.MAX_SAFE_INTEGER)?Number(t):null}catch{return null}}function WA(e,t,n){return e?(["F16","BF16","F32","F64"].includes(e.dtype)||n.push(`${t}_dtype_${e.dtype||"unknown"}_expected_floating`),!Array.isArray(e.shape)||e.shape.length!==2||e.shape.some(i=>!Number.isSafeInteger(i)||i<1)?(n.push(`${t}_must_have_positive_rank_two_shape`),null):e.shape):null}function Ca(e,t,n,i){return e?(e.dtype!==n&&i.push(`${t}_dtype_${e.dtype||"unknown"}_expected_${n}`),!Array.isArray(e.shape)||e.shape.length!==2||e.shape.some(o=>!Number.isSafeInteger(o)||o<1)?(i.push(`${t}_must_have_positive_rank_two_shape`),null):e.shape):null}function qS(e,t,n,i){return e?(e.dtype!==n&&i.push(`${t}_dtype_${e.dtype||"unknown"}_expected_${n}`),!Array.isArray(e.shape)||e.shape.length!==1||!Number.isSafeInteger(e.shape[0])||e.shape[0]<1?(i.push(`${t}_must_have_positive_rank_one_shape`),null):e.shape):null}function ll(e){return{tensor_index:e.index??null,tensor_name:e.name,dtype:e.dtype,shape:e.shape,byte_length:Number(e.byte_length||0),shard_path:e.shard_path||null}}function cl(e,t){let n=[...new Map((e||[]).map(i=>i[t]).filter(i=>i!=null).map(i=>[JSON.stringify(i),i])).values()];return n.length===1?n[0]:null}function jS(e,t=[]){let n=[];for(let o of e||[])for(let[a,r]of Object.entries(o.tensors||{}))n.push({module_name:o.name,tensor_role:a,tensor_name:r.tensor_name,shard_path:r.shard_path||null});for(let o of t||[])for(let a of["scale_tensor","zero_point_tensor","k_scale_tensor","v_scale_tensor"]){let r=o[a];r&&n.push({module_name:o.module_name,tensor_role:`${o.kind}:${a}`,tensor_name:r.tensor_name,shard_path:r.shard_path||null})}let i=[...new Map(n.map(o=>[`${o.module_name}\0${o.tensor_role}\0${o.tensor_name}`,o])).values()];return{status:i.some(o=>o.shard_path)?i.every(o=>o.shard_path)?"assessed_all_quantization_tensors_shard_bound":"fail_partial_shard_ownership":"not_applicable_single_file_or_unannotated_input",tensor_count:i.length,shard_bound_tensor_count:i.filter(o=>o.shard_path).length,rows:i}}function zf(e,t,n={}){return{schema:hd,status:e,evidence_class:"NOT_ASSESSED",reason:t,...n}}function FS(e,t){return e===-1?t:e}function fd(e){return Number.isSafeInteger(e)&&e>0&&e<=32&&32%e===0}function tQ(e){let t=Number(e);return Number.isFinite(t)?t:null}function tv(e,t){return t===1.58?e*2n:Number.isSafeInteger(t)?e*BigInt(t):0n}function Xo(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ul(e){return e==null||e===""||!Number.isSafeInteger(Number(e))?null:Number(e)}function Cs(e){return typeof e=="boolean"?e:null}function ks(e){return typeof e=="string"&&e.trim()?e.trim().toLowerCase():null}function bd(e){return[...new Set(e.map(t=>typeof t=="string"?t:JSON.stringify(t)))].map(t=>t==="true"?!0:t==="false"?!1:/^-?\d+$/.test(t)?Number(t):t)}function gi(e,t){return e.length===t.length&&e.every((n,i)=>n===t[i])}function hi(e){return e.reduce((t,n)=>t*BigInt(n),1n)}function fi(e,t){return e.reduce((n,i)=>n+BigInt(i[t]||0),0n).toString()}Ce();function bi(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer`);return BigInt(e)}function nQ(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}function cn(e){return{value:nQ(e),decimal:String(e)}}function _l({layerCount:e,kvHeadCount:t,keyHeadWidth:n,valueHeadWidth:i,contextLength:o,storageBits:a=null}){let r=bi(e,"layer count"),s=bi(t,"KV head count"),c=bi(n,"key head width"),u=bi(i,"value head width"),l=bi(o,"context length");if(a!=null&&(!Number.isSafeInteger(a)||a<=0||a%8!==0))throw new Error("KV storage width must be a positive whole-byte bit width");let _=r*s*(c+u),p=_*l,d=a==null?null:_*BigInt(a/8),m=d==null?null:d*l;return{schema:"deepbom.transformer_kv_state_projection.v1",status:"assessed_element_cardinality",evidence_class:"OBSERVED/SOURCE_PINNED/DERIVED",layer_count:Number(r),kv_head_count:Number(s),key_head_width:Number(c),value_head_width:Number(u),context_length:Number(l),elements_per_token_per_batch:cn(_),elements_at_context_batch_one:cn(p),conditional_storage_bits:a,bytes_per_token_per_batch_if_storage_width_matches:d==null?null:cn(d),bytes_at_context_batch_one_if_storage_width_matches:m==null?null:cn(m),formula:"layers * kv_heads * (key_head_width + value_head_width) elements per token per batch",boundary:"Element cardinality follows the declared attention-state dimensions. Byte values apply only when the runtime cache uses the supplied storage width and exclude allocator layout, paging, alignment, residency, and backend-private state."}}function QS({vocabularySize:e,hiddenSize:t,intermediateSize:n,layerCount:i,attentionHeadCount:o,kvHeadCount:a,headWidth:r,contextLength:s,mlpProjectionMatrixCount:c,schema:u,mlpField:l,mlpLabel:_}){let p=bi(e,"vocabulary size"),d=bi(t,"hidden size"),m=bi(n,"intermediate size"),f=bi(i,"layer count"),g=bi(o,"attention head count");bi(a,"KV head count");let h=bi(r,"attention head width"),b=bi(s,"context length"),A=bi(c,"MLP projection matrix count"),y=g*h,x=BigInt(a)*h,v=d*y*2n+d*x*2n,I=d*m*A,w=v+I,N=w*f,S=b*(b+1n)/2n,O=y*S*2n*f,B=y*b*2n*f,k=N*b,D=k+O,q=N+B,L=d*p,F={schema:u,status:"assessed_declared_all_global_scenario",evidence_class:"SOURCE_PINNED/DERIVED_SCENARIO",query_projection_width:cn(y),kv_projection_width:cn(x),attention_projection_macs_per_layer_per_token:cn(v),mlp_projection_matrix_count:Number(A),dense_projection_macs_per_layer_per_token:cn(w),dense_projection_macs_all_layers_per_token:cn(N),declared_context_causal_attention_pair_count:cn(S),prefill_attention_macs_all_layers_at_declared_context:cn(O),decode_attention_macs_all_layers_at_declared_context:cn(B),prefill_dense_projection_macs_all_layers_at_declared_context:cn(k),prefill_transformer_core_macs_at_declared_context:cn(D),decode_transformer_core_macs_at_declared_context:cn(q),output_projection_macs_per_logit_position:cn(L),prefill_with_logits_at_every_position_macs:cn(D+L*b),decode_with_one_logit_position_macs:cn(q+L),mac_definition:`One matrix multiply-accumulate is one MAC. Dense projection terms include Q/K/V/O and ${Number(A)} ${_} MLP matrices. Attention terms include QK and probability-value products over an all-global causal scenario.`,boundary:"This is a source-bound architecture scenario, not a reconstructed execution DAG or runtime count. It excludes embedding lookup, normalization, RoPE, activation, softmax, masking, bias, cache movement, local/sliding attention reductions, sparsity, fusion, and backend lowering. The all-global prefill row is an explicit scenario and may exceed models with local or sliding attention."};return F[l]=cn(I),F}function US(e){return QS({...e,schema:"deepbom.canonical_decoder_compute_projection.v1",mlpField:"mlp_projection_macs_per_layer_per_token",mlpLabel:"declared"})}function dl(e){return QS({...e,mlpProjectionMatrixCount:3,schema:"deepbom.canonical_gated_decoder_compute_projection.v1",mlpField:"gated_mlp_projection_macs_per_layer_per_token",mlpLabel:"gated"})}nf();nf();var ov=1024*1024,iv=100*ov,nv=64*ov,$f=["UINT8","INT8","UINT16","INT16","UINT32","INT32","FLOAT32","BOOL","STRING","ARRAY","UINT64","INT64","FLOAT64"];var iQ=Object.freeze({F4:4,F6_E2M3:6,F6_E3M2:6,BOOL:8,U8:8,I8:8,F8_E4M3:8,F8_E5M2:8,F8_E8M0:8,F8_E4M3FNUZ:8,F8_E5M2FNUZ:8,U16:16,I16:16,F16:16,BF16:16,U32:32,I32:32,F32:32,U64:64,I64:64,F64:64,C64:64}),oQ=Object.freeze({repository:"ggml-org/llama.cpp",source_commit:"7bd8282c37fcd9c4d7236106d664761a23318f18",type_traits_source:"ggml/src/ggml.c",type_traits_source_sha256:"9e40ad07323c7925f06a105119dfb07c1d4a21d3263a9e9bd0bd21792c42e1e4",block_layout_source:"ggml/src/ggml-common.h",block_layout_source_sha256:"af255601767325f087313fa84b9435cb77aeec37df6b61b98d9ecc65f29fb4a0"}),aQ=Object.freeze({0:{name:"F32",block_elements:1,block_bytes:4},1:{name:"F16",block_elements:1,block_bytes:2},2:{name:"Q4_0",block_elements:32,block_bytes:18},3:{name:"Q4_1",block_elements:32,block_bytes:20},6:{name:"Q5_0",block_elements:32,block_bytes:22},7:{name:"Q5_1",block_elements:32,block_bytes:24},8:{name:"Q8_0",block_elements:32,block_bytes:34},9:{name:"Q8_1",block_elements:32,block_bytes:36},10:{name:"Q2_K",block_elements:256,block_bytes:84},11:{name:"Q3_K",block_elements:256,block_bytes:110},12:{name:"Q4_K",block_elements:256,block_bytes:144},13:{name:"Q5_K",block_elements:256,block_bytes:176},14:{name:"Q6_K",block_elements:256,block_bytes:210},15:{name:"Q8_K",block_elements:256,block_bytes:292},16:{name:"IQ2_XXS",block_elements:256,block_bytes:66},17:{name:"IQ2_XS",block_elements:256,block_bytes:74},18:{name:"IQ3_XXS",block_elements:256,block_bytes:98},19:{name:"IQ1_S",block_elements:256,block_bytes:50},20:{name:"IQ4_NL",block_elements:32,block_bytes:18},21:{name:"IQ3_S",block_elements:256,block_bytes:110},22:{name:"IQ2_S",block_elements:256,block_bytes:82},23:{name:"IQ4_XS",block_elements:256,block_bytes:136},24:{name:"I8",block_elements:1,block_bytes:1},25:{name:"I16",block_elements:1,block_bytes:2},26:{name:"I32",block_elements:1,block_bytes:4},27:{name:"I64",block_elements:1,block_bytes:8},28:{name:"F64",block_elements:1,block_bytes:8},29:{name:"IQ1_M",block_elements:256,block_bytes:56},30:{name:"BF16",block_elements:1,block_bytes:2},34:{name:"TQ1_0",block_elements:256,block_bytes:54},35:{name:"TQ2_0",block_elements:256,block_bytes:66},39:{name:"MXFP4",block_elements:32,block_bytes:17},40:{name:"NVFP4",block_elements:64,block_bytes:36},41:{name:"Q1_0",block_elements:128,block_bytes:18},42:{name:"Q2_0",block_elements:64,block_bytes:18}}),rQ=new Set(["llama","mistral","qwen2","qwen3","gemma","gemma2"]);function GS(e){return rQ.has(e)}var Ss=class extends Error{constructor(t){super(`metadata header requires at least ${t} bytes`),this.requiredBytes=t}};function KS(e,t){try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{throw new Error(`${t} is not valid UTF-8`)}}var yd=class{constructor(t,n=!0){this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.offset=0,this.littleEndian=n}need(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("invalid read length");if(this.offset+t>this.bytes.length)throw new Ss(this.offset+t)}u8(){return this.need(1),this.bytes[this.offset++]}i8(){return this.need(1),this.view.getInt8(this.offset++)}u16(){this.need(2);let t=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}i16(){this.need(2);let t=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}u32(){this.need(4);let t=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}i32(){this.need(4);let t=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}f32(){this.need(4);let t=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}f64(){this.need(8);let t=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}u64(t=`Unsigned integer at byte ${this.offset}`){return this.safeInteger(this.big64(!1),t)}i64(t=`Signed integer at byte ${this.offset}`){return this.safeInteger(this.big64(!0),t)}big64(t){this.need(8);let n=t?this.view.getBigInt64(this.offset,this.littleEndian):this.view.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}safeInteger(t,n){if(t>BigInt(Number.MAX_SAFE_INTEGER)||t<BigInt(Number.MIN_SAFE_INTEGER))throw new Error(`${n} is ${t}; supported exact range is ${Number.MIN_SAFE_INTEGER} to ${Number.MAX_SAFE_INTEGER}.`);return Number(t)}string(t=65535){let n=this.u64();if(n>t)throw new Error(`string length ${n} exceeds ${t}`);this.need(n);let i=KS(this.bytes.subarray(this.offset,this.offset+n),"metadata string");return this.offset+=n,i}};function ZS(e,t,n=0){if(n>4)throw new Error("GGUF metadata array nesting exceeds 4");switch(t){case 0:return e.u8();case 1:return e.i8();case 2:return e.u16();case 3:return e.i16();case 4:return e.u32();case 5:return e.i32();case 6:return e.f32();case 7:{let i=e.u8();if(i>1)throw new Error(`invalid GGUF boolean ${i}`);return!!i}case 8:return e.string(Number.MAX_SAFE_INTEGER);case 9:{let i=e.u32();if(!$f[i])throw new Error(`unknown GGUF array value type ${i}`);let o=e.u64();if(o>1e7)throw new Error(`GGUF metadata array count ${o} exceeds safety limit`);let a=[];for(let r=0;r<o;r+=1){let s=ZS(e,i,n+1);r<8&&a.push(s)}return{kind:"array",element_type:$f[i],count:o,sample:a}}case 10:return e.u64();case 11:return e.i64();case 12:return e.f64();default:throw new Error(`unknown GGUF metadata value type ${t}`)}}function sQ(e,t){let n=aQ[t];if(!n)return{status:"unsupported_type",traits:null,byteLength:null};let i=BigInt(e[0]??1),o=BigInt(n.block_elements);if(i%o!==0n)return{status:"invalid_row_cardinality",traits:n,byteLength:null};let a=e.slice(1).reduce((s,c)=>s*BigInt(c),1n),r=i/o*BigInt(n.block_bytes)*a;if(r>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("GGUF tensor storage exceeds JavaScript exact integer range");return{status:"assessed",traits:n,byteLength:Number(r)}}function cQ(e){return(e||[]).reduce((t,n)=>t*BigInt(n),1n)}function Bf(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}function VS(e,t,n=6){if(t===0n)return null;let i=10n**BigInt(n),o=(e*i*2n/t+1n)/2n,a=o/i,r=String(o%i).padStart(n,"0").replace(/0+$/,"");return r?`${a}.${r}`:String(a)}function lQ(e,t){let n=new Map((t?.tensor_records||[]).map(o=>[o.tensor_index,o])),i=new Map;for(let o of e){let a=n.get(o.index);if(a?.status!=="assessed_full_payload"||!a.payload_sha256)continue;let r=`${o.dtype}\0${JSON.stringify(o.shape||[])}\0${o.byte_length}\0${a.payload_sha256}`;i.has(r)||i.set(r,[]),i.get(r).push(o)}return[...i.values()].filter(o=>o.length>1).map(o=>({dtype:o[0].dtype,shape:[...o[0].shape||[]],byte_length_each:Number(o[0].byte_length||0),tensor_count:o.length,duplicate_bytes_after_first:Number(o[0].byte_length||0)*(o.length-1),payload_sha256:n.get(o[0].index).payload_sha256,tensor_indices:o.map(a=>a.index),tensor_names:o.map(a=>a.name),interpretation:"Content-addressed duplicate candidate: identical dtype, shape, byte length, and payload SHA-256. Runtime aliasing or semantic weight tying is not inferred."})).sort((o,a)=>a.duplicate_bytes_after_first-o.duplicate_bytes_after_first||o.tensor_names[0].localeCompare(a.tensor_names[0]))}function Lf(e,t,n=null){let i=new Map,o=0n,a=0n,r=0;for(let l of t||[]){let _=cQ(l.shape),p=Number.isSafeInteger(l.byte_length)&&l.byte_length>=0,d=BigInt(p?l.byte_length:0);p||(r+=1),o+=_,a+=d;let m=String(l.dtype||"UNKNOWN"),f=i.get(m)||{dtype:m,tensor_count:0,element_count:0n,byte_length:0n,unknown_byte_length_tensor_count:0};f.tensor_count+=1,f.element_count+=_,f.byte_length+=d,p||(f.unknown_byte_length_tensor_count+=1),i.set(m,f)}let s=lQ(t||[],n),c=s.reduce((l,_)=>l+_.duplicate_bytes_after_first,0),u=[...i.values()].map(l=>({dtype:l.dtype,tensor_count:l.tensor_count,element_count:Bf(l.element_count),element_count_decimal:String(l.element_count),byte_length:Bf(l.byte_length),byte_length_decimal:String(l.byte_length),unknown_byte_length_tensor_count:l.unknown_byte_length_tensor_count,effective_bits_per_element:l.unknown_byte_length_tensor_count?null:VS(l.byte_length*8n,l.element_count)})).sort((l,_)=>{let p=BigInt(l.byte_length_decimal),d=BigInt(_.byte_length_decimal);return p===d?l.dtype.localeCompare(_.dtype):p>d?-1:1});return{schema:"deepbom.tensor_storage_summary.v1",status:r?"partial_unknown_serialized_byte_cardinality":"assessed",evidence_class:"OBSERVED/DERIVED",format:e,tensor_count:(t||[]).length,element_count:Bf(o),element_count_decimal:String(o),byte_length:Bf(a),byte_length_decimal:String(a),unknown_byte_length_tensor_count:r,effective_bits_per_element:r?null:VS(a*8n,o),encoding_count:u.length,encodings:u,content_addressed_duplicate_group_count:s.length,content_addressed_duplicate_tensor_count:s.reduce((l,_)=>l+_.tensor_count,0),content_addressed_duplicate_bytes_after_first:c,duplicate_groups:s,duplicate_method:"Group only full-payload records with identical dtype, shape, byte length, and SHA-256; no payload rescan and no semantic alias claim."}}function Df(e,t){let n=e.find(i=>i.key===t);return n?.value?.kind==="array"?n.value:null}function uQ(e,t,n){let i=typeof t["general.architecture"]=="string"?t["general.architecture"]:null,o=[],a={},r=P=>{if(!i)return null;let X=`${i}.${P}`;if(!Object.hasOwn(t,X))return null;let j=t[X];return a[P]=j,(!Number.isSafeInteger(j)||j<=0)&&o.push({code:"GGUF_ARCHITECTURE_INTEGER_INVALID",key:X,value:j}),Number.isSafeInteger(j)&&j>0?j:null},s=P=>{if(!i)return null;let X=`${i}.${P}`;if(!Object.hasOwn(t,X))return null;let j=t[X];return a[P]=j,(!Number.isFinite(j)||j<=0)&&o.push({code:"GGUF_ARCHITECTURE_NUMBER_INVALID",key:X,value:j}),Number.isFinite(j)&&j>0?j:null},c=P=>{if(!i)return null;let X=`${i}.${P}`;if(!Object.hasOwn(t,X))return null;let j=t[X];return a[P]=j,(typeof j!="string"||!j.trim())&&o.push({code:"GGUF_ARCHITECTURE_STRING_INVALID",key:X,value:j}),typeof j=="string"&&j.trim()?j.trim():null},u=r("context_length"),l=r("embedding_length"),_=r("block_count"),p=r("feed_forward_length"),d=r("attention.head_count"),m=r("attention.head_count_kv"),f=r("attention.key_length"),g=r("attention.value_length"),h=r("rope.dimension_count"),b=s("rope.freq_base"),A=c("rope.scaling.type"),y=s("rope.scaling.factor");l&&d&&l%d!==0&&o.push({code:"GGUF_ATTENTION_HEAD_WIDTH_NONINTEGRAL",embedding_length:l,head_count:d}),d&&m&&d%m!==0&&o.push({code:"GGUF_ATTENTION_GQA_GROUP_NONINTEGRAL",head_count:d,head_count_kv:m});let x=Df(e,"tokenizer.ggml.tokens"),v=Df(e,"tokenizer.ggml.scores"),I=Df(e,"tokenizer.ggml.token_type");x&&v&&x.count!==v.count&&o.push({code:"GGUF_TOKENIZER_SCORE_CARDINALITY_MISMATCH",token_count:x.count,score_count:v.count}),x&&I&&x.count!==I.count&&o.push({code:"GGUF_TOKENIZER_TYPE_CARDINALITY_MISMATCH",token_count:x.count,token_type_count:I.count});let w=e.filter(P=>/^tokenizer\.ggml\..+_token_id$/.test(P.key)&&P.value?.kind!=="array").map(P=>({key:P.key,value:P.value,in_vocabulary:Number.isSafeInteger(P.value)&&P.value>=0&&(!x||P.value<x.count)}));for(let P of w)P.in_vocabulary||o.push({code:"GGUF_SPECIAL_TOKEN_ID_OUT_OF_RANGE",key:P.key,value:P.value,vocabulary_count:x?.count??null});let N=Object.keys(a).length+(x?1:0)+(v?1:0)+(I?1:0)+w.length,S=typeof t["tokenizer.chat_template"]=="string"&&t["tokenizer.chat_template"].length?t["tokenizer.chat_template"]:null,O=l&&d&&l%d===0?l/d:null,B=f||O,k=g||O,D=_&&m&&B&&k&&u?_l({layerCount:_,kvHeadCount:m,keyHeadWidth:B,valueHeadWidth:k,contextLength:u}):null,q=x?.count??null,F=GS(i)&&q&&l&&p&&_&&d&&m&&B&&B===k&&u?dl({vocabularySize:q,hiddenSize:l,intermediateSize:p,layerCount:_,attentionHeadCount:d,kvHeadCount:m,headWidth:B,contextLength:u}):null;return{schema:"deepbom.gguf_semantic_contract.v1",status:o.length?"invalid":N?"assessed":"not_declared",evidence_class:"OBSERVED/DERIVED",architecture:i,architecture_fields:a,context_length:u,embedding_length:l,block_count:_,feed_forward_length:p,attention_head_count:d,attention_head_count_kv:m,attention_key_length:f,attention_value_length:g,derived_attention_head_width:O,derived_gqa_query_heads_per_kv_head:d&&m&&d%m===0?d/m:null,position_encoding:{status:h||b||A||y?"declared":"not_declared",rope_dimension_count:h,rope_frequency_base:b,rope_scaling_type:A,rope_scaling_factor:y},kv_state_projection:D,compute_projection:F,compute_projection_status:F?"assessed_registered_canonical_decoder_scenario":GS(i)?"not_assessed_incomplete_or_nonuniform_attention_metadata":"not_assessed_architecture_not_registered_for_canonical_decoder_projection",tokenizer:{status:x||w.length?o.some(P=>P.code.startsWith("GGUF_TOKENIZER")||P.code.startsWith("GGUF_SPECIAL"))?"invalid":"assessed":"not_declared",model:t["tokenizer.ggml.model"]||null,vocabulary_count:q,score_count:v?.count??null,token_type_count:I?.count??null,merge_count:Df(e,"tokenizer.ggml.merges")?.count??null,special_token_count:w.length,special_tokens:w,chat_template:S?{status:"embedded_in_gguf",sha256:K(S),utf8_byte_length:new TextEncoder().encode(S).length}:{status:"not_declared"},complete_array_values_retained:!1,array_evidence:"Full array cardinalities are parsed; only bounded previews are retained in browser memory."},serialized_tensor_count:n.length,assessed_field_count:N,issue_count:o.length,issues:o,boundary:"Internal metadata consistency, declared attention-state cardinality, and an explicit canonical decoder compute scenario where registered only; an execution DAG, architecture implementation, tokenizer behavior, cache storage dtype/layout, backend support, and runtime allocation are not inferred."}}function _Q(e,t,n){if(e.length<24)throw new Ss(24);if(String.fromCharCode(...e.subarray(0,4))!=="GGUF")throw new Error("invalid GGUF magic");let i=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(4,!0),o=i===2||i===3,a=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(4,!1),r=o?i:a;if(r!==2&&r!==3)throw new Error(`unsupported GGUF version ${r}`);if(!o&&r!==3)throw new Error("big-endian GGUF requires format version 3");let s=new yd(e,o);s.offset=8;let c=s.u64(),u=s.u64();if(c>1e7||u>1e6)throw new Error("GGUF header count exceeds safety limit");let l=[],_={},p=0;for(let P=0;P<u;P+=1){let X=s.string();/^[a-z0-9_]+(?:\.[a-z0-9_]+)*$/.test(X)||(p+=1);let j=s.u32();if(!$f[j])throw new Error(`unknown GGUF metadata value type ${j}`);let J=ZS(s,j),W=(J?.kind==="array",J);l.push({key:X,type:$f[j],value:W}),J?.kind!=="array"&&typeof J!="object"&&(_[X]=J)}let d=Object.hasOwn(_,"general.alignment")?_["general.alignment"]:void 0;if(d!==void 0&&typeof d!="number")throw new Error(`GGUF general.alignment must be a numeric metadata value, received ${typeof d}`);let m=d===void 0?32:d;if(!Number.isInteger(m)||m<=0||m>ov||(m&m-1)!==0)throw new Error(`invalid GGUF alignment ${m}`);let f=[],g=0;for(let P=0;P<c;P+=1){let X=s.string(64),j=s.u32();if(j>16)throw new Error(`GGUF tensor rank ${j} exceeds safety limit`);let J=Array.from({length:j},()=>s.u64()),W=s.u32(),se=s.u64();se%m!==0&&(g+=1);let Y=sQ(J,W);f.push({index:P,name:X,shape:J,dtype:Y.traits?.name||`GGML_TYPE_${W}`,ggml_type:W,data_offset:se,data_end:Y.byteLength==null?null:se+Y.byteLength,byte_length:Y.byteLength,block_elements:Y.traits?.block_elements||null,block_bytes:Y.traits?.block_bytes||null,storage_status:Y.status})}let h=Math.ceil(s.offset/m)*m;if(h>n)throw new Error("GGUF tensor data offset exceeds file size");let b=n-h,A=0,y=0,x=0;for(let P of f)P.storage_status==="unsupported_type"?A+=1:P.storage_status==="invalid_row_cardinality"&&(y+=1),(P.data_offset>b||P.data_end!=null&&P.data_end>b)&&(g+=1,x+=1);let v=f.filter(P=>P.data_end!=null).sort((P,X)=>P.data_offset-X.data_offset||P.data_end-X.data_end||P.index-X.index),I=0,w=0,N=0;for(let P of v)P.data_offset<I?N+=1:w+=P.data_offset-I,I=Math.max(I,P.data_end);let S=Math.max(0,b-I);w+=S;let O=f.reduce((P,X)=>P+Number(X.byte_length||0),0),k=y+N+x?"invalid_tensor_storage_ranges":A?"partial_unsupported_ggml_types":w?"complete_with_alignment_padding":"complete_without_gaps_or_overlaps",D=String(_["general.architecture"]||"not_declared"),q=uQ(l,_,f),L=nS({architecture:D},f),F=XS("gguf",t,n,f,{status:p||g||y||N?"invalid":A?"partial":"assessed",metadata:_,metadata_entries:l,gguf:{schema:"deepbom.gguf_metadata.v1",version:r,endianness:o?"little":"big",architecture:D,quantization_version:Number.isSafeInteger(_["general.quantization_version"])?_["general.quantization_version"]:null,general_file_type:Number.isSafeInteger(_["general.file_type"])?_["general.file_type"]:null,tensor_count:c,metadata_kv_count:u,alignment:m,tensor_data_offset:h,payload_byte_length:b,declared_tensor_byte_length:O,alignment_padding_byte_length:w,payload_coverage_status:k,unsupported_ggml_type_count:A,invalid_tensor_cardinality_count:y,overlapping_tensor_range_count:N,out_of_bounds_tensor_range_count:x,invalid_metadata_key_count:p,invalid_tensor_offset_count:g,type_traits_source:oQ,semantic_contract:q,backend_compatibility:L,parser_scope:"GGUF metadata, tensor descriptors, source-pinned serialized byte ranges, and full-payload numerical integrity for supported scalar and GGML block encodings."}});return q.serialized_parameter_count=F.tensor_storage_summary.element_count,q.serialized_parameter_count_decimal=F.tensor_storage_summary.element_count_decimal,q.serialized_tensor_bytes=F.tensor_storage_summary.byte_length,q.serialized_tensor_bytes_decimal=F.tensor_storage_summary.byte_length_decimal,q.effective_bits_per_parameter=F.tensor_storage_summary.effective_bits_per_element,q.parameter_storage_basis="Reused from deepbom.tensor_storage_summary.v1; tensor shape products and serialized payload bytes are not recomputed.",F.on_device_llm=Zo(F),F}function dQ(e,t,n){if(e.length<9)throw new Ss(9);let o=new yd(e,!0).u64("SafeTensors header length at byte 0");if(o<2||o>iv)throw new Error(`SafeTensors header length ${o} is outside the supported range`);let a=8+o;if(e.length<a)throw new Ss(a);if(e[8]!==123)throw new Error("SafeTensors header must begin with '{'");let r=KS(e.subarray(8,a),"SafeTensors header").trimEnd(),s=Ao(r,"SafeTensors header");if(!s||typeof s!="object"||Array.isArray(s))throw new Error("SafeTensors header must be an object");let c=s.__metadata__||{};if(!c||typeof c!="object"||Array.isArray(c)||Object.values(c).some(m=>typeof m!="string"))throw new Error("SafeTensors __metadata__ must contain only string values");let u=n-a;if(u<0)throw new Error("SafeTensors header exceeds file size");let l=[];for(let[m,f]of Object.entries(s)){if(m==="__metadata__")continue;if(!f||typeof f!="object"||Array.isArray(f))throw new Error(`invalid SafeTensors descriptor ${m}`);let g=iQ[f.dtype];if(!g)throw new Error(`unsupported SafeTensors dtype ${f.dtype}`);let h=f.shape,b=f.data_offsets;if(!Array.isArray(h)||h.some(v=>!Number.isSafeInteger(v)||v<0))throw new Error(`invalid SafeTensors shape ${m}`);if(!Array.isArray(b)||b.length!==2||b.some(v=>!Number.isSafeInteger(v)||v<0)||b[1]<b[0])throw new Error(`invalid SafeTensors offsets ${m}`);if(b[1]>u)throw new Error(`SafeTensors tensor ${JSON.stringify(m)} declares payload byte range [${b[0]}, ${b[1]}), but only ${u} payload bytes are available after the ${a}-byte header.`);let y=h.reduce((v,I)=>v*BigInt(I),1n)*BigInt(g);if(y%8n!==0n)throw new Error(`SafeTensors sub-byte tensor ${m} is not byte-aligned`);let x=Number(y/8n);if(!Number.isSafeInteger(x)||b[1]-b[0]!==x)throw new Error(`SafeTensors byte cardinality mismatch ${m}`);l.push({index:l.length,name:m,shape:h,dtype:f.dtype,data_offset:b[0],data_end:b[1],byte_length:x})}let _=[...l].sort((m,f)=>m.data_offset-f.data_offset||m.data_end-f.data_end),p=0;for(let m of _){if(m.data_offset!==p)throw new Error(`SafeTensors payload gap or overlap before ${m.name}`);p=m.data_end}if(p!==u)throw new Error(`SafeTensors tensor ranges cover ${p} of ${u} payload bytes; ${u-p} trailing bytes are not assigned to any tensor.`);let d=XS("safetensors",t,n,l,{status:"assessed",metadata:c,safetensors:{schema:"deepbom.safetensors_metadata.v1",header_byte_length:o,tensor_count:l.length,payload_byte_length:u,payload_coverage_status:"complete_without_gaps_or_overlaps",duplicate_key_validation:"complete",reference_implementation:Es(),quantization_contract:gd(null,l),parser_scope:"Header, exact tensor byte ranges, and full-payload numerical integrity for source-bound scalar, FP8, and PyTorch-packed F4 dtypes. F6 remains explicitly unassessed because SafeTensors does not define its packed-bit mapping."}});return d.on_device_llm=Zo(d),d}function av(e,t){let n=e==="gguf"?t.filter(_=>Number(_.block_elements||0)>1).length:0,i=e==="gguf"?t.filter(_=>_.storage_status==="assessed"&&Number(_.block_elements||0)===1).length:0,o=e==="gguf"?t.filter(_=>_.storage_status!=="assessed").length:0,a=t.filter(_=>["F16","BF16","FLOAT16","BFLOAT16"].includes(String(_.dtype||"").toUpperCase())).length,r=t.filter(_=>["F32","F64","FLOAT32","FLOAT64"].includes(String(_.dtype||"").toUpperCase())).length,s=e==="gguf"?t.length-o:t.length,c=Math.max(0,s-n-a-r),u=n>0?"format_defined_block_quantized_weights":"not_quantized_storage_encoding",l=n>0?i>0?"mixed_block_quantized_and_scalar_storage":"block_quantized_storage":a>0&&a+r===t.length?r>0?"mixed_floating_point_storage":"reduced_precision_floating_point_storage":"scalar_or_mixed_typed_storage";return{status:e==="gguf"?n>0?"assessed":"not_applicable_no_block_quantization":"not_applicable_weight_container",classification:e==="gguf"?u:"weight_container",label:e==="gguf"?n>0?"GGUF block-quantized tensor storage":"GGUF tensor storage (no block quantization observed)":"SafeTensors weight container",summary:e==="gguf"?n>0?`${n}/${t.length} tensors use source-pinned block-quantized GGML encodings.`:`0/${t.length} tensors use a source-pinned block-quantized GGML encoding; floating-point storage is not relabeled as quantization.`:`${a} reduced-precision floating-point, ${r} full-precision floating-point, and ${c} other typed tensor(s) are serialized; no execution-graph quantization contract is present.`,detail:e==="gguf"?`${n} block-quantized, ${i} scalar-encoded, ${o} unsupported or invalid encoding tensor(s). GGML block encoding is not TFLite/ONNX affine per-tensor or per-axis quantization.`:"SafeTensors dtype and byte ranges are container metadata, not an executable quantization graph contract.",full_integer:!1,compute_ops:0,quantized_compute_ops:0,quantized_compute_mac_percent:null,encoded_tensor_count:s,block_quantized_tensor_count:n,reduced_precision_float_tensor_count:a,full_precision_float_tensor_count:r,other_typed_tensor_count:c,precision_category_conservation:s===n+a+r+c,storage_precision_classification:e==="gguf"?l:"typed_weight_container",scalar_encoded_tensor_count:i,unsupported_encoding_tensor_count:o,op_state_counts:[]}}function XS(e,t,n,i,o){let a=i.reduce((s,c)=>s+Number(c.byte_length||0),0),r=e==="gguf"?i.filter(s=>Number(s.block_elements||0)>1).length:0;return{schema:"deepbom.static_analysis.container.v1",format:e,filename:t,file_size:n,file_size_bytes:n,operator_count:null,tensor_count:i.length,quantized_tensors:r,per_channel_tensors:0,per_tensor_tensors:0,total_macs:null,mac_assessment:{status:"not_applicable_weight_container",compute_ops:0,assessed_compute_ops:0},ops:[],inputs:[],outputs:[],tensors:i,tensor_inventory:{status:o.status,tensor_count:i.length,total_declared_tensor_bytes:a,tensors:i},tensor_storage_summary:Lf(e,i),metadata_presence:{status:"assessed",producer_name:o.metadata?.["general.name"]||null,producer_version:o.metadata?.["general.version"]||null,metadata_author:o.metadata?.["general.author"]||null,metadata_license:o.metadata?.["general.license"]||null,description:o.metadata?.["general.description"]||null,preprocessing_contract_status:"not_applicable_weight_container",output_semantics_documented:!1},quantization_status:av(e,i),format_extensions:{[e]:o[e]},[e]:o[e]}}function Mf(e,t){e.tensor_numerical_integrity=t;let n=new Map(t.tensor_records.map(i=>[i.tensor_index,i]));for(let i of e.tensors)i.numerical_integrity=n.get(i.index)||null;return e.tensor_inventory.numerical_integrity_status=t.status,e.tensor_inventory.assessed_payload_bytes=t.assessed_tensor_bytes,e.tensor_inventory.unassessed_payload_bytes=t.unassessed_tensor_bytes,e.tensor_inventory.decoded_value_count=t.decoded_value_count,e.tensor_storage_summary=Lf(e.format,e.tensors,t),e.format==="safetensors"&&(e.safetensors.quantization_contract=gd(null,e.tensors),e.format_extensions.safetensors=e.safetensors),e}async function Pf(e,t,{onProgress:n,scanMode:i="full"}={}){let o=String(t||"").toLowerCase();if(!["structure","integrity","full"].includes(i))throw new Error(`unsupported metadata scan mode ${i}`);if(o==="safetensors"){let a=new Uint8Array(await e.slice(0,8).arrayBuffer());if(a.length<8)throw new Error("truncated SafeTensors length prefix");let r=new yd(a).u64("SafeTensors header length at byte 0");if(r>iv)throw new Error(`SafeTensors header exceeds ${iv} bytes`);let s=new Uint8Array(await e.slice(0,8+r).arrayBuffer()),c=dQ(s,e.name,e.size);return i==="structure"?Mf(c,HS(c,e.size)):Mf(c,await hf(e,c,{onProgress:n})),{analysis:c,retainedBytes:s,payloadLoaded:!1,payloadScanned:i!=="structure"}}if(o==="gguf"){let a=Math.min(e.size,65536);for(;a<=Math.min(e.size,nv);){let r=new Uint8Array(await e.slice(0,a).arrayBuffer());try{let s=_Q(r,e.name,e.size);return i==="structure"?Mf(s,HS(s,e.size)):Mf(s,await hf(e,s,{onProgress:n})),{analysis:s,retainedBytes:r,payloadLoaded:!1,payloadScanned:i!=="structure"}}catch(s){if(!(s instanceof Ss))throw s;let c=Math.max(a*2,s.requiredBytes);if(c<=a||c>nv||a===e.size)throw new Error(`GGUF metadata header exceeds the ${nv}-byte inspection limit`);a=Math.min(e.size,c)}}}throw new Error(`metadata adapter is not implemented for ${o||"unknown"}`)}function HS(e,t){let n=e.tensors.map(o=>({schema:"deepbom.tensor_numerical_integrity.tensor.v1",status:"not_assessed_scan_policy_structure",evidence_class:"NOT_ASSESSABLE",tensor_index:o.index,tensor_name:o.name,dtype:o.dtype,shape:o.shape,byte_length:Number.isSafeInteger(o.byte_length)?o.byte_length:null,reason:"Payload numerical decoding was intentionally skipped by the structure scan policy."})),i=e.tensors.reduce((o,a)=>o+Number(a.byte_length||0),0);return{schema:"deepbom.tensor_numerical_integrity.v1",status:"not_assessed_scan_policy_structure",evidence_class:"NOT_ASSESSABLE",scan_scope:"metadata_and_tensor_directory_only",tensor_count:n.length,assessed_tensor_count:0,unassessed_tensor_count:n.length,declared_tensor_bytes:i,assessed_tensor_bytes:0,unassessed_tensor_bytes:i,byte_conservation_status:"complete_descriptor_cardinality_payload_not_scanned",source_file_bytes:t,decoded_value_count:0,nonfinite_value_count:null,exact_zero_value_count:null,all_zero_tensor_count:null,constant_tensor_count:null,invalid_encoding_value_count:null,nonfinite_scale_block_count:null,tensor_records:n,decoder_source:e.format==="gguf"?pd:Es(),limitations:[{reason:"Payload numerical integrity requires --scan integrity or --scan full."}]}}Yf();Ce();var bT=1024*1024*1024,uT=2e6,_T=1e5,Sv=16*1024*1024,dT=64*1024*1024,pT=200,aG=new TextDecoder("utf-8",{fatal:!0});function rG(e,t="graph.pb"){ih(e,bT,"TensorFlow GraphDef");let n=wT(e,"GraphDef");return vT(n,t,"graphdef")}function th(e,t="graph.pb"){if(ih(e,bT,"TensorFlow protobuf"),/^saved_model\.pb$/i.test(String(t).split(/[\\/]/).pop()||"")){let n=cG(e),i=vT(n[0],t,"savedmodel",{source:"SavedModel.meta_graphs[0].graph_def",artifact_role:"model_package"});return i.savedmodel={schema:"deepbom.tensorflow_savedmodel_safe_static_contract.v1",meta_graph_count:n.length,materialized_meta_graph_indices:[0],signature_defs:n[0].signatures,additional_meta_graphs:n.slice(1).map((o,a)=>({index:a+1,node_count:o.nodes.length,function_count:o.functions.length,signature_count:o.signatures.length})),package_closure_status:"protobuf_only_variables_assets_and_fingerprints_not_bound",evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",unsafe_execution_performed:!1,interpretation_boundary:"The first serialized MetaGraph GraphDef and SignatureDef tensor contracts are materialized. Additional MetaGraphs are inventoried but not merged into one execution graph, and this standalone protobuf does not bind the SavedModel directory, variables, assets, fingerprints, kernels, or runtime behavior."},i.format_extensions.savedmodel=i.savedmodel,i}return rG(e,t)}function sG(e,t="model.h5"){ih(e,Number.MAX_SAFE_INTEGER,"HDF5");let n=NT(e);if(n<0)throw new Error("HDF5 signature was not found at an allowed user-block boundary.");let i=n+8,o=e[i];if(![0,1,2,3].includes(o))throw new Error(`Unsupported HDF5 superblock version ${o}.`);let a=o<=1?TG(e,i,o):SG(e,i,o);return Pv(t,"hdf5",{schema:"deepbom.hdf5_safe_envelope.v1",status:"superblock_assessed_object_graph_not_materialized",evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",signature_offset:n,...a,unsafe_deserialization_performed:!1,object_construction_performed:!1,profile_candidates:zG(t),interpretation_boundary:"The HDF5 superblock and container identity are parsed without loading Keras or Python objects. Group, dataset, link, filter, tensor, architecture, and executable-graph coverage are not claimed in this release."},"training_checkpoint_or_model_container")}async function yT(e,t=e?.name||"model.h5"){CT(e,"HDF5");let n=[0];for(let i=512;i<e.size&&i<=1024*1024*1024;i*=2)n.push(i);for(let i of n){let o=Math.min(512,e.size-i);if(o<8)continue;let a=new Uint8Array(await e.slice(i,i+o).arrayBuffer());if(NT(a)!==0)continue;let r=sG(a,t);return r.file_size=e.size,r.file_size_bytes=e.size,r.safe_source_artifact.signature_offset=i,r.safe_source_artifact.file_size_bytes=e.size,r.safe_source_artifact.header_range={start:i,end_exclusive:i+a.length},{analysis:r,retainedBytes:a}}throw new Error("HDF5 signature was not found at an allowed user-block boundary within the bounded 1 GiB search range.")}async function Mv(e,t=e?.name||"model.pt2",n=""){CT(e,"ZIP model container");let i=Math.min(e.size,65557),o=e.size-i,a=new Uint8Array(await e.slice(o,e.size).arrayBuffer()),r=RG(a),s=new DataView(a.buffer,a.byteOffset,a.byteLength),c=s.getUint16(r+10,!0),u=s.getUint32(r+12,!0),l=s.getUint32(r+16,!0);bG(c,u,l,e.size,o+r);let _=new Uint8Array(await e.slice(l,l+u).arrayBuffer()),p=gG(_,c,l,u),d=String(t).toLowerCase(),m=n||(d.endsWith(".pt2")?"pt2":d.endsWith(".keras")?"keras":"pytorch_checkpoint"),f=await yG(p,m,b=>AG(e,b)),g=m==="pt2"?"exported_program":m==="keras"?"model_package":"training_checkpoint",h=Pv(t,m,{schema:"deepbom.safe_zip_model_envelope.v1",status:f.status,evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",archive:wG(p),...f,unsafe_deserialization_performed:!1,native_code_executed:!1,file_access:{mode:"bounded_ranges",full_artifact_loaded:!1,central_directory_bytes:u},interpretation_boundary:m==="pytorch_checkpoint"?"The archive and bounded pickle opcode/global inventory are inspected without torch.load, pickle.load, Python imports, object construction, or native code execution. A checkpoint does not establish an executable model graph.":"The archive and bounded declarative members are inspected without framework object construction or native code execution. Opaque or unsafe members remain hash-addressed and are not interpreted as an executable runtime graph."},g);return m==="pt2"&&xG(h,f),m==="keras"&&EG(h,f),h.file_size=e.size,h.file_size_bytes=e.size,{analysis:h,retainedBytes:a}}async function AT(e,t="model.pt"){ih(e,Number.MAX_SAFE_INTEGER,"PyTorch checkpoint");let n=ET(e);return Pv(t,"pytorch_checkpoint",{schema:"deepbom.pytorch_safe_envelope.v1",status:"legacy_pickle_opcode_inventory_assessed_payload_not_deserialized",evidence_class:"OBSERVED_SERIALIZED_ARTIFACT",container:"legacy_pickle_stream_or_unrecognized_checkpoint_envelope",pickle:n,unsafe_deserialization_performed:!1,native_code_executed:!1,interpretation_boundary:"Only bounded pickle opcodes and literal GLOBAL references are inventoried. STACK_GLOBAL targets, object semantics, tensors, architecture, and executable graph remain not assessable without unsafe object construction."},"training_checkpoint")}function cG(e){let n=vn(e,"SavedModel",0).filter(i=>i.number===2&&i.wire===2);if(!n.length)throw new Error("SavedModel contains no MetaGraphDef records.");return n.map((i,o)=>{let a=vn(i.bytes,`SavedModel.meta_graphs[${o}]`,1),r=a.find(c=>c.number===2&&c.wire===2);if(!r)return null;let s=wT(r.bytes,`SavedModel.meta_graphs[${o}].graph_def`);return s.signatures=lG(a,`SavedModel.meta_graphs[${o}]`),s}).filter(Boolean)}function vT(e,t,n="graphdef",i={}){let o=new Map(e.nodes.map((d,m)=>[d.name,m])),a=new Map(e.nodes.map(d=>[d.name,d])),r=new Map,s=(d,m=0)=>{let f=`${d}:${m}`;return r.has(f)||r.set(f,r.size),r.get(f)};for(let d of e.nodes)for(let m of d.inputs)m.control||s(m.node,m.port);for(let d of e.signatures||[])for(let m of[...d.inputs,...d.outputs]){let f=Lv(m.tensor_name);f.control||s(f.node,f.port)}let c=new Map((e.signatures||[]).flatMap(d=>[...d.inputs,...d.outputs]).map(d=>[d.tensor_name,d])),u=new Set(e.nodes.flatMap(d=>d.inputs.filter(m=>!m.control).map(m=>`${m.node}:${m.port}`))),l=e.nodes.map((d,m)=>({index:m,name:d.op,graph_node_name:d.name,domain:"tensorflow.graphdef",version:null,inputs:d.inputs.filter(f=>!f.control).map(f=>s(f.node,f.port)),outputs:[...r.keys()].filter(f=>f.startsWith(`${d.name}:`)).map(f=>r.get(f)).sort((f,g)=>f-g),macs:null,macs_status:"not_assessed_operator_semantics_and_shapes_not_materialized"})),_=[...r.entries()].sort(([,d],[,m])=>d-m).map(([d,m])=>{let f=d.replace(/:\d+$/,""),g=mG(a.get(f),c.get(d));return{index:m,name:d,dtype:g.dtype,shape:g.shape,value_kind:"graph_value",constant_buffer:g.constant,serialized_payload_bytes:g.serialized_payload_bytes,numerical_integrity:g.payload_sha256?{payload_sha256:g.payload_sha256}:null,contract_status:g.status}}),p=e.nodes.flatMap((d,m)=>d.inputs.filter(f=>f.control).map(f=>({source_node_name:f.node,source_op_index:o.has(f.node)?o.get(f.node):null,target_node_name:d.name,target_op_index:m,status:o.has(f.node)?"resolved":"unresolved"})));return{format:n,filename:t,file_size:i.file_size??null,file_size_bytes:i.file_size??null,ops:l,tensors:_,operator_count:l.length,tensor_count:_.length,input_tensor_indices:hT((e.signatures||[]).flatMap(d=>d.inputs).map(d=>fT(d.tensor_name,r))),output_tensor_indices:hT((e.signatures||[]).flatMap(d=>d.outputs).map(d=>fT(d.tensor_name,r))),total_macs:null,total_macs_decimal:null,mac_confidence:"partial",mac_assessment:{status:"not_assessed",metric_scope:"serialized GraphDef node ledger; compute classification and shapes not materialized",compute_ops:l.length,assessed_compute_ops:0,not_assessed_compute_ops:l.length,total_assessed_macs:0,total_assessed_macs_decimal:"0"},graphdef:{schema:"deepbom.tensorflow_graphdef_static_contract.v1",status:"serialized_nodes_dependencies_and_bounded_endpoint_contracts_materialized",node_count:e.nodes.length,function_count:e.functions.length,control_dependency_count:p.length,unresolved_input_count:e.nodes.flatMap(d=>d.inputs).filter(d=>!o.has(d.node)).length,versions:e.versions,functions:e.functions,node_attribute_summaries:e.nodes.map((d,m)=>({index:m,name:d.name,op:d.op,attributes:d.attributes})),control_dependencies:p,source:i.source||"GraphDef protobuf",unsafe_execution_performed:!1,graph_input_output_status:e.signatures?.length?"explicit_signature_def_endpoints":"not_explicitly_serialized_by_graphdef",interpretation_boundary:"Node names, op identities, referenced data inputs, control inputs, and function inventory are serialized facts. GraphDef does not explicitly identify model inputs or outputs, and unreferenced operation outputs are not synthesized. Tensor shapes, dtypes, function-call binding, execution schedule, kernels, placement, and runtime behavior are not inferred when not materialized."},format_extensions:{[n]:{node_count:e.nodes.length,function_count:e.functions.length}},findings:[],recommendations:[],artifact_role:i.artifact_role||"exported_program"}}function lG(e,t){let n=e.filter(o=>o.number===5&&o.wire===2);if(n.length>1e5)throw new Error(`${t} exceeds 100,000 SignatureDef map entries.`);let i=new Set;return n.map((o,a)=>{let r=vn(o.bytes,`${t}.signature_def[${a}]`,2),s=kd(r,1,`${t}.signature_def[${a}].key`);if(i.has(s))throw new Error(`${t} repeats SignatureDef key ${JSON.stringify(s)}.`);i.add(s);let c=r.find(l=>l.number===2&&l.wire===2);if(!c)throw new Error(`${t}.signature_def[${a}].value is missing.`);let u=vn(c.bytes,`${t}.signature_def[${a}].value`,3);return{key:s,method_name:nh(u,3),inputs:mT(u,1,`${t}.signature_def[${a}].inputs`),outputs:mT(u,2,`${t}.signature_def[${a}].outputs`)}})}function mT(e,t,n){let i=e.filter(a=>a.number===t&&a.wire===2),o=new Set;return i.map((a,r)=>{let s=vn(a.bytes,`${n}[${r}]`,4),c=kd(s,1,`${n}[${r}].key`);if(o.has(c))throw new Error(`${n} repeats key ${JSON.stringify(c)}.`);o.add(c);let u=s.find(m=>m.number===2&&m.wire===2);if(!u)throw new Error(`${n}[${r}].value is missing.`);let l=vn(u.bytes,`${n}[${r}].value`,5),_=nh(l,1);if(!_)throw new Error(`${n}[${r}] does not expose a dense TensorInfo name.`);let p=l.find(m=>m.number===2&&m.wire===0),d=l.find(m=>m.number===3&&m.wire===2);return{key:c,tensor_name:_,dtype:p?$v(bl(p.value,`${n}[${r}].dtype`)):"UNKNOWN",shape:d?eh(d.bytes,`${n}[${r}].tensor_shape`):[],evidence_class:"OBSERVED_SERIALIZED_ARTIFACT"}})}function fT(e,t){let n=Lv(e);return t.get(`${n.node}:${n.port}`)??null}function hT(e){return[...new Set(e.filter(t=>Number.isSafeInteger(t)&&t>=0))].sort((t,n)=>t-n)}function wT(e,t){let n=vn(e,t,0),i=n.filter(r=>r.number===1&&r.wire===2).map((r,s)=>uG(r.bytes,`${t}.node[${s}]`)),o=n.find(r=>r.number===2&&r.wire===2),a=n.find(r=>r.number===4&&r.wire===2);return{nodes:i,functions:o?fG(o.bytes,`${t}.library`):[],versions:a?hG(a.bytes):null}}function uG(e,t){let n=vn(e,t,1),i=kd(n,1,`${t}.name`),o=kd(n,2,`${t}.op`),a=n.filter(c=>c.number===3&&c.wire===2).map((c,u)=>Lv(Jo(c.bytes,`${t}.input[${u}]`))),r=n.filter(c=>c.number===5&&c.wire===2);if(r.length>1e5)throw new Error(`${t} exceeds 100,000 attributes.`);let s={};for(let[c,u]of r.entries()){let l=_G(u.bytes,`${t}.attr[${c}]`);if(Object.hasOwn(s,l.key))throw new Error(`${t} repeats attribute ${JSON.stringify(l.key)}.`);s[l.key]=l.value}return{name:i,op:o,inputs:a,device:nh(n,4),attribute_entry_count:r.length,attributes:s}}function _G(e,t){let n=vn(e,t,2),i=kd(n,1,`${t}.key`),o=n.find(a=>a.number===2&&a.wire===2);if(!o)throw new Error(`${t}.value is missing.`);return{key:i,value:dG(o.bytes,`${t}.value`)}}function dG(e,t){let n=vn(e,t,3),i=n.find(s=>s.number===6&&s.wire===0),o=n.find(s=>s.number===7&&s.wire===2),a=n.find(s=>s.number===8&&s.wire===2),r=n.find(s=>s.number===1&&s.wire===2);return{type:i?$v(bl(i.value,`${t}.type`)):null,shape:o?eh(o.bytes,`${t}.shape`):null,tensor:a?pG(a.bytes,`${t}.tensor`):null,list_shapes:r?vn(r.bytes,`${t}.list`,4).filter(s=>s.number===7&&s.wire===2).map((s,c)=>eh(s.bytes,`${t}.list.shape[${c}]`)):[],scalar_kinds_present:n.filter(s=>[2,3,4,5,9,10,11,12,13,14].includes(s.number)).map(s=>s.number)}}function pG(e,t){let n=vn(e,t,4),i=n.find(r=>r.number===1&&r.wire===0),o=n.find(r=>r.number===2&&r.wire===2),a=n.find(r=>r.number===4&&r.wire===2)?.bytes||null;return{dtype:i?$v(bl(i.value,`${t}.dtype`)):"UNKNOWN",shape:o?eh(o.bytes,`${t}.tensor_shape`):[],tensor_content_byte_length:a?.length||0,tensor_content_sha256:a?Mo(a):null,typed_value_field_count:n.filter(r=>r.number>=5&&r.number<=19).length}}function eh(e,t){let n=vn(e,t,4);return n.find(o=>o.number===3&&o.wire===0)?.value===1n?null:n.filter(o=>o.number===2&&o.wire===2).map((o,a)=>{let s=vn(o.bytes,`${t}.dim[${a}]`,5).find(c=>c.number===1&&c.wire===0);return!s||s.value>BigInt(Number.MAX_SAFE_INTEGER)?-1:Number(s.value)})}function mG(e,t=null){if(!e)return{dtype:"UNKNOWN",shape:[],constant:!1,serialized_payload_bytes:0,payload_sha256:null,status:"referenced_source_node_unresolved"};let n=e.attributes?.value?.tensor||null,i=e.attributes?.shape?.shape??e.attributes?._output_shapes?.list_shapes?.[0]??n?.shape??null,o=n?.dtype||e.attributes?.dtype?.type||e.attributes?.T?.type||t?.dtype||"UNKNOWN",a=Array.isArray(i)?i:Array.isArray(t?.shape)?t.shape:[];return{dtype:o,shape:a,constant:e.op==="Const"&&!!n,serialized_payload_bytes:n?.tensor_content_byte_length||0,payload_sha256:n?.tensor_content_sha256||null,status:n?"serialized_tensor_proto_contract":i||e.attributes?.dtype?.type||e.attributes?.T?.type?"serialized_node_attribute_contract":t?"serialized_signature_def_contract":"serialized_endpoint_name_shape_and_dtype_not_materialized"}}function $v(e){return{1:"FLOAT32",2:"FLOAT64",3:"INT32",4:"UINT8",5:"INT16",6:"INT8",7:"STRING",8:"COMPLEX64",9:"INT64",10:"BOOL",14:"BFLOAT16",17:"UINT16",19:"FLOAT16",22:"UINT32",23:"UINT64"}[e]||`TF_DATATYPE_${e}`}function Lv(e){let t=e.startsWith("^"),n=t?e.slice(1):e,i=/^(.*?)(?::(\d+))?$/.exec(n);if(!i||!i[1])throw new Error(`Invalid TensorFlow NodeDef input reference ${JSON.stringify(e)}.`);let o=i[2]==null?0:Number(i[2]);if(!Number.isSafeInteger(o)||o<0)throw new Error(`Invalid TensorFlow output port in ${JSON.stringify(e)}.`);return{serialized:e,node:i[1],port:o,control:t}}function fG(e,t){return vn(e,t,1).filter(n=>n.number===1&&n.wire===2).map((n,i)=>{let o=vn(n.bytes,`${t}.function[${i}]`,2),a=o.find(s=>s.number===1&&s.wire===2),r=a?nh(vn(a.bytes,`${t}.function[${i}].signature`,3),1):null;return{index:i,name:r||`function_${i}`,node_count:o.filter(s=>s.number===3&&s.wire===2).length,return_entry_count:o.filter(s=>s.number===4&&s.wire===2).length,control_return_entry_count:o.filter(s=>s.number===6&&s.wire===2).length}})}function hG(e){let t=vn(e,"VersionDef",1);return{producer:Ov(t.find(n=>n.number===1)),min_consumer:Ov(t.find(n=>n.number===2)),bad_consumers:t.filter(n=>n.number===3).map(Ov).filter(n=>n!=null)}}function vn(e,t,n){if(n>8)throw new Error(`${t} exceeds the bounded protobuf nesting depth.`);let i=[],o=0;for(;o<e.length;){if(i.length>=uT)throw new Error(`${t} exceeds ${uT} protobuf fields.`);let a=zv(e,o,t);o=a.next;let r=Number(a.value>>3n),s=Number(a.value&7n);if(!Number.isSafeInteger(r)||r<=0)throw new Error(`${t} contains an invalid protobuf field number.`);if(s===0){let c=zv(e,o,t);o=c.next,i.push({number:r,wire:s,value:c.value})}else if(s===1)ji(e,o,8,t),i.push({number:r,wire:s,bytes:e.subarray(o,o+8)}),o+=8;else if(s===2){let c=zv(e,o,t);o=c.next;let u=bl(c.value,`${t} length`);ji(e,o,u,t),i.push({number:r,wire:s,bytes:e.subarray(o,o+u)}),o+=u}else if(s===5)ji(e,o,4,t),i.push({number:r,wire:s,bytes:e.subarray(o,o+4)}),o+=4;else throw new Error(`${t} contains unsupported protobuf wire type ${s}.`)}return i}function gG(e,t,n,i){let o=[],a=new Set,r=0,s=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let c=0;c<t;c+=1){if(ji(e,r,46,"ZIP central record"),s.getUint32(r,!0)!==33639248)throw new Error("ZIP central-directory signature is invalid.");let u=s.getUint16(r+8,!0),l=s.getUint16(r+10,!0),_=s.getUint32(r+16,!0),p=s.getUint32(r+20,!0),d=s.getUint32(r+24,!0),m=s.getUint16(r+28,!0),f=s.getUint16(r+30,!0),g=s.getUint16(r+32,!0),h=s.getUint32(r+42,!0);ji(e,r+46,m+f+g,"ZIP central record payload");let b=IT(Jo(e.subarray(r+46,r+46+m),`ZIP entry ${c}`)),A=b.toLowerCase();if(a.has(A))throw new Error(`ZIP archive repeats or case-collides path ${b}.`);if(a.add(A),u&1)throw new Error(`Encrypted ZIP entry is not accepted: ${b}.`);o.push({path:b,flags:u,compressionMethod:l,crc32:_,compressedSize:p,uncompressedSize:d,localHeaderOffset:h,encrypted:!1}),r+=46+m+f+g}if(r!==i)throw new Error("ZIP central-directory size does not conserve parsed records.");return{entries:o,centralDirectoryOffset:n,centralDirectorySize:i}}function bG(e,t,n,i,o){if(e===65535||t===4294967295||n===4294967295)throw new Error("ZIP64 model archives are not supported by the bounded envelope parser.");if(e>_T)throw new Error(`ZIP archive exceeds ${_T} entries.`);if(t>dT)throw new Error(`ZIP central directory exceeds ${dT} bytes.`);if(n+t!==o||n+t>i)throw new Error("ZIP central-directory bounds do not terminate at the EOCD record.")}async function yG(e,t,n){let i=r=>e.entries.filter(s=>s.path.toLowerCase().endsWith(`/${r}`)||s.path.toLowerCase()===r);if(t==="pytorch_checkpoint"){let r=e.entries.filter(c=>/(^|\/)data\.pkl$|\.pkl$/i.test(c.path)),s=[];for(let c of r.slice(0,16))s.push({path:c.path,pickle:ET(await n(c))});return{status:"archive_and_pickle_opcode_inventory_assessed_payload_not_deserialized",pickle_members:s,storage_member_count:e.entries.filter(c=>/(^|\/)data\/\d+$/i.test(c.path)).length,native_binary_members:e.entries.filter(c=>/\.(so|dll|dylib|cubin|ptx)$/i.test(c.path)).map(c=>c.path)}}if(t==="pt2"){let r=i("archive_format"),s=i("archive_version");if(r.length>1||s.length>1)throw new Error("PT2 archive repeats its format or version marker.");let c=r[0]?Jo(await n(r[0]),r[0].path).trim():null,u=s[0]?Jo(await n(s[0]),s[0].path).trim():null,l=e.entries.filter(p=>/(^|\/)models\/[^/]+\.json$/i.test(p.path)||/(^|\/)data\/(weights|constants)\/[^/]+_config\.json$/i.test(p.path)||/(^|\/)extra\/module_info\.json$/i.test(p.path)),_=[];for(let p of l.slice(0,16))_.push({path:p.path,document:gT(await n(p),p.path)});return{status:c!=="pt2"?"archive_assessed_pt2_format_marker_missing_or_invalid":_.some(p=>/(^|\/)models\/[^/]+\.json$/i.test(p.path))?"pt2_archive_and_bounded_declarative_members_assessed":"pt2_archive_assessed_declarative_model_definition_not_found",archive_format:c,archive_version:u,declarative_documents:_,opaque_native_members:e.entries.filter(p=>/\.(so|dll|dylib|cubin|ptx)$/i.test(p.path)).map(p=>p.path),embedded_pickle_members:e.entries.filter(p=>/\.(pt|pth|pkl|pickle)$/i.test(p.path)).map(p=>p.path),declarative_member_limit:16,declarative_members_omitted:Math.max(0,l.length-16)}}let o=[...i("config.json"),...i("metadata.json")],a=[];for(let r of o.slice(0,8))a.push({path:r.path,document:gT(await n(r),r.path)});return{status:a.length?"keras_archive_and_declarative_config_assessed_objects_not_constructed":"keras_archive_assessed_config_not_found",declarative_documents:a,layer_inventory:OG(a.find(r=>/config\.json$/i.test(r.path))?.document)}}async function AG(e,t){xT(t);let n=new Uint8Array(await e.slice(t.localHeaderOffset,t.localHeaderOffset+30).arrayBuffer());ji(n,0,30,`ZIP local header ${t.path}`);let i=new DataView(n.buffer,n.byteOffset,n.byteLength);if(i.getUint32(0,!0)!==67324752)throw new Error(`ZIP local header signature is invalid for ${t.path}.`);let o=i.getUint16(6,!0),a=i.getUint16(8,!0),r=i.getUint16(26,!0),s=i.getUint16(28,!0);if(o&1||a!==t.compressionMethod)throw new Error(`ZIP local header conflicts with the central directory for ${t.path}.`);let c=new Uint8Array(await e.slice(t.localHeaderOffset+30,t.localHeaderOffset+30+r+s).arrayBuffer());if(IT(Jo(c.subarray(0,r),`ZIP local entry ${t.path}`))!==t.path)throw new Error(`ZIP local and central paths disagree for ${t.path}.`);let l=t.localHeaderOffset+30+r+s;if(l+t.compressedSize>e.size)throw new Error(`ZIP member ${t.path} exceeds the source byte range.`);let _=new Uint8Array(await e.slice(l,l+t.compressedSize).arrayBuffer());return vG(_,t)}function xT(e){if(e.uncompressedSize>Sv||e.compressedSize>Sv)throw new Error(`ZIP declarative member ${e.path} exceeds the ${Sv}-byte extraction limit.`);if(e.compressedSize>0&&e.uncompressedSize/e.compressedSize>pT)throw new Error(`ZIP declarative member ${e.path} exceeds the ${pT}:1 compression-ratio limit.`)}async function vG(e,t){xT(t);let n;if(t.compressionMethod===0)n=new Uint8Array(e);else if(t.compressionMethod===8){if(typeof DecompressionStream!="function")throw new Error(`Deflate decompression is unavailable for ${t.path}.`);n=new Uint8Array(await new Response(new Blob([e]).stream().pipeThrough(new DecompressionStream("deflate-raw"))).arrayBuffer())}else throw new Error(`ZIP member ${t.path} uses unsupported compression method ${t.compressionMethod}.`);if(n.length!==t.uncompressedSize)throw new Error(`ZIP member ${t.path} uncompressed size mismatch.`);if(BG(n)!==t.crc32)throw new Error(`ZIP member ${t.path} CRC-32 mismatch.`);return n}function wG(e){return{entry_count:e.entries.length,central_directory_offset:e.centralDirectoryOffset,central_directory_size:e.centralDirectorySize,total_claimed_uncompressed_bytes:e.entries.reduce((t,n)=>t+BigInt(n.uncompressedSize),0n).toString(),entries:e.entries.map(t=>({path:t.path,compression_method:t.compressionMethod,crc32:t.crc32.toString(16).padStart(8,"0"),compressed_bytes:t.compressedSize,uncompressed_bytes:t.uncompressedSize,local_header_offset:t.localHeaderOffset,encrypted:t.encrypted}))}}function ET(e){let t=[],n=new Map,i=0,o=0,a=!1;for(;o<e.length&&!a;){let r=e[o];if(n.set(`0x${r.toString(16).padStart(2,"0")}`,(n.get(`0x${r.toString(16).padStart(2,"0")}`)||0)+1),o+=1,r===99){let s=e.indexOf(10,o),c=s<0?-1:e.indexOf(10,s+1);if(s<0||c<0)throw new Error("Pickle GLOBAL opcode is truncated.");t.push({module:Jo(e.subarray(o,s),"pickle GLOBAL module"),name:Jo(e.subarray(s+1,c),"pickle GLOBAL name")}),o=c+1}else r===147?i+=1:r===46?a=!0:o=kG(e,o,r)}return{byte_length:e.length,sha256:Mo(e),literal_global_references:t.slice(0,1e4),literal_global_count:t.length,stack_global_count:i,opcode_histogram:Object.fromEntries([...n].sort(([r],[s])=>r.localeCompare(s))),stop_opcode_observed:a,parsed_byte_length:o,completeness:a?i?"partial_stack_global_targets_not_resolved":"literal_global_inventory_complete_for_opcode_stream":"partial_stop_opcode_not_reached"}}function xG(e,t){let n=(t.declarative_documents||[]).filter(l=>/(^|\/)models\/[^/]+\.json$/i.test(l.path)),i=n[0]?.document,o=i?.graph_module?.graph;if(!o||!Array.isArray(o.nodes)||!Array.isArray(o.inputs)||!Array.isArray(o.outputs)){e.pt2={schema:"deepbom.pt2_declarative_graph.v1",graph_materialized:!1,model_definition_count:n.length,status:n.length?"model_definition_present_graph_schema_not_materialized":"model_definition_not_present",interpretation_boundary:"No executable graph is claimed unless a bounded models/*.json document exposes the pinned ExportedProgram graph_module.graph fields."},e.format_extensions.pt2=e.pt2;return}if(o.nodes.length>1e6)throw new Error("PT2 declarative graph exceeds 1,000,000 nodes.");let a=Er(o.inputs.flatMap($s)),r=Er(o.outputs.flatMap($s)),s=o.nodes.map((l,_)=>{if(!l||typeof l!="object"||typeof l.target!="string"||!l.target)throw new Error(`PT2 graph node ${_} has no serialized target.`);return{index:_,name:l.target,graph_node_name:typeof l.name=="string"&&l.name?l.name:`node_${_}`,domain:"pytorch.export",version:null,input_names:Er((Array.isArray(l.inputs)?l.inputs:[]).flatMap(p=>$s(p?.arg))),output_names:Er((Array.isArray(l.outputs)?l.outputs:[]).flatMap($s)),macs:null,macs_status:"not_assessed_operator_semantics_and_shapes_not_executed"}}),c=Er([...a,...r,...s.flatMap(l=>[...l.input_names,...l.output_names]),...Object.keys(o.tensor_values||{})]),u=new Map(c.map((l,_)=>[l,_]));e.ops=s.map(({input_names:l,output_names:_,...p})=>({...p,inputs:l.map(d=>u.get(d)),outputs:_.map(d=>u.get(d))})),e.tensors=c.map((l,_)=>{let p=o.tensor_values?.[l],d=NG(p?.sizes);return{index:_,name:l,dtype:IG(p?.dtype),shape:d||[],shape_signature:d||[],value_kind:p?"tensor":"serialized_graph_argument",constant_buffer:!1,contract_status:p?d?"serialized_tensor_meta_static_shape":"serialized_tensor_meta_symbolic_or_unresolved_shape":"serialized_argument_name_only"}}),e.operator_count=e.ops.length,e.tensor_count=e.tensors.length,e.input_tensor_indices=a.map(l=>u.get(l)),e.output_tensor_indices=r.map(l=>u.get(l)),e.mac_assessment={status:"not_assessed",metric_scope:"serialized PT2 ExportedProgram JSON node ledger; no operator execution or framework object construction",compute_ops:e.ops.length,assessed_compute_ops:0,not_assessed_compute_ops:e.ops.length,total_assessed_macs:0,total_assessed_macs_decimal:"0"},e.pt2={schema:"deepbom.pt2_declarative_graph.v1",graph_materialized:!0,primary_model_definition_path:n[0].path,model_definition_count:n.length,additional_model_definitions:n.slice(1).map(l=>l.path),operation_count:e.ops.length,value_count:e.tensors.length,nested_graph_argument_count:Rv(i,"as_graph"),schema_version:i.schema_version||null,opset_version:i.opset_version||null,torch_version:i.torch_version||null,unsafe_deserialization_performed:!1,interpretation_boundary:"Operations and named value dependencies come only from the first bounded models/*.json ExportedProgram document. Additional model definitions and higher-order nested graph bodies are inventoried but not merged. Tensor payloads, .pt sample inputs, native binaries, kernels, runtime order, and execution behavior are not loaded or inferred."},e.format_extensions.pt2=e.pt2}function EG(e,t){let n=(t.declarative_documents||[]).find(f=>/(^|\/)config\.json$/i.test(f.path)),i=n?.document,o=i?.config?.layers,a=String(i?.class_name||"");if(!Array.isArray(o)||!["Sequential","Functional","Model"].includes(a)||o.length>1e6){e.keras={schema:"deepbom.keras_declarative_layer_graph.v1",graph_materialized:!1,status:Array.isArray(o)?"unsupported_or_unbounded_model_config":"model_layer_config_not_present",interpretation_boundary:"A Keras layer graph is materialized only for a bounded Sequential, Functional, or Model config.json. Keras objects and custom layer code are never constructed or imported."},e.format_extensions.keras=e.keras;return}let r=new Map,s=o.map((f,g)=>{let h=String(f?.config?.name||f?.name||`layer_${g}`);if(!h||r.has(h))throw new Error(`Keras config contains a missing or duplicate layer name ${JSON.stringify(h)}.`);return r.set(h,g),{layer:f,index:g,name:h,className:String(f?.class_name||"unknown")}}),c=s.map(f=>Er(Bv(f.layer?.inbound_nodes))).map(f=>f.filter(g=>r.has(g))),u=a==="Sequential",l=s.map(f=>`${f.name}:output:0`);e.tensors=s.map((f,g)=>{let h=CG(f.layer?.build_config?.input_shape??f.layer?.config?.batch_shape??f.layer?.config?.batch_input_shape);return{index:g,name:l[g],dtype:String(f.layer?.config?.dtype||"UNKNOWN").toUpperCase(),shape:h||[],shape_signature:h||[],value_kind:"keras_declared_layer_output",constant_buffer:!1,contract_status:h?"declared_config_shape":"serialized_layer_output_name_shape_not_assessable"}}),e.ops=s.map((f,g)=>{let h=c[g].length?c[g]:u&&g>0?[s[g-1].name]:[];return{index:g,name:f.className,graph_node_name:f.name,domain:"keras.config",version:null,inputs:h.map(b=>r.get(b)),outputs:[g],macs:null,macs_status:"not_assessed_layer_class_does_not_establish_lowered_operator_semantics"}});let _=Er(Dv(i?.config?.input_layers)),p=Er(Dv(i?.config?.output_layers)),d=_.map(f=>r.get(f)).filter(Number.isSafeInteger),m=p.map(f=>r.get(f)).filter(Number.isSafeInteger);e.operator_count=e.ops.length,e.tensor_count=e.tensors.length,e.input_tensor_indices=d.length?d:s.filter((f,g)=>f.className==="InputLayer"||!c[g].length&&(!u||g===0)).map(f=>f.index),e.output_tensor_indices=m.length?m:s.length?[s.at(-1).index]:[],e.mac_assessment={status:"not_assessed",metric_scope:"serialized Keras config layer graph; no layer construction, lowering, kernel selection, or execution",compute_ops:e.ops.length,assessed_compute_ops:0,not_assessed_compute_ops:e.ops.length,total_assessed_macs:0,total_assessed_macs_decimal:"0"},e.keras={schema:"deepbom.keras_declarative_layer_graph.v1",graph_materialized:!0,root_class_name:a,primary_config_path:n.path,layer_count:s.length,explicit_inbound_reference_count:c.reduce((f,g)=>f+g.length,0),sequential_order_used:u,unsafe_deserialization_performed:!1,custom_layer_execution_claim:!1,interpretation_boundary:"Layer identities and connections are projected only from serialized Keras config order or explicit keras_history references. Layer classes are not constructed, imported, lowered, or treated as equivalent to backend operators. Weights, concrete function traces, kernels, runtime order, performance, and model quality remain separate evidence."},e.format_extensions.keras=e.keras}function $s(e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.flatMap($s);let t=[e.as_tensor?.name,e.as_token?.name,e.as_sym_int?.as_name,e.as_sym_bool?.as_name,e.as_sym_float?.as_name].filter(i=>typeof i=="string"&&i),n=[e.as_tensors,e.as_optional_tensors,e.as_nested_tensors].flatMap(i=>Array.isArray(i)?i.flatMap($s):[]);return[...t,...n,...$s(e.as_optional_tensor)]}function Er(e){return[...new Set(e.filter(t=>typeof t=="string"&&t.length&&t.length<=1e5))]}function NG(e){if(!Array.isArray(e))return null;let t=[];for(let n of e){if(!Number.isSafeInteger(n?.as_int)||n.as_int<0)return null;t.push(n.as_int)}return t}function IG(e){return typeof e=="string"&&e?e.toUpperCase():Number.isSafeInteger(e)?`PT2_SCALAR_TYPE_${e}`:"UNKNOWN"}function Rv(e,t){return!e||typeof e!="object"?0:Array.isArray(e)?e.reduce((n,i)=>n+Rv(i,t),0):Object.entries(e).reduce((n,[i,o])=>n+(i===t?1:0)+Rv(o,t),0)}function Bv(e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.flatMap(Bv);let t=e.keras_history;return[...Array.isArray(t)&&typeof t[0]=="string"?[t[0]]:[],...Object.values(e).flatMap(Bv)]}function Dv(e){return Array.isArray(e)?e.flatMap(t=>Array.isArray(t)&&typeof t[0]=="string"?[t[0]]:Dv(t)):[]}function CG(e){if(!Array.isArray(e))return null;let t=[];for(let n of e)if(n==null)t.push(-1);else if(Number.isSafeInteger(n)&&n>=0)t.push(n);else return null;return t}function kG(e,t,n){if(new Set([40,41,48,49,50,78,81,82,93,97,98,100,101,108,111,115,116,117,125,129,133,134,135,136,137,143,144,145,146,147,148,151,152]).has(n))return t;if([74,114,132].includes(n))return Cd(e,t,4,"pickle opcode argument");if([75,104,113,130,128].includes(n))return Cd(e,t,1,"pickle opcode argument");if([77,131].includes(n))return Cd(e,t,2,"pickle opcode argument");if([71,149].includes(n))return Cd(e,t,8,"pickle opcode argument");if([70,73,76,80,83,86,103,112].includes(n))return Tv(e,t,"pickle line argument");if(n===105)return Tv(e,Tv(e,t,"pickle INST module"),"pickle INST name");if([84,88,66].includes(n))return Jf(e,t,4,"pickle 32-bit byte string");if([85,67,140,138].includes(n))return Jf(e,t,1,"pickle 8-bit byte string");if([141,142,150].includes(n))return Jf(e,t,8,"pickle 64-bit byte string");if(n===139)return Jf(e,t,4,"pickle LONG4");throw new Error(`Unsupported pickle opcode 0x${n.toString(16).padStart(2,"0")} at byte ${t-1}.`)}function Tv(e,t,n){let i=e.indexOf(10,t);if(i<0)throw new Error(`${n} is truncated.`);return i+1}function Jf(e,t,n,i){ji(e,t,n,i);let o=0n;for(let r=0;r<n;r+=1)o|=BigInt(e[t+r])<<BigInt(r*8);let a=bl(o,`${i} length`);return Cd(e,t+n,a,i)}function Cd(e,t,n,i){return ji(e,t,n,i),t+n}function Pv(e,t,n,i){return{format:t,filename:e,file_size:null,file_size_bytes:null,ops:[],tensors:[],operator_count:0,tensor_count:0,input_tensor_indices:[],output_tensor_indices:[],total_macs:null,total_macs_decimal:null,mac_confidence:"not_applicable",mac_assessment:{status:"not_applicable_no_executable_graph_materialized",compute_ops:0,assessed_compute_ops:0,not_assessed_compute_ops:0,total_assessed_macs:0,total_assessed_macs_decimal:"0"},safe_source_artifact:n,artifact_role:i,format_extensions:{[t]:n},findings:[],recommendations:[]}}function SG(e,t,n){ji(e,t,4,"HDF5 superblock v2/v3");let i=e[t+1],o=e[t+2],a=e[t+3];kT(i,o);let r=t+4,s=Ta(e,r,i);r+=i;let c=Ta(e,r,i);r+=i;let u=Ta(e,r,i);r+=i;let l=Ta(e,r,i);return r+=i,ji(e,r,4,"HDF5 superblock checksum"),{superblock_version:n,offset_size:i,length_size:o,file_consistency_flags:a,base_address:s,superblock_extension_address:c,end_of_file_address:u,root_object_header_address:l,checksum_status:"present_not_validated"}}function TG(e,t,n){ji(e,t,20,"HDF5 superblock v0/v1");let i=e[t+5],o=e[t+6];kT(i,o);let a=t+16+(n===1?4:0),r=Ta(e,a,i);a+=i;let s=Ta(e,a,i);a+=i;let c=Ta(e,a,i);a+=i;let u=Ta(e,a,i);a+=i,ji(e,a,i*2,"HDF5 root group symbol table entry");let l=Ta(e,a+i,i);return{superblock_version:n,offset_size:i,length_size:o,base_address:r,free_space_address:s,end_of_file_address:c,driver_info_address:u,root_object_header_address:l,checksum_status:"not_present_in_superblock_version"}}function NT(e){let t=[137,72,68,70,13,10,26,10];for(let n=0;n+8<=e.length;n=n===0?512:n*2){if(t.every((i,o)=>e[n+o]===i))return n;if(n>1024*1024*1024)break}return-1}function zG(e){let t=String(e).toLowerCase();return[{id:"generic_hdf5",applicability:"applicable",status:"superblock_only"},{id:"keras_weights_h5",applicability:/weights.*\.h(?:df)?5$/.test(t)?"candidate_from_filename":"unknown",status:"not_assessed_without_object_graph"},{id:"legacy_keras_model_h5",applicability:/\.h(?:df)?5$/.test(t)?"possible":"unknown",status:"not_assessed_without_root_attributes"}]}function OG(e){let t=e?.config?.layers;return Array.isArray(t)?{status:"declared_config_inventory",layers:t.slice(0,1e5).map((n,i)=>({index:i,name:String(n?.config?.name||n?.name||`layer_${i}`),class_name:String(n?.class_name||"unknown")})),execution_order_claim:!1}:{status:"not_materialized",layers:[]}}function gT(e,t){try{return JSON.parse(Jo(e,t))}catch(n){throw new Error(`${t} is not valid JSON: ${n?.message||n}`)}}function RG(e){let t=Math.max(0,e.length-65557),n=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let i=e.length-22;i>=t;i-=1)if(e[i]===80&&e[i+1]===75&&e[i+2]===5&&e[i+3]===6){let o=n.getUint16(i+20,!0);if(i+22+o!==e.length)continue;if(n.getUint16(i+4,!0)!==0||n.getUint16(i+6,!0)!==0||n.getUint16(i+8,!0)!==n.getUint16(i+10,!0))throw new Error("Multi-disk ZIP archives are not supported.");return i}throw new Error("ZIP end-of-central-directory record was not found.")}function IT(e){let t=String(e).replaceAll("\\","/");if(!t||t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.includes("\0")||t.split("/").some(n=>!n||n==="."||n===".."))throw new Error(`Unsafe ZIP member path ${JSON.stringify(e)}.`);return t}function kd(e,t,n){let i=e.find(a=>a.number===t&&a.wire===2);if(!i)throw new Error(`${n} is missing.`);let o=Jo(i.bytes,n);if(!o||o.length>1e5)throw new Error(`${n} is invalid.`);return o}function nh(e,t){let n=e.find(i=>i.number===t&&i.wire===2);return n?Jo(n.bytes,`field ${t}`):null}function zv(e,t,n){let i=0n;for(let o=0n;o<=63n;o+=7n){if(t>=e.length)throw new Error(`${n} contains a truncated varint.`);let a=e[t++];if(i|=BigInt(a&127)<<o,!(a&128))return{value:i,next:t}}throw new Error(`${n} contains an overlong varint.`)}function Ov(e){return e?.wire===0?bl(e.value,"protobuf integer"):null}function bl(e,t){if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(`${t} exceeds the safe integer range.`);return Number(e)}function Jo(e,t){try{return aG.decode(e)}catch{throw new Error(`${t} is not valid UTF-8.`)}}function ih(e,t,n){if(!(e instanceof Uint8Array))throw new Error(`${n} requires Uint8Array bytes.`);if(e.length>t)throw new Error(`${n} exceeds the ${t}-byte parser limit.`)}function CT(e,t){if(!e||typeof e.slice!="function"||!Number.isSafeInteger(Number(e.size))||Number(e.size)<0)throw new Error(`${t} requires a bounded Blob-compatible file.`)}function ji(e,t,n,i){if(!Number.isSafeInteger(t)||!Number.isSafeInteger(n)||t<0||n<0||t+n>e.length)throw new Error(`${i} exceeds the source byte range.`)}function kT(e,t){if(![2,4,8,16,32].includes(e)||![2,4,8,16,32].includes(t))throw new Error(`Unsupported HDF5 address sizes offset=${e}, length=${t}.`)}function Ta(e,t,n){ji(e,t,n,"HDF5 integer");let i=0n;for(let a=0;a<n;a+=1)i|=BigInt(e[t+a])<<BigInt(a*8);let o=(1n<<BigInt(n*8))-1n;return i===o?null:i.toString()}function BG(e){let t=4294967295;for(let n of e){t^=n;for(let i=0;i<8;i+=1)t=t>>>1^(t&1?3988292384:0)}return(t^4294967295)>>>0}var qv="custom:",ST=Object.freeze(["MEASURED","VENDOR_DECLARED","USER_DECLARED"]);var DG=Object.freeze([{key:"core_count_min",label:"System core count (minimum variant)",unit:"cores",kind:"integer",min:1,max:1024,group:"compute",hint:"Use the same minimum and maximum for one exact device. A product family range produces only its documented endpoint variants."},{key:"core_count_max",label:"System core count (maximum variant)",unit:"cores",kind:"integer",min:1,max:1024,group:"compute",hint:"Must not be below the minimum. Static isolation scenarios are suppressed until both endpoints are bound."},{key:"performance_reference_core_count",label:"Peak-throughput reference",unit:"cores",kind:"integer",min:1,max:1024,group:"compute",hint:"Exact number of homogeneous cores represented by Peak throughput. This denominator is required before per-core scaling is calculated."},{key:"effective_peak_gops",label:"Peak throughput",unit:"GOPS",kind:"number",min:.1,max:1e6,group:"compute",hint:"Theoretical peak. The bound divides by this times the utilization."},{key:"compute_utilization_factor",label:"Compute utilization",unit:"fraction",kind:"number",min:.01,max:1,group:"compute",hint:"Fraction of peak a kernel actually reaches. 1.0 makes the estimate a best-case bound, not a latency."},{key:"effective_memory_bandwidth_gbps",label:"Memory bandwidth",unit:"GB/s",kind:"number",min:.25,max:1e4,group:"memory"},{key:"weight_packing_bandwidth_gbps",label:"Weight packing bandwidth",unit:"GB/s",kind:"number",min:.1,max:1e4,group:"memory"},{key:"l1_data_bytes",label:"L1 data cache",unit:"bytes",kind:"integer",min:1024,max:1<<24,group:"memory"},{key:"l2_bytes",label:"L2 cache",unit:"bytes",kind:"integer",min:4096,max:1<<30,group:"memory"},{key:"int8_speedup_estimate",label:"INT8 speedup",unit:"x",kind:"number",min:.1,max:64,group:"compute"},{key:"fp32_compute_factor",label:"FP32 compute factor",unit:"x",kind:"number",min:.1,max:64,group:"compute"},{key:"simd_width_bits",label:"SIMD width",unit:"bits",kind:"integer",min:32,max:2048,group:"isa"},{key:"fp32_lanes",label:"FP32 lanes",unit:"",kind:"integer",min:1,max:256,group:"isa"},{key:"fp16_lanes",label:"FP16 lanes",unit:"",kind:"integer",min:1,max:512,group:"isa"},{key:"int8_lanes",label:"INT8 lanes",unit:"",kind:"integer",min:1,max:1024,group:"isa"},{key:"channel_alignment_multiple",label:"Channel alignment",unit:"",kind:"integer",min:1,max:256,group:"isa"},{key:"in_order",label:"In-order core",unit:"",kind:"boolean",group:"isa"},{key:"dot_product",label:"Dot-product instructions",unit:"",kind:"boolean",group:"isa"},{key:"sve2",label:"SVE2",unit:"",kind:"boolean",group:"isa"},{key:"chain_break_overhead_us_low",label:"Predicted partition-break overhead (low)",unit:"us",kind:"number",min:0,max:1e5,group:"delegate"},{key:"chain_break_overhead_us_high",label:"Predicted partition-break overhead (high)",unit:"us",kind:"number",min:0,max:1e5,group:"delegate"},{key:"xnnpack_kernel_family",label:"XNNPACK kernel family",unit:"",kind:"text",maxLength:64,group:"delegate"},{key:"architecture",label:"Architecture",unit:"",kind:"text",maxLength:128,group:"identity"},{key:"l2_capacity_scope",label:"L2 capacity scope",unit:"",kind:"text",maxLength:128,group:"identity"},{key:"cache_assumption",label:"Cache assumption",unit:"",kind:"text",maxLength:1024,group:"identity"},{key:"cache_source_url",label:"Cache source URL",unit:"",kind:"text",maxLength:512,group:"identity"}]),MG=new Map(DG.map(e=>[e.key,e]));function $G(e){return String(e||"").startsWith(qv)}function TT(e,t=null){if(!e||typeof e!="object")throw new Error("Custom target must be an object");let n=String(e.base||"").trim();if(!n||n.startsWith("{"))throw new Error("Custom target requires a built-in base profile");let i=String(e.id||"").trim();if(!$G(i)||i.length<=qv.length)throw new Error(`Custom target id must start with '${qv}'`);if(i.length>128||![...i].every(d=>{let m=d.codePointAt(0);return m>=32&&m<=126}))throw new Error("Custom target id must be at most 128 printable ASCII characters");let o=String(e.label||"").trim();if(!o||o.length>128)throw new Error("Custom target requires a label of 1-128 characters");let a=String(e.evidence_class||"USER_DECLARED");if(!ST.includes(a))throw new Error(`Evidence class must be one of: ${ST.join(", ")}`);let r=String(e.evidence_note||"").trim();if(r.length>1024)throw new Error("Evidence note exceeds 1024 characters");if(a==="MEASURED"&&!r)throw new Error("A MEASURED custom target requires a note naming the measurement");let s={};for(let[d,m]of Object.entries(e.overrides||{})){if(d==="compute_utilization_by_kernel_class"){s[d]=PG(m);continue}let f=MG.get(d);if(!f)throw new Error(`'${d}' is not a tunable field`);s[d]=LG(f,m)}let c=s.chain_break_overhead_us_low??t?.chain_break_overhead_us_low,u=s.chain_break_overhead_us_high??t?.chain_break_overhead_us_high;if(Number.isFinite(Number(c))&&Number.isFinite(Number(u))&&Number(u)<Number(c))throw new Error("Predicted partition-break overhead high must not be below low");let l=s.core_count_min??t?.core_count_min,_=s.core_count_max??t?.core_count_max;if(Number.isInteger(Number(l))&&Number.isInteger(Number(_))&&Number(_)<Number(l))throw new Error("System core-count maximum must not be below the minimum");let p=s.performance_reference_core_count??t?.performance_reference_core_count;if(Number(p)>0&&Number(l)>0&&Number(_)>0&&![Number(l),Number(_)].includes(Number(p)))throw new Error("Peak-throughput reference cores must match one declared system core-count variant");return{base:n,id:i,label:o,evidence_class:a,evidence_note:r,overrides:s}}function LG(e,t){if(e.kind==="boolean"){if(typeof t!="boolean")throw new Error(`${e.label} must be true or false`);return t}if(e.kind==="text"){let i=String(t??"");if(i.length>e.maxLength)throw new Error(`${e.label} exceeds ${e.maxLength} characters`);return i}let n=Number(t);if(!Number.isFinite(n))throw new Error(`${e.label} must be a number`);if(e.kind==="integer"&&!Number.isInteger(n))throw new Error(`${e.label} must be a whole number`);if(n<e.min||n>e.max)throw new Error(`${e.label} must be between ${e.min} and ${e.max}`);return n}function PG(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Per-kernel utilization must be an object of family to fraction");let t=Object.entries(e);if(t.length>64)throw new Error("At most 64 kernel families can be tuned");let n={};for(let[i,o]of t){if(!/^[a-z0-9_]{1,64}$/.test(i))throw new Error(`Kernel family '${i}' must be lower_snake_case of at most 64 characters`);let a=Number(o);if(!Number.isFinite(a)||a<.01||a>1)throw new Error(`Utilization for '${i}' must be between 0.01 and 1`);n[i]=a}return n}Me();Ce();var BT="deepbom.interface_quantization_contracts.v1.3",qG="SHA-256 over UTF-8 RFC8785-JCS canonical JSON",jG="RFC8785-JCS",FG=/^[a-f0-9]{64}$/,yl="cdx:ai-ml:model:parameter:quantization:";function vl(e){return K(Q(e))}function rh(e){return K(JSON.stringify(e))}function Kv({status:e,scheme:t,granularity:n,scales:i,zeroPoints:o,axis:a,blockSize:r=null,parameterization:s=null}){let c=zT(a),u=zT(r);return{status:String(e||"invalid_or_incomplete"),scheme:String(t||"none"),granularity:String(n||"invalid_or_incomplete"),parameterization:String(s||n||"invalid_or_incomplete"),scales:KG(i),zero_points:ZG(o),axis:c,block_size:u!=null&&u>0?u:null}}function zT(e){if(e==null||e==="")return null;let t=Number(e);return Number.isSafeInteger(t)?t:null}function oh(e){let t=e?.quantization||{};return{direction:Xv(e?.direction),ordinal:Wv(e?.ordinal),tensor_name:String(e?.tensor_name??e?.name??""),dtype:String(e?.dtype||"UNKNOWN").toUpperCase(),shape:Sd(e?.shape),shape_signature:Array.isArray(e?.shape_signature)?Sd(e.shape_signature):null,quantization:Kv({status:t.status,scheme:t.scheme,granularity:t.granularity,parameterization:t.parameterization,scales:t.scales,zeroPoints:t.zero_points,axis:t.axis,blockSize:t.block_size})}}function zd(e,t=null,n={}){return{algorithm:"SHA-256",canonicalization:jG,method:qG,sha256:e,payload_contract:{selection:n.selection||"included_json_pointers_only",included_json_pointers:[...n.includedJsonPointers||[]],excluded_json_pointers:[...n.excludedJsonPointers||[]],interpretation:n.interpretation||"Resolve the listed JSON Pointers relative to the containing contract object, construct the declared payload, canonicalize it with RFC8785-JCS, encode as UTF-8, and hash with SHA-256."},...t?{legacy_v1_1:{method:"SHA-256 over UTF-8 JSON.stringify payload bytes",sha256:t,ordered_payload_fields:[...n.legacyOrderedPayloadFields||[]]}}:{}}}function Zv(e,t,n=""){let i=QG(t),o=Array.isArray(e?.parameters)?e.parameters:[],a=Td(n||e?.subject?.sha256);if(!i.provided)return jv("unbound",o,i,[],a);if(!i.valid)return jv("invalid_declaration",o,i,i.errors.map(f=>({parameter_id:null,field:"declaration",expected:"valid production interface contract",declared:f,evidence_pointer:"/production_interface_contract"})),a);let r=i.contract,s=[],c=Td(r.artifact_sha256);a&&c&&a!==c&&s.push(Al(null,"artifact_sha256",a,c,"/artifact_sha256"));let u=new Map(o.map(f=>[Vv(f.direction,f.ordinal),f])),l=new Map(r.parameters.map(f=>[Vv(f.direction,f.ordinal),f]));for(let[f,g]of u){let h=l.get(f);if(!h){s.push(Al(g.parameter_id,"parameter","present","missing",`/parameters/${Hv(f)}`));continue}UG(g,h,s,f)}for(let[f,g]of l)u.has(f)||s.push(Al(g.parameter_id||f,"parameter","absent","extra",`/parameters/${Hv(f)}`));let _=i.source_kind==="artifact_derived_baseline",p=_?"bound_exact_artifact_baseline":"bound_exact_contract",d=!!(a&&!c),m=!_&&!Td(r.implementation_sha256);return d&&m?p="partial_artifact_and_implementation_hash_missing":d?p="partial_artifact_hash_missing":m&&(p="partial_implementation_hash_missing"),s.some(f=>f.field==="artifact_sha256")?p="contradiction_artifact_hash_mismatch":s.length&&(p="contradiction_interface_contract_mismatch"),jv(p,o,i,s,a)}function QG(e){if(e==null||e==="")return{provided:!1,valid:!0,contract:null,errors:[],source_kind:"none"};let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{provided:!0,valid:!1,contract:null,errors:["Input is not valid JSON."],source_kind:"json"}}if(!t||typeof t!="object"||Array.isArray(t))return{provided:!0,valid:!1,contract:null,errors:["Contract root must be a JSON object."],source_kind:"unknown"};let n=t.bomFormat==="CycloneDX"||t.specFormat==="CycloneDX"?VG(t):null,i=n||t.production_interface_contract||t.interface_contract_ledger||t,o=Array.isArray(i?.parameters)?i.parameters:Array.isArray(i?.inputs)||Array.isArray(i?.outputs)?[...(i.inputs||[]).map((_,p)=>({..._,direction:"input",ordinal:p})),...(i.outputs||[]).map((_,p)=>({..._,direction:"output",ordinal:p}))]:null,a=[...n?.extraction_errors||[]];o||a.push("A parameters array, or inputs/outputs arrays, is required.");let r=[],s=new Set;for(let[_,p]of(o||[]).entries()){let d=GG(p,_);if(!d.valid){a.push(...d.errors.map(f=>`parameters[${_}]: ${f}`));continue}let m=Vv(d.value.direction,d.value.ordinal);s.has(m)&&a.push(`Duplicate parameter identity ${m}.`),s.add(m),r.push(d.value)}let c=i?.artifact_sha256||i?.subject?.sha256||n?.artifact_sha256,u=i?.implementation_sha256||i?.encoder_decoder_sha256,l={schema:String(i?.schema||"deepbom.production_interface_contract.v1"),artifact_sha256:Gv(c,"artifact_sha256",a),implementation_sha256:Gv(u,"implementation_sha256",a),parameters:r};return{provided:!0,valid:a.length===0,contract:l,errors:a,source_kind:n?"cyclonedx_2_draft":t.schema==="deepbom.artifact_derived_interface_baseline.v1"?"artifact_derived_baseline":"deepbom_json"}}function jv(e,t,n,i,o){let a=e.startsWith("contradiction")||e==="invalid_declaration";return{schema:"deepbom.interface_contract_comparison.v1",status:e,evidence_class:a?"DERIVED_FROM_ARTIFACT_AND_DECLARATION":e==="bound_exact_contract"?"DECLARED_RELEASE_BINDING":e==="bound_exact_artifact_baseline"?"DERIVED_FROM_ARTIFACT_BASELINES":"NOT_ASSESSED",expected_artifact_sha256:o||null,declared_artifact_sha256:n.contract?.artifact_sha256||null,implementation_sha256:n.contract?.implementation_sha256||null,expected_parameter_count:t.length,declared_parameter_count:n.contract?.parameters?.length||0,mismatch_count:i.length,mismatches:i,declaration_validation:{source_kind:n.source_kind,valid:n.valid,errors:n.errors},gate_result:a?"block":["bound_exact_contract","bound_exact_artifact_baseline"].includes(e)?"pass":"pending",interpretation_boundary:"A mismatch is an observed deployment-configuration integrity contradiction. An absent declaration is unbound evidence, not a vulnerability or proof of incorrect inference."}}function UG(e,t,n,i){let o=oh(e),a=`/parameters/${Hv(i)}`,r=Td(t.interface_contract_sha256);if(!t.has_structured_contract){r!==e.interface_contract_sha256&&n.push(Al(e.parameter_id,"interface_contract_sha256",e.interface_contract_sha256,r||null,`${a}/interface_contract_sha256`));return}let s=oh(t),c=[["direction",o.direction,s.direction],["ordinal",o.ordinal,s.ordinal],["tensor_name",o.tensor_name,s.tensor_name],["dtype",o.dtype,s.dtype],["shape",o.shape,s.shape],["shape_signature",o.shape_signature,s.shape_signature],["quantization.status",o.quantization.status,s.quantization.status],["quantization.scheme",o.quantization.scheme,s.quantization.scheme],["quantization.granularity",o.quantization.granularity,s.quantization.granularity],["quantization.parameterization",o.quantization.parameterization,s.quantization.parameterization],["quantization.scales",o.quantization.scales,s.quantization.scales],["quantization.zero_points",o.quantization.zero_points,s.quantization.zero_points],["quantization.axis",o.quantization.axis,s.quantization.axis],["quantization.block_size",o.quantization.block_size,s.quantization.block_size]];for(let[l,_,p]of c)Q(_)!==Q(p)&&n.push(Al(e.parameter_id,l,_,p,`${a}/${l.replaceAll(".","/")}`));let u=vl(s);r&&r!==u&&n.push(Al(e.parameter_id,"declared_hash_integrity",u,r,`${a}/interface_contract_sha256`))}function GG(e,t){if(!e||typeof e!="object"||Array.isArray(e))return{valid:!1,errors:["Parameter must be an object."]};let n=Xv(e.direction),i=Wv(e.ordinal??t),o=[];n||o.push("direction must be input or output."),i==null&&o.push("ordinal must be a non-negative integer.");let a=e.quantization&&typeof e.quantization=="object"?e.quantization:{},r=["tensor_name","name","dtype","shape","quantization"].some(b=>Object.hasOwn(e,b)),s=Fv(a.granularity||e.granularity||e.quantization_parameterization),c=Qv(a.scales??e.scales,"quantization.scales",o,{positive:!0}),u=Qv(a.zero_points??e.zero_points,"quantization.zero_points",o,{integer:!0}),l=Uv(e.shape,"shape",o,{required:r,nonNegative:!0}),_=e.shape_signature==null?null:Uv(e.shape_signature,"shape_signature",o),p=Gv(e.interface_contract_sha256,"interface_contract_sha256",o),d=ah(a.axis??e.axis??e.quantized_dimension,"quantization.axis",o),m=ah(a.block_size??e.block_size,"quantization.block_size",o,{positive:!0}),f=s==="not_quantized"||!c.length&&!u.length,g=String(a.status||e.status||(f?"not_quantized":"complete")),h=MT(a.scheme||e.scheme,f);return{valid:o.length===0,errors:o,value:{parameter_id:String(e.parameter_id||`${n}:${i}`),direction:n,ordinal:i,tensor_name:String(e.tensor_name??e.name??""),dtype:String(e.dtype||e.data_type||"UNKNOWN").toUpperCase(),shape:l,shape_signature:_,quantization:{status:g,scheme:h,granularity:s,parameterization:Fv(a.parameterization||e.parameterization||s),scales:c,zero_points:u,axis:d,block_size:m},interface_contract_sha256:p||"",has_structured_contract:r}}}function VG(e){let t=[],n=e.metadata?.component||(e.components||[]).find(u=>u?.type==="machine-learning-model"),i=n?.modelCard?.modelParameters;i||t.push("CycloneDX modelCard.modelParameters is required.");let o=i?.inputs,a=i?.outputs;o!=null&&!Array.isArray(o)&&t.push("CycloneDX modelParameters.inputs must be an array."),a!=null&&!Array.isArray(a)&&t.push("CycloneDX modelParameters.outputs must be an array.");let r=[...(Array.isArray(o)?o:[]).map((u,l)=>OT(u,"input",l,t)),...(Array.isArray(a)?a:[]).map((u,l)=>OT(u,"output",l,t))],s=(n?.hashes||[]).find(u=>String(u?.alg).toUpperCase().replace("-","")==="SHA256")?.content,c=DT(n?.properties,t,"CycloneDX component.properties");return{schema:"deepbom.production_interface_contract.from_cyclonedx_2_draft",artifact_sha256:s,implementation_sha256:c.get("deepbom:production:interfaceImplementationSha256")||null,parameters:r,extraction_errors:t}}function OT(e,t,n,i){let o=`CycloneDX ${t}[${n}].properties`,a=DT(e?.properties,i,o),r=a.get(`${yl}scheme`),s=a.get(`${yl}granularity`),c=RT(a.get(`${yl}scale`),i,`${o}.scale`,{positive:!0}),u=RT(a.get(`${yl}zeroPoint`),i,`${o}.zeroPoint`,{integer:!0}),l=ah(a.get(`${yl}_undefined:blockSize`)||a.get("deepbom:quantization:blockSize"),`${o}.blockSize`,i,{positive:!0}),_=!r&&!s&&!c.length&&!u.length,p=l?"blocked":Fv(s||(_?"not_quantized":c.length>1?"per_axis":"per_tensor"));return{direction:t,ordinal:n,name:e?.name||"",dtype:e?.format?.dataType||"UNKNOWN",shape:e?.shape||[],shape_signature:HG(a.get("deepbom:parameter:shapeSignature"),null,i,`${o}.shapeSignature`),quantization:{status:_?"not_quantized":"complete",scheme:MT(r,_),granularity:p,parameterization:p,scales:c,zero_points:u,axis:ah(a.get(`${yl}axis`),`${o}.axis`,i),block_size:l},interface_contract_sha256:a.get("deepbom:parameter:interfaceContractSha256")||""}}function DT(e,t=[],n="properties"){if(e!=null&&!Array.isArray(e))return t.push(`${n} must be an array.`),new Map;let i=new Map;for(let[o,a]of(e||[]).entries()){let r=String(a?.name||"");(!r||typeof a?.value!="string")&&t.push(`${n}[${o}] must contain a non-empty name and string value.`),i.has(r)&&t.push(`${n} repeats property ${r}.`),i.set(r,String(a?.value??""))}return i}function Xv(e){let t=String(e||"").toLowerCase();return t==="input"||t==="output"?t:""}function Fv(e){let t=String(e||"invalid_or_incomplete").toLowerCase().replaceAll("-","_");return new Set(["per_tensor","per_axis","blocked","not_quantized","invalid_or_incomplete"]).has(t)?t:"invalid_or_incomplete"}function MT(e,t){if(t)return"none";let n=String(e||"affine");return n==="affine_symmetric"||n==="affine_asymmetric"||n.startsWith("_undefined:")?"affine":n}function RT(e,t,n,i={}){if(e==null||e==="")return[];try{let o=JSON.parse(String(e));return Qv(Array.isArray(o)?o:[o],n,t,i)}catch{return t.push(`${n} must be a JSON number or array of numbers.`),[]}}function HG(e,t,n,i){if(e==null||e==="")return t==null?null:Sd(t);try{let o=JSON.parse(String(e));return o===null?null:Array.isArray(o)?Uv(o,i,n):(n.push(`${i} must be a JSON array.`),t==null?null:Sd(t))}catch{return n.push(`${i} must be a JSON array.`),t==null?null:Sd(t)}}function KG(e){return(Array.isArray(e)?e:[]).map(Number).filter(Number.isFinite)}function Qv(e,t,n,{integer:i=!1,positive:o=!1}={}){if(e==null)return[];if(!Array.isArray(e))return n.push(`${t} must be an array.`),[];let a=[];for(let[r,s]of e.entries())typeof s!="number"||!Number.isFinite(s)||i&&!Number.isSafeInteger(s)||o&&!(s>0)?n.push(`${t}[${r}] must be a ${o?"finite positive ":"finite "}${i?"integer":"number"}.`):a.push(s);return a}function Uv(e,t,n,{required:i=!1,nonNegative:o=!1}={}){return e==null?(i&&n.push(`${t} must be an array.`),[]):Array.isArray(e)?e.map((a,r)=>a==null?null:typeof a!="number"||!Number.isSafeInteger(a)||o&&a<0?(n.push(`${t}[${r}] must be ${o?"a non-negative integer or null":"an integer or null"}.`),null):a):(n.push(`${t} must be an array.`),[])}function ZG(e){return(Array.isArray(e)?e:[]).map(Number).filter(Number.isSafeInteger)}function Sd(e){return(Array.isArray(e)?e:[]).map(t=>t==null?null:Number(t))}function Wv(e){let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:null}function Td(e){let t=String(e||"").trim().toLowerCase();return FG.test(t)?t:""}function Gv(e,t,n){if(e==null||e==="")return null;let i=Td(e);return i||n.push(`${t} must be exactly 64 lowercase or uppercase hexadecimal characters.`),i||null}function ah(e,t,n,{positive:i=!1}={}){if(e==null||e==="")return null;let o=typeof e=="number"?e:Number(e);return!Number.isSafeInteger(o)||i&&o<=0?(n.push(`${t} must be ${i?"a positive":"an"} integer.`),null):o}function Vv(e,t){return`${Xv(e)}:${Wv(t)}`}function Al(e,t,n,i,o){return{parameter_id:e,field:t,expected:n,declared:i,evidence_pointer:o}}function Hv(e){return String(e).replaceAll("~","~0").replaceAll("/","~1")}var GT=new Set(["CONV_2D","DEPTHWISE_CONV_2D","FULLY_CONNECTED"]),$T=1e-5,LT=1e-6,PT=1e6,XG=[{id:"normalized_0_1",label:"[0,1] normalized",range:[0,1]},{id:"normalized_minus1_1",label:"[-1,1] normalized",range:[-1,1]},{id:"pixel_0_255",label:"[0,255] pixel domain",range:[0,255]},{id:"signed_code_identity",label:"[-128,127] signed-code identity",range:[-128,127],dtype:"INT8"}];function VT(e){let t=[],n=0;for(let o of e?.ops||[]){if(!GT.has(XT(o)))continue;let a=sh(e,o.inputs?.[0]),r=sh(e,o.inputs?.[1]),s=sh(e,o.inputs?.[2]),c=iV(a),u=UT(r),l=UT(s);if(!(c>0)||!u.length||!l.length)continue;let _=Math.max(u.length,l.length),p=0,d=null,m=[];for(let f=0;f<_;f+=1){let g=u[Math.min(f,u.length-1)],h=l[Math.min(f,l.length-1)],b=c*g;if(!(b>0)||!(h>0))continue;n+=1,m.push(h/g);let A=Math.abs(h-b)/b;(!d||A>p)&&(p=A,d={channel:f,actual:h,expected:b,relative_error:A})}t.push({op_index:o.index,op_name:o.name,input_tensor_index:wl(a),weight_tensor_index:wl(r),bias_tensor_index:wl(s),checked_channels:_,declared_input_scale:c,derived_input_scale_min:Math.min(...m),derived_input_scale_max:Math.max(...m),maximum_relative_error:p,status:p>$T?"fail":"pass",worst_channel:d,formula:"bias_scale[channel] == input_scale * weight_scale[channel]",evidence_json_pointer:`/evidence/static_analysis/ops/${o.index}`})}let i=t.filter(o=>o.status==="fail");return{status:t.length?i.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",checked_groups:t.length,checked_channels:n,mismatch_groups:i.length,maximum_relative_error:oV(t.map(o=>o.maximum_relative_error)),relative_tolerance:$T,method:"bias_scale[channel] == input_scale * weight_scale[channel]",details:t}}function HT(e){let t=new Map;for(let r of e?.ops||[]){if(!GT.has(XT(r)))continue;let s=sh(e,r.inputs?.[1]),c=wl(s);c==null||t.has(c)||t.set(c,{tensor:s,consumers:[]})}for(let r of e?.ops||[]){let s=Number(r.inputs?.[1]);t.has(s)&&t.get(s).consumers.push(r)}let n=[],i=0,o=0;for(let[r,{tensor:s,consumers:c}]of t){let u=String(s?.dtype||"").toUpperCase(),l=(s?.scale_sample||[]).map((h,b)=>({channel:b,scale:Number(h)})).filter(h=>h.scale>0&&Number.isFinite(h.scale));if(!["INT8","UINT8"].includes(u)||l.length<2)continue;let[_,p]=u==="INT8"?[-127,127]:[0,255],d=(s?.zero_point_sample||[]).map(Number),m=Math.max(...l.map(h=>h.scale)),f=Math.min(...l.map(h=>h.scale)),g=[];i+=l.length;for(let{channel:h,scale:b}of l){let A=Number.isFinite(d[h])?d[h]:Number.isFinite(d[0])?d[0]:0,y=Math.max(Math.abs(_-A),Math.abs(p-A)),x=b*y,v=m/b;x<=LT&&v>=PT&&g.push({channel:h,scale:b,zero_point:A,maximum_code_distance:y,maximum_representable_abs:x,maximum_to_channel_scale_ratio:v})}o+=g.length,n.push({tensor_index:r,tensor_name:s?.name||`T${r}`,dtype:u,quantized_dimension:Number(s?.quantized_dimension||0),declared_scale_count:Number(s?.quant_scales||s?.scale_sample?.length||0),assessed_channel_count:l.length,flagged_channel_count:g.length,minimum_scale:f,maximum_scale:m,maximum_to_minimum_scale_ratio:m/f,flagged_channels:g.slice(0,64),flagged_channel_sample_truncated:g.length>64,consumer_ops:c.slice(0,8).map(h=>`#${h.index} ${h.name}`),evidence_json_pointer:`/evidence/static_analysis/tensors/${r}`})}let a=n.filter(r=>r.flagged_channel_count>0);return{status:o?"review":n.length?"pass":"not_applicable",evidence_class:o?"DERIVED_WITH_HEURISTIC_THRESHOLD":"DERIVED",assessed_kernel_tensors:n.length,assessed_channels:i,flagged_kernel_tensors:a.length,flagged_channels:o,maximum_representable_abs_threshold:LT,scale_outlier_ratio_threshold:PT,method:"For each per-axis kernel channel, compute scale[channel] * max(|qmin-zp[channel]|, |qmax-zp[channel]|), using the TFLite symmetric INT8 weight domain [-127,127] and UINT8 [0,255]. Review only channels at or below 1e-6 whose scale is at least 1e6 below the tensor maximum.",interpretation_boundary:"The representable range and scale ratio are exact artifact-derived quantities. Thresholds are methodology heuristics; functional inactivity, QAT failure, and task-accuracy impact are not proven.",details:n}}function ch(e){let n=ea(e).parameters.flatMap(a=>{let r=a.quantization.scalar_real_code_domain;if(a.quantization.status!=="complete"||!r||!["INT8","UINT8"].includes(a.dtype))return[];let[s]=a.quantization.scales,[c]=a.quantization.zero_points;return[{role:a.direction,ordinal:a.ordinal,tensor_index:a.tensor_index,tensor_name:a.tensor_name,dtype:a.dtype,scale:s,zero_point:c,real_range:[r.real_min,r.real_max],tensor_numerical_contract_status:"known_from_artifact_quantization_metadata",source_data_to_tensor_preprocessing_status:"not_embedded_in_artifact",equation:`real_value = ${s} * (quantized_value - ${c})`,evidence_json_pointer:`/evidence/static_analysis/${a.direction}s/${a.ordinal}`}]}),i=n.filter(a=>a.role==="input"),o=n.filter(a=>a.role==="output");return{status:i.length||o.length?"pass":"not_applicable",evidence_class:"DERIVED",formula:"real_value = scale * (quantized_value - zero_point)",inputs:i,outputs:o}}function ea(e={}){let t=[...(e.inputs||[]).map((r,s)=>qT(e,r,"input",s)),...(e.outputs||[]).map((r,s)=>qT(e,r,"output",s))],n=t.filter(r=>r.quantization.status==="complete"),i=WG(t),o={schema:BT,hash_contract:{algorithm:"SHA-256",canonicalization:"RFC8785-JCS",method:"SHA-256 over UTF-8 RFC8785-JCS canonical JSON",selection:"containing_object_after_exclusions",excluded_json_pointers:["/ledger_sha256","/ledger_hash","/generated_at","/subject","/provenance"],interpretation:"Remove ledger_sha256, ledger_hash, and any document-envelope generated_at, subject, and provenance members from the ledger object; canonicalize the remaining contract with RFC8785-JCS, encode it as UTF-8, and hash it with SHA-256.",compatibility:"Per-parameter v1.1 JSON.stringify hashes remain inside each hash descriptor during schema migration."},parameter_count:t.length,quantized_parameter_count:n.length,unquantized_parameter_count:t.filter(r=>r.quantization.status==="not_quantized").length,invalid_or_incomplete_parameter_count:t.filter(r=>r.quantization.status==="invalid_or_incomplete").length,per_tensor_parameter_count:n.filter(r=>r.quantization.granularity==="per_tensor").length,per_axis_parameter_count:n.filter(r=>r.quantization.granularity==="per_axis").length,blocked_parameter_count:n.filter(r=>r.quantization.granularity==="blocked").length,distinct_complete_quantization_contract_count:new Set(n.map(r=>r.quantization.contract_sha256)).size,multiple_complete_quantization_contracts_within_artifact:new Set(n.map(r=>r.quantization.contract_sha256)).size>1,source_preprocessing_contract_status:JG(e),boundary_contract:i,parameters:t,interpretation_boundary:"The ledger records serialized boundary dtype, shape, and affine quantization facts and validates affine value/cardinality consistency. A FLOAT32 boundary is an explicit unquantized storage contract, not missing quantization metadata. This ledger alone does not establish RGB/BGR order, source-value normalization, mean/standard-deviation transforms, resize interpolation, application tensor layout, the production preprocessing implementation, mismatch prevalence, or task accuracy."},a=vl(o);return{...o,ledger_sha256:a,ledger_hash:zd(a,null,{selection:"containing_object_after_exclusions",excludedJsonPointers:["/ledger_sha256","/ledger_hash","/generated_at","/subject","/provenance"],interpretation:"Remove ledger_sha256, ledger_hash, and any document-envelope generated_at, subject, and provenance members from the ledger object; canonicalize the remaining contract with RFC8785-JCS, encode it as UTF-8, and hash it with SHA-256."})}}function WG(e=[]){let t=o=>{let a=o.filter(u=>u.quantization?.status==="complete").length,r=o.filter(u=>u.quantization?.status==="not_quantized").length,s=o.length-a-r,c="not_declared";return s>0?c="invalid_or_incomplete":o.length>0&&a===o.length?c="fully_affine_quantized":o.length>0&&r===o.length?c="fully_unquantized":o.length>0&&(c="mixed_quantized_unquantized"),{status:c,parameter_count:o.length,affine_quantized_parameter_count:a,unquantized_parameter_count:r,invalid_or_incomplete_parameter_count:s,float32_parameter_count:o.filter(u=>u.dtype==="FLOAT32").length,integer_parameter_count:o.filter(u=>["INT8","UINT8","INT16","UINT16","INT32","UINT32"].includes(u.dtype)).length}},n=e.filter(o=>o.direction==="input"),i=e.filter(o=>o.direction==="output");return{schema:"deepbom.interface_boundary_contract.v1",...t(e),inputs:t(n),outputs:t(i),recorded_facts:["direction","ordinal","dtype","shape","shape_signature","affine_quantization"],not_established_by_this_contract:["channel_order","source_value_domain","mean_standard_deviation_normalization","resize_interpolation","application_tensor_layout","semantic_labels"]}}function KT(e){let t=ch(e).inputs.map(i=>{let o=XG.filter(r=>!r.dtype||r.dtype===i.dtype).map(r=>{let s=(r.range[1]-r.range[0])/255,c=Math.max(Math.abs(i.real_range[0]-r.range[0]),Math.abs(i.real_range[1]-r.range[1])),u=Math.max(i.scale,s)*1.01;return{id:r.id,label:r.label,expected_real_range:r.range,maximum_endpoint_error:c,tolerance:u,matches_within_one_quantization_step:c<=u}}).sort((r,s)=>r.maximum_endpoint_error-s.maximum_endpoint_error||r.id.localeCompare(s.id)),a=o.filter(r=>r.matches_within_one_quantization_step);return{...i,status:a.length?"matched_common_convention":"no_common_full_domain_match",matched_convention_ids:a.map(r=>r.id),closest_convention:o[0]||null,convention_candidates:o}}),n=t.filter(i=>i.status==="no_common_full_domain_match");return{status:n.length?"review":t.length?"pass":"not_applicable",evidence_class:"DERIVED_RANGE_WITH_REFERENCE_HEURISTIC",assessed_inputs:t.length,unmatched_inputs:n.length,method:"Compute the exact full quantized-code real range from artifact scale/zero-point metadata. Compare its two endpoints with common [0,1], [-1,1], [0,255], and applicable signed-code identity conventions using a tolerance of one quantization step.",interpretation_boundary:"The real range is artifact-derived. Convention matching is a reference heuristic: an unmatched custom range can be intentional and does not prove bad calibration or an application bug. The production decoder, channel order, resize, normalization, and quantizer remain unobserved until separately bound.",details:t}}function qT(e,t,n,i){let o=jT(t?.interface_scale_values,t?.scale_sample),a=jT(t?.interface_zero_point_values,t?.zero_point_sample),r=QT(t?.quant_scales,o.length),s=QT(t?.quant_zero_points,a.length),c=o.slice(0,r),u=a.slice(0,s),l=Array.isArray(t?.shape)?t.shape.map(Number):[],_=Number.isSafeInteger(Number(t?.quantized_dimension))?Number(t.quantized_dimension):null,p=r===0&&s===0&&!o.length&&!a.length,d=String(t?.quantization_parameterization||"").toLowerCase().replaceAll("-","_"),m=p?"not_quantized":d==="blocked"?"blocked":r===1&&s===1?"per_tensor":r>1&&s>0?"per_axis":"invalid_or_incomplete",f=eV(t?.quantization_block_size),g=YG(m,r,s,_,l,f,t?.quantization_scale_tensor_shape,t?.quantization_cardinality_status,t?.quantization_cardinality_detail),h=nV(t?.dtype),b=o.length===r&&a.length===s&&c.every(D=>Number.isFinite(D)&&D>0)&&u.every(D=>Number.isSafeInteger(D)&&h&&D>=h[0]&&D<=h[1]),A=p?"not_quantized":b&&g.status==="valid"?"complete":"invalid_or_incomplete",y=Kv({status:A,scheme:A==="not_quantized"?"none":"affine",granularity:m,parameterization:m,scales:c,zeroPoints:u,axis:["per_axis","blocked"].includes(m)?_:null,blockSize:f}),x=p?"not_quantized":r===1&&s===1?"per_tensor":r>1&&s>0?"per_axis":"invalid_or_incomplete",v={scheme:A==="not_quantized"?"none":"affine",granularity:x,scales:c,zero_points:u,axis:x==="per_axis"?_:null},I=vl(y),w={...y,quantized_dimension:_,axis_source:t?.quantization_axis_source||null,scale_tensor_shape:FT(t?.quantization_scale_tensor_shape,r),zero_point_tensor_shape:FT(t?.quantization_zero_point_tensor_shape,s)},N=vl(w),S={status:A,...y,affine_mapping_status:A==="not_quantized"?"no_affine_mapping_declared":A==="complete"?"complete_affine_mapping":"invalid_or_incomplete_affine_mapping",scheme_evidence:A==="not_quantized"?"not_applicable":"generic_affine_equation_observed_symmetry_not_encoded",symmetry_classification:A==="not_quantized"?"not_applicable":"not_encoded",scale_count:r,zero_point_count:s,scale_values_complete:o.length===r,zero_point_values_complete:a.length===s,quantized_dimension:_,axis_source:t?.quantization_axis_source||null,axis_applicable:["per_axis","blocked"].includes(m),quantized_dimension_role:["per_axis","blocked"].includes(m)?"semantic_affine_axis":_==null?"not_serialized":"serialized_default_not_semantic_axis",block_size:f,scale_tensor_shape:w.scale_tensor_shape,zero_point_tensor_shape:w.zero_point_tensor_shape,value_vector_shape_basis:[t?.quantization_scale_tensor_shape,t?.quantization_zero_point_tensor_shape].some(D=>Array.isArray(D)&&D.length)?"serialized_or_source_inferred_tensor_shape":A==="not_quantized"?"not_applicable":"derived_flat_affine_value_vector",cardinality_status:g.status,cardinality_reason:g.reason,scalar_real_code_domain:tV(h,c,u),contract_sha256:I,contract_hash:zd(I,rh(v),{includedJsonPointers:["/status","/scheme","/granularity","/parameterization","/scales","/zero_points","/axis","/block_size"],legacyOrderedPayloadFields:["scheme","granularity","scales","zero_points","axis"]}),serialized_quantization_sha256:N,serialized_quantization_hash:zd(N,rh({...v,quantized_dimension:_}),{includedJsonPointers:["/status","/scheme","/granularity","/parameterization","/scales","/zero_points","/axis","/block_size","/quantized_dimension","/axis_source","/scale_tensor_shape","/zero_point_tensor_shape"],legacyOrderedPayloadFields:["scheme","granularity","scales","zero_points","axis","quantized_dimension"]})},O=n==="input"?(e.input_contracts||[]).find(D=>Number(D.tensor_index)===Number(t?.index)):null,B={parameter_id:`${n}:${i}:T${wl(t)??i}`,direction:n,ordinal:i,tensor_index:wl(t),tensor_name:t?.name||"",dtype:String(t?.dtype||"UNKNOWN").toUpperCase(),shape:l,shape_signature:Array.isArray(t?.shape_signature)&&t.shape_signature.length?t.shape_signature.map(Number):null,source_data_to_tensor_preprocessing_status:n==="output"?"not_applicable":ZT(O?.source_data_to_tensor_preprocessing_status),quantization:S},k={direction:n,ordinal:i,name:B.tensor_name,dtype:B.dtype,shape:l,shape_signature:B.shape_signature,quantization:v};return B.interface_contract_sha256=vl(oh(B)),B.interface_contract_hash=zd(B.interface_contract_sha256,rh(k),{includedJsonPointers:["/direction","/ordinal","/tensor_name","/dtype","/shape","/shape_signature","/quantization/status","/quantization/scheme","/quantization/granularity","/quantization/parameterization","/quantization/scales","/quantization/zero_points","/quantization/axis","/quantization/block_size"],legacyOrderedPayloadFields:["direction","ordinal","name","dtype","shape","shape_signature","quantization"]}),B}function YG(e,t,n,i,o,a,r,s,c){if(e==="not_quantized")return{status:"valid",reason:"No affine parameters are declared."};if(e==="per_tensor")return{status:"valid",reason:"One scale and one zero-point are declared."};if(e==="blocked"){if(s==="fail")return{status:"invalid",reason:c||"ONNX blocked-quantization cardinality is invalid."};if(!Number.isSafeInteger(i)||i<0||i>=o.length||!(a>0)||!Array.isArray(r)||r.length!==o.length||t!==n)return{status:"invalid",reason:"Blocked quantization requires a valid axis, positive block size, rank-matched scale shape, and matching scale/zero-point counts."};let l=o.map((d,m)=>m===i?Math.ceil(Number(d)/a):Number(d)),_=l.every((d,m)=>Number.isSafeInteger(d)&&d>=0&&d===Number(r[m])),p=_?l.reduce((d,m)=>d*m,1):null;return _&&Number.isSafeInteger(p)&&t===p?{status:"valid",reason:`Scale tensor shape and ${t} affine value(s) match blocked axis ${i} with block size ${a}.`}:{status:"invalid",reason:`Blocked quantization expected shape ${JSON.stringify(l)} and ${p??"unresolved"} affine value(s); observed scale shape ${JSON.stringify(r)} and ${t}/${n} scale/zero-point value(s).`}}if(e!=="per_axis"||!Number.isSafeInteger(i)||i<0||i>=o.length||t!==n)return{status:"invalid",reason:"Per-axis scale and zero-point cardinality requires a valid serialized axis."};let u=Number(o[i]);return!Number.isSafeInteger(u)||u<0?{status:"not_assessable",reason:`Shape dimension ${i} is dynamic or unbound; serialized vectors remain preserved.`}:u===t?{status:"valid",reason:`${t} scale(s) and zero-point(s) index shape dimension ${i}.`}:{status:"invalid",reason:`Expected ${u} scale(s) and zero-point(s) for shape dimension ${i}; found ${t}/${n}.`}}function jT(e,t){return(Array.isArray(e)?e:Array.isArray(t)?t:[]).map(Number)}function FT(e,t){return Array.isArray(e)&&e.length?e.map(n=>n==null?null:Number(n)):Number.isSafeInteger(t)&&t>0?[t]:null}function ZT(e){let t=String(e||"").trim().toLowerCase();return["embedded_in_artifact","declared_in_artifact","present"].includes(t)?"embedded_in_artifact":["not_applicable"].includes(t)?"not_applicable":"not_embedded_in_artifact"}function JG(e){if(!(Array.isArray(e?.inputs)?e.inputs:[]).length)return"not_applicable";let n=e?.metadata_presence?.preprocessing_contract_status;return ZT(n)}function eV(e){let t=Number(e);return Number.isSafeInteger(t)&&t>0?t:null}function tV(e,t,n){return!e||t.length!==1||n.length!==1?null:{qmin:e[0],qmax:e[1],real_min:(e[0]-n[0])*t[0],real_max:(e[1]-n[0])*t[0],formula:"real=(q-zero_point)*scale"}}function nV(e){return{UINT8:[0,255],INT8:[-128,127],UINT16:[0,65535],INT16:[-32768,32767],UINT32:[0,4294967295],INT32:[-2147483648,2147483647]}[String(e||"").toUpperCase()]||null}function QT(e,t){let n=Number(e);return Number.isSafeInteger(n)&&n>=0?n:t}function sh(e,t){let n=Number(t);return Number.isInteger(n)&&n>=0?(e?.tensors||[])[n]:null}function wl(e){let t=Number.isInteger(e?.index)?e.index:Number(e?.tensor_index);return Number.isInteger(t)&&t>=0?t:null}function iV(e){return Number(e?.scale_sample?.[0]||0)}function UT(e){return(e?.scale_sample||[]).map(Number).filter(t=>t>0&&Number.isFinite(t))}function XT(e){return String(e?.name||"").toUpperCase()}function oV(e){return e.length?Math.max(...e.map(t=>Number(t||0))):0}Me();function Yv(e=[]){return e.some(t=>Array.isArray(t?.shape_signature)&&t.shape_signature.some(n=>Number(n)<0))}function Jv(e=[]){return e.filter(n=>Array.isArray(n?.shape_signature)&&n.shape_signature.some(i=>Number(i)<0)).map(n=>`${n.name||"tensor"}:${l_(n)}`).join(" / ")}function lh(e){let t=e?.predicted_partition_boundaries;return t?.schema==="deepbom.predicted_partition_boundary_edges.v1.1"?t:null}function Od(e){if(e?.quantization_status?.label)return e.quantization_status;let t=String(e?.format||"tflite").toLowerCase();if(!["tflite","onnx"].includes(t))return{classification:"not_assessed_format_contract_unbound",label:"Quantization not assessed",summary:`No normalized ${t||"serialized-artifact"} quantization contract was emitted.`,detail:"Absence of a normalized quantization contract is not evidence that stored tensors or executed kernels are floating-point.",quantized_tensor_percent:null,quantized_compute_mac_percent:null,compute_macs:null,quantized_compute_macs:null,op_state_counts:[],full_integer:null};let n=Number(e?.quantized_tensors||0),i=Number(e?.tensor_count||0),o=i?n/i:0;return{classification:n?"quantization_signals":"not_quantized_float",label:n?"Quantization signals detected":"Not quantized",summary:n?"Quantized tensor or op signals present.":"No quantized tensor or op signal detected.",detail:n?`${C(n)}/${C(i)} tensors quantized (${nn(o)}).`:"",quantized_tensor_percent:o,quantized_compute_mac_percent:0,compute_macs:0,quantized_compute_macs:0,op_state_counts:[{name:"none",count:(e?.ops||[]).length}],full_integer:!1}}function aV(e,t={}){let n=e?.bottleneck_assessment_status==="not_assessed"||e?.macs_status==="not_assessed"||e?.estimated_bytes_status==="not_assessed"||e?.intensity_status==="not_assessed",i=e?.bottleneck_total_us!=null&&Number.isFinite(Number(e.bottleneck_total_us));if(n||!i)return{assessed:!1,reason:e?.bottleneck_reason||e?.macs_reason||e?.estimated_bytes_reason||"required shape, dtype, or target cost inputs are unavailable",computeUs:null,memoryUs:null,packingUs:null,breakUs:null,fallbackUs:null,totalUs:null,coldStartUs:null,steadyStateUs:null,dominantTone:"not-assessed",dominantLabel:"not assessed"};let o=Number(e.bottleneck_compute_us??0),a=Number(e.bottleneck_memory_us??0),r=Number(e.bottleneck_packing_us??0),s=Number(e.bottleneck_break_us??0),c=Number(e.bottleneck_fallback_us??0),u=Number(e.bottleneck_total_us??0),l=Math.max(0,u-r-s),_=e.bottleneck_dominant||"memory",p={compute:"compute-bound",memory:"memory-bound",packing:"packing",break:"break",fallback:"fallback"},d={compute:"compute",memory:"memory traffic",packing:"weight packing",break:"partition planning setup",fallback:"fallback traffic"};return{assessed:!0,reason:null,computeUs:o,memoryUs:a,packingUs:r,breakUs:s,fallbackUs:c,totalUs:u,coldStartUs:u,steadyStateUs:l,dominantTone:p[_]||_,dominantLabel:d[_]||_}}function WT(e,t={},{limit:n=12,operatingPoint:i="steady"}={}){let a=(Array.isArray(e?.ops)?e.ops:[]).map(u=>{let l=aV(u,t),_=i==="cold"?l.coldStartUs:l.steadyStateUs;return{op:u,estimate:{...l,totalUs:_},operatingPoint:i}}).filter(u=>u.estimate.totalUs>0).sort((u,l)=>l.estimate.totalUs-u.estimate.totalUs||Number(u.op.index)-Number(l.op.index)),r=a.slice(0,n),s=nb(a.map(u=>u.estimate.totalUs)),c=nb(r.map(u=>u.estimate.totalUs));return{rows:a,top:r,totalUs:s,topUs:c,otherUs:Math.max(0,s-c)}}function YT(e){let t=Od(e),n=Array.isArray(e?.ops)?e.ops:[],i=String(e?.format||"tflite").toLowerCase(),o=t.op_state_counts||tx(n.map(l=>l.quantization_state||"none")),a=o.filter(l=>["movement","boundary","requantization"].some(_=>String(l.name||"").includes(_))).reduce((l,_)=>l+Number(_.count||0),0),r=o.filter(l=>l.name!=="none").reduce((l,_)=>l+Number(_.count||0),0),s=i==="tflite",c=s?n.filter(l=>Number(l.xnnpack_chain_id)<0).length:null,u=s?n.filter(l=>Number(l.xnnpack_chain_id)<0&&!Number(l.macs||0)).length:null;return{compute_ops_denominator:Number(t.compute_ops||0),quantized_compute_ops:Number(t.quantized_compute_ops||0),quantized_compute_mac_percent:t.quantized_compute_mac_percent==null?null:Number(t.quantized_compute_mac_percent),compute_macs:t.compute_macs==null?null:Number(t.compute_macs),quantized_compute_macs:t.quantized_compute_macs==null?null:Number(t.quantized_compute_macs),all_ops_denominator:n.length,quantized_or_boundary_state_ops:r,quantized_data_movement_or_boundary_ops:a,op_state_counts:o,xnnpack_fallback_or_break_ops:c,zero_mac_fallback_or_break_ops:u,explanation:s?"compute_ops counts MAC-bearing compute operators only; op_state_counts covers every graph operator, including zero-MAC data movement and quantization boundary ops. XNNPACK fallback/break counts are a delegate partition concept and can overlap with quantized_data_movement.":i==="onnx"?"compute_ops counts MAC-bearing compute operators only; op_state_counts covers every graph operator, including Q/DQ boundaries. Execution-provider assignment is a separate source-backed or observed runtime contract.":"This serialized format has no TFLite XNNPACK scope. Quantization state is reported only when a normalized format-specific storage or numerical contract is emitted; absence is NOT_ASSESSED, not zero or floating-point proof."}}function JT(e){let t=e.channel_alignment_status||"none",n=(e.xnnpack_kernel_alignment_multiples||[]).length?e.xnnpack_kernel_alignment_multiples.map(i=>`x${i}`).join("/"):`x${e.channel_alignment_multiple}`;if(t==="misaligned"){let i=Number(e.channel_tail_overhead_percent_min??e.channel_tail_overhead_percent??0),o=Number(e.channel_tail_overhead_percent_max??e.channel_tail_overhead_percent??0);return`C${e.output_channels} vs ${n} / ${Tp(i,o)} tail`}return t==="aligned"?`aligned ${n}`:"-"}nm();var Nr="54bbf3ec812dbf00975561fa73b83b48e0dd7ee3",uh="clean";var xl="40bc3b74f45024384ecfcfa278766da85a9d3ba89a1217fa20478469133c4f6d",e5="SHA-256 over RFC8785-JCS canonical deepbom.analyzer_build_file_digest_set.v1",t5=Object.freeze(["512 files","SHA-256 over RFC8785-JCS canonical deepbom.analyzer_build_file_digest_set.v1","manifest deepbom.analyzer_build_content_manifest.v1 SHA-256 46394771e3ded8c8f4d85a6fc7cc95f4815b6e4a326728bb3069f4033c07abe2","roots: web, pkg/tflite_wasm_audit.js, pkg/tflite_wasm_audit_bg.wasm, package.json, package-lock.json, Cargo.toml, Cargo.lock, build.rs, src, wrangler.jsonc, worker","file excludes: **/.gitignore, web/lib/build-metadata.js, web/samples/mobilenet_v1_025_224_float.tflite, web/samples/sample_cnn_float.onnx","file exclude patterns: ^web\\/lib\\/cyclonedx-(?:20|draft|perspective)(?:-|\\.|$), ^web\\/vendor\\/jsonpath-rfc95\\d+(?:\\.|$)","directory excludes: .git, .wrangler, dist, node_modules, target, web/protected"]),n5="46394771e3ded8c8f4d85a6fc7cc95f4815b6e4a326728bb3069f4033c07abe2",rV=Object.freeze({schema:"deepbom.analyzer_build_content_manifest.v1",content_digest:{sha256:"40bc3b74f45024384ecfcfa278766da85a9d3ba89a1217fa20478469133c4f6d",method:"SHA-256 over RFC8785-JCS canonical deepbom.analyzer_build_file_digest_set.v1",canonicalization:"RFC8785-JCS",digest_set_schema:"deepbom.analyzer_build_file_digest_set.v1"},selection:{roots:["web","pkg/tflite_wasm_audit.js","pkg/tflite_wasm_audit_bg.wasm","package.json","package-lock.json","Cargo.toml","Cargo.lock","build.rs","src","wrangler.jsonc","worker"],file_excludes:["**/.gitignore","web/lib/build-metadata.js","web/samples/mobilenet_v1_025_224_float.tflite","web/samples/sample_cnn_float.onnx"],file_exclude_patterns:["^web\\/lib\\/cyclonedx-(?:20|draft|perspective)(?:-|\\.|$)","^web\\/vendor\\/jsonpath-rfc95\\d+(?:\\.|$)"],directory_excludes:[".git",".wrangler","dist","node_modules","target","web/protected"],ordering:"UTF-16 code-unit ascending normalized relative paths",path_separator:"/"},generator:{path:"scripts/write-build-metadata.mjs",sha256:"7e2b79958db6a42eb071bf044c08ebe4c8d981421b708be89ff1623e04b802e9",toolchain:{node:"v24.12.0",npm:"11.6.2",rustc:"rustc 1.98.1 (48a229cea 2026-09-01)",wasm_pack:"wasm-pack 0.13.1"}},release_inputs:{app_expires_at_epoch_ms:"not_set",app_not_before_epoch_ms:"not_set",app_expiry_days:"not_set"},files:[{path:"Cargo.lock",size:8653,sha256:"e14a58bacb409958c023e974cf703ad3ef16e08fb837dbeb63f5a972194a4103"},{path:"Cargo.toml",size:982,sha256:"cb2d8d11ce396b4db0298c7c2d892599a9159ebfdb790a83f5225816d735b1af"},{path:"build.rs",size:3393,sha256:"960c883d1778e57786f589f915f400145098eaab78d27751bb8604302d0ddd89"},{path:"package-lock.json",size:41289,sha256:"317f96c56043f07c816dd155a961f5777f2445bcae1d4610be24fbede6f0368d"},{path:"package.json",size:27175,sha256:"3d295605272ec27b8bc5c05fb598966546503d94741ce44111106e8fc79e40d4"},{path:"pkg/tflite_wasm_audit.js",size:45969,sha256:"159ad6c3596d4d2b3281e8dd01e02d77cc54e062def65ef56225919c06f903d4"},{path:"pkg/tflite_wasm_audit_bg.wasm",size:2024135,sha256:"bcc9e81d9d7929d29b6e510328eb840af3c0e66387c350dc02b7282271dded87"},{path:"src/accumulator_atlas.rs",size:46553,sha256:"a6b31b87ae4ffa909b341d6801cd46ad5d7cd983440302a29e4c411e1657ee6e"},{path:"src/accumulator_reachability.rs",size:62117,sha256:"8a8245b7ca55a695448b1d40080130eff9af447e28bcf56f1dd3a285141188b6"},{path:"src/arena_planner.rs",size:32022,sha256:"79685a98c8374f6d085b5dd78a91b4c3824e4a803b946631c7161b9dda7afa8a"},{path:"src/artifact_byte_ledger.rs",size:14015,sha256:"68ccbc5ee010240ff46989cde9abbc7d88dc4a2a5248fde30efa7736985bd1ae"},{path:"src/block_inventory.rs",size:26908,sha256:"b0ec8f692d40bfdafe35fb6256c195955c7d7b1e10c5483958807950bcc7dbdb"},{path:"src/channel_vitality.rs",size:32833,sha256:"ce68dbb8ffc9be3ba141a7d11b907169d80ac8fb7b662997c31100e54fe59824"},{path:"src/contract_migration.rs",size:45328,sha256:"0732ac3237f53406514b44e4d856336918574770e3a9d37cb862954e464a4e54"},{path:"src/core_isolation.rs",size:13006,sha256:"29c399fd8c5ac4b5509469331dea6c6a6c552a6f5d58b4f167f27c392fbe2a74"},{path:"src/delegation_repair.rs",size:67754,sha256:"95960374174b5ae27a210b5f61c0fe00aba62769032780d4fdb2988fb78b2b38"},{path:"src/deployment_delta.rs",size:42067,sha256:"30643afb3862f6e03ffe08155435cca9a2adc79b95675c64f1ad0fa9215e734b"},{path:"src/deployment_frontier.rs",size:46821,sha256:"305231d5dc0fb9ea579c99f71afa93ae927662f4301ac134b91bf82f8540e462"},{path:"src/dynamic_shape_cost.rs",size:41761,sha256:"3d3b388b91c9b296806fd355a5c795518d1024bcefb3a10b816fc5cdd620126e"},{path:"src/findings.rs",size:26187,sha256:"afcbb7e1cd591d1c3d183a3af33059b24beb281cc64ccc73c9dab640c8c6e250"},{path:"src/influence.rs",size:31221,sha256:"57c266fe2b5867752b4b6016987c46dd750739fa157a63fa6ec5400bca405b0e"},{path:"src/input_counterexample.rs",size:37154,sha256:"0b5ef36751ba52d87564c23885bd843b80dd2627ec1de1446fcad5a5842fdb98"},{path:"src/kernel_witness.rs",size:43799,sha256:"9958b9236abe0ba8df3a749e752f65445163518ba7f583dbeb933ac7e7234ac8"},{path:"src/lib.rs",size:416739,sha256:"bdad60b55f2d1e9c4889c73faf25b6e6f467f0e6f2b17667beadbbe12dd96aa9"},{path:"src/numerical_abi_propagation.rs",size:60335,sha256:"35b2777392eb8fe2d124c69db57bee980d520664134a74f99d8e9dc47d41cbb5"},{path:"src/preprocessing.rs",size:3411,sha256:"a7e97957fa6e31f3bc20692cb0150afee4aa6cc96a3fbae6435029bf20c3325c"},{path:"src/preprocessing_realizability.rs",size:32978,sha256:"0bf81db4c5a7a591c851878ee11d6267d86f0594430af2d5c941120df0f8c7e0"},{path:"src/quantization_lattice.rs",size:67401,sha256:"06ba1170fa9b045dfb4ca55bb4560ecba36128dc7125f02c3ea41d7772587810"},{path:"src/quantization_math.rs",size:4910,sha256:"95eeea699b4b0638b8f4dfe6a27322617a3dc5d9c657d6111e18eef4364b9e96"},{path:"src/redesign.rs",size:105473,sha256:"dce122c6a17e6b2d2f421d2a303f9729355eb545c56f6e6e486b0bbb85d7495c"},{path:"src/report_exports.rs",size:8763,sha256:"837bbba549024c0c6e3d83ebec7aa14d50abd5699cf5712357b0eb2011515253"},{path:"src/requantization_fidelity.rs",size:38059,sha256:"690521a1aafb6aa6813c6736bc51142168ab894f43163f8c43ecfff1d917a11d"},{path:"src/research.rs",size:88981,sha256:"feeeee19c76fa2595c3ce46993adfd25b2bcbb633264d74aa22e94bcfb697d8d"},{path:"src/residual_contract_distortion.rs",size:32489,sha256:"78c43d9e5cde42b281a470dc1df01a6fdcb14090ff66cfd633dd6d1d92ce56ba"},{path:"src/residual_step_response.rs",size:29975,sha256:"8977a79c0017aaa4ebdeb2842956cae379ba6ba6808fe4f8d0cc775af057f178"},{path:"src/rounding_equivalence.rs",size:42588,sha256:"8b5caa0317585c6a0f3b078b4f70713877a6acbb6a2b7f991ebcac79748f92c6"},{path:"src/runtime_version.rs",size:8155,sha256:"402dd8253de3d6b05401c06abc493970fef1661901c07d8e2ddefea19703c37f"},{path:"src/target_profiles.rs",size:55538,sha256:"583b81002dcb4a01f63db1855199c95abd0d35864302b54990a6549bc3efbf1e"},{path:"src/tflite_deep_scopes.rs",size:18853,sha256:"f19829a8a494f2d7bab91ecef4372b3da13b4ccb150897d4d48b026b037c1307"},{path:"src/tflite_metadata.rs",size:70796,sha256:"284cefcf609521d905ecd72dc96e0c52191b0302cd576d5249619172219c7b73"},{path:"src/tflite_operator_names.rs",size:7686,sha256:"5b9449896fd92fbc73f9630ff8e8c108f933451c21e305c912232fc7ee389b14"},{path:"src/tflite_scalar.rs",size:1968,sha256:"ebfdfb2c2800225ea3e8e228a7fd425c4f7f405b0fdff2d78305c4946832c871"},{path:"src/tflite_shape_reconciliation.rs",size:13971,sha256:"c04925d5d91b57264b0f55f72b9feb223c2adb0723415622ce414b47a3223899"},{path:"src/tflite_sparse.rs",size:29251,sha256:"e194f4fa4b1e9a996030209814553f6a0343707b6972dd4eec4c3e477e06d690"},{path:"src/tflite_subgraphs.rs",size:54776,sha256:"3ecdffd7b561b38a0d0919d5470cfd0c2e85fa6ea9a45b6a1f01fc0356abdaf0"},{path:"src/verified_flatbuffer.rs",size:45062,sha256:"a532d8eb2443dedbf80c78dffba95dd5fbcf8117e1b066f7a0ac2d98c13cb1fe"},{path:"src/xnnpack_delegate.rs",size:28807,sha256:"9dab20824659a49e3a4266e74f65072c978bd1fc9b50f3ff8a75a0194da02d96"},{path:"src/xnnpack_rulepack_generated.rs",size:23539,sha256:"b8c31b73e1fc73b6e0d62ad444cfbd458976b94b239fea6029b1652f3a370942"},{path:"web/.well-known/deepbom-signing-keys.json",size:1530,sha256:"5cafa768e6a6582a9bc3f1fb297de7f773847df381f07dc40950f117c87b411f"},{path:"web/NOTICE.txt",size:1578,sha256:"45c9946fdf5a43ae15350b15091f914b00db836b3da91489bc0dc2153aad4cd1"},{path:"web/admin.html",size:5194,sha256:"8be11962cc1d037b42f6711624ab79137aa829ac320d82379a4a289898226c7f"},{path:"web/admin.js",size:19835,sha256:"a5ba57fed53487be1ac145c4b4bf1c27ed3b735847e7f4f7030f701b75edbc18"},{path:"web/app-shell.css",size:42903,sha256:"6db915c3ca5db059778afee834079343c312a16fbcd56a97c7baf1e3a0caa858"},{path:"web/app.js",size:316407,sha256:"cb147c6a7a74fdb63b2b297bf596904374e0ce6f74c169f090d48b5e949831f9"},{path:"web/auth-complete.html",size:443,sha256:"ccc97a6fbee9297366afaad4b7dbfcff2ff9922febc79d71fe0f4d2384b0b5a9"},{path:"web/auth-complete.js",size:797,sha256:"1b5ee5a15f4988bc90148aa8dad5970ce317c43999911257237b127457679e81"},{path:"web/bootstrap.js",size:5069,sha256:"98e3fce5b314c004f6fc91bc35fe2d87a67ba0c42a6aee889fb87c2b1b98a583"},{path:"web/chatgpt/deepbom-app-icon.svg",size:3996,sha256:"03a03b3c520807bc7c2c991c8a89cd589eaf3a7603311d2403d5d8bac5a1c8c9"},{path:"web/chatgpt/deepbom-widget.js",size:57874,sha256:"f29ac76f3d71317e42f3a943e842d4c2e72cd878c4fb9ad40e670a6e7c03486c"},{path:"web/chatgpt/index.html",size:7238,sha256:"432754369fbaf9c7bd8d67afe1ff6d4975c9c497b0d159d3105dcbb67c5113f3"},{path:"web/claude/deepbom-widget.js",size:21485,sha256:"95e8b26836e5ce42606443d0b1d20e0e2ce07c15a7b71f76824161977463f99a"},{path:"web/claude/index.html",size:6365,sha256:"e85cb2471029662e3b8f90f148f0832e5ecdd7962d591b9f5d052f82b0b9a5dc"},{path:"web/device-workspace.css",size:56024,sha256:"19b93b67e4e7f5210427619162f0a8c181ee2f832f71cb092bafa41908ac8c97"},{path:"web/evaluate/engineering/index.html",size:6874,sha256:"59e4721dd0b2d46be142c0ecb60c94ac506ca52d92f738fdad25e1fc607cb099"},{path:"web/evaluate/evaluation.css",size:8436,sha256:"4464acc9390c1d46f1c1eeaa880fc53c13ddbd283a00f92ab82db4005b2f3826"},{path:"web/evaluate/index.html",size:2753,sha256:"c1b78267ad4d76275ae7da55746df9caaa1512d9b5c289b423fbf0f28bc7b311"},{path:"web/evaluate/quality/index.html",size:6510,sha256:"1fba2553f2a3a6153edbe9ef305dd3c8d9645e7e12ca52035522c4c59d18eabf"},{path:"web/evaluate/regulatory/index.html",size:6900,sha256:"d3b5d26f469768da02bd7b7734764280cf9d9623d5305416018cb4293f5c0e98"},{path:"web/execution-placement.css",size:18450,sha256:"ddc3567a6e0a4fe8546668c75685d94a00c4e8d058f9b37f8619904760a0294b"},{path:"web/executorch.js",size:83992,sha256:"1686486d11863ab19e96c736efa373a405a9656bd99941e5658830f083b18d9b"},{path:"web/explorer-evidence.css",size:20142,sha256:"5f28e5ea2822f739ad17ad417ddbfa0664926b8b99b848e48583b672952bfbf9"},{path:"web/explorer-question.css",size:2509,sha256:"3ba6e11e29b61deb4099d5f3f03a3e8fc10ffc0dd4d83599b7dce2cefc3bdbec"},{path:"web/explorer-redesign.css",size:25473,sha256:"6d3a36b4e8909461c62abcd5dd71a3e193dbcbc4f3f5bd0e0c45da1d9684b53a"},{path:"web/for-agents/index.html",size:10286,sha256:"74280dcb5f9286d85cbeb58259d7a95033772b885aab5a2239a6dd6190afe19b"},{path:"web/get-started/index.html",size:34103,sha256:"41aab2367f683fdde3868b472783478fbde8ac00ea91c9884fb6e8ef86a9a66a"},{path:"web/get-started/setup.css",size:8603,sha256:"bd09cd804051a9c4dffaca52395d84ce08402cbc137187e2864114178111184a"},{path:"web/get-started/setup.js",size:2257,sha256:"3ae032a5f402310ce6aba588922dfe295b2e02571283f188eab8b859a99740e9"},{path:"web/guides/cli/book.css",size:6265,sha256:"bf7d5f1e680e258d9ec9ceb95201e10815074ee57c2de6aa6a47027654e4abec"},{path:"web/guides/cli/book.js",size:1854,sha256:"297723521764b6debe9ac48ddb7beb99807f8be34373096f50411211d2acf9aa"},{path:"web/guides/cli/index.html",size:23126,sha256:"0d5b0bf8b6c1df04ffa73fd44452d209788bb64dd215e35261bcce5130745081"},{path:"web/guides/cli/reference/help.txt",size:12049,sha256:"2afbb2d80c8ad420b66f40fb8fea0b5f13d317186004080901bff030564f321a"},{path:"web/guides/cli/reference/index.html",size:22713,sha256:"6aba4195d5f62a46505e475a14d9410aaf65b7dbd2d96a7dd4f2562782ebea20"},{path:"web/guides/compare-model-artifacts/index.html",size:3570,sha256:"0226cfc7087b5c4d252a8a8783351a1f59d3f2c4187e3cdcf65fea12ebe46a48"},{path:"web/guides/index.html",size:3841,sha256:"0e1bf7e2302b44ff8c3332c91ecc878c368174cf2eec2a4f96257a77fb6bd4bd"},{path:"web/guides/inspect-gguf-tensor-encodings/index.html",size:3685,sha256:"eba9762bafda0c2369721cc5c03e11d1713a72d9d1d1f1e12b1becdf9a056835"},{path:"web/guides/inspect-onnx-quantization/index.html",size:4019,sha256:"4f4f4a5aaf92fe365e9de2598ecdefbfa61d373e2f68bee55019c942c0772020"},{path:"web/guides/numerical-evidence/index.html",size:16621,sha256:"7252c8481d353e0a898bfcbb5cc3afb41632271ee06b15c75c84b42b2910a38e"},{path:"web/index.html",size:141957,sha256:"7ebc3c510ebc984fad0415f2300ae16f7db10f9ae5474d01bb5c274a046d621e"},{path:"web/legal/privacy.html",size:10234,sha256:"607719c60f0fd1e3022807f931d34da27f1dfc8af97b19783c2168c4db0ac212"},{path:"web/legal/support.html",size:1888,sha256:"cd032e5c8a8112a766d501b503e8147c8f6dee7c44d02ef8809b2bb18cc31678"},{path:"web/legal/terms.html",size:1838,sha256:"c328f60488292a230b023a52e2768303555ea9e605ecb5bf0038283b3f3d82fb"},{path:"web/lib/accelerator-binding.js",size:28908,sha256:"541826e43577417d95cd198855af33440cc4134c6e48fec63e61915f7751e4e6"},{path:"web/lib/accelerator-profile-binding.js",size:10120,sha256:"39fc9daa7b939a80005eaa7ebb54c032e4cc5488e07d663c4f6c47055cd08e53"},{path:"web/lib/accelerator-profile-switcher.js",size:4439,sha256:"742bae0a24339e4e802278ed2c207da80453ab9e8eefe7edeee63ec92cbcd315"},{path:"web/lib/access-policy.js",size:877,sha256:"d0a7f1b7fbbc17a9703fca47bfbce5fc8007345fc47926f01d9fa5cd175133bc"},{path:"web/lib/account-ui.js",size:4576,sha256:"0ad59404b936d73c39f1bbbac3129b4097d61e088ebbc736e38c09d7aa913fe1"},{path:"web/lib/accumulator-atlas.js",size:50145,sha256:"1462db21afe2b1a2236fc5022c82d3ea74ecceb16525705e3cb08f9e3e2c59b8"},{path:"web/lib/accumulator-reachability-viewer.js",size:30604,sha256:"d26ce83df265524a662eebdba47cda05670e00aa00dc9d21378b99e8aa3a9b52"},{path:"web/lib/accumulator-reachability-worker.js",size:455,sha256:"ddef70cc6ce7242fbf59578d31aa637c2eb254327c5a6b7d1c1caeafcef11805"},{path:"web/lib/accumulator-reachability.js",size:36760,sha256:"701a6aa143834d7d4d8d9253a8d7746303ae48e06109a6e7602b6b57c33e95c7"},{path:"web/lib/activation-ir.js",size:13032,sha256:"02098b58a2673a5a616d26b189c8761d46c10c5a3afa9b5f66be472771a3156e"},{path:"web/lib/admin-elements.js",size:1172,sha256:"7d4ec292f2a1b15800d40e8192583a5090f1a8bde0c3ca8513fbd8588423263a"},{path:"web/lib/admin-usage.js",size:15041,sha256:"ec866bd7ec5d6bb17baacbc51ebf07e5dd9b362fe0f725267620a7882ac813ab"},{path:"web/lib/analysis-depth-mode.js",size:763,sha256:"d873fdd38bd223bfb0770d45c9cc54d1baa9dfdfff96e1ec85647075278427c2"},{path:"web/lib/analysis-summary-contract.js",size:2021,sha256:"e990c7815bacf2af6560ea57989d2e889c00482e8cbfe2df1668f2ceb525b759"},{path:"web/lib/analysis.js",size:33962,sha256:"fb8ac76122f2d2e526777a0f021d3396c68b9ae532cdf45e430bc8d5ef9b57b6"},{path:"web/lib/app-config.js",size:4772,sha256:"22c722ad3d0b21a7ee16fa301d99ffb4383baef1744f38b40b553f5317fee46c"},{path:"web/lib/app-deepbom-workspace.js",size:66062,sha256:"bb73716a455c36bd58030c2d368ddbfbfa00f0ff07e17f73b4ae7ecc1b7882dd"},{path:"web/lib/app-graph-workspace.js",size:83094,sha256:"5beff6a42e21a3604f7683a004670f90ad06785d92f98c23f488a2d29c095d47"},{path:"web/lib/app-surface.js",size:5352,sha256:"e296f6bea0e6ba2569cf82dc75ed41329eab56a8abb5588a03fae474d0a9be10"},{path:"web/lib/arena-viewer.js",size:19837,sha256:"5f66bc066690b6c94f819ec767864bd5fed8e75937f90d58014dabe6c9122c61"},{path:"web/lib/artifact-bundle.js",size:32887,sha256:"7fb665614ac80393e2ccbb4b6f1947571ed1d2419268515bcbe43b6714bd965d"},{path:"web/lib/artifact-diff-view.js",size:4395,sha256:"cd4871a53d7524472d644e614e7edbc3ad0466cdca8c7fade22a646517c81aad"},{path:"web/lib/artifact-diff.js",size:11660,sha256:"a6a2a22314ec2ed152584823edda06efdff6e13e583979b6cdb0dafe1893c413"},{path:"web/lib/artifact-dossier-view.js",size:3792,sha256:"890377e4f6afe2d17e7436e4e114e8618f6baa7ca158a21f5dc3fc2d196dbef1"},{path:"web/lib/artifact-evidence-envelope.js",size:24934,sha256:"05d9db50751ea0d3c16c00920dcd083387d75b2b8721e33478a46f849cc45246"},{path:"web/lib/artifact-ir-context.js",size:10774,sha256:"1fd2977ac19cea9bd0a8f042121ebe457d525d7e22e9f81fb772225e4fa60a0f"},{path:"web/lib/artifact-ir-runtime.js",size:9777,sha256:"e8353606d5187eb4f340647f1c1b7e331f6f63c68f67260f7ce01e53a453e732"},{path:"web/lib/artifact-ir-selectors.js",size:1036,sha256:"d002320f6601dcd329abbb499a16c73b3a90cc12eb7636d28e1b4f4b6192aff8"},{path:"web/lib/artifact-ir.js",size:4635,sha256:"2735139e926c0b06f295a2f272c30151318685d6cdea021e4ace76e4218f76aa"},{path:"web/lib/artifact-ir/internal/architecture.js",size:3640,sha256:"430c9d4f1ffea00375dc2d047cafbafaadf527708b7870c21847b8ab827f35e7"},{path:"web/lib/artifact-ir/internal/constants.js",size:342,sha256:"b0869050b42ea362d2e3755539a24496ac3509e9bb255ef7f0f9c6d7655a8e69"},{path:"web/lib/artifact-ir/internal/graph.js",size:22811,sha256:"77e34d107b3e58f940ecc9c8676182f0ce9166b285b5f4d0210bb4af2ea58717"},{path:"web/lib/artifact-ir/internal/identity.js",size:747,sha256:"c3e09a5eba9e800359ba44e0406499bac817df7aea3978941b818c1ff7a4d57d"},{path:"web/lib/artifact-ir/internal/overlays.js",size:5592,sha256:"9c9330de0d732581b7a21c8d5689bbf04b6df8cf6082ec1bdb21b96084068bc1"},{path:"web/lib/artifact-ir/internal/quantization.js",size:10770,sha256:"96bc24d93cc45e2254fddbdb90141048a3589ea2cd4067b6a062dea2bc5ac8ff"},{path:"web/lib/artifact-ir/internal/shared.js",size:3985,sha256:"061f8acbcfcf114f452c65f1418daeff36f769cf84e6bc01763588ca1ac6f9e7"},{path:"web/lib/artifact-ir/internal/storage.js",size:6363,sha256:"6fe93c649f1285b8b95c11d4b6dc1aec6c8e4643563a6cc941bcfef85cb24fca"},{path:"web/lib/artifact-ir/internal/validation.js",size:12282,sha256:"da13d47247205c757c2dcb6f1ccfeb2f9ecf7c7ee951de46f647df7ade0379fe"},{path:"web/lib/artifact-overview.js",size:38439,sha256:"8f824838d2ea94c7e9d042fe1a2dbc1d530bf233db56ed3275ed00230909919b"},{path:"web/lib/artifact-set.js",size:4375,sha256:"c983426078f63122b03e32756276002bd00564be7d73e4103e1fc6ffd0928c3e"},{path:"web/lib/audit-output-contracts.js",size:1242,sha256:"bd07a3f49368dd09c13ad893b06d34e1c3e1b9ed88d5e2b25e81636388f6aaa7"},{path:"web/lib/audit-progress.js",size:3027,sha256:"6f2bcb6686219a4b31323239d5883f12dd89d8d17fc35d9b7a5739f0a60fec96"},{path:"web/lib/audit-ui.js",size:55453,sha256:"78d11ea26cf06817f7f4dab7ae609ebaf2594d8890c6f616f8b348c067f0e9cd"},{path:"web/lib/auth-labels.js",size:8324,sha256:"9d69211829dfc3f6e3820aa4370e4e8b6ce53c837994e7d44fcd470050819e38"},{path:"web/lib/auth-ui.js",size:1558,sha256:"8c0eadcd1e50248f219ab43f2c797cd61b43bfe2768f4e84c4098cd6e07e934e"},{path:"web/lib/backend-placement-projection.js",size:24510,sha256:"3e1b257e3b253096ba478680812ffacbd9e05a33ab60a1d8bf104f6710eed067"},{path:"web/lib/benchmark-ui.js",size:9297,sha256:"4221a996fd864ed09915660151e4655f610a4d8324676e2b17a83390dbbc1fbb"},{path:"web/lib/bom-artifact-reconciliation.js",size:14542,sha256:"77e01b043752415ca25c36b87b067d63dc49f7b2ad4baabcd3b67ccadc0ba37e"},{path:"web/lib/browser-asset-url.js",size:245,sha256:"e5e23365943eae1bc5e09ed81ba427768cdfcc1dc7f7ad453de9c1287a728dea"},{path:"web/lib/bundle.js",size:8544,sha256:"5b19f79e8eec1d08452c5e96e079ca08f6797e9e48aef6a8d9bcc75d1da28cf9"},{path:"web/lib/calibration-validation-ledger.js",size:27452,sha256:"4c782ea9e104eb5d8fada3f1ef3bd869af3270ef149c193683c1f2d29c8c57a5"},{path:"web/lib/calibration-validation-view.js",size:8026,sha256:"014851d6a1d9e1d021e7c5c042bdc72d72fe83651e9d0e9e5ab852fff31aa94c"},{path:"web/lib/channel-vitality-worker.js",size:431,sha256:"b812fa6ccd01ba58452aaa3811752197a9c9fd71e8f4627308b8aecb8eb0aea7"},{path:"web/lib/channel-vitality.js",size:51927,sha256:"0577eab6bdc33cf4976cb100283621bb012e2c3e537500f9cd7c0e1e99c3c9b2"},{path:"web/lib/chatgpt-usage.js",size:9479,sha256:"c7a7ea8f344d765b2d5da0f19a477bc8c3c40b8e6602121b92401e9526eca81f"},{path:"web/lib/citation-ui.js",size:1834,sha256:"cbfd02c4b0127a73b808e7c6c52c12021feab1d2bb0439df5294380e9cbee242"},{path:"web/lib/clipboard.js",size:406,sha256:"8421bf6e0d0d92c3cb0116b9c635bb99413a33b84498fe0908e03dd4327bfa61"},{path:"web/lib/contract-migration.js",size:51279,sha256:"6470305ed13dbbc66580afd687986c590e08eaa7554044150d929bc8206be7c9"},{path:"web/lib/conversion-receipt.js",size:12703,sha256:"0afb07e979cbdae0af6db8c0ab352284f7e3c9643ae9fec612e8c6f7d72b1032"},{path:"web/lib/core-isolation-view.js",size:10856,sha256:"98e4f00100457c9975f0f75704c747bec77362b0d610f8f81dd8e6d5a84eefcf"},{path:"web/lib/coreml-blob.js",size:15937,sha256:"99f9bb5ec6ef5385a2c270dbd5d3810ee3afedac2addee4113bddd9abf1ca981"},{path:"web/lib/coreml-classical-model.js",size:30679,sha256:"b7decd064997c8b5534af216fcc4ec5a33480dcdc0f6e991e3f784b42ca681f1"},{path:"web/lib/coreml-compute-plan.js",size:15024,sha256:"a1bad54a5ae95d2e827d894b1a02f19730a7bdd84c9c19818b1db6d9c6402976"},{path:"web/lib/coreml-deployment-contract.js",size:6764,sha256:"0ace70a8843fd8bd09708ad1994f7c23e9d8e367159dffeb5d07d863e3070a2f"},{path:"web/lib/coreml-exact-integer.js",size:1444,sha256:"f8095189c598944fcd3c841e5b29748bbc73c73fa40009af84bf31c1fbf9ba17"},{path:"web/lib/coreml-metadata-adapter.js",size:162129,sha256:"092f49e9087f848b4f0e9435427385b9b2c4d5a70d3023f0e1de0fde7eff47ea"},{path:"web/lib/coreml-mil-program.js",size:103190,sha256:"5c9bed5e6a11806b1fdbd7812262a145a1aea5fc9e330248d7d17ae5ac67bec1"},{path:"web/lib/coreml-neural-network.js",size:75252,sha256:"8ccea40465aee577dc5f3f160b8c32e0fe85ebee1c5f9d5cad2dc3ac9c98ccee"},{path:"web/lib/corpus-validation-provenance.js",size:2523,sha256:"79552562c429a6988034dbbed832187dd423a406a19c05ae9c5c4300dcc777a9"},{path:"web/lib/cpu-target-binding.js",size:2658,sha256:"63a9da9c81ddc9447484649ae36261ffdb29a8b65b3ffe1eb9c247baedc7fe78"},{path:"web/lib/custom-target-editor.js",size:8627,sha256:"b0e3315c5ca03bae1405416b76d728748bf4fafd0b1109968eec486557856741"},{path:"web/lib/custom-targets.js",size:13316,sha256:"367f3d93d64338de89d8049a4013d497b8f8263354d6479fb9f7d9ebd84e068a"},{path:"web/lib/cyclonedx-component-inventory.js",size:3267,sha256:"03d315f52e04c4c0d36af528c0a8b59155fc98ea0be2b1ca58e701883e5469bb"},{path:"web/lib/cyclonedx-component-metadata.js",size:897,sha256:"3afc4ed0c03e6dd2fc5709a656be71e37d1941492d3b8a814fcafa3aca7e33db"},{path:"web/lib/cyclonedx-identity.js",size:2447,sha256:"50231deaeb15b577ac6ac34b6a758a110bb1ed6e9614a4b03899fd18cc86cd3e"},{path:"web/lib/decision-coverage.js",size:10697,sha256:"5af6f0a5c17cca42b5cb6b3bae48d3e84f3e910f7cd286cc2ead9c9dfbeea6c6"},{path:"web/lib/deepbom-property-taxonomy.js",size:7236,sha256:"0b06940920b5a56406a608268f509e183ba1afa31ed5690e601ad33dbeaaecf5"},{path:"web/lib/deepbom-worker-client.js",size:1886,sha256:"437a7ba5a88b86dd0844c6afa34982e478ba133be5cfe210a4992193ceba4f26"},{path:"web/lib/delegation-repair.js",size:69714,sha256:"2ee19239c7c192b4f34a8563e6a023a544fdbb81f299c16d25250b8b56df4213"},{path:"web/lib/deployment-delta.js",size:40739,sha256:"024a29cbf81b17e97c5b0f93e86712d1182e35da872955000a5ff7f1228ef62f"},{path:"web/lib/deployment-frontier.js",size:47197,sha256:"b6bcd9cc3ea79a0142ec3b5c89dc70f9b1ded1d4e72b82145a1f3b2b0273f30e"},{path:"web/lib/dom.js",size:18563,sha256:"24a0550c72011834778050835e171a0e4f5e559003708847017034edbd40b71e"},{path:"web/lib/download.js",size:1383,sha256:"aa1ff200ea2250ad71c513370169c331569265b8f3a2b0371c66bc040e78432d"},{path:"web/lib/dynamic-shape-cost-conformance.js",size:53246,sha256:"a710dcfde3dc3ec20d820eb5009aeee5cbc35f9e997b5e8581812c4f6b128d53"},{path:"web/lib/dynamic-shape-cost.js",size:63543,sha256:"c36443485233cbb62afaca630dd2d7fcbfdcc204507af40c48213123c20834ea"},{path:"web/lib/edgetpu-compiler-evidence.js",size:7174,sha256:"e283734deec13788ac7da73ca9cdd881b9afec0aa2475db0dde6bf40c814e4c6"},{path:"web/lib/elements.js",size:30855,sha256:"0667884da30a535bbb8f123ccc1df3d45c1e885a73422362ea7242ac256db6e1"},{path:"web/lib/evidence-applicability.js",size:4974,sha256:"52532f4c39378ba9907af6a88ecb2d94bf488c391a0a6801ccb72559247dbb1d"},{path:"web/lib/evidence-class.js",size:1631,sha256:"67f4ee53d405a66bd97a0b15bdb17ff91737950d6fcb2143ba3938386003c23b"},{path:"web/lib/evidence-cursor.js",size:3526,sha256:"1d4c8c586f66a872ef4a5eb8ad00b01059cbb0b4d80413483d4d20b4ee940931"},{path:"web/lib/evidence-level-report.js",size:15395,sha256:"5afb0bf749fdeac9e9c95bdc101f3d29f5dace23eefe656cdb9a5d9d78fcdbe8"},{path:"web/lib/evidence-package-profiles.js",size:11053,sha256:"6d919f6352acebc9c1b8dda27585a3f616d2d1b1ff70b29f79e4c7e878ec377b"},{path:"web/lib/evidence-package-rights.js",size:3080,sha256:"9b1d76628179f09e9d93b9d0eb214222063ec0c8ae0abcc8cd37f8c54cf1305c"},{path:"web/lib/evidence-treemap.js",size:27460,sha256:"c566dc324ae69967b44b20e1c98fa363a4cfbf6c0a8f4da41e6131651f126da5"},{path:"web/lib/evidence-visual-contract.js",size:1193,sha256:"eb668f597fea492bc4b679096f30062692cb6f7c94512c7f0d97787ce62d1adb"},{path:"web/lib/evidence-why-drawer.js",size:4431,sha256:"3eaa96c67a990d457b59522def54a43a0be030106acce817e1e36490c4f33dcc"},{path:"web/lib/exact-rational.js",size:924,sha256:"38d8f710054cce4d4d12c68634c557d431e6719ce68b149b7e3214ef126243c4"},{path:"web/lib/execution-placement-evidence.js",size:42742,sha256:"047de7f1bb550d484fe28120717f9a6de246ecfc886254cc78cc5dcfa1de1464"},{path:"web/lib/execution-placement-view.js",size:36314,sha256:"93a62f9e2185767d0240409a04bcc1c7904f07e8c7aa2927b292003c6f781419"},{path:"web/lib/executorch-build-binding.js",size:25168,sha256:"62acce0b6da002a4b4dacac6e413890536e3ca863fc29c6149cd8576a60a3c31"},{path:"web/lib/executorch-operator-signatures.generated.js",size:114113,sha256:"8c494c1136ba7580bc871c33250666299f18fec72ccc65b539e510f8cee125ac"},{path:"web/lib/explorer-decision-view.js",size:25468,sha256:"6d242da225dc5085218b5652b1187d1757f436b2f5e2f7c68d09befc612b1934"},{path:"web/lib/explorer-question-view.js",size:10454,sha256:"20dbb77fbc8968360c7677d788998518caf776e3eae0b64b7403ce0b8b9f3125"},{path:"web/lib/explorer-redesign.js",size:93257,sha256:"2cb85191cd46208b9a4215c1bb0773031a7bec6e7313acec995ddc2cd5ef32aa"},{path:"web/lib/export-artifacts.js",size:1726,sha256:"29e9e3b05e2b57ccd5c3d4082b341990463f015cdba66f456ef0d9d87993c908"},{path:"web/lib/export-contract-view.js",size:13765,sha256:"e4055726b1d5bf7fa43cd50151d2e4ead1fafd8e80325dcb951c22641ff7fa39"},{path:"web/lib/finding-contract.js",size:3664,sha256:"4db3a98db6f3095caa5f350656cd865f1bab80c1a9ad41277c9a8116a8ee6f4e"},{path:"web/lib/finding-rule-catalog.generated.js",size:166031,sha256:"7d04ec99a4487a4016443052ead21953dff86b0400ff593d361f5bb09e68bedd"},{path:"web/lib/finding-rule-catalog.js",size:821,sha256:"11c07273ceeeca1f9aaa2927d9dca55751fa4c15887473085675fd1123c742f8"},{path:"web/lib/findings-viewer.js",size:13566,sha256:"44c47d13caabf85f25f3a754ea79e75a12e3db6694ddba6eca45a0588d6171be"},{path:"web/lib/flatbuffer-reader.js",size:8059,sha256:"b877bcf9bf65910647731ea5b45f41a9a7d43e39c04e60766bf8ecf8ccffc6a7"},{path:"web/lib/format-audit-tabs.js",size:4073,sha256:"e3ef92a6a956350e7dd4c846d6fff941cebbf89cac597d4c94d98fed4648cd70"},{path:"web/lib/format-capability-view.js",size:42949,sha256:"35932d92108bec379610aa3f2d42f2773288fea22ba861d511fc7f48e5a01a0c"},{path:"web/lib/format-evidence-scope.js",size:16039,sha256:"1dcbce5c27e9d72be31427110c7ceddbc6654f068b11eb8cccc26ec4d74ac272"},{path:"web/lib/format-workflow-ui.js",size:15734,sha256:"aa559155eb27842e10adb325278a765794f153d9a9f7aada277a4e8ea5205588"},{path:"web/lib/format.js",size:11161,sha256:"241853dd3f9aabd45ca571cecab34e099318b6e6bb95e1849b8048d62089f33b"},{path:"web/lib/gate-policy-profiles.js",size:2649,sha256:"840f3481fa0ec94c438257ecb11831c99f3c2c4693b5f546d21dce1867f87c5a"},{path:"web/lib/gguf-backend-contract.generated.js",size:6132,sha256:"87ee27c72551a4e21f85b1d7ba8d48c9b99fc218a8a7e47beafb80b1689c84db"},{path:"web/lib/gguf-backend-contract.js",size:3462,sha256:"7f272f0835cde147a8d0d93ad3e5636b665d27ed704df4645822425401faf93c"},{path:"web/lib/gguf-codebooks.generated.js",size:52438,sha256:"0f749ad42ac914e225cf45eb47e7362ceb9d388f5248a12a4c48904db6db682c"},{path:"web/lib/gguf-runtime-environment.js",size:36848,sha256:"1a250d03bd1a21ee002b6ca2cbd47cb7d5fba91f14936117a6b638ab07b7b199"},{path:"web/lib/graph-export.js",size:14336,sha256:"56c6cc37dd3f822009f828f919d8115a0a2a66891616ab43b63f444f00ceea14"},{path:"web/lib/graph-hierarchy.js",size:8768,sha256:"f004503f219ea387338212223562f8a69e9a5fad5b2bd7675254599537a701f3"},{path:"web/lib/graph-ir.js",size:12010,sha256:"790b4a290db42cdea0e819248edc22abb2a98e36bc828301e62a54d1b6c924e2"},{path:"web/lib/graph-layout.js",size:9674,sha256:"8b9166f51d681562beca4cefe0f5f4ca80f768f7f92472367e9811556780c89d"},{path:"web/lib/graph-topology.js",size:3907,sha256:"c47dd3b704fa54f43f52ae89296863ad80fc2ee4e9bf09b972e288e536ec8fc9"},{path:"web/lib/graph-ui.js",size:44460,sha256:"ced1925451242d92b4458e5035154ca88a235c892a8128d69504cf76c4d04037"},{path:"web/lib/guarded-integer-expression.js",size:7693,sha256:"cceaff5181a415d9b34ffc2a2d1872c798a78bcae56bef486603abfc777eca33"},{path:"web/lib/hash.js",size:1614,sha256:"541aa5058fc2b712a25f00affdd442340a2a9fbcecc0b94b4b4634010b949ffb"},{path:"web/lib/hf-safetensors-contract.js",size:68674,sha256:"f012dbb373e022c44567045ca9a9bc745a8d4803cf647493225e6bec760027e3"},{path:"web/lib/influence.js",size:3284,sha256:"406bca5b20c5d66b668c2a9ebe0c577ae861a39f8474399ee6fb2d61e7f2231a"},{path:"web/lib/input-counterexample-viewer.js",size:20056,sha256:"541d119ff23efec154a65e39a1bbb4f37931b50a4474a44510c6e1a007ae1c52"},{path:"web/lib/input-counterexample.js",size:22907,sha256:"55a76dc863f43cf1b42c0f4da37581bda1df27e1a2ec3e3ac2b670b31a79165e"},{path:"web/lib/insights.js",size:385,sha256:"6a984abf2161cfe6063ba913bdeacd430a257e32a59b2043d0568960a46b9bdd"},{path:"web/lib/interface-contract.js",size:24321,sha256:"8be2d388110999031a7460e29ebf3f70d00b7e0d1ff14012d073fa4e0dac633e"},{path:"web/lib/kernel-inspector.js",size:194040,sha256:"eae6d5d27bd635a5f1ccc89b7525b08ae9dd3dc6e6cc25b384440349ab80ec0f"},{path:"web/lib/kernel-witness-worker.js",size:425,sha256:"f69d02315f5f882e8a450938088e68860026bc6ffab56192b7e925e61ff8ff89"},{path:"web/lib/kernel-witness.js",size:57774,sha256:"ca1de8cae8682debd742209d668854ab6b07a253bbbd1ed5e08554661b649e2a"},{path:"web/lib/litert-qualcomm-evidence.js",size:9216,sha256:"8dd6df0d1885bf18ff3a654ba123cc86f7a700e4fb2270624c70152c0bfe4527"},{path:"web/lib/llm-device-feasibility-view.js",size:7212,sha256:"176f4fb194e5ee905429eb08619c1eafe6c6a96352be5ce75c7a43d3103dc198"},{path:"web/lib/llm-layer-storage.js",size:6425,sha256:"fd31d3e3154b38ffc83d8c5d0585bd26977c6cb4e84e056946cd9c02b0e8e391"},{path:"web/lib/llm-memory-feasibility.js",size:10642,sha256:"f95840327c2d11aae482a3cf9c47376579b2d6fcefb5356e7db8952c2fdd4b5b"},{path:"web/lib/llm-specialized-projection.js",size:12802,sha256:"d2357323fdebe5ed5f80efe3d4d4dff06f3e4d3c59075ec503875b33f034e8e9"},{path:"web/lib/llm-static-memory-placement.js",size:13840,sha256:"660c68cd59e657b247608daf18ee2aad42dbcbfc15e42af03c77f95002487595"},{path:"web/lib/llm-token-budget-scenario.js",size:7838,sha256:"527a344d9feaca65f156da24071d1748ea722c54dfd862e1ed441e9955d3e6fb"},{path:"web/lib/mac-coverage.js",size:5726,sha256:"f44e380b593ca6bdbd8f681b0f139172ea65aeaa055bd100dfe5d792495e79e4"},{path:"web/lib/markdown-report.js",size:11571,sha256:"a8ca6a150f7893bc3076e8239c15ecec8143951dc926f4ee887319df2ade0d08"},{path:"web/lib/mcp-app-client.js",size:5003,sha256:"22459e68e49416dfeac5d075ac7d5c0a16df9f6294d71429c0adb9b304e08636"},{path:"web/lib/metadata-model-adapters.js",size:47270,sha256:"a6462dbddc16402faf0cb4e8aed84297077b00c7859491d40bd0aca66c1e34b3"},{path:"web/lib/metric-coverage.js",size:209094,sha256:"d2cb445a97477e5e623dc6180ae654bab02e52aa67f377a1340bb1daa0397fe2"},{path:"web/lib/modal-accessibility.js",size:2530,sha256:"e84bed83f3ebbe577e496b851b74ba5403c95f60eb2b13f8db151b0d5ae15c6f"},{path:"web/lib/model-file.js",size:15113,sha256:"8f871d7ff5e5ca1ba03a6d05204cb8fb027ab06b08eb6bcacbfd99abf2b83fed"},{path:"web/lib/model-glance.js",size:23524,sha256:"cd409577e872f7885909680bcd4a69f761364e1970d3fabfed73571a7b3b9220"},{path:"web/lib/model-ir-browser-export.js",size:6276,sha256:"9592529067c8fe1d14e84ca54b3322e1033db4fe09b4c4f0009081f83cd4db72"},{path:"web/lib/model-ir-generic-analysis.js",size:7219,sha256:"9c0ff392afc604db33db2c3f959cfb937b7e4f6e231065ce2a15bea070b20422"},{path:"web/lib/model-ir-visualization.js",size:26458,sha256:"50a344e4fc2ef5de5d5dba8d5e5892e0d816630cec333b4e4c3d2dcace6056f3"},{path:"web/lib/model-ir.js",size:28485,sha256:"69b9cbabede9ca91284681d856110c670111bc5b58875f3c1b117176450bf901"},{path:"web/lib/model-ir/internal/blocks.js",size:7339,sha256:"1e31d0445c09067d02e0d383550fbda6254909aa300686736d822eb7fdb54ef8"},{path:"web/lib/model-ir/internal/constants.js",size:597,sha256:"75efcae152fd1f45caa32b64d58c5cf5d2f7423894d2181a2675e2e499a11e4c"},{path:"web/lib/model-ir/internal/native-facts.js",size:3232,sha256:"4ce214b937f84b985171a88744770e4daf3498b6c8344678dddffbd9cc749bfc"},{path:"web/lib/model-ir/internal/profiles.js",size:7434,sha256:"b597cf0ef0a81da2cfe4a30a7737f48965cb00f0046e74023da5f4cd19feafa7"},{path:"web/lib/model-ir/internal/program.js",size:11258,sha256:"66ceed03f5b34060c8a15f13c643ba7c626a85dc99fbdd1846a541408fe2fe9c"},{path:"web/lib/model-ir/internal/shared.js",size:1561,sha256:"ab85e309bfbd59b2bcac64feee1dfd374d22f3038f30bec1048bc70d598368ff"},{path:"web/lib/model-summary.js",size:24304,sha256:"a485a6f4e9000ac6fe2f5d63b3708dbc87379b2c47068a2d30c840cf28b278f8"},{path:"web/lib/node-edge-evidence-overlay.js",size:8655,sha256:"06117f6d5738e6aa6939ca420dd772103a753ce958091d4bcd5ff4c491a7e7c4"},{path:"web/lib/node-view.js",size:80726,sha256:"a5a3c0fa327a0fec1308e4470dbb6edf2054b1c49f559f402e41d37f655015d6"},{path:"web/lib/numerical-abi-propagation-viewer.js",size:35394,sha256:"f9b40f2702041c3e89d41a21f7d88c5fa40163c1f66dc426236cc4f8b04fc308"},{path:"web/lib/numerical-abi-propagation.js",size:40612,sha256:"8a3e3d81fdc06524ebce5e85bc5fc73aba0dbe7d4fc5d6b01989c8ef8505d151"},{path:"web/lib/numerical-ir-panel.js",size:36179,sha256:"4d46769d6c01614f8bf7cf442a61bc88f65ef710fcb210da83467ed0a69426fe"},{path:"web/lib/numerical-ir/common.js",size:2963,sha256:"c5ca9dfb76a084a86b1c60a6f357eb7f7b4803886eaa4553d8ea4ad6d5944cbd"},{path:"web/lib/numerical-ir/statistics.js",size:7717,sha256:"f465d34f245aae513d7bf7f07911c47890c8d001613f1c4a90987b1251a7f69d"},{path:"web/lib/numerical-ir/weight-browser-input.js",size:1779,sha256:"0540553952a481a950561f2f165947722fb26dc2347b22809ee68f881fc636c8"},{path:"web/lib/numerical-ir/weight-contracts.js",size:8230,sha256:"8509c60d4379575792ea71183d0ae7ff8e5bb59e5b8f8142937a07819fbe221d"},{path:"web/lib/numerical-ir/weight-math.js",size:11164,sha256:"805aa94555bd6e351307e36606056a60a24f870387ce046524d607d03368c30c"},{path:"web/lib/numerical-ir/weight-sources.js",size:8964,sha256:"f00c75712dfa9de70e66da5e6169c9eb6bbf400a5c3035e9e4354775cad4ebb9"},{path:"web/lib/nvidia-accelerator-profile.js",size:6880,sha256:"100817f6b1d2eec2bc4b0350db4a8708de49c032b6fea61ed9656f7b551dc93f"},{path:"web/lib/offline-device-controller.js",size:7204,sha256:"debb5e0289aea51ec78ac7fb738aa3151f95237083f9c39c611151e41a634665"},{path:"web/lib/on-device-llm-contract.js",size:38126,sha256:"676b15ec62543137108e2b3fb33cd1eb214c90b19ec0694c5575fb8b6b42a9f8"},{path:"web/lib/on-device-llm-runtime-manifest.js",size:21918,sha256:"8d4ac075bba8950a1bf53c0a6685ca7c0bfc46b76bea27c149ec131dd798cc86"},{path:"web/lib/on-device-llm-view.js",size:27305,sha256:"77aed565b8e7e89d1cc8ce9fcb156d54477555dc5e8f7d928b806c001ee894fa"},{path:"web/lib/onnx-benchmark.js",size:16026,sha256:"66e49589c11ea1df2aa4c08f7c12910b6c0feffd5e64d9045c61875c67e5492a"},{path:"web/lib/onnx-container-inference.js",size:25717,sha256:"554b679ca0f6d49ae0a6cd2129323a21e2c051351ccd6f3d5412ccc8fb423535"},{path:"web/lib/onnx-contract-conflict.js",size:17077,sha256:"9bc48c1871f828a65cd7c1da812d27756fd28242521b68d8bfd03566983e9a40"},{path:"web/lib/onnx-dimension-expression.js",size:5584,sha256:"e9c24d6a53514fc6c2b5f740bde9d0f601072dd086bdce500de5419db568d730"},{path:"web/lib/onnx-domain-analysis.js",size:16108,sha256:"df74f73719a872372582bc401c34fb987bacc32c844e4c7588de3850702240b9"},{path:"web/lib/onnx-domain-viewer.js",size:68839,sha256:"f6134845bc2c184a09b28981b4d705134de8d2747bd719fba8691fe726c50436"},{path:"web/lib/onnx-einsum-contract.js",size:3625,sha256:"483ea748096ad2079d50fc88ae812b1130f85f4139bf28968672f801e8225284"},{path:"web/lib/onnx-extended-shape-inference.js",size:92548,sha256:"2df83c9cb64c828ddfd5a28c80ca16ebe56647b0631cb87488406610a2f0bb37"},{path:"web/lib/onnx-external-data-status.js",size:2356,sha256:"eb9ad04924317738dac2eac3aebf6ce8c4fd1908a5c643cd418024f306134e28"},{path:"web/lib/onnx-external-data-structure-binding.js",size:7003,sha256:"cbd2af4a87ddca073e2b5e63d4ffb2f6e3d9566c1116c695c672e813990238e4"},{path:"web/lib/onnx-external-data.js",size:2876,sha256:"aef473c86eac64f4cfb37d2378f3fac2099614486f4e799cc3b471b37d1f02f2"},{path:"web/lib/onnx-ml-imputer-conformance.js",size:13102,sha256:"fa9a10e4405d564d2147afa75eb5428f20aa049383cb47c8b3650ec7f0d69ad1"},{path:"web/lib/onnx-ml-imputer.js",size:16672,sha256:"d16b6341650acfdbbe26f0b51132d3a5d1ef7a612f86795caf9962508a724787"},{path:"web/lib/onnx-ml-label-encoder-conformance.js",size:19439,sha256:"ff0d645a048e7f84c8e3a92080b2ae7475697c81737dcb9ee50258747d6e4362"},{path:"web/lib/onnx-ml-label-encoder.js",size:28827,sha256:"ac0c5c5d02ef956f9af96b700fdc501b162be3eb9918cfe6df344bc5f8cf91ec"},{path:"web/lib/onnx-ml-linear-model-conformance.js",size:23260,sha256:"2fe74a510f45e15b3779caf56ea6a6d7931ee316f834af33f2a4c434133d3ca7"},{path:"web/lib/onnx-ml-linear-model.js",size:35427,sha256:"f04ef72f98951fe26cae261cdb19a16e4c5276f96a56076e5d6f60fcbc6c2510"},{path:"web/lib/onnx-ml-normalizer-conformance.js",size:11722,sha256:"d7e1543cb5d39f777d605380f832d32f9171923ecb6beaf9958193ef33add6e9"},{path:"web/lib/onnx-ml-normalizer.js",size:15660,sha256:"d5a3a82335662fec6d1efd5fcde4c9bd1e9db29a22966c4ce6d69054d629919d"},{path:"web/lib/onnx-ml-one-hot-encoder-conformance.js",size:12939,sha256:"839b60efc245541f69c7b1dc6eb81443ac6da87383774dcbdab6bcf2ef4a4668"},{path:"web/lib/onnx-ml-one-hot-encoder.js",size:17052,sha256:"1acb7b3894a7cab1988e39224c1770207035329d6c661aa7513ee9ac3552dd6d"},{path:"web/lib/onnx-ml-scaler-conformance.js",size:10726,sha256:"8d456a6a3325f2bf8de104ea9bee1d44cedc8d0af12a111ef9c6d6d0619ea05d"},{path:"web/lib/onnx-ml-scaler.js",size:13752,sha256:"80bc0046b10407cde2f30427757ed9e75d2724ca608f89a6fa50682d4b5a8443"},{path:"web/lib/onnx-ml-svm-conformance.js",size:16470,sha256:"ac2946710dae87cb2df660455fdff8a2800f1e9c737ecef67498fec0acaddfb7"},{path:"web/lib/onnx-ml-svm.js",size:52597,sha256:"ff2ae7e29ae395e6c61a5dfc6c70047170598a6f8b1bb2512f79ced057c0c7e1"},{path:"web/lib/onnx-ml-tree-ensemble-conformance.js",size:29336,sha256:"3b9ee05c06d9ed0625cd7e7751b151a17b77b9227df80b651aac77eb36711e35"},{path:"web/lib/onnx-ml-tree-ensemble.js",size:67959,sha256:"2fbeddf9c143db34899ffb63a48378aecf3886b2a54dba40cb3cbcee4e22282d"},{path:"web/lib/onnx-ml-value-inference.js",size:83434,sha256:"55479a55e3695b59b97af5e73a297f83ea01067c3f986a1d183479076c85e959"},{path:"web/lib/onnx-operation-cost.js",size:1207,sha256:"2f50364e6b142432459113c0ac6ac38b5726f0474a776521240ea01f6c4bceb3"},{path:"web/lib/onnx-opset-imports.js",size:3962,sha256:"f44a68399206069b194e46e22c84119012fa134e20d007df5807179e61b60fb9"},{path:"web/lib/onnx-ort-extension-shape-inference.js",size:14268,sha256:"8e15fac0405a9df8b59c3f1c93001bc52381125d7b181475ce11d5013a66578b"},{path:"web/lib/onnx-ort-matmul-shape-inference.js",size:8323,sha256:"ff844d6b589d3f255e42383f84b38c890cf4fdb2baa4b869bc3c86f23a571fe7"},{path:"web/lib/onnx-ort-recurrent-shape-inference.js",size:6336,sha256:"904c8eb0481710c94cbaf947dbb77c8471e8c6565e90aa4b8d148cd64ff4d16c"},{path:"web/lib/onnx-ort-transformer-shape-inference.js",size:16665,sha256:"64c968af5a40c12e04fd240fb5308479f463dd6e1e6f6270550bcdb40b0a7198"},{path:"web/lib/onnx-runtime-shape-binding.js",size:20374,sha256:"4f2db6c8c516dcdb41c84aec9893aadae71e6c92dc91c5de539c13237e110ecc"},{path:"web/lib/onnx-schema-legality.js",size:7187,sha256:"af81ab59cf53d1286492eacaa5cf42f181f21d54d28f9e337088dea33b4c12a4"},{path:"web/lib/onnx-shape-inference.js",size:197662,sha256:"16511660d816ca227a7fd6f5b18312a04a52b70a881803fdd1056155150e0e9e"},{path:"web/lib/onnx-shape-ops.js",size:2209,sha256:"14705c42a9cc89e5939663b159c94670c3d430f196b7eb7752bb0073d2138ded"},{path:"web/lib/onnx-shape-schema-generated.js",size:24656,sha256:"cb8d7111db5e9a97bd7109cba9368ce48f432814e97d35e50b217c210cd69dcc"},{path:"web/lib/onnx-sparse-tensor.js",size:10701,sha256:"165ced8b5a1fd092296ae876385798df95eda6875e9bf92563e3e4a84c473408"},{path:"web/lib/onnx-static-value-evidence.js",size:1930,sha256:"1dccc3d40904d88eb39b7397806bdec9755d2d2319351dd940e647b6b724c9fa"},{path:"web/lib/onnx-tfidf-vectorizer-conformance.js",size:23158,sha256:"d8cb2abd84840324caef8a296da409c7a03a3ab9bc8a900d6f2e96b710b93954"},{path:"web/lib/onnx-tfidf-vectorizer.js",size:23723,sha256:"482d106fbeb04827d4f684bf3b381894ad398056f6e5354fcc6c8be7d7b226b0"},{path:"web/lib/onnx-type-proto.js",size:27706,sha256:"64ae4ca6e66c80e717c54eb2ba022a5590d3738b9e857369923ccc5d1346c0ff"},{path:"web/lib/ort-build-attestation.js",size:11721,sha256:"39f07c00788df072e6228bd613f9d3177f95e248209b0856d97fa891be3e3081"},{path:"web/lib/ort-compatibility-evidence.js",size:35903,sha256:"ccd8549fa08a722c212dd2dc62700bd8707333b0121588e87d47af325fb7f097"},{path:"web/lib/ort-reduced-operator-config.js",size:10858,sha256:"a55653affeb35c412510a111469c0363d0e26bff371c49e8369d1d269c8e6e7f"},{path:"web/lib/ort-selected-build-binding.js",size:5560,sha256:"ced4db25d3058cd11cc568690d1c22946dd736594a0c426bdf218d79f5e17a88"},{path:"web/lib/overview-domain-map.js",size:7529,sha256:"142228ae8f3f13f65dd1dade7c022df737e27b97b37f912162dec98cde0f23d7"},{path:"web/lib/performance-visuals.js",size:117704,sha256:"37b3346f436ad96f8caa1b84644795049fb92b736b90d3b6bf252b31a90ebf83"},{path:"web/lib/placement-comparison.js",size:5482,sha256:"24e94e9c5e45c6f5ff9c24e7dba64acf909e1fecc29efde60ab7128543867504"},{path:"web/lib/preprocess-ui.js",size:2001,sha256:"2078bbad83514502a506133551db66358855afae6f9e5c47364e9a699cd5ad04"},{path:"web/lib/preprocess.js",size:3935,sha256:"5a406429b025c53da5d3428b8c89a24a35cc8b1bea9bab9eb43e930aac0bd24b"},{path:"web/lib/preprocessing-consequence-core.js",size:19181,sha256:"4e60e54f6b1965d5f6ab757df266d4ef88af90caec6d55b704a0baabc016a25a"},{path:"web/lib/preprocessing-consequence-runtime.js",size:8046,sha256:"1e1c0ab5908b155f9bbeb2814915d9cc3edf0d4e81b3be9a1c7c9ee063d09939"},{path:"web/lib/preprocessing-consequence-validator.js",size:11679,sha256:"17597e9b81e232a764848da88b62131f29f4c86364e02d93ca86cb9d145953f8"},{path:"web/lib/preprocessing-consequence-viewer.js",size:23440,sha256:"f56d1fb5af6e7702126d4c941544e4e790653a06859690c0ba6ce782389577c3"},{path:"web/lib/preprocessing-realizability-viewer.js",size:21096,sha256:"d6ef794060abfdf70d2be83ddf254cf44dbed114ed1b7e332e1d81921ade1814"},{path:"web/lib/preprocessing-realizability.js",size:21317,sha256:"f1a412d3e7458068593f180e28ab82125205c5a87dc06892e39a8339b32ba2a3"},{path:"web/lib/protocols.js",size:8818,sha256:"0e24e0e00856df1e0fd5757acb2dac78a48f18d13ff2e7f513ae39b53ae7bcc5"},{path:"web/lib/public-cyclonedx-export.js",size:25087,sha256:"6decee757f1632a8bd718ec0868fd5bb87d6a7493b99f9afe919222e433dafce"},{path:"web/lib/public-evidence-package.js",size:7486,sha256:"ed1c48c9d7cfbc62cea1e41780d591703843ed3db29703ae81a6f472b268ca2a"},{path:"web/lib/public-export.js",size:5583,sha256:"ae7781e44ab3e0ef9a213d400f1837aeef5ca75903cf30aa4dc3cb81625aac4f"},{path:"web/lib/public-key-signature.js",size:10306,sha256:"6044ca306cfd5239dab6f61fa35374282f698d5c683b9e7b5a30a73cd6a3c735"},{path:"web/lib/public-product-contracts.js",size:7420,sha256:"6c45fefbd7f4317bab7e6211e2da9338d21fad393019ad6a6a7055e531ede42f"},{path:"web/lib/public-verification-manifest.js",size:5154,sha256:"ca0e59c5dcd0fa5f9b7a52e71d059b8bcfc28512c590f432038c953d11ea2737"},{path:"web/lib/public-verification-ui.js",size:1601,sha256:"10b3908c7c3f641b1c29d00cc148c132a57c0a1d3a57f12a2bff1fa3b3edc59c"},{path:"web/lib/quant-evidence-chains.js",size:25659,sha256:"f57eed5cf3d8f96ec783e4b55d856c2caf0eff2ca612bbd37d9eeb30d401f6f1"},{path:"web/lib/quant-evidence-view.js",size:23925,sha256:"c33fa3b4e9640398b739b27dec540f23c2856457980a287fadd0c510b3f33fe1"},{path:"web/lib/quant-research-applicability.js",size:12384,sha256:"202cd634a7b6db9b1fabdd0643878b29f1a509da50d21d825e8bdbb4085870c0"},{path:"web/lib/quantization-contract-summary.js",size:29914,sha256:"ac24469aeabfb04b5fa96b3c8b51626f410eaef2ac209197f6476d600f41f24e"},{path:"web/lib/quantization-lattice.js",size:86930,sha256:"e3af077fa2f46ef6403a2a31d29265a1b08350b3e6a24bcb8d863c194eff27c0"},{path:"web/lib/quantization-math.js",size:3689,sha256:"190e0c584d5ff653b75a8dab852bdd329098f905c2e9fe52d08ba5b978163b27"},{path:"web/lib/quantization-research-suite.js",size:7497,sha256:"275b483b9ef2a2f1aca90d104e5561a277a0aacfea5114c96d5c72f9cdea9e9f"},{path:"web/lib/reason-codes.js",size:3433,sha256:"e53d26d8d60c4794c2cd49b479c82b5b98a71a501cde7cb890f10c751a90ad90"},{path:"web/lib/redesign-codegen.js",size:29491,sha256:"d9301b2e20b1de7564d22f1ffacd2fe7628aa3d900fd425bd5ca660623cfbb5e"},{path:"web/lib/report-bundle.js",size:13558,sha256:"d23c53de212d6e8a56df04530415aa8108de3b04a4062f6a21f8a9c5b768f7b1"},{path:"web/lib/report-change-analysis.js",size:3447,sha256:"8182a7a5f030f009a23e753511977903869415144d8cf2eb41bbc8f6ba7dec9d"},{path:"web/lib/report-conformance-common.js",size:3718,sha256:"82b98cd95a4cb92aef4ad9178ea14744077a14a7e49ecac50718c1e379c2abc1"},{path:"web/lib/report-conformance-coreml.js",size:20343,sha256:"b50354fe658de662f14c5b2a2078154674933357de83377ff7d0c583661aa64b"},{path:"web/lib/report-conformance-execution-placement.js",size:908,sha256:"ceaaccf364ab879333027b4b58d748195ded914c2d2d53b684e15e2f917f4376"},{path:"web/lib/report-conformance-onnx-tfidf.js",size:9874,sha256:"eb9419917868e09acd27bf53f536ee1f1ec48ec524a56d4b3cf475645ef17af3"},{path:"web/lib/report-conformance-onnx-tree.js",size:18448,sha256:"1ba6e13fa1be4156555d2b12358fa210ddb3e095193d48dd3fa0f56d900ac1ad"},{path:"web/lib/report-conformance-onnx.js",size:273879,sha256:"4a49b64a07fc87df6319f7065cf10034c0be1bedad8326d91d1d59176c359ed4"},{path:"web/lib/report-conformance-ort-runtime.js",size:9034,sha256:"2baf6baeb86992208c85db50db5c489f07185428064e432fc80c3bdada25eee7"},{path:"web/lib/report-conformance-runtime-helpers.js",size:61731,sha256:"aef9c03af59a16504bf4437fee5d815a1c9e072bc142aaa2548cbba86796c828"},{path:"web/lib/report-conformance-serialized-containers.js",size:36966,sha256:"e33e78f251b3c5b6fe011682c1b38689f955fe4436f99954867bcf9e54e52d4c"},{path:"web/lib/report-conformance-tflite-storage.js",size:30496,sha256:"0577ff0fe6d558b66ddc4505c91b479dcfb4e74fa402d5e08069e6ed8a0c6bb8"},{path:"web/lib/report-conformance.js",size:221838,sha256:"f675afc9863a1fc790c3274b792fe7bacbd812e73d4e2a1f6711ce4a26598041"},{path:"web/lib/report-context.js",size:3927,sha256:"4a5727f0906d6c6ddbce2cfb0bc3040d2530a4d43adae8e93cfd90139600e9ef"},{path:"web/lib/report-engineering-deployment.js",size:30614,sha256:"0718f6d413ddba43a9b66081f51d3f89b396fc9558f79b185b23ca780ec790d8"},{path:"web/lib/report-engineering-derivations.js",size:7907,sha256:"4ef0ff3efc595b7e5457b182bf7ed43b7e5547f455da1ba60ce8d5ac9cb9e1cb"},{path:"web/lib/report-engineering-dynamic-shapes.js",size:8129,sha256:"8b363c6242992c673269eaf16b5207805177882714e83ebc3f6427333e0c4abb"},{path:"web/lib/report-engineering-entry.js",size:195,sha256:"16041e14670b18cc9cd38a19ae2b9c298e87a69543cfcb452643b072bb8a4d35"},{path:"web/lib/report-engineering-interface.js",size:9334,sha256:"9bdbd5b10595ef083e817f13d9c4d27424d6969ed0995a4904ee8eb41f5c8cc7"},{path:"web/lib/report-engineering-kernels.js",size:6965,sha256:"6caed86ebeaccf51e42f77f9d49620387001118320df843b062ccfa8c0edca91"},{path:"web/lib/report-engineering-onnx.js",size:111908,sha256:"464a1db52a50387694e3702bd7f703ccb3bbf5ad3d8438d9bc530ba3cfcb5c8c"},{path:"web/lib/report-engineering-quant-research.js",size:83195,sha256:"2593a58836820c8b1e49e912c8e7dd89f6f60fe5d9d040aedda2b32727aa24cc"},{path:"web/lib/report-engineering-safetensors-quantization.js",size:6885,sha256:"1e983005c8f914b4040b2f7a186499dad391bff325aed513c708b33f4d6e39ba"},{path:"web/lib/report-engineering-serialized.js",size:65203,sha256:"878fb677d2987524f2b00c42abbd04bd06764313102748ce3eeed8993b6dcbe7"},{path:"web/lib/report-engineering-tflite-delegates.js",size:3878,sha256:"69f381ce7a192bd0bdcf020984267c9e71b75a74fafa132486747c0124bb4a86"},{path:"web/lib/report-engineering-tflite-subgraphs.js",size:14592,sha256:"09d2944c233d97868089aca25c1b5848022195d2271b92f1f91670ee9f6478e6"},{path:"web/lib/report-engineering.js",size:264552,sha256:"5579dad1c4533071e9bc5e4859a1d2c035e2053204ee9658f030b6381bc9ab9f"},{path:"web/lib/report-evidence.js",size:81858,sha256:"9e3edeb44d4dff8fe89f11ad8687b682da6a36c322bdf0f5626fa0eab6c72de9"},{path:"web/lib/report-execution-placement.js",size:10673,sha256:"885fbe009a3e41020129d7f1870536d97b7fe916ffcd48b7f7fcb0e6422fa875"},{path:"web/lib/report-export-contracts.js",size:126428,sha256:"f42b943ad878aadd2c9692c37f7096b2c9cb51e3bbba849f94565b4fbcaa09fc"},{path:"web/lib/report-findings.js",size:277256,sha256:"b534da972245d19e631e12194f8bd88e6de56a97e0e2cca384f590ad75774522"},{path:"web/lib/report-integrity.js",size:7267,sha256:"4ff84592676541ed66488021ecc25db15e2f63bb6790c4a5c778f04a76fe80d6"},{path:"web/lib/report-metadata.js",size:23313,sha256:"67196abab4bb37ea5ca92d158c5dcca0726d1d4adfd3f359106feadbaf3f378a"},{path:"web/lib/report-mlbom-compat.js",size:9935,sha256:"11df5b9e6bc7965af4eb63c3e3f55f8a3bbd25c48b3a5f3fac0a99c940939df0"},{path:"web/lib/report-mlbom.js",size:1447,sha256:"5cf13dd801d23b3eb4650224f60df7c61a3dbf13e1cdc1bef19d4b06aa45db52"},{path:"web/lib/report-quantization-contracts.js",size:75351,sha256:"012e2a78b792ee65515b110e750cf4f877335522583b182584598850808f563c"},{path:"web/lib/report-raw-entry.js",size:496,sha256:"c692c3e6a0694693f3c073fd34388db064b3f3c6102ad41ccaf9e63636cc34fd"},{path:"web/lib/report-regulatory-entry.js",size:64,sha256:"3618d07dce1b6fc0f5627ba0498201fd7b9dfb69ea362a1388d4b76f0b04f6e0"},{path:"web/lib/report-regulatory.js",size:18307,sha256:"d7dc13924e8d37e10b99d596886425b4f2b8fbe926834bc4b41e20fd8a5b2b2f"},{path:"web/lib/report-sections.js",size:60016,sha256:"d0f14f95b861792201000d6de7e07bf02e83bb250ca5e419a8c0ff6060e229b3"},{path:"web/lib/report-security-posture.js",size:7651,sha256:"6b616fc950c918907381fdfaf2c2c896699c22e21817169e20af08136cef4e89"},{path:"web/lib/report-store.js",size:17294,sha256:"e2ab2c15551b38b062853de932dade12f4f3bc8474769a70dbeca0f9faab9d95"},{path:"web/lib/report-utils.js",size:8672,sha256:"83ed431b693d469135815d2c5ce7d0b35b0ec0aead7817353aef241488741270"},{path:"web/lib/report.js",size:2832,sha256:"333f6469952b7fb9c575eea170b3ea7cdfeed95b1f735bcbae082c13d217f0a0"},{path:"web/lib/requantization-fidelity.js",size:43815,sha256:"3f14f1a83d834b56d3b1fc10443195090c30c6ac3fe2da2d5657c8bb0bedfcbb"},{path:"web/lib/research-visuals.js",size:10197,sha256:"473195a7393d9ce86d19ed38b105e7adb82e25259656c450dfacbdaf474fa3bf"},{path:"web/lib/research.js",size:71738,sha256:"372ef5a64ce4fdc35eef8b3c4ee15b88fe5a830af5f7c3b5e60e0cc81261f2a2"},{path:"web/lib/residual-contract-distortion-worker.js",size:457,sha256:"c8ced197c93f05882e67a8e070fd7d06286433a863211c0de9ac23a70bd98fd1"},{path:"web/lib/residual-contract-distortion.js",size:44782,sha256:"cebe181ca78e8aeda25911cef52ccfbf32771d3bcaa25ababe6064b53396fd61"},{path:"web/lib/residual-step-response-worker.js",size:439,sha256:"015d02d98d815e96cad0d0a769a4c9077a6339f570f71e8f20fdb53cde969d5d"},{path:"web/lib/residual-step-response.js",size:43635,sha256:"ab462c38e3ffa1f2ff7be66f03dd3964edb16ee6c1ecbca1c9a1a6fe6c669ba8"},{path:"web/lib/review-export.js",size:15054,sha256:"9ac8ef3b69b040f30f97e823132763a687c9d0c725ffbe8d2bc00284169afc0e"},{path:"web/lib/review-policy.js",size:9404,sha256:"4547d33de6fdacae604cca47b22a0953e7bf0bd5fc0e9bfa4d0672b7b13f29c0"},{path:"web/lib/review-summary-view.js",size:6521,sha256:"11db1f256dd0d020c2c2dc0dddfc5fc1b93bedf5f741520b9095d4e8efbdb780"},{path:"web/lib/review-summary.js",size:10804,sha256:"90e866192d9733fc01e62762ef8770e492d5810974e69912e4485a8d3967436b"},{path:"web/lib/rgb-png.js",size:6636,sha256:"83fdee7d9a5725a9243c83c08de46ab39f55b26f79afa894049138c76d82bb6a"},{path:"web/lib/rounding-equivalence-worker.js",size:443,sha256:"99d4f1f6a0ee4db28ab4476129afcf105413c4f0c51fa6e66bcb8224502b5f70"},{path:"web/lib/rounding-equivalence.js",size:57037,sha256:"c8e5b591293d710f5d2470501af64e1288c7d9b4b6ac6b39a75a50cdd5e5a69e"},{path:"web/lib/rule-explanations.js",size:3630,sha256:"ced61760100c5763f8dd2ea195f72a5c4d7b1c879bfd0d08e8656fe59a0b2780"},{path:"web/lib/runtime-backend-evidence-ledger.js",size:8221,sha256:"079a7730873d2eed3a539b86e5c40ef535728a1c5df4e160ea9cf3e50f0308fe"},{path:"web/lib/runtime-data-movement-evidence.js",size:4538,sha256:"7104bf007b75d67af6f2f0af6dac2780744d7dfc86ccb50d6d69988bdd930164"},{path:"web/lib/runtime-evidence-closure.js",size:16122,sha256:"8496f97365db4de46724dc0c2138eb17e41c0cd7692c03e91aeb3beeed4bb271"},{path:"web/lib/runtime-evidence-controller.js",size:10548,sha256:"6f03e82d75f312153c5372ec64f519cd68de86bfc98008ca5daf9cde776c7bc4"},{path:"web/lib/runtime-evidence-sidecar.js",size:17062,sha256:"72771618980755a16a9f3c591077a4a3cf749016c39e4997ded5c5d0570ddcce"},{path:"web/lib/runtime-memory.js",size:18287,sha256:"020c399ec9d0f173f75b824025bd5141de4d43b5ed9ea17edc02a9ca63963d29"},{path:"web/lib/runtime-module-loader.js",size:1937,sha256:"4e3c6abb7bc7b801e7f18f136e83d5f61d170661d4872c1f3eafc11df30ff5a6"},{path:"web/lib/runtime-profile-adapter.js",size:40467,sha256:"77f6baf62d146b838920961c3be7a89c6db8a8afdd579225e443b74581826c30"},{path:"web/lib/runtime-profile-modal.js",size:7457,sha256:"4319369f1b909dd31c720983a1185015650c3427490bf1aed8195eb22d1706da"},{path:"web/lib/runtime.js",size:13127,sha256:"94b25ce1cd8ddaff8dc744a9d711d455c2dcc4a36166d5da2f7d23edb7814a56"},{path:"web/lib/safe-source-artifacts.js",size:64368,sha256:"7802fd544a7508d8d749f704f2ceb1a67f4be70efaf2a5dc8a4804f24e8436cc"},{path:"web/lib/safetensors-quantization-contract.js",size:58754,sha256:"73c6e1943699dd6d22413a06f491a0bc23df8454323c901cd4be654110dc5c84"},{path:"web/lib/safetensors-quantization-export.js",size:2024,sha256:"70d9300b8e38027df8c5ac0c9861b4b99fd14b64fb246f32a9f564e065c53122"},{path:"web/lib/safetensors-quantization-view.js",size:6281,sha256:"ea290d002635e7754fe55be6ee10ac298dfc540a3ea4a03b6bb9b402bdad2cac"},{path:"web/lib/sample-library.js",size:14539,sha256:"4f8931d09d5fd195cb97635938d01ebf0aba094bfd5ee1ac7a28b86c5574c56d"},{path:"web/lib/sample-models.js",size:18933,sha256:"297070b218664f35f387572bf78fceb872ddc85f0ab026eb8a9bf58693b32695"},{path:"web/lib/sample-verification.js",size:5159,sha256:"97b641b8cc38f1cae453402b84b0f003f221b7266a62c6c26f32f3b81a645acc"},{path:"web/lib/semantic-artifact-diff.js",size:14098,sha256:"ae9740f00c93c33764baf90f846a9ad55cd70744c419471b4580e987c8497740"},{path:"web/lib/serialized-tensor-view.js",size:8275,sha256:"ffe04435944a9069e0667c90624cf7a5776565fc8fc84b7fa6a4db519fd25c9f"},{path:"web/lib/service-worker.js",size:1847,sha256:"aad329bb0b5713600d4d9326e0a8dcc2c5b507d7ab9614ec13d3d7e4283719f7"},{path:"web/lib/session-evidence.js",size:20558,sha256:"ec88759a4cb0649b2e46788c139435106157cddacc852ef88b593e7e5c730211"},{path:"web/lib/sha256-sync.js",size:4664,sha256:"7c9b351bcb453e579fc5166c4774313957f75fcc36f6e18d61c3027d0c8abd9b"},{path:"web/lib/signing-key-trust.js",size:7208,sha256:"a53aa5e04809435e988dd2232932b13cb49bbf6aff65b3db10859527e4165e3d"},{path:"web/lib/spdx-artifact-export.js",size:3151,sha256:"668ef678cd44950115cbb4d53ac1611490766b646f29d129c7f39280ac0f9ef0"},{path:"web/lib/static-audit-worker-client.js",size:4150,sha256:"9f68aba5ad8bfa79e7c8dbbcd652ae72d80cc334ca84712024f86e25c1cb88d6"},{path:"web/lib/static-audit-worker-protocol.js",size:1557,sha256:"97bcbf9548a6fae2f8d1989861294693a627fa23376c98e112a25d8dd4570f98"},{path:"web/lib/status.js",size:5536,sha256:"a59af553cfe378d4dfee6cc4aad728ce935101b967aaf5a4ada6adefb8adc057"},{path:"web/lib/storage.js",size:4063,sha256:"974760ad15b82f7a9155b790af54db1db7333f86af4180d5bc3cfd6d95803b10"},{path:"web/lib/strict-json.js",size:2663,sha256:"d2a99f28bba82126fe54430aadef919610e702b80cba7b5ce0308f870fec3462"},{path:"web/lib/target-profiles.generated.js",size:23411,sha256:"191ccdf930f49e3a4e09c1a5d150968728a33fe6aa04eb3e4651f421222aac27"},{path:"web/lib/telemetry.js",size:5941,sha256:"a02037c33a946fbcc678af163e308d1ec6c943285f7fd32314bd3635152880b1"},{path:"web/lib/tensor-inventory.js",size:6248,sha256:"5368dded61c170bb4b2db2a15baff19999efb9c2fbc542e62331935742eadc52"},{path:"web/lib/tensor-numerical-integrity.js",size:60107,sha256:"45108bef49171a2f40e1c477d0d42caf90018044831eeab3bd1ce31321fb2d75"},{path:"web/lib/tensorrt-cyclonedx-properties.js",size:3766,sha256:"9ea1390d0833708d85326bc2cac443e629a7bbb82f2bf0986ba3ca4e1207de9c"},{path:"web/lib/tensorrt-engine-inspector.js",size:16986,sha256:"6f772f7c8280c53affbdacb7ef685c4ff9571833ab8c37a69c6aa198069fb455"},{path:"web/lib/tensorrt-llm-contract.js",size:16801,sha256:"ec625bffb249a3d409197c9c9e08295b2cfae877cf620828f6f512d9bb8ab4df"},{path:"web/lib/tensorrt-llm-source-metadata.js",size:1764,sha256:"e1bad70c4699155aa0b1b011984508f384608f185b452d7b721b9d7016e74814"},{path:"web/lib/tensorrt-profile-cost.js",size:5015,sha256:"07fa4a42582b063ddb4526675b6a6ef59c17113dc19e9d25b3ee3f2b4d937b5e"},{path:"web/lib/tensorrt-source-metadata.js",size:3838,sha256:"2d026449d6e1d0bed34d93a47db30cc322a453151faf1e0579bdfe8ba9329b48"},{path:"web/lib/tensorrt-static-preflight.js",size:26703,sha256:"2684637b2c077d597b5759ff9c4345eb656e7e1e7bd4b3e0c3aeb3fe6892993f"},{path:"web/lib/tflite-accelerator-source-profiles.js",size:10748,sha256:"c5e514ed822212411087b4898e30a8024b50ce90d06421917ef3d510a19b835c"},{path:"web/lib/tflite-analysis-contract.js",size:709,sha256:"0bf420747fdb57fd899887fdcb4e58feeea9b1004f889190da8e2c329c649192"},{path:"web/lib/tflite-benchmark.js",size:4653,sha256:"0b450c19dda30f7cb97a9dd573df39386a6c9a6e7eb80b82dea2d9c253bfe1bf"},{path:"web/lib/tflite-build-configuration-binding.js",size:7763,sha256:"18cf9b94e6008df0231e6e265c8e413f0a2dddf0d2cd643a3378f6eb4303dcd1"},{path:"web/lib/tflite-delegate-compatibility.js",size:8536,sha256:"5d83d1ed938071a182fac564a431a10017e0be8079d265cd54e600cb2002e709"},{path:"web/lib/tflite-delegate-rulepack-metadata.js",size:4234,sha256:"e355e6b15e850cbe5604f55c9e1cf115dafc16e74dd43f5c7ae47d4fc8966c0e"},{path:"web/lib/tflite-profile-info-adapter.js",size:24664,sha256:"7377773bd1e6af514edf7d12cc6ca2b4b182ef3f0a52a3a4eac5cfcc35e5829f"},{path:"web/lib/tflite-runtime-info-adapter.js",size:24763,sha256:"3efdfd2038b9ecc69c3a93546b9959f70fd62ded31f45da9e4350834b26a3332"},{path:"web/lib/tflite-worker-rpc.js",size:2284,sha256:"edcdd7dbb919cfbe73eba9a778bfc96f8ae8b49c821a9d3962689c9beb7117f2"},{path:"web/lib/theme-ui.js",size:3658,sha256:"3957537ebeac861274cec6d78a397ac4c36ef2206e874d6e1c94bbf5c55c098f"},{path:"web/lib/transformer-architecture-projection.js",size:6932,sha256:"fac86b3326273bf29ba0747ff8488b9d5d18b692b155843983676ca4d6dcb358"},{path:"web/lib/visual-export.js",size:70147,sha256:"b9626a26b4e327e1b6c448f18ac6ad7555868ea1b8ae8e27f6b73967dcddb37a"},{path:"web/lib/web-usage.js",size:1808,sha256:"49562ccf0496c61bc8301099d7c7dc7c1dd9626e98b412d5023a3a1423497912"},{path:"web/lib/weight-analysis-view.js",size:14417,sha256:"57281f49accbc85baa8ac1e47d7090bac300a973c794dd32ffa2ac074fb214b0"},{path:"web/lib/weight-analysis.js",size:20482,sha256:"e20f30ad71c233faba37bb4ba433dc1ce3254ac20e634b8101c7f7378e198ea4"},{path:"web/lib/weight-hist.js",size:18729,sha256:"a2f6ddcc20d2e5d783a4003c47e64810ebe0c1e5da63f946b758386efb52e92f"},{path:"web/lib/weight-ir.js",size:7413,sha256:"7bdb6b3b104e7b4c8aa8c724bf468b29b2d559a0c916fac6884b498581497122"},{path:"web/lib/weight-pruning-view.js",size:20639,sha256:"0f34f0b2114eff58fc62fe1bf14089ce47007bd706253d0c5127d043ca751d00"},{path:"web/lib/weight-pruning.js",size:6085,sha256:"40bb53a0397c16fae35e4dc97d9b3bf85d98b6fca582b6d7cb7701d4e4c76933"},{path:"web/lib/weight-visuals.js",size:12299,sha256:"c3c8fb2c2a9ce9d6d796850a8f71d4392850dcfca542e8f8767664d3dc0963fd"},{path:"web/lib/workflow-controller.js",size:12843,sha256:"c42fff5bc558e3948ddf815f93c919948a7c96d75f650f29a1dad8ea0ae8f443"},{path:"web/lib/workflow-copy.js",size:11495,sha256:"7c791110b8de61f15b094fd958dd731617fe507aac5d1b8e299781224990300b"},{path:"web/lib/workspace-navigation.js",size:2516,sha256:"db1355e2eab4eb47800325f81fe95946aa2d408fddc6624fbd8501b89be0c65a"},{path:"web/lib/xnnpack-rulepack-metadata.js",size:905,sha256:"f42250b981488417d038a4e6a778979852e93bfff9c7fa38774d2853af8bd975"},{path:"web/lib/xnnpack-selector-evidence.js",size:24647,sha256:"6b0e751683f7a42c7706cb8eb5f3885e00b2a865a470fe4a7414f669183b3e8a"},{path:"web/lib/zip.js",size:3304,sha256:"2dac7a8a38cf5cdc2b7155c70497a3ecb901aa7a2c36a072d9ea947546a86500"},{path:"web/manifest.webmanifest",size:528,sha256:"227e1e9108746156f974c1f1696f97a37fed7a0ce432c39178600336f154935f"},{path:"web/medical.html",size:528,sha256:"b62539eef4b11e8e8ece32dbc61cdec4392b3cde6e4cc238c3eea60368366650"},{path:"web/og-image.png",size:69488,sha256:"1990d2a0106b007dde3f672ac1e6bef40e24a7d941d2cbcd26ef5410229e105a"},{path:"web/onnx-domain.css",size:4821,sha256:"00a7203c041513ab2ce6fe940436bd5105f72da3c36f10b49660791f62d05d98"},{path:"web/onnx.js",size:270149,sha256:"912e4ab0a2de3aeb06d42e532784c3ed5220b104667aba8dcb10d8b6dc74738d"},{path:"web/reference/quant-policy-boundary-validation.v1.json",size:1905,sha256:"991eb12596486da9841022efaf3b9a13a79f632d5c6349e7ad3dd677a55338f9"},{path:"web/report-workspace.css",size:18027,sha256:"feaec3b381f7c28d65d44a9c587f3b26998dea7e424f8856e0c274dfe18ef5a6"},{path:"web/research-labs.css",size:42583,sha256:"795a0ae56fe7750a767d40a3dde2894300b07e3e2922ca35d56b6a45d301b730"},{path:"web/research-theme.css",size:59715,sha256:"5a165764ace5d958a0036a592bc1d87d1454a162aee6d977b25acda57776a92d"},{path:"web/samples/MNISTClassifier.mlmodel",size:395695,sha256:"816d1a222d5272109166ffc819d7ce44aff923a673884e34d982aa74985ba587"},{path:"web/samples/README.md",size:6158,sha256:"795e3c002938112e341bc6efb686b6b6a5cdcc135c5378474bd15513fba46161"},{path:"web/samples/evidence/gpu_partition_probe.observation.json",size:5884,sha256:"47f4ca813a9b6a22ed7707e32fd2e528ce700bd41416f807fc352998697191f9"},{path:"web/samples/evidence/tensorrt-8.6.1-rtx4060.profile.json",size:3944,sha256:"4162a34889d56c3adad54bfb22e611558918323ed5ff64bfdfcc2aeb8d8b1876"},{path:"web/samples/evidence/tensorrt_supported_probe.observation.json",size:5646,sha256:"0b70b2e788341f6cb09e71185e72d44e89304be806729ffc60e72f964cf048b8"},{path:"web/samples/evidence/tiny_decoder_llm.observation.json",size:5672,sha256:"07dcd52f5c55f8943a64d20ce21f3faebeb4850bf3b6d0f378853a740f50be57"},{path:"web/samples/gpu_partition_probe.onnx",size:1350,sha256:"82a2feef00eb6ab03d82f2b30cd17f4d826e2d8307cb059eccd6a0f3120059b2"},{path:"web/samples/mnist-8.onnx",size:26454,sha256:"2f06e72de813a8635c9bc0397ac447a601bdbfa7df4bebc278723b958831c9bf"},{path:"web/samples/mobilenet_v2_1.0_224_quant.tflite",size:3577760,sha256:"f08d447cde49b4e0446428aa921aff0a14ea589fa9c5817b31f83128e9a43c1d"},{path:"web/samples/nanofable-1m-fp16.safetensors",size:2758256,sha256:"a35fd03f52c12f4e78a246bec1927e9a169377fbb8905dc13165d285010e7a44"},{path:"web/samples/tensorrt_supported_probe.onnx",size:1394,sha256:"15e9cd555dfdedcc4ef6a313e40efcaaf3d18dd2ee502018f335fec084118e47"},{path:"web/samples/tiny_decoder_llm.onnx",size:5798,sha256:"1fa4d75584011ef9223c6ccf815bc2c1830424b637533bc560a5be2f518f22ee"},{path:"web/samples/tinymqa1m.Q4_0.gguf",size:521248,sha256:"cb95a6e10f28b76a1dd71c15560dec5a5eee8943f591ef45d11c129786b22cff"},{path:"web/styles.css",size:266617,sha256:"2c7ea255be3e7a0c01bebb1e364d8f3ae40b7043e1e3301bd891fdb84262cd48"},{path:"web/sw.js",size:16835,sha256:"33886eb64aa13d99fc8dd20292aee2a23be4aae013fdfe7004c574ef2908e8f2"},{path:"web/test.html",size:2209,sha256:"7c0764f3028779297ec11b0730a6ee29e77753c31c93c95b90415f1adf5c2191"},{path:"web/test.js",size:3867,sha256:"9d053130199dbd57a6d0dded1f8b4d8bd11f6add2972df16c4dc59470c682ce5"},{path:"web/verify.html",size:7685,sha256:"db33e41bafe84c7b903044ff7eb41af6ad64b9c0de634e719c9dffdb4447be4e"},{path:"web/weight-workspace.css",size:19534,sha256:"9a7d5c4025a37c740d08114e5be900584bd38efc97ace5c8747d68d6cb46bcd6"},{path:"web/workers/deepbom-analysis-worker.js",size:1340,sha256:"df4509460e1969dbd35ba9835cc83cb83c82c65d8d81fed14654f79c84fe28be"},{path:"web/workers/numerical-ir-worker.js",size:965,sha256:"fb3777c600e06ddfbc3c892ee206d6554c670b65201098ab8b5eba5f6ee33147"},{path:"web/workers/static-audit-worker.js",size:10582,sha256:"5df420a4e885b1909fa77326597645d275f68604a2479d405910d7bf202a32df"},{path:"web/workers/weight-pruning-worker.js",size:1433,sha256:"c599054a6a329cc44432fea8a5c479e707ceb785d565e793751ca6cea3cd41d4"},{path:"worker/chatgpt-mcp.js",size:31237,sha256:"3fc8814d0a5649c87db398189d64151308768b55ebdae7db761f42e3551b141a"},{path:"worker/claude-mcp.js",size:20942,sha256:"2b449e5c879e79132426e9da450184adc4fd4ebbf04976131873b942776d2d2d"},{path:"worker/index.js",size:98124,sha256:"4343a530cb47ae6b7fdbd874139cc35f91e2d407ea96d7a0061d1c22bba1dc26"},{path:"worker/test-access.js",size:7237,sha256:"46578b0716f533e5949dca8a60a2931e8572f8377171b471278b5766fddf2b74"},{path:"worker/usage-downloads.js",size:3368,sha256:"6e7b7ea9c146ae72e97109ce2e1a1f5a66f5a9fc2f4cd2b7e2da1933d6812c20"},{path:"worker/usage-metrics.js",size:10859,sha256:"0f2a570e009dec2505a8eaae831fa910b4e8f35695adf116f00f666a5e702a6f"},{path:"worker/usage-summary.js",size:7460,sha256:"a0a384dcf6367be606d02057f5a29446d2a68cd68b3a6fe24435aafd57801167"},{path:"wrangler.jsonc",size:1344,sha256:"23440552b7c1a975cb52687843925a2b73ce870f1fed894e8076887a5d842f7e"}]}),i5="b9a232886762337076d3b5a3d84300d3ac74293aaab2c250ddff0c46340a2c78",o5=Object.freeze(["web/lib/report-metadata.js (report metadata/provenance)","web/lib/reason-codes.js (reason-code labels)","web/lib/xnnpack-rulepack-metadata.js (generated XNNPACK delegate provenance)","src/xnnpack_delegate.rs (source-mapped XNNPACK delegate evaluator)","src/xnnpack_rulepack_generated.rs (generated XNNPACK delegate documentary rules)","reference/xnnpack-readme/README-v2.21.0.md (pinned XNNPACK delegate README snapshot)","reference/xnnpack-readme/rule-manifest-v2.21.0.json (XNNPACK delegate semantic rule manifest)","src/target_profiles.rs (target profiles and target-specific planning contracts)","src/lib.rs (quantization classification and XNNPACK planning rules)","src/lib.rs (TFLite runtime-version floor derivation)","src/runtime_version.rs (pinned TFLite runtime-version floor map)","src/tflite_metadata.rs (TFLite M001 metadata contract parser)","src/accumulator_atlas.rs (exact stored-weight accumulator envelope)","web/lib/accumulator-atlas.js (independent browser accumulator validator)","src/requantization_fidelity.rs (pinned TFLite requantization fidelity solver)","web/lib/requantization-fidelity.js (independent browser requantization validator)","src/kernel_witness.rs (exact quantized kernel extremum witness solver)","web/lib/kernel-witness.js (independent browser kernel witness validator and viewer)","web/lib/kernel-witness-worker.js (independent browser kernel witness verification worker)","src/channel_vitality.rs (exact monotone quantized channel vitality solver)","web/lib/channel-vitality.js (independent browser channel vitality validator and viewer)","web/lib/channel-vitality-worker.js (independent browser channel vitality verification worker)","src/rounding_equivalence.rs (exact fixed-point rounding equivalence solver)","web/lib/rounding-equivalence.js (independent browser rounding equivalence validator and viewer)","web/lib/rounding-equivalence-worker.js (independent browser rounding equivalence verification worker)","src/numerical_abi_propagation.rs (exact numerical ABI graph propagation solver)","web/lib/numerical-abi-propagation.js (independent browser numerical ABI propagation validator)","web/lib/numerical-abi-propagation-viewer.js (numerical ABI propagation atlas viewer and export renderer)","src/quantization_lattice.rs (exhaustive residual output-contract design solver)","web/lib/quantization-lattice.js (independent browser residual contract validator)","src/quantization_math.rs (shared pinned quantization arithmetic)","web/lib/quantization-math.js (independent browser quantization arithmetic)","src/contract_migration.rs (residual contract migration impact solver)","web/lib/contract-migration.js (independent browser migration validator)","src/residual_step_response.rs (exhaustive residual adjacent-code step-response solver)","web/lib/residual-step-response.js (independent browser residual step-response validator)","web/lib/residual-step-response-worker.js (independent browser residual step-response worker)","src/residual_contract_distortion.rs (exhaustive residual contract-distortion solver)","web/lib/residual-contract-distortion.js (independent browser residual contract-distortion validator)","web/lib/residual-contract-distortion-worker.js (independent browser residual contract-distortion worker)","web/lib/xnnpack-selector-evidence.js (public XNNPACK evidence identity and arithmetic adapter)","web/lib/ort-compatibility-evidence.js (public ORT evidence identity and conservation adapter)","web/onnx.js (ONNX rule/reconstruction)","web/lib/onnx-container-inference.js (ONNX rule/reconstruction)","web/lib/onnx-domain-analysis.js (ONNX rule/reconstruction)","web/lib/onnx-external-data.js (ONNX rule/reconstruction)","web/lib/onnx-extended-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ml-imputer-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-imputer.js (ONNX rule/reconstruction)","web/lib/onnx-ml-label-encoder-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-label-encoder.js (ONNX rule/reconstruction)","web/lib/onnx-ml-linear-model-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-linear-model.js (ONNX rule/reconstruction)","web/lib/onnx-ml-normalizer-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-normalizer.js (ONNX rule/reconstruction)","web/lib/onnx-ml-one-hot-encoder-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-one-hot-encoder.js (ONNX rule/reconstruction)","web/lib/onnx-ml-scaler-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-scaler.js (ONNX rule/reconstruction)","web/lib/onnx-ml-svm-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-svm.js (ONNX rule/reconstruction)","web/lib/onnx-ml-tree-ensemble-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-ml-tree-ensemble.js (ONNX rule/reconstruction)","web/lib/onnx-ml-value-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-extension-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-matmul-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-recurrent-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-ort-transformer-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-opset-imports.js (ONNX rule/reconstruction)","web/lib/onnx-schema-legality.js (ONNX rule/reconstruction)","web/lib/onnx-shape-inference.js (ONNX rule/reconstruction)","web/lib/onnx-runtime-shape-binding.js (ONNX rule/reconstruction)","web/lib/onnx-shape-ops.js (ONNX rule/reconstruction)","web/lib/onnx-shape-schema-generated.js (ONNX rule/reconstruction)","web/lib/onnx-sparse-tensor.js (ONNX rule/reconstruction)","web/lib/onnx-static-value-evidence.js (ONNX rule/reconstruction)","web/lib/onnx-tfidf-vectorizer-conformance.js (ONNX rule/reconstruction)","web/lib/onnx-tfidf-vectorizer.js (ONNX rule/reconstruction)","web/lib/onnx-type-proto.js (ONNX rule/reconstruction)","web/lib/report-findings.js (authoritative finding rules)","web/lib/finding-contract.js (finding evidence-pointer contract)"]);var _h="2026-08-03",Eo="1.106.0",dh="deepbom.rulepack.2026-07-24.63";var Hre=Object.freeze(["input","audit","findings","output"]);var a5="deepbom.finding_evidence_pointer_validation.v1",sV=Object.freeze(["High","Medium","Low","Informational"]),e0=Object.freeze(["artifact_defect","caution","evidence_gap"]),Zre=new Map(sV.map((e,t)=>[e,t]));var en=Object.freeze({schema:"deepbom.xnnpack_delegate_rule_manifest.v1",sourceCommit:"87bbf65b8d23d3f06912b1b2183587e1884bc45c",sourceTagAlias:"v2.21.0",sourceTagCommit:"a481b10260dfdf833a1b16007eead49c1d7febf3",sourcePath:"tensorflow/lite/delegates/xnnpack/README.md",sourceSha256:"85524b3e6acfe5429b9d8b7c1ef47dde79a4543ccbe2f73a0e276f8e7e0eb93c",manifestSha256:"657160ac6438d2a2752bb1574acf6e2057f5d478dcffbb38779212f792033c79",fp32OperatorCount:41,quantizedOperatorCount:24,documentedConstraintCount:133,implementedConstraintCount:133,unmappedConstraintCount:0,runtimeOnlyGlobalRequirementCount:2,conformanceStatus:"source_snapshot_verified_all_artifact_visible_constraints_mapped"});var Pn=Object.freeze({name:"deepbom",displayName:"DEEPBOM / wasm-static-analyzer",version:_h,semanticVersion:Eo,buildCommit:Nr,buildSourceState:uh,buildContentSha256:xl,buildContentHashMethod:e5,buildContentHashBasis:t5,buildContentManifestSha256:n5,rulepackVersion:dh,rulepackSha256:i5,rulepackHashBasis:o5,xnnpackSupportBasis:`TensorFlow Lite XNNPACK delegate README at tensorflow/tensorflow@${en.sourceCommit}; README SHA-256 ${en.sourceSha256}, byte-identical to tag ${en.sourceTagAlias} at ${en.sourceTagCommit}; ${en.implementedConstraintCount}/${en.documentedConstraintCount} artifact-visible op constraints are machine mapped by manifest ${en.manifestSha256}; quantized runtime build flags remain runtime-only requirements; source-enumerated kernel candidates use pinned google/XNNPACK@23a67314f7afdbb76191589ae090d82bf55afbfa`,rulepackProvenance:Object.freeze({xnnpackReadmeUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/delegates/xnnpack/README.md",xnnpackCheckedRef:"tensorflow/tensorflow@87bbf65b8d23d3f06912b1b2183587e1884bc45c",xnnpackReadmeSha256:en.sourceSha256,xnnpackTagAlias:`tensorflow/tensorflow@${en.sourceTagAlias}`,xnnpackTagCommit:en.sourceTagCommit,xnnpackTagReadmeUrl:`https://github.com/tensorflow/tensorflow/blob/${en.sourceTagCommit}/${en.sourcePath}`,xnnpackDelegateRuleManifestSchema:en.schema,xnnpackDelegateRuleManifestSha256:en.manifestSha256,xnnpackDelegateDocumentedConstraintCount:en.documentedConstraintCount,xnnpackDelegateImplementedConstraintCount:en.implementedConstraintCount,xnnpackDelegateUnmappedConstraintCount:en.unmappedConstraintCount,xnnpackDelegateRuntimeOnlyRequirementCount:en.runtimeOnlyGlobalRequirementCount,xnnpackDelegateSourceConformanceStatus:en.conformanceStatus,xnnpackDependencyRef:"google/XNNPACK@23a67314f7afdbb76191589ae090d82bf55afbfa",xnnpackDependencyPinUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/tools/cmake/modules/xnnpack.cmake",xnnpackGemmConfigUrl:"https://github.com/google/XNNPACK/blob/23a67314f7afdbb76191589ae090d82bf55afbfa/src/configs/gemm-config.c",xnnpackGemmConfigSha256:"545f0fd6bab43186819199cf846a1f1cbb5eaa2b1df9b70e5e43431185f2b7f6",xnnpackDwconvConfigUrl:"https://github.com/google/XNNPACK/blob/23a67314f7afdbb76191589ae090d82bf55afbfa/src/configs/dwconv-config.c",xnnpackDwconvConfigSha256:"6ee0ceb2a953ab5cd19651ad652eadf84cd198947acfdd456e1322c787bae9fa",tfliteRuntimeInfoRef:"tensorflow/tensorflow@87bbf65b8d23d3f06912b1b2183587e1884bc45c",tfliteRuntimeInfoProtoUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/proto/model_runtime_info.proto",tfliteRuntimeInfoProtoSha256:"7829c3163339ce7dea01091a5154a06cb302f35573ad51d3af06a2a09b95a8fb",tfliteRuntimeInfoGeneratorUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/model_runtime_info.cc",tfliteRuntimeInfoGeneratorSha256:"9a6edf838fe149c54efe0700bcdc2faf58dd5343f1370538e91bf5ed8a0e11b6",tfliteDelegationMetadataUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/optional_debug_tools.cc",tfliteDelegationMetadataSha256:"607010c8f7aba721bd5d96f45cb08c55226a800e55946da708368d09d4545260",tfliteRuntimeInfoExportDriverUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/tools/benchmark/benchmark_tflite_model.cc",tfliteRuntimeInfoExportDriverSha256:"e26a3e4e26300442b47d27e1b515ccbc85b34425625d60f637faa28973f7a8f7",tfliteConversionMetadataSchemaUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/compiler/mlir/lite/schema/conversion_metadata.fbs",tfliteConversionMetadataSchemaSha256:"2464449e30bfa6032c0218b53a1a83b224c6eda9b5cfd9f12211c4c0017dc20e",tfliteProfilingInfoProtoUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/proto/profiling_info.proto",tfliteProfilingInfoProtoSha256:"dd286650b64ae913cd9db25baa87a1527835fce4201ad407716b4af4f7dafc69",tfliteProfilingListenerUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/tools/benchmark/profiling_listener.cc",tfliteProfilingListenerSha256:"7890e11f356c4a0c92ac19f2c5f1c3187df077d49b0d31f52b2d43c2b4cd5a7a",tfliteProfileSummarizerUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/profile_summarizer.cc",tfliteProfileSummarizerSha256:"de7010e97438b7e233e8ec80c8bb19fcbe435475d4f2cca5ccb8bbc03e4d0f91",tfliteProfileFormatterUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/profiling/profile_summary_formatter.cc",tfliteProfileFormatterSha256:"cda02354a7a4c3f1c87263206fd13a64f3c3aae56270e0339a59e4aeae82491f",tfliteProfilerApiSha256:"87f644f353c917464ce6eb82e8c6f893d88d04b7d2311e0f2fbe83a7b2df37db",tfliteSubgraphProfilingSha256:"f1820803ba838bf4261c1cf679ae664a9b29ea3661760d8b3aaae031a135516f",tfliteXnnpackProfilingSha256:"d9a1b2b5b28dd67c2c81e73671470da0c720b1774d48d41832ed7550083f93ad",ortSourceRef:"microsoft/onnxruntime@8c546c37b43caaca1fa25db430dab94b901cf277",ortOperatorKernelsUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/docs/OperatorKernels.md",ortOperatorKernelsSha256:"23ecda7c40bacc71f5362ec01f994f50eab809324587d3e8a2cac46ff707652c",ortWebgpuOperatorsUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/js/web/docs/webgpu-operators.md",ortWebgpuOperatorsSha256:"e60f85a34d43d55cb6f4ea1b97571f6ef57b92c2aeb9b8d99fae50076caa06fe",ortWebnnOperatorsUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/js/web/docs/webnn-operators.md",ortWebnnOperatorsSha256:"b41fe9d30f4270d460a55be8393dc4c539d6e12cc5939c2b8b3c7a074943eeb8",ortCompatibilityMatrixUrl:"https://github.com/microsoft/onnxruntime/blob/d86c44a634c32328c71ffdc0ae1dea8fb0e69a20/docs/reference/compatibility.md",ortCompatibilityMatrixSha256:"b79ae7035295a6009879b4d8f882ff4a9402726e53533b9d3787fe50e0a42664",onnxOperatorSchemaUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/onnx/defs/operator_sets.h",onnxOperatorSchemaSha256:"d1c94c1b4b890350a5ff8cc8bf24bd062b09b7a0689293afb1fdc1f7e987b479",onnxOperatorSchemaHistoryUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/docs/Changelog.md",onnxOperatorSchemaHistorySha256:"315293e31dd0f415efc7dd821380b53418845f3a719a4930c8df87a30023b6e3",onnxMlOperatorSchemaUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/onnx/defs/operator_sets_ml.h",onnxMlOperatorSchemaSha256:"fa3d663df091a0cadc85d902a12d84d7465bfec8cf7433861f82b99f921278a4",onnxIrSchemaUrl:"https://github.com/onnx/onnx/blob/be2b5fde82d9c8874f3d19328bdfe3b6962dc67b/onnx/onnx.in.proto",onnxIrSchemaSha256:"f4cbc198df3a0f3f4519d4d38cd2262e8f84057583b7313e2d0f981b3f68c213",ortContribOperatorSchemaUrl:"https://github.com/microsoft/onnxruntime/blob/8c546c37b43caaca1fa25db430dab94b901cf277/docs/ContribOperators.md",ortContribOperatorSchemaSha256:"a00b931b8df0db12e03c3346ef9d1abc84200156e1910acaa40dd622711978c9",arenaPlannerRef:"tensorflow/tensorflow@87bbf65b8d23d3f06912b1b2183587e1884bc45c",arenaPlannerUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/arena_planner.cc",simpleMemoryArenaUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/simple_memory_arena.cc",arenaTensorAlignmentBytes:64,tfliteQuantizeMultiplierUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/kernels/internal/quantization_util.cc",tfliteQuantizeMultiplierSha256:"22e46f15663437c407298f5230545600faa2f6b2f1b46488e20c97ff3a5c96f9",tfliteConvolutionQuantizationParamsUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/kernels/kernel_util.cc",tfliteConvolutionQuantizationParamsSha256:"fb03b532b1f510ccf5d7d169eeebcc408791677c97cbce235893560b4379da49",tfliteFixedPointExecutionUrl:"https://github.com/tensorflow/tensorflow/blob/87bbf65b8d23d3f06912b1b2183587e1884bc45c/tensorflow/lite/kernels/internal/common.cc",tfliteFixedPointExecutionSha256:"ba5308bf76383d600d033c948fe0659710939e6f1f15a800b5413e5fc822ddfa",litertRuntimeBasis:"TensorFlow Lite XNNPACK delegate README at the pinned tensorflow/tensorflow commit above",note:"Delegation remains PREDICTED. Source-enumerated kernel configuration sets retain unresolved compile/runtime selectors and never claim an executed microkernel; runtime delegate/profiler evidence is authoritative."}),schemas:Object.freeze({staticAnalysis:"deepbom.static_analysis.v1.68",serializedContainerAnalysis:"deepbom.static_analysis.container.v1",coreMlStaticAnalysis:"deepbom.static_analysis.coreml.v1.1",execuTorchStaticAnalysis:"deepbom.static_analysis.executorch.v1.1",artifactMetadata:"deepbom.artifact_metadata.v1.4",inputTensorContract:"deepbom.input_tensor_contract.v1",dynamicShapeCostContract:"deepbom.dynamic_shape_cost_contract.v2.2",onnxExternalData:"deepbom.onnx_external_data.v1.3",onnxExternalArtifactSet:"deepbom.onnx_external_artifact_set.v1.2",onnxExternalRuntimeBinding:"deepbom.onnx_external_runtime_binding.v1",onnxShapeInference:"deepbom.onnx_shape_inference.v1.30",onnxExtendedShapeInference:"deepbom.onnx_extended_shape_inference.v1.6",onnxContainerValueInference:"deepbom.onnx_container_value_inference.v1",onnxTfIdfVectorizerInference:"deepbom.onnx_tfidf_vectorizer_inference.v1",onnxMlValueInference:"deepbom.onnx_ml_value_inference.v1.12",onnxTensorDataTypeContract:"deepbom.onnx_tensor_data_type_contract.v1",onnxTypeProtoContract:"deepbom.onnx_type_proto_contract.v1",onnxSparseTensorContract:"deepbom.onnx_sparse_tensor_contract.v1.2",deploymentFrontier:"deepbom.deployment_frontier.v1.6",deploymentDelta:"deepbom.deployment_delta.v1.1",delegationRepair:"deepbom.delegation_repair.v1.3",quantizationLattice:"deepbom.quantization_lattice.v1.4",accumulatorAtlas:"deepbom.accumulator_atlas.v1.3",requantizationFidelity:"deepbom.requantization_fidelity.v1",kernelExtremumWitness:"deepbom.kernel_extremum_witness.v1",channelVitality:"deepbom.channel_vitality.v1",roundingEquivalence:"deepbom.rounding_equivalence.v1",accumulatorReachability:"deepbom.accumulator_reachability.v1",numericalAbiPropagation:"deepbom.numerical_abi_propagation.v1.1",inputCounterexample:"deepbom.input_counterexample.v1",preprocessingRealizability:"deepbom.preprocessing_realizability.v1",preprocessingConsequence:"deepbom.preprocessing_consequence_atlas.v1",contractMigration:"deepbom.contract_migration.v1",residualStepResponse:"deepbom.residual_step_response.v1",residualContractDistortion:"deepbom.residual_contract_distortion.v1.1",modelStructure:"deepbom.model_structure.v1.4",quantizationEvidence:"deepbom.quantization_evidence.v1.19",quantizationContractChecks:"deepbom.quantization_contract_checks.v1.18",runtimeEvidence:"deepbom.runtime_evidence.v1.16",runtimeEvidenceSidecar:"deepbom.runtime_evidence_sidecar.v1",runtimeAssignment:"deepbom.runtime_assignment.v1.10",runtimeSelectorContext:"deepbom.runtime_selector_context.v1.1",tfliteDelegateBuildInventory:"deepbom.tflite_delegate_build_inventory.v1",runtimeSelectorObservation:"deepbom.runtime_selector_observation.v1",nativeRuntimeCollector:"deepbom.native_runtime_collector.v1.1",runtimeMemory:"deepbom.runtime_memory.v1",arenaRuntimeReconciliation:"deepbom.arena_runtime_reconciliation.v1",ortProfileAdapter:"deepbom.ort_profile_adapter.v2.2",onnxRuntimeShapeBinding:"deepbom.onnx_runtime_shape_binding.v2",ortNativeCapture:"deepbom.ort_native_capture.v1.5",ortNativeProfile:"deepbom.ort_native_profile.v1.4",tfliteRuntimeInfoAdapter:"deepbom.tflite_runtime_info_adapter.v2",tfliteBenchmarkProfileAdapter:"deepbom.tflite_benchmark_profile_adapter.v1",runtimeAssignmentComparison:"deepbom.runtime_assignment_comparison.v1.4",executionPlacementEvidence:"deepbom.execution_placement_evidence.v1",placementComparison:"deepbom.placement_comparison.v1",predictedRuntimeBoundarySummary:"deepbom.predicted_runtime_boundary_summary.v1",observedPartitionBoundaryEdges:"deepbom.observed_partition_boundary_edges.v1",weightIndicatorEvidence:"deepbom.weight_indicator_evidence.v1.1",securityPosture:"deepbom.security_posture.v1.3",findingsRegister:"deepbom.findings_register.v1.51",findingEvidencePointerValidation:a5,metricCoverageManifest:"deepbom.metric_coverage_manifest.v1.55",decisionCoverage:"deepbom.decision_coverage.v1.11",engineeringEvidence:"deepbom.engineering_evidence.v1.80",conformanceReport:"deepbom.conformance_report.v1.77",xnnpackSelectorEvidence:"deepbom.xnnpack_selector_evidence.v2",tfliteDelegateSourceRulepack:"deepbom.tflite_delegate_source_rulepack.v1",ortSourceCompatibility:"deepbom.ort_source_compatibility.v1.15",ortEpPortabilityFrontier:"deepbom.ort_ep_portability_frontier.v2",analyzerBuildContentManifest:"deepbom.analyzer_build_content_manifest.v1",packageDigestSet:"deepbom.package_member_digest_set.v1",attestation:"deepbom.attestation.v2.2",engineeringReport:"deepbom.engineering_report.v1.79",regulatoryReport:"deepbom.regulatory_report.v1.12",engineeringBundle:"deepbom.engineering_bundle.v1.82",regulatoryBundle:"deepbom.regulatory_bundle.v1.50"})});var s5="deepbom.quant_research_coverage.v1",cV=new Set(["full_integer","mixed_integer"]),lV=Object.freeze([Jn("weight_scale_integrity","Weight scale integrity","weight_integrity",!1),Jn("quantization_lattice","Residual quantization lattice","quantization_lattice"),Jn("accumulator_atlas","Accumulator atlas","accumulator_atlas"),Jn("requantization_fidelity","Requantization fidelity","requantization_fidelity"),Jn("kernel_extremum_witness","Kernel extremum witness","kernel_extremum_witness"),Jn("channel_vitality","Channel vitality","channel_vitality"),Jn("rounding_equivalence","Rounding equivalence","rounding_equivalence"),Jn("accumulator_reachability","Accumulator reachability","accumulator_reachability"),Jn("numerical_abi_propagation","Numerical ABI propagation","numerical_abi_propagation"),Jn("input_counterexample","Input counterexample","input_counterexample"),Jn("preprocessing_realizability","Preprocessing realizability","preprocessing_realizability"),Jn("preprocessing_consequence","Preprocessing consequence",null),Jn("contract_migration","Residual contract migration","contract_migration"),Jn("residual_step_response","Residual step response","residual_step_response"),Jn("residual_contract_distortion","Residual contract distortion","residual_contract_distortion")]);function Jn(e,t,n,i=!0){return Object.freeze({id:e,label:t,evidenceKey:n,requiresIntegerActivations:i})}function uV(e){if(String(e?.format||"tflite").toLowerCase()!=="tflite")return Ir("not_applicable_format","Not applicable","Quantized TFLite research contracts do not apply to this artifact format.","QR-CLASS-FORMAT");let t=String(e?.quantization_status?.classification||""),n=new Map((e?.quantization_status?.op_state_counts||[]).map(i=>[String(i.name||""),Number(i.count||0)]));return t==="full_integer"||t==="integer_internal_float_io"?Ir("full_integer","Full-integer activation path",`Quantized compute activations, weights, and outputs expose the integer arithmetic contracts required by the advanced labs.${t==="integer_internal_float_io"?" Integer compute is present behind explicit floating-point model I/O boundaries.":""}`,"QR-CLASS-FULL-INTEGER",t):t==="mixed_quantization"||Number(e?.quantization_status?.quantized_compute_ops||0)>0?Ir("mixed_integer","Mixed integer/float path","At least one integer compute region is present, but advanced-lab coverage can be partial at floating-point boundaries.","QR-CLASS-MIXED",t):t==="dynamic_range_or_weight_only"?Number(n.get("weight_only_or_dynamic_range")||0)>0?Ir("dynamic_range","Dynamic-range quantized","Stored 8-bit compute weights are present while compute activation inputs and outputs remain floating-point. Integer activation, accumulator, requantization, residual-code, and preprocessing-code proofs are outside this artifact contract.","QR-CLASS-DYNAMIC-RANGE",t):Ir("weight_only","Reduced-precision weight-only","Reduced-precision storage signals exist without an artifact-visible integer activation compute path. Weight storage checks apply; integer activation-path proofs do not.","QR-CLASS-WEIGHT-ONLY",t):["qdq_signals_only","float16_weight_storage"].includes(t)&&gV(e)?Ir("weight_only","Reduced-precision weight-only","Reduced-precision constant storage is expanded through DEQUANTIZE operators into a floating-point compute path. Integer activation, accumulator, requantization, residual-code, and preprocessing-code proofs do not apply.","QR-CLASS-WEIGHT-ONLY",t):t==="not_quantized_float"||!hV(e)?Ir("float","Floating-point","No artifact-visible quantized storage and integer activation compute contract is available to the quantization research labs.","QR-CLASS-FLOAT",t):Ir("weight_only","Quantization signals without integer activation path","Quantization metadata or boundary signals exist, but no complete integer activation compute contract is established.","QR-CLASS-WEIGHT-ONLY",t)}function _V(e){let t=uV(e),n=lV.map(r=>dV(e,t,r)),i=r=>n.filter(r).length,o=i(r=>r.class_supported),a=i(r=>r.artifact_applicable);return{schema:s5,evidence_class:"DERIVED",artifact_class:t.id,artifact_class_label:t.label,artifact_class_reason_code:t.reasonCode,artifact_class_detail:t.detail,source_quantization_classification:t.sourceClassification,lab_count:n.length,class_supported_lab_count:o,class_excluded_lab_count:n.length-o,artifact_applicable_lab_count:a,assessed_lab_count:i(r=>r.status==="assessed"),partial_lab_count:i(r=>r.status==="partial"),not_assessed_lab_count:i(r=>r.status==="not_assessed"),not_applicable_lab_count:i(r=>r.status==="not_applicable"),scan_denominator_policy:"Group artifacts by artifact_class. Exclude not_applicable labs from defect-free and defect-rate denominators; report not_assessed and rejected evidence separately from observed absence.",labs:n}}function c5(e,t){return(e?.quant_research_coverage?.schema===s5?e.quant_research_coverage:_V(e)).labs.find(i=>i.id===t)||null}function dV(e,t,n){if(!(n.requiresIntegerActivations?cV.has(t.id):!["float","not_applicable_format"].includes(t.id)))return{id:n.id,label:n.label,evidence_key:n.evidenceKey,class_supported:!1,artifact_applicable:!1,status:"not_applicable",reason_code:t.reasonCode,reason:t.detail,render_policy:"common_empty"};if(n.id==="preprocessing_consequence")return{id:n.id,label:n.label,evidence_key:null,class_supported:!0,artifact_applicable:!0,status:"not_assessed",reason_code:"QR-RUNTIME-INPUT-REQUIRED",reason:"This local runtime consequence lab becomes assessed only after an eligible preprocessing witness and runtime execution are bound.",render_policy:"lab"};if(n.id==="weight_scale_integrity"){let s=Number(e?.weight_integrity?.quantized_constant_tensors_scanned||0);return{id:n.id,label:n.label,evidence_key:n.evidenceKey,class_supported:!0,artifact_applicable:s>0,status:s>0?"assessed":"not_applicable",reason_code:s>0?"QR-WEIGHT-SCALES-ASSESSED":"QR-NO-QUANTIZED-CONSTANTS",reason:s>0?`${s} quantized constant tensor(s) were decoded for scale/grid/integrity checks.`:"No decodable quantized constant tensor is present.",render_policy:s>0?"lab":"common_empty"}}let o=e?.[n.evidenceKey],a=pV(o),r=a!=="not_applicable";return{id:n.id,label:n.label,evidence_key:n.evidenceKey,class_supported:!0,artifact_applicable:r,status:a,reason_code:mV(o,a),reason:fV(o,a),render_policy:a==="not_applicable"||a==="not_assessed"&&l5(o)?"common_empty":"lab"}}function pV(e){if(!e||typeof e!="object")return"not_assessed";let t=String(e.status||e.assessment_status||"not_assessed").toLowerCase();return t==="assessed"?"assessed":t==="partial"?l5(e)?"not_assessed":"partial":t==="not_applicable"?"not_applicable":"not_assessed"}function l5(e){let t=t0(e),n=r5(e,["assessed_op_count","assessed_add_count","assessed_source_count","assessed_witness_count"],t.filter(o=>o?.assessment_status==="assessed").length),i=r5(e,["candidate_op_count","candidate_add_count","source_op_count"],t.length);return n===0&&i>0}function r5(e,t,n=0){let i=Number.isFinite(n)?n:0;for(let o of t){let a=Number(e?.[o]);Number.isFinite(a)&&(i=Math.max(i,a))}return i}function t0(e){for(let t of["ops","residual_adds","sources","candidates"])if(Array.isArray(e?.[t]))return e[t];return[]}function mV(e,t){if(t==="assessed")return"QR-EVIDENCE-ASSESSED";if(t==="partial")return"QR-EVIDENCE-PARTIAL";let n=t0(e).find(i=>i.assessment_status!=="assessed")?.reason_code;return String(e?.reason_code||n||(t==="not_applicable"?"QR-GRAPH-NOT-APPLICABLE":"QR-EVIDENCE-NOT-ASSESSED"))}function fV(e,t){if(t==="assessed")return"The emitted evidence ledger is assessed.";if(t==="partial")return"The artifact contains both assessed and explicitly unassessed evidence rows.";let n=t0(e).find(i=>i.assessment_status!=="assessed");return String(e?.reason||e?.detail||n?.reason||n?.status_detail||(t==="not_applicable"?"The required graph pattern is absent.":"No assessable evidence row was emitted."))}function Ir(e,t,n,i,o=""){return{id:e,label:t,detail:n,reasonCode:i,sourceClassification:o}}function hV(e){return Number(e?.quantized_tensors||0)>0||Number(e?.quantization_status?.int8_tensors||0)>0||Number(e?.quantization_status?.uint8_tensors||0)>0}function gV(e){return(e?.tensors||[]).some(t=>t?.constant_buffer===!0&&["FLOAT16","BFLOAT16","INT8","UINT8","INT4","UINT4"].includes(String(t.dtype||"")))}var a0=new Set(["CONV_2D","DEPTHWISE_CONV_2D","FULLY_CONNECTED"]),ph=2,Rd=2147483647;function d5(e){let t=String(e?.format||"tflite").toLowerCase();if(t==="onnx")return yV(e);if(t!=="tflite")return bV(e,t);let n=VT(e),i=HT(e),o=kV(e),a=OV(e),r=ro(e,"accumulator_atlas",()=>RV(e)),s=ro(e,"requantization_fidelity",()=>BV(e)),c=ro(e,"kernel_extremum_witness",()=>DV(e)),u=ro(e,"channel_vitality",()=>MV(e)),l=ro(e,"rounding_equivalence",()=>$V(e)),_=ro(e,"accumulator_reachability",()=>LV(e)),p=ro(e,"numerical_abi_propagation",()=>PV(e)),d=ro(e,"input_counterexample",()=>qV(e)),m=ro(e,"preprocessing_realizability",()=>jV(e)),f=ro(e,"contract_migration",()=>SV(e)),g=ro(e,"residual_step_response",()=>TV(e)),h=ro(e,"residual_contract_distortion",()=>zV(e)),b=ch(e),A=KT(e),y=FV(e),x=QV(e),v=UV(e),I=[n,o,a,r,s,c,u,l,_,p,d,m,f,g,h,b,y,x,v],w=I.some(O=>O.status==="fail")?"fail":I.some(O=>O.status==="pass")?"pass":"not_applicable",N=[i,A,o,a,s,c,u,l,_,p,d,m,f,g,h,y,v],S=N.some(O=>O.status==="review")?"review":N.some(O=>O.status==="pass")?"clear":"not_applicable";return{schema:Pn.schemas.quantizationContractChecks,status:w,contract_integrity_status:w,quantization_design_review_status:S,status_semantics:"Contract integrity reports deterministic artifact-contract violations only. Design review reports threshold/configuration signals without changing contract pass/fail.",evidence_class:"DERIVED",method:"Deterministic graph-edge and quantization-metadata checks over the deployment artifact.",bias_scale:n,representable_kernel_channels:i,residual_add:o,weight_zero_point:a,accumulator_bound:r,requantization_fidelity:s,kernel_extremum_witness:c,channel_vitality:u,rounding_equivalence:l,accumulator_reachability:_,numerical_abi_propagation:p,input_counterexample:d,preprocessing_realizability:m,contract_migration:f,residual_step_response:g,residual_contract_distortion:h,io_dequantization:b,input_quantization_convention:A,missing_quantization_metadata:y,qdq_boundaries:x,kernel_quantization:v}}function bV(e,t){let n=e?.quantization_status||null,i=t==="safetensors"?e?.safetensors?.quantization_contract||null:t==="gguf"?e?.gguf?.type_traits_source||e?.gguf?.backend_compatibility||null:t==="coreml"?e?.coreml?.quantization_contract||n:null,o=String(i?.assessment_status||i?.status||n?.assessment_status||n?.status||"not_assessed").toLowerCase(),a=["fail","failed","invalid"].some(u=>o.includes(u)),r=t==="gguf"&&e?.gguf?.payload_coverage_status==="complete_without_gaps_or_overlaps"&&Number(n?.unsupported_encoding_tensor_count||0)===0&&/^[0-9a-f]{64}$/.test(String(e?.gguf?.type_traits_source?.type_traits_source_sha256||""))&&/^[0-9a-f]{64}$/.test(String(e?.gguf?.type_traits_source?.block_layout_source_sha256||"")),s=r||o==="assessed"||o.startsWith("assessed_")||o==="complete"||o==="pass",c=a?"fail":s?"pass":"not_assessed";return{schema:Pn.schemas.quantizationContractChecks,format_contract:`${t||"serialized"} serialized quantization/storage contract`,status:c,contract_integrity_status:c,quantization_design_review_status:"not_assessed",status_semantics:"Only a normalized format-specific serialized quantization contract can establish storage or numerical quantization state. Missing metadata is NOT_ASSESSED and is not relabeled as floating-point or zero quantization.",evidence_class:s||a?"OBSERVED/DERIVED":"NOT_ASSESSED",method:"Preserve the analyzer-emitted format-specific storage/quantization contract without applying TFLite fixed-point or ONNX Q/DQ rules across formats.",serialized_contract:{status:r?"assessed_source_pinned_storage_contract":o,quantization_status:n,format_contract:i,interpretation_boundary:"This contract does not establish executed kernel precision, runtime dequantization/fusion, task accuracy, or deployment performance."}}}function ro(e,t,n){let i=c5(e,t);return i?.class_supported?n():yt(`${i?.reason||"This lab is outside the normalized artifact class"} (${i?.reason_code||"QR-CLASS-NOT-APPLICABLE"}).`)}function yV(e){let t=AV(e),n=vV(e),i=yt("TFLite tensor scale vectors are not substituted for ONNX Q/DQ parameter bindings."),o=yt("Residual ADD scale checks require quantized tensor contracts on both ONNX Add inputs; no QLinearAdd standard operator is assumed."),a=wV(e),r=xV(e),s=yt("Pinned TFLite Q0.31 requantization encoding does not apply to ONNX execution-provider kernels."),c=yt("Pinned TFLite per-channel integer extremum witnesses do not apply to ONNX execution-provider kernels."),u=yt("Pinned TFLite fixed-point channel-vitality proofs do not apply to ONNX execution-provider kernels."),l=yt("Pinned TFLite default/single-rounding interval-hull equivalence proofs do not apply to ONNX execution-provider kernels."),_=yt("Pinned TFLite bounded-sum accumulator reachability proofs do not apply to ONNX execution-provider kernels."),p=yt("TFLite fixed-point build-mode divergence propagation does not apply to ONNX execution-provider kernels."),d=yt("TFLite fixed-point model-input tensor counterexamples do not apply to ONNX execution-provider kernels."),m=yt("TFLite constructive input-witness preprocessing counterfactuals do not apply to ONNX execution-provider kernels."),f=yt("TFLite residual containment-contract migration does not apply to ONNX execution-provider kernels."),g=yt("TFLite residual local code-step response geometry does not apply to ONNX execution-provider kernels."),h=yt("TFLite residual containment-contract distortion geometry does not apply to ONNX execution-provider kernels."),b=ch(e),A=EV(e),y=NV(e),x=IV(e),v=[t,n,a,r],I=v.some(N=>N.status==="fail")?"fail":v.some(N=>N.status==="pass")?"pass":"not_applicable",w=[a,x,A].some(N=>N.status==="review")?"review":"clear";return{schema:Pn.schemas.quantizationContractChecks,format_contract:"ONNX standard-domain QuantizeLinear/DequantizeLinear/QLinearConv/QLinearMatMul",status:I,contract_integrity_status:I,quantization_design_review_status:w,status_semantics:"Contract integrity reports deterministic ONNX parameter/signature violations. Runtime QDQ fusion and execution-provider lowering are not inferred from graph syntax.",evidence_class:"DERIVED",method:"Deterministic binding of embedded ONNX TensorProto scale/zero-point parameters to standard-domain Q/DQ and QLinear signatures.",parameter_integrity:t,bias_scale:n,representable_kernel_channels:i,residual_add:o,weight_zero_point:a,accumulator_bound:r,requantization_fidelity:s,kernel_extremum_witness:c,channel_vitality:u,rounding_equivalence:l,accumulator_reachability:_,numerical_abi_propagation:p,input_counterexample:d,preprocessing_realizability:m,contract_migration:f,residual_step_response:g,residual_contract_distortion:h,io_dequantization:b,missing_quantization_metadata:A,qdq_boundaries:y,kernel_quantization:x}}function AV(e){let t=e?.onnx_quantization_binding||{},n=t.bindings||[],i=n.filter(a=>a.status==="fail"),o=n.filter(a=>String(a.status||"").startsWith("not_assessed"));return{status:i.length?"fail":n.length&&!o.length?"pass":"not_applicable",evidence_class:"DERIVED",checked_bindings:n.length,valid_bindings:n.filter(a=>a.status==="pass").length,invalid_bindings:i.length,unresolved_bindings:o.length,integer_compute_without_real_scale_count:Number(t.integer_compute_without_real_scale_count||0),method:t.method||"ONNX quantization parameter binding was not emitted.",details:n}}function vV(e){let t=[],n=0;for(let o of Qe(e)||[]){if(o.name!=="QLinearConv"||Number(o.inputs?.[8])<0)continue;let a=Fi(e,o.inputs[0]),r=Fi(e,o.inputs[3]),s=Fi(e,o.inputs[8]),c=i0(e,a)[0]||0,u=i0(e,r);if(!(c>0)||!u.length||!s)continue;let l=u.map(f=>c*f),_=h5(s.shape),p=Number(r?.shape?.[0]||l.length),d=String(s.dtype||"").toUpperCase()==="INT32",m=_===p;n+=l.length,t.push({op_index:o.index,op_name:o.name,input_tensor_index:qn(a),weight_tensor_index:qn(r),bias_tensor_index:qn(s),checked_channels:l.length,expected_bias_scales:l.slice(0,256),expected_scale_count:l.length,bias_dtype:s.dtype,bias_element_count:_,output_channel_count:p,status:d&&m?"pass":"fail",reasons:[d?"":"QLinearConv bias must be INT32",m?"":"bias element count must equal output channels"].filter(Boolean),formula:"implicit_bias_scale[channel] = x_scale * w_scale[channel]",contract_note:"ONNX QLinearConv stores INT32 bias values without a separate bias-scale TensorProto; the real-value scale is implicit in the operator contract.",evidence_json_pointer:`/evidence/static_analysis/ops/${o.index}`})}let i=t.filter(o=>o.status==="fail");return{status:t.length?i.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",contract_kind:"onnx_implicit_qlinearconv_bias_scale",checked_groups:t.length,checked_channels:n,mismatch_groups:i.length,maximum_relative_error:null,relative_tolerance:null,method:"implicit_bias_scale[channel] = x_scale * w_scale[channel]; verify INT32 dtype and output-channel cardinality",details:t}}function wV(e){let t=[];for(let o of p5(e)){let a=f5(e,o),r=String(o.dtype||"").toUpperCase(),s=r==="INT8"?[-128,127]:r==="UINT8"?[0,255]:null,c=!s||a.some(_=>_<s[0]||_>s[1]||!Number.isInteger(_)),u=!1,l=r==="UINT8"&&a.some(_=>_!==0);t.push({tensor_index:qn(o),tensor_name:o.name||"",dtype:r,zero_points:a,legal_range:s,out_of_range:c,symmetric_int8_violation:u,asymmetric_uint8_observed:l,status:c?"fail":"pass",formula:"qmin <= zero_point <= qmax; ONNX QLinear signed weights are not assumed symmetric",evidence_json_pointer:`/evidence/static_analysis/tensors/${qn(o)}`})}let n=t.filter(o=>o.status==="fail"),i=t.filter(o=>o.status==="review");return{status:t.length?n.length?"fail":i.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_tensors:t.length,violation_tensors:n.length,asymmetric_uint8_tensors:t.filter(o=>o.asymmetric_uint8_observed).length,converter_lineage_status:"not_assessable_from_artifact",details:t}}function xV(e){let t=[];for(let i of Qe(e)||[]){if(!["QLinearConv","QLinearMatMul","ConvInteger","MatMulInteger"].includes(i.name))continue;let o=Fi(e,i.inputs?.[0]),a=Fi(e,i.inputs?.[["QLinearConv","QLinearMatMul"].includes(i.name)?3:1]),r=CV(i,a),s=u5(e,o),c=u5(e,a);if(!(r>0)||!(s>0)||!(c>0))continue;let u=r*s*c,l=u/Rd;t.push({op_index:i.index,op_name:i.name,input_tensor_index:qn(o),weight_tensor_index:qn(a),accumulation_terms:r,input_integer_magnitude_bound:s,weight_integer_magnitude_bound:c,worst_case_absolute_accumulator:u,int32_max:Rd,int32_ratio:l,status:l>=1?"fail":"pass",formula:"accumulation_terms * max_abs(q_input-zp_input) * max_abs(q_weight-zp_weight) / INT32_MAX",evidence_json_pointer:`/evidence/static_analysis/ops/${i.index}`})}let n=t.filter(i=>i.status==="fail");return{status:t.length?n.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",checked_ops:t.length,overflow_risk_ops:n.length,maximum_int32_ratio:mh(t.map(i=>i.int32_ratio)),accumulator_dtype:"INT32",details:t}}function EV(e){let t=e?.onnx_quantization_binding||{},n=(t.bindings||[]).filter(i=>i.status!=="pass").map(i=>({op_index:i.op_index,op_name:i.op_name,tensor_name:i.tensor_name,role:i.role,classification:i.status==="fail"?"invalid_quantization_parameter_contract":"quantization_parameter_not_assessed",status:i.status==="fail"?"fail":"review",reasons:i.reasons||[],evidence_json_pointer:`/evidence/static_analysis/onnx_quantization_binding/bindings/${(t.bindings||[]).indexOf(i)}`}));return{status:n.some(i=>i.status==="fail")?"fail":n.length?"review":t.binding_count?"pass":"not_applicable",evidence_class:"DERIVED",tensors_without_metadata:n.length,review_tensors:n.filter(i=>i.status==="review").length,not_applicable_tensors:0,details:n}}function NV(e){let t=e?.onnx_quantization_binding||{};return{status:"pass",evidence_class:"OBSERVED",explicit_qdq_ops:Number(t.explicit_qdq_boundary_count||0),mid_graph_quantization_holes:null,runtime_materialization_status:"not_assessed_static_graph_only",details:t.boundary_edges||[]}}function IV(e){let t=p5(e),n=t.flatMap(i=>i0(e,i));return{status:t.length?"pass":"not_applicable",evidence_class:"DERIVED",kernel_tensors:t.length,per_tensor_kernel_tensors:t.filter(i=>Number(i.quant_scales||0)===1).length,per_channel_kernel_tensors:t.filter(i=>Number(i.quant_scales||0)>1).length,depthwise_per_tensor_kernel_tensors:0,minimum_weight_scale:n.length?Math.min(...n):null,maximum_weight_scale:n.length?Math.max(...n):null,maximum_to_minimum_scale_ratio:n.length?Math.max(...n)/Math.min(...n):null}}function p5(e){let t=new Set,n=new Map;for(let i of Qe(e)||[])for(let o of i.outputs||[])Number(o)>=0&&n.set(Number(o),i);for(let i of Qe(e)||[]){if(["QLinearConv","QLinearMatMul"].includes(i.name)&&Number(i.inputs?.[3])>=0&&t.add(Number(i.inputs[3])),!["Conv","Gemm","MatMul"].includes(i.name))continue;let o=n.get(Number(i.inputs?.[1])),a=o?.name==="DequantizeLinear"?o:null;a&&Number(a.inputs?.[0])>=0&&t.add(Number(a.inputs[0]))}return[...t].map(i=>Fi(e,i)).filter(i=>i&&Number(i.quant_scales||0)>0)}function CV(e,t){let n=(t?.shape||[]).map(i=>Math.max(1,Number(i)||1));return["QLinearConv","ConvInteger"].includes(e.name)&&n.length>=4?n.slice(1).reduce((i,o)=>i*o,1):n.length>=2?n.at(-2):0}function m5(e,t){return(e?.onnx_quantization_binding?.bindings||[]).find(n=>n.tensor_name===t?.name&&n.scale_values?.length)||null}function i0(e,t){return(m5(e,t)?.scale_values||t?.scale_sample||[]).map(Number).filter(n=>n>0&&Number.isFinite(n))}function f5(e,t){return(m5(e,t)?.zero_point_values||t?.zero_point_sample||[]).map(Number)}function u5(e,t){let n=String(t?.dtype||"").toUpperCase(),[i,o]=n==="INT8"?[-128,127]:n==="UINT8"?[0,255]:[0,0];if(i===0&&o===0)return 0;let a=f5(e,t),r=a.length?a:[0];return Math.max(...r.map(s=>Math.max(Math.abs(i-s),Math.abs(o-s))))}function yt(e){return{status:"not_applicable",evidence_class:"NOT_APPLICABLE",reason:e,checked_ops:0,review_ops:0,maximum_input_scale_ratio:0,review_threshold_ratio:ph,details:[]}}function kV(e){let t=[],n=e?.quantization_lattice?.residual_adds||[],i=new Map(n.map((a,r)=>[Number(a.op_index),{row:a,index:r}]));for(let a of Qe(e)||[]){if(Cr(a)!=="ADD")continue;let r=Fi(e,a.inputs?.[0]),s=Fi(e,a.inputs?.[1]),c=Fi(e,a.outputs?.[0]),u=n0(r),l=n0(s);if(!(u>0)||!(l>0))continue;let _=Math.max(u,l)/Math.min(u,l),p=i.get(Number(a.index))||null,d=p?.row?.assessment_status==="assessed"?p.row:null;t.push({op_index:a.index,op_name:a.name,input_tensor_indices:[qn(r),qn(s)],output_tensor_index:qn(c),input_scales:[u,l],output_scale:n0(c)||null,input_scale_ratio:_,status:_>=ph?"review":"pass",review_threshold_ratio:ph,exhaustive_legal_code_pair_count:d?.enumerated_code_pair_count??null,legal_domain_escape_pair_count:d?.range_escape_pair_count??null,legal_domain_escape_pair_ratio:d?.range_escape_pair_ratio??null,fixed_zero_point_containment_scale_ratio:d?.fixed_zero_point_containment?.scale_ratio_to_current??null,globally_finest_containment_scale_ratio:d?.globally_finest_containment?.scale_ratio_to_current??null,globally_finest_containment_zero_point_delta:d?.globally_finest_containment?.signed_zero_point_delta??null,globally_finest_containment_clamp_pair_count:d?.globally_finest_containment?.rounded_projection_clamp_pair_count??null,formula:"max(input_scale_0,input_scale_1) / min(input_scale_0,input_scale_1)",evidence_json_pointer:p?`/evidence/static_analysis/quantization_lattice/residual_adds/${p.index}`:`/evidence/static_analysis/ops/${a.index}`})}let o=t.filter(a=>a.status==="review");return{status:t.length?o.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_ops:t.length,review_ops:o.length,maximum_input_scale_ratio:mh(t.map(a=>a.input_scale_ratio)),containment_design_ops:t.filter(a=>a.globally_finest_containment_scale_ratio!=null).length,maximum_global_finest_containment_scale_ratio:HV(t.map(a=>a.globally_finest_containment_scale_ratio)),review_threshold_ratio:ph,threshold_class:"HEURISTIC",details:t}}function SV(e){let t=e?.contract_migration;if(!t)return yt("Residual containment-contract migration analysis was not emitted.");let n=(t.migrations||[]).flatMap((o,a)=>(o.scenarios||[]).map((r,s)=>({source_add_op_index:o.source_add_op_index,output_tensor_index:o.output_tensor_index,design:r.design,candidate_output_scale:r.candidate_output_scale,candidate_output_zero_point:r.candidate_output_zero_point,scale_ratio_to_current:r.scale_ratio_to_current,signed_zero_point_delta:r.signed_zero_point_delta,direct_consumer_count:o.direct_consumer_count,assessed_consumer_count:r.assessed_consumer_count,unassessed_consumer_count:r.unassessed_consumer_count,assessed_kernel_channels:r.assessed_kernel_channel_count,changed_multiplier_encodings:r.multiplier_encoding_changed_channel_count,changed_multiplier_shifts:r.multiplier_shift_changed_channel_count,changed_bias_codes:r.bias_code_changed_channel_count,bias_int32_overflow_channels:r.bias_int32_overflow_channel_count,changed_add_parameter_encodings:r.add_parameter_encoding_changed_count,reachable_downstream_ops:o.reachable_downstream_op_count,maximum_downstream_edge_depth:o.maximum_downstream_edge_depth,status:r.unassessed_consumer_count||r.bias_int32_overflow_channel_count?"review":"pass",evidence_json_pointer:`/evidence/static_analysis/contract_migration/migrations/${a}/scenarios/${s}`}))),i=n.filter(o=>o.status==="review");return{status:n.length?i.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_residual_contracts:t.residual_contract_count,checked_candidate_scenarios:n.length,direct_consumers:t.direct_consumer_count,assessed_consumer_scenarios:t.assessed_consumer_scenario_count,unassessed_consumer_scenarios:t.unassessed_consumer_scenario_count,assessed_kernel_channel_scenarios:t.assessed_kernel_channel_scenario_count,changed_multiplier_encoding_channel_scenarios:t.multiplier_encoding_changed_channel_scenario_count,changed_multiplier_shift_channel_scenarios:t.multiplier_shift_changed_channel_scenario_count,changed_bias_code_channel_scenarios:t.bias_code_changed_channel_scenario_count,bias_int32_overflow_channel_scenarios:t.bias_int32_overflow_channel_scenario_count,changed_add_parameter_encoding_scenarios:t.add_parameter_encoding_changed_scenario_count,structural_downstream_op_union:t.reachable_downstream_op_union_count,maximum_downstream_edge_depth:t.maximum_downstream_edge_depth,bound_class:"counterfactual_reexport_parameter_regeneration",method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function TV(e){let t=e?.residual_step_response;if(!t)return yt("Residual step-response analysis was not emitted.");let n=(t.residual_adds||[]).flatMap((i,o)=>(i.contracts||[]).map((a,r)=>({op_index:i.op_index,design:a.design,output_scale:a.output_scale,output_zero_point:a.output_zero_point,rounded_projection_clamp_pair_count:a.rounded_projection_clamp_pair_count,visible_transition_count:a.visible_transition_count,silent_transition_count:a.silent_transition_count,both_branches_visible_cell_count:a.both_branches_visible_cell_count,neither_branch_visible_cell_count:a.neither_branch_visible_cell_count,removed_rounded_clamp_pairs_vs_current:a.removed_rounded_clamp_pairs_vs_current,additional_silent_transitions_vs_current:a.additional_silent_transitions_vs_current,transition_ledger_sha256:a.transition_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/residual_step_response/residual_adds/${o}/contracts/${r}`})));return{status:t.assessed_add_count?t.unassessed_add_count?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_residual_adds:t.assessed_add_count,checked_contracts:t.contract_response_count,exact_branch_transitions:t.total_transition_count,exact_joint_interior_cells:t.total_joint_interior_cell_count,current_silent_transitions:t.current_silent_transition_count,containment_additional_silent_transitions:t.containment_additional_silent_transition_count,containment_removed_rounded_clamp_pairs:t.containment_removed_rounded_clamp_pair_count,maximum_containment_silent_ratio_increase:t.maximum_containment_silent_ratio_increase,bound_class:"uniform_legal_code_local_distinguishability",method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function zV(e){let t=e?.residual_contract_distortion;if(!t)return yt("Residual contract-distortion analysis was not emitted.");let n=(t.residual_adds||[]).flatMap((i,o)=>(i.scenarios||[]).map((a,r)=>({op_index:i.op_index,design:a.design,candidate_output_scale:a.candidate_output_scale,candidate_output_zero_point:a.candidate_output_zero_point,enumerated_pair_count:a.enumerated_pair_count,rescued_current_clamp_pair_count:a.rescued_current_clamp_pair_count,changed_represented_value_pair_count:a.changed_represented_value_pair_count,ideal_error_improved_pair_count:a.ideal_error_improved_pair_count,ideal_error_worsened_pair_count:a.ideal_error_worsened_pair_count,sign_class_changed_pair_count:a.sign_class_changed_pair_count,root_mean_square_contract_delta_current_steps:a.root_mean_square_contract_delta_current_steps,p99_absolute_contract_delta_current_steps:a.p99_absolute_contract_delta_current_steps,pair_ledger_sha256:a.pair_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/residual_contract_distortion/residual_adds/${o}/scenarios/${r}`})));return{status:t.assessed_add_count?t.unassessed_add_count?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_residual_adds:t.assessed_add_count,checked_candidate_scenarios:t.scenario_count,exact_pair_comparisons:t.total_enumerated_pair_count,rescued_current_clamp_pair_instances:t.rescued_current_clamp_pair_instance_count,candidate_clamped_pairs:t.candidate_clamped_pair_count,changed_represented_value_pairs:t.changed_represented_value_pair_count,ideal_error_improved_pairs:t.ideal_error_improved_pair_count,ideal_error_worsened_pairs:t.ideal_error_worsened_pair_count,ideal_error_equal_within_tolerance_pairs:t.ideal_error_equal_within_tolerance_pair_count,sign_class_changed_pairs:t.sign_class_changed_pair_count,maximum_rms_contract_delta_current_steps:t.maximum_rms_contract_delta_current_steps,maximum_p99_contract_delta_current_steps:t.maximum_p99_contract_delta_current_steps,bound_class:"uniform_legal_code_contract_counterfactual",method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function OV(e){let t=[],n=new Set;for(let a of Qe(e)||[]){if(!a0.has(Cr(a)))continue;let r=Fi(e,a.inputs?.[1]),s=qn(r);if(s==null||n.has(s)||!o0(r).length)continue;n.add(s);let c=String(r?.dtype||"").toUpperCase(),u=(r?.zero_point_sample||[]).map(Number),l=c==="INT8"?[-128,127]:c==="UINT8"?[0,255]:null,_=l?u.some(m=>m<l[0]||m>l[1]):!1,p=c==="INT8"&&u.some(m=>m!==0),d=c==="UINT8";t.push({tensor_index:s,tensor_name:r?.name||"",dtype:c,zero_points:u,legal_range:l,out_of_range:_,symmetric_int8_violation:p,asymmetric_uint8_observed:d,status:_||p?"fail":d?"review":"pass",formula:c==="INT8"?"weight_zero_point[channel] == 0":"qmin <= zero_point <= qmax",evidence_json_pointer:`/evidence/static_analysis/tensors/${s}`})}let i=t.filter(a=>a.status==="fail"),o=t.filter(a=>a.asymmetric_uint8_observed);return{status:t.length?i.length?"fail":o.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",checked_tensors:t.length,violation_tensors:i.length,asymmetric_uint8_tensors:o.length,converter_lineage_status:o.length?"not_assessable_from_artifact":"not_applicable",details:t}}function RV(e){let t=String(e?.format||"tflite").toLowerCase()==="tflite"?e?.accumulator_atlas:null;if(t?.assessed_op_count){let o=(t.ops||[]).map((a,r)=>a.assessment_status==="assessed"?{op_index:a.op_index,op_name:a.op_name,input_tensor_index:a.input_tensor_index,weight_tensor_index:a.weight_tensor_index,weight_tensor_name:a.weight_tensor_name,accumulation_terms:a.accumulation_terms_per_channel,assessed_channels:a.assessed_channel_count,overflow_channels:a.int32_overflow_channel_count,overflow_channel_indices:[...a.overflow_channel_indices||[]],maximum_absolute_accumulator_decimal:a.maximum_absolute_accumulator_decimal,int32_max:Rd,int32_ratio:a.maximum_int32_ratio,required_signed_bits:a.maximum_required_signed_bits,int32_headroom_bits:a.minimum_int32_headroom_bits,metadata_only_magnitude_bound_decimal:a.metadata_only_magnitude_bound_decimal,metadata_only_int32_ratio:a.metadata_only_int32_ratio,exact_tightening_factor:a.exact_tightening_factor,status:a.int32_overflow_channel_count?"fail":"pass",formula:a.formula,channel_ledger_sha256:a.channel_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/accumulator_atlas/ops/${r}`}:null).filter(Boolean);return{status:t.int32_overflow_channel_count?"fail":"pass",evidence_class:"DERIVED",bound_class:"exact_stored_weight_channel_integer_domain",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,overflow_risk_ops:t.overflow_op_count,overflow_risk_channels:t.int32_overflow_channel_count,maximum_int32_ratio:t.maximum_int32_ratio,maximum_absolute_accumulator_decimal:t.maximum_absolute_accumulator_decimal,maximum_required_signed_bits:t.maximum_required_signed_bits,minimum_int32_headroom_bits:t.minimum_int32_headroom_bits,maximum_metadata_only_int32_ratio:mh(o.map(a=>a.metadata_only_int32_ratio)),accumulator_dtype:"INT32",source_commit:t.source_commit,method:t.method,interpretation_boundary:t.interpretation_boundary,details:o}}let n=[];for(let o of Qe(e)||[]){if(!a0.has(Cr(o)))continue;let a=Fi(e,o.inputs?.[0]),r=Fi(e,o.inputs?.[1]),s=VV(o,r),c=_5(a),u=_5(r);if(!(s>0)||!(c>0)||!(u>0))continue;let l=s*c*u,_=l/Rd;n.push({op_index:o.index,op_name:o.name,input_tensor_index:qn(a),weight_tensor_index:qn(r),accumulation_terms:s,input_integer_magnitude_bound:c,weight_integer_magnitude_bound:u,worst_case_absolute_accumulator:l,int32_max:Rd,int32_ratio:_,status:_>=1?"fail":"pass",formula:"accumulation_terms * max_abs(q_input-zp_input) * max_abs(q_weight-zp_weight) / INT32_MAX",evidence_json_pointer:`/evidence/static_analysis/ops/${o.index}`})}let i=n.filter(o=>o.status==="fail");return{status:n.length?i.length?"fail":"pass":"not_applicable",evidence_class:"DERIVED",checked_ops:n.length,overflow_risk_ops:i.length,maximum_int32_ratio:mh(n.map(o=>o.int32_ratio)),bound_class:"metadata_only_legal_code_magnitude_bound",accumulator_dtype:"INT32",details:n}}function BV(e){let t=e?.requantization_fidelity;if(!t?.assessed_op_count)return yt("No accumulator-bounded quantized TFLite Conv/Depthwise/FC channel exposed a complete input, weight, and output scale contract.");let n=(t.ops||[]).map((o,a)=>o.assessment_status==="assessed"?{op_index:o.op_index,op_name:o.op_name,input_tensor_index:o.input_tensor_index,weight_tensor_index:o.weight_tensor_index,output_tensor_index:o.output_tensor_index,weight_scale_mode:o.weight_scale_mode,assessed_channels:o.assessed_channel_count,shift_range:[o.minimum_shift,o.maximum_shift],maximum_relative_multiplier_error:o.maximum_relative_multiplier_error,maximum_multiplier_error_ppm:o.maximum_multiplier_error_ppm,maximum_encoding_drift_bound_codes:o.maximum_encoding_drift_bound_codes,maximum_default_double_rounding_bound_codes:o.maximum_default_double_rounding_bound_codes,maximum_single_rounding_bound_codes:o.maximum_single_rounding_bound_codes,default_pre_shift_overflow_channels:o.default_pre_shift_overflow_channel_count,single_rounding_encoding_divergence_channels:o.single_rounding_encoding_divergence_channel_count,channel_ledger_sha256:o.channel_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/requantization_fidelity/ops/${a}`}:null).filter(Boolean);return{status:t.default_pre_shift_overflow_channel_count>0||t.single_rounding_encoding_divergence_channel_count>0?"review":"pass",evidence_class:"DERIVED",bound_class:"pinned_q0_31_encoding_and_conservative_pre_clamp_rounding",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,fixed_point_bound_channels:t.fixed_point_bound_channel_count,build_flag_status:"TFLITE_SINGLE_ROUNDING_not_embedded_in_artifact",default_pre_shift_overflow_channels:t.default_pre_shift_overflow_channel_count,single_rounding_encoding_divergence_channels:t.single_rounding_encoding_divergence_channel_count,half_code_encoding_drift_channels:t.half_code_encoding_drift_channel_count,one_code_encoding_drift_channels:t.one_code_encoding_drift_channel_count,shift_range:[t.minimum_shift,t.maximum_shift],maximum_relative_multiplier_error:t.maximum_relative_multiplier_error,maximum_multiplier_error_ppm:t.maximum_multiplier_error_ppm,maximum_encoding_drift_bound_codes:t.maximum_encoding_drift_bound_codes,maximum_default_double_rounding_bound_codes:t.maximum_default_double_rounding_bound_codes,maximum_single_rounding_bound_codes:t.maximum_single_rounding_bound_codes,source_commit:t.source_commit,source_references:t.source_references,formula:t.rounding_bound_formula,interpretation_boundary:t.interpretation_boundary,details:n}}function DV(e){let t=e?.kernel_extremum_witness;if(!t?.assessed_op_count)return yt("No quantized convolution-family channel exposed a complete stored-weight extremum and pinned fixed-point projection contract.");let n=(t.ops||[]).map((i,o)=>i.assessment_status==="assessed"?{op_index:i.op_index,op_name:i.op_name,assessed_channels:i.assessed_channel_count,terms_per_channel:i.accumulation_terms_per_channel,witness_assignments:i.witness_assignment_count,fixed_point_endpoint_evaluations:i.fixed_point_endpoint_evaluation_count,default_ideal_mismatch_endpoints:i.default_ideal_mismatch_endpoint_count,single_ideal_mismatch_endpoints:i.single_ideal_mismatch_endpoint_count,build_mode_divergent_endpoints:i.build_mode_divergent_endpoint_count,default_activation_clamped_endpoints:i.default_activation_clamped_endpoint_count,collapsed_extrema_channels:i.default_collapsed_extrema_channel_count,maximum_default_ideal_delta_codes:i.maximum_default_ideal_delta_codes,witness_ledger_sha256:i.witness_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/kernel_extremum_witness/ops/${o}`}:null).filter(Boolean);return{status:t.build_mode_divergent_endpoint_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",bound_class:"canonical_full_valid_receptive_field_legal_code_extrema",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,fixed_point_checked_channels:t.fixed_point_assessed_channel_count,canonical_witness_assignments:t.witness_assignment_count,fixed_point_endpoint_evaluations:t.fixed_point_endpoint_evaluation_count,default_ideal_mismatch_endpoints:t.default_ideal_mismatch_endpoint_count,single_ideal_mismatch_endpoints:t.single_ideal_mismatch_endpoint_count,build_mode_divergent_endpoints:t.build_mode_divergent_endpoint_count,default_activation_clamped_endpoints:t.default_activation_clamped_endpoint_count,collapsed_extrema_channels:t.default_collapsed_extrema_channel_count,maximum_default_ideal_delta_codes:t.maximum_default_ideal_delta_codes,build_flag_status:"TFLITE_SINGLE_ROUNDING_not_embedded_in_artifact",source_commit:t.source_commit,source_references:t.source_references,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function MV(e){let t=e?.channel_vitality;if(!t?.assessed_op_count)return yt("No quantized convolution-family channel exposed complete exact endpoints under both pinned fixed-point build paths.");let n=(t.ops||[]).map((i,o)=>i.assessment_status==="assessed"?{op_index:i.op_index,op_name:i.op_name,assessed_channels:i.assessed_channel_count,constant_accumulator_channels:i.constant_accumulator_channel_count,dual_mode_constant_output_channels:i.dual_mode_constant_output_channel_count,nonconstant_accumulator_dual_mode_constant_channels:i.nonconstant_accumulator_dual_mode_constant_channel_count,mode_dependent_constant_output_channels:i.mode_dependent_constant_output_channel_count,minimum_default_inclusive_code_span:i.minimum_default_inclusive_code_span,minimum_single_inclusive_code_span:i.minimum_single_inclusive_code_span,default_constant_channel_indices:i.default_constant_channel_indices,single_constant_channel_indices:i.single_constant_channel_indices,mode_dependent_constant_channel_indices:i.mode_dependent_constant_channel_indices,source_witness_ledger_sha256:i.source_witness_ledger_sha256,vitality_ledger_sha256:i.vitality_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/channel_vitality/ops/${o}`}:null).filter(Boolean);return{status:t.nonconstant_accumulator_dual_mode_constant_channel_count||t.mode_dependent_constant_output_channel_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",proof_domain:"full_valid_receptive_field_legal_input_code_domain",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,fixed_point_checked_channels:t.fixed_point_assessed_channel_count,constant_accumulator_channels:t.constant_accumulator_channel_count,dual_mode_constant_output_channels:t.dual_mode_constant_output_channel_count,nonconstant_accumulator_dual_mode_constant_channels:t.nonconstant_accumulator_dual_mode_constant_channel_count,mode_dependent_constant_output_channels:t.mode_dependent_constant_output_channel_count,post_bias_negative_locked_channels:t.post_bias_negative_locked_channel_count,post_bias_positive_locked_channels:t.post_bias_positive_locked_channel_count,default_full_activation_span_channels:t.default_full_activation_span_channel_count,single_full_activation_span_channels:t.single_full_activation_span_channel_count,span_histogram:t.span_histogram,source_commit:t.source_commit,source_references:t.source_references,constant_proof:t.constant_proof,span_definition:t.span_definition,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function $V(e){let t=e?.rounding_equivalence;if(!t?.assessed_op_count)return yt("No quantized convolution-family channel exposed a complete int32 post-bias interval under both pinned TFLite fixed-point build paths.");let n=(t.ops||[]).map((i,o)=>i.assessment_status==="assessed"?{op_index:i.op_index,op_name:i.op_name,assessed_channels:i.assessed_channel_count,equivalent_channels:i.equivalent_channel_count,divergent_channels:i.divergent_channel_count,interval_state_count_decimal:i.interval_state_count_decimal,divergent_state_count_decimal:i.divergent_state_count_decimal,divergent_state_ratio:i.divergent_state_ratio,default_lower_state_count_decimal:i.default_lower_state_count_decimal,default_higher_state_count_decimal:i.default_higher_state_count_decimal,maximum_absolute_output_delta:i.maximum_absolute_output_delta,maximum_pair_segment_count:i.maximum_pair_segment_count,maximum_divergent_region_count:i.maximum_divergent_region_count,source_witness_ledger_sha256:i.source_witness_ledger_sha256,source_requantization_ledger_sha256:i.source_requantization_ledger_sha256,equivalence_ledger_sha256:i.equivalence_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/rounding_equivalence/ops/${o}`}:null).filter(Boolean);return{status:t.divergent_channel_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",proof_domain:"closed_post_bias_int32_interval_hull",checked_ops:t.assessed_op_count,checked_channels:t.assessed_channel_count,equivalent_channels:t.equivalent_channel_count,divergent_channels:t.divergent_channel_count,divergent_ops:t.divergent_op_count,interval_state_count_decimal:t.interval_state_count_decimal,divergent_state_count_decimal:t.divergent_state_count_decimal,divergent_state_ratio:t.divergent_state_ratio,default_lower_state_count_decimal:t.default_lower_state_count_decimal,default_higher_state_count_decimal:t.default_higher_state_count_decimal,maximum_absolute_output_delta:t.maximum_absolute_output_delta,exact_pair_segments:t.pair_segment_count,divergent_regions:t.divergent_region_count,divergence_histogram:t.divergence_histogram,build_flag_status:"TFLITE_SINGLE_ROUNDING_not_embedded_in_artifact",source_commit:t.source_commit,source_references:t.source_references,equivalence_proof:t.equivalence_proof,segmentation_bound:t.segmentation_bound,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function LV(e){let t=e?.accumulator_reachability;if(!t?.candidate_op_count)return yt("No TFLite quantized accumulator channel was available for bounded-sum reachability analysis.");let n=(t.ops||[]).map((i,o)=>({op_index:i.op_index,op_name:i.op_name,assessment_status:i.assessment_status,assessed_channels:i.assessed_channel_count,complete_integer_interval_channels:i.complete_integer_interval_channel_count,complete_modular_lattice_channels:i.complete_modular_lattice_channel_count,partial_band_channels:i.partial_band_channel_count,singleton_channels:i.singleton_channel_count,exact_reachable_divergent_channels:i.exact_reachable_divergent_channel_count,unresolved_divergent_channels:i.unresolved_divergent_channel_count,interval_divergent_state_count_decimal:i.interval_divergent_state_count_decimal,exact_reachable_divergent_state_count_decimal:i.exact_reachable_divergent_state_count_decimal,provably_unreachable_divergent_state_count_decimal:i.provably_unreachable_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:i.unresolved_divergent_state_count_decimal,maximum_lattice_gcd:i.maximum_lattice_gcd??null,source_witness_ledger_sha256:i.source_witness_ledger_sha256,source_rounding_equivalence_ledger_sha256:i.source_rounding_equivalence_ledger_sha256,reachability_ledger_sha256:i.reachability_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/accumulator_reachability/ops/${o}`}));return{status:t.exact_reachable_divergent_channel_count||t.unresolved_divergent_channel_count||t.unassessed_op_count?"review":"pass",evidence_class:"DERIVED",proof_domain:"full_valid_kernel_local_independent_legal_input_codes",candidate_ops:t.candidate_op_count,assessed_ops:t.assessed_op_count,unassessed_ops:t.unassessed_op_count,assessed_channels:t.assessed_channel_count,complete_integer_interval_channels:t.complete_integer_interval_channel_count,complete_modular_lattice_channels:t.complete_modular_lattice_channel_count,partial_band_channels:t.partial_band_channel_count,singleton_channels:t.singleton_channel_count,exact_reachable_divergent_channels:t.exact_reachable_divergent_channel_count,unresolved_divergent_channels:t.unresolved_divergent_channel_count,interval_only_divergent_channels:t.interval_only_divergent_channel_count,interval_state_count_decimal:t.interval_state_count_decimal,certified_reachable_state_count_decimal:t.certified_reachable_state_count_decimal,provably_unreachable_state_count_decimal:t.provably_unreachable_state_count_decimal,unresolved_state_count_decimal:t.unresolved_state_count_decimal,interval_divergent_state_count_decimal:t.interval_divergent_state_count_decimal,exact_reachable_divergent_state_count_decimal:t.exact_reachable_divergent_state_count_decimal,provably_unreachable_divergent_state_count_decimal:t.provably_unreachable_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:t.unresolved_divergent_state_count_decimal,exact_reachable_divergent_ratio:t.exact_reachable_divergent_ratio,maximum_lattice_gcd:t.maximum_lattice_gcd,source_commit:t.source_commit,source_references:t.source_references,bounded_sum_proof:t.bounded_sum_proof,state_conservation:t.state_conservation,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function PV(e){let t=e?.numerical_abi_propagation;if(!t?.candidate_source_op_count)return yt("No TFLite rounding-equivalence source op was available for structural output propagation analysis.");let n=(t.sources||[]).map((i,o)=>({op_index:i.op_index,op_name:i.op_name,assessment_status:i.assessment_status,divergent_channels:i.divergent_channel_count,divergent_state_count_decimal:i.divergent_state_count_decimal,local_reachability_status:i.local_reachability_status,exact_reachable_divergent_channels:i.exact_reachable_divergent_channel_count,exact_reachable_divergent_state_count_decimal:i.exact_reachable_divergent_state_count_decimal,provably_unreachable_divergent_state_count_decimal:i.provably_unreachable_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:i.unresolved_divergent_state_count_decimal,reachable_ops:i.reachable_op_count,reachable_model_outputs:i.reachable_model_output_tensor_count,exact_model_output_graph_route_count_decimal:i.exact_model_output_graph_route_count_decimal??null,reconvergence_ops:i.reconvergence_op_count,single_branch_merges:i.single_branch_merge_op_count,predicted_boundary_edges:i.predicted_boundary_edge_count,assessed_boundary_logical_payload_bytes:i.assessed_boundary_logical_payload_bytes,source_equivalence_ledger_sha256:i.source_equivalence_ledger_sha256,source_reachability_ledger_sha256:i.source_reachability_ledger_sha256,propagation_ledger_sha256:i.propagation_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/numerical_abi_propagation/sources/${o}`}));return{status:t.output_reachable_source_op_count||t.unassessed_source_op_count?"review":"pass",evidence_class:"DERIVED",propagation_semantics:"tensor_level_structural_potential_not_observed_numerical_effect",candidate_sources:t.candidate_source_op_count,divergent_sources:t.divergent_source_op_count,equivalent_sources:t.equivalent_source_op_count,unassessed_sources:t.unassessed_source_op_count,local_reachability_unassessed_sources:t.local_reachability_unassessed_source_op_count,output_reachable_sources:t.output_reachable_source_op_count,output_isolated_sources:t.output_isolated_source_op_count,exact_local_counterexample_sources:t.exact_local_counterexample_source_op_count,residue_excluded_divergence_sources:t.residue_excluded_divergence_source_op_count,unresolved_divergence_sources:t.unresolved_divergence_source_op_count,exact_output_reachable_sources:t.exact_output_reachable_source_op_count,interval_divergent_state_count_decimal:t.interval_divergent_state_count_decimal,exact_local_divergent_state_count_decimal:t.exact_local_divergent_state_count_decimal,residue_excluded_divergent_state_count_decimal:t.residue_excluded_divergent_state_count_decimal,unresolved_divergent_state_count_decimal:t.unresolved_divergent_state_count_decimal,graph_edges:t.graph_edge_count,source_corridor_edge_instances:t.source_corridor_edge_instance_count,unique_reachable_ops:t.unique_reachable_op_count,unique_reachable_tensors:t.unique_reachable_tensor_count,unique_predicted_boundary_edges:t.unique_predicted_boundary_edge_count,unique_predicted_boundary_logical_payload_bytes:t.unique_predicted_boundary_logical_payload_bytes??null,exact_source_corridor_edge_instances:t.exact_source_corridor_edge_instance_count,exact_unique_reachable_ops:t.exact_unique_reachable_op_count,exact_unique_reachable_tensors:t.exact_unique_reachable_tensor_count,exact_unique_predicted_boundary_edges:t.exact_unique_predicted_boundary_edge_count,exact_unique_predicted_boundary_logical_payload_bytes:t.exact_unique_predicted_boundary_logical_payload_bytes??null,maximum_model_output_op_hops:t.maximum_model_output_op_hops??null,maximum_model_output_graph_route_count_decimal:t.maximum_model_output_graph_route_count_decimal??null,graph_cycle_status:t.graph_cycle_status,graph_ledger_sha256:t.graph_ledger_sha256,route_definition:t.route_definition,ranking_definition:t.ranking_definition,method:t.method,interpretation_boundary:t.interpretation_boundary,details:n}}function qV(e){let t=e?.input_counterexample;if(!t||t.status==="not_computed_internal_scope")return yt("The model-input tensor counterexample constructor was not available in this analysis scope.");let n=(t.sources||[]).map((i,o)=>({op_index:i.op_index,op_name:i.op_name,input_tensor_index:i.input_tensor_index??null,input_origin:i.input_origin,classification:i.classification,exact_reachable_divergent_channels:i.exact_reachable_divergent_channel_count,exact_reachable_divergent_state_count_decimal:i.exact_reachable_divergent_state_count_decimal,reachable_model_outputs:i.reachable_model_output_tensor_count,exact_model_output_graph_route_count_decimal:i.exact_model_output_graph_route_count_decimal??null,representative_witness_index:i.representative_witness_index??null,reachability_ledger_sha256:i.source_reachability_ledger_sha256,propagation_ledger_sha256:i.source_propagation_ledger_sha256,witness_ledger_sha256:i.representative_witness_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/input_counterexample/sources/${o}`}));return{status:t.tensor_abi_constructive_source_op_count>0||t.upstream_activation_unresolved_source_op_count>0?"review":"pass",evidence_class:"DERIVED",proof_semantics:"complete_quantized_model_input_tensor_exists_for_exact_source_output_code_divergence",exact_local_sources:t.exact_local_source_op_count,direct_model_input_sources:t.direct_model_input_source_op_count,tensor_abi_constructive_sources:t.tensor_abi_constructive_source_op_count,upstream_activation_unresolved_sources:t.upstream_activation_unresolved_source_op_count,not_assessed_sources:t.not_assessed_source_op_count,tensor_abi_constructive_channels:t.tensor_abi_constructive_channel_count,tensor_abi_constructive_divergent_state_count_decimal:t.tensor_abi_constructive_divergent_state_count_decimal,output_reachable_constructive_sources:t.output_reachable_constructive_source_op_count,representative_witnesses:t.representative_witness_count,source_classification_conservation:t.source_classification_conservation,portfolio_ledger_sha256:t.portfolio_ledger_sha256,method:t.method,proof_scope:t.proof_scope,interpretation_boundary:t.interpretation_boundary,details:n}}function jV(e){let t=e?.preprocessing_realizability;return!t||t.status==="not_computed_internal_scope"||!t.candidate_evaluation_count?yt("No eligible constructive NHWC RGB input witness was available for preprocessing counterfactual analysis."):{status:t.exact_tensor_realization_candidate_count>0&&t.non_exact_candidate_count>0?"review":"pass",evidence_class:"DERIVED",assessment_kind:t.assessment_kind,proof_semantics:"finite_256_code_source_domain_inverse_under_explicit_candidate_contract",source_witnesses:t.source_witness_count,eligible_image_witnesses:t.eligible_image_witness_count,candidate_contracts:t.candidate_contract_count,candidate_evaluations:t.candidate_evaluation_count,assessed_candidates:t.assessed_candidate_count,exact_tensor_realization_candidates:t.exact_tensor_realization_candidate_count,non_exact_candidates:t.non_exact_candidate_count,exact_contract_ids:t.exact_contract_ids,best_non_exact_contract_id:t.best_non_exact_contract_id,best_non_exact_unrealizable_elements:t.best_non_exact_unrealizable_element_count??null,candidate_conservation:t.candidate_conservation,portfolio_ledger_sha256:t.portfolio_ledger_sha256,method:t.method,proof_scope:t.proof_scope,interpretation_boundary:t.interpretation_boundary,details:(t.candidates||[]).map((n,i)=>({contract_id:n.contract_id,contract_label:n.contract_label,tensor_channel_order:n.tensor_channel_order,exact_tensor_realization:n.exact_tensor_realization,exact_tensor_elements:n.exact_tensor_element_count,unrealizable_tensor_elements:n.unrealizable_tensor_element_count,minimum_total_absolute_tensor_code_error_decimal:n.minimum_total_absolute_tensor_code_error_decimal,maximum_absolute_tensor_code_error:n.maximum_absolute_tensor_code_error,reachable_tensor_codes_by_channel:(n.channel_maps||[]).map(o=>o.reachable_tensor_code_count),tensor_code_holes_by_channel:(n.channel_maps||[]).map(o=>o.tensor_code_hole_count),nearest_rgb_fixture_sha256:n.nearest_rgb_fixture_sha256,candidate_ledger_sha256:n.candidate_ledger_sha256,evidence_json_pointer:`/evidence/static_analysis/preprocessing_realizability/candidates/${i}`}))}}function FV(e){let t=Number(e?.quantized_tensors||0)>0,n=[];if(t)for(let o of Xt(e)||[]){if(Number(o?.quant_scales||0)>0)continue;let a=GV(e,o);n.push({tensor_index:qn(o),tensor_name:o?.name||"",dtype:o?.dtype||"UNKNOWN",classification:a,metadata_expected:a!=="shape_or_configuration",status:a==="shape_or_configuration"?"not_applicable":"review",evidence_json_pointer:`/evidence/static_analysis/tensors/${qn(o)}`})}let i=n.filter(o=>o.status==="review");return{status:t?i.length?"review":"pass":"not_applicable",evidence_class:"DERIVED",tensors_without_metadata:n.length,review_tensors:i.length,not_applicable_tensors:n.length-i.length,details:n}}function QV(e){let t=(Qe(e)||[]).filter(n=>["QUANTIZE","DEQUANTIZE"].includes(Cr(n))).map(n=>({op_index:n.index,op_name:n.name,input_tensor_indices:(n.inputs||[]).map(Number),output_tensor_indices:(n.outputs||[]).map(Number),estimated_bytes:Number(n.estimated_bytes||0),evidence_json_pointer:`/evidence/static_analysis/ops/${n.index}`}));return{status:"pass",evidence_class:"OBSERVED",explicit_qdq_ops:t.length,mid_graph_quantization_holes:Number(e?.quant_hole_count||0),details:t}}function UV(e){let t=new Map;for(let a of Qe(e)||[]){if(!a0.has(Cr(a)))continue;let r=Fi(e,a.inputs?.[1]),s=qn(r);s!=null&&o0(r).length&&t.set(s,{op:a,weight:r})}let n=[...t.values()],i=n.flatMap(({weight:a})=>o0(a)),o=n.filter(({op:a,weight:r})=>Cr(a)==="DEPTHWISE_CONV_2D"&&Number(r?.quant_scales||0)===1).length;return{status:n.length?o?"review":"pass":"not_applicable",evidence_class:"DERIVED",kernel_tensors:n.length,per_tensor_kernel_tensors:n.filter(({weight:a})=>Number(a?.quant_scales||0)===1).length,per_channel_kernel_tensors:n.filter(({weight:a})=>Number(a?.quant_scales||0)>1).length,depthwise_per_tensor_kernel_tensors:o,minimum_weight_scale:i.length?Math.min(...i):null,maximum_weight_scale:i.length?Math.max(...i):null,maximum_to_minimum_scale_ratio:i.length?Math.max(...i)/Math.min(...i):null}}function GV(e,t){let i=(Qe(e)||[]).filter(a=>(a.inputs||[]).includes(Number(t?.index))).map(Cr),o=String(t?.dtype||"").toUpperCase();return["RESHAPE","SHAPE","STRIDED_SLICE","PACK","CONCATENATION"].some(a=>i.includes(a))||["INT32","INT64"].includes(o)&&(t?.constant_buffer||h5(t?.shape)<=8)?"shape_or_configuration":t?.constant_buffer?"constant":"activation"}function _5(e){let t=String(e?.dtype||"").toUpperCase(),[n,i]=t==="INT8"?[-128,127]:t==="UINT8"?[0,255]:[0,0];if(n===0&&i===0)return 0;let o=(e?.zero_point_sample||[0]).map(Number);return Math.max(...o.map(a=>Math.max(Math.abs(n-a),Math.abs(i-a))))}function VV(e,t){let n=(t?.shape||[]).map(i=>Math.max(1,Number(i)||1));return Cr(e)==="DEPTHWISE_CONV_2D"&&n.length>=4?n[1]*n[2]:n.length>=2?n.slice(1).reduce((i,o)=>i*o,1):0}function Fi(e,t){let n=Number(t);return Number.isInteger(n)&&n>=0?(Xt(e)||[])[n]:null}function qn(e){let t=Number.isInteger(e?.index)?e.index:Number(e?.tensor_index);return Number.isInteger(t)&&t>=0?t:null}function n0(e){return Number(e?.scale_sample?.[0]||0)}function o0(e){return(e?.scale_sample||[]).map(Number).filter(t=>t>0&&Number.isFinite(t))}function Cr(e){return String(e?.name||"").toUpperCase()}function mh(e){return e.length?Math.max(...e.map(t=>Number(t||0))):0}function HV(e){let t=e.filter(n=>n!=null).map(Number).filter(Number.isFinite);return t.length?Math.max(...t):null}function h5(e){return Array.isArray(e)&&e.length&&e.every(t=>Number(t)>0)?e.reduce((t,n)=>t*Number(n),1):0}var KV={integration:"integration requirement",integration_verification:"integration verification",execution_provider_compatibility:"execution-provider compatibility",quantization:"deployment-risk (requires confirmation)",quantization_design_review:"quantization design review",quantization_calibration_review:"quantization calibration review",numerical_structure_review:"numerical structure review",delegate:"deployment-risk (requires confirmation)",packing:"optimization opportunity",memory_cache:"deployment-resource verification",channel_alignment:"optimization opportunity",runtime:"deployment-risk (requires confirmation)",runtime_compatibility:"runtime compatibility",evidence_reproducibility:"evidence reproducibility",lineage:"lineage requirement",synthetic_sensitivity:"deployment-risk (requires confirmation)",integrity:"defect / integrity concern",limitation:"limitation"},fh=Object.freeze({"EA-IOC-0001":["/evidence/static_analysis/inputs/0","/evidence/static_analysis/metadata_presence/documented_preprocessing"],"EA-DYN-0001":["/evidence/static_analysis/dynamic_shape_cost_contract","/evidence/static_analysis/inputs"],"EA-OUT-0001":["/evidence/static_analysis/outputs/0","/evidence/static_analysis/metadata_presence/output_semantics_documented"],"EA-LIN-0001":["/evidence/static_analysis/metadata_presence"],"EA-PROV-0001":["/evidence/static_analysis/target_profile","/analyzer_metadata"],"EA-RUN-0001":["/evidence/static_analysis/runtime_compat"],"EA-GRF-0001":["/evidence/static_analysis/subgraphs","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0004":["/evidence/static_analysis/onnx_external_data","/evidence/static_analysis/size_breakdown/external_data_tensor_count","/evidence/static_analysis/weight_integrity/tensor_results"],"EA-CML-0001":["/evidence/static_analysis/weight_integrity/parameters"],"EA-CML-0002":["/evidence/static_analysis/weight_integrity/parameters"],"EA-CML-0003":["/evidence/static_analysis/weight_integrity"],"EA-WGT-0001":["/evidence/static_analysis/weight_integrity/zero_kernel_slice_details"],"EA-QNT-0100":["/evidence/static_analysis/weight_integrity/quant_grid_detail","/evidence/static_analysis/weight_integrity/quant_grid_details"],"EA-QNT-0101":["/evidence/quantization/quantization_contract_checks/kernel_quantization"],"EA-QNT-0102":["/evidence/quantization/quantization_contract_checks/bias_scale"],"EA-QNT-0103":["/evidence/quantization/quantization_contract_checks/residual_add"],"EA-QNT-0104":["/evidence/quantization/quantization_contract_checks/weight_zero_point"],"EA-QNT-0105":["/evidence/quantization/quantization_contract_checks/parameter_integrity"],"EA-QNT-0106":["/evidence/quantization/quantization_contract_checks/accumulator_bound","/evidence/static_analysis/accumulator_atlas"],"EA-QNT-0107":["/evidence/quantization/quantization_contract_checks/requantization_fidelity","/evidence/static_analysis/requantization_fidelity"],"EA-QNT-0108":["/evidence/static_analysis/quantization_lattice","/evidence/static_analysis/contract_migration","/evidence/quantization/quantization_contract_checks/residual_add","/evidence/quantization/quantization_contract_checks/contract_migration"],"EA-QNT-0109":["/evidence/static_analysis/residual_step_response","/evidence/quantization/quantization_contract_checks/residual_step_response"],"EA-QNT-0110":["/evidence/static_analysis/residual_contract_distortion","/evidence/quantization/quantization_contract_checks/residual_contract_distortion"],"EA-QNT-0111":["/evidence/static_analysis/kernel_extremum_witness","/evidence/quantization/quantization_contract_checks/kernel_extremum_witness"],"EA-QNT-0112":["/evidence/static_analysis/channel_vitality","/evidence/quantization/quantization_contract_checks/channel_vitality"],"EA-QNT-0113":["/evidence/static_analysis/rounding_equivalence","/evidence/quantization/quantization_contract_checks/rounding_equivalence"],"EA-QNT-0114":["/evidence/static_analysis/numerical_abi_propagation","/evidence/quantization/quantization_contract_checks/numerical_abi_propagation"],"EA-QNT-0115":["/evidence/static_analysis/accumulator_reachability","/evidence/quantization/quantization_contract_checks/accumulator_reachability"],"EA-QNT-0116":["/evidence/static_analysis/input_counterexample","/evidence/quantization/quantization_contract_checks/input_counterexample"],"EA-DEL-0004":["/evidence/static_analysis/delegation_repair/runtime_build_risks"],"EA-QNT-0117":["/evidence/static_analysis/preprocessing_realizability","/evidence/quantization/quantization_contract_checks/preprocessing_realizability"],"EA-QNT-0118":["/evidence/quantization/quantization_contract_checks/representable_kernel_channels"],"EA-QNT-0119":["/evidence/quantization/quantization_contract_checks/input_quantization_convention","/evidence/static_analysis/inputs"],"EA-QNT-0001":["/evidence/static_analysis/quant_holes","/evidence/static_analysis/quant_hole_count"],"EA-DEL-0001":["/evidence/static_analysis/xnnpack_chains","/evidence/static_analysis/ops"],"EA-QNT-0002":["/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-DEL-0002":["/evidence/static_analysis/predicted_partition_boundaries"],"EA-DEL-0003":["/evidence/runtime_results/runtime_assignment/comparison"],"EA-MEM-0001":["/evidence/static_analysis/tensor_liveness"],"EA-MEM-0002":["/evidence/static_analysis/tensor_arena_plan","/evidence/runtime_results/runtime_assignment/runtime_memory","/evidence/runtime_results/runtime_assignment/arena_reconciliation"],"EA-PKG-0001":["/evidence/static_analysis/ops"],"EA-CHN-0001":["/evidence/static_analysis/ops","/evidence/static_analysis/target_profile"],"EA-RUN-0002":["/evidence/runtime_results/runtime_basin"],"EA-RUN-0003":["/evidence/runtime_results/preprocessing_consequence_atlas"],"EA-ONX-0001":["/evidence/static_analysis/onnx_domain_analysis/external_custom_domains"],"EA-ONX-0002":["/evidence/static_analysis/onnx_domain_analysis/recursive_function_cycles","/evidence/static_analysis/onnx_domain_analysis/duplicate_function_ids"],"EA-ONX-0003":["/evidence/static_analysis/onnx_domain_analysis/functions"],"EA-ONX-0005":["/evidence/static_analysis/ort_compatibility_evidence/execution_providers","/evidence/static_analysis/ort_ep_portability_frontier"],"EA-ONX-0006":["/evidence/static_analysis/onnx_shape_inference/declaration_conflicts","/evidence/static_analysis/tensors"],"EA-ONX-0071":["/evidence/static_analysis/onnx_shape_inference/semantic_contract_conflicts","/evidence/static_analysis/onnx_shape_inference/rule_unresolved_nodes","/evidence/static_analysis/tensors"],"EA-ONX-0072":["/evidence/static_analysis/onnx_shape_inference/conditionally_invalid_node_output_count","/evidence/static_analysis/onnx_shape_inference/conditional_invalid_variant_count","/evidence/static_analysis/tensors"],"EA-ONX-0007":["/evidence/static_analysis/onnx_shape_inference/opset_import_contract","/evidence/static_analysis/onnx_shape_inference/schema_form_rows","/evidence/static_analysis/onnx_shape_inference/source_documents"],"EA-ONX-0008":["/evidence/static_analysis/onnx_shape_inference/shape_scope","/evidence/static_analysis/onnx_shape_inference/extended_scope_inference","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/partial_rows","/evidence/static_analysis/onnx_domain_analysis/functions"],"EA-ONX-0009":["/evidence/static_analysis/onnx_shape_inference/extended_scope_inference","/evidence/static_analysis/onnx_shape_inference/shape_scope"],"EA-ONX-0010":["/evidence/static_analysis/onnx_type_proto_contract/invalid_rows","/evidence/static_analysis/onnx_type_proto_contract/source_sha256"],"EA-ONX-0011":["/evidence/static_analysis/onnx_sparse_tensor_contract/invalid_rows","/evidence/static_analysis/onnx_sparse_tensor_contract/source_sha256"],"EA-ONX-0012":["/evidence/static_analysis/onnx_shape_inference/container_value_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/container_value_inference/source_documents"],"EA-ONX-0013":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents"],"EA-ONX-0014":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents"],"EA-ONX-0015":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0016":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0017":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0018":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0019":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0020":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0021":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0022":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0023":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0024":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0025":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0026":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0027":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0028":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0029":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0030":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0031":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0032":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0033":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0034":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0035":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0036":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0037":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0038":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0039":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0040":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0042":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0043":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0044":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0045":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0046":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0047":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0048":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0049":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/tensors"],"EA-ONX-0050":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0051":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0052":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0053":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0054":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0055":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0056":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0057":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0058":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0059":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0060":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0061":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents"],"EA-ONX-0062":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0063":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents"],"EA-ONX-0064":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/source_documents","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/ops"],"EA-ONX-0065":["/evidence/static_analysis/onnx_shape_inference/ml_value_inference/rows","/evidence/static_analysis/onnx_shape_inference/ml_value_inference/runtime_reference_documents","/evidence/static_analysis/tensors"],"EA-ONX-0066":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/failed_rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/source_documents","/evidence/static_analysis/ops","/evidence/static_analysis/tensors"],"EA-ONX-0067":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/source_documents","/evidence/static_analysis/ops"],"EA-ONX-0068":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/source_documents","/evidence/static_analysis/tensors"],"EA-ONX-0069":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows","/evidence/static_analysis/ops"],"EA-ONX-0070":["/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/partial_rows","/evidence/static_analysis/onnx_shape_inference/tfidf_vectorizer_inference/rows"],"EA-SYN-0001":["/evidence/weight_indicators/deploy_curvature_basin"],"EA-LIM-0001":["/evidence/static_analysis"]}),ZV=Object.freeze({OBSERVED:"high","OBSERVED/DERIVED":"high","OBSERVED/NOT_ASSESSABLE":"high",SOURCE_PINNED_AND_DERIVED:"high",SOURCE_PINNED_AND_OBSERVED:"high",DERIVED:"high",DERIVED_FROM_OBSERVED_RUNTIME:"high",NOT_ASSESSABLE:"high",HEURISTIC:"medium",ESTIMATED:"medium",PREDICTED:"medium",MEASURED_SYNTHETIC:"medium",PROXY:"low"});function Z({id:e,category:t,title:n,evidence:i,priority:o,op:a="",tensor:r="",observation:s="",interpretation:c="",recommendation:u="",relevance:l="",findingClass:_="",findingKind:p="",origin:d="report_synthesis",sourceRuleId:m="",evidenceJsonPointers:f=null,methodVersion:g="",confidence:h="",affectedTensorCount:b=null,assessedTensorCount:A=null,affectedTensors:y=null,affectedTensorsTruncated:x=!1}){return{finding_id:e,origin:d,source_rule_id:m||`deepbom.report_findings.${e}.v1`,evidence_json_pointers:f||fh[e]||["/"],method_version:g||Pn.schemas.findingsRegister,confidence:h||ZV[i]||"not_declared",confidence_scope:"Confidence describes the evidence extraction or deterministic method, not the likelihood or severity of a product effect.",category:t,finding_kind:p||XV({category:t,evidence:i}),finding_class:_||KV[t]||"engineering review",title:n,evidence_class:i,technical_priority:o,affected_operator:a,affected_tensor:r,...Number.isSafeInteger(b)?{affected_tensor_count:b}:{},...Number.isSafeInteger(A)?{assessed_tensor_count:A}:{},...Array.isArray(y)?{affected_tensors:y}:{},...Array.isArray(y)?{affected_tensors_truncated:x===!0}:{},observation:s,interpretation:c,possible_effects:WV(t),recommendation:u,limitations:i==="NOT_ASSESSABLE"?"Model artifact alone is insufficient.":"Confirm with target runtime and/or representative data where applicable.",regulatory_relevance:l}}function XV({category:e,evidence:t}){let n=String(t||"").toUpperCase();return["NOT_ASSESSABLE","DECLARED_UNVERIFIED"].includes(n)||["lineage","limitation","evidence_completeness","evidence_reproducibility"].includes(e)?"evidence_gap":["integrity","numerical_integrity","input_contract","output_contract","integration_verification"].includes(e)&&["OBSERVED","DERIVED","OBSERVED/DERIVED","SOURCE_PINNED_AND_OBSERVED"].includes(n)?"artifact_defect":"caution"}function WV(e){return{integration:["preprocessing mismatch","label-map mismatch","application contract drift"],integration_verification:["runtime support gap","release-manifest omission","deployment reproducibility gap"],quantization:["quantization sensitivity","calibration review priority","backend-specific numerical drift"],quantization_design_review:["quantization design review","converter lineage review","representative regression planning"],quantization_calibration_review:["calibration range review","representative histogram review","quantization sensitivity triage"],numerical_structure_review:["model-content structure review","representative regression planning","converter/checkpoint triage"],delegate:["fallback latency","copy traffic","runtime partition overhead"],packing:["first-run latency","weight repacking cost","benchmark warmup sensitivity"],memory_cache:["reduced cache reuse","memory-traffic latency","bandwidth pressure"],channel_alignment:["SIMD lane padding","scalar tail overhead","micro-kernel inefficiency"],runtime:["backend-specific latency anomaly","numeric drift","silent fallback"],evidence_reproducibility:["report reproducibility gap","audit-trace ambiguity","target-profile drift"],lineage:["source-artifact traceability gap","converter drift","release-manifest omission"],synthetic_sensitivity:["output plateau","rank instability under perturbation"],limitation:["not assessable from deployment artifact alone"]}[e]||["engineering review priority"]}function hh(e,{runtimeEvidence:t=null,runtimeBasinResult:n=null,deepBomResult:i=null,deployCurvatureResult:o=null,analyzerMetadata:a=Pn}={}){let r=a&&typeof a=="object"?a:Pn,s=[],c=Qe(e)||[],u=(e?.format||"tflite")==="onnx",l=e?.format==="coreml"?e?.weight_integrity:null;if(String(l?.schema||"").startsWith("deepbom.coreml.")){let $=String(l.schema).includes("mlprogram"),ee=String(l.schema).includes("classical")||String(l.schema).includes("pipeline"),ne=$?"Core ML MIL constants":ee?"Core ML serialized numerical parameters":"Core ML WeightParams",ge=Array.isArray(l.parameters)?l.parameters:[],le=he=>`${he.pipeline_model_name?`${he.pipeline_model_name}/`:""}${he.layer_name||he.tensor_name||he.pipeline_model_type||`tensor_${he.tensor_index??"?"}`}/${he.role||"constant"}`,ue=ge.filter(he=>Number(he.numerical_integrity?.nonfinite_count||0)>0);ue.length&&s.push(Z({id:"EA-CML-0001",category:"integrity",title:"Core ML serialized constants contain non-finite values",evidence:"OBSERVED",priority:"High",op:ne,tensor:ue.slice(0,8).map(le).join(", "),observation:`${C(l.nonfinite_value_count||0)} NaN or infinity value(s) were decoded from ${C(ue.length)} Core ML constant payload(s): ${ue.slice(0,8).map(he=>`${le(he)} (${C(he.numerical_integrity.nonfinite_count||0)})`).join("; ")}.`,interpretation:`This is direct numerical evidence from serialized ${$?"MIL immediate/package-blob constant bytes":ee?"classical coefficient, support-vector, threshold, or nested pipeline parameter bytes":"WeightParams bytes"}, not a runtime or task-accuracy inference.`,recommendation:"Reject the release artifact, trace the affected exporter/checkpoint values, regenerate it, and require a clean payload scan before execution validation.",relevance:"serialized numerical integrity; release gating"}));let xt=ge.filter(he=>(l.schema.includes("mlprogram")||["weights","data","support_vectors","coefficients"].includes(he.role)||String(he.role||"").startsWith("weights_"))&&he.numerical_integrity?.all_zero===!0&&he.value_count>0);xt.length&&s.push(Z({id:"EA-CML-0002",category:"numerical_structure_review",title:"Core ML serialized constants are exactly all-zero",evidence:"DERIVED",priority:"Medium",op:ne,tensor:xt.slice(0,8).map(le).join(", "),observation:`${C(xt.length)}/${C(l.assessed_parameter_count||0)} assessed ${$?"MIL constant":ee?"numerical parameter":"WeightParams"} payload(s) contain only exact zero values.`,interpretation:"Exact all-zero storage is deterministic; whether a zero bias is intentional or a zero kernel is defective depends on its bound layer role.",recommendation:"Review zero kernels as release blockers and verify zero bias/offset parameters against the source checkpoint and export manifest.",relevance:"weight payload integrity; exporter verification"})),Number(l.parameter_count||0)>Number(l.assessed_parameter_count||0)&&s.push(Z({id:"EA-CML-0003",category:"limitation",title:"Core ML constant numerical coverage is partial",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"Informational",op:ne,observation:`${C(l.assessed_parameter_count||0)}/${C(l.parameter_count||0)} ${$?"MIL constant":ee?"serialized numerical parameter":"WeightParams"} payload(s) were numerically assessed; ${Number.isSafeInteger(l.payload_bytes)?`${C(l.assessed_payload_bytes||0)}/${C(l.payload_bytes)} payload bytes assessed`:"the external package payload byte denominator remains unbound"}.`,interpretation:"Unimplemented layer cardinality or encoding semantics remain explicit and are not converted to a clean zero-anomaly result.",recommendation:"Use a source-pinned decoder for every listed storage contract before treating Core ML payload integrity as complete.",relevance:"analysis coverage; evidence completeness"}))}let _=e?.format==="gguf"?e.gguf:null;_&&(_.invalid_tensor_cardinality_count>0||_.invalid_tensor_offset_count>0||_.overlapping_tensor_range_count>0)&&s.push(Z({id:"EA-GGF-0001",category:"integrity",findingKind:"artifact_defect",title:"GGUF tensor descriptors violate the serialized storage layout",evidence:"OBSERVED/DERIVED",priority:"High",op:"GGUF tensor directory",observation:`${C(_.invalid_tensor_cardinality_count||0)} tensor row cardinality violation(s), ${C(_.invalid_tensor_offset_count||0)} invalid offset(s), and ${C(_.overlapping_tensor_range_count||0)} overlapping known range(s) were observed. Invalid offsets include ${C(_.out_of_bounds_tensor_range_count||0)} out-of-bounds range(s); these counts are not additive.`,interpretation:"Declared row dimensions must satisfy the source-pinned GGML block size; offsets must satisfy alignment and file bounds. An unsupported encoding alone does not trigger this defect. Unassessable byte lengths remain unknown.",recommendation:"Inspect the named GGUF tensor descriptors and the exporter or quantizer, regenerate the artifact, and repeat the storage-layout checks before runtime validation.",relevance:"serialized storage integrity; release gating",evidenceJsonPointers:["/evidence/static_analysis/gguf","/evidence/static_analysis/tensors"]}));let p=e?.tensor_numerical_integrity;if(p){let $=Array.isArray(p.tensor_records)?p.tensor_records:[],ee=$.filter(ue=>Number(ue.nan_value_count||0)+Number(ue.positive_infinity_value_count||0)+Number(ue.negative_infinity_value_count||0)>0),ne=$.filter(ue=>Number(ue.invalid_encoding_value_count||0)>0||Number(ue.nonfinite_scale_block_count||0)>0),ge=[...new Map([...ee,...ne].map(ue=>[ue.tensor_index,ue])).values()];ge.length&&s.push(Z({id:"EA-SER-0001",category:"numerical_integrity",findingKind:"artifact_defect",title:"Serialized tensor payload contains non-finite or invalid numerical values",evidence:"OBSERVED/DERIVED",priority:"High",op:"serialized tensor payload",tensor:ge.slice(0,8).map(ue=>ue.tensor_name).join(", "),observation:`${C(p.nonfinite_value_count||0)} non-finite decoded value(s), ${C(p.invalid_encoding_value_count||0)} invalid encoded value(s), and ${C(p.nonfinite_scale_block_count||0)} block(s) with non-finite scale metadata were found by a full payload scan. Affected tensors: ${ge.slice(0,8).map(ue=>`${ue.tensor_name} (${C(ue.nan_value_count||0)} NaN, ${C(Number(ue.positive_infinity_value_count||0)+Number(ue.negative_infinity_value_count||0))} Inf, ${C(ue.invalid_encoding_value_count||0)} invalid)`).join("; ")}${ge.length>8?`; plus ${C(ge.length-8)} more`:""}.`,interpretation:"The values are read from the declared serialized tensor ranges. For GGUF block encodings, numerical values are derived with the pinned llama.cpp dequantization formulas; this is not a task-accuracy claim.",recommendation:"Reject the release artifact, inspect the named source tensors and exporter/quantizer path, regenerate the artifact, and require a clean full-payload scan before runtime validation.",relevance:"serialized numerical integrity; release gating",evidenceJsonPointers:["/evidence/static_analysis/tensor_numerical_integrity"]}));let le=$.filter(ue=>ue.status==="assessed_full_payload"&&ue.all_zero);if(le.length){let ue=Number(p.assessed_tensor_count||0),xt=Z({id:"EA-SER-0002",category:"numerical_structure_review",title:"One or more serialized tensor payloads are exactly all-zero",evidence:"DERIVED",priority:"Medium",op:"serialized tensor payload",tensor:le.slice(0,8).map(he=>he.tensor_name).join(", "),affectedTensorCount:le.length,assessedTensorCount:ue,affectedTensors:le.slice(0,64).map(he=>he.tensor_name),affectedTensorsTruncated:le.length>64,observation:`${C(le.length)}/${C(p.assessed_tensor_count||0)} fully decoded tensor payload(s) contain only exact zero values: ${le.slice(0,8).map(he=>`${he.tensor_name} (${C(he.value_count||0)} values)`).join("; ")}${le.length>8?`; plus ${C(le.length-8)} more`:""}.`,interpretation:"Exact all-zero storage is deterministic evidence about the serialized tensor, but its functional effect cannot be inferred without an executable graph and consumer semantics.",recommendation:"Confirm that each all-zero tensor is intentional in the source checkpoint/export manifest; for executable models, join it to consumer operators and representative-output regression.",relevance:"weight payload integrity; export verification",evidenceJsonPointers:["/evidence/static_analysis/tensor_numerical_integrity/tensor_records"]});xt.title=`${C(le.length)} of ${C(ue)} assessed serialized tensor payloads are exactly all-zero`,s.push(xt)}p.status!=="assessed"&&s.push(Z({id:"EA-SER-0003",category:"limitation",title:"Some serialized tensor payload semantics are not assessed",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"Informational",op:"serialized tensor payload",observation:`${C(p.assessed_tensor_count||0)}/${C(p.tensor_count||0)} tensor payloads and ${C(p.assessed_tensor_bytes||0)}/${C(p.declared_tensor_bytes||0)} declared tensor bytes were numerically decoded. ${C(p.unassessed_tensor_count||0)} tensor(s) remain explicit: ${(p.limitations||[]).slice(0,6).map(ue=>`${ue.tensor_name} ${ue.dtype}: ${ue.reason}`).join("; ")||"reason ledger unavailable"}.`,interpretation:"Byte-range conservation is reported separately; no numerical result is inferred for an encoding whose source semantics are not implemented or whose storage cardinality is invalid.",recommendation:"Use a source-pinned decoder for the listed encodings or convert to an assessed dtype before treating payload integrity as complete.",relevance:"analysis coverage; evidence completeness",evidenceJsonPointers:["/evidence/static_analysis/tensor_numerical_integrity/limitations"]}))}let d=d5(e),m=t?.preprocessingConsequenceResult||t?.preprocessing_consequence_atlas||null,f=(e?.inputs||[])[0],g=(e?.input_contracts||[]).find($=>$.tensor_index===f?.index)||(e?.input_contracts||[])[0];if(f&&!e?.metadata_presence?.documented_preprocessing){let $=Object.prototype.hasOwnProperty.call(e?.metadata_presence||{},"documented_preprocessing")?"/evidence/static_analysis/metadata_presence/documented_preprocessing":"/evidence/static_analysis/metadata_presence/preprocessing_contract_status",ee=Number.isFinite(g?.expected_range_low)&&Number.isFinite(g?.expected_range_high)?`[${Number(g.expected_range_low).toPrecision(9)}, ${Number(g.expected_range_high).toPrecision(9)}]`:"not emitted";s.push(Z({id:"EA-IOC-0001",category:"integration",title:"Preprocessing contract is not embedded",evidence:"OBSERVED",priority:"High",op:"Input 0",observation:`The artifact exposes ${f.dtype||"unknown"} ${g5(f.shape)} input. Tensor layout is ${g?.layout||"not determined"} (${g?.layout_evidence_class||"NOT_ASSESSABLE"}; ${g?.layout_status||"no structured layout contract"}); tensor numerical status is ${g?.tensor_numerical_contract_status||"not assessed"} with scalar real range ${ee}. Source decoding, resize policy, interpolation, RGB/BGR order, and normalization remain undocumented.`,interpretation:"The model artifact alone does not define the application-side input transformation needed for reproducible runtime or accuracy results.",recommendation:"Bind a versioned preprocessing specification and its checksum to the artifact release manifest.",relevance:"integration contract; deployment reproducibility",evidenceJsonPointers:["/evidence/static_analysis/inputs/0",...g?["/evidence/static_analysis/input_contracts/0"]:[],$]}))}let h=e?.dynamic_shape_cost_contract,b=YE(e);if(Number(h?.dynamic_tensor_count||0)>0&&b.status!=="assumption_bound_batch_one"){let $=Number(h.unresolved_dynamic_compute_op_count||0),ee=Number(h.total_macs_unresolved_op_count||0),ne=Number(h.liveness?.unresolved_candidate_program_point_count||0),ge=h.total_macs_formula?.expression||h.total_macs_formula_status||"not assessed",le=h.liveness?.peak_live_payload_formula?.expression||h.liveness?.peak_live_payload_max_formula?.expression||h.liveness?.peak_selection_status||"not assessed";s.push(Z({id:"EA-DYN-0001",category:"integration",title:"Dynamic dimensions are not bound to approved deployment scenarios",evidence:"DERIVED",priority:$>0||ee>0||ne>0?"High":"Medium",op:"Dynamic tensor contract",observation:`${C(h.dynamic_tensor_count)} dynamic tensor(s) map to ${C(h.symbol_count||0)} symbol(s). Exact dynamic compute formulas ${C(h.op_formula_count||0)}/${C(h.dynamic_compute_op_count||0)}; dynamic-op unresolved ${C($)}; total-MAC blockers ${C(ee)}. Total MAC expression: ${ge}. Symbolic live-payload peak: ${le}; unresolved live-set program points ${C(ne)}. Dimension bounds status: ${h.dimension_bounds_status||"not assessed"}.`,interpretation:"The emitted polynomials are exact after runtime dimensions are bound, but the artifact contains no approved shape portfolio or numeric bounds. A concrete stored TFLite shape is an example projection, not a worst-case memory or latency claim.",recommendation:"Bind a versioned deployment shape portfolio or explicit dimension bounds, evaluate every emitted cost formula for those scenarios, and attach artifact-bound runtime assignment, allocation, and latency captures for the approved extrema.",relevance:"capacity planning; dynamic input contract; runtime reproducibility",evidenceJsonPointers:fh["EA-DYN-0001"]}))}m?.status==="assessed"&&Number(m.output_changed_candidate_count||0)>0&&s.push(Z({id:"EA-RUN-0003",category:"runtime",title:"Counterfactual preprocessing contracts diverge at captured model outputs",evidence:"MEASURED_SYNTHETIC",priority:"Medium",op:"Model input to declared outputs",observation:`${C(m.candidate_count)} explicit contract input(s) were replayed twice through ${m.runtime?.name||"LiteRT.js"} ${m.runtime?.version||""} ${m.runtime?.backend||"WASM"}. They collapsed to ${C(m.unique_input_tensor_count)} unique input tensor(s) and ${C(m.unique_output_tensor_set_count)} unique output tensor set(s). ${C(m.output_changed_candidate_count)} candidate(s) changed output values; ${C(m.top1_changed_candidate_count)} changed the raw first-output argmax index. Maximum changed output elements ${C(m.maximum_output_changed_element_count)}; maximum absolute raw output delta ${C(m.maximum_output_absolute_difference)}. Portfolio SHA-256 ${m.portfolio_ledger_sha256}.`,interpretation:"This establishes output sensitivity for the analyzer-generated counterfactual tensors in the captured browser runtime. It does not identify the production preprocessing path, attach labels to output indices, estimate representative frequency, or establish an accuracy or user-impact change.",recommendation:"Replay the versioned production decoder/resize/channel/normalization implementation with representative regression inputs, bind its source and binary hashes, and compare declared output tensors and application decisions against the approved reference pipeline.",relevance:"input integration verification; browser-local numerical replay"}));let A=(e?.outputs||[])[0];A&&!e?.metadata_presence?.output_semantics_documented&&s.push(Z({id:"EA-OUT-0001",category:"integration",title:"Output interpretation contract is not embedded",evidence:"OBSERVED",priority:"Medium",op:"Output 0",observation:oH(e,A),interpretation:"The graph can expose mathematical tensor structure, but application semantics such as class ordering, label mapping, and consumer-side postprocessing are not established by shape and dtype alone.",recommendation:"Attach and hash the output label mapping and application-side interpretation specification.",relevance:"integration contract; result interpretation"}));let y=e?.conversion_receipt;s.push(Z(y?{id:"EA-LIN-0001",category:"lineage",title:"Conversion receipt is output-bound; remaining release lineage is not established",evidence:"DECLARED_UNVERIFIED",priority:"Medium",op:"Release manifest",observation:`Receipt ${y.receipt_sha256} declares ${C(y.receipt?.source_artifacts?.length||0)} source artifact(s), converter ${y.receipt?.converter?.name||"not declared"} ${y.receipt?.converter?.version||""}, and environment manifest ${y.receipt?.converter?.environment?.manifest_sha256||"not declared"}. The output SHA-256 and format exactly match the active deployment artifact. Converter execution, calibration dataset use, build pipeline identity, software release ID, model requirement ID, and previous released artifact remain outside the observed artifact binding unless separately supplied.`,interpretation:"The output identity is observed. Source, converter, invocation, and environment statements are hash-bound declarations and were not re-executed or independently observed by this audit.",recommendation:"Verify the receipt against the controlled build pipeline and bind any applicable calibration dataset, software release, requirement, approval, and prior-artifact identities in the release record.",relevance:"release traceability; configuration management",evidenceJsonPointers:["/evidence/static_analysis/conversion_receipt"]}:{id:"EA-LIN-0001",category:"lineage",title:"Source checkpoint and conversion lineage were not provided",evidence:"NOT_ASSESSABLE",priority:"High",op:"Release manifest",observation:"The artifact/report context does not provide source checkpoint SHA-256, export framework/version, converter version, export configuration, quantization/calibration configuration, representative dataset ID, build pipeline ID, software release ID, model requirement ID, or previous released artifact SHA-256.",interpretation:"The deployment artifact can be structurally analyzed, but it does not by itself establish traceability from training checkpoint to released runtime artifact.",recommendation:"Bind checkpoint-to-artifact lineage in the release manifest and include immutable hashes/IDs for source checkpoint, converter/framework, export options, calibration inputs where applicable, pipeline, software release, requirement, and previous artifact.",relevance:"release traceability; configuration management"}));let x=iH(t),v=r.buildSourceState&&r.buildSourceState!=="clean",I=u?"":e?.target_profile?.profile_sha256||"",w=String(e?.format||"tflite").toLowerCase()==="tflite",N=[r.semanticVersion?"":"DeepBOM semantic version",r.buildCommit?"":"analyzer commit",v?"dirty analyzer source state":"",r.buildContentSha256?"":"analyzer bundle content SHA-256",r.rulepackSha256?"":"rulepack SHA-256",w&&!I?"target-profile SHA-256":""].filter(Boolean);if(N.length&&s.push(Z({id:"EA-PROV-0001",category:"evidence_reproducibility",title:u?"Analyzer/rulepack immutable identity is incomplete or dirty":"Analyzer/rulepack/target-profile immutable identity is incomplete or dirty",evidence:"OBSERVED",priority:"High",op:"Report metadata",observation:`Reproducibility gap(s): ${N.join(", ")}. Analyzer commit ${r.buildCommit||"not embedded"}; source state ${r.buildSourceState||"not embedded"}; bundle content SHA-256 ${r.buildContentSha256||"not embedded"}; rulepack SHA-256 ${r.rulepackSha256||"not embedded"}; target-profile SHA-256 ${w?I||"not embedded":"not applicable to this artifact-only format assessment"}.`,interpretation:`Date/version strings help humans, but a dirty analyzer commit does not identify the executed source; immutable analyzer, bundle-content, and rulepack identifiers${u?"":" plus the selected target-profile identifier"} are needed to reproduce exported evidence exactly.`,recommendation:`Build release reports from a clean analyzer tree; for dirty development builds, embed the bundle content SHA-256 and still report the dirty source state explicitly. Embed analyzer and rulepack identifiers${u?"":" plus the selected target-profile identifier"} in every exported report and signed bundle.`,relevance:"evidence reproducibility; audit traceability",evidenceJsonPointers:w?fh["EA-PROV-0001"]:["/analyzer_metadata"]})),u){let $=e?.onnx_domain_analysis||{},ee=e?.onnx_external_data||{},ne=e?.onnx_shape_inference||{},ge=e?.onnx_type_proto_contract||{},le=e?.onnx_sparse_tensor_contract||{},ue=ne.declaration_conflicts||[],xt=ne.semantic_contract_conflicts||[],he=(Xt(e)||[]).filter(z=>(z.conditional_shape_contract?.variant_failures||[]).some(R=>R?.status==="invalid")),He=(ne.schema_form_rows||[]).filter(z=>z.status==="fail"),st=(ne.opset_import_contract?.rows||[]).filter(z=>z.status==="fail"),Re=ne.shape_scope||{},de=ne.extended_scope_inference||{},Xi=(de.function_call_rows||[]).filter(z=>z.status==="fail"),Ha=(de.control_flow_rows||[]).filter(z=>z.status==="fail"),po=(de.sequence_map_rows||[]).filter(z=>z.status==="fail"),zo=(de.control_flow_rows||[]).filter(z=>z.status==="partial"),Vr=(de.sequence_map_rows||[]).filter(z=>z.status==="partial"),Hr=(de.scope_rows||[]).filter(z=>z.status==="partial"),Wi=ge.invalid_rows||[],pn=le.invalid_rows||[],Kr=ne.container_value_inference?.failed_rows||[],ce=ne.ml_value_inference||{},iu=ce.failed_rows||[],Ep=ce.partial_rows||[],ou=(ce.rows||[]).filter(z=>Number(z.duplicate_key_count||0)>0),pc=(ce.rows||[]).filter(z=>z.op_name==="DictVectorizer"&&Number(z.duplicate_vocabulary_count||0)>0),au=(ce.rows||[]).filter(z=>Number(z.active_duplicate_key_count||0)>0),ru=(ce.rows||[]).filter(z=>Number(z.exact_truncated_feature_count_per_batch||0)>0),su=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>R==="binarizer_non_finite_threshold"||R==="binarizer_static_input_contains_non_finite_or_unsafe_value")),cu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("binarizer_dtype_unsupported_by_pinned_ort_cpu")),lu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("normalizer_signed_integer_abs_or_square_overflow")),uu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("normalizer_negative_signed_max_divisor")),_u=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("normalizer_integer_to_float32_precision_loss")),du=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>R==="normalizer_non_finite_float32_projection"||R==="normalizer_static_input_contains_non_finite_or_unsafe_value")),pu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("scaler_pinned_ort_attribute_or_shape_contract_invalid")),mu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("scaler_integer_to_float32_precision_loss")),fu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("scaler_non_finite_parameter_input_or_output")),hu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_pinned_ort_attribute_or_shape_contract_invalid")),gu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_attribute_length_outside_onnx_one_or_feature_count")),bu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_schema_dtype_missing_pinned_ort_cpu_kernel")),yu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("imputer_non_finite_imputed_or_output")),Au=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_pinned_ort_attribute_contract_invalid")),vu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_duplicate_categories_last_write_wins")),wu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_unknown_categories_all_zero_encoding")),xu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_unknown_category_guaranteed_runtime_failure")),Eu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_schema_dtype_missing_pinned_ort_cpu_kernel")),Nu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_noncanonical_zeros_boolean")),Iu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("onehot_numeric_to_int64_cast_not_representable")),Cu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_schema_dtype_pair_missing_pinned_ort_cpu_kernel")),ku=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>["label_encoder_v4_schema_last_vs_ort_first_duplicate_conflict","label_encoder_v1_duplicate_class_runtime_last_index"].includes(R))),Su=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_v2_schema_bitwise_nan_vs_ort_unmatched")),Tu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_artifact_known_default_path_reached")),zu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_non_finite_mapping_state")),Ou=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("label_encoder_pinned_ort_runtime_contract_invalid")),Ru=(ce.rows||[]).filter(z=>["LinearClassifier","LinearRegressor"].includes(z.op_name)&&(z.risk_codes||[]).some(R=>R.endsWith("pinned_ort_runtime_contract_invalid"))),Bu=(ce.rows||[]).filter(z=>Number(z.linear_unused_coefficient_count||0)>0||Number(z.linear_ignored_intercept_count||0)>0),Du=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("linear_regressor_schema_dtype_missing_pinned_ort_cpu_kernel")),Mu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>["linear_classifier_single_score_post_transform_noop","linear_classifier_binary_probit_second_score_unwritten","linear_classifier_binary_post_transform_ignored_for_complement_expansion","linear_regressor_single_target_post_transform_noop","linear_regressor_probit_may_emit_non_finite"].includes(R))),$u=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("linear_classifier_multi_class_nonzero_ignored_by_pinned_ort")),Lu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).includes("linear_classifier_duplicate_labels_ambiguous_output_semantics")),Pu=(ce.rows||[]).filter(z=>(z.risk_codes||[]).some(R=>["linear_classifier_non_finite_parameter_or_reference_score","linear_classifier_reference_decision_boundary","linear_regressor_non_finite_parameter_or_reference_score"].includes(R))),Zr=(ce.rows||[]).filter(z=>["SVMClassifier","SVMRegressor"].includes(z.op_name)),qu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_pinned_ort_runtime_contract_invalid","svm_regressor_pinned_ort_runtime_contract_invalid"].includes(R))),ju=Zr.filter(z=>(z.risk_codes||[]).includes("svm_classifier_onnx_vs_pinned_ort_score_width_mismatch")),Fu=Zr.filter(z=>(z.risk_codes||[]).includes("svm_regressor_schema_dtype_missing_pinned_ort_cpu_kernel")),Qu=Zr.filter(z=>(z.risk_codes||[]).includes("svm_regressor_post_transform_ignored_by_pinned_ort")),Uu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_serialized_parameters_ignored_by_pinned_ort","svm_regressor_serialized_parameters_ignored_by_pinned_ort","svm_classifier_linear_mode_forces_linear_kernel","svm_regressor_linear_mode_forces_linear_kernel"].includes(R))),Gu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_non_finite_parameter_or_reference_score","svm_classifier_reference_decision_boundary","svm_regressor_non_finite_parameter_or_reference_score","svm_regressor_reference_decision_boundary"].includes(R))),Vu=Zr.filter(z=>(z.risk_codes||[]).some(R=>["svm_classifier_duplicate_labels_ambiguous_output_semantics","svm_classifier_probability_scores_receive_additional_post_transform","svm_classifier_binary_probit_second_score_unwritten","svm_classifier_binary_post_transform_uses_complement_expansion","svm_regressor_noncanonical_one_class_flag"].includes(R))),Xr=(ce.rows||[]).filter(z=>["TreeEnsemble","TreeEnsembleClassifier","TreeEnsembleRegressor"].includes(z.op_name)),Hu=Xr.filter(z=>z.tree_pinned_ort_contract_status==="fail"&&z.tree_pinned_cpu_dtype_gap!==!0),Ku=Xr.filter(z=>z.tree_pinned_cpu_dtype_gap===!0),Zu=Xr.filter(z=>z.tree_deprecated_operator===!0),Xu=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_ensemble_nonleaf_weights_ignored_by_pinned_ort","tree_ensemble_single_target_additional_leaf_weights_ignored_by_pinned_ort","tree_ensemble_shared_subtree_not_strict_tree","tree_ensemble_v5_shared_subtree_not_strict_tree","tree_ensemble_v5_unreachable_serialized_nodes_or_leaves"].includes(R))),Wu=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_ensemble_v5_duplicate_membership_values","tree_ensemble_v5_zero_member_differs_from_pinned_onnx_reference_parser"].includes(R))),Yu=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_classifier_duplicate_labels_ambiguous_output_semantics","tree_classifier_binary_post_transform_leaves_score_unwritten","tree_regressor_single_target_post_transform_noop","tree_ensemble_v5_single_target_post_transform_noop","tree_classifier_binary_single_base_value_semantics_underspecified","tree_classifier_pinned_ort_binary_label_index_semantics"].includes(R))),Ju=Xr.filter(z=>(z.risk_codes||[]).some(R=>["tree_ensemble_non_finite_parameter_or_reference_score","tree_ensemble_reference_decision_boundary"].includes(R))),jg=ne.tfidf_vectorizer_inference||{},Fg=jg.rows||[],e_=jg.failed_rows||[],t_=Fg.filter(z=>(z.risk_codes||[]).includes("tfidf_weight_coordinate_semantics_divergence")),n_=Fg.filter(z=>Number(z.exact_ort_reference_divergent_output_count||0)>0),i_=Fg.filter(z=>(z.risk_codes||[]).some(R=>["tfidf_ngram_counts_ignore_pool_prefix","tfidf_duplicate_ngram_outside_active_length_range","tfidf_multiple_ngrams_share_output_coordinate"].includes(R))),Qg=(jg.partial_rows||[]).filter(z=>["not_assessed_output_element_limit","not_assessed_work_limit"].includes(z.static_execution_status));if(Wi.length){let z=Wi.slice(0,8).map(R=>`${R.scope} ${R.role} ${R.value_name}: ${(R.reason_codes||[]).join("/")||"invalid TypeProto"}`);s.push(Z({id:"EA-ONX-0010",category:"integrity",title:"ONNX TypeProto declaration violates the pinned IR contract",evidence:"SOURCE_PINNED_AND_OBSERVED",priority:"High",op:`${C(Wi.length)} invalid type declaration(s)`,observation:`${z.join("; ")}${Wi.length>z.length?`; plus ${C(Wi.length-z.length)} more in structured evidence`:""}.`,interpretation:"A required ValueInfo name/type/shape, recursive TypeProto oneof, tensor element type, dimension oneof, sequence/optional child, or map key/value contract is malformed under the pinned ONNX IR. Dense tensor shape, MAC, payload, liveness, browser input, and provider conclusions are suppressed where the declared value kind is not a valid dense tensor contract.",recommendation:"Reject the artifact for release, run the same pinned ONNX checker, repair the exporter or serialized TypeProto, and require zero TypeProto contract failures before runtime qualification.",relevance:"artifact integrity; value type system; downstream metric validity"}))}if(pn.length){let z=pn.slice(0,8).map(R=>`${R.scope} ${R.sparse_tensor_name||"unnamed"}: ${(R.reason_codes||[]).join("/")||"invalid SparseTensorProto"}`);s.push(Z({id:"EA-ONX-0011",category:"integrity",title:"ONNX SparseTensorProto storage violates the pinned IR contract",evidence:"SOURCE_PINNED_AND_OBSERVED",priority:"High",op:`${C(pn.length)} invalid sparse tensor record(s)`,observation:`${z.join("; ")}${pn.length>z.length?`; plus ${C(pn.length-z.length)} more in structured evidence`:""}.`,interpretation:"The values/indices/dense-shape/NNZ tuple or exact decoded index order, uniqueness, or bounds violates the pinned SparseTensorProto contract. Logical dense size and operator arithmetic must not be trusted until the sparse storage is repaired.",recommendation:"Reject the artifact for release, regenerate values and INT64 indices in strictly ascending unique order within the declared dense shape, verify every external component, and require a zero-failure sparse contract report.",relevance:"artifact integrity; sparse initializer storage; downstream metric validity"}))}if(Kr.length){let z=Kr.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${(R.reason_codes||[]).join("/")||"container value contract failure"}`);s.push(Z({id:"EA-ONX-0012",category:"integrity",title:"ONNX Sequence or Optional value contract is deterministically invalid",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Kr.length)} invalid container-value node(s)`,observation:`${z.join("; ")}${Kr.length>z.length?`; plus ${C(Kr.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned ONNX Sequence/Optional type inference proves an element-type mismatch, scalar/index/range defect, split inconsistency, concat incompatibility, or access to a provably empty optional. The affected graph path is invalid independently of execution-provider choice.",recommendation:"Reject the artifact for release, repair the exporter or graph constants, run the pinned ONNX checker/reference inferencer, and require zero container-value contract failures before runtime qualification.",relevance:"artifact integrity; ONNX value type system; runtime validity"}))}if(iu.length){let z=iu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name||"ONNX-ML"}: ${(R.reason_codes||[]).join("/")||"value-contract failure"}`);s.push(Z({id:"EA-ONX-0013",category:"integrity",title:"ONNX-ML value contract is deterministically invalid",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(iu.length)} invalid supported ONNX-ML value-contract node(s)`,observation:`${z.join("; ")}${iu.length>z.length?`; plus ${C(iu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned ai.onnx.ml-1 semantics prove an input type/rank defect, invalid Binarizer threshold, invalid Normalizer dtype/rank/mode, invalid CastMap mode or bound, missing/conflicting vocabulary, key/vocabulary mismatch, disallowed map value type, CategoryMapper category-array defect, FeatureVectorizer variadic-width/batch defect, ArrayFeatureExtractor empty or out-of-bounds index contract, or ZipMap feature-to-key mismatch. The affected output contract is invalid independently of execution-provider choice.",recommendation:"Reject the artifact for release, repair the exporter attributes and input TypeProto, run the pinned ONNX checker/reference inferencer, and require zero ONNX-ML value-contract failures before runtime qualification.",relevance:"artifact integrity; tensor/map value typing; classifier and feature-vector contracts; ONNX-ML runtime validity"}))}if(ou.length){let z=ou.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.duplicate_key_count||0)} duplicate occurrence(s) among ${C(R.class_key_count||0)} key(s)`);s.push(Z({id:"EA-ONX-0014",category:"integration_verification",title:"ONNX-ML ZipMap class labels contain duplicate map keys",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(ou.length)} affected ZipMap node(s); ${C(ce.duplicate_class_key_count||0)} duplicate occurrence(s)`,observation:`${z.join("; ")}${ou.length>z.length?`; plus ${C(ou.length-z.length)} more in structured evidence`:""}.`,interpretation:"A map cannot preserve separate score columns under the same key. The artifact's class-label list therefore cannot provide a one-to-one externally consumable mapping for every score column, even though duplicate labels are not promoted here to an invented OpSchema rejection.",recommendation:"Regenerate the artifact with unique class labels, verify class-key cardinality against the final score dimension, and test the consumer's decoded label-to-score contract before release.",relevance:"classifier correctness; output information loss; application integration"}))}if(pc.length){let z=pc.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.duplicate_vocabulary_count||0)} duplicate occurrence(s) among ${C(R.vocabulary_count||0)} vocabulary entries`);s.push(Z({id:"EA-ONX-0015",category:"integration_verification",title:"ONNX-ML DictVectorizer vocabulary repeats output columns",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(pc.length)} affected DictVectorizer node(s); ${C(pc.reduce((R,Ke)=>R+Number(Ke.duplicate_vocabulary_count||0),0))} duplicate occurrence(s)`,observation:`${z.join("; ")}${pc.length>z.length?`; plus ${C(pc.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU implementation intentionally accepts duplicate vocabulary entries and emits one output column per entry. Repeated entries therefore copy the same map value into multiple columns; this is valid runtime behavior, but it changes feature dimensionality and can silently duplicate a downstream feature.",recommendation:"Confirm that repeated feature columns are intentional, bind vocabulary order and cardinality to the downstream model contract, and regenerate with unique vocabulary entries when duplicated features are not required.",relevance:"feature-vector correctness; output column identity; application integration"}))}if(au.length){let z=au.slice(0,8).map(R=>`#${te(R.node_index)} ${R.mapping_direction||"UNRESOLVED"}: ${C(R.active_duplicate_key_count||0)} active duplicate occurrence(s) among ${C(R.category_pair_count||0)} pair(s)`);s.push(Z({id:"EA-ONX-0016",category:"integration_verification",title:"ONNX-ML CategoryMapper active keys overwrite earlier mappings",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(au.length)} affected CategoryMapper node(s); ${C(ce.duplicate_category_active_key_count||0)} active duplicate occurrence(s)`,observation:`${z.join("; ")}${au.length>z.length?`; plus ${C(au.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU constructor inserts category pairs in source order into an unordered map, so a repeated active-direction key replaces its earlier value. The artifact remains executable, but at least one declared category pair is unreachable and the externally visible mapping is not one-to-one with the attribute arrays.",recommendation:"Regenerate the artifact with unique keys for the active input direction, verify the retained last value against the application label contract, and require zero active duplicate categories before release.",relevance:"categorical mapping correctness; label identity; application integration"}))}if(ru.length){let z=ru.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.exact_truncated_feature_count_per_batch||0)} feature value(s) discarded per batch row across ${C(R.truncated_input_count||0)} input(s)`);s.push(Z({id:"EA-ONX-0017",category:"integration_verification",title:"ONNX-ML FeatureVectorizer deterministically truncates input features",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(ru.length)} affected FeatureVectorizer node(s); ${C(ce.exact_feature_vectorizer_truncated_feature_count_per_batch||0)} discarded feature value(s) per batch row`,observation:`${z.join("; ")}${ru.length>z.length?`; plus ${C(ru.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU implementation copies only min(actual row width, inputdimensions[i]) values from each input. The remaining source values are not represented in the output. This is executable behavior rather than an OpSchema failure, but it is deterministic information loss when the configured width is smaller than the artifact-known input row width.",recommendation:"Confirm that every discarded feature is intentional, bind inputdimensions and source tensor shapes to the downstream feature contract, and regenerate the graph with matching widths when truncation is not required.",relevance:"feature-vector correctness; deterministic information loss; downstream input identity"}))}if(su.length){let z=su.slice(0,8).map(R=>`#${te(R.node_index)} threshold ${R.threshold_value_text||"unresolved"}: ${(R.risk_codes||[]).join("/")}`);s.push(Z({id:"EA-ONX-0018",category:"integration_verification",title:"ONNX-ML Binarizer contains a non-finite numerical contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(su.length)} affected Binarizer node(s)`,observation:`${z.join("; ")}${su.length>z.length?`; plus ${C(su.length-z.length)} more in structured evidence`:""}.`,interpretation:"A NaN or infinite threshold produces a degenerate comparison contract, while the pinned ORT CPU Binarizer rejects a non-finite FLOAT32 input at execution. The ONNX artifact may remain schema-valid, but its output can collapse to a constant code or fail on the pinned CPU path.",recommendation:"Regenerate the model with a finite threshold and finite initializer values, verify the exact zero/one counts in the Engineering Report, and execute a bound ORT profile before release.",relevance:"numerical integrity; deterministic output collapse; runtime compatibility"}))}if(cu.length){let z=cu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0019",category:"runtime_compatibility",title:"ONNX-ML Binarizer dtype has no pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(cu.length)} affected Binarizer node(s)`,observation:`${z.join("; ")}${cu.length>z.length?`; plus ${C(cu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The artifact is valid under the pinned ONNX Binarizer-1 schema, but the pinned ORT CPU provider registers this operator only for FLOAT32. A FLOAT64, INT32, or INT64 Binarizer therefore has a deterministic schema/runtime support gap on that execution path.",recommendation:"Convert the Binarizer input/output contract to FLOAT32 or bind and capture an execution provider that demonstrably supports the artifact dtype; require successful provider assignment and execution before release.",relevance:"runtime compatibility; execution-provider assignment; deployment validity"}))}if(lu.length){let z=lu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"} ${R.normalizer_mode||"UNKNOWN"}: ${C(R.normalizer_signed_overflow_value_count||0)} value(s)`);s.push(Z({id:"EA-ONX-0020",category:"integrity",title:"ONNX-ML Normalizer reaches signed integer overflow in the pinned CPU arithmetic",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(lu.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_signed_overflow_value_count||0)} overflowing value(s)`,observation:`${z.join("; ")}${lu.length>z.length?`; plus ${C(lu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU implementation applies signed abs for L1 or signed x*x for L2 before casting to FLOAT32. INT32/INT64 minimum abs and magnitudes above the exact square limit therefore enter C++ signed-overflow territory; DEEPBOM suppresses a fabricated output instead of assigning deterministic numerical semantics to undefined arithmetic.",recommendation:"Reject this CPU execution contract, insert a safe FLOAT32 cast before Normalizer or regenerate bounded integer inputs, and verify the corrected graph against a pinned ORT session before release.",relevance:"numerical integrity; undefined signed arithmetic; runtime validity"}))}if(uu.length){let z=uu.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.normalizer_negative_max_divisor_row_count||0)} all-negative row(s); divisors ${(R.normalizer_divisor_preview||[]).join("/")||"not previewed"}`);s.push(Z({id:"EA-ONX-0021",category:"integration_verification",title:"ONNX-ML Normalizer MAX uses a negative signed maximum",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(uu.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_negative_max_divisor_row_count||0)} row(s)`,observation:`${z.join("; ")}${uu.length>z.length?`; plus ${C(uu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned operator divides by max(x), not max(abs(x)). An all-negative row therefore uses a negative divisor, flips output signs, and sets the least-negative input to +1. This is source-defined behavior but is frequently mistaken for max-absolute normalization.",recommendation:"Confirm signed-MAX semantics against the training/export pipeline; use L1/L2 or an explicit absolute-value reduction when max-absolute normalization was intended, then bind a reference output test to the artifact.",relevance:"feature preprocessing semantics; sign behavior; application contract"}))}if(_u.length){let z=_u.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}: ${C(R.normalizer_integer_float32_rounding_count||0)} changed value(s)`);s.push(Z({id:"EA-ONX-0022",category:"integration_verification",title:"ONNX-ML Normalizer integer inputs lose precision at the required FLOAT32 projection",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(_u.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_integer_float32_rounding_count||0)} changed integer value(s)`,observation:`${z.join("; ")}${_u.length>z.length?`; plus ${C(_u.length-z.length)} more in structured evidence`:""}.`,interpretation:"Normalizer-1 always emits FLOAT32. Artifact-known INT32/INT64 values outside exact FLOAT32 integer spacing are rounded before or during the pinned row arithmetic, so distinct integer inputs can become numerically indistinguishable without violating the ONNX schema.",recommendation:"Quantify whether the changed integers are semantically distinct features, rescale or cast upstream under an explicit contract, and compare pinned ORT outputs against the exporter reference before release.",relevance:"numerical precision; feature identity; reference-output verification"}))}if(du.length){let z=du.slice(0,8).map(R=>`#${te(R.node_index)} ${R.normalizer_mode||"UNKNOWN"}: ${R.normalizer_non_finite_output_count==null?"input not safely decodable":`${C(R.normalizer_non_finite_output_count)} non-finite output(s)`}`);s.push(Z({id:"EA-ONX-0023",category:"integrity",title:"ONNX-ML Normalizer has a statically non-finite numerical path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(du.length)} affected Normalizer node(s); ${C(ce.exact_normalizer_non_finite_output_count||0)} proven non-finite output(s)`,observation:`${z.join("; ")}${du.length>z.length?`; plus ${C(du.length-z.length)} more in structured evidence`:""}.`,interpretation:"Finite source values can still overflow the pinned FLOAT32 square/sum path and produce Infinity/Infinity or another non-finite projection; explicitly non-finite source constants are also unsafe. Such outputs cannot be promoted as valid static tensors or stable downstream features.",recommendation:"Reject the affected numerical path, rescale or sanitize the input before normalization, and require finite outputs from the pinned ORT native fixture and representative runtime inputs.",relevance:"numerical integrity; non-finite propagation; downstream runtime validity"}))}if(pu.length){let z=pu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.scaler_parameter_contract_reason||"invalid pinned-runtime contract"}`);s.push(Z({id:"EA-ONX-0024",category:"runtime_compatibility",title:"ONNX-ML Scaler is valid by schema but invalid for the pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(pu.length)} affected Scaler node(s)`,observation:`${z.join("; ")}${pu.length>z.length?`; plus ${C(pu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Scaler-1 marks scale and offset optional in the ONNX schema, but the pinned ORT CPU implementation requires both arrays to be present, nonempty, equal in length, and either scalar or equal to dimension 0 for rank 1 and dimension 1 otherwise; rank-0 input is rejected. This is a deterministic schema/runtime compatibility gap, not an execution-provider prediction.",recommendation:"Emit explicit scale and offset arrays satisfying the pinned feature-stride contract, reject rank-0 input, and require successful construction plus reference-output execution in the pinned ORT session before release.",relevance:"runtime compatibility; attribute contract; deployment validity"}))}if(mu.length){let z=mu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}: ${C(R.scaler_integer_float32_rounding_count||0)} changed value(s)`);s.push(Z({id:"EA-ONX-0025",category:"integration_verification",title:"ONNX-ML Scaler integer inputs lose precision at FLOAT32 projection",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(mu.length)} affected Scaler node(s); ${C(ce.exact_scaler_integer_float32_rounding_count||0)} changed integer value(s)`,observation:`${z.join("; ")}${mu.length>z.length?`; plus ${C(mu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned Scaler CPU kernel emits FLOAT32. Artifact-known INT32 or INT64 inputs outside exact FLOAT32 integer spacing are rounded before the source-ordered offset-then-scale arithmetic, so distinct feature values may become identical without violating the ONNX schema.",recommendation:"Verify that changed integers are not semantically distinct, rescale or cast upstream under an explicit contract, and compare the exact pinned ORT outputs with the exporter reference.",relevance:"numerical precision; feature identity; reference-output verification"}))}if(fu.length){let z=fu.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.scaler_non_finite_parameter_count||0)} non-finite parameter(s), ${R.scaler_non_finite_output_count==null?"output unassessed":`${C(R.scaler_non_finite_output_count)} non-finite output(s)`}`);s.push(Z({id:"EA-ONX-0026",category:"integrity",title:"ONNX-ML Scaler has a statically non-finite affine path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(fu.length)} affected Scaler node(s); ${C(ce.exact_scaler_non_finite_parameter_count||0)} non-finite parameter(s); ${C(ce.exact_scaler_non_finite_output_count||0)} proven non-finite output(s)`,observation:`${z.join("; ")}${fu.length>z.length?`; plus ${C(fu.length-z.length)} more in structured evidence`:""}.`,interpretation:"A NaN or infinite scale/offset, an unsafe source constant, or finite affine arithmetic that overflows FLOAT32 can create a non-finite output. DEEPBOM preserves the exact canonical parameter text but does not propagate a non-finite result as a valid downstream static tensor.",recommendation:"Reject the affected numerical path, regenerate finite parameters or bounded inputs, and require finite reference outputs from the pinned ORT native fixture and representative runtime data.",relevance:"numerical integrity; non-finite propagation; downstream runtime validity"}))}if(hu.length){let z=hu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.imputer_parameter_contract_reason||"invalid pinned-runtime contract"}`);s.push(Z({id:"EA-ONX-0027",category:"runtime_compatibility",title:"ONNX-ML Imputer contract is invalid for the pinned ORT CPU implementation",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(hu.length)} affected Imputer node(s)`,observation:`${z.join("; ")}${hu.length>z.length?`; plus ${C(hu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT Imputer constructor and compute path require exactly one nonempty imputed-value list whose numeric family matches the input, and reject rank-0 tensors. A malformed or mismatched contract cannot be treated as a merely unknown runtime value path.",recommendation:"Emit one nonempty imputed-value list matching the input dtype family, use rank-1 or higher tensor input, and require successful construction plus exact reference-output execution with the pinned ORT package.",relevance:"runtime compatibility; missing-value contract; deployment validity"}))}if(gu.length){let z=gu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.imputer_imputed_value_count||0)} values for feature stride ${R.imputer_feature_stride==null?"unresolved":C(R.imputer_feature_stride)}; ${C(R.imputer_ignored_imputed_value_count||0)} ignored`);s.push(Z({id:"EA-ONX-0028",category:"integration_verification",title:"ONNX-ML Imputer silently ignores trailing imputed values in the pinned ORT kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(gu.length)} affected Imputer node(s); ${C(ce.exact_imputer_ignored_imputed_value_count||0)} ignored trailing value(s)`,observation:`${z.join("; ")}${gu.length>z.length?`; plus ${C(gu.length-z.length)} more in structured evidence`:""}.`,interpretation:"ONNX prose permits an imputed-value length of one or the feature count F. The pinned ORT CPU implementation accepts other nonempty lengths but uses only element zero, so the artifact can run while silently discarding configured values. This is source-observed runtime behavior, not a provider prediction.",recommendation:"Regenerate the artifact with exactly one imputed value or exactly F values, reject scalar-first fallback in release policy, and compare the pinned ORT output against exporter expectations.",relevance:"feature semantics; silent configuration loss; runtime portability"}))}if(bu.length){let z=bu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0029",category:"runtime_compatibility",title:"ONNX-ML Imputer dtype is schema-valid but lacks a pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(bu.length)} affected Imputer node(s)`,observation:`${z.join("; ")}${bu.length>z.length?`; plus ${C(bu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Imputer-1 permits FLOAT64 and INT32 in the ONNX schema, but the pinned ORT CPU registration provides FLOAT32 and INT64 kernels only. A schema-valid artifact can therefore fail session initialization on the pinned CPU execution path.",recommendation:"Convert the Imputer path to FLOAT32 or INT64 under an explicit numerical contract, or bind runtime evidence from a selected provider that implements the declared dtype before release.",relevance:"schema/runtime gap; execution-provider compatibility; session initialization"}))}if(yu.length){let z=yu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.imputer_non_finite_imputed_value_count||0)} non-finite imputed value(s), ${R.imputer_non_finite_output_count==null?"output unassessed":`${C(R.imputer_non_finite_output_count)} non-finite output(s)`}`);s.push(Z({id:"EA-ONX-0030",category:"integrity",title:"ONNX-ML Imputer has a statically non-finite output path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(yu.length)} affected Imputer node(s); ${C(ce.exact_imputer_non_finite_imputed_value_count||0)} non-finite imputed value(s); ${C(ce.exact_imputer_non_finite_output_count||0)} proven non-finite output(s)`,observation:`${z.join("; ")}${yu.length>z.length?`; plus ${C(yu.length-z.length)} more in structured evidence`:""}.`,interpretation:"A non-finite imputed value or retained non-finite source value can leave NaN or infinity in the exact output. A NaN replacement marker is valid and is not itself flagged when it produces finite replacements; the finding is tied to the resulting imputed/output path.",recommendation:"Use finite imputed values, define whether retained non-finite inputs are permitted, and require finite pinned-runtime outputs before downstream feature consumption.",relevance:"numerical integrity; missing-value sanitization; downstream validity"}))}if(Au.length){let z=Au.slice(0,8).map(R=>`#${te(R.node_index)} ${R.onehot_parameter_contract_reason||"invalid category contract"}`);s.push(Z({id:"EA-ONX-0031",category:"runtime_compatibility",title:"ONNX-ML OneHotEncoder category contract is invalid for the pinned ORT CPU implementation",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Au.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${Au.length>z.length?`; plus ${C(Au.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned constructor requires exactly one nonempty cats_int64s or cats_strings list, and the active list must match the input family. A missing, dual, or mismatched vocabulary is a deterministic construction defect rather than an unknown data-dependent path.",recommendation:"Emit exactly one nonempty vocabulary attribute matching the input dtype family, then require successful construction and exact output parity with the pinned ORT CPU fixture.",relevance:"runtime compatibility; categorical feature contract; session initialization"}))}if(vu.length){let z=vu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.onehot_duplicate_category_count||0)} duplicate(s); unreachable column(s) ${(R.onehot_unreachable_duplicate_column_indices||[]).join(", ")||"none"}`);s.push(Z({id:"EA-ONX-0032",category:"integration_verification",title:"ONNX-ML OneHotEncoder vocabulary contains unreachable duplicate columns",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(vu.length)} affected OneHotEncoder node(s); ${C(ce.exact_onehot_unreachable_duplicate_column_count||0)} unreachable column(s)`,observation:`${z.join("; ")}${vu.length>z.length?`; plus ${C(vu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT lookup overwrites earlier indices when a category repeats. The final duplicate owns the active one-hot column, leaving every earlier duplicate column permanently zero and making vocabulary width larger than the reachable encoding space.",recommendation:"Deduplicate the vocabulary while preserving the intended category order, retrain or remap downstream feature indices as needed, and verify exact encoded vectors before release.",relevance:"categorical feature identity; unreachable dimensions; downstream coefficient alignment"}))}if(wu.length){let z=wu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.onehot_exact_unknown_input_count||0)} unknown value(s) [${(R.onehot_unknown_input_preview||[]).join(", ")||"none"}]`);s.push(Z({id:"EA-ONX-0033",category:"input_contract",title:"ONNX-ML OneHotEncoder maps artifact-known unknown categories to all-zero slices",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(wu.length)} affected OneHotEncoder node(s); ${C(ce.exact_onehot_unknown_input_count||0)} unknown input value(s)`,observation:`${z.join("; ")}${wu.length>z.length?`; plus ${C(wu.length-z.length)} more in structured evidence`:""}.`,interpretation:"With zeros enabled, each unknown category is encoded as an all-zero vector. That representation can collide with missing-feature conventions and carries no explicit unknown bucket unless the surrounding feature contract defines one.",recommendation:"Document and test the unknown-category policy, add an explicit unknown category when downstream semantics require distinction, and compare representative feature vectors against training-time preprocessing.",relevance:"preprocessing parity; unknown-category semantics; feature collision"}))}if(xu.length){let z=xu.slice(0,8).map(R=>`#${te(R.node_index)} zeros=0 with ${C(R.onehot_exact_unknown_input_count||0)} artifact-known unknown value(s)`);s.push(Z({id:"EA-ONX-0034",category:"runtime_compatibility",title:"ONNX-ML OneHotEncoder has an artifact-proven unknown-category runtime failure",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(xu.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${xu.length>z.length?`; plus ${C(xu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned ORT CPU kernel returns failure when zeros is zero and a category is absent from the vocabulary. Exact artifact-known input values prove that this branch is reached, so output propagation is suppressed.",recommendation:"Repair the vocabulary or enable a reviewed unknown policy, then require successful pinned-runtime execution for the exact fixture and production-representative categorical inputs.",relevance:"deterministic runtime failure; preprocessing contract; release blocking"}))}if(Eu.length){let z=Eu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0035",category:"runtime_compatibility",title:"ONNX-ML OneHotEncoder dtype is schema-valid but lacks a pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Eu.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${Eu.length>z.length?`; plus ${C(Eu.length-z.length)} more in structured evidence`:""}.`,interpretation:"OneHotEncoder-1 permits INT32 in the ONNX schema, while the pinned ORT CPU registration provides INT64, FLOAT32, FLOAT64, and STRING kernels. A schema-valid INT32 node can fail provider kernel resolution.",recommendation:"Convert the categorical tensor to INT64 or bind measured assignment evidence from a selected provider that implements INT32 before release.",relevance:"schema/runtime gap; execution-provider compatibility; session initialization"}))}if(Nu.length){let z=Nu.slice(0,8).map(R=>`#${te(R.node_index)} zeros=${R.onehot_zeros_value}`);s.push(Z({id:"EA-ONX-0036",category:"integration_verification",title:"ONNX-ML OneHotEncoder uses a noncanonical boolean value for zeros",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Nu.length)} affected OneHotEncoder node(s)`,observation:`${z.join("; ")}${Nu.length>z.length?`; plus ${C(Nu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The schema describes zeros as a boolean encoded by INT64. The pinned kernel treats every nonzero integer as enabled, but a value outside 0 or 1 depends on permissive boolean coercion and can reduce portability across validators or runtimes.",recommendation:"Canonicalize zeros to 0 or 1 and preserve the intended unknown-category behavior in preprocessing and runtime tests.",relevance:"attribute portability; boolean contract; runtime consistency"}))}if(Iu.length){let z=Iu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.onehot_numeric_to_int64_invalid_count||0)} unrepresentable value(s) [${(R.onehot_unknown_input_preview||[]).join(", ")||"none"}]`);s.push(Z({id:"EA-ONX-0037",category:"integrity",title:"ONNX-ML OneHotEncoder input cannot be represented by the pinned numeric-to-INT64 lookup cast",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Iu.length)} affected OneHotEncoder node(s); ${C(ce.exact_onehot_numeric_to_int64_invalid_count||0)} unrepresentable value(s)`,observation:`${z.join("; ")}${Iu.length>z.length?`; plus ${C(Iu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned numeric kernel converts FLOAT32/FLOAT64 inputs to INT64 before lookup. NaN, infinity, or a finite value outside the signed INT64 range does not have a portable representable result, so DEEPBOM refuses to emulate implementation-undefined conversion behavior.",recommendation:"Constrain categorical inputs to finite signed-INT64-representable values, regenerate the artifact fixture, and require exact native ORT parity before downstream use.",relevance:"numeric conversion integrity; undefined cast avoidance; categorical identity"}))}if(Ru.length){let z=Ru.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.linear_pinned_ort_contract_reason||"pinned ORT runtime contract failure"}`);s.push(Z({id:"EA-ONX-0038",category:"runtime_compatibility",title:"ONNX-ML linear model violates the pinned ORT CPU runtime contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Ru.length)} affected linear-model node(s)`,observation:`${z.join("; ")}${Ru.length>z.length?`; plus ${C(Ru.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized node can satisfy part of the ONNX schema while still failing the pinned ORT CPU constructor or compute path because required runtime attributes, rank, feature count, coefficient cardinality, labels, targets, or dtype do not satisfy that implementation's executable contract.",recommendation:"Treat the affected node as release blocking, repair the exact reason recorded in structured evidence, and require both zero static contract failures and a successful pinned native ORT fixture before deployment qualification.",relevance:"deterministic runtime failure; ONNX/ORT contract gap; release blocking"}))}if(Bu.length){let z=Bu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${C(R.linear_unused_coefficient_count||0)} coefficient(s) and ${C(R.linear_ignored_intercept_count||0)} intercept(s) ignored`);s.push(Z({id:"EA-ONX-0039",category:"integrity",title:"ONNX-ML linear model carries parameters ignored by the pinned ORT kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Bu.length)} affected node(s); ${C(ce.exact_linear_unused_coefficient_count||0)} unused coefficient(s); ${C(ce.exact_linear_ignored_intercept_count||0)} ignored intercept(s)`,observation:`${z.join("; ")}${Bu.length>z.length?`; plus ${C(Bu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned kernel consumes only targets/classes multiplied by feature count coefficients, ignores trailing coefficients, and ignores a LinearRegressor intercept vector unless its length exactly equals targets. The artifact therefore contains serialized model state that does not affect the selected runtime result.",recommendation:"Regenerate the node with exact coefficient and intercept cardinalities, compare outputs with the training pipeline, and reject unexplained dead parameters from signed release artifacts.",relevance:"parameter conservation; exporter correctness; hidden dead state"}))}if(Du.length){let z=Du.slice(0,8).map(R=>`#${te(R.node_index)} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0040",category:"runtime_compatibility",title:"ONNX-ML LinearRegressor dtype is schema-valid but lacks a pinned ORT CPU compute path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Du.length)} affected LinearRegressor node(s)`,observation:`${z.join("; ")}${Du.length>z.length?`; plus ${C(Du.length-z.length)} more in structured evidence`:""}.`,interpretation:"LinearRegressor-1 permits FLOAT64, INT32, and INT64 in the pinned ONNX schema, but the pinned ORT CPU compute implementation executes only FLOAT32 and returns an unsupported-input error for the other schema-valid types.",recommendation:"Convert the input contract to FLOAT32 or bind measured assignment and successful execution evidence from another selected provider before release.",relevance:"schema/runtime gap; execution-provider compatibility; deterministic CPU failure"}))}if(Mu.length){let z=Mu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name} ${R.linear_post_transform||"unresolved"}: ${(R.risk_codes||[]).filter(Ke=>Ke.includes("post_transform")||Ke.includes("probit")).join("/")}`);s.push(Z({id:"EA-ONX-0042",category:"numerical_integrity",title:"ONNX-ML linear post-transform has a pinned ORT semantic gap or unsafe branch",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Mu.length)} affected linear-model node(s)`,observation:`${z.join("; ")}${Mu.length>z.length?`; plus ${C(Mu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned source inspection proves one of the following: a single-score transform is a no-op, binary complement expansion bypasses the requested non-PROBIT transform, binary PROBIT does not populate the added second-class score slot, or regressor PROBIT can produce non-finite values outside its mathematical input domain.",recommendation:"Do not infer probabilities from the operator name alone. Replace the hazardous transform or make it explicit outside the node, compare exact score tensors with a pinned native ORT fixture, and document whether consumers expect raw margins or transformed values.",relevance:"score semantics; probability contract; numerical safety"}))}if($u.length){let z=$u.slice(0,8).map(R=>`#${te(R.node_index)} multi_class=${R.linear_multi_class_value||"unresolved"}`);s.push(Z({id:"EA-ONX-0043",category:"integration_verification",title:"ONNX-ML LinearClassifier multi_class intent is ignored by the pinned ORT CPU implementation",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C($u.length)} affected LinearClassifier node(s)`,observation:`${z.join("; ")}${$u.length>z.length?`; plus ${C($u.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned constructor parses and stores multi_class, but the selected CPU compute path does not consult it. A nonzero serialized value therefore communicates model intent without changing execution.",recommendation:"Remove reliance on multi_class for runtime behavior, validate the exact multiclass score and label contract against training-time reference outputs, and pin that parity fixture to the deployment runtime.",relevance:"ignored operator intent; multiclass semantics; runtime parity"}))}if(Lu.length){let z=Lu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.linear_duplicate_label_count||0)} duplicate label value(s)`);s.push(Z({id:"EA-ONX-0044",category:"output_contract",title:"ONNX-ML LinearClassifier contains duplicate class labels",evidence:"OBSERVED/DERIVED",priority:"Medium",op:`${C(Lu.length)} affected LinearClassifier node(s)`,observation:`${z.join("; ")}${Lu.length>z.length?`; plus ${C(Lu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Multiple score columns map to the same externally visible label. Argmax can still select an index, but downstream consumers cannot reconstruct a unique class identity from the emitted label value.",recommendation:"Make every serialized class label unique, regenerate the classifier, and verify label-map order together with score-column order in the application contract.",relevance:"label identity; output decoding; class-map integrity"}))}if(Pu.length){let z=Pu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${C(R.linear_non_finite_parameter_count||0)} non-finite parameter(s), ${C(R.linear_reference_non_finite_raw_score_count||0)} non-finite reference score(s), ${C(R.linear_reference_decision_boundary_count||0)} exact zero-margin decision(s)`);s.push(Z({id:"EA-ONX-0045",category:"numerical_integrity",title:"ONNX-ML linear model has non-finite arithmetic or a reference decision-boundary instability",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(Pu.length)} affected linear-model node(s)`,observation:`${z.join("; ")}${Pu.length>z.length?`; plus ${C(Pu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Non-finite coefficients, intercepts, inputs, or derived scalar reference scores invalidate ordinary ranking semantics. For binary classifiers, an exact zero raw margin also sits on the pinned greater-than-zero decision boundary, where small accumulation-order differences can change the emitted label.",recommendation:"Reject non-finite model state, inspect zero-margin fixtures as numerical boundary cases, and compare pinned native ORT outputs across intended CPU feature profiles before release.",relevance:"numerical integrity; decision stability; microkernel accumulation sensitivity"}))}if(Cu.length){let z=Cu.slice(0,8).map(R=>`#${te(R.node_index)} v${R.resolved_schema_version} ${R.input_dtype}->${R.output_dtype}`);s.push(Z({id:"EA-ONX-0046",category:"runtime_compatibility",title:"ONNX-ML LabelEncoder dtype pair lacks a pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Cu.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${Cu.length>z.length?`; plus ${C(Cu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The versioned ONNX schema accepts the serialized input/output element types, but the pinned ORT CPU registration does not provide that exact typed pair. Static shape remains valid while CPU kernel resolution is not.",recommendation:"Use a dtype pair present in the pinned CPU registration ledger or bind measured assignment and successful execution from the selected deployment provider before release.",relevance:"schema/runtime compatibility; execution-provider resolution; categorical preprocessing"}))}if(ku.length){let z=ku.slice(0,8).map(R=>`#${te(R.node_index)} v${R.resolved_schema_version}: ${C(R.label_encoder_duplicate_key_count||0)} duplicate(s), ${C(R.label_encoder_schema_runtime_mismatch_count||0)} artifact-known mismatch(es)`);s.push(Z({id:"EA-ONX-0047",category:"integrity",title:"ONNX-ML LabelEncoder duplicate keys have versioned or runtime-dependent ownership",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(ku.length)} affected LabelEncoder node(s); ${C(ce.exact_label_encoder_duplicate_key_hit_count||0)} exact duplicate-key hit(s)`,observation:`${z.join("; ")}${ku.length>z.length?`; plus ${C(ku.length-z.length)} more in structured evidence`:""}.`,interpretation:"LabelEncoder-4 specifies that the last repeated key wins, while the pinned ORT CPU implementation inserts with emplace and retains the first value. Version 1 string classes also resolve repeated labels to the final index in the pinned runtime without an equally explicit schema rule. When artifact-known inputs reach the duplicated key, DEEPBOM reports both outputs and suppresses exact downstream value propagation.",recommendation:"Remove duplicate keys, preserve the intended unique mapping order, and compare the repaired node against both the pinned ONNX reference semantics and native ORT before release.",relevance:"deterministic output divergence; label identity; exporter integrity"}))}if(Su.length){let z=Su.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.label_encoder_nan_key_count||0)} NaN key(s)`);s.push(Z({id:"EA-ONX-0048",category:"runtime_compatibility",title:"LabelEncoder-2 NaN lookup contract differs from the pinned ORT CPU equality path",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Su.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${Su.length>z.length?`; plus ${C(Su.length-z.length)} more in structured evidence`:""}.`,interpretation:"The version 2 ONNX documentation promises bitwise float-key comparison so a NaN key can be mapped. The pinned ORT version 2 implementation uses its ordinary float hash/equality map, where NaN lookup does not match; version 4 introduces explicit NaN-aware equality. This is a source-backed cross-version semantic gap.",recommendation:"Do not use NaN as a LabelEncoder-2 key. Upgrade to a reviewed version 4 mapping or replace NaN before lookup, then require native ORT parity for the exact fixture.",relevance:"NaN semantics; version migration; preprocessing parity"}))}if(Tu.length){let z=Tu.slice(0,8).map(R=>`#${te(R.node_index)} ${C(R.label_encoder_exact_default_count||0)} / ${C(R.label_encoder_exact_input_value_count||0)} exact input(s) -> ${R.label_encoder_default_value}`);s.push(Z({id:"EA-ONX-0049",category:"input_contract",title:"ONNX-ML LabelEncoder artifact-known inputs reach the default mapping path",evidence:"OBSERVED/DERIVED",priority:"Medium",op:`${C(Tu.length)} affected LabelEncoder node(s); ${C(ce.exact_label_encoder_default_count||0)} defaulted value(s)`,observation:`${z.join("; ")}${Tu.length>z.length?`; plus ${C(Tu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Exact artifact-known input values are absent from the serialized key set and therefore emit the active default. That behavior may be intentional unknown-category handling, but it is a concrete preprocessing event rather than an untested possibility.",recommendation:"Confirm that the default value is reserved and documented, verify downstream handling, and add representative unknown-category fixtures to the release contract.",relevance:"unknown-category policy; preprocessing contract; downstream interpretation"}))}if(zu.length){let z=zu.slice(0,8).map(R=>`#${te(R.node_index)} key/value non-finite ${C(R.label_encoder_non_finite_key_count||0)} / ${C(R.label_encoder_non_finite_value_count||0)}`);s.push(Z({id:"EA-ONX-0050",category:"numerical_integrity",title:"ONNX-ML LabelEncoder mapping contains non-finite numeric state",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(zu.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${zu.length>z.length?`; plus ${C(zu.length-z.length)} more in structured evidence`:""}.`,interpretation:"NaN or infinity is serialized as a key, mapped value, or default. Equality and downstream numerical behavior are version-sensitive, and a non-finite emitted value can invalidate ordinary feature or label interpretation.",recommendation:"Replace non-finite mapping state with explicit finite sentinel categories, document the conversion, and require exact schema/reference/runtime parity before release.",relevance:"numerical integrity; category identity; downstream safety"}))}if(Ou.length){let z=Ou.slice(0,8).map(R=>`#${te(R.node_index)} v${R.resolved_schema_version}: ${C(R.label_encoder_key_count||0)} key(s) / ${C(R.label_encoder_value_count||0)} value(s)`);s.push(Z({id:"EA-ONX-0051",category:"runtime_compatibility",title:"ONNX-ML LabelEncoder violates the pinned ORT key/value cardinality contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Ou.length)} affected LabelEncoder node(s)`,observation:`${z.join("; ")}${Ou.length>z.length?`; plus ${C(Ou.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized LabelEncoder version does not require equal key/value counts at ONNX schema inference time, but the pinned ORT CPU constructor rejects the mismatch before execution. The ONNX-derived output shape and type remain valid; executable CPU behavior does not.",recommendation:"Emit exactly one value for every key, rerun the pinned ONNX/ORT parity fixture, and reject the artifact until the runtime contract passes.",relevance:"deterministic runtime failure; exporter integrity; categorical preprocessing"}))}if(qu.length){let z=qu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.svm_pinned_ort_contract_reason||"pinned ORT runtime contract failure"}`);s.push(Z({id:"EA-ONX-0052",category:"runtime_compatibility",title:"ONNX-ML SVM violates the pinned ORT CPU executable contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(qu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${qu.length>z.length?`; plus ${C(qu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The artifact cannot execute on the pinned ORT CPU path because its constructor/runtime parameter layout is invalid. This includes the source-proven case where ONNX permits kernel_params to be omitted but the pinned ORT constructor still requires the attribute to exist, as well as invalid vector, feature, coefficient, support-vector, rho, or probability cardinalities.",recommendation:"Repair the exact row-level contract reason, preserve an explicit empty or three-value kernel_params attribute as required by the pinned runtime, and require a successful serialized native ORT fixture before release.",relevance:"deterministic runtime failure; ONNX/ORT contract gap; release blocking"}))}if(ju.length){let z=ju.slice(0,8).map(R=>`#${te(R.node_index)} classes=${C(R.svm_class_label_count||0)}, ONNX width=${C(R.svm_schema_score_width||0)}, pinned ORT width=${C(R.svm_pinned_ort_score_width||0)}`);s.push(Z({id:"EA-ONX-0053",category:"integrity",title:"SVMClassifier ONNX score shape conflicts with pinned ORT output width",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(ju.length)} affected SVMClassifier node(s)`,observation:`${z.join("; ")}${ju.length>z.length?`; plus ${C(ju.length-z.length)} more in structured evidence`:""}.`,interpretation:"For a multiclass SVC without probability parameters, the ONNX schema describes one score per class while the pinned ORT kernel emits pairwise decision scores. At four or more classes, C and C(C-1)/2 differ, so downstream shape propagation would be false and is deliberately suppressed.",recommendation:"Do not release against an inferred [N,C] score contract. Add probability parameters or normalize the score interface outside the node, then bind the repaired serialized model to native ORT output-shape and value parity tests.",relevance:"schema/runtime divergence; output ABI; deterministic shape conflict"}))}if(Fu.length){let z=Fu.slice(0,8).map(R=>`#${te(R.node_index)} SVMRegressor ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0054",category:"runtime_compatibility",title:"SVMRegressor dtype is schema-valid but lacks the pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Fu.length)} affected SVMRegressor node(s)`,observation:`${z.join("; ")}${Fu.length>z.length?`; plus ${C(Fu.length-z.length)} more in structured evidence`:""}.`,interpretation:"SVMRegressor-1 permits FLOAT64, INT32, and INT64 inputs in the pinned ONNX schema, but the pinned ORT CPU registration exposes only FLOAT32. Static output type and shape do not establish an executable CPU path.",recommendation:"Convert the input contract to FLOAT32 or attach observed successful assignment and execution evidence from the intended provider before deployment qualification.",relevance:"schema/runtime gap; execution-provider compatibility; deterministic CPU failure"}))}if(Qu.length){let z=Qu.slice(0,8).map(R=>`#${te(R.node_index)} post_transform=${R.svm_post_transform||"UNRESOLVED"}`);s.push(Z({id:"EA-ONX-0055",category:"integrity",title:"SVMRegressor post_transform is serialized but ignored by pinned ORT CPU",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Qu.length)} affected SVMRegressor node(s)`,observation:`${z.join("; ")}${Qu.length>z.length?`; plus ${C(Qu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned constructor stores post_transform, but its Compute path writes the raw regressor result without applying it. Consumers that interpret the output as LOGISTIC, SOFTMAX, SOFTMAX_ZERO, or PROBIT receive a different numerical contract from the serialized intent.",recommendation:"Use post_transform=NONE and apply an explicit reviewed transform outside SVMRegressor, or select a runtime with measured matching semantics and pin exact output fixtures.",relevance:"silent semantic divergence; output interpretation; runtime parity"}))}if(Uu.length){let z=Uu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: unused support/coeff/rho/prob=${C(R.svm_unused_support_vector_value_count||0)}/${C(R.svm_unused_coefficient_count||0)}/${C(R.svm_unused_rho_count||0)}/${C(R.svm_unused_probability_parameter_count||0)}, kernel=${R.svm_kernel_type||"UNRESOLVED"}`);s.push(Z({id:"EA-ONX-0056",category:"integrity",title:"ONNX-ML SVM carries ignored parameters or a kernel overridden by runtime mode",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Uu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${Uu.length>z.length?`; plus ${C(Uu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned kernel consumes only its source-defined layout, ignores trailing serialized values, and forces LINEAR behavior when the support-vector count selects linear mode. The signed artifact therefore contains state or kernel intent that does not affect execution.",recommendation:"Regenerate exact-cardinality attributes, make the selected linear/SVC mode explicit, remove dead state, and compare repaired outputs with the training-time model and pinned native runtime.",relevance:"parameter conservation; exporter correctness; hidden dead state"}))}if(Gu.length){let z=Gu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: non-finite parameter/reference=${C(R.svm_non_finite_parameter_count||0)}/${C(R.svm_reference_non_finite_score_count||0)}, boundary=${C(R.svm_reference_decision_boundary_count||0)}`);s.push(Z({id:"EA-ONX-0057",category:"integrity",title:"ONNX-ML SVM has non-finite arithmetic or a reference decision-boundary case",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(Gu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${Gu.length>z.length?`; plus ${C(Gu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Non-finite parameters or scalar reference scores invalidate ordinary margin/probability semantics. An exact zero decision value is also sensitive to the executed MLAS accumulation and platform transcendental path, which static source analysis does not observe.",recommendation:"Reject non-finite state and validate every boundary fixture on pinned runtime builds across intended CPU feature profiles before release.",relevance:"numerical integrity; decision stability; microkernel and libm sensitivity"}))}if(Vu.length){let z=Vu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${(R.risk_codes||[]).filter(Ke=>Ke.startsWith("svm_")&&!Ke.includes("runtime_contract")).join("/")}`);s.push(Z({id:"EA-ONX-0058",category:"integrity",title:"ONNX-ML SVM exposes a source-backed label, transform, or flag semantic hazard",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Vu.length)} affected SVM node(s)`,observation:`${z.join("; ")}${Vu.length>z.length?`; plus ${C(Vu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned source proves an externally visible ambiguity or special branch: duplicate class labels, a second transform after SVC probability coupling, binary complement expansion, an unwritten PROBIT score slot, or a noncanonical one_class value treated as true.",recommendation:"Canonicalize labels and flags, remove implicit transform branches, and lock the complete label/score tensor contract with serialized native ORT parity fixtures.",relevance:"output ABI; classification semantics; deterministic runtime behavior"}))}if(Hu.length){let z=Hu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.tree_pinned_ort_contract_reason||R.tree_onnx_contract_reason||"pinned executable contract failure"}`);s.push(Z({id:"EA-ONX-0059",category:"runtime_compatibility",title:"ONNX-ML TreeEnsemble violates a pinned executable topology or parameter contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Hu.length)} affected TreeEnsemble node(s)`,observation:`${z.join("; ")}${Hu.length>z.length?`; plus ${C(Hu.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized tree cannot be executed under the pinned ONNX/ORT contract because a required tensor or tuple cardinality, root, child, feature, node identity, cycle, class/target, weight, mode, aggregate, transform, rank, or dtype invariant fails. Output propagation is suppressed instead of treating an initializer default as a result.",recommendation:"Repair the exact row-level reason, require a zero-failure topology ledger, and run the serialized fixture through the pinned native ORT CPU build before release.",relevance:"deterministic runtime failure; tree topology integrity; release blocking"}))}if(Ku.length){let z=Ku.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name} ${R.input_dtype||"UNKNOWN"}`);s.push(Z({id:"EA-ONX-0060",category:"runtime_compatibility",title:"TreeEnsemble dtype is schema-valid but lacks the pinned ORT CPU kernel",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Ku.length)} affected TreeEnsemble node(s)`,observation:`${z.join("; ")}${Ku.length>z.length?`; plus ${C(Ku.length-z.length)} more in structured evidence`:""}.`,interpretation:"The pinned schema permits this input type, but the pinned CPU registration does not: generic TreeEnsemble-5 has no FLOAT16 CPU kernel and legacy TreeEnsembleRegressor has no INT32 or INT64 CPU kernel. A valid inferred output type does not establish an executable CPU path.",recommendation:"Convert to a pinned CPU-supported dtype or attach observed successful assignment and value-parity evidence from the intended execution provider before qualification.",relevance:"schema/runtime gap; execution-provider compatibility; session initialization"}))}if(Zu.length){let z=Zu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}-${C(R.resolved_schema_version||5)}`);s.push(Z({id:"EA-ONX-0061",category:"integration_verification",title:"Legacy TreeEnsemble operator remains serialized at the deprecation opset",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Zu.length)} deprecated legacy TreeEnsemble node(s)`,observation:`${z.join("; ")}${Zu.length>z.length?`; plus ${C(Zu.length-z.length)} more in structured evidence`:""}.`,interpretation:"TreeEnsembleClassifier and TreeEnsembleRegressor are deprecated at ai.onnx.ml opset 5 in favor of indexed TreeEnsemble-5. Existing runtime behavior can remain valid, but exporter and future-provider portability now depend on a legacy contract.",recommendation:"Plan a controlled conversion to TreeEnsemble-5 and bind pre/post conversion outputs, labels, aggregate mode, transform behavior, and missing-value paths to exact parity fixtures.",relevance:"operator lifecycle; exporter portability; runtime maintenance"}))}if(Xu.length){let z=Xu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: orphan ${C(R.tree_orphan_node_or_leaf_count||0)}, ignored nonleaf/single-target weights ${C(R.tree_ignored_nonleaf_weight_count||0)}/${C(R.tree_single_target_ignored_weight_count||0)}, multiple-parent nodes ${C(R.tree_multiple_parent_node_count||0)}`);s.push(Z({id:"EA-ONX-0062",category:"integrity",title:"TreeEnsemble contains unreachable, ignored, or non-tree serialized state",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Xu.length)} affected TreeEnsemble node(s); ${C(ce.exact_tree_ensemble_unused_weight_count||0)} unused weight(s); ${C(ce.exact_tree_ensemble_orphan_node_or_leaf_count||0)} orphan node/leaf record(s)`,observation:`${z.join("; ")}${Xu.length>z.length?`; plus ${C(Xu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned runtime semantics ignore weights attached to nonleaves and additional single-target leaf IDs; generic roots can also leave serialized nodes or leaves unreachable, while shared subtrees violate strict-tree ownership. The signed artifact therefore carries state that is dead or structurally surprising even when execution succeeds.",recommendation:"Regenerate a strict reachable forest with one parent per nonroot and only runtime-consumed leaf weights, then require exact weight conservation and output parity.",relevance:"parameter conservation; exporter integrity; hidden dead state"}))}if(Wu.length){let z=Wu.slice(0,8).map(R=>`#${te(R.node_index)} MEMBER values/duplicates/separators ${C(R.tree_membership_value_count||0)}/${C(R.tree_membership_duplicate_value_count||0)}/${C(R.tree_membership_separator_count||0)}: ${(R.risk_codes||[]).filter(Ke=>Ke.includes("membership")||Ke.includes("zero_member")).join("/")}`);s.push(Z({id:"EA-ONX-0063",category:"integration_verification",title:"TreeEnsemble-5 MEMBER set has duplicate values or a pinned reference/runtime divergence",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(Wu.length)} affected TreeEnsemble-5 node(s); ${C(ce.exact_tree_ensemble_membership_duplicate_value_count||0)} duplicate member value(s)`,observation:`${z.join("; ")}${Wu.length>z.length?`; plus ${C(Wu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Duplicate MEMBER values add no branch information, and a zero member exposes a source-pinned divergence: ORT tests membership correctly while the pinned ONNX Python reference parser terminates its set loop on zero. Static path selection follows the selected ORT semantics and records the reference disagreement.",recommendation:"Deduplicate every membership set, avoid zero until the reference path is fixed or explicitly waive the divergence, and pin branch outcomes for zero, NaN, present, and absent members in native ORT fixtures.",relevance:"branch semantics; reference/runtime parity; test portability"}))}if(Yu.length){let z=Yu.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${(R.risk_codes||[]).filter(Ke=>Ke.startsWith("tree_")).join("/")}`);s.push(Z({id:"EA-ONX-0064",category:"integrity",title:"TreeEnsemble exposes a source-backed label, base-value, transform, or binary-score hazard",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Yu.length)} affected TreeEnsemble node(s); ${C(ce.exact_tree_ensemble_reference_unwritten_score_count||0)} unwritten reference score slot(s)`,observation:`${z.join("; ")}${Yu.length>z.length?`; plus ${C(Yu.length-z.length)} more in structured evidence`:""}.`,interpretation:"Pinned source proves an externally visible special branch: duplicate labels, INT64 binary index semantics, underspecified one-base-value handling, a single-target transform that becomes a no-op, or a binary transform path that leaves a score slot unwritten. The operator name alone is insufficient to infer the application score contract.",recommendation:"Canonicalize labels and base values, remove implicit no-op/unwritten transform cases, and bind every label plus complete score tensor to serialized native ORT parity fixtures.",relevance:"output ABI; classification semantics; deterministic runtime behavior"}))}if(Ju.length){let z=Ju.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: non-finite parameter/reference ${C(R.tree_non_finite_parameter_count||0)}/${C(R.tree_reference_non_finite_score_count||0)}, boundary ${C(R.tree_reference_decision_boundary_count||0)}`);s.push(Z({id:"EA-ONX-0065",category:"integrity",title:"TreeEnsemble has non-finite arithmetic or an exact reference decision-boundary case",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(Ju.length)} affected TreeEnsemble node(s)`,observation:`${z.join("; ")}${Ju.length>z.length?`; plus ${C(Ju.length-z.length)} more in structured evidence`:""}.`,interpretation:"Non-finite thresholds, weights, inputs, or scalar reference scores invalidate ordinary comparison and ranking semantics. An exact zero classifier decision also lies on a branch where runtime floating reduction order can change the selected label; the report therefore does not claim runtime-bit-exact scores.",recommendation:"Reject non-finite state and execute every boundary fixture on pinned runtime builds across intended CPU feature profiles and execution providers before release.",relevance:"numerical integrity; decision stability; runtime reduction sensitivity"}))}if(e_.length){let z=e_.slice(0,8).map(R=>`#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"TfIdfVectorizer contract failure"}`);s.push(Z({id:"EA-ONX-0066",category:"runtime_compatibility",title:"TfIdfVectorizer violates a pinned schema or ORT CPU execution contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(e_.length)} invalid TfIdfVectorizer node(s)`,observation:`${z.join("; ")}${e_.length>z.length?`; plus ${C(e_.length-z.length)} more in structured evidence`:""}.`,interpretation:"The serialized mode, gram bounds, skip count, pool type, level boundaries, whole-n-gram divisibility, definition/index/weight cardinality, output coordinate, duplicate active n-gram, input rank, or dtype cannot satisfy the pinned executable contract. Static output propagation is suppressed.",recommendation:"Regenerate the vectorizer with one type-matched nonempty pool, monotone in-bounds ngram_counts, one index and optional finite weight per n-gram, unique active n-grams, and a rank-one or positive-batch rank-two input; require native ORT parity before release.",relevance:"deterministic runtime failure; text feature ABI; release blocking"}))}if(t_.length){let z=t_.slice(0,8).map(R=>`#${te(R.node_index)} ${R.mode}: ${C(R.exact_weight_coordinate_value_disagreement_count||0)} value disagreement(s) across ${C(R.exact_weight_coordinate_disagreement_count||0)} remapped n-gram(s)`);s.push(Z({id:"EA-ONX-0067",category:"integrity",title:"TfIdfVectorizer weight mapping differs between ONNX prose and pinned executable sources",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(t_.length)} affected weighted vectorizer node(s)`,observation:`${z.join("; ")}${t_.length>z.length?`; plus ${C(t_.length-z.length)} more in structured evidence`:""}.`,interpretation:"The ONNX schema text associates weights[i] with pool n-gram i, while both the pinned ONNX reference implementation and ORT CPU kernel read weights[ngram_indexes[i]]. A non-identity remap with unequal values therefore changes the feature vector relative to the prose contract.",recommendation:"Canonicalize ngram_indexes to identity order or reorder weights so pool-index and output-coordinate interpretations are numerically identical, then bind exact vectors from the intended runtime.",relevance:"feature semantics; reference contract divergence; model portability"}))}if(n_.length){let z=n_.slice(0,8).map(R=>`#${te(R.node_index)}: ${C(R.exact_ort_reference_divergent_output_count||0)} / ${C(R.exact_output_value_count||0)} output value(s)`);s.push(Z({id:"EA-ONX-0068",category:"numerical_behavior",title:"TfIdfVectorizer ORT repeated FLOAT32 weighting differs from ONNX reference arithmetic",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Medium",op:`${C(n_.length)} exact static node(s)`,observation:`${z.join("; ")}${n_.length>z.length?`; plus ${C(n_.length-z.length)} more in structured evidence`:""}.`,interpretation:"For weighted TFIDF, ORT adds the FLOAT32 weight once per hit, while the ONNX Python reference multiplies the final integer frequency by the weight and casts once. Repeated rounding can produce different finite FLOAT32 outputs even with identical matches.",recommendation:"Use the intended runtime as the feature-vector authority, retain the exact divergent coordinates as a regression fixture, and avoid assuming ONNX reference bit parity for repeated weighted terms.",relevance:"numerical ABI; runtime/reference parity; downstream classifier inputs"}))}if(i_.length){let z=i_.slice(0,8).map(R=>`#${te(R.node_index)}: ${(R.risk_codes||[]).filter(Ke=>Ke.includes("pool_prefix")||Ke.includes("duplicate_ngram")||Ke.includes("share_output")).join("/")}`);s.push(Z({id:"EA-ONX-0069",category:"integration_verification",title:"TfIdfVectorizer contains ignored, duplicate, or coordinate-aliased feature state",evidence:"OBSERVED/DERIVED",priority:"Medium",op:`${C(i_.length)} noncanonical vectorizer node(s)`,observation:`${z.join("; ")}${i_.length>z.length?`; plus ${C(i_.length-z.length)} more in structured evidence`:""}.`,interpretation:"A nonzero first ngram_counts offset leaves a pool prefix unread, duplicate inactive n-grams retain dead serialized state, and shared output coordinates merge distinct n-gram counts. These may execute but obscure feature ownership and converter intent.",recommendation:"Serialize a zero-based compact pool with unique n-grams and one output coordinate per feature unless aggregation is an explicitly tested application contract.",relevance:"feature ownership; dead state; exporter reproducibility"}))}if(Qg.length&&s.push(Z({id:"EA-ONX-0070",category:"evidence_completeness",title:"TfIdfVectorizer exact static execution exceeds the emitted analysis bound",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"Informational",op:`${C(Qg.length)} bounded residual node(s)`,observation:Qg.slice(0,8).map(z=>`#${te(z.node_index)} ${z.static_execution_status}; work ${C(z.exact_static_work_units??0)}; output width ${C(z.exact_output_width??0)}`).join("; "),interpretation:"The artifact contract and output shape remain deterministic, but materializing every static output or enumerating every bounded skip path would exceed the declared browser work limit. No synthetic zero vector is emitted.",recommendation:"Run the pinned native fixture or raise the audited bound in a controlled build with memory and denial-of-service tests; keep the result partial until complete arithmetic is independently reconstructed.",relevance:"evidence completeness; bounded analysis; denial-of-service resistance"})),ue.length){let z=ue.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name} ${R.tensor_name} ${R.field}: declared ${R.declared}, inferred ${R.inferred}`);s.push(Z({id:"EA-ONX-0006",category:"integrity",title:"ONNX declared tensor contract contradicts deterministic shape inference",evidence:"OBSERVED/DERIVED",priority:"High",op:`${C(ue.length)} declared/inferred conflict(s)`,observation:`${z.join("; ")}${ue.length>z.length?`; plus ${C(ue.length-z.length)} more in structured evidence`:""}.`,interpretation:"The artifact declares a dtype, rank, or concrete dimension that contradicts a deterministic local rule under the imported graph contract. The analyzer preserves the artifact declaration and does not replace it with the inferred value. Downstream MAC, payload, liveness, and runtime compatibility conclusions that depend on the disputed tensor are not trustworthy until the artifact is repaired.",recommendation:"Reject the artifact for release, run the pinned ONNX checker and reference shape inference, correct the exporter or stale value_info/output declaration, regenerate the model, and require a zero-conflict DeepBOM report before runtime qualification.",relevance:"artifact integrity; shape contract; downstream metric validity"}))}if(xt.length){let z=xt.slice(0,8).map(R=>`#${te(R.node_index)} ${R.op_name}: ${R.reason}`);s.push(Z({id:"EA-ONX-0071",category:"integrity",title:"ONNX operator contract is deterministically invalid",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(xt.length)} semantic contract conflict(s)`,observation:`${z.join("; ")}${xt.length>z.length?`; plus ${C(xt.length-z.length)} more in structured evidence`:""}.`,interpretation:"Artifact-known shapes, controls, or attributes violate the pinned operator contract. This is not missing analysis or an unknown runtime dimension. The invalid output and every dependent node are causally blocked, so downstream arithmetic, payload, liveness, and provider conclusions are not promoted.",recommendation:"Reject the artifact for release, repair the exporter or serialized control/shape contract, regenerate the model, and require zero semantic-contract conflicts before runtime qualification.",relevance:"artifact integrity; operator semantics; downstream metric validity"}))}if(he.length){let z=new Map;for(let Ke of he)for(let Ot of Ke.conditional_shape_contract?.variant_failures||[]){if(Ot?.status!=="invalid")continue;let zt=JSON.stringify({reason:Ot.reason||"conditional_shape_variant_invalid",conditions:Ot.conditions||[]});z.has(zt)||z.set(zt,{tensor:Ke,failure:Ot})}let R=[...z.values()].slice(0,8).map(({tensor:Ke,failure:Ot})=>{let zt=(Ot.conditions||[]).map(T1=>`${T1.key}=${T1.value}`).join(" & ")||"condition not named";return`T${C(Ke.index)} ${Ke.name||"unnamed"}: ${Ot.reason||"conditional shape variant invalid"} under ${zt}`});s.push(Z({id:"EA-ONX-0072",category:"integrity",title:"ONNX runtime branch has a deterministically invalid tensor contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(ne.conditionally_invalid_node_output_count||he.length)} conditionally invalid output(s); ${C(ne.conditional_invalid_variant_count||z.size)} invalid variant record(s)`,observation:`${R.join("; ")}${z.size>R.length?`; plus ${C(z.size-R.length)} more unique branch failure(s) in structured evidence`:""}.`,interpretation:"At least one finite, artifact-derived control-flow branch produces a tensor rank or dimension contract that a downstream pinned ONNX operator cannot accept. Viable branches are retained, but the model-wide MAC, payload, and liveness totals are not promoted through the invalid branch.",recommendation:"Constrain and serialize the external input contract so the invalid branch is unreachable, or repair the branch/operator graph. Re-run the pinned ONNX checker and require zero conditionally invalid outputs before release qualification.",relevance:"artifact integrity; conditional control flow; downstream metric validity"}))}if(He.length||st.length){let z=He.slice(0,8).map(Ot=>`#${te(Ot.node_index)} ${Ot.op_name} at opset ${Ot.imported_opset??"unresolved"}: ${(Ot.reason_codes||[]).join("/")||"formal schema failure"}`),R=st.slice(0,Math.max(0,8-z.length)).map(Ot=>`opset import #${Ot.index} ${Ot.domain}@${Ot.version}: ${(Ot.reason_codes||[]).join("/")||"invalid import"}`),Ke=He.length+st.length;s.push(Z({id:"EA-ONX-0007",category:"integrity",title:"ONNX opset import or node violates the pinned schema contract",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(st.length)} invalid OperatorSetIdProto import(s); ${C(He.length)} invalid NodeProto schema form(s)`,observation:`${[...R,...z].join("; ")}${Ke>R.length+z.length?`; plus ${C(Ke-R.length-z.length)} more in structured evidence`:""}.`,interpretation:"A domain import has no valid positive version, or the node's operator availability, formal input/output cardinality or omission, attribute name, required attribute, AttributeProto discriminator, or value-field type contradicts the greatest pinned ONNX schema version allowed by the model. Repeated valid imports are retained separately and resolved to the highest referenced version under the serialized ModelProto contract. Shape inference is suppressed only where the effective import or node form is invalid, so downstream size, MAC, liveness, and provider-precheck values cannot silently inherit unspecified semantics.",recommendation:"Reject the artifact for release, run the pinned ONNX checker, correct the exporter/opset declaration or node form, regenerate the model, and require zero OpSchema formal-contract failures before runtime qualification.",relevance:"artifact integrity; opset legality; downstream metric validity"}))}if(Xi.length||Ha.length||po.length){let z=Xi.slice(0,6).map(zt=>`${zt.function_id} at ${zt.scope}/#${te(zt.node_index)}: ${(zt.reason_codes||[]).join("/")||"call contract failed"}`),R=Ha.slice(0,Math.max(0,6-z.length)).map(zt=>`${zt.op_name} at ${zt.scope}/#${te(zt.node_index)}: ${(zt.reason_codes||[]).join("/")||"body inference failed"}`),Ke=po.slice(0,Math.max(0,6-z.length-R.length)).map(zt=>`SequenceMap at ${zt.scope}/#${te(zt.node_index)}: ${(zt.reason_codes||[]).join("/")||"body inference failed"}`),Ot=Xi.length+Ha.length+po.length;s.push(Z({id:"EA-ONX-0009",category:"integrity",title:"Reachable ONNX function or graph-body contract fails recursive shape inference",evidence:"SOURCE_PINNED_AND_DERIVED",priority:"High",op:`${C(Xi.length)} FunctionProto call failure(s); ${C(Ha.length)} If/Loop/Scan failure(s); ${C(po.length)} SequenceMap failure(s)`,observation:`${[...z,...R,...Ke].join("; ")}${Ot>z.length+R.length+Ke.length?`; plus ${C(Ot-z.length-R.length-Ke.length)} more in structured evidence`:""}.`,interpretation:"A reachable local-function binding, function/model opset contract, referenced attribute, branch/body cardinality, tensor or sequence type, SequenceMap length, or control-flow axis contract is invalid under the pinned ONNX semantics. The affected output is not inferred and downstream shape-dependent metrics remain invalid or incomplete.",recommendation:"Reject the artifact for release, run the same pinned ONNX checker/reference inferencer, repair the exporter function or graph-body contract, and require zero recursive-scope failures before runtime qualification.",relevance:"artifact integrity; local functions; control flow; sequence mapping; downstream metric validity"}))}if(Number(Re.reachable_exclusion_count||0)>0||Number(Re.reachable_scope_unresolved_output_count||0)>0||zo.length||Vr.length||Hr.length||Ep.length){let z=[...zo.map(R=>`${R.op_name} ${R.scope}/#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"runtime-dependent control"}`),...Vr.map(R=>`SequenceMap ${R.scope}/#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"runtime-dependent sequence"}`),...Hr.map(R=>`${R.scope}: ${(R.reason_codes||[]).join("/")||`${C(R.unresolved_output_count||0)} unresolved output(s)`}`),...Ep.map(R=>`${R.op_name||"ONNX-ML"} ${R.scope}/#${te(R.node_index)}: ${(R.reason_codes||[]).join("/")||"runtime-dependent map cardinality"}`)].slice(0,8);s.push(Z({id:"EA-ONX-0008",category:"integration_verification",title:"Reachable ONNX shape scopes retain explicit static-analysis residuals",evidence:"OBSERVED/NOT_ASSESSABLE",priority:Number(ne.unknown_node_output_count||0)>0?"High":"Medium",op:`${C(Re.unassessed_reachable_node_count||0)} residual reachable node(s); ${C(zo.length)} partial control-flow node(s); ${C(Vr.length)} partial SequenceMap node(s); ${C(Hr.length)} partial recursive scope(s); ${C(Ep.length)} partial ONNX-ML value-contract node(s)`,observation:`${C(Re.executed_reachable_scope_count||0)} reachable scope(s) were recursively executed and ${C(Re.fully_assessed_reachable_scope_count||0)} were fully assessed; ${C(Re.unassessed_reachable_node_count||0)} unsupported, schema-invalid, or failed-rule node(s), ${C(Re.reachable_scope_unresolved_output_count||0)} unresolved scope output(s), and ${C(Ep.length)} runtime-cardinality ONNX-ML residual(s) remain.${z.length?` Residual examples: ${z.join("; ")}.`:""}`,interpretation:"The residual count is reconciled against exact structural inventory, recursive execution evidence, and source-pinned partial control-flow/container/map rows. Dynamic Loop control, SequenceMap length, ZipMap batch/feature cardinality, or dense CastMap input cardinality remains explicitly unresolved even when the surrounding TypeProto is known. Downstream shape, container-state, MAC, payload, liveness, and provider conclusions that depend on these residuals remain partial.",recommendation:"Inspect the named residual rows, add or repair the missing pinned operator/type rule, and retain pinned ONNX checker/reference inference plus ORT session evidence before promoting dependent metrics to complete.",relevance:"shape completeness; control flow; local functions; downstream metric validity"}))}let S1=Math.max(0,Number(ee.tensor_count||0)-Number(ee.verified_payload_count||0));(S1>0||Number(ee.payload_verification_failed_count||0)>0)&&s.push(Z({id:"EA-ONX-0004",category:"integrity",title:"ONNX external TensorProto payload coverage is incomplete",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"High",op:`${C(ee.tensor_count)} external TensorProto reference(s)`,observation:`${C(ee.entry_count)} external_data record(s); ${C(ee.verified_payload_count)} verified, ${C(ee.payload_verification_failed_count||0)} failed verification, ${C(S1)} incomplete, ${C(ee.malformed_reference_count)} malformed reference(s). Verified payload ${mn(ee.verified_payload_bytes||0)}; declared ${ee.declared_payload_bytes==null?"not fully declared":mn(ee.declared_payload_bytes)}.`,interpretation:"Graph structure is visible, but any unavailable range prevents complete constant-byte, decoded-value, duplicate-payload, weight-integrity, and quantization-contract conclusions.",recommendation:"Select every model-relative external_data sidecar, correct range/checksum failures, and retain the emitted sidecar SHA-256 plus tensor range ledger in the release manifest.",relevance:"artifact integrity; weight verification; reproducible packaging"})),Number($.external_custom_node_count||0)>0&&s.push(Z({id:"EA-ONX-0001",category:"integration_verification",title:"External ONNX custom-op registry is required",evidence:"DERIVED",priority:"High",op:($.external_custom_domains||[]).join(" / "),observation:`${C($.external_custom_node_count)} node(s) in ${($.external_custom_domains||[]).join(" / ")} are neither standard ONNX/ONNX-ML, pinned ORT contrib schemas, nor artifact-defined local functions.`,interpretation:"The artifact cannot be executed by a stock ORT build unless a matching custom-op library or execution provider registers these schemas and kernels.",recommendation:"Bind the custom-op registry/library version, source commit, binary SHA-256, supported target matrix, and an observed ORT assignment profile to the release.",relevance:"runtime integration; custom operator provenance"})),($.duplicate_function_ids||[]).length||($.recursive_function_cycles||[]).length?s.push(Z({id:"EA-ONX-0002",category:"integrity",title:"ONNX local function registry is ambiguous or recursive",evidence:"OBSERVED",priority:"High",op:"FunctionProto registry",observation:`${C(($.duplicate_function_ids||[]).length)} duplicate function ID(s); ${C(($.recursive_function_cycles||[]).length)} recursive dependency cycle(s).`,interpretation:"Static function resolution is not unique or terminates in a recursive cycle, so deterministic expansion and source-rule support assessment cannot be concluded.",recommendation:"Remove duplicate domain/name/overload definitions and recursive dependencies, then regenerate and validate the artifact with ONNX checker and the pinned deployment runtime.",relevance:"artifact integrity; deterministic runtime resolution"})):Number($.model_local_function_call_count||0)>0&&s.push(Z({id:"EA-ONX-0003",category:"integration_verification",title:"Model-local ONNX functions require observed runtime resolution",evidence:"DERIVED",priority:"Medium",op:`${C($.model_local_function_call_count)} local function call(s)`,observation:"FunctionProto definitions and dependencies are present in the artifact and are not external custom-op registry requirements; direct EP kernel rows do not prove how ORT inlines or assigns their bodies.",interpretation:"The function composition is structurally known, while graph optimization and execution-provider assignment remain runtime decisions.",recommendation:"Capture a graph-optimization-disabled ORT profile for original-node identity and a production-optimization profile for final EP assignment; retain both with runtime/build hashes.",relevance:"execution-provider assignment; runtime reproducibility",evidenceJsonPointers:e?.ort_compatibility_evidence?["/evidence/static_analysis/onnx_domain_analysis/functions","/evidence/static_analysis/ort_compatibility_evidence/execution_providers"]:["/evidence/static_analysis/onnx_domain_analysis/functions"]}));let o_=(e?.ort_compatibility_evidence?.execution_providers||[]).flatMap(z=>(z.ops||[]).filter(R=>R.definite_source_exclusion).map(R=>({ep:z.execution_provider,row:R})));if(o_.length){let z=o_.slice(0,8).map(({ep:R,row:Ke})=>{let Ot=(Ke.artifact_conditions||[]).filter(zt=>zt.status==="DEFINITE_FAIL");return`${R} #${te(Ke.op_index)} ${Ke.op_name}: ${Ot.map(zt=>`${zt.condition_id} (${zt.observed})`).join(" / ")||Ke.status}`});s.push(Z({id:"EA-ONX-0005",category:"execution_provider_compatibility",title:"Pinned ORT EP source conditions exclude artifact nodes",evidence:"DERIVED",priority:"Medium",op:`${C(o_.length)} node-provider exclusion(s)`,observation:`${z.join("; ")}${o_.length>z.length?`; plus ${C(o_.length-z.length)} more in raw evidence`:""}.`,interpretation:"The operator/schema version is registered, but an artifact-visible dtype, rank, constant-input, output-count, or explicit-attribute value contradicts a pinned source condition. This is a definite source-candidate exclusion, not an observed runtime assignment failure.",recommendation:"Review the exact condition ledger, select a compatible EP or artifact contract, and bind an optimization-disabled plus production ORT assignment profile before release.",relevance:"execution-provider compatibility; deployment planning; runtime verification"}))}}if(!u&&Number(e?.subgraphs||1)>1){let $=e?.tflite_subgraph_deep_analysis||{};s.push(Z({id:"EA-GRF-0001",category:"limitation",title:"Cross-subgraph execution aggregation requires runtime invocation counts",evidence:"OBSERVED/NOT_ASSESSABLE",priority:"Medium",op:`${C($.assessed_subgraph_count||0)} of ${C(e.subgraphs)} subgraphs independently assessed`,observation:`${C(e.subgraphs)} serialized subgraphs are inventoried and ${C($.assessed_subgraph_count||0)} receive independent per-op MAC, liveness, ArenaPlanner, quantization, weight-integrity, fixed-point, and source-pinned XNNPACK candidate ledgers. Those local rows are intentionally not summed across control flow.`,interpretation:"IF branches are conditional and WHILE, reduce, scatter, or initialization computations can execute zero, one, or multiple times. Serialized nested-op counts therefore cannot be promoted to complete whole-model execution totals without invocation evidence.",recommendation:"Use each emitted subgraph row for local review and import observed invocation counts and runtime placement before computing a whole-execution cost, arena, delegation, or latency total.",relevance:"analysis coverage; control-flow integrity; deployment verification"}))}if((e?.format||"tflite")==="tflite"&&!x){let $=e?.runtime_compat||{},ee=$.derived_min_runtime_version||"not determined",ne=$.runtime_floor_status==="complete_for_observed_builtin_op_versions";s.push(Z({id:"EA-RUN-0001",category:"integration_verification",title:"Bundled runtime version was not provided",evidence:"NOT_ASSESSABLE",priority:"Medium",op:"Runtime",observation:`Observed mapped-op necessary floor ${ee}; builtin op-version map coverage ${C($.mapped_operator_code_count||0)}/${C($.builtin_operator_code_count||0)} (${$.runtime_floor_status||"coverage status not emitted"}); declared min_runtime_version ${$.min_runtime_version||"not embedded"}; highest observed operator version ${$.max_op_version||1}; deployed LiteRT/TFLite runtime build not provided.`,interpretation:ne?"Every observed builtin op code/version is covered by the pinned necessary-floor map, but compatibility of the application bundle still cannot be concluded without the exact runtime version and build flags.":"The emitted number is only a partial necessary floor for mapped builtin op versions. Unmapped op versions and the absent application runtime prevent an effective compatibility conclusion.",recommendation:"Record the exact LiteRT/TFLite runtime build and build flags, resolve every unmapped builtin op version, and execute the artifact on that binary before claiming compatibility.",relevance:"integration verification; deployment reproducibility"}))}let S=e?.weight_integrity||{};if(Number(S.zero_kernel_slice_count||0)>0){let $=Array.isArray(S.zero_kernel_slice_details)?S.zero_kernel_slice_details:[],ee=$.filter(de=>["INT8","UINT8"].includes(String(de.dtype||"").toUpperCase())),ne=$.length>0&&ee.length===$.length,ge=new Map((e?.channel_vitality?.ops||[]).map(de=>[Number(de.op_index),de])),le=[];for(let de of $){let Xi=new Set((de.exact_zero_channels||[]).map(Number)),Ha=(de.consumer_ops||[]).map(po=>Number(String(po).match(/^#(\d+)/)?.[1])).filter(Number.isInteger);for(let po of Ha){let zo=ge.get(po);if(!zo||zo.assessment_status!=="assessed")continue;let Vr=new Set((zo.default_constant_channel_indices||[]).map(Number)),Hr=new Set((zo.single_constant_channel_indices||[]).map(Number));for(let Wi of Xi){if(!Vr.has(Wi)||!Hr.has(Wi))continue;let pn=(de.channels||[]).findIndex(Kr=>Number(Kr)===Wi);le.push({tensorIndex:de.tensor_index,opIndex:po,channel:Wi,biasCode:pn>=0?de.bias_code_sample?.[pn]:null,biasUtilization:pn>=0?de.bias_int32_utilization_sample?.[pn]:null})}}}let ue=$.length?$.slice(0,4).map(de=>{let Xi=(de.channels||[]).slice(0,16).join(", "),Ha=(de.exact_zero_channels||[]).slice(0,16).join(", "),po=(de.scale_sample||[]).slice(0,3).map(pn=>Number(pn).toExponential(3)).join(", ")||"-",zo=(de.zero_point_sample||[]).slice(0,3).join(", ")||"-",Vr=de.bias_tensor_name?`${de.bias_tensor_name} ${de.bias_dtype||""}; real bias sample ${(de.bias_value_sample||[]).slice(0,3).map(pn=>Number(pn).toExponential(3)).join(", ")||"not decoded"}; raw code sample ${(de.bias_code_sample||[]).slice(0,3).map(pn=>C(pn)).join(", ")||"not decoded"}; INT32 use ${(de.bias_int32_utilization_sample||[]).slice(0,3).map(pn=>nn(pn)).join(", ")||"not assessed"}`:"bias not decoded",Hr=["INT8","UINT8"].includes(String(de.dtype||"").toUpperCase())?`; scale/zp ${po}/${zo}`:"",Wi=de.zero_slice_arithmetic_share==null?"":`; zero-slice arithmetic proxy ${nn(de.zero_slice_arithmetic_share)}`;return`${de.tensor_name||`T${de.tensor_index}`} ${de.dtype||""} ${(de.shape||de.tensor_shape||[]).join("x")||"shape unknown"}: near-zero decoded slice channel(s) ${Xi}${Number(de.channel_count||0)>16?", ...":""}; exact-zero stored subset ${Ha||"none"}${Hr}; ${Vr}; consumers ${(de.consumer_ops||[]).join(" / ")||"-"}${Wi}`}).join(" | "):`${C(S.zero_kernel_slice_count||0)} near-zero decoded kernel slice(s), including ${C(S.exact_zero_kernel_slice_count||0)} exact-zero stored slice(s), across ${C(S.zero_kernel_slice_tensors||0)} tensor(s)`,xt=$.filter(de=>de.zero_slice_arithmetic_share!=null),he=xt.reduce((de,Xi)=>de+Number(Xi.zero_slice_arithmetic_share),0),He=$.reduce((de,Xi)=>de+Number(Xi.consumer_mac_percent||0),0),st=ne?"after applying artifact quantization scale/zero-point metadata":"in decoded stored-value space",Re=xt.length?` Static zero-slice arithmetic-waste proxy ${nn(he)} of assessed model MACs (direct-consumer MACs x flagged output slices / kernel output channels; not latency or accuracy impact).`:` Direct-consumer MAC share upper bound ${nn(He)} (triage scope only; not zero-slice arithmetic, latency, or accuracy impact).`;s.push(Z({id:"EA-WGT-0001",category:"numerical_structure_review",title:le.length?"Exact-zero kernel slices converge with constant-output channel proof":"Near-zero decoded kernel slices require functional review",evidence:le.length?"DERIVED":"OBSERVED",priority:le.length?"High":Number(S.exact_zero_kernel_slice_count||0)?"Medium":"Informational",op:$.flatMap(de=>de.consumer_ops||[]).slice(0,4).join(", ")||"constant tensor",tensor:$.slice(0,4).map(de=>de.tensor_name||`T${de.tensor_index}`).join(", ")||"-",observation:`${C(S.zero_kernel_slice_count||0)} decoded kernel output slice(s) are near-zero ${st}; ${C(S.exact_zero_kernel_slice_count||0)} are exact-zero in stored centered-code space. ${ue}.${Re}${le.length?` Cross-ledger join proves ${C(le.length)} exact-zero coordinate(s) also emit one constant output code under both pinned fixed-point paths: ${le.slice(0,12).map(de=>`T${de.tensorIndex}/#${te(de.opIndex)}/ch${de.channel}${de.biasCode==null?"":` bias ${C(de.biasCode)} (${nn(de.biasUtilization)} INT32)`}`).join(", ")}.`:""}`,interpretation:le.length?"The listed coordinates are exact local constant-output channels under both pinned TFLite fixed-point paths, not merely low-norm or scale-spread heuristics. This still does not prove the declared model outputs or task metric are invariant because downstream graph paths and representative inputs remain separate evidence.":"Functional channel inactivity is NOT_ASSESSABLE from kernel weights alone because bias, fused activation, residual paths, downstream consumers, and task behavior can still carry or transform signal.",recommendation:le.length?"Treat the convergent coordinates as a high-priority export defect review: compare against the source checkpoint/QAT graph, inspect raw INT32 bias generation, re-export, and run representative plus adversarial output regression before release.":"Classify as a defect only when kernel slice exact-zero, channel-output proof, downstream effect, and representative-output regression are joined. Until then, review bias values, fused activation, residual/downstream consumers, converter lineage, and representative regression.",relevance:ne?"quantized weight structure; numerical structure review":"weight numerical structure review",findingClass:le.length?"exact cross-ledger numerical proof":"",evidenceJsonPointers:["/evidence/static_analysis/weight_integrity/zero_kernel_slice_details",...le.length?["/evidence/static_analysis/channel_vitality/ops"]:[]]}))}(Number(S.low_grid_utilization_tensors||0)>0||Number(S.saturated_quantized_tensors||0)>0)&&s.push(Z({id:"EA-QNT-0100",category:"quantization_calibration_review",title:"Quantized constant grid utilization requires calibration review",evidence:"HEURISTIC",priority:Number(S.saturated_quantized_tensors||0)>0?"High":"Medium",op:"constant tensors",observation:`${S.quant_grid_detail||`${C(S.low_grid_utilization_tensors||0)} low-utilization tensor(s), ${C(S.saturated_quantized_tensors||0)} saturated tensor(s).`} Alert threshold is HEURISTIC: <25% 8-bit level utilization for tensors with at least 256 elements, or >1% endpoint saturation.`,interpretation:"The utilization and saturation values are deterministically derived from artifact constants; the alert threshold is a methodology heuristic for calibration review, not a task-accuracy claim.",recommendation:"Review calibration/QAT histograms for the flagged constants and compare representative-output drift against a re-calibrated export.",relevance:"quantization calibration integrity",evidenceJsonPointers:[...Object.prototype.hasOwnProperty.call(S,"quant_grid_detail")?["/evidence/static_analysis/weight_integrity/quant_grid_detail"]:[],...Array.isArray(S.quant_grid_details)?["/evidence/static_analysis/weight_integrity/quant_grid_details"]:[]]}));let O=d?.representable_kernel_channels;if(Number(O?.flagged_channels||0)>0){let $=(O.details||[]).filter(ne=>Number(ne.flagged_channel_count||0)>0),ee=$.slice(0,6).map(ne=>{let ge=(ne.flagged_channels||[]).slice(0,8),le=ge.length?Math.min(...ge.map(ue=>Number(ue.maximum_representable_abs))):0;return`${ne.tensor_name||`T${ne.tensor_index}`}: ${C(ne.flagged_channel_count)} channel(s), indices ${ge.map(ue=>ue.channel).join(", ")||"not emitted"}, minimum sampled max |real weight| ${Za(le)}, scale spread ${Za(ne.maximum_to_minimum_scale_ratio)}x`}).join(" | ");s.push(Z({id:"EA-QNT-0118",category:"quantization_design_review",title:"Near-zero representable kernel channels require QAT review",evidence:"HEURISTIC",priority:"Medium",op:$.flatMap(ne=>ne.consumer_ops||[]).slice(0,6).join(", ")||"quantized compute kernels",tensor:$.slice(0,6).map(ne=>ne.tensor_name||`T${ne.tensor_index}`).join(", "),observation:`${C(O.flagged_channels)} of ${C(O.assessed_channels)} assessed per-axis kernel channel(s) meet both review thresholds: maximum representable |real weight| <=${Za(O.maximum_representable_abs_threshold)} and scale outlier ratio >=${Za(O.scale_outlier_ratio_threshold)}x. ${ee}.`,interpretation:"The code-domain range and scale ratios are deterministic artifact-derived values. The thresholds are methodology heuristics: they identify numerically collapsed relative channels, but do not by themselves prove a dead activation channel, QAT failure, or task-accuracy loss because bias, fan-in, fused activation, residual paths, and downstream behavior remain unassessed.",recommendation:"Inspect the named QAT/calibration layer histograms, verify the matching bias-scale contract, and compare representative outputs against a re-export with repaired per-axis ranges before classifying the channel as functionally dead.",relevance:"per-axis quantization range integrity; QAT calibration review",evidenceJsonPointers:fh["EA-QNT-0118"]}))}let k=(d?.input_quantization_convention?.details||[]).filter($=>$.status==="no_common_full_domain_match");if(k.length){let $=k.slice(0,4).map(ee=>{let ne=ee.closest_convention;return`Input ${ee.ordinal} ${ee.dtype} scale ${Number(ee.scale).toExponential(5)}, zp ${ee.zero_point}, exact full-code range [${ee.real_range.map(ge=>Number(ge).toExponential(5)).join(", ")}]; closest ${ne?.label||"none"} endpoint error ${ne?Number(ne.maximum_endpoint_error).toExponential(5):"N/A"}`}).join(" | ");s.push(Z({id:"EA-QNT-0119",category:"integration_verification",title:"Input quantization range does not match a common full-domain preprocessing convention",evidence:"DERIVED_WITH_REFERENCE_HEURISTIC",priority:"Medium",op:`${C(k.length)} quantized model input(s)`,observation:`${$}. The real ranges are exactly reconstructed from artifact scale/zero-point metadata; the convention comparison uses a one-quantization-step endpoint tolerance.`,interpretation:"This does not prove that calibration or application preprocessing is wrong: a custom asymmetric range can be intentional. It does prove that [0,1], [-1,1], [0,255], and applicable signed-code identity conventions cannot explain the full declared code domain within the disclosed tolerance.",recommendation:"Bind the production decoder-to-tensor preprocessing specification and checksum, state the intended real input domain explicitly, and replay representative tensors to confirm that application quantization uses the artifact scale and zero-point.",relevance:"input numerical contract; calibration lineage; deployment reproducibility"}))}let D=eH(e);if(D.length&&Number(e?.per_channel_tensors||0)===0){let $=D.map(ne=>`#${te(ne.op.index)} ${ne.op.name}`).join(", "),ee=[...new Set(D.map(ne=>ne.weight?.name||`T${ne.op.inputs?.[1]}`))].join(", ");s.push(Z({id:"EA-QNT-0101",category:"quantization_design_review",title:"Depthwise convolution weights use per-tensor quantization",evidence:"DERIVED",priority:"Medium",op:$,tensor:ee,observation:`${C(D.length)} quantized DEPTHWISE_CONV_2D op(s) use a single weight scale; per-channel tensors observed: ${C(e?.per_channel_tensors||0)}. Complete affected-op inventory: ${$}.`,interpretation:"Per-tensor depthwise weight quantization is a design-review signal for mobile CNNs because channel distributions are forced onto one shared scale; it is not a confirmed defect without representative accuracy or calibration evidence.",recommendation:"Prefer per-channel/per-axis weight quantization for depthwise kernels where the target runtime supports it. Escalate to High only when accuracy regression, calibration error, or a product requirement is present.",relevance:"quantization configuration; converter lineage"}))}let q=(d.bias_scale?.details||[]).filter($=>$.status==="fail"),L=(d.parameter_integrity?.details||[]).filter($=>$.status!=="pass");if(L.length){let $=L.filter(ne=>ne.status==="fail"),ee=$[0]||L[0];s.push(Z({id:"EA-QNT-0105",category:$.length?"integrity":"quantization",title:$.length?"ONNX quantization parameter contract is invalid":"ONNX quantization parameters could not be fully assessed",evidence:"DERIVED",priority:$.length?"High":"Medium",op:`#${te(ee.op_index)} ${ee.op_name}`,tensor:ee.tensor_name||"-",observation:`${C($.length)} invalid and ${C(L.length-$.length)} unresolved Q/DQ or QLinear parameter binding(s). Representative ${ee.role}: ${(ee.reasons||[ee.status]).join(", ")}.`,interpretation:$.length?"Embedded scale, zero-point, axis, dtype, or cardinality values violate the selected ONNX standard operator contract.":"The artifact references quantization parameters that are missing, external, unsupported, or not shape-resolvable in this browser-only input set.",recommendation:$.length?"Block release of this artifact until the ONNX quantization parameters are regenerated or independently corrected and output parity is verified.":"Supply the external initializer data or regenerate a self-contained artifact, then rerun the deterministic contract check.",relevance:"ONNX quantization numerical contract"}))}if(q.length){let $=q[0];s.push(Z({id:"EA-QNT-0102",category:"quantization",title:"Bias quantization scale does not match input-scale times weight-scale",evidence:"DERIVED",priority:"High",op:`#${te($.op_index)} ${$.op_name}`,tensor:`T${$.bias_tensor_index}`,observation:d.bias_scale.contract_kind==="onnx_implicit_qlinearconv_bias_scale"?`${C(q.length)} QLinearConv bias group(s) violate the INT32 dtype or output-channel cardinality contract. ${$.reasons?.join(", ")||"invalid signature"}.`:`${C(q.length)} bias tensor group(s) violate the TFLite bias-scale contract at relative tolerance ${d.bias_scale.relative_tolerance}; largest relative error ${nn($.maximum_relative_error)} (channel ${$.worst_channel?.channel}: actual=${Number($.worst_channel?.actual||0).toExponential(4)}, expected=${Number($.worst_channel?.expected||0).toExponential(4)}).`,interpretation:d.bias_scale.contract_kind==="onnx_implicit_qlinearconv_bias_scale"?"ONNX QLinearConv requires INT32 bias with one element per output channel; its real-value scale is implicitly x_scale times w_scale.":"For quantized TFLite conv/FC kernels, bias scale must match input_scale x weight_scale. A mismatch can silently change arithmetic meaning.",recommendation:d.bias_scale.contract_kind==="onnx_implicit_qlinearconv_bias_scale"?"Regenerate the QLinearConv node with an INT32 bias of exactly one element per output channel, then verify reference-output parity.":"Regenerate the artifact with a converter that preserves the TFLite bias quantization contract, or block release until runtime behavior is verified against reference outputs.",relevance:"quantization numerical contract"}))}let F=(d.residual_add?.details||[]).filter($=>$.status==="review").sort(($,ee)=>Number(ee.input_scale_ratio||0)-Number($.input_scale_ratio||0)||Number($.op_index||0)-Number(ee.op_index||0));if(F.length){let $=F[0];s.push(Z({id:"EA-QNT-0103",category:"quantization",title:"Residual ADD input scales require requantization review",evidence:"DERIVED",priority:$.input_scale_ratio>=8?"High":"Medium",op:`#${te($.op_index)} ADD`,observation:`${C(F.length)} ADD op(s) have input scale ratio >=${d.residual_add.review_threshold_ratio}. Largest ratio ${$.input_scale_ratio.toFixed(2)}x; input scales ${$.input_scales.map(ee=>ee.toExponential(4)).join(" / ")}; output scale ${$.output_scale==null?"none":$.output_scale.toExponential(4)}.${$.exhaustive_legal_code_pair_count==null?"":` Exhaustive legal-code geometry: ${C($.legal_domain_escape_pair_count)} / ${C($.exhaustive_legal_code_pair_count)} endpoint escapes; globally finest containment ${Number($.globally_finest_containment_scale_ratio).toFixed(3)}x scale with zero-point delta ${Number($.globally_finest_containment_zero_point_delta)>=0?"+":""}${$.globally_finest_containment_zero_point_delta} and ${C($.globally_finest_containment_clamp_pair_count)} projected clamps.`}`,interpretation:"Residual merges with widely different scales can force requantization and reduce precision on one branch. The containment design is exhaustive uniform legal-code geometry, not an observed activation or accuracy result.",recommendation:"Inspect QAT/calibration for the residual branch pair and compare representative outputs. Treat the emitted containment contract only as a re-export counterfactual; changing output quantization requires regenerating and validating downstream contracts rather than editing this tensor in isolation.",relevance:"quantized residual arithmetic"}))}let P=e?.quantization_lattice||null,X=new Map((P?.residual_adds||[]).map($=>[Number($.op_index),$])),j=(P?.domain_escape_ranking_op_indices||[]).map($=>X.get(Number($))).find($=>$?.assessment_status==="assessed"&&Number($.range_escape_pair_count||0)>0&&$.globally_finest_containment);if(j){let $=j.globally_finest_containment,ee=j.fixed_zero_point_containment,ne=(e?.contract_migration?.migrations||[]).find(ue=>Number(ue.source_add_op_index)===Number(j.op_index)),ge=ne?.scenarios?.find(ue=>ue.design==="globally_finest_minimum_containment"),le=ge?` Re-export impact is deterministically scoped to ${C(ne.direct_consumer_count)} direct parameter consumer(s): ${C(ge.assessed_kernel_channel_count)} kernel channel(s), ${C(ge.multiplier_encoding_changed_channel_count)} changed Q0.31 encoding(s), ${C(ge.multiplier_shift_changed_channel_count)} changed shift(s), ${C(ge.bias_code_changed_channel_count)} changed bias code(s), ${C(ge.bias_int32_overflow_channel_count)} candidate INT32 bias overflow(s), and ${C(ge.add_parameter_encoding_changed_count)} changed direct-ADD parameter encoding(s). Its structural behavior radius is ${C(ne.reachable_downstream_op_count)} reachable op(s) at maximum edge depth ${C(ne.maximum_downstream_edge_depth)}.`:" Direct-consumer parameter regeneration was not assessed.";s.push(Z({id:"EA-QNT-0108",category:"quantization_design_review",title:"Residual ADD output contract does not contain the complete legal code domain",evidence:"DERIVED",priority:"Informational",op:`#${te(j.op_index)} ADD`,tensor:Number.isInteger(j.output_tensor_index)?`T${j.output_tensor_index}`:"quantized ADD output",observation:`${C(P.range_escape_add_count)} / ${C(P.assessed_add_count)} assessed ADD output contract(s) exclude part of the uniform legal input-code sum domain. Top #${te(j.op_index)} has ${C(j.range_escape_pair_count)} / ${C(j.enumerated_code_pair_count)} endpoint escapes and ${C(j.rounded_projection_clamp_pair_count)} ideal projected clamps. Fixed-zero-point containment is ${ee?`${Number(ee.scale_ratio_to_current).toFixed(3)}x scale with ${C(ee.rounded_projection_clamp_pair_count)} clamps`:"unavailable"}; the globally finest full-containment contract is ${Number($.scale_ratio_to_current).toFixed(3)}x scale with zero-point delta ${Number($.signed_zero_point_delta)>=0?"+":""}${$.signed_zero_point_delta} and ${C($.rounded_projection_clamp_pair_count)} clamps.${le}`,interpretation:"The counterfactual is exhaustive over uniform legal integer-code pairs. It proves output-contract geometry, not activation frequency, calibration quality, task accuracy, or executed fixed-point behavior.",recommendation:"Use the containment frontier and Contract Migration Impact ledger to scope a calibration or QAT re-export experiment. Regenerate the listed direct-consumer Q0.31 parameters and INT32 bias constants, verify every channel ledger, then validate representative and adversarial outputs. Do not patch the output tensor alone; reachable downstream ops are a behavior-impact radius, not a claim that every one needs metadata replacement.",relevance:"residual output quantization contract design",methodVersion:P.method_version}))}let J=e?.residual_step_response,W=J?.retention_cost_ranking_op_indices?.[0],se=(J?.residual_adds||[]).find($=>$.op_index===W),Y=se?.contracts?.find($=>$.design==="current_artifact_contract"),U=se?.contracts?.find($=>$.design==="globally_finest_minimum_containment");se&&Y&&U&&s.push(Z({id:"EA-QNT-0109",category:"quantization_design_review",title:"Residual containment has an exact local step-visibility trade-off",evidence:"DERIVED",priority:"Informational",op:`#${te(se.op_index)} ADD`,tensor:Number.isInteger(se.output_tensor_index)?`T${se.output_tensor_index}`:"quantized ADD output",observation:`Across ${C(J.total_transition_count)} exhaustive adjacent branch transitions and ${C(J.total_joint_interior_cell_count)} joint interior cells, both containment candidates remove ${C(J.containment_removed_rounded_clamp_pair_count)} rounded clamp-pair instances in aggregate and add ${C(J.containment_additional_silent_transition_count)} silent transition instances versus their current contracts. Highest retention cost is #${te(se.op_index)}: current has ${C(Y.rounded_projection_clamp_pair_count)} clamp pairs and ${C(Y.silent_transition_count)} silent transitions; globally finest containment has ${C(U.rounded_projection_clamp_pair_count)} and ${C(U.silent_transition_count)}, respectively (${U.additional_silent_transitions_vs_current>=0?"+":""}${C(U.additional_silent_transitions_vs_current)} silent). Both-branch-visible interior cells change from ${C(Y.both_branches_visible_cell_count)} to ${C(U.both_branches_visible_cell_count)}.`,interpretation:"This is exact local distinguishability over uniformly enumerated legal integer codes. It is not an activation distribution, entropy or mutual-information estimate, runtime branch-activity measurement, calibration verdict, or task-accuracy result.",recommendation:"Use the Residual Step Response ledger alongside domain containment and Contract Migration Impact when designing a calibration or QAT re-export experiment. Compare clamp removal, branch-specific silent transitions, and joint influence fields, then validate representative and adversarial task outputs before selecting a contract.",relevance:"residual output-contract local code-step geometry",methodVersion:J.method_version}));let re=e?.residual_contract_distortion,H=re?.distortion_ranking_op_indices?.[0],fe=(re?.residual_adds||[]).find($=>$.op_index===H),Te=fe?.scenarios?.find($=>$.design==="globally_finest_minimum_containment");fe&&Te&&s.push(Z({id:"EA-QNT-0110",category:"quantization_design_review",title:"Clamp containment redistributes residual projection error across the legal code domain",evidence:"DERIVED",priority:"Informational",op:`#${te(fe.op_index)} ADD`,tensor:Number.isInteger(fe.output_tensor_index)?`T${fe.output_tensor_index}`:"quantized ADD output",observation:`Across ${C(re.total_enumerated_pair_count)} exact current-versus-containment pair comparisons, the candidates rescue ${C(re.rescued_current_clamp_pair_instance_count)} current rounded-clamp instances and retain ${C(re.candidate_clamped_pair_count)} candidate clamps. Ideal projection error decreases for ${C(re.ideal_error_improved_pair_count)} pairs, increases for ${C(re.ideal_error_worsened_pair_count)}, and is equal within the declared binary64 tolerance for ${C(re.ideal_error_equal_within_tolerance_pair_count)}; ${C(re.sign_class_changed_pair_count)} represented-value sign classes change. Highest RMS displacement is #${te(fe.op_index)}. Its globally finest candidate rescues ${C(Te.rescued_current_clamp_pair_count)} clamps, changes ${C(Te.changed_represented_value_pair_count)} represented values, improves / worsens ${C(Te.ideal_error_improved_pair_count)} / ${C(Te.ideal_error_worsened_pair_count)} pairs, and has RMS / p99 / maximum displacement ${Number(Te.root_mean_square_contract_delta_current_steps).toFixed(3)} / ${Number(Te.p99_absolute_contract_delta_current_steps).toFixed(3)} / ${Number(Te.maximum_absolute_contract_delta_current_steps).toFixed(3)} current output steps. Its uniform mean absolute ideal-projection error delta is ${Number(Te.signed_mean_absolute_ideal_error_delta).toExponential(4)} real units.`,interpretation:"The candidates remove rare, large clamp errors while introducing smaller rounding changes over many interior code pairs. Pair counts are uniform-domain geometry, not activation probabilities; neither the lower mean error nor the larger worsened-pair count establishes task quality.",recommendation:"Use the Distortion Atlas with the Step Response and Contract Migration ledgers to choose re-export experiments. Validate representative and adversarial task outputs, especially around sign-class changes and the reported worst pair witnesses, before selecting a containment contract.",relevance:"residual output-contract counterfactual distortion geometry",methodVersion:re.method_version}));let ve=e?.kernel_extremum_witness,gt=ve?.witness_ranking_op_indices?.[0],ut=(ve?.ops||[]).find($=>$.op_index===gt),Pt=ut?.worst_channel||ut?.top_channels?.[0];if(Number(ve?.build_mode_divergent_endpoint_count||0)>0&&ut&&Pt){let $=[Pt.minimum,Pt.maximum].find(ee=>Number(ee?.build_mode_output_delta_codes||0)!==0)||Pt.maximum;s.push(Z({id:"EA-QNT-0111",category:"quantization_design_review",title:"Pinned TFLite fixed-point build modes produce concrete endpoint code differences",evidence:"DERIVED",priority:"Informational",op:`#${te(ut.op_index)} ${ut.op_name}`,tensor:`${ut.output_tensor_name||`T${ut.output_tensor_index}`} channel ${Pt.channel_index}`,observation:`${C(ve.witness_assignment_count)} canonical legal-code term assignments and ${C(ve.fixed_point_endpoint_evaluation_count)} pinned fixed-point endpoint executions expose ${C(ve.build_mode_divergent_endpoint_count)} default-versus-TFLITE_SINGLE_ROUNDING output-code difference(s). Default versus direct ideal differs at ${C(ve.default_ideal_mismatch_endpoint_count)} endpoint(s); single-rounding versus direct ideal differs at ${C(ve.single_ideal_mismatch_endpoint_count)}. The maximum absolute deltas are ${C(ve.maximum_default_ideal_delta_codes||0)} and ${C(ve.maximum_single_ideal_delta_codes||0)} output code(s), respectively. Reproducible witness: #${te(ut.op_index)} channel ${Pt.channel_index} ${$.endpoint}; ideal/default/single output codes ${C($.ideal_output_code)} / ${C($.default_output_code)} / ${C($.single_output_code)}; pattern SHA-256 ${Pt.witness_pattern_sha256}.`,interpretation:"The artifact does not embed the runtime compile-time rounding mode. These are exact synthetic full-valid receptive-field endpoints under pinned TensorFlow source semantics, not an observed runtime mismatch, an activation frequency, a full-model input, or an accuracy estimate.",recommendation:"Bind the deployed runtime commit, binary hash, compile flags, and TFLITE_SINGLE_ROUNDING state to the release. Replay the exported Witness JSON against the target runtime and treat the observed target result as authoritative for that build.",relevance:"quantized kernel reproducibility and runtime-build provenance",methodVersion:ve.method_version}))}let bt=e?.channel_vitality,En=(bt?.vitality_ranking_op_indices||[]).map($=>(bt?.ops||[]).find(ee=>ee.op_index===$)).find($=>Number($?.nonconstant_accumulator_dual_mode_constant_channel_count||0)>0);if(Number(bt?.nonconstant_accumulator_dual_mode_constant_channel_count||0)>0&&En){let $=(En.top_channels||[]).filter(He=>BigInt(He.accumulator_span_decimal||"0")!==0n&&He.dual_mode_constant),ee=(En.top_channels||[]).filter(He=>He.mode_dependent_constant),ne=He=>He.length?He.map(st=>`ch ${st.channel_index}: post-bias ${st.post_bias_minimum_decimal}..${st.post_bias_maximum_decimal}, default preclamp ${st.default_minimum_preclamp_code}..${st.default_maximum_preclamp_code} -> output ${st.default_minimum_output_code}..${st.default_maximum_output_code} (${st.default_constant_reason}), single preclamp ${st.single_minimum_preclamp_code}..${st.single_maximum_preclamp_code} -> output ${st.single_minimum_output_code}..${st.single_maximum_output_code} (${st.single_constant_reason})`).join(" / "):"coordinates retained in the structured vitality ledger",ge=(Qe(e)||[]).find(He=>Number(He.index)===Number(En.op_index)),le=(bt.ops||[]).filter(He=>Number(He.dual_mode_constant_output_channel_count||0)>0),ue=le.map(He=>{let st=new Set(He.single_constant_channel_indices||[]),Re=(He.default_constant_channel_indices||[]).filter(de=>st.has(de));return`#${te(He.op_index)} ${He.op_name} [${Re.join(", ")||"indices unavailable"}]`}),xt=le.map(He=>`#${te(He.op_index)} ${He.op_name}`).join(", "),he=le.map(He=>{let st=(Qe(e)||[]).find(Re=>Number(Re.index)===Number(He.op_index));return Number.isInteger(Number(st?.outputs?.[0]))?`T${Number(st.outputs[0])}`:null}).filter(Boolean).join(", ");s.push(Z({id:"EA-QNT-0112",category:"quantization_design_review",title:"Legal input-code domain cannot activate quantized output channels",evidence:"DERIVED",priority:"High",op:xt||`#${te(En.op_index)} ${En.op_name}`,tensor:he||(Number.isInteger(Number(ge?.outputs?.[0]))?`T${Number(ge.outputs[0])}`:"quantized kernel output"),observation:`${C(bt.assessed_channel_count)} channels were joined to exact stored-weight post-bias endpoints and both pinned TFLite fixed-point paths. ${C(bt.dual_mode_constant_output_channel_count)} channel(s) are constant under both paths: ${C(bt.constant_accumulator_channel_count)} have a constant post-bias accumulator and ${C(bt.nonconstant_accumulator_dual_mode_constant_channel_count)} retain a variable accumulator yet collapse to one output code. Complete dual-mode constant-channel inventory: ${ue.join(" / ")}. Highest-ranked detailed coordinates at #${te(En.op_index)}: ${ne($)}. ${C(bt.mode_dependent_constant_output_channel_count)} channel(s) change constant classification with TFLITE_SINGLE_ROUNDING; ${ne(ee)}. Op vitality ledger SHA-256 ${En.vitality_ledger_sha256}.`,interpretation:"Equal endpoint outputs are an exact consequence of monotone positive-multiplier projection and clamp over the full-valid receptive-field legal-code domain. This is not observed runtime activation frequency, a full-model reachability claim, edge-padding behavior, delegate execution evidence, or a task-accuracy result.",recommendation:"Inspect the listed channels in the QAT or conversion graph, calibration ranges, bias, and activation contract. Re-export candidate artifacts, replay the selected channel proofs against the pinned runtime build, and compare representative plus adversarial task outputs before release.",relevance:"quantized channel vitality and fixed-point projection collapse",methodVersion:bt.method_version}))}let M=e?.rounding_equivalence,Le=(M?.equivalence_ranking_op_indices||[]).map($=>(M?.ops||[]).find(ee=>ee.op_index===$)).find($=>Number($?.divergent_channel_count||0)>0),tt=Le?.top_channels?.find($=>BigInt($.divergent_state_count_decimal||"0")>0n);if(Number(M?.divergent_channel_count||0)>0&&Le&&tt){let $=(Qe(e)||[]).find(ee=>Number(ee.index)===Number(Le.op_index));s.push(Z({id:"EA-QNT-0113",category:"quantization_design_review",title:"Pinned TFLite rounding build modes are not bit-exact over the accumulator interval hull",evidence:"DERIVED",priority:"Informational",op:`#${te(Le.op_index)} ${Le.op_name}`,tensor:Number.isInteger(Number($?.outputs?.[0]))?`T${Number($.outputs[0])} channel ${tt.channel_index}`:`quantized kernel output channel ${tt.channel_index}`,observation:`${C(M.assessed_channel_count)} channels and ${C(M.interval_state_count_decimal)} post-bias integer interval states were partitioned exactly into ${C(M.pair_segment_count)} maximal ordered-output-pair segments. ${C(M.divergent_channel_count)} channel(s) across ${C(M.divergent_op_count)} op(s) contain ${C(M.divergent_state_count_decimal)} default-versus-TFLITE_SINGLE_ROUNDING state difference(s) (${nn(M.divergent_state_ratio)} of the interval-hull portfolio); ${nn(Number(M.default_higher_state_count_decimal||0)/Math.max(1,Number(M.divergent_state_count_decimal||0)))} of divergent states are default-higher and ${nn(Number(M.default_lower_state_count_decimal||0)/Math.max(1,Number(M.divergent_state_count_decimal||0)))} are default-lower; maximum absolute delta ${C(M.maximum_absolute_output_delta)} output code. First ranked counterexample: #${te(Le.op_index)} channel ${tt.channel_index}, accumulator ${tt.first_divergent_accumulator_decimal}, default/single outputs ${tt.first_default_output_code}/${tt.first_single_output_code}; last counterexample ${tt.last_divergent_accumulator_decimal}; op certificate SHA-256 ${Le.equivalence_ledger_sha256}.`,interpretation:"This is an exact build-mode equivalence certificate over each closed post-bias int32 interval hull. Interior accumulator integers can be unreachable because legal dot products are discrete and correlated, so the state ratio is not an activation probability, observed mismatch rate, or accuracy estimate. The artifact does not embed the runtime compile-time rounding mode.",recommendation:"Bind the TensorFlow/LiteRT source commit, runtime binary hash, compile flags, and TFLITE_SINGLE_ROUNDING state to the release. Replay the exported first counterexample and representative full-model inputs on every target build when bit-exact reproducibility is required.",relevance:"quantized bit-exact reproducibility and runtime-build provenance",methodVersion:M.method_version}))}let ze=e?.accumulator_reachability,dn=(ze?.reachability_ranking_op_indices||[]).map($=>(ze?.ops||[]).find(ee=>ee.op_index===$)).find($=>BigInt($?.exact_reachable_divergent_state_count_decimal||"0")>0n),uo=dn?.top_channels?.find($=>BigInt($.exact_reachable_divergent_state_count_decimal||"0")>0n);if(BigInt(ze?.exact_reachable_divergent_state_count_decimal||"0")>0n&&dn&&uo){let $=(Qe(e)||[]).find(ee=>Number(ee.index)===Number(dn.op_index));s.push(Z({id:"EA-QNT-0115",category:"quantization_design_review",title:"Pinned rounding build modes differ at constructively reachable kernel-local accumulator states",evidence:"DERIVED",priority:"Informational",op:`#${te(dn.op_index)} ${dn.op_name}`,tensor:Number.isInteger(Number($?.outputs?.[0]))?`T${Number($.outputs[0])} channel ${uo.channel_index}`:`quantized kernel output channel ${uo.channel_index}`,observation:`${C(ze.assessed_channel_count)} channels were decomposed into bounded absolute-centered-weight denominations and intersected with the exact rounding pair partition. Of ${C(ze.interval_divergent_state_count_decimal)} interval-hull differences, ${C(ze.exact_reachable_divergent_state_count_decimal)} are constructively kernel-local reachable (${nn(ze.exact_reachable_divergent_ratio)}), ${C(ze.provably_unreachable_divergent_state_count_decimal)} are excluded by lattice residue, and ${C(ze.unresolved_divergent_state_count_decimal)} remain congruence-compatible but unproven. ${C(ze.complete_integer_interval_channel_count)} channel(s) have complete integer coverage, ${C(ze.complete_modular_lattice_channel_count)} complete modular coverage, ${C(ze.partial_band_channel_count)} endpoint-band proofs, and ${C(ze.singleton_channel_count)} singleton accumulators. Ranked exact counterexample: #${te(dn.op_index)} channel ${uo.channel_index}, accumulator ${uo.first_exact_reachable_divergent_accumulator_decimal}, default/single outputs ${uo.first_default_output_code}/${uo.first_single_output_code}; op reachability SHA-256 ${dn.reachability_ledger_sha256}.`,interpretation:"The counterexample is exact for a full-valid kernel-local receptive field under independently selectable legal quantized input codes. It is stronger than interval-only exposure, but it is not proof that upstream model activations or a real model input realize the local assignment, that padding sites are free, that a declared output changes, or that the state occurs at runtime.",recommendation:"Export the aggregate coefficient witness and realize it as a concrete local input-code assignment, then replay the pinned default and TFLITE_SINGLE_ROUNDING kernels. Follow with paired full-model tests on captured representative and adversarial inputs before assigning model-output or task-level impact.",relevance:"constructive quantized numerical ABI counterexamples and cross-build reproducibility",methodVersion:ze.method_version}))}let E=e?.numerical_abi_propagation,T=(E?.propagation_ranking_op_indices||[]).map($=>(E?.sources||[]).find(ee=>ee.op_index===$)).find($=>$?.local_reachability_status==="exact_local_counterexample"&&$.reachable_model_output_tensor_count>0);if(Number(E?.exact_output_reachable_source_op_count||0)>0&&T){let $=T.model_output_paths?.[0];s.push(Z({id:"EA-QNT-0114",category:"quantization_design_review",title:"Exact kernel-local fixed-point counterexample has a structural path to declared model outputs",evidence:"DERIVED",priority:"Informational",op:`#${te(T.op_index)} ${T.op_name}`,tensor:$?`T${$.output_tensor_index} ${$.output_tensor_name}`:"declared model output",observation:`${C(E.exact_local_counterexample_source_op_count)} of ${C(E.divergent_source_op_count)} divergent source op(s) contain at least one constructively reachable kernel-local counterexample and ${C(E.exact_output_reachable_source_op_count)} of those have structural corridors to declared outputs. The divergent-state partition is ${C(E.exact_local_divergent_state_count_decimal)} exact reachable, ${C(E.residue_excluded_divergent_state_count_decimal)} residue-excluded, and ${C(E.unresolved_divergent_state_count_decimal)} unresolved. Exact-qualified corridors span ${C(E.exact_unique_reachable_op_count)} ops, ${C(E.exact_unique_reachable_tensor_count)} tensors, and ${C(E.exact_unique_predicted_boundary_edge_count)} predicted execution-domain edge(s) carrying ${E.exact_unique_predicted_boundary_logical_payload_bytes==null?"an incompletely assessed payload":mn(E.exact_unique_predicted_boundary_logical_payload_bytes)}. Ranked source #${te(T.op_index)} has ${C(T.exact_reachable_divergent_state_count_decimal)} exact local difference(s) and reaches the output through ${C(T.exact_model_output_graph_route_count_decimal)} exact graph route(s); reachability SHA-256 ${T.source_reachability_ledger_sha256}; propagation SHA-256 ${T.propagation_ledger_sha256}.`,interpretation:"The source counterexample is exact for one full-valid kernel-local receptive field under independent legal input codes. Its downstream corridor is structural only: it does not prove that a full-model input realizes the local assignment or that cancellation, requantization, pooling, clamp, runtime lowering, and task semantics preserve a declared-output difference.",recommendation:"Bind the deployed runtime build and TFLITE_SINGLE_ROUNDING state, then run paired full-model output comparisons across those builds. Prioritize exported source corridors with high route multiplicity, residual reconvergence, and predicted execution-domain crossings; treat observed target outputs as authoritative.",relevance:"numerical ABI compatibility, output reproducibility, and cross-build validation planning",methodVersion:E.method_version}))}let it=e?.input_counterexample,De=it?.witnesses?.[0],tn=De?(it.sources||[]).find($=>$.op_index===De.source_op_index):null;Number(it?.tensor_abi_constructive_source_op_count||0)>0&&De&&tn&&s.push(Z({id:"EA-QNT-0116",category:"quantization_design_review",title:"Pinned rounding ABI has a complete model-input counterexample",evidence:"DERIVED",priority:"Medium",op:`#${te(De.source_op_index)} ${De.source_op_name}`,tensor:`T${De.model_input_tensor_index} ${De.model_input_tensor_name} -> T${De.source_output_tensor_index} channel ${De.source_channel_index}`,observation:`${C(it.tensor_abi_constructive_source_op_count)} of ${C(it.exact_local_source_op_count)} exact-local divergent source op(s) is constructively realizable by a complete declared model-input tensor. The representative ${De.model_input_shape.join("x")} ${De.model_input_dtype} tensor contains ${C(De.model_input_element_count)} elements, fills all positions with zero-point code ${De.full_tensor_fill_code}, and applies ${C(De.sparse_override_count)} unique overrides in a full-valid ${De.effective_patch_shape.join("x")} patch. Its exact dot ${C(De.dot_product_decimal)} plus bias ${C(De.bias_decimal)} reaches accumulator ${C(De.post_bias_accumulator_decimal)}, producing default/single-rounding output codes ${De.default_output_code}/${De.single_rounding_output_code}. The source has ${C(tn.exact_reachable_divergent_channel_count)} constructive channel(s), ${C(tn.exact_reachable_divergent_state_count_decimal)} exact divergent state(s), and ${C(tn.exact_model_output_graph_route_count_decimal||0)} structural declared-output route(s). Full tensor SHA-256 ${De.full_model_input_tensor_sha256}; witness ledger SHA-256 ${De.witness_ledger_sha256}.`,interpretation:"This is the action-bearing apex of the same rounding-build provenance chain documented by EA-QNT-0111, 0113, 0115, and 0114; those records remain Informational evidence stages rather than duplicate Medium actions. The certificate is exact at the quantized model tensor ABI, but it does not establish that an application's image or audio preprocessing can emit the tensor, that the deployed runtime selects either pinned rounding path, or that the one-code source difference survives to a declared model output or changes task behavior.",recommendation:"Bind one runtime-build action: replay the exported raw input tensor on clean, binary-hashed runtime builds with default and TFLITE_SINGLE_ROUNDING configurations and compare source-op and declared-output tensors bit-for-bit. Separately test whether the documented production preprocessing contract can realize or approximate the certified tensor; keep structural route multiplicity distinct from observed output impact.",relevance:"constructive model-input numerical ABI compatibility and cross-build release validation",methodVersion:it.method_version}));let qt=e?.preprocessing_realizability,Ga=(qt?.candidates||[]).filter($=>$.exact_tensor_realization),Gr=(qt?.candidates||[]).filter($=>$.status==="assessed"&&!$.exact_tensor_realization);if(Ga.length&&Gr.length&&De){let $=Gr.find(he=>he.contract_id===qt.best_non_exact_contract_id)||Gr[0],ee=[...Gr].sort((he,He)=>He.unrealizable_tensor_element_count-he.unrealizable_tensor_element_count)[0],ne=(qt.candidates||[]).find(he=>he.contract_id==="unit_interval_rgb"),ge=ne?` The [0,1] RGB convention reaches ${ne.channel_maps.map(he=>`${C(he.reachable_tensor_code_count)}/256`).join(", ")} tensor codes by channel and leaves ${ne.channel_maps.map(he=>C(he.tensor_code_hole_count)).join(", ")} code holes.`:"",le=(qt.candidates||[]).find(he=>he.contract_id==="center_128_div_128_rgb"),ue=(qt.candidates||[]).find(he=>he.contract_id==="minus_one_to_one_rgb"),xt=le&&ue?` Artifact range matching and witness realizability answer different questions: the declared affine range matches the common [-1,1] endpoint convention within one artifact step, while exact code reproduction is achieved by \`${le.pixel_to_real_formula}\`; the textbook \`${ue.pixel_to_real_formula}\` formula leaves ${C(ue.unrealizable_tensor_element_count)} witness element(s) one or more tensor codes away.`:"";s.push(Z({id:"EA-QNT-0117",category:"integration_verification",findingKind:"caution",title:"The exact ABI witness depends materially on the source preprocessing contract",evidence:"DERIVED",priority:"Medium",op:`#${te(De.source_op_index)} ${De.source_op_name}`,tensor:`T${De.model_input_tensor_index} ${De.model_input_tensor_name}`,observation:`${C(qt.candidate_evaluation_count)} explicit 8-bit image preprocessing counterfactual(s) were exhaustively evaluated over all 256 source codes per channel. ${C(qt.exact_tensor_realization_candidate_count)} contract(s) reproduce all ${C(De.model_input_element_count)} witness elements exactly: ${qt.exact_contract_ids.join(", ")}. ${C(qt.non_exact_candidate_count)} do not. Best non-exact ${$.contract_id} leaves ${C($.unrealizable_tensor_element_count)} element(s) unrealizable with minimum total absolute tensor-code error ${C($.minimum_total_absolute_tensor_code_error_decimal)}; ${ee.contract_id} leaves ${C(ee.unrealizable_tensor_element_count)} element(s) unrealizable.${ge}${xt} Exact fixture SHA-256 ${Ga[0].nearest_rgb_fixture_sha256}; portfolio SHA-256 ${qt.portfolio_ledger_sha256}.`,interpretation:"The finite-domain result is exact for each named formula, channel permutation, saturation rule, and half-away rounding equation. It does not reveal which preprocessing implementation the application deploys; the artifact does not bind decoder, resize, color order, normalization, or quantizer behavior. A candidate mismatch is not evidence that the production app is wrong unless its contract is independently matched to that row.",recommendation:"Bind the production preprocessing implementation and checksum to the release, match it to an explicit formula and channel order, then replay the corresponding exported PNG and raw tensor through the production decoder-to-tensor path. Compare the produced tensor SHA-256 before performing paired runtime-build output tests.",relevance:"source-data contract reproducibility, numerical ABI replay, and integration validation",methodVersion:qt.method_version}))}let ua=(d.weight_zero_point?.details||[]).filter($=>$.status==="fail"||$.status==="review");if(ua.length){let $=ua[0],ee=ua.filter(Re=>Re.asymmetric_uint8_observed).length,ne=ua.filter(Re=>Re.status==="fail").length,ge=ua.filter(Re=>Re.dtype==="INT8").length,le=$.status==="fail",ue=`${$.tensor_name||`T${$.tensor_index}`} ${$.dtype} zero-point(s) ${$.zero_points.join(", ")||"not emitted"}`,xt=/toco/i.test(String(e?.metadata_presence?.description||"")),he=Number(e?.metadata_presence?.conversion_metadata_entry_count||0)===0,He=(Qe(e)||[]).filter(Re=>Re.name==="DEPTHWISE_CONV_2D"&&String(Re.quant_scale_mode||"").toLowerCase().includes("per-tensor")).length,st=xt?` Root-cause synthesis: artifact description is ${JSON.stringify(e.metadata_presence.description)}; CONVERSION_METADATA is ${he?"absent":"present"}; ${C(ee)} asymmetric UINT8 kernel tensor(s), ${C(He)} per-tensor depthwise op(s), and ${C(e?.per_channel_tensors||0)} per-channel tensor(s) are observed; runtime floor is ${e?.runtime_compat?.effective_min_runtime_version||e?.runtime_compat?.derived_min_runtime_version||"not derived"}. These facts are jointly consistent with a legacy TOCO UINT8 export, while the exact converter binary/version remains unbound.`:"";s.push(Z({id:"EA-QNT-0104",category:le?"quantization":"quantization_design_review",title:le?"Weight zero-point metadata is invalid":"Asymmetric UINT8 weight quantization observed",evidence:le?"OBSERVED":"DERIVED",priority:le?"High":"Medium",op:"Conv/Depthwise/FC kernel",tensor:le?$.tensor_name||`T${$.tensor_index}`:`${C(ee)} UINT8 kernel tensor(s); representative ${$.tensor_name||`T${$.tensor_index}`}`,observation:le?ue:`Invalid zero-points: ${C(ne)}. Symmetric INT8 violations: ${ge?C(ua.filter(Re=>Re.symmetric_int8_violation).length):"not applicable, no INT8 weight tensors"}. Asymmetric UINT8 weight tensors observed: ${C(ee)}. Representative example: ${ue}.${st}`,interpretation:le?u?"Weight zero-point metadata is outside the legal ONNX quantized dtype contract. ONNX QLinear signed weights are not assumed symmetric.":"Weight zero-point metadata is outside the legal dtype contract or violates the symmetric INT8 weight expectation.":xt?"The artifact directly joins a TOCO description with UINT8 asymmetric/per-tensor quantization evidence. This is a source-artifact lineage diagnosis, not proof of the exact TOCO release, command line, calibration data, or training provenance.":"The artifact directly shows UINT8 weight dtype, non-zero zero-point metadata, and per-tensor asymmetric quantization. This pattern is commonly associated with older UINT8 conversion paths, but exact converter lineage is not embedded in the artifact.",recommendation:le?"Regenerate or repair the quantized artifact before release, then confirm outputs against reference data.":"Record converter lineage and compatibility reason; prefer modern per-channel symmetric INT8 exports when supported by the deployment runtime.",relevance:"quantization metadata integrity; converter lineage",findingClass:le?"":"conversion-lineage review"}))}let So=d.accumulator_bound;if(So?.bound_class==="exact_stored_weight_channel_integer_domain"&&Number(So.overflow_risk_channels||0)>0){let ee=(So.details||[]).filter(ge=>ge.status==="fail").sort((ge,le)=>Number(le.maximum_int32_ratio||0)-Number(ge.maximum_int32_ratio||0))[0]||{},ne=(ee.overflow_channel_indices||[]).slice(0,16);s.push(Z({id:"EA-QNT-0106",category:"integrity",title:"Exact stored-weight accumulator envelope exceeds INT32",evidence:"DERIVED",priority:"High",op:Number.isInteger(ee.op_index)?`#${te(ee.op_index)} ${ee.op_name||"quantized op"}`:"quantized Conv/Depthwise/FC",tensor:ee.weight_tensor_name||(Number.isInteger(ee.weight_tensor_index)?`T${ee.weight_tensor_index}`:"constant weight tensor"),observation:`${C(So.overflow_risk_channels)} output channel(s) across ${C(So.overflow_risk_ops)} op(s) exceed the signed INT32 interval under the exact stored-weight legal-code envelope. Maximum absolute envelope ${So.maximum_absolute_accumulator_decimal||"not emitted"}; required width ${So.maximum_required_signed_bits||"not emitted"} signed bits. Representative overflow channels: ${ne.length?ne.join(", "):"see structured evidence"}.`,interpretation:"For the pinned TFLite reference integer accumulation algebra, at least one legal full-field input-code assignment can exceed INT32 before or after stored bias. This is a deterministic arithmetic-domain defect signal, not an observed overflow frequency or a claim about a backend that may widen or transform accumulation.",recommendation:"Block release for an INT32 reference path. Re-export with safer input/weight scales or reduced fan-in, or bind observed runtime evidence proving a wider/saturating accumulation contract and verify representative plus adversarial output parity before accepting the artifact.",relevance:"quantized integer arithmetic integrity; runtime accumulator contract"}))}let _a=d.requantization_fidelity;if(_a?.bound_class==="pinned_q0_31_encoding_and_conservative_pre_clamp_rounding"&&(Number(_a.default_pre_shift_overflow_channels||0)>0||Number(_a.single_rounding_encoding_divergence_channels||0)>0)){let $=Number(_a.default_pre_shift_overflow_channels||0),ee=Number(_a.single_rounding_encoding_divergence_channels||0),ne=(_a.details||[]).filter(ge=>Number(ge.default_pre_shift_overflow_channels||0)>0||Number(ge.single_rounding_encoding_divergence_channels||0)>0).sort((ge,le)=>Number(le.default_pre_shift_overflow_channels||0)-Number(ge.default_pre_shift_overflow_channels||0)||Number(le.single_rounding_encoding_divergence_channels||0)-Number(ge.single_rounding_encoding_divergence_channels||0)||Number(ge.op_index||0)-Number(le.op_index||0))[0]||{};s.push(Z({id:"EA-QNT-0107",category:"quantization",title:$?"Pinned default requantization pre-shift exceeds INT32":"Requantization encoding depends on TFLITE_SINGLE_ROUNDING",evidence:"DERIVED",priority:$?"High":"Medium",op:Number.isInteger(ne.op_index)?`#${te(ne.op_index)} ${ne.op_name||"quantized op"}`:"quantized Conv/Depthwise/FC",tensor:Number.isInteger(ne.output_tensor_index)?`T${ne.output_tensor_index}`:"quantized output tensor",observation:`${C($)} channel(s) exceed the default double-rounding INT32 positive pre-shift contract; ${C(ee)} channel(s) receive a different saturated multiplier/shift under TFLITE_SINGLE_ROUNDING. Artifact shift range ${_a.shift_range?.join(" .. ")||"not emitted"}; maximum encoding drift ${Za(_a.maximum_encoding_drift_bound_codes||0)} output codes.`,interpretation:"The result is exact for the pinned source preparation rules, full intermediate accumulator envelope, and post-bias requantization domain, but the deployment artifact does not embed the TFLITE_SINGLE_ROUNDING compile flag or prove which backend executes the op.",recommendation:$?"Do not accept the default reference integer path without binding the runtime build flags and an observed execution assignment. Re-export scales or use a verified path that avoids the unsafe positive pre-shift, then compare output parity on adversarial inputs.":"Bind the runtime build manifest and record TFLITE_SINGLE_ROUNDING explicitly. Preserve the matching channel ledger in release evidence and verify output parity for the affected operators.",relevance:"quantized requantization integrity; runtime build reproducibility"}))}let Ni=u_(c.filter($=>$.quant_risk==="risk"||$.quant_risk==="warn"),$=>($.quant_scale_ratio_meaningful?Math.log10(Math.max(1,$.quant_scale_ratio||0)):0)+Number($.quant_scale_cv||0)*1.5+($.quant_zero_point_status==="out-of-range"?Math.abs($.quant_zero_point_offset||0)/32:0));if(Ni){let $=Ni.quant_scale_ratio_meaningful?`meaningful scale ratio ${Za(Ni.quant_scale_ratio||0)}`:"scale ratio not meaningful for this tensor contract";s.push(Z({id:"EA-QNT-0001",category:"quantization",title:"Quantization numerical contract review trigger",evidence:"DERIVED",priority:Ni.quant_risk==="risk"?"High":"Medium",op:`#${te(Ni.index)} ${Ni.name}`,tensor:"-",observation:`${$}, CV ${Number(Ni.quant_scale_cv||0).toFixed(2)}, zero-point status ${Ni.quant_zero_point_status||"none"}; emitted op predicate ${Ni.quant_risk||"review"}.`,interpretation:"Artifact metadata indicates a quantization contract requiring review. CV is descriptive and is not, by itself, the risk predicate or evidence of accumulated rounding error.",recommendation:"Inspect exact scale channels, stored centered codes, bias-scale consistency, and the source checkpoint. Select QAT or calibration changes only after representative output comparison identifies the corresponding mechanism.",relevance:"quantization verification support; software technical characterization"}))}let _o=(e?.fallback_traffic_by_op_family||[])[0];_o&&Number(_o.byte_percent||0)>=.01&&s.push(Z({id:"EA-DEL-0001",category:"delegate",title:"Predicted fallback tensor traffic concentration",evidence:"PREDICTED",priority:Number(_o.byte_percent||0)>=.06?"High":"Medium",observation:`${_o.name}: ${mn(_o.estimated_bytes||0)} (${nn(_o.byte_percent||0)})`,interpretation:"A small number of op families may dominate predicted fallback/copy traffic.",recommendation:"Confirm with target runtime delegate logs and op-level profiling; consider graph rewrite if confirmed.",relevance:"runtime compatibility; performance verification input"}));let{top:dc,totalUs:Qn}=WT(e,e?.target_profile||{},{limit:3}),Hi=dc.find($=>String($.op?.name||"").toUpperCase()==="DEQUANTIZE");if(Hi&&Qn>0){let $=Hi.estimate.totalUs/Qn,ee=dc.indexOf(Hi)+1;s.push(Z({id:"EA-QNT-0002",category:"quantization",title:"DEQUANTIZE op dominates static bottleneck estimate",evidence:"ESTIMATED",priority:ee===1?"High":"Medium",op:`#${te(Hi.op.index)} DEQUANTIZE`,observation:`Static bottleneck rank #${ee}: ${tb(Hi.estimate.totalUs)} / ${nn($)} of total static estimate`,interpretation:"An INT8 model with FLOAT32 output requires a full DEQUANTIZE pass over all output elements before the result is usable. For this target's memory bandwidth estimate, this copy dominates the graph's static bottleneck. This is not represented in the INT8 speedup estimate, which focuses on compute ops.",recommendation:"Set inference output type to INT8 in the TFLite converter to eliminate this pass, then dequantize externally if needed. Alternatively, keep FLOAT32 output and accept the overhead, but confirm with on-device profiling.",relevance:"quantization deployment architecture; runtime performance characterization"}))}let Ii=[...e?.delegation_repair?.runtime_build_risks||[]].sort(($,ee)=>Number(ee.affected_conditionally_delegatable_mac_ratio||0)-Number($.affected_conditionally_delegatable_mac_ratio||0))[0];if(Ii&&Number(Ii.affected_conditionally_delegatable_op_count||0)>0){let $=Number(Ii.absent_condition_remaining_conditionally_delegatable_op_count||0)===0;s.push(Z({id:"EA-DEL-0004",category:"delegate",title:$?"Required quantized XNNPACK build condition is not artifact-bound and conditional coverage collapses to zero":"Required quantized XNNPACK build condition is not artifact-bound",evidence:"PREDICTED",priority:$||Number(Ii.affected_conditionally_delegatable_mac_ratio||0)>=.5?"High":"Medium",op:`${C(Ii.affected_conditionally_delegatable_op_count)} conditionally delegatable op(s)`,observation:`\`${Ii.required_build_configuration}\` is required by the pinned rulepack but is not embedded in the model or bound runtime manifest. If the build condition is absent, conditionally delegatable coverage changes from ${C(Ii.baseline_conditionally_delegatable_op_count)} to ${C(Ii.absent_condition_remaining_conditionally_delegatable_op_count)} op(s), affecting ${nn(Ii.affected_conditionally_delegatable_mac_ratio)} of modeled MACs and ${C(Ii.affected_predicted_delegate_segment_count)} predicted delegate segment(s).`,interpretation:`${Ii.interpretation_boundary} For legacy QU8, the pinned source describes support as experimental; static artifact eligibility must not be read as observed runtime assignment.`,recommendation:"Bind the deployed TFLite/XNNPACK commit, binary SHA-256, build configuration, and delegate assignment trace. Treat the no-flag scenario as the release default until the required flag is proven in the runtime manifest.",relevance:"runtime build reproducibility; conditional delegate coverage",findingClass:"runtime-build configuration risk"}))}let da=Number(e?.xnnpack_effective_chain_breaks||0),Ki=lh(e),To=Ki?.edges||[];if(da||To.length){let $=c.filter(Re=>Re.xnnpack_chain_break),ee=$.filter(Re=>["RESHAPE","SQUEEZE","EXPAND_DIMS","SHAPE"].includes(String(Re.name||"").toUpperCase())),ne=Number.isFinite(Ki?.summed_edge_payload_bytes),ge=Number(ne?Ki.summed_edge_payload_bytes:Ki?.assessed_edge_payload_bytes||0),le=To.length?` Graph-derived ${ne?"summed logical edge payload":"assessed partial edge payload"} ${mn(ge)} across ${Bd(To.length,"predicted internal partition edge")}: ${To.slice(0,3).map(Re=>`T${Re.tensor_index} ${Re.tensor_name||"-"} ${Re.producer_domain}->${Re.consumer_domain} ${Re.payload_bytes==null?"payload not assessed":mn(Re.payload_bytes)}`).join(" / ")}.`:"",ue=$.length>0&&ee.length===$.length?" All listed break ops are shape-only candidates; runtime may alias or elide copies.":"",xt=[...new Set($.map(Re=>String(Re.name||"").toUpperCase()).filter(Boolean))],he=(e?.delegation_repair?.export_interventions||[]).find(Re=>Re.id==="se_global_pool_keepdims"),He=he?` The exact SE motif portfolio matches ${C(he.block_count)} block(s) and its fixed-graph assignment proxy changes delegate segments by ${C(he.signed_delegate_segment_count)}, boundary edges by ${C(he.signed_boundary_edge_count)}, and logical boundary payload by ${mn(Math.abs(Number(he.signed_boundary_payload_bytes||0)))}; excluded rank4 MEAN ${(he.unmatched_rank4_mean_op_indices||[]).map(Re=>`#${te(Re)}`).join(", ")||"none"}.`:"",st=he?"Re-export the matched squeeze-excitation reductions with keepdims=True, remove the paired rank-restoring EXPAND_DIMS nodes, then re-audit the transformed artifact and confirm assignment in the bound runtime.":ee.length===$.length?"Check delegate coverage logs on the target runtime before treating this as confirmed latency; profile before rewriting structural/view operators.":`Confirm the predicted ${xt.slice(0,3).join(", ")||"non-delegated op"} fallback using target-runtime delegate logs and profiling before modifying the graph, delegate configuration, or affected operator implementation.`;s.push(Z({id:"EA-DEL-0002",category:"delegate",title:"Predicted partition boundaries requiring runtime confirmation",evidence:"PREDICTED",priority:da>=4||To.length>=8?"High":"Medium",op:$.slice(0,3).map(Re=>`#${te(Re.index)} ${Re.name}`).join(", ")||"",observation:`${Bd(da,"non-structural predicted partition break")}; ${Bd(ee.length,"predicted non-delegated shape operation")}; ${Bd(To.length,"graph-derived internal execution-domain edge")}.${le}${ue}${He}`,interpretation:"Producer/consumer tensor edges and logical payloads are graph-derived from the static predicted assignment. The artifact alone cannot determine whether the runtime materializes copies, aliases buffers, converts layouts, or incurs measurable latency.",recommendation:st,relevance:"runtime compatibility; software architecture characterization"}))}let je=t?.runtimeAssignmentEvidence||t?.runtime_assignment||null,Un=je?.comparison||null,xp=Number(Un?.placement_assessment?.mismatch_count||0),tu=Number(Un?.boundary_comparison?.mismatch_count||0);if(xp||tu){let $=Un?.mac_comparison?.mismatch_mac_ratio,ee=(Un.mismatches||[]).slice(0,5);s.push(Z({id:"EA-DEL-0003",category:"delegate",title:"Observed runtime assignment differs from static delegation prediction",evidence:"DERIVED_FROM_OBSERVED_RUNTIME",priority:Number($||0)>=.1||tu>=4?"High":"Medium",op:ee.map(ne=>`#${te(ne.op_index)} ${ne.op_name}`).join(", "),observation:`${C(xp)} classified op placement mismatch(es): ${C(Un.placement_assessment?.overpredicted_delegation_count||0)} overpredicted and ${C(Un.placement_assessment?.underpredicted_delegation_count||0)} underpredicted; ${C(tu)} assessed graph-edge boundary mismatch(es); MAC-weighted mismatch ${$==null?"not assessed":nn($)}.${ee.length?` Top rows: ${ee.map(ne=>`#${te(ne.op_index)} ${ne.op_name} ${ne.classification}`).join(" / ")}.`:""}`,interpretation:"The pinned static rulepack does not reproduce the imported runtime/build assignment for this artifact and target-profile digest. Build flags, delegate version, operator lowering, dynamic preparation, or a stale rule may explain the difference; this is not by itself a model correctness defect.",recommendation:"Retain the runtime binary/build identity and verbose partition log, inspect each mismatch against the pinned delegate source, and update the target profile or rulepack only after the runtime-specific cause is established.",relevance:"runtime compatibility; delegation-rule validation; performance reproducibility"}))}let wt=je?.arena_reconciliation||null;if(wt){let $=wt.peak_delta_bytes,ee=Number(wt.runtime_only_allocation_count||0)>0||Number(wt.missing_observed_allocation_count||0)>0||Number(wt.size_mismatch_count||0)>0||Number(wt.alias_mismatch_count||0)>0,ne=Number(wt.offset_mismatch_count||0)>0;if(ee||ne||Number($||0)!==0){let ge=$==null?"not assessed":`${$>0?"+":$<0?"-":""}${mn(Math.abs($))}`;s.push(Z({id:"EA-MEM-0002",category:"memory_cache",title:"Observed TFLite arena allocation differs from the declared-shape projection",evidence:"DERIVED_FROM_OBSERVED_RUNTIME",priority:Number($||0)>0||ee?"Medium":"Informational",op:"ArenaPlanner post-commit allocation",observation:`Pinned runtime peak ${mn(wt.observed_peak_combined_arena_bytes)} versus declared-shape projection ${wt.projected_combined_arena_bytes==null?"not assessed":mn(wt.projected_combined_arena_bytes)}; peak delta ${ge}. Root allocations projected/observed ${C(wt.projected_root_allocation_count)}/${C(wt.observed_root_allocation_count)}; runtime-only ${C(wt.runtime_only_allocation_count)}, missing observed ${C(wt.missing_observed_allocation_count)}, size differences ${C(wt.size_mismatch_count)}, offset differences ${C(wt.offset_mismatch_count)}, alias differences ${C(wt.alias_mismatch_count)}. Prepare-time runtime temporaries ${C(wt.runtime_temporary_allocation_count)} totaling ${mn(wt.runtime_temporary_interval_bytes)} across allocation intervals.`,interpretation:"The difference is observed for this pinned runtime build and invocation. It is not automatically a defect: delegate replacement, Prepare-time tensor creation or resize, allocation-type changes, and execution-plan rewrites can legitimately change arena roots, sizes, aliases, and offsets.",recommendation:"Retain this allocation ledger with the runtime binary and invocation shapes; inspect runtime-only, missing, and size-different tensors against Prepare and delegation logs before changing model topology or capacity budgets. Account for delegate buffers, scratch, custom allocators, and process memory separately.",relevance:"runtime memory capacity; static-planner validation; deployment reproducibility"}))}}let Va=u_(c,$=>Number($.row_working_set_ratio||0));if(Number(Va?.row_working_set_ratio||0)>=.9){let $=Number(Va.row_working_set_bytes||0),ee=Number(e?.target_profile?.l1_data_bytes||0),ne=Number(e?.target_profile?.l2_bytes||0),ge=Number(Va.row_working_set_ratio||0),le=ne>0?$/ne:null,ue=ge>1;s.push(Z({id:"EA-MEM-0001",category:"memory_cache",title:"L1 row working-set pressure",evidence:"ESTIMATED",priority:ge>3?"High":"Medium",op:`#${te(Va.index)} ${Va.name}`,observation:`${mn($)} row working set / ${mn(ee)} L1D = ${ge.toFixed(2)}x; ${le==null?"L2 reference not emitted":`L2: ${mn($)} / ${mn(ne)} = ${le.toFixed(2)}x`}.`,interpretation:`Static row working-set estimate ${ue?"exceeds":"is within 10% of"} the selected target L1D reference. Code, other live data, associativity, and runtime scratch leave less usable capacity than the nominal cache size.`,recommendation:"Validate executed tiling and L1D refill/miss counters on the target; consider smaller spatial tiles, channel alignment, or graph changes only if this op is latency-dominant.",relevance:"computational resource characterization"}))}let nu=u_(c.filter($=>$.weight_packing_risk==="warn"),$=>Number($.weight_packing_overhead_us||0));if(nu){let $=c.filter(ne=>ne.weight_packing_risk==="warn").length,ee=Number(nu.weight_packing_overhead_us||0);s.push(Z({id:"EA-PKG-0001",category:"packing",title:"Weight packing warmup cost watchlist",evidence:"ESTIMATED",priority:"Informational",op:`#${te(nu.index)} ${nu.name}`,observation:`${Bd($,"op")} exceeded the static packing-watch threshold; largest estimate ${tb(ee)}. ${nu.weight_packing_detail||"No packing detail emitted."}`,interpretation:"Static weight-byte, setup, and target-bandwidth estimates indicate potential one-time interpreter preparation or first-invocation packing cost; this is not steady-state Invoke latency. Escalate only if the configured cold-start budget is tight.",recommendation:"Warm up before measuring steady-state latency, and report preparation/first-invocation packing separately from p50/p90 Invoke results.",relevance:"runtime performance characterization; benchmark protocol"}))}let Zi=u_(c.filter($=>$.channel_alignment_status==="misaligned"),$=>Number($.channel_tail_overhead_percent||0));if(Zi){let $=Number(Zi.channel_tail_overhead_percent_min??Zi.channel_tail_overhead_percent??0),ee=Number(Zi.channel_tail_overhead_percent_max??Zi.channel_tail_overhead_percent??0);s.push(Z({id:"EA-CHN-0001",category:"channel_alignment",title:"SIMD/micro-kernel channel tail overhead",evidence:"ESTIMATED",priority:Number(Zi.macs||0)/Math.max(1,Number(e?.total_macs||0))>=.05&&Number(Zi.channel_tail_overhead_percent||0)>=.25?"Medium":"Low",op:`#${te(Zi.index)} ${Zi.name}`,observation:`${nH(Zi.channel_alignment_detail||JT(Zi))} Modeled candidate-set lane utilization: ${Tp(1-ee,1-$)}; op MAC share ${(Number(Zi.macs||0)/Math.max(1,Number(e?.total_macs||0))*100).toFixed(1)}%; model-level impact not estimated.`,interpretation:"Actual overhead depends on runtime kernel selection, packing, and tail handling, and is not confirmed from the artifact alone.",recommendation:"Verify with a profiler or an aligned-head variant before acting; treat as an optimization opportunity, not a deployment defect.",relevance:"runtime performance verification input"}))}let qg=n?.backend_interpretations?.find($=>$.severity==="warn");qg&&s.push(Z({id:"EA-RUN-0002",category:"runtime",title:"Browser backend path mismatch",evidence:"MEASURED_SYNTHETIC",priority:"Medium",observation:`${qg.backend}: ${qg.note}`,interpretation:"Browser accelerator availability does not imply native delegate speed or numeric equivalence.",recommendation:"Use target runtime profiling for deployment claims and keep browser result as compatibility evidence.",relevance:"execution integrity; runtime compatibility"}));let k1=o?.drift_consistency?.warning;return k1&&s.push(Z({id:"EA-SYN-0001",category:"synthetic_sensitivity",title:"Synthetic perturbation plateau or saturation",evidence:"MEASURED_SYNTHETIC",priority:"Medium",observation:k1,interpretation:"Local synthetic perturbation does not show a monotonic amplitude response; this can happen with quantized plateaus.",recommendation:"Repeat with prepared/calibration inputs and compare output-specific drift before drawing robustness conclusions.",relevance:"numerical consistency; verification planning"})),s.push(Z({id:"EA-LIM-0001",category:"limitation",title:"Representative-data validation not assessable",evidence:"NOT_ASSESSABLE",priority:"Low",observation:"No training, validation, clinical, or representative calibration dataset is included in the deployment artifact.",interpretation:"Accuracy, clinical benefit, bias, subgroup performance, and generalizability cannot be concluded from this artifact alone.",recommendation:"Link this artifact report to external validation, calibration, and risk-management records.",relevance:"technical documentation boundary; regulatory limitation statement"})),s}function YV(e,t){return Number.isInteger(t)&&t>=0?(Xt(e)||[])[t]:null}function JV(e){return["INT8","UINT8"].includes(String(e?.dtype||"").toUpperCase())||Number(e?.quant_scales||0)>0}function eH(e){return(e?.format||"tflite")!=="tflite"?[]:(Qe(e)||[]).filter(t=>String(t.name||"").toUpperCase()==="DEPTHWISE_CONV_2D").map(t=>({op:t,weight:YV(e,Number(t.inputs?.[1]))})).filter(t=>JV(t.weight)&&Number(t.weight?.quant_scales||0)<=1)}function tH(e){let t=e?.scale_sample||[];return Number(t[0]||0)}function g5(e=[]){return Array.isArray(e)&&e.length?e.join("x"):"unknown-shape"}function Bd(e,t,n=`${t}s`){let i=Number(e||0);return`${C(i)} ${i===1?t:n}`}function nH(e){let t=String(e||"").trim();return t?/[.!?]$/.test(t)?t:`${t}.`:""}function iH(e={}){return e?.bundledRuntimeVersion||e?.litertRuntimeVersion||e?.tfliteRuntimeVersion||e?.runtimeVersion||""}function oH(e,t){let n=t?.dtype||"unknown",i=g5(t?.shape),o=tH(t),a=(t?.zero_point_sample||[])[0],r=["INT8","UINT8"].includes(String(n).toUpperCase())&&o>0?` Output dequantization contract: real_value = scale ${o} * (q - zero_point ${a??0}); implied representable range ${aH(n,o,a)}; include this in the application-side interpretation spec.`:"",s=Number.isInteger(t?.index)?t.index:Number(t?.tensor_index),c=Number.isFinite(s)?(Qe(e)||[]).find(u=>(u.outputs||[]).includes(s)):null;if(c){let u=String(c.name||"producer").toUpperCase();return u==="SOFTMAX"?`Output transform observed as SOFTMAX #${te(c.index)} producing ${n} ${i} output. Semantic class mapping, label order, and application-side output contract are not embedded.${r}`:`The graph output is produced by ${u} #${te(c.index)} as ${n} ${i}; no terminal SOFTMAX is observed, so probability semantics are NOT_ASSESSABLE from the artifact alone. No semantic label map, class ordering, or application-side output contract is embedded.${r}`}return`The artifact exposes ${n} ${i} output, but no semantic label map, class ordering, or application-side output contract is embedded.${r}`}function aH(e,t,n=0){let i=String(e||"").toUpperCase()==="INT8"?127:255,o=String(e||"").toUpperCase()==="INT8"?-128:0,a=Number(n||0),r=Number(t||0);return r>0?`[${(r*(o-a)).toExponential(4)}, ${(r*(i-a)).toExponential(4)}]`:"not computable"}function gh(e={},t={},n=0){let i=String(t.format||e.format||"unknown").toLowerCase(),o=(e.histogram||[]).filter(h=>/CUSTOM|FLEX|SELECT/i.test(h.name||"")),a=e.onnx_domain_analysis||null,r=a?[...a.external_custom_domains||[]]:[...new Set((Qe(e)||[]).map(h=>String(h.domain||"").trim()).filter(h=>h&&!["ai.onnx","ai.onnx.ml"].includes(h)))].sort(),s=Number(e.onnx_external_data_tensor_count||0),c=e.onnx_external_data||{},u=Number(c.verified_payload_count||0),l=Number(c.payload_verification_failed_count||0),_=Math.max(0,s-u),p=sH(e.opsets),d=rH(e,i,p),m=i==="onnx"?r.length?`external custom registry domains ${r.join(" / ")}`:`no external custom registry domain; ${a?.model_local_function_call_count||0} model-local function call(s); ${a?.ort_contrib_node_count||0} ORT contrib node(s)`:"external domains not applicable",f=i==="onnx"?s?`${s} ONNX external-data tensor(s): ${u} verified, ${l} failed verification, ${_} incomplete; ${Number(c.verified_payload_bytes||0)} verified payload byte(s)`:"no ONNX external-data tensor detected":"external data not applicable",g=cH(e,e.file_size||n||0,i);return{format:i,sha256:t.sha256||e.model_sha256||"pending-browser-export",file_size_bytes:e.file_size||n||0,schema_or_opset:d,tflite_version:e.version||"",onnx_ir_version:e.onnx_ir_version||0,onnx_producer:e.producer||"",onnx_opsets:p,graph_name:e.graph_name||"",subgraph_count:e.subgraph_count||1,custom_like_ops:o,external_domains:r,onnx_domain_analysis_status:a?.status||(i==="onnx"?"not_assessed":"not_applicable"),external_data_tensor_count:s,external_data_verified_tensor_count:u,external_data_verification_failed_count:l,external_data_incomplete_tensor_count:_,external_data_integrity_status:s===0||_===0?"complete":l>0?"verification_failed":"incomplete",external_data_summary:f,...g,summary:[d,o.length?`custom-like ${o.map(h=>`${h.name}:${h.count}`).join(" / ")}`:"no custom-like op family",m,f,g.tflite_buffer_summary].join("; ")}}function rH(e,t,n){return t==="onnx"?`IR ${e.onnx_ir_version||"unknown"} / opset ${n||"unknown"}`:t==="tflite"?`TFLite schema ${e.version||"unknown"}`:t==="gguf"?`GGUF v${e.gguf?.version||"unknown"}`:t==="safetensors"?"SafeTensors format (unversioned)":t==="coreml"?`Core ML specification ${e.coreml?.specification_version||"unknown"}`:t==="executorch"?`ExecuTorch ${String(e.executorch_container||"artifact").toUpperCase()} schema ${e.version??"unknown"}`:t==="unknown"?"Unknown artifact format":`${t} format; version not declared`}function sH(e=[]){return(e||[]).map(t=>`${t.domain||"ai.onnx"}:${t.version||"unknown"}`).join(" / ")}function cH(e={},t=0,n="unknown"){let i={tflite_constant_tensor_count:0,tflite_unique_constant_regions:0,tflite_constant_buffer_bytes:0,tflite_largest_constant_buffer_bytes:0,tflite_duplicate_constant_regions:0,tflite_out_of_bounds_tensor_buffers:0,tflite_buffer_summary:"TFLite tensor buffer posture not applicable"};if(n!=="tflite")return i;let o=(Xt(e)||[]).filter(p=>Number(p.buffer_data_length||0)>0),a=new Map,r=0;for(let p of o){let d=Number(p.buffer_data_offset||0),m=Number(p.buffer_data_length||0),f=`${d}:${m}`;a.set(f,(a.get(f)||0)+1),t&&d+m>t&&(r+=1)}let s=0,c=0,u=0;for(let[p,d]of a.entries()){let m=Number(p.split(":")[1]||0);s+=m,c=Math.max(c,m),d>1&&(u+=d-1)}let l=r?`${r} tensor constant buffer reference(s) exceed artifact byte length`:"all tensor constant buffers fit within artifact bytes",_=u?`${u} duplicate/shared non-empty tensor buffer region reference(s)`:"no duplicate non-empty tensor buffer regions";return{tflite_constant_tensor_count:o.length,tflite_unique_constant_regions:a.size,tflite_constant_buffer_bytes:s,tflite_largest_constant_buffer_bytes:c,tflite_duplicate_constant_regions:u,tflite_out_of_bounds_tensor_buffers:r,tflite_buffer_summary:`${o.length} tensor constant buffer(s), ${a.size} unique region(s), ${l}, ${_}`}}Ce();Me();Ce();Me();Ce();var y5="deepbom.artifact_set.v1",r0=/^[a-f0-9]{64}$/;function s0({filename:e,format:t,sha256:n,byteLength:i}){let o=Number(i);return c0({schema:y5,evidence_class:"OBSERVED_ACQUISITION",source:{kind:"local",canonical_locator:`local:${e}`,immutability:{kind:"sha256",value:n}},subject:{filename:e,format:t,sha256:n,byte_length:{decimal:String(o),number:o},identity_basis:"artifact_file_bytes"},files:[{role:"primary",path:e,sha256:n,byte_length:{decimal:String(o),number:o}}],trust:{remote_code_execution:"forbidden",pickle_execution:"forbidden",model_code_execution:"forbidden"}})}function c0(e){let t=w5(e);return delete t.artifact_set_sha256,v5(t),Object.freeze({...t,artifact_set_sha256:K(Q(t))})}function A5(e){let t=w5(e),n=String(t.artifact_set_sha256||"").toLowerCase();if(delete t.artifact_set_sha256,v5(t),!r0.test(n)||K(Q(t))!==n)throw new Error("Artifact-set SHA-256 is invalid.");return Object.freeze({...t,artifact_set_sha256:n})}function v5(e){if(e?.schema!==y5||e.evidence_class!=="OBSERVED_ACQUISITION")throw new Error("Artifact-set identity is invalid.");let t=e.source;if(!t||!["local","huggingface","https","gcs"].includes(t.kind)||!El(t.canonical_locator,2048)||!El(t.immutability?.kind,80)||!El(t.immutability?.value,256))throw new Error("Artifact-set source binding is invalid.");if(!Array.isArray(e.files)||!e.files.length||e.files.length>2e4)throw new Error("Artifact-set file inventory is invalid.");if(e.subject!=null){if(!El(e.subject.filename,1024)||!El(e.subject.format,80)||!r0.test(String(e.subject.sha256||""))||!El(e.subject.identity_basis,120))throw new Error("Artifact-set subject identity is invalid.");b5(e.subject.byte_length)}let n=new Set;for(let i of e.files){if(!["primary","sidecar","shard","manifest","configuration"].includes(i.role)||!lH(i.path)||n.has(i.path)||!r0.test(String(i.sha256||"")))throw new Error("Artifact-set file identity is invalid.");b5(i.byte_length),n.add(i.path)}if(e.files.filter(i=>i.role==="primary").length!==1)throw new Error("Artifact-set requires exactly one primary file.");if(e.trust?.model_code_execution!=="forbidden"||e.trust?.pickle_execution!=="forbidden"||e.trust?.remote_code_execution!=="forbidden")throw new Error("Artifact-set code-execution boundary is invalid.")}function b5(e){let t=String(e?.decimal||"");if(!/^\d+$/.test(t)||BigInt(t)<0n)throw new Error("Artifact-set byte length is invalid.");let n=BigInt(t),i=n<=BigInt(Number.MAX_SAFE_INTEGER)?Number(n):null;if((e.number==null?null:Number(e.number))!==i)throw new Error("Artifact-set byte length representations differ.")}function lH(e){let t=String(e||"").replaceAll("\\","/");return t.length>0&&t.length<=1024&&!t.startsWith("/")&&!/^[A-Za-z]:/.test(t)&&t.split("/").every(n=>n&&n!=="."&&n!=="..")}function El(e,t){let n=String(e||"").trim();return n.length>0&&n.length<=t}function w5(e){return JSON.parse(JSON.stringify(e))}Me();Ce();Me();Ce();var yh="deepbom.accelerator_profile.v1",Dd=/^[a-f0-9]{64}$/,uH=/^\d+\.\d+$/;function x5(e){let t=I5(e);return delete t.profile_sha256,N5(t),Object.freeze({...t,profile_sha256:K(Q(t))})}function E5(e){if(!e||e.schema!==yh)throw new Error("NVIDIA accelerator profile schema is invalid.");let t=I5(e),n=String(t.profile_sha256||"").toLowerCase();if(delete t.profile_sha256,N5(t),!Dd.test(n)||n!==K(Q(t)))throw new Error("NVIDIA accelerator profile SHA-256 is invalid.");return Object.freeze({...t,profile_sha256:n})}function N5(e){if(e.schema!==yh||e.evidence_class!=="OBSERVED_HOST_TOOLING")throw new Error("NVIDIA accelerator profile identity is invalid.");if(!Number.isFinite(Date.parse(e.collection?.collected_at))||!so(e.collection?.platform,80)||!so(e.collection?.architecture,80)||!so(e.collection?.collector,120)||!so(e.collection?.collector_version,80))throw new Error("NVIDIA accelerator profile collection identity is invalid.");if(!Array.isArray(e.devices)||!e.devices.length||e.devices.length>64)throw new Error("NVIDIA accelerator device inventory is invalid.");let t=new Set;for(let o of e.devices){if(!Number.isSafeInteger(o.index)||o.index<0||t.has(o.index)||!so(o.name,300)||!uH.test(String(o.compute_capability||""))||!so(o.driver_version,80)||!Dd.test(String(o.uuid_sha256||""))||!Dd.test(String(o.pci_bus_id_sha256||"")))throw new Error("NVIDIA accelerator device identity is invalid.");t.add(o.index),_H(o.memory_total_bytes,"device memory");for(let[a,r,s]of[["maximum SM clock",o.maximum_sm_clock_mhz,"maximum_sm_clock_mhz"],["maximum memory clock",o.maximum_memory_clock_mhz,"maximum_memory_clock_mhz"]]){if(r!=null&&(!Number.isSafeInteger(r)||r<=0))throw new Error(`NVIDIA accelerator ${a} is invalid.`);if(r==null&&!o.unexposed_fields?.includes(s))throw new Error(`NVIDIA accelerator ${a} absence is not declared.`)}if(o.uuid!=null&&!so(o.uuid,160))throw new Error("NVIDIA accelerator raw UUID is invalid.");if(o.pci_bus_id!=null&&!so(o.pci_bus_id,80))throw new Error("NVIDIA accelerator raw PCI bus ID is invalid.");if(o.sm_count!=null||o.memory_bus_width_bits!=null)throw new Error("NVIDIA accelerator profile must not infer fields not exposed by the collector contract.")}if(JSON.stringify([...e.devices].sort((o,a)=>o.index-a.index))!==JSON.stringify(e.devices))throw new Error("NVIDIA accelerator devices must be sorted by index.");if(bh(e.software?.nvidia_driver,"NVIDIA driver",!0),bh(e.software?.cuda_driver_api,"CUDA driver API",!1),bh(e.software?.cuda_toolkit,"CUDA toolkit",!1),bh(e.software?.tensorrt,"TensorRT",!1),e.devices.some(o=>o.driver_version!==e.software.nvidia_driver.version))throw new Error("NVIDIA accelerator device and software driver versions differ.");let n=e.collection?.tools;if(!Array.isArray(n)||!n.length||n.length>16||!n.some(o=>o.role==="nvidia_smi"&&o.status==="observed"))throw new Error("NVIDIA accelerator collector tool inventory is invalid.");for(let o of n){if(!so(o.role,80)||!["observed","execution_failed","not_installed"].includes(o.status))throw new Error("NVIDIA accelerator tool status is invalid.");if(o.status==="observed"||o.status==="execution_failed"){if(!so(o.executable_name,200)||!Dd.test(String(o.executable_sha256||""))||!Dd.test(String(o.observation_sha256||"")))throw new Error("NVIDIA accelerator observed tool identity is invalid.")}else if(o.executable_name!=null||o.executable_sha256!=null||o.observation_sha256!=null)throw new Error("NVIDIA accelerator absent tool must not carry invented identity.")}let i=e.roofline_contract;if(i?.status!=="not_assessable_missing_exact_hardware_contract"||i.theoretical_compute_ceiling!=null||i.theoretical_memory_bandwidth!=null||!Array.isArray(i.missing_fields)||!i.missing_fields.includes("sm_count")||!i.missing_fields.includes("memory_bus_width_bits"))throw new Error("NVIDIA accelerator roofline boundary is invalid.");if(!so(e.interpretation_boundary,1200))throw new Error("NVIDIA accelerator profile interpretation boundary is invalid.")}function bh(e,t,n){if(!e||!["observed","not_installed","not_exposed"].includes(e.status))throw new Error(`${t} status is invalid.`);if(n&&e.status!=="observed")throw new Error(`${t} must be observed.`);if(e.status==="observed"&&!so(e.version,120))throw new Error(`${t} version is invalid.`);if(e.status!=="observed"&&e.version!=null)throw new Error(`${t} absent status must not carry a version.`)}function _H(e,t){let n=String(e?.decimal||"");if(!/^\d+$/.test(n)||BigInt(n)<=0n)throw new Error(`NVIDIA accelerator ${t} exact value is invalid.`);let i=BigInt(n),o=i<=BigInt(Number.MAX_SAFE_INTEGER)?Number(i):null;if((e.number==null?null:Number(e.number))!==o)throw new Error(`NVIDIA accelerator ${t} number does not match its exact decimal value.`)}function so(e,t){let n=String(e||"").trim();return n&&n.length<=t}function I5(e){return JSON.parse(JSON.stringify(e))}var C5="deepbom.accelerator_profile_binding.v1",dH=/^[a-f0-9]{64}$/;function k5(e,t,{deviceIndex:n=null}={}){if(!Ah(t?.sha256))throw new Error("NVIDIA accelerator profile sidecar SHA-256 is required.");let i=E5(t?.document),o=pH(i.devices,n),a={schema:C5,status:"observed_host_profile_bound_selected_build_unbound",evidence_class:"OBSERVED_HOST_TOOLING/DERIVED_CONDITIONAL_CAPACITY",source:t?.path||null,source_sha256:t.sha256,profile_sha256:i.profile_sha256,selected_device:{index:o.index,name:o.name,compute_capability:o.compute_capability,driver_version:o.driver_version,memory_total_bytes:T5(o.memory_total_bytes),uuid_sha256:o.uuid_sha256,pci_bus_id_sha256:o.pci_bus_id_sha256},software:i.software,selected_build:{status:"not_bound",evidence_class:"NOT_ASSESSABLE",required_evidence:["runtime_binary_and_library_hashes","compiled_provider_or_backend_registry","precision_and_builder_flags"]},roofline:i.roofline_contract,llm_accelerator_residency:mH(e,o.memory_total_bytes),interpretation_boundary:"This binding proves the selected host-observed NVIDIA device, driver-facing software inventory, and exact physical VRAM reported by the collector. It does not prove that a CUDA, TensorRT, ORT, or other backend was compiled into the selected application; it does not prove provider assignment, engine selection, runtime allocation, latency, throughput, or fit. LLM capacity rows compare static serialized-storage plus logical-state lower bounds with physical VRAM under their stated simultaneous-residency assumption only."};return Object.freeze({...a,binding_sha256:K(Q(a))})}function S5(e){let t=JSON.parse(JSON.stringify(e||null)),n=String(t?.binding_sha256||"").toLowerCase();if(t&&delete t.binding_sha256,!t||t.schema!==C5||t.status!=="observed_host_profile_bound_selected_build_unbound"||!Ah(t.profile_sha256)||!Ah(t.source_sha256)||t.selected_build?.status!=="not_bound"||t.selected_build?.evidence_class!=="NOT_ASSESSABLE"||t.selected_device?.uuid!=null||t.selected_device?.pci_bus_id!=null)throw new Error("NVIDIA accelerator profile binding structure is invalid.");T5(t.selected_device?.memory_total_bytes);for(let i of t.llm_accelerator_residency?.scenarios||[])if(i.fit_claim!=="not_emitted"||!String(i.status||"").includes("lower_bound"))throw new Error("NVIDIA accelerator LLM residency claim boundary is invalid.");if(!Ah(n)||n!==K(Q(t)))throw new Error("NVIDIA accelerator profile binding SHA-256 is invalid.");return Object.freeze({...t,binding_sha256:n})}function pH(e,t){if(t==null){if(e.length!==1)throw new Error("The accelerator profile contains multiple devices; --accelerator-device is required.");return e[0]}let n=e.find(i=>i.index===t);if(!n)throw new Error(`NVIDIA accelerator device index ${t} is not present in the profile.`);return n}function mH(e,t){let n=e?.on_device_llm;if(!n)return{status:"not_applicable_non_llm_artifact",evidence_class:"NOT_APPLICABLE",scenarios:[],fit_claim:"not_emitted"};let i=za(t),o=n.memory_feasibility,a=[],r=e?.llm_token_budget_scenario||e?.cli_context_scenario;za(r?.memory_feasibility?.static_lower_bound_bytes)!=null&&za(r?.memory_feasibility?.logical_state_bytes||r?.memory_feasibility?.logical_kv_state_bytes)!=null&&a.push({scenario_source:"cli_declared",state_kind:r?.state_projection?.state_kind||"transformer_kv",context_length:r.context_length,batch_size:r.batch_size,storage_bits:r.state_storage_bits,logical_state_bytes:r.memory_feasibility.logical_state_bytes||r.memory_feasibility.logical_kv_state_bytes,static_lower_bound_bytes:r.memory_feasibility.static_lower_bound_bytes});for(let l of Array.isArray(o?.static_scenarios)?o.static_scenarios:[])a.push({scenario_source:"artifact_registered_matrix",...l});if(i==null||!a.length)return{status:"not_assessable_static_lower_bound_unavailable",evidence_class:"NOT_ASSESSABLE",scenarios:[],fit_claim:"not_emitted"};let s=n.storage?.layer_storage,c=s?.status==="assessed_exact_serialized_layer_storage"&&s?.conservation?.status==="pass"&&Array.isArray(s.layers)&&s.layers.every((l,_)=>l.layer_index===_&&za(l.serialized_bytes)!=null),u=a.map(l=>{let _=za(l.static_lower_bound_bytes);if(_==null)return null;let p=_>i,d={scenario_source:l.scenario_source,state_kind:l.state_kind,context_length:l.context_length,batch_size:l.batch_size,storage_bits:l.storage_bits,physical_vram_bytes:Ls(i),simultaneous_all_accelerator_lower_bound_bytes:Ls(_),status:p?"simultaneous_residency_lower_bound_exceeds_physical_vram":"simultaneous_residency_lower_bound_at_or_below_physical_vram_fit_unresolved",deficit_bytes:p?Ls(_-i):null,headroom_after_lower_bound_bytes:p?null:Ls(i-_),fit_claim:"not_emitted"};return c&&(d.serialized_layer_offload=fH(s,l.logical_state_bytes,i)),d}).filter(Boolean);return{status:u.some(l=>l.status==="simultaneous_residency_lower_bound_exceeds_physical_vram")?"assessed_with_insufficient_scenarios":"assessed_lower_bounds_do_not_prove_fit",evidence_class:"OBSERVED_SERIALIZED_STORAGE/OBSERVED_HOST_VRAM/DERIVED_CONDITIONAL_SCENARIO",capacity_scope:"selected_nvidia_device_physical_vram",residency_assumption:o?.residency_assumption||null,scenarios:u,fit_claim:"not_emitted",boundary:"A row exceeding physical VRAM proves that the stated simultaneous all-accelerator lower-bound scenario is insufficient. A row at or below VRAM does not prove fit. Serialized layer offload rows count serialized bytes only and exclude backend repacking, workspace, allocator overhead, replicas, application allocations, and runtime placement."}}function fH(e,t,n){let i=za(t),o=za(e.non_layer_bytes);if(i==null||o==null)return null;let a=[...e.layers].sort((u,l)=>l.layer_index-u.layer_index),r=i+o,s=0,c=[];if(r<=n)for(let u of a){let l=za(u.serialized_bytes);if(l==null||r+l>n)break;r+=l,s+=1,c.push(u.layer_index)}return{policy:"highest_index_first_serialized_bytes",non_layer_and_state_lower_bound_bytes:Ls(i+o),maximum_layer_count_not_exceeding_physical_vram_lower_bound:s,selected_layer_indices:c.sort((u,l)=>u-l),accounted_accelerator_lower_bound_bytes:Ls(r),status:i+o>n?"non_layer_and_state_lower_bound_exceeds_physical_vram":"serialized_lower_bound_not_exceeding_physical_vram_fit_unresolved",fit_claim:"not_emitted"}}function za(e){return e&&typeof e=="object"&&/^(?:0|[1-9]\d*)$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^(?:0|[1-9]\d*)$/.test(e)?BigInt(e):typeof e=="bigint"&&e>=0n?e:Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function T5(e){let t=za(e);if(t==null)throw new Error("NVIDIA accelerator memory value is invalid.");return Ls(t)}function Ls(e){return{decimal:String(e),number:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}}function Ah(e){return typeof e=="string"&&dH.test(e)}Me();Ce();var hH="deepbom.accelerator_binding.v1",wh=Object.freeze(["serialized_artifact","source_eligibility","selected_build","compiled_plan","observed_assignment","measured_execution"]),gH=/^[a-f0-9]{64}$/,bH=new Set(["apple","google","nvidia","qualcomm","android","onnxruntime","tensorflow"]),yH=new Set(["gpu","npu","tpu","heterogeneous_accelerator"]),AH=new Set(["source_rulepack","selected_build_attestation","compiled_plan_import","runtime_evidence_import","observed_host_profile"]);function ta(e){let t=B5(e);return Object.freeze({...t,binding_sha256:K(Q(t))})}function l0(e){let t=JSON.parse(JSON.stringify(e||null)),n=String(t?.binding_sha256||"").toLowerCase();t&&delete t.binding_sha256;let i=B5(t);if(!Ai(n)||n!==K(Q(i)))throw new Error("Accelerator binding SHA-256 is invalid.");return Object.freeze({...i,binding_sha256:n})}function u0(e,t){if(t?.schema!=="deepbom.coreml_compute_plan.v1"||t?.artifact?.sha256!==e?.model_sha256||!Ai(t?.normalized_manifest_sha256))throw new Error("Core ML accelerator binding requires an identity-bound normalized MLComputePlan.");return ta({profile_id:`apple_coreml_${String(t.configuration?.compute_units||"all").toLowerCase()}`,provider:"apple",backend:"coreml",device_class:"heterogeneous_accelerator",binding_source:"compiled_plan_import",evidence_stage:"compiled_plan",artifact_sha256:e.model_sha256,source_rulepack_sha256:t.runtime?.coremltools_compute_plan_source_sha256||null,selected_build_sha256:null,compiled_plan_sha256:t.normalized_manifest_sha256,runtime_trace_sha256:null,configuration:{compute_units:t.configuration?.compute_units||null,function_name:t.configuration?.function_name||null,compiled_model_content_sha256:t.runtime?.compiled_model_content_sha256||null,macos_version:t.runtime?.macos_version||null,os_build:t.runtime?.os_build||null,hardware_model:t.runtime?.hardware_model||null},coverage:{assessed_operation_count:t.summary?.mapped_operation_count??null,preferred_compute_device_counts:t.summary?.preferred_compute_device_counts||{},unresolved_operation_count:t.summary?.unresolved_device_usage_count??null},claims:No("compiled_plan"),interpretation_boundary:"This binding records MLComputePlan anticipated device usage for one compiled Core ML model and compute-unit configuration. It does not establish executed CPU, GPU, or Neural Engine assignment, physical transfer, latency, or task correctness."})}function _0(e,t){if(t?.schema!=="deepbom.accelerator_profile_binding.v1"||!Ai(t?.binding_sha256)||!Ai(t?.profile_sha256))throw new Error("NVIDIA accelerator binding requires a validated host profile binding.");return ta({profile_id:`nvidia_cuda_device_${t.selected_device?.index??0}`,provider:"nvidia",backend:"cuda",device_class:"gpu",binding_source:"observed_host_profile",evidence_stage:"serialized_artifact",artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:null,selected_build_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,host_profile_sha256:t.profile_sha256,configuration:{device_index:t.selected_device?.index??null,compute_capability:t.selected_device?.compute_capability||null,driver_version:t.selected_device?.driver_version||null,physical_vram_bytes:t.selected_device?.memory_total_bytes||null},coverage:{selected_build:"not_bound",assignment:"not_observed",execution:"not_measured"},claims:No("serialized_artifact"),interpretation_boundary:"The NVIDIA host profile is observed, but the selected CUDA, TensorRT, or ONNX Runtime build is not bound. No provider inclusion, layer assignment, execution, latency, or fit claim is emitted."})}function d0(e,t){if(t?.schema!=="deepbom.edgetpu_compiler_evidence.v1"||t?.artifact_sha256!==e?.model_sha256||!Ai(t?.evidence_sha256))throw new Error("Edge TPU accelerator binding requires validated compiler evidence for the active artifact.");return ta({profile_id:"google_edgetpu_compiler",provider:"google",backend:"edgetpu_compiler",device_class:"tpu",binding_source:"compiled_plan_import",evidence_stage:"compiled_plan",artifact_sha256:e.model_sha256,source_rulepack_sha256:null,selected_build_sha256:t.compiler.binary_sha256,compiled_plan_sha256:t.compiled_artifact_sha256,runtime_trace_sha256:null,configuration:{compiler_version:t.compiler.version,invocation_sha256:t.invocation_sha256,compiler_report_sha256:t.compiler_report_sha256},coverage:t.summary,claims:No("compiled_plan"),interpretation_boundary:"The Edge TPU compiler report binds mapped and unmapped serialized TFLite operations to one compiler binary, invocation, and compiled artifact. It is not an observed device assignment, transfer, latency, or successful execution trace."})}function p0(e,t){if(t?.schema!=="deepbom.litert_qualcomm_compiler_dispatch_evidence.v1"||t?.artifact_sha256!==e?.model_sha256||!Ai(t?.evidence_sha256))throw new Error("LiteRT Qualcomm accelerator binding requires validated compiler evidence for the active artifact.");return ta({profile_id:"litert_qualcomm_qnn_compiled_plan",provider:"qualcomm",backend:"litert_qnn",device_class:"npu",binding_source:"compiled_plan_import",evidence_stage:"compiled_plan",artifact_sha256:e.model_sha256,source_rulepack_sha256:t.source.rulepack_sha256,selected_build_sha256:t.compiler.binary_sha256,compiled_plan_sha256:t.compiled_plan_sha256,runtime_trace_sha256:null,configuration:{litert_commit:t.source.litert_commit,compiler_name:t.compiler.name,compiler_version:t.compiler.version,invocation_sha256:t.invocation_sha256,dispatch_status:t.dispatch.status,dispatch_runtime_binary_sha256:t.dispatch.runtime_binary_sha256,dispatch_evidence_sha256:t.dispatch.evidence_sha256},coverage:t.summary,claims:No("compiled_plan"),interpretation_boundary:t.interpretation_boundary})}function m0(e){return String(e?.format||"").toLowerCase()!=="tflite"||!Ai(e?.model_sha256)?[]:Rp(e).map(t=>{let n=t.profile_id==="tflite_coreml_delegate";return ta({profile_id:t.profile_id,provider:n?"apple":"qualcomm",backend:n?"tflite_coreml_delegate":"litert_qnn",device_class:n?"heterogeneous_accelerator":"npu",binding_source:"source_rulepack",evidence_stage:"source_eligibility",artifact_sha256:e.model_sha256,source_rulepack_sha256:t.source.rulepack_sha256,selected_build_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:{source_repository:t.source.repository,source_commit:t.source.commit,source_path:t.source.support_path},coverage:{assessed_operation_count:t.op_count,source_candidate_operation_count:t.state_counts.CONDITIONALLY_ELIGIBLE,definite_exclusion_count:t.state_counts.DEFINITE_EXCLUSION,unresolved_operation_count:t.state_counts.UNRESOLVED},claims:No("source_eligibility"),interpretation_boundary:t.interpretation_boundary})})}function f0(e,t){let n=t?.build_profile,i=t?.parser_observation,o=t?.engine_inspector_evidence;if(!n||!i&&!o)return null;let a=o?"compiled_plan":"selected_build";return ta({profile_id:n.execution_path==="ort_tensorrt_ep"?"onnxruntime_tensorrt_ep":"nvidia_tensorrt_native",provider:"nvidia",backend:n.execution_path==="ort_tensorrt_ep"?"ort_tensorrt_ep":"tensorrt",device_class:n.dla_core==null?"gpu":"heterogeneous_accelerator",binding_source:o?"compiled_plan_import":"selected_build_attestation",evidence_stage:a,artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:null,selected_build_sha256:i?.collector?.binary_sha256||null,compiled_plan_sha256:o?.engine?.sha256||null,runtime_trace_sha256:null,configuration:{build_profile_sha256:n.profile_sha256,execution_path:n.execution_path,precision:n.precision,device_id:n.device_id,device_compute_capability:n.device_compute_capability,dla_core:n.dla_core,allow_gpu_fallback:n.allow_gpu_fallback},coverage:{parser_observation_status:i?"observed":"not_bound",engine_inspector_status:o?.status||"not_bound",graph_operation_count:e?.ops?.length??null,projection_state_counts:t?.projection?.state_counts||{}},claims:No(a),interpretation_boundary:o?"The serialized TensorRT engine and inspector metadata are bound to the ONNX artifact and build profile. Selected tactics are engine metadata, not timing, physical transfer, memory allocation, task accuracy, or executed original-op assignment.":"TensorRT parser acceptance was observed for the selected binary and build profile. Engine build, optimized layers, tactics, execution, transfer, latency, and task accuracy remain unobserved."})}function vH(e,t){let n=t?.runtimeAssignmentEvidence||t?.runtime_assignment||t,i=Array.isArray(n?.assignments)?n.assignments:[];if(!i.length||String(n?.artifact_sha256||"").toLowerCase()!==String(e?.model_sha256||"").toLowerCase())return[];let o=new Map;for(let r of i){let s=EH(r?.provider);s&&(o.has(s.backend)||o.set(s.backend,{identity:s,rows:[]}),o.get(s.backend).rows.push(r))}let a=K(Q(n));return[...o.values()].map(({identity:r,rows:s})=>{let c=s.some(IH);return ta({profile_id:`${r.provider}_${r.backend}`,provider:r.provider,backend:r.backend,device_class:r.device_class,binding_source:"runtime_evidence_import",evidence_stage:c?"measured_execution":"observed_assignment",artifact_sha256:e.model_sha256,source_rulepack_sha256:null,selected_build_sha256:n.runtime_binary_sha256||n.binary_sha256||null,compiled_plan_sha256:null,runtime_trace_sha256:a,configuration:{runtime_name:n.runtime?.name||n.runtime_name||null},coverage:{observed_assignment_count:s.length,graph_operation_count:e?.ops?.length??null},claims:No(c?"measured_execution":"observed_assignment"),interpretation_boundary:"Provider assignment is imported from identity-bound runtime evidence. Timing is claimed only when additive per-row timing fields are present; physical transfer and unreported runtime internals remain outside this binding."})})}function h0(e,t=null){let n=e?.tflite_delegate_compatibility_evidence;if(n?.schema!=="deepbom.tflite_delegate_source_rulepack.v1"||!Ai(n?.rulepack_sha256))return[];let i=t?.tflite_delegate_build_inventory||null;return(n.profiles||[]).map(o=>{let a=o.id==="tflite_gpu",s=(a?i?.gpu?.compiled_status==="enabled_by_declared_cmake_option":i?.nnapi?.compiled_status==="enabled_by_declared_cmake_option_and_android_gate")&&Ai(i?.build_manifest_sha256)?"selected_build":"source_eligibility";return ta({profile_id:o.id,provider:a?"tensorflow":"android",backend:o.id,device_class:a?"gpu":"npu",binding_source:s==="selected_build"?"selected_build_attestation":"source_rulepack",evidence_stage:s,artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:n.rulepack_sha256,selected_build_sha256:s==="selected_build"?i.build_manifest_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:a?{compiled_status:i?.gpu?.compiled_status||"not_bound",quantized_model_flag_status:i?.gpu?.quantized_model_flag_status||"not_bound",experimental_flags:i?.gpu?.experimental_flags??null}:{compiled_status:i?.nnapi?.compiled_status||"not_bound",runtime_feature_level:i?.nnapi?.runtime_feature_level??null,accelerator_identity:i?.nnapi?.accelerator_identity||null,capability_source:i?.nnapi?.capability_source||"not_collected"},coverage:{assessed_operation_count:o.assessed_graph_op_count??e?.ops?.length??null,source_candidate_operation_count:o.source_candidate_after_artifact_precheck_count??null,definite_exclusion_count:o.definite_exclusion_count??null},claims:No(s),interpretation_boundary:s==="selected_build"?"The delegate source profile and selected-build inventory are bound. Device acceptance, partition assignment, physical transfer, execution, and latency remain unobserved.":"Pinned source registration and artifact-visible prechecks identify candidates only. Selected-build inclusion, device acceptance, partition assignment, execution, and latency remain unobserved."})})}function wH(e,t=null){let n=e?.ort_compatibility_evidence;if(!n||n.assessment_status!=="complete")return[];let i=Array.isArray(n.execution_providers)?n.execution_providers:[],o=t?.source?.adapter?.native_capture?.selected_build_provider_binding||t?.selected_build_provider_binding||null,a=new Map((o?.bindings||[]).filter(c=>c?.bundled===!0&&c?.source_profile).map(c=>[c.source_profile,c])),r=o?.source_build_attestation?.attestation_sha256||null,s=[];for(let c of i){let u=NH(c?.execution_provider);if(!u||!Ai(c?.source_sha256))continue;let l={assessed_operation_count:c.assessed_op_count??e?.ops?.length??null,source_candidate_operation_count:c.source_candidate_after_artifact_precheck_count??null,definite_exclusion_count:c.artifact_precheck_definite_fail_op_count??null,unresolved_operation_count:c.artifact_precheck_unresolved_op_count??null};s.push(ta({profile_id:`ort_${c.execution_provider}`,...u,binding_source:"source_rulepack",evidence_stage:"source_eligibility",artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:c.source_sha256,selected_build_sha256:null,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:{ort_source_commit:n.source_commit||null,execution_provider:c.execution_provider,source_id:c.source_id||null},coverage:l,claims:No("source_eligibility"),interpretation_boundary:"Pinned ONNX Runtime provider registrations and artifact-visible prechecks establish source eligibility only. Selected-build inclusion, GetCapability partitioning, optimized assignment, physical transfer, execution, latency, and task correctness remain unobserved."}));let _=a.get(c.execution_provider);!_||!Ai(r)||s.push(ta({profile_id:`ort_${c.execution_provider}`,...u,binding_source:"selected_build_attestation",evidence_stage:"selected_build",artifact_sha256:Ps(e?.model_sha256,"artifact SHA-256"),source_rulepack_sha256:c.source_sha256,selected_build_sha256:r,compiled_plan_sha256:null,runtime_trace_sha256:null,configuration:{ort_source_commit:n.source_commit||null,execution_provider:c.execution_provider,backend_name:_.backend_name,supported_backends_sha256:o.supported_backends_sha256||null},coverage:l,claims:No("selected_build"),interpretation_boundary:"The selected ONNX Runtime build attestation includes this provider and is cross-referenced to its pinned source profile. GetCapability acceptance, graph transforms, optimized assignment, physical transfer, execution, latency, and task correctness remain unobserved."}))}return s}function R5(e,t=null,n=null){let i=Ai(n)?{...e,model_sha256:n}:e,o=[...Array.isArray(i?.accelerator_bindings)?i.accelerator_bindings:[]];if(!Ai(i?.model_sha256))return xh(o);i?.accelerator_profile_binding&&o.push(_0(i,i.accelerator_profile_binding));let a=i?.coreml_compute_plan||(t?.schema==="deepbom.coreml_compute_plan.v1"?t:null)||t?.coreml_compute_plan||null;a&&o.push(u0(i,a)),i?.edgetpu_compiler_evidence&&o.push(d0(i,i.edgetpu_compiler_evidence)),i?.litert_qualcomm_evidence&&o.push(p0(i,i.litert_qualcomm_evidence));let r=f0(i,i?.tensorrt_static_preflight);return r&&o.push(r),o.push(...h0(i,t)),o.push(...m0(i)),o.push(...wH(i,t)),o.push(...vH(i,t)),xh(o)}function xh(...e){let t=new Map;for(let n of e.flat(1/0).filter(Boolean)){let i=l0(n),o=`${i.profile_id}\0${i.evidence_stage}\0${i.binding_sha256}`;t.set(o,i)}return[...t.values()].sort((n,i)=>n.profile_id.localeCompare(i.profile_id)||wh.indexOf(n.evidence_stage)-wh.indexOf(i.evidence_stage)||n.binding_sha256.localeCompare(i.binding_sha256))}function B5(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Accelerator binding must be an object.");let t=vh(e.evidence_stage,wh,"accelerator evidence stage"),n={schema:hH,profile_id:O5(e.profile_id,"accelerator profile id"),provider:vh(e.provider,bH,"accelerator provider"),backend:O5(e.backend,"accelerator backend"),device_class:vh(e.device_class,yH,"accelerator device class"),binding_source:vh(e.binding_source,AH,"accelerator binding source"),evidence_stage:t,artifact_sha256:Ps(e.artifact_sha256,"artifact SHA-256"),source_rulepack_sha256:Md(e.source_rulepack_sha256,"source rulepack SHA-256"),selected_build_sha256:Md(e.selected_build_sha256,"selected build SHA-256"),compiled_plan_sha256:Md(e.compiled_plan_sha256,"compiled plan SHA-256"),runtime_trace_sha256:Md(e.runtime_trace_sha256,"runtime trace SHA-256"),host_profile_sha256:Md(e.host_profile_sha256,"host profile SHA-256"),configuration:z5(e.configuration,"accelerator configuration"),coverage:z5(e.coverage,"accelerator coverage"),claims:xH(e.claims,t),interpretation_boundary:CH(e.interpretation_boundary,"accelerator interpretation boundary")};if(t==="source_eligibility"&&!n.source_rulepack_sha256)throw new Error("Source-eligibility binding requires source_rulepack_sha256.");if(t==="selected_build"&&!n.selected_build_sha256)throw new Error("Selected-build binding requires selected_build_sha256.");if(t==="compiled_plan"&&!n.compiled_plan_sha256)throw new Error("Compiled-plan binding requires compiled_plan_sha256.");if(["observed_assignment","measured_execution"].includes(t)&&!n.runtime_trace_sha256)throw new Error(`${t} binding requires runtime_trace_sha256.`);return n}function No(e){let t=wh.indexOf(e);return{source_eligibility:t>=1,selected_build:t>=2,compiled_plan:t>=3,observed_assignment:t>=4,measured_execution:t>=5}}function xH(e,t){let n=No(t);for(let i of Object.keys(n))if(e?.[i]!==n[i])throw new Error(`Accelerator claim ${i} is inconsistent with evidence stage ${t}.`);return n}function EH(e){let t=String(e||"").toLowerCase();return/tensorrt/.test(t)?{provider:"nvidia",backend:"tensorrt",device_class:"gpu"}:/cuda/.test(t)?{provider:"nvidia",backend:"cuda",device_class:"gpu"}:/qnn/.test(t)?{provider:"qualcomm",backend:"qnn",device_class:"npu"}:/nnapi/.test(t)?{provider:"android",backend:"nnapi",device_class:"npu"}:/coreml/.test(t)?{provider:"apple",backend:"coreml",device_class:"heterogeneous_accelerator"}:/directml/.test(t)?{provider:"onnxruntime",backend:"directml",device_class:"gpu"}:/webgpu/.test(t)?{provider:"onnxruntime",backend:"webgpu",device_class:"gpu"}:/webnn/.test(t)?{provider:"onnxruntime",backend:"webnn",device_class:"heterogeneous_accelerator"}:/gpu/.test(t)?{provider:"tensorflow",backend:"tflite_gpu",device_class:"gpu"}:null}function NH(e){return{cuda:{provider:"nvidia",backend:"ort_cuda",device_class:"gpu"},directml:{provider:"onnxruntime",backend:"ort_directml",device_class:"gpu"},webgpu:{provider:"onnxruntime",backend:"ort_webgpu",device_class:"gpu"},webnn:{provider:"onnxruntime",backend:"ort_webnn",device_class:"heterogeneous_accelerator"},qnn:{provider:"qualcomm",backend:"ort_qnn",device_class:"npu"},coreml:{provider:"apple",backend:"ort_coreml",device_class:"heterogeneous_accelerator"},nnapi:{provider:"android",backend:"ort_nnapi",device_class:"npu"}}[String(e||"").toLowerCase()]||null}function IH(e){return[e?.duration_us,e?.duration_sum_us].some(t=>{if(t==null||t===""||typeof t=="boolean")return!1;let n=Number(t);return Number.isFinite(n)&&n>=0})}function z5(e,t){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new Error(`${t} must be an object.`);return JSON.parse(Q(e))}function vh(e,t,n){let i=String(e||"").trim();if(!(typeof t?.has=="function"?t.has(i):Array.isArray(t)&&t.includes(i)))throw new Error(`${n} is invalid.`);return i}function O5(e,t){let n=String(e||"").trim();if(!/^[a-z0-9][a-z0-9_.-]{0,127}$/.test(n))throw new Error(`${t} is invalid.`);return n}function CH(e,t){let n=String(e||"").trim();if(!n||n.length>2e3)throw new Error(`${t} is invalid.`);return n}function Ps(e,t){let n=String(e||"").toLowerCase();if(!Ai(n))throw new Error(`${t} is invalid.`);return n}function Md(e,t){return e==null||e===""?null:Ps(e,t)}function Ai(e){return typeof e=="string"&&gH.test(e)}var Eh=/^[a-f0-9]{64}$/,D5=new Set(["default_assumption","explicit_id","profile_file"]);function g0(e,{bindingSource:t,sourceInput:n=null}={}){let i=String(e?.id||"").trim(),o=String(e?.profile_sha256||"").trim().toLowerCase();if(!i)throw new Error("CPU cost target profile id is required.");if(!Eh.test(o))throw new Error("CPU cost target profile SHA-256 is required.");if(!D5.has(t))throw new Error("CPU cost target binding source is invalid.");let a={schema:"deepbom.cpu_cost_target_binding.v1",profile_id:i,profile_sha256:o,binding_source:t,host_observed:!1,source_input:t==="profile_file"?M5(n):null};return b0(a),a}function b0(e){if(e?.schema!=="deepbom.cpu_cost_target_binding.v1")throw new Error("CPU cost target binding schema is invalid.");if(!String(e.profile_id||"").trim())throw new Error("CPU cost target binding profile id is missing.");if(!Eh.test(String(e.profile_sha256||"")))throw new Error("CPU cost target binding profile SHA-256 is invalid.");if(!D5.has(e.binding_source))throw new Error("CPU cost target binding source is invalid.");if(e.host_observed!==!1)throw new Error("CPU cost target profiles are planning inputs and cannot claim host observation.");if(e.binding_source==="profile_file")M5(e.source_input);else if(e.source_input!=null)throw new Error("Built-in CPU target bindings cannot carry a profile-file source input.");return e}function M5(e){let t={filename:String(e?.filename||"").trim(),byte_length:Number(e?.byte_length),source_sha256:String(e?.source_sha256||"").toLowerCase(),normalized_profile_sha256:String(e?.normalized_profile_sha256||"").toLowerCase(),duplicate_key_validation:String(e?.duplicate_key_validation||"")};if(!t.filename||!Number.isSafeInteger(t.byte_length)||t.byte_length<=0||!Eh.test(t.source_sha256)||!Eh.test(t.normalized_profile_sha256)||t.duplicate_key_validation!=="complete")throw new Error("CPU cost target profile-file source input is invalid.");return t}var kH="deepbom.mac_coverage.v1",$5=new Set(["gguf","safetensors"]);function qs(e={},t=null){let n=String(e?.format||"unknown").toLowerCase(),i=e?.mac_assessment||null,o=t||e?.quantization_status||{},a=Ih(i?.compute_ops),r=Ih(o?.compute_ops),s=SH(e?.ops),c=a??r??s,u=Ih(i?.assessed_compute_ops),l=P5(i?.status);if($5.has(n))return Nh(n,"not_applicable_weight_container",0,0,"serialized_format_has_no_execution_graph");if(l){let _=u??(y0(l)?c:null),p=n==="tflite"&&y0(l)?"assessed":l;return Nh(n,p,c,_,_==null?"assessed_compute_operator_count_not_emitted":null)}if(n==="tflite"&&Array.isArray(e?.ops)&&Ch(e?.total_macs)!=null){let _=e.ops.every(p=>Ch(p?.macs)!=null);return Nh(n,_?"assessed":"not_assessed_incomplete_mac_ledger",c,_?c:null,_?null:"one_or_more_serialized_operators_lack_mac_evidence")}return Nh(n,"not_assessed",c,u,"format_adapter_did_not_emit_a_complete_mac_assessment")}function L5(e={},t=null,n=null){let i=String(e?.format||"unknown").toLowerCase(),o=t||e?.quantization_status||{},a=n||qs(e,o),r=Ih(o?.quantized_compute_ops),s=Ch(o?.quantized_compute_mac_percent);return $5.has(i)?{operator_status:"not_applicable_weight_container",operator_reason:"serialized_format_has_no_execution_graph",mac_status:"not_applicable_weight_container",mac_reason:"serialized_format_has_no_execution_graph"}:s!=null?{operator_status:r==null?"not_assessed_quantized_operator_count_unavailable":"assessed",operator_reason:r==null?"quantized_compute_operator_count_not_emitted":null,mac_status:"assessed",mac_reason:null}:A0(a)?i==="coreml"&&r==null?{operator_status:"not_assessed_execution_precision_not_serialized",operator_reason:"serialized_weights_do_not_establish_executed_operator_precision",mac_status:"not_assessed_execution_precision_not_serialized",mac_reason:"serialized_weights_do_not_establish_which_compute_operators_execute_quantized"}:{operator_status:r==null?"not_assessed_quantized_operator_count_unavailable":"assessed",operator_reason:r==null?"quantized_compute_operator_count_not_emitted":null,mac_status:"not_assessed_quantization_contract_unavailable",mac_reason:"quantized_compute_mac_ledger_not_emitted"}:{operator_status:r==null?"not_assessed_quantized_operator_count_unavailable":"assessed",operator_reason:r==null?"quantized_compute_operator_count_not_emitted":null,mac_status:"not_assessed_mac_coverage_incomplete",mac_reason:a.reason||a.status}}function A0(e){return e?.compute_ops!=null&&e?.assessed_compute_ops===e.compute_ops&&y0(e?.status)}function Nh(e,t,n,i,o){if(n!=null&&i!=null&&i>n)throw new Error("MAC coverage assessed compute operators exceed the compute-operator denominator.");return Object.freeze({schema:kH,format:e,status:t,compute_ops:n,assessed_compute_ops:i,unassessed_compute_ops:n==null||i==null?null:n-i,reason:o})}function y0(e){let t=P5(e);return!!t&&!/not_assessed|incomplete|partial|unresolved|failed/.test(t)&&/assessed|complete/.test(t)}function P5(e){return String(e||"").trim().toLowerCase().replaceAll("-","_")}function Ih(e){if(e==null||e==="")return null;let t=Number(e);return Number.isSafeInteger(t)&&t>=0?t:null}function Ch(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function SH(e){return Array.isArray(e)?e.reduce((t,n)=>t+(Ch(n?.macs)>0?1:0),0):null}var kh=Object.freeze(["OBSERVED","SOURCE_BACKED","DERIVED","DERIVED_WITH_HEURISTIC_THRESHOLD","PREDICTED","ESTIMATED","DECLARED_UNVERIFIED","MEASURED","NOT_ASSESSABLE","NOT_APPLICABLE"]),q5=new Set(kh);function j5(e,t="NOT_ASSESSABLE"){let n=String(e||"").trim().toUpperCase().replaceAll("-","_").replaceAll(" ","_");return q5.has(n)?n:n.includes("NOT_ASSESSABLE")||n.includes("NOT_ASSESSED")?"NOT_ASSESSABLE":n.includes("NOT_APPLICABLE")?"NOT_APPLICABLE":n.includes("MEASURED")||n.includes("OBSERVED_RUNTIME")||n.includes("IMPORTED_IDENTITY_BOUND_RUNTIME_EVIDENCE")?"MEASURED":n.includes("PREDICTED")?"PREDICTED":n.includes("ESTIMATED")?"ESTIMATED":n.includes("SOURCE_BACKED")||n.includes("SOURCE_BASED")||n.includes("SOURCE_PINNED")?"SOURCE_BACKED":n.includes("DECLARED")?"DECLARED_UNVERIFIED":n.includes("HEURISTIC")?"DERIVED_WITH_HEURISTIC_THRESHOLD":n.includes("DERIVED")?"DERIVED":n.includes("OBSERVED")?"OBSERVED":q5.has(t)?t:"NOT_ASSESSABLE"}Pd();var jH=Object.freeze(["exact","symbolic","partial","not_applicable"]),FH=new Set(["gguf","safetensors"]);function qd(e){return!e||typeof e!="object"||Array.isArray(e)||(e.total_macs===void 0&&(e.total_macs=null),e.total_macs_decimal===void 0&&(e.total_macs_decimal=null),e.mac_confidence=jd(e)),e}function jd(e={}){let t=String(e?.mac_confidence||e?.mac_assessment?.confidence||"").trim().toLowerCase().replaceAll("-","_");if(jH.includes(t))return t;let n=String(e?.format||"unknown").toLowerCase();if(FH.has(n))return"not_applicable";let i=qs(e);if(String(i.status||"").toLowerCase().includes("not_applicable")||i.compute_ops===0&&i.assessed_compute_ops===0)return"not_applicable";if(A0(i)&&QH(e.total_macs)!=null)return"exact";let a=String(e?.dynamic_shape_cost_contract?.total_macs_formula_status||e?.mac_assessment?.formula_status||"").toLowerCase();return(e?.dynamic_shape_cost_contract?.total_macs_formula??e?.mac_assessment?.total_macs_formula??null)&&/exact_symbolic|symbolic_exact/.test(a)?"symbolic":"partial"}function QH(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}var K5="deepbom.artifact_evidence_envelope.v1",UH=/^[a-f0-9]{64}$/i,GH=Object.freeze({tflite:["artifact_identity","graph","interfaces","tensor_payloads","affine_quantization","metadata","associated_files","runtime_floor","static_cost","tflite_arena","xnnpack_contracts","quantization_proofs","artifact_byte_integrity"],onnx:["artifact_identity","graph","interfaces","tensor_payloads","affine_quantization","metadata","external_data","runtime_floor","static_cost","opset_contracts","recursive_types","control_flow","onnx_runtime_contracts","llm_serialized_graph","tensorrt_static_preflight"],gguf:["artifact_identity","tensor_inventory","tensor_payloads","block_quantization","metadata","runtime_requirements","llm_architecture","llm_tokenizer","llm_layer_storage","llm_state_projection","llm_compute_scenario","llm_memory_feasibility","llm_static_memory_placement","llm_runtime_contract","medical_deployment_declaration"],safetensors:["artifact_identity","tensor_inventory","tensor_payloads","tensor_payload_ranges","metadata","llm_architecture","llm_tokenizer","llm_layer_storage","llm_state_projection","llm_compute_scenario","llm_memory_feasibility","llm_static_memory_placement","llm_runtime_contract","medical_deployment_declaration"],coreml:["artifact_identity","package_inventory","graph","interfaces","tensor_payloads","affine_quantization","metadata","runtime_requirements","static_cost"]});function qe(e){return String(e??"").trim()}function co(e){let t=qe(e).toLowerCase();return UH.test(t)?t:null}function Oa(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Z5(e){return[...new Set(e.filter(Boolean))]}function X5(e,t="NOT_ASSESSABLE"){return j5(e,t)}function VH(e){let t=e?.metadata_presence||{};return{status:qe(t.status||"not_assessed"),evidence_class:t.status==="assessed"?"OBSERVED":"NOT_ASSESSABLE",producer_name:qe(t.producer_name)||null,producer_version:qe(t.producer_version)||null,model_version:qe(t.metadata_model_version||t.model_version)||null,author:qe(t.metadata_author)||null,license:qe(t.metadata_license)||null,description:qe(t.metadata_model_description||t.description)||null,preprocessing_contract_status:qe(t.preprocessing_contract_status||"not_declared"),output_semantics_documented:t.output_semantics_documented===!0}}function HH(e){let t=e?.onnx_external_data||{},n=t.tensors||[];return(t.supplied_files||[]).filter(i=>i?.used===!0&&co(i.sha256)).map(i=>{let o=qe(i.path),a=n.filter(c=>qe(c.sidecar_path)===o),r=Z5(a.map(c=>qe(c.payload_status))),s=a.length>0&&a.every(c=>c.payload_status==="verified");return{role:"external_weights",path:o,byte_length:Oa(i.byte_length),sha256:co(i.sha256),sha1:qe(i.sha1)||null,required:!0,evidence_class:"OBSERVED",verification_status:s?"payload_range_cardinality_and_hash_verified":`payload_verification_incomplete:${r.join(",")||"reference_status_unavailable"}`}})}function KH(e){let t=e?.metadata_presence||{};return(t.packed_associated_files||[]).filter(i=>co(i?.payload_sha256)).map(i=>({role:"associated_file",path:qe(i.name||i.path),byte_length:Oa(i.decoded_size??i.uncompressed_size),sha256:co(i.payload_sha256),sha1:null,required:(t.output_associated_files||[]).some(o=>o?.name===i?.name),evidence_class:"OBSERVED",verification_status:qe(i.status||i.payload_status||"archive_payload_verified")}))}function ZH(e){return(e?.artifact_bundle?.files||[]).filter(t=>co(t?.sha256)).map(t=>({role:qe(t.role||"supporting_file"),path:qe(t.path||t.name),byte_length:Oa(t.byte_length??t.size),sha256:co(t.sha256),sha1:null,required:t.required!==!1,evidence_class:X5(t.evidence_class,"OBSERVED"),verification_status:qe(t.verification_status||"hash_verified")}))}function XH(e){let t=[...HH(e),...KH(e),...ZH(e)],n=new Set;return t.filter(i=>{let o=`${i.sha256}:${i.path}`;return n.has(o)?!1:(n.add(o),!0)})}function WH(e,t){let n=new Set(GH[t]||["artifact_identity"]),i=new Map,o=(s,c,u=!0)=>{!n.has(s)||i.has(s)||i.set(s,c==null?"unavailable":u?"assessed":"partial")},a=(s,c,u)=>{!n.has(s)||i.has(s)||i.set(s,YH(u,c))};if(o("artifact_identity",e),o("graph",Qe(e)&&Xt(e)),o("interfaces",e?.inputs&&e?.outputs),t==="onnx"){let s=e?.weight_integrity;o("tensor_payloads",s||e?.onnx_external_data_structure_binding,s?.status==="assessed"&&s?.coverage_status==="complete")}else o("tensor_payloads",e?.weight_integrity||e?.tensor_numerical_integrity||Xt(e),e?.tensor_numerical_integrity?e.tensor_numerical_integrity.status==="assessed":t==="coreml"?e?.weight_integrity?.status==="assessed":!0);o("affine_quantization",Xt(e)),o("metadata",e?.metadata_presence),t==="onnx"&&Number(e?.onnx_external_data?.tensor_count||0)===0?o("external_data",e?.onnx_external_data,!0):e?.onnx_external_data_structure_binding?o("external_data",e.onnx_external_data_structure_binding,!1):a("external_data",e?.onnx_external_data,e?.onnx_external_data?.status),o("associated_files",e?.metadata_presence,e?.metadata_presence?.associated_file_archive_status!=="partial"),a("runtime_floor",e?.runtime_compat||e?.ort_compatibility_evidence,e?.runtime_compat?.status||e?.runtime_compat?.assessment_status||e?.ort_compatibility_evidence?.status),o("static_cost",e?.mac_assessment||(t==="tflite"&&Oa(e?.total_macs)!=null?Qe(e):null),t==="coreml"?e?.mac_assessment?.status==="assessed_all_decoded_compute_ops"&&Oa(e?.total_macs)!=null:!0),a("tflite_arena",e?.tensor_arena_plan,e?.tensor_arena_plan?.status),a("xnnpack_contracts",e?.xnnpack_selector_assessment_status,e?.xnnpack_selector_assessment_status),a("quantization_proofs",e?.quant_research_coverage||e?.channel_vitality,e?.quant_research_coverage?.status||e?.channel_vitality?.status),a("artifact_byte_integrity",e?.artifact_byte_integrity,e?.artifact_byte_integrity?.status),a("opset_contracts",e?.onnx_domain_analysis,e?.onnx_domain_analysis?.status),a("recursive_types",e?.onnx_type_proto_contract,e?.onnx_type_proto_contract?.status),a("control_flow",e?.onnx_shape_inference,e?.onnx_shape_inference?.status),a("onnx_runtime_contracts",e?.ort_compatibility_evidence,e?.ort_compatibility_evidence?.status),o("tensor_inventory",Xt(e)||e?.tensor_inventory),a("block_quantization",e?.gguf?.quantization||e?.quantization_status,e?.gguf?.quantization?.status||e?.quantization_status?.status),o("metadata",e?.metadata_presence||e?.metadata),o("package_inventory",e?.artifact_bundle),a("runtime_requirements",e?.runtime_compat||e?.runtime_requirements||e?.gguf?.backend_compatibility,e?.runtime_compat?.status||e?.runtime_requirements?.status||e?.gguf?.backend_compatibility?.status),o("tensor_payload_ranges",e?.tensor_inventory),a("llm_architecture",e?.on_device_llm?.architecture,e?.on_device_llm?.status),a("llm_tokenizer",e?.on_device_llm?.tokenizer,e?.on_device_llm?.tokenizer?.status),a("llm_layer_storage",e?.on_device_llm?.storage?.layer_storage,e?.on_device_llm?.storage?.layer_storage?.status),a("llm_state_projection",e?.on_device_llm?.state?.kv_projection,e?.on_device_llm?.state?.kv_projection?.status),a("llm_recurrent_state_projection",e?.on_device_llm?.state?.recurrent_projection,e?.on_device_llm?.state?.recurrent_projection?.status),a("llm_compute_scenario",e?.on_device_llm?.compute?.projection,e?.on_device_llm?.compute?.projection?.status),a("llm_memory_feasibility",e?.on_device_llm?.memory_feasibility,e?.on_device_llm?.memory_feasibility?.status),a("llm_static_memory_placement",e?.on_device_llm?.static_memory_placement,e?.on_device_llm?.static_memory_placement?.status),a("llm_runtime_contract",e?.on_device_llm?.runtime_contract,e?.on_device_llm?.runtime_contract?.status),a("llm_serialized_graph",e?.on_device_llm?.serialized_graph,e?.on_device_llm?.serialized_graph?.status),a("tensorrt_static_preflight",e?.tensorrt_static_preflight,e?.tensorrt_static_preflight?.status),a("tensorrt_llm_static_contract",e?.on_device_llm?.tensorrt_llm,e?.on_device_llm?.tensorrt_llm?.status),a("medical_deployment_declaration",e?.on_device_llm?.medical_ai_claim_boundary,"not_declared_in_artifact");for(let s of n)i.has(s)||i.set(s,"unavailable");let r=s=>[...i].filter(([,c])=>c===s).map(([c])=>c);return{schema:"deepbom.artifact_capability_manifest.v1",format:t,declared_capabilities:[...n],assessed:r("assessed"),partial:r("partial"),unavailable:r("unavailable"),conservation:{declared:n.size,classified:i.size,valid:n.size===i.size}}}function YH(e,t){if(t==null)return"unavailable";let n=qe(e).toLowerCase().replaceAll("-","_");return!n||/not_assessed|not_declared|not_selected|unavailable|unbound|external|unknown/.test(n)?"unavailable":/invalid|failed|partial|incomplete|unresolved|unsupported/.test(n)?"partial":/assessed|complete|observed|verified|source_candidate|available|decoded|bound/.test(n)?"assessed":"partial"}function JH(e,t){let n=Array.isArray(t?.findings)?t.findings:null;if(!n)try{n=hh(e,{runtimeEvidence:t?.runtimeEvidence||null,analyzerMetadata:t?.analyzerMetadata})}catch{n=[]}return n.map((i,o)=>({id:qe(i.finding_id||i.id||i.code||`finding-${o+1}`),title:qe(i.title||i.name||"Static analysis finding"),severity:qe(i.technical_priority||i.severity||"info").toLowerCase(),finding_kind:e0.includes(i.finding_kind)?i.finding_kind:"caution",status:qe(i.status||"open"),evidence_class:X5(i.evidence_class||i.evidenceClass,"DERIVED"),source_evidence_class:qe(i.evidence_class||i.evidenceClass)||null,summary:qe(i.observation||i.summary||i.description||i.detail),interpretation:qe(i.interpretation)||null,recommendation:qe(i.recommendation)||null,...Number.isSafeInteger(i.affected_tensor_count)?{affected_tensor_count:i.affected_tensor_count}:{},...Number.isSafeInteger(i.assessed_tensor_count)?{assessed_tensor_count:i.assessed_tensor_count}:{},...Array.isArray(i.affected_tensors)?{affected_tensors:i.affected_tensors.map(qe).filter(Boolean)}:{},...Array.isArray(i.affected_tensors)?{affected_tensors_truncated:i.affected_tensors_truncated===!0}:{},...Number.isSafeInteger(i.affected_tensor_count)?{affected_tensor_count:i.affected_tensor_count}:{},...Number.isSafeInteger(i.assessed_tensor_count)?{assessed_tensor_count:i.assessed_tensor_count}:{},...Array.isArray(i.affected_tensors)?{affected_tensors:i.affected_tensors.map(qe).filter(Boolean)}:{},...Array.isArray(i.affected_tensors)?{affected_tensors_truncated:i.affected_tensors_truncated===!0}:{},source_pointers:Z5([i.evidence_json_pointer,...i.evidence_json_pointers||[],...i.evidence_pointers||[]].map(qe)),rule_id:qe(i.source_rule_id||i.rule_id||i.ruleId)||null}))}function eK(e,t){if(t==="tflite")return{schema_version:e?.schema_version??null,subgraph_count:e?.subgraphs??null,metadata_schema_identifier:e?.metadata_presence?.metadata_schema_identifier||null,arena_contract_schema:e?.tensor_arena_plan?.schema||null,xnnpack_rulepack_schema:e?.xnnpack_delegate_assessment?.schema||null,artifact_byte_integrity:e?.artifact_byte_integrity||null};if(t==="onnx")return{ir_version:e?.onnx_ir_version??null,opsets:e?.opsets||[],producer:e?.producer||e?.metadata_presence?.producer_name||null,domain_contract_schema:e?.onnx_domain_analysis?.schema||null,shape_contract_schema:e?.onnx_shape_inference?.schema||null,contract_conflict_capsule:e?.onnx_contract_conflict||null,quantization_binding_schema:e?.onnx_quantization_binding?.schema||null,external_data_structure_binding:e?.onnx_external_data_structure_binding||null,on_device_llm:e?.on_device_llm||null,tensorrt_static_preflight:e?.tensorrt_static_preflight||null};let n=e?.format_extensions?.[t]||e?.[t]||null;return["gguf","safetensors"].includes(t)?{...n,tensor_numerical_integrity:e?.tensor_numerical_integrity||null,on_device_llm:e?.on_device_llm||null}:t==="coreml"?{...n,weight_integrity:e?.weight_integrity||null,package_blob_integrity:e?.coreml_blob_integrity||null,tensor_liveness:e?.tensor_liveness||null,size_breakdown:e?.size_breakdown||null,mac_assessment:e?.mac_assessment||null}:t==="executorch"?{container:e?.executorch_container||null,version:e?.version??null,program:e?.executorch_program||null,flat_tensor:e?.executorch_flat_tensor||null,planned_memory:e?.tensor_liveness||null,size_breakdown:e?.size_breakdown||null,mac_assessment:e?.mac_assessment||null}:n}function Fs(e={},t={}){let n=qe(e.format||t.format||"unknown").toLowerCase(),i=e?.llm_token_budget_scenario||e?.cli_context_scenario||null,o=qs(e),a=ea(e),r=XH(e),s=JH(e,t),c={filename:qe(e.filename||t.filename||"model"),format:n,sha256:co(t.hash||e.model_sha256),hash_basis:qe(e?.artifact_bundle?.hash_basis||"artifact_file_bytes_sha256"),byte_length:Oa(t.fileSizeBytes??e.file_size_bytes??e.file_size),schema_or_opset:qe(t.schemaOrOpset||e.schema_or_opset)||null},u={schema:K5,generated_at:qe(t.generatedAt)||null,identity:c,artifact_set:e?.artifact_set||null,conversion_receipt:e?.conversion_receipt||null,cpu_cost_target_binding:e?.cpu_cost_target_binding||null,accelerator_profile_binding:e?.accelerator_profile_binding||null,...i?{llm_token_budget_scenario:i}:{},accelerator_bindings:R5(e,t.runtimeEvidence||t.runtimeAssignmentEvidence||null,c.sha256),policy_identity:e?.policy_identity||null,capabilities:WH(e,n),interfaces:a,graph:{operator_count:["gguf","safetensors"].includes(n)?null:Oa(e.operator_count??Qe(e)?.length),tensor_count:Oa(e.tensor_count??Xt(e)?.length),total_macs:Oa(e.total_macs),mac_confidence:jd(e),mac_assessment_status:o.status,mac_coverage:o},external_files:r,metadata:VH(e),findings:s,...t.structuredDetails?{structured_details:t.structuredDetails}:{},format_extensions:{[n]:eK(e,n)},provenance:t.provenance||null,evidence_boundary:"Serialized artifact facts and deterministic static derivations. Declarations and runtime measurements are accepted only through separately identified inputs."},l=Wa(u);return{...l,envelope_sha256:K(Q(l))}}function w0(e){let t=[];if(e?.schema!==K5&&t.push("schema_mismatch"),(!qe(e?.identity?.format)||e.identity.format==="unknown")&&t.push("format_unbound"),e?.identity?.sha256&&!co(e.identity.sha256)&&t.push("invalid_artifact_sha256"),e?.artifact_set)try{A5(e.artifact_set)}catch{t.push("invalid_artifact_set")}if(e?.conversion_receipt)try{Ld(e.conversion_receipt,{filename:e.identity.filename,format:e.identity.format,sha256:e.identity.sha256,byte_length_decimal:e.identity.byte_length==null?null:String(e.identity.byte_length)})}catch{t.push("invalid_conversion_receipt")}if(e?.cpu_cost_target_binding)try{b0(e.cpu_cost_target_binding)}catch{t.push("invalid_cpu_cost_target_binding")}if(e?.accelerator_profile_binding)try{S5(e.accelerator_profile_binding)}catch{t.push("invalid_accelerator_profile_binding")}if(e?.llm_token_budget_scenario){let i={...e.llm_token_budget_scenario},o=i.scenario_sha256;delete i.scenario_sha256,(i.schema!=="deepbom.llm_token_budget_scenario.v1"||!co(o)||o!==K(Q(i)))&&t.push("invalid_llm_token_budget_scenario")}Array.isArray(e?.accelerator_bindings)||t.push("accelerator_bindings_missing");for(let i of e?.accelerator_bindings||[])try{l0(i)}catch{t.push(`invalid_accelerator_binding:${qe(i?.profile_id)||"unknown"}`)}e?.policy_identity&&!tK(e.policy_identity)&&t.push("invalid_policy_identity"),Array.isArray(e?.interfaces?.parameters)||t.push("interface_ledger_missing");for(let i of e?.external_files||[])co(i.sha256)||t.push(`invalid_external_file_sha256:${i.path}`),qe(i.path)||t.push("external_file_path_missing");for(let i of e?.findings||[])kh.includes(i.evidence_class)||t.push(`invalid_evidence_class:${i.id}`),e0.includes(i.finding_kind)||t.push(`invalid_finding_kind:${i.id}`);let n={...e};return delete n.envelope_sha256,e?.envelope_sha256!==K(Q(n))&&t.push("envelope_sha256_mismatch"),{valid:t.length===0,errors:t}}function tK(e){return e?.schema==="deepbom.gate_policy_profile.v1"?["engineering","regulatory"].includes(e?.profile)&&e?.mode==="builtin_evidence_gate":e?.schema==="deepbom.review_policy.v1"&&co(e?.policy_sha256)&&co(e?.source_file_sha256)&&["observe","enforce"].includes(e?.mode)}Gf();Ce();function Th({artifactSha256:e="",generatedAt:t="",profile:n="document"}={}){let i=K(`${Rh(e)||"unbound"}
|
|
32
32
|
${String(t)}
|
|
33
33
|
${String(n)}`);return`urn:uuid:${nK(i)}`}function Fd(e="",t="model"){let n=Rh(e);return n?`deepbom-model-sha256-${n}`:`deepbom-model-${Sh(t)}`}function Qd(e,t,n=""){return`deepbom-analyzer-${Sh(e)}-${Sh(t)}${n?`-${Sh(n)}`:""}`}function zh(e,t="",n=""){let i=String(e||"unversioned").trim(),o=String(t||"").trim().toLowerCase(),a=Rh(n),r=[];return/^[a-f0-9]{7,64}$/.test(o)&&r.push(`git.${o.slice(0,12)}`),a&&r.push(`bundle.${a.slice(0,12)}`),r.length?`${i}${i.includes("+")?".":"+"}${r.join(".")}`:i}function Oh(e="",t=""){let n=String(t||"").trim();if(n&&!/^(unknown|unbound|not[_ -]?declared|n\/a)$/i.test(n))return{version:n,basis:"artifact_embedded_or_supplied_version"};let i=Rh(e);return i?{version:`sha256-${i}`,basis:"full_artifact_sha256"}:{version:null,basis:"not_available"}}function nK(e){let t=String(e).slice(0,32).split("");t[12]="8",t[16]=(Number.parseInt(t[16],16)&3|8).toString(16);let n=t.join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function Rh(e){let t=String(e||"").trim().toLowerCase();return/^[a-f0-9]{64}$/.test(t)?t:""}function Sh(e){return encodeURIComponent(String(e||"unbound").trim().toLowerCase()).replaceAll("%","_")}var iK=/^(?:unknown|unbound|not[_ -]?(?:assessed|declared|embedded|available)|n\/a|none)$/i;function x0(e,t){let n=String(e??"").replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g," ").trim();return!n||iK.test(n)?"":n.slice(0,t)}function Bh(e={}){let t=e.metadata_presence||{},n=x0(t.metadata_model_description||t.description||t.model_doc_string,16384),i=x0(t.metadata_author,1024),o=x0(t.metadata_license,4096);return{...n?{description:n}:{},...i?{authors:[{name:i}]}:{},...o?{licenses:[{license:{name:o}}]}:{}}}function Dh(e,{evidencePointer:t="/format_extensions/safetensors/quantization_contract"}={}){if(String(e?.format||"").toLowerCase()!=="safetensors")return[];let n=e?.safetensors?.quantization_contract;return n?.schema!==hd?[]:[["deepbom:model:packedWeightQuantizationContractSchema",n.schema],["deepbom:model:packedWeightQuantizationStatus",n.status],["deepbom:model:packedWeightQuantizationMethod",n.method],["deepbom:model:packedWeightQuantizationBits",n.bits],["deepbom:model:packedWeightQuantizationGranularity",n.granularity],["deepbom:model:packedWeightQuantizationGroupSize",n.group_size],["deepbom:model:packedWeightQuantizationModuleCount",n.module_count],["deepbom:model:packedWeightQuantizationInvalidModuleCount",n.invalid_module_count],["deepbom:model:packedWeightQuantizationConfigurationScope",n.configuration_scope],["deepbom:model:activationQuantizationContractCount",n.activation_quantization_contract_count],["deepbom:model:activationQuantizationInvalidContractCount",(n.activation_quantization_contracts||[]).filter(i=>i.status==="fail").length],["deepbom:model:quantizationShardOwnershipStatus",n.shard_ownership?.status],["deepbom:model:quantizationShardBoundTensorCount",n.shard_ownership?.shard_bound_tensor_count],["deepbom:model:quantizationTensorCount",n.shard_ownership?.tensor_count],["deepbom:model:packedWeightQuantizationSourceCommit",n.source?.commit],["deepbom:model:packedWeightQuantizationSourceSha256",n.source?.sha256],["deepbom:model:packedWeightQuantizationEvidencePointer",t]]}var W5=Object.freeze({schema:"deepbom.interface_boundary_corpus_validation_profile.v1",profileId:"quant-policy-boundary-public-50-2026-08-05",profileUrl:"https://deepbom.org/reference/quant-policy-boundary-validation.v1.json",profileSha256:"991eb12596486da9841022efaf3b9a13a79f632d5c6349e7ad3dd677a55338f9",manifestSha256:"9ec7fdf97c8fcc8e14d3b9b5a61ffafe05d0e90e5a58005cdca51a1d886f0540",verifierSchema:"deepbom.interface_boundary_corpus_review.v1",verifierImplementationSha256:"d316401f638ce32642c52afad59b33858326e852f9f63d94c84ebcaacf0ec5c6",reviewSha256:"617630133a28f10cb6d121e0a265e4d9fa051381357e0c32473eaf17aedc62c6",ledgerSha256:"3abd2f6148e150b6e1b6ed523c4f2ed037a972053a740ad2b0af1e8132577e12",analyzerWasmSha256:"95aec2444fa76c1ef6fd636c1003b7e01c78f79f24962a3180af0158fa454a1e",artifactCount:50,externalParameterCount:114,interpretationBoundary:"Pinned corpus validation evidence; it does not validate the current artifact or estimate ecosystem prevalence."});function Mh(){let e=W5;return[["deepbom:validation:interfaceCorpusProfileId",e.profileId],["deepbom:validation:interfaceCorpusProfileSha256",e.profileSha256],["deepbom:validation:interfaceCorpusManifestSha256",e.manifestSha256],["deepbom:validation:interfaceCorpusVerifierSchema",e.verifierSchema],["deepbom:validation:interfaceCorpusVerifierImplementationSha256",e.verifierImplementationSha256],["deepbom:validation:interfaceCorpusReviewSha256",e.reviewSha256],["deepbom:validation:interfaceCorpusLedgerSha256",e.ledgerSha256],["deepbom:validation:interfaceCorpusAnalyzerWasmSha256",e.analyzerWasmSha256],["deepbom:validation:interfaceCorpusArtifactCount",e.artifactCount],["deepbom:validation:interfaceCorpusExternalParameterCount",e.externalParameterCount],["deepbom:validation:interfaceCorpusBoundary",e.interpretationBoundary]]}function $h(){let e=W5;return{type:"evidence",url:e.profileUrl,comment:"Hash-pinned validation profile for the external interface quantization-contract corpus; not evidence about the currently analyzed artifact.",hashes:[{alg:"SHA-256",content:e.profileSha256}]}}function Lh(e){let t=e?.tensorrt_static_preflight;if(t?.schema!=="deepbom.tensorrt_static_preflight.v1")return[];let n=t.parser_observation,i=t.engine_inspector_evidence,o=n||i?.runtime||null,a=t.projection?.state_counts||{};return[["deepbom:model:tensorRtStaticPreflightSchema",t.schema],["deepbom:model:tensorRtStaticPreflightStatus",t.status],["deepbom:model:tensorRtStaticPreflightEvidenceClass",t.evidence_class],["deepbom:model:tensorRtBuildProfileSha256",t.build_profile?.profile_sha256],["deepbom:model:tensorRtExecutionPath",t.build_profile?.execution_path],["deepbom:model:tensorRtParserApiMethod",n?.api_method],["deepbom:model:tensorRtVersion",o?.tensorrt_version],["deepbom:model:tensorRtCudaVersion",o?.cuda_version],["deepbom:model:tensorRtDeviceIdentity",o?.device_identity],["deepbom:model:tensorRtConditionallyEligibleOperatorCount",a.CONDITIONALLY_ELIGIBLE],["deepbom:model:tensorRtDefiniteExclusionOperatorCount",a.DEFINITE_EXCLUSION],["deepbom:model:tensorRtUnresolvedOperatorCount",a.UNRESOLVED],["deepbom:model:tensorRtCollectorBinarySha256",n?.collector?.binary_sha256],["deepbom:model:tensorRtCollectorSourceSetSha256",n?.collector?.source_set_sha256],["deepbom:model:tensorRtCollectorGitCommit",n?.collector?.git_commit],["deepbom:model:tensorRtCollectorGitState",n?.collector?.git_state],["deepbom:model:tensorRtOptimizationProfileCostSchema",t.optimization_profile_cost?.schema],["deepbom:model:tensorRtOptimizationProfileCostStatus",t.optimization_profile_cost?.status],["deepbom:model:tensorRtOptimizationProfileCostScenarioCount",t.optimization_profile_cost?.scenario_count],["deepbom:model:tensorRtEngineInspectorSchema",i?.schema],["deepbom:model:tensorRtEngineInspectorStatus",i?.status],["deepbom:model:tensorRtEngineInspectorEvidenceClass",i?.evidence_class],["deepbom:model:tensorRtEngineSha256",i?.engine?.sha256],["deepbom:model:tensorRtEngineByteLength",i?.engine?.byte_length],["deepbom:model:tensorRtEngineLayerCount",i?.engine_layer_count],["deepbom:model:tensorRtEngineIoTensorCount",i?.io_tensor_count],["deepbom:model:tensorRtTacticAnnotatedLayerCount",i?.tactic_annotated_layer_count],["deepbom:model:tensorRtMultiSourceMetadataLayerCount",i?.multi_source_metadata_layer_count],["deepbom:model:tensorRtEngineSourceMappingStatus",i?.source_mapping_status],["deepbom:model:tensorRtArtifactEngineRelation",i?.artifact_engine_relation],["deepbom:model:tensorRtInspectorSchemaGeneration",i?.inspector?.schema_generation],["deepbom:model:tensorRtInspectorProfilingVerbosity",i?.inspector?.profiling_verbosity],["deepbom:model:tensorRtInspectorExecutionContextBound",i?.inspector?.execution_context_bound],["deepbom:model:tensorRtInspectorCanonicalJsonSha256",i?.inspector?.canonical_json_sha256],["deepbom:model:tensorRtEngineBuildCaptureClass",i?.build_capture?.evidence_class],["deepbom:model:tensorRtEngineBuildToolBinarySha256",i?.build_capture?.tool_binary_sha256],["deepbom:model:tensorRtEngineBuildInvocationSha256",i?.build_capture?.invocation_sha256],["deepbom:model:tensorRtEvidencePointer","/format_extensions/onnx/tensorrt_static_preflight"]]}Vd();Hh();Vd();Me();Ce();var S0="deepbom.graph_ir.v1",Ez=/^[a-f0-9]{64}$/;function Iz(e){let t=$a(e),n=t.graph.status==="serialized"?CK(t):kK(t);return TK(n),Object.freeze({...n,graph_ir_sha256:K(Q(n))})}function CK(e){let t=e.graph,n=t.primary_scope_ref,i=t.operators.filter(p=>p.scope_ref===n),o=t.values.filter(p=>p.scope_ref===n),a=new Map(o.map(p=>[p.id,p])),r=e.overlays.static.find(p=>p.kind==="static_placement")||null,s=new Map((r?.rows||[]).map(p=>[p.subject_ref,Cz(p)])),c=i.map(p=>({id:p.legacy_graph_node_id,index:p.native_index,kind:"operator",label:p.op_type,secondary_label:p.name&&p.name!==p.op_type?p.name:null,domain:p.domain,stage:p.topology.stage,topo_depth:p.topology.depth,input_tensor_indices:p.inputs.map(d=>a.get(d.value_ref)?.native_index).filter(Number.isSafeInteger),output_tensor_indices:p.outputs.map(d=>a.get(d.value_ref)?.native_index).filter(Number.isSafeInteger),output_shapes:p.outputs.map(d=>a.get(d.value_ref)?.shape||[]),macs:vi(p.metrics.macs),estimated_bytes:vi(p.metrics.logical_io_bytes),quantization:vi(p.quantization_summary),placement:s.get(p.id)||SK(),artifact_ir_subject_ref:p.id})),u=new Map(i.map(p=>[p.id,p.legacy_graph_node_id])),l=new Set(t.outputs),_=[];for(let p of o){let d=p.producer&&u.get(p.producer.operator_ref)||null;if(!p.consumers.length){d&&l.has(p.id)&&_.push(Nz(p,d,null,"model_output",p.producer?.port,null));continue}for(let m of p.consumers){let f=u.get(m.operator_ref)||null;f&&_.push(Nz(p,d,f,d?"operator_tensor":"model_input_or_constant",p.producer?.port,m.port))}}return{schema:S0,evidence_class:"OBSERVED_SERIALIZED_GRAPH_WITH_DERIVED_RELATIONSHIPS",format:e.artifact.format,artifact:kz(e.artifact),artifact_ir_schema:e.schema,artifact_ir_sha256:e.artifact_ir_sha256,projection:{kind:"serialized_executable_graph",executable_dag_claim:!0,source:"deepbom.artifact_ir.v2.graph",compatibility_status:"primary_scope_projection_only",source_scope_ref:n,omitted_materialized_scope_count:t.scopes.filter(p=>p.id!==n&&p.materialization_status==="materialized").length,placement_evidence:vi(r?.summary||null)},totals:{node_count:c.length,tensor_count:o.length,edge_count:_.length,macs:vi(t.totals.macs),assessed_macs:vi(t.totals.assessed_macs),mac_assessment:vi(t.totals.mac_assessment)},inputs:t.inputs.map(p=>a.get(p)?.native_index).filter(Number.isSafeInteger),outputs:t.outputs.map(p=>a.get(p)?.native_index).filter(Number.isSafeInteger),nodes:c,edges:_,interpretation_boundary:"Deprecated compatibility projection from deepbom.artifact_ir.v2. graph_ir.v1 projects only the primary serialized scope so nested or conditional scopes are never flattened into a false execution DAG. New consumers must use artifact_ir.v2 for complete scoped evidence. Placement remains a separate overlay and does not imply observed accelerator assignment unless its evidence class explicitly says so."}}function kK(e){let t=e.architecture_projection,n=t.nodes.length?t.nodes:e.storage_topology.objects,i=e.overlays.static.find(s=>s.kind==="static_placement")||null,o=new Map((i?.rows||[]).map(s=>[s.subject_ref,Cz(s)])),a=n.map((s,c)=>{let u=s.kind==="decoder_layer_storage_group",l=Number.isSafeInteger(Number(s.native_index))?Number(s.native_index):c,_=s.id;return{id:u?`layer:${l}`:`storage:${l}`,index:l,kind:u?"architecture_layer":"storage_namespace",label:String(s.label||s.name||`Storage ${l}`),secondary_label:s.tensor_count!=null?`${s.tensor_count} tensors`:null,domain:e.artifact.format,stage:u?"decoder":"storage",topo_depth:l,input_tensor_indices:[],output_tensor_indices:[],output_shapes:[],macs:null,estimated_bytes:vi(s.serialized_bytes||s.serialized_byte_length||null),quantization:{state:"container_tensor_storage",risk:"not_assessed_at_non_graph_projection"},placement:o.get(_)||{status:"NOT_APPLICABLE",backend:null,evidence_state:"NOT_APPLICABLE",evidence_class:"NOT_APPLICABLE"},artifact_ir_subject_ref:_}}),r=t.kind==="llm_layer_storage";return{schema:S0,evidence_class:r?"OBSERVED_TENSOR_NAMESPACE_WITH_DERIVED_LAYER_GROUPING":"OBSERVED_TENSOR_DIRECTORY_WITH_DERIVED_NAMESPACE_GROUPING",format:e.artifact.format,artifact:kz(e.artifact),artifact_ir_schema:e.schema,artifact_ir_sha256:e.artifact_ir_sha256,projection:{kind:r?"llm_layer_storage_architecture_projection":"tensor_storage_namespace_projection",executable_dag_claim:!1,source:"deepbom.artifact_ir.v2.architecture_projection",placement_scenario:vi(i?.summary||null)},totals:{node_count:a.length,tensor_count:e.storage_topology.objects.length,edge_count:0,macs:null,assessed_macs:null,mac_assessment:null},inputs:[],outputs:[],nodes:a,edges:[],interpretation_boundary:"Compatibility projection from deepbom.artifact_ir.v2. GGUF and SafeTensors do not serialize an executable operator DAG. Architecture and storage nodes have no synthesized execution edges and must not be read as runtime lowering, kernel order, placement, or execution flow."}}function Nz(e,t,n,i,o,a){let r=Number.isSafeInteger(Number(o))?Number(o):null,s=Number.isSafeInteger(Number(a))?Number(a):null;return{id:`tensor:${e.native_index}:${t||"external"}:p${r??"external"}:${n||"external"}:p${s??"external"}`,tensor_index:e.native_index,tensor_name:e.name,from:t,to:n,relation:i,source_port:r,target_port:s,dtype:e.dtype,shape:vi(e.shape),byte_length:vi(e.logical_byte_length),artifact_ir_value_ref:e.id}}function Cz(e){let t=String(e.state||"NOT_ASSESSABLE");return{status:t==="UNRESOLVED"?"NOT_ASSESSABLE":t,backend:e.backend||null,evidence_state:e.evidence_state||"NOT_ASSESSABLE",evidence_class:e.evidence_class||"NOT_ASSESSABLE",reason_codes:vi(e.reason_codes||[]),unresolved_predicates:vi(e.unresolved_predicates||[])}}function SK(){return{status:"NOT_ASSESSABLE",backend:null,evidence_state:"NOT_ASSESSABLE",evidence_class:"NOT_ASSESSABLE",reason_codes:[],unresolved_predicates:[]}}function TK(e){if(e?.schema!==S0||!Vs(e.format,40)||!Ez.test(String(e.artifact?.sha256||"")))throw new Error("Graph IR identity is invalid.");if(e.artifact_ir_schema!=="deepbom.artifact_ir.v2"||!Ez.test(String(e.artifact_ir_sha256||"")))throw new Error("Graph IR Artifact IR binding is invalid.");if(!Array.isArray(e.nodes)||!Array.isArray(e.edges)||e.totals?.node_count!==e.nodes.length||e.totals?.edge_count!==e.edges.length)throw new Error("Graph IR count conservation failed.");if(e.projection?.executable_dag_claim===!0){let i=e.nodes.reduce((o,a)=>o+BigInt(a.macs?.decimal||"0"),0n);if(String(e.totals?.assessed_macs?.decimal??"")!==String(i)||e.totals?.mac_assessment?.unassessed_compute_op_count>0&&e.totals?.macs!=null||e.totals?.mac_assessment?.unassessed_compute_op_count===0&&String(e.totals?.macs?.decimal??"")!==String(i))throw new Error("Graph IR MAC assessment does not conserve assessed node MACs.")}else if(e.edges.length)throw new Error("Graphless Graph IR projection contains synthesized edges.");let t=new Set;for(let i of e.nodes){if(!Vs(i.id,160)||t.has(i.id)||!Vs(i.label,500)||!Vs(i.artifact_ir_subject_ref,600))throw new Error("Graph IR node identity is invalid.");t.add(i.id)}let n=new Set;for(let i of e.edges){if(!Vs(i.id,600)||n.has(i.id)||i.from&&!t.has(i.from)||i.to&&!t.has(i.to)||!Vs(i.artifact_ir_value_ref,600))throw new Error("Graph IR edge identity is invalid.");n.add(i.id)}if(!Vs(e.interpretation_boundary,1800))throw new Error("Graph IR interpretation boundary is missing.")}function kz(e){return{filename:e.filename,sha256:e.sha256,byte_length:vi(e.byte_length),artifact_set_sha256:e.artifact_set_sha256}}function Vs(e,t){let n=String(e||"").trim();return n.length>0&&n.length<=t}function vi(e){return e==null?e:JSON.parse(JSON.stringify(e))}Xd();Me();Ce();Xd();var Kz="deepbom.model_summary.v1",Zz="1.0.0",Wd=Object.freeze(["auto","operation","block","storage"]);function Yd(e,{level:t="auto"}={}){let n=Br(e);if(!Wd.includes(t))throw new Error(`Model summary level must be one of: ${Wd.join(", ")}.`);let i=pZ(n,t),o=i==="operation"?Yz(n):i==="block"?mZ(n):i==="storage"?fZ(n):[],a=hZ(n),r=o.length?"materialized":i==="identity"?"not_assessable_safe_envelope_only":"not_applicable_for_selected_level",s={schema:Kz,method_version:Zz,source_contract:{schema:n.schema,model_ir_sha256:n.model_ir_sha256,artifact_sha256:n.artifact.sha256},hash_contract:{algorithm:"SHA-256",canonicalization:"RFC8785-JCS",source_encoding:"UTF-8",excluded_pointers:["/model_summary_sha256"]},artifact:structuredClone(n.artifact),artifact_role:n.artifact_role,projection:{requested_level:t,selected_level:i,status:r,selection_basis:yZ(n,i),ordering:bZ(n,i)},columns:AZ(i),rows:o,totals:a,coverage:{program:n.program.completeness,storage:n.tensors_and_storage.completeness,bindings:n.weight_bindings.status,quantization:n.quantization.status,loss_count:n.loss_ledger.count,unknown_is_zero:!1},trainability:{status:"not_assessable_from_serialized_deployment_artifact",trainable_parameter_count:null,non_trainable_parameter_count:null,explanation:"Serialized values and storage are reported separately from framework trainability. DEEPBOM does not relabel bound constants as trainable parameters without an identity-bound declaration or source-framework contract."},loss_ledger:structuredClone(n.loss_ledger),interpretation_boundary:"This is a deterministic tabular projection of deepbom.model_ir.v1. Operation rows are serialized program subjects; block rows are reversible structural groups, not framework layers or runtime fusion; storage rows are serialized objects, not trainable parameters or runtime allocations. Display order is not runtime order. Unknown and not-assessable values are never converted to zero. This engineering evidence does not establish model quality, safety, regulatory compliance, standard conformance, or actual runtime behavior."};return Jz(s),H0({...s,model_summary_sha256:K(Q(s))})}function Jh(e){let t=structuredClone(e),n=String(t.model_summary_sha256||"").toLowerCase();if(delete t.model_summary_sha256,Jz(t),!/^[a-f0-9]{64}$/.test(n)||n!==K(Q(t)))throw new Error("Model summary SHA-256 is invalid.");return H0({...t,model_summary_sha256:n})}function Xz(e){let t=Jh(e),n=["DEEPBOM format-neutral model summary",`Artifact: ${t.artifact.filename} | ${t.artifact.format} | sha256:${t.artifact.sha256}`,`Projection: ${t.projection.selected_level} | ${t.projection.status} | Model IR sha256:${t.source_contract.model_ir_sha256}`];if(t.rows.length){n.push("ORDER NAME NATIVE TYPE OUTPUT CONTRACT BOUND STORAGE SERIALIZED ELEMENTS SERIALIZED BYTES MACS EVIDENCE");for(let i of t.rows)n.push(eO(i).join(" "))}else n.push("No operation, block, or storage row can be materialized for this artifact/profile.");return n.push(`Totals: ${t.totals.operation_count} operations | ${t.totals.logical_value_count} logical values | ${t.totals.storage_object_count} storage objects | ${Zs(t.totals.unique_serialized_element_count)} serialized elements | ${Zs(t.totals.unique_serialized_byte_length)} serialized bytes`,`Trainability: ${t.trainability.status}`,`Summary: sha256:${t.model_summary_sha256}`,`Evidence boundary: ${t.interpretation_boundary}`),`${n.join(`
|
|
34
34
|
`)}
|
|
@@ -57,7 +57,7 @@ ${s.stderr||""}`.trim();return{tool:await OR(n,r,c,a,s.status===0?"observed":"ex
|
|
|
57
57
|
`}function vJ(e,t){let n=t.filter(c=>c.view==="exhaustive"),i=e.program.operations.length||e.tensors_and_storage.storage_objects.length,o=n.reduce((c,u)=>c+u.rendered_member_count,0),a=new Set(e.program.operations.map(c=>c.id)),r=e.program.relationships.filter(c=>["data_dependency","control_dependency","state_dependency","call"].includes(c.kind)&&a.has(c.from_ref)&&a.has(c.to_ref)).length,s=n.reduce((c,u)=>c+u.rendered_relationship_count,0);return{exhaustive_subject_kind:e.program.operations.length?"serialized_operation":"serialized_storage_object",expected_count:i,rendered_count:o,omitted_count:i-o,duplicate_count:d8(n.flatMap(c=>c.subject_refs)),expected_relationship_count:r,rendered_relationship_count:s,omitted_relationship_count:r-s,duplicate_relationship_count:d8(n.flatMap(c=>c.relationship_refs)),status:i===o&&r===s?"conserved":"failed"}}function wJ(e,t,n,i){let o=e.program.status==="serialized"?"Program relationships originate from the serialized artifact graph.":"The artifact does not serialize a program graph; no execution flow is synthesized from storage names.";return`Figure ${t.level}-${n}. ${t.title} for ${e.artifact.filename} (SHA-256 ${e.artifact.sha256.slice(0,12)}), page ${n} of ${i}. ${o} ${t.boundary}`}function xJ(e,t){let n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n}function EJ(e,t){if(!e.some(a=>a.page_group))return xJ(e,t);let n=[];for(let a of e){let r=a.page_group||a.subject_ref,s=n.at(-1);s?.key===r?s.rows.push(a):n.push({key:r,rows:[a]})}let i=[],o=[];for(let a of n){if(a.rows.length<=t){o.length&&o.length+a.rows.length>t&&(i.push(o),o=[]),o.push(...a.rows);continue}o.length&&(i.push(o),o=[]);for(let r=0;r<a.rows.length;r+=t)i.push(a.rows.slice(r,r+t))}return o.length&&i.push(o),i}function m8(e){let t=String(e||"").toUpperCase();return t.includes("NOT_ASSESSABLE")?"not-assessable":t.includes("DECLARED")?"declared":t.includes("DERIVED")||t.includes("PREDICTED")||t.includes("INFERRED")?"derived":"observed"}function NJ(e){let t=[...new Set(e.map(n=>m8(n.evidence_class)))];return t.length?t.join(" + "):"not assessable"}function f8(e){let t=e.metrics?.macs?.decimal,n=e.input_port_refs?.length||0,i=e.output_port_refs?.length||0;return`source ${e.source_order??"?"} | dependency ${e.dependency_order??"partial"} | display ${e.display_order??"?"} | ${n} in / ${i} out${t==null?"":` | ${t} MACs`}`}function IJ(e,t){let n=new Set(t.input_port_refs||[]),i=e.program.ports.filter(c=>n.has(c.id)),o=new Map(e.program.values.map(c=>[c.id,c])),a=new Map(e.tensors_and_storage.storage_objects.map(c=>[c.id,c])),r=[];for(let c of i){let u=o.get(c.value_ref);for(let l of u?.storage_refs||[]){let _=a.get(l);_&&r.push(`${_.name||_.id}:${h8(_.encoding)}:${Hw(_.shape)}`)}}let s=i.slice(0,3).map(c=>{let u=o.get(c.value_ref);return`${u?.dtype||"?"}${Hw(u?.shape)}`});return`${f8(t)} | inputs ${s.join(", ")||"not materialized"}${r.length?` | W ${r.slice(0,3).join(", ")}`:" | W -"}`}function Hw(e){return Array.isArray(e)&&e.length?`[${e.join(", ")}]`:"shape unknown"}function h8(e){return e?.name||e?.id||e?.kind||e||"encoding unknown"}function CJ(e){return e?.decimal==null?"bytes unknown":`${e.decimal} serialized bytes`}function d8(e){return e.length-new Set(e).size}function g8(e,t,n){return n.indexOf(e)===t}function xg(e,t){let n=String(e??"").replace(/[\r\n]+/g," ");return n.length<=t?n:`${n.slice(0,t-1)}\u2026`}function Fn(e){return String(e??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}import{deflateSync as kJ}from"node:zlib";Ce();var b8=Object.freeze({" ":[0,0,0,0,0,0,0],"#":[10,31,10,10,31,10,0],"-":[0,0,0,31,0,0,0],".":[0,0,0,0,0,12,12],"/":[1,2,4,8,16,0,0],":":[0,12,12,0,12,12,0],_:[0,0,0,0,0,0,31],"?":[14,17,1,2,4,0,4],"|":[0,4,4,4,4,4,0],0:[14,17,19,21,25,17,14],1:[4,12,4,4,4,4,14],2:[14,17,1,2,4,8,31],3:[30,1,1,14,1,1,30],4:[2,6,10,18,31,2,2],5:[31,16,16,30,1,1,30],6:[14,16,16,30,17,17,14],7:[31,1,2,4,8,8,8],8:[14,17,17,14,17,17,14],9:[14,17,17,15,1,1,14],A:[14,17,17,31,17,17,17],B:[30,17,17,30,17,17,30],C:[14,17,16,16,16,17,14],D:[30,17,17,17,17,17,30],E:[31,16,16,30,16,16,31],F:[31,16,16,30,16,16,16],G:[14,17,16,23,17,17,15],H:[17,17,17,31,17,17,17],I:[14,4,4,4,4,4,14],J:[7,2,2,2,2,18,12],K:[17,18,20,24,20,18,17],L:[16,16,16,16,16,16,31],M:[17,27,21,21,17,17,17],N:[17,25,21,19,17,17,17],O:[14,17,17,17,17,17,14],P:[30,17,17,30,16,16,16],Q:[14,17,17,17,21,18,13],R:[30,17,17,30,20,18,17],S:[15,16,16,14,1,1,30],T:[31,4,4,4,4,4,4],U:[17,17,17,17,17,17,14],V:[17,17,17,17,17,10,4],W:[17,17,17,21,21,21,10],X:[17,17,10,4,10,17,17],Y:[17,17,10,4,4,4,4],Z:[31,1,2,4,8,16,31]});function A8(e,t={}){let n=lp(e,t);return n.pages.map(i=>{let o=SJ(i,e,t.orientation||n.manifest.orientation);return{name:i.filename.replace(/\.svg$/,".png"),data:o,media_type:"image/png",sha256:Mo(o),source_svg_sha256:i.sha256,derivation:"deepbom_builtin_5x7_font_black_white_png_300dpi_v1"}})}function SJ(e,t,n){let i=n==="landscape"?3508:2480,o=n==="landscape"?2480:3508,a=new Uint8Array(i*o*4);zJ(a,[255,255,255,255]);let r=90;y8(a,i,o,55,55,i-110,o-110,!1),oc(a,i,o,r,100,`${e.render_model.projection.level} ${e.render_model.projection.title}`,4),oc(a,i,o,r,145,t.artifact.filename,3),oc(a,i,o,r,180,`ARTIFACT SHA256 ${t.artifact.sha256.slice(0,16)} PAGE ${e.page_number} OF ${e.page_count}`,2);let s=e.render_model.rows,c=Math.floor((o-390)/Math.max(1,n==="landscape"?12:22));for(let[u,l]of s.entries()){let _=230+u*c;y8(a,i,o,r,_,i-r*2,c-8,TJ(l.evidence_class)),oc(a,i,o,r+14,_+10,`${l.kind} | ${l.title}`.slice(0,n==="landscape"?112:76),5),oc(a,i,o,r+14,_+52,l.detail.slice(0,n==="landscape"?112:76),5),oc(a,i,o,r+14,_+94,l.subject_ref.slice(0,n==="landscape"?112:76),5)}return oc(a,i,o,r,o-105,`DEEPBOM MODEL IR ${t.method_version} ${t.model_ir_sha256.slice(0,16)}`,2),OJ(i,o,a)}function TJ(e){return/DERIVED|PREDICTED|NOT_ASSESSABLE|INFERRED/i.test(String(e||""))}function zJ(e,t){for(let n=0;n<e.length;n+=4)e.set(t,n)}function v8(e,t,n,i,o,a=!0){i<0||o<0||i>=t||o>=n||e.set(a?[0,0,0,255]:[255,255,255,255],(o*t+i)*4)}function Eg(e,t,n,i,o,a,r,s=!1){let c=Math.abs(a-i),u=i<a?1:-1,l=-Math.abs(r-o),_=o<r?1:-1,p=c+l,d=0;for(;(!s||Math.floor(d/8)%2===0)&&v8(e,t,n,i,o),!(i===a&&o===r);){let m=2*p;m>=l&&(p+=l,i+=u),m<=c&&(p+=c,o+=_),d+=1}}function y8(e,t,n,i,o,a,r,s){Eg(e,t,n,i,o,i+a-1,o,s),Eg(e,t,n,i,o+r-1,i+a-1,o+r-1,s),Eg(e,t,n,i,o,i,o+r-1,s),Eg(e,t,n,i+a-1,o,i+a-1,o+r-1,s)}function oc(e,t,n,i,o,a,r){let s=i;for(let c of String(a).toUpperCase()){let u=b8[c]||b8["?"];for(let l=0;l<7;l+=1)for(let _=0;_<5;_+=1)if(u[l]&1<<4-_)for(let p=0;p<r;p+=1)for(let d=0;d<r;d+=1)v8(e,t,n,s+_*r+d,o+l*r+p);if(s+=6*r,s>=t-80)break}}function OJ(e,t,n){let i=e*4,o=Buffer.alloc((i+1)*t);for(let s=0;s<t;s+=1){let c=s*(i+1);o[c]=0,Buffer.from(n.buffer,n.byteOffset+s*i,i).copy(o,c+1)}let a=Buffer.from([137,80,78,71,13,10,26,10]),r=Buffer.alloc(13);return r.writeUInt32BE(e,0),r.writeUInt32BE(t,4),r[8]=8,r[9]=6,Buffer.concat([a,Zw("IHDR",r),Zw("IDAT",kJ(o,{level:9})),Zw("IEND",Buffer.alloc(0))])}function Zw(e,t){let n=Buffer.from(e,"ascii"),i=Buffer.concat([n,t]),o=Buffer.alloc(12+t.length);return o.writeUInt32BE(t.length,0),i.copy(o,4),o.writeUInt32BE(RJ(i),8+t.length),o}function RJ(e){let t=4294967295;for(let n of e){t^=n;for(let i=0;i<8;i+=1)t=t>>>1^(t&1?3988292384:0)}return(t^4294967295)>>>0}Gf();Me();Ce();var Xw="deepbom.coreml_compute_plan.v1",BJ=new Set(["ALL","CPU_ONLY","CPU_AND_GPU","CPU_AND_NE"]),DJ=new Set(["neuralnetwork","program"]),Ng=new Set(["CPU","GPU","NEURAL_ENGINE"]);function x8(e,t,{fileSha256:n=null}={}){PJ(t);let i=typeof e=="string"?qJ(e):e;if(!i||i.schema!==Xw)throw new Error(`Core ML compute-plan evidence must use ${Xw}.`);let o=Fl(i.artifact?.sha256,"compute-plan artifact SHA-256");if(i.artifact?.format!=="coreml"||o!==Fl(t.model_sha256,"active artifact SHA-256"))throw new Error("Core ML compute-plan evidence is not bound to the active artifact SHA-256.");let a=Fl(i.runtime?.coremltools_compute_plan_source_sha256,"coremltools compute-plan source SHA-256"),r=Fl(i.runtime?.compiled_model_content_sha256,"compiled model content SHA-256"),s=Zt(i.configuration?.compute_units,"Core ML compute units");if(!BJ.has(s))throw new Error(`Unsupported Core ML compute units: ${s}.`);let c=t.coreml?.model_type==="mlProgram"?"program":t.coreml?.neural_network?"neuralnetwork":null,u=Zt(i.structure?.kind,"Core ML compute-plan structure kind");if(!DJ.has(u)||c!==u)throw new Error(`Core ML compute-plan structure ${u} does not match the decoded artifact representation ${c||"unavailable"}.`);let l=$J(i.configuration?.function_name,t,u),_=LJ(i.runtime?.available_compute_devices),p=Array.isArray(t.ops)?t.ops:[],d=MJ(i.structure?.rows,p,u,s,new Set(_.map(v=>v.type)));if(Number(i.structure?.operation_count)!==d.length||d.length!==p.length)throw new Error("Core ML compute-plan operation count does not match the decoded static graph.");let m=FJ(i.capture?.collected_at,"compute-plan capture timestamp"),f=Zt(i.capture?.capture_id,"compute-plan capture ID"),g=Zt(i.capture?.collector?.name,"compute-plan collector name"),h=Zt(i.capture?.collector?.version,"compute-plan collector version"),b=Fl(i.capture?.collector?.source_sha256,"compute-plan collector source SHA-256"),A=d.filter(v=>v.estimated_cost_weight!=null),y=UJ(d.map(v=>v.preferred_compute_device||"not_determined")),x={schema:Xw,evidence_class:"COREML_COMPUTE_PLAN_ESTIMATE",artifact:{format:"coreml",filename:i.artifact?.filename||t.filename||null,sha256:o},runtime:{coremltools_version:Zt(i.runtime?.coremltools_version,"coremltools version"),coremltools_compute_plan_source_sha256:a,pinned_source_alignment:a===Uf.compute_plan_sha256?"exact_pinned_compute_plan_source":"different_coremltools_compute_plan_source",compiled_model_content_sha256:r,platform:Zt(i.runtime?.platform,"Core ML runtime platform"),architecture:Zt(i.runtime?.architecture,"Core ML runtime architecture"),platform_system:jJ(i.runtime?.platform_system,"Darwin","Core ML capture platform system"),macos_version:Zt(i.runtime?.macos_version,"macOS version"),os_build:Zt(i.runtime?.os_build,"macOS build"),hardware_model:Zt(i.runtime?.hardware_model,"Apple hardware model"),python_version:Zt(i.runtime?.python_version,"Python version"),available_compute_devices:_},configuration:{compute_units:s,function_name:l},capture:{capture_id:f,collected_at:m,collector:{name:g,version:h,source_sha256:b},import_file_sha256:n?Fl(n,"compute-plan import file SHA-256"):null},structure:{kind:u,operation_count:d.length,rows:d},summary:{mapped_operation_count:d.length,preferred_compute_device_counts:y,estimated_cost_operation_count:A.length,estimated_cost_weight_sum:A.reduce((v,I)=>v+I.estimated_cost_weight,0),unresolved_device_usage_count:d.filter(v=>!v.preferred_compute_device).length},runtime_identity_status:"bound",execution_status:"not_observed_compute_plan_only",compatibility_conclusion:"compiled_model_compute_plan_imported",source:{...Uf},boundary:"The imported MLComputePlan is a runtime-produced estimate for one compiled model and compute-unit configuration. Preferred/supported devices and cost weights are not observed execution placement or measured timing. The browser binds identities and static op order but does not re-run Core ML."};return{...x,normalized_manifest_sha256:K(Q(x))}}function MJ(e,t,n,i,o){if(!Array.isArray(e))throw new Error("Core ML compute-plan rows must be an array.");let a=new Set;return e.map((r,s)=>{let c=Number(r?.op_index);if(!Number.isSafeInteger(c)||c!==s||a.has(c))throw new Error("Core ML compute-plan op indices must be unique, contiguous, and ordered.");a.add(c);let u=t[s];if(!u)throw new Error(`Core ML compute-plan row ${s} has no decoded static op.`);let l=Zt(r.operator_type,`compute-plan operator type ${s}`),_=String(n==="program"?u.mil_operation_type||"":u.name||"");if(w8(l)!==w8(_))throw new Error(`Core ML compute-plan operator type mismatch at #${s}.`);let p=Zt(r.identity,`compute-plan operation identity ${s}`),d=String(u.coreml_layer_name||"");if(p!==d)throw new Error(`Core ML compute-plan operation identity mismatch at #${s}.`);let m=r.preferred_compute_device==null?null:Zt(r.preferred_compute_device,`preferred compute device ${s}`),f=QJ(r.supported_compute_devices||[],`supported compute devices ${s}`);if(m&&!Ng.has(m)||f.some(b=>!Ng.has(b)))throw new Error(`Unknown Core ML compute device at #${s}.`);if(m&&!f.includes(m))throw new Error(`Preferred Core ML compute device is not in the supported-device set at #${s}.`);if(m&&!o.has(m)||f.some(b=>!o.has(b)))throw new Error(`Core ML compute-plan row #${s} references a device absent from the captured host inventory.`);if(m&&!(i==="CPU_ONLY"?new Set(["CPU"]):i==="CPU_AND_GPU"?new Set(["CPU","GPU"]):i==="CPU_AND_NE"?new Set(["CPU","NEURAL_ENGINE"]):Ng).has(m))throw new Error(`Preferred Core ML compute device at #${s} violates compute-units ${i}.`);let h=r.estimated_cost_weight==null?null:Number(r.estimated_cost_weight);if(h!=null&&(!Number.isFinite(h)||h<0||h>1))throw new Error(`Core ML estimated cost weight at #${s} is outside [0,1].`);return{op_index:c,operator_type:l,identity:p,preferred_compute_device:m,supported_compute_devices:f,estimated_cost_weight:h}})}function $J(e,t,n){if(n==="neuralnetwork"){if(e!=null)throw new Error("NeuralNetwork compute-plan evidence must not declare an ML Program function name.");return null}let i=Object.keys(t.coreml?.ml_program?.functions||{}),o=t.coreml?.description?.default_function_name||(i.includes("main")?"main":i.length===1?i[0]:null);if(!o)throw new Error("The decoded ML Program function identity is ambiguous.");let a=Zt(e,"Core ML function name");if(a!==o)throw new Error(`Core ML compute-plan function ${a} does not match decoded function ${o}.`);return a}function LJ(e){if(!Array.isArray(e)||!e.length)throw new Error("Core ML available compute-device inventory is required.");let t=new Set;return e.map((n,i)=>{let o=Zt(n?.type,`Core ML compute-device type ${i}`);if(!Ng.has(o)||t.has(o))throw new Error("Core ML compute-device inventory contains an unknown or duplicate type.");t.add(o);let a=Zt(n?.source_class,`Core ML compute-device source class ${i}`),r=Number(n?.instance_count);if(!Number.isSafeInteger(r)||r<=0)throw new Error("Core ML compute-device inventory requires a positive instance count.");let s=n?.total_core_count==null?null:Number(n.total_core_count);if(o==="NEURAL_ENGINE"&&(!Number.isSafeInteger(s)||s<=0))throw new Error("Neural Engine compute-device inventory requires a positive total core count.");if(o!=="NEURAL_ENGINE"&&s!=null)throw new Error("Only Neural Engine inventory may declare total core count.");return{type:o,source_class:a,instance_count:r,total_core_count:s}})}function PJ(e){if(!e||e.format!=="coreml")throw new Error("Core ML compute-plan evidence requires an active Core ML audit.");if(!Array.isArray(e.ops)||!e.ops.length||!(e.coreml?.neural_network||e.coreml?.model_type==="mlProgram"))throw new Error("Core ML compute-plan evidence requires a decoded NeuralNetwork or ML Program graph; classical and pipeline structures are not accepted.")}function qJ(e){let t;try{t=JSON.parse(e)}catch{throw new Error("Core ML compute-plan JSON is invalid.")}if(!t||Array.isArray(t)||typeof t!="object")throw new Error("Core ML compute-plan evidence must be a JSON object.");return t}function Fl(e,t){let n=String(e||"").toLowerCase();if(!/^[a-f0-9]{64}$/.test(n))throw new Error(`${t} is required.`);return n}function Zt(e,t){let n=String(e||"").trim();if(!n||n.length>8192)throw new Error(`${t} is required and bounded.`);return n}function jJ(e,t,n){let i=Zt(e,n);if(i!==t)throw new Error(`${n} must be ${t}.`);return i}function FJ(e,t){let n=Zt(e,t),i=new Date(n);if(!Number.isFinite(i.getTime())||i.toISOString()!==n)throw new Error(`${t} must be an ISO-8601 UTC timestamp.`);return n}function w8(e){return String(e||"").replaceAll(/[^a-z0-9]/gi,"").toLowerCase()}function QJ(e,t){if(!Array.isArray(e))throw new Error(`${t} must be an array.`);let n=e.map(i=>Zt(i,t));if(new Set(n).size!==n.length)throw new Error(`${t} contains duplicates.`);return n}function UJ(e){let t={};for(let n of e)t[n]=(t[n]||0)+1;return t}Me();Ce();var GJ="deepbom.review_policy.v1",VJ="deepbom.review_policy_result.v1",Jw=/^[a-f0-9]{64}$/,HJ=["informational","low","medium","high"],Ww=new Map(HJ.map((e,t)=>[e,t]));function e1(e){let t=JJ(e);if(!t||t.schema!==GJ)throw new Error("Review policy schema is invalid.");let n=t.policy_sha256==null?null:String(t.policy_sha256).toLowerCase();if(delete t.policy_sha256,!["observe","enforce"].includes(t.mode))throw new Error("Review policy mode must be observe or enforce.");t.fail_on=C8(t.fail_on??"none",!0),t.required_capabilities=WJ(t.required_capabilities||[],"required capability",256),t.exceptions=Array.isArray(t.exceptions)?t.exceptions.map(KJ):[];let i=t.exceptions.map(a=>a.id);if(new Set(i).size!==i.length)throw new Error("Review policy exception ids must be unique.");let o=K(Q(t));if(n&&(!Jw.test(n)||n!==o))throw new Error("Review policy SHA-256 is invalid.");return Object.freeze({...t,policy_sha256:o})}function I8(e,t,{analyzerVersion:n=null,rulepackVersion:i=null,evaluatedAt:o=null,sourceFileSha256:a=null}={}){if(e?.schema!=="deepbom.artifact_evidence_envelope.v1")throw new Error("Review policy requires a canonical artifact evidence envelope.");let r=e1(t),s=o==null?null:Yw(o,"evaluation timestamp"),c=e.capabilities||{},u=new Set(c.assessed||[]),l=new Set(c.partial||[]),_=new Set(c.unavailable||[]),p=r.required_capabilities.filter(v=>!u.has(v)),d={status:p.length?"incomplete":"complete",required_capability_count:r.required_capabilities.length,assessed_required_capability_count:r.required_capabilities.length-p.length,missing_required_capabilities:p,partial_required_capabilities:r.required_capabilities.filter(v=>l.has(v)),unavailable_required_capabilities:r.required_capabilities.filter(v=>_.has(v))},m={artifact_sha256:e.identity?.sha256||null,cpu_target_profile_sha256:e.cpu_cost_target_binding?.profile_sha256||null,analyzer_version:n,rulepack_version:i},f=r.exceptions.map(v=>XJ(v,m,s)),g=new Set(f.filter(v=>v.status==="applicable").map(v=>v.finding_id)),h=Array.isArray(e.findings)?e.findings:[],b=r.fail_on==="none"?Number.POSITIVE_INFINITY:Ww.get(r.fail_on),A=h.filter(v=>!g.has(v.id)&&Ww.get(C8(v.severity))>=b),y={status:A.length?"block":"pass",fail_on:r.fail_on,finding_count:h.length,exception_suppressed_finding_count:h.filter(v=>g.has(v.id)).length,blocking_finding_count:A.length,blocking_finding_ids:A.map(v=>v.id)},x=d.status!=="complete"||y.status==="block";return{schema:VJ,status:r.mode==="observe"?"observe":x?"block":"pass",mode:r.mode,evaluated_at:s,execution_status:"completed",coverage_status:d.status,finding_policy_status:y.status,policy_identity:{schema:r.schema,policy_sha256:r.policy_sha256,source_file_sha256:YJ(a)?a:null},evaluation_identity:m,coverage:d,finding_policy:y,exceptions:f,evidence_envelope_sha256:e.envelope_sha256,interpretation_boundary:"Execution completion, analysis coverage, and finding policy are independent states. An exception applies only to its exact identity scope and cannot turn unavailable evidence into an assessed zero or a resolved finding."}}function KJ(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(`Review policy exception ${t} is invalid.`);let n={id:Pr(e.id,`exception ${t} id`,160),finding_id:Pr(e.finding_id,`exception ${t} finding id`,200),subject_ref:e.subject_ref==null?null:Pr(e.subject_ref,`exception ${t} subject ref`,300),reason:Pr(e.reason,`exception ${t} reason`,1200),owner:Pr(e.owner,`exception ${t} owner`,300),created_at:Yw(e.created_at,`exception ${t} created_at`),expires_at:e.expires_at==null?null:Yw(e.expires_at,`exception ${t} expires_at`),expires_when:e.expires_when==null?null:Pr(e.expires_when,`exception ${t} expires_when`,600),scope:ZJ(e.scope,t)};if(!n.expires_at&&!n.expires_when)throw new Error(`Review policy exception ${t} requires expires_at or expires_when.`);if(n.expires_at&&Date.parse(n.expires_at)<=Date.parse(n.created_at))throw new Error(`Review policy exception ${t} expires_at must be after created_at.`);return n}function ZJ(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(`Review policy exception ${t} scope is required.`);let n={artifact_sha256:N8(e.artifact_sha256,`exception ${t} artifact SHA-256`),cpu_target_profile_sha256:N8(e.cpu_target_profile_sha256,`exception ${t} target-profile SHA-256`),analyzer_version:E8(e.analyzer_version,100),rulepack_version:E8(e.rulepack_version,100)};if(!n.artifact_sha256)throw new Error(`Review policy exception ${t} must bind an artifact SHA-256.`);return n}function XJ(e,t,n){let i=[];for(let a of["artifact_sha256","cpu_target_profile_sha256","analyzer_version","rulepack_version"])e.scope[a]!=null&&e.scope[a]!==t[a]&&i.push(a);let o=e.expires_at!=null&&(n==null||Date.parse(n)>=Date.parse(e.expires_at));return{id:e.id,finding_id:e.finding_id,subject_ref:e.subject_ref,status:o?"expired":i.length?"scope_mismatch":"applicable",scope_mismatches:i,expires_at:e.expires_at,expires_when:e.expires_when,reason:e.reason,owner:e.owner}}function C8(e,t=!1){let n=String(e||"informational").toLowerCase();if(n==="info")return"informational";if(t&&n==="none"||Ww.has(n))return n;throw new Error(`Review policy severity ${e} is invalid.`)}function WJ(e,t,n){if(!Array.isArray(e))throw new Error(`Review policy ${t} list is invalid.`);let i=e.map(o=>Pr(o,t,n));if(new Set(i).size!==i.length)throw new Error(`Review policy ${t} values must be unique.`);return i.sort()}function Pr(e,t,n){let i=String(e||"").trim();if(!i||i.length>n)throw new Error(`Review policy ${t} is invalid.`);return i}function E8(e,t){return e==null?null:Pr(e,"scope text",t)}function Yw(e,t){let n=Date.parse(String(e||""));if(!Number.isFinite(n))throw new Error(`Review policy ${t} is invalid.`);return new Date(n).toISOString()}function N8(e,t){if(e==null)return null;let n=String(e).toLowerCase();if(!Jw.test(n))throw new Error(`Review policy ${t} is invalid.`);return n}function YJ(e){return typeof e=="string"&&Jw.test(e)}function JJ(e){return e==null?null:JSON.parse(JSON.stringify(e))}Pd();var eee="deepbom.onnx_external_data_structure_binding.v1",tee=/^[a-f0-9]{64}$/;function k8(e,t){let n=Array.isArray(e?.onnx_external_data?.tensors)?e.onnx_external_data.tensors:[],i=[...new Set(n.map(p=>String(p.normalized_location||"")).filter(Boolean))].sort(),o=new Map;for(let p of t||[]){let d=ree(p?.model_relative_path);if(o.has(d))throw new Error(`ONNX external-data structure binding repeats ${d}.`);let m=nee(p?.byte_length);if(!tee.test(String(p?.sha256||""))||m==null)throw new Error(`ONNX external-data structure binding identity is invalid for ${d}.`);o.set(d,{location:d,sha256:p.sha256,byte_length:m})}let a=i.filter(p=>!o.has(p)),r=[...o.keys()].filter(p=>!i.includes(p));if(a.length||r.length)throw new Error(`ONNX external-data closure differs from serialized locations: missing ${a.join(", ")||"none"}; unexpected ${r.join(", ")||"none"}.`);let s=0n,c=0n,u=new Map,l=new Map;for(let p of n){let d=o.get(String(p.normalized_location||"")),m=Ig(p.offset),f=Ig(p.expected_payload_bytes??p.length),g=Ig(p.range_end);if(!d||m==null||f==null||g==null||g!==m+f||g>d.byte_length)throw new Error(`ONNX external-data range is invalid for ${String(p.tensor_name||"unnamed tensor")}.`);let h=iee(p.shape);if(h==null)throw new Error(`ONNX external-data shape is invalid for ${String(p.tensor_name||"unnamed tensor")}.`);s+=f,c+=h;let b=String(p.dtype||"UNKNOWN"),A=u.get(b)||{dtype:b,tensor_count:0,element_count:0n,declared_payload_bytes:0n};A.tensor_count+=1,A.element_count+=h,A.declared_payload_bytes+=f,u.set(b,A);let y=l.get(d.location)||[];y.push({start:m,end:g}),l.set(d.location,y)}let _=0n;for(let p of l.values())_+=oee(p);return{schema:eee,status:"assessed_hash_bound_ranges_payload_numerical_decode_not_assessed",evidence_class:"OBSERVED_ACQUISITION/DERIVED_RANGE_VALIDATION",tensor_count:n.length,file_count:o.size,declared_payload_bytes:ac(s),unique_payload_bytes:ac(_),overlapping_reference_bytes:ac(s-_),declared_element_count:ac(c),encoding_inventory:[...u.values()].sort((p,d)=>d.tensor_count-p.tensor_count||p.dtype.localeCompare(d.dtype)).map(p=>({dtype:p.dtype,tensor_count:p.tensor_count,element_count:ac(p.element_count),declared_payload_bytes:ac(p.declared_payload_bytes),effective_bits_per_element:aee(p.declared_payload_bytes*8n,p.element_count)})),files:[...o.values()].sort((p,d)=>p.location.localeCompare(d.location)).map(p=>({location:p.location,sha256:p.sha256,byte_length:ac(p.byte_length)})),range_conservation_status:"complete",numerical_payload_decode:"not_assessed_scan_policy_structure",interpretation_boundary:"Content-addressed sidecar identity, serialized location binding, tensor cardinality, and every declared offset/length range are assessed. Declared payload bytes count tensor references; unique payload bytes merge overlapping ranges per sidecar. Initializer values, finiteness, distributions, and model execution are not assessed in structure mode."}}function S8(e){let t=Array.isArray(e?.onnx_external_data?.tensors)?e.onnx_external_data.tensors:[],n=0n;for(let i of t){if(!Array.isArray(i.shape)||i.shape.some(o=>!Number.isSafeInteger(Number(o))||Number(o)<0))return null;n+=i.shape.reduce((o,a)=>o*BigInt(Number(a)),1n)}return n}function nee(e){let t=e?.decimal??e?.number??e;return Ig(t)}function Ig(e){return typeof e=="bigint"?e>=0n?e:null:typeof e=="string"&&/^\d+$/.test(e)?BigInt(e):Number.isSafeInteger(Number(e))&&Number(e)>=0?BigInt(Number(e)):null}function ac(e){return{decimal:String(e),number:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null}}function iee(e){return!Array.isArray(e)||e.some(t=>!Number.isSafeInteger(Number(t))||Number(t)<0)?null:e.reduce((t,n)=>t*BigInt(Number(n)),1n)}function oee(e){let t=[...e].sort((a,r)=>a.start<r.start?-1:a.start>r.start?1:0),n=0n,i=null,o=null;for(let a of t)i==null||a.start>o?(i!=null&&(n+=o-i),i=a.start,o=a.end):a.end>o&&(o=a.end);return i==null?0n:n+o-i}function aee(e,t){if(t<=0n)return null;let n=e*1000000n/t;return Number(n)/1e6}function ree(e){let t=String(e||"").replaceAll("\\","/");if(!t||t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").some(n=>!n||n==="."||n===".."))throw new Error("ONNX external-data member location is unsafe.");return t}Me();Ce();var see="deepbom.llm_token_budget_scenario.v1",cee=/^[a-f0-9]{64}$/,lee=new Set([8,16,32]);function t1(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`);return e}function uee(e,t){if(!Number.isSafeInteger(e)||e<0)throw new Error(`${t} must be a non-negative safe integer.`);return e}function Cg(e){return e&&typeof e=="object"&&/^\d+$/.test(String(e.decimal||""))?BigInt(e.decimal):typeof e=="string"&&/^\d+$/.test(e)?BigInt(e):typeof e=="bigint"&&e>=0n?e:Number.isSafeInteger(e)&&e>=0?BigInt(e):null}function aa(e){return{value:e<=BigInt(Number.MAX_SAFE_INTEGER)?Number(e):null,decimal:String(e)}}function _ee(e,t){let n=String(e?.model_sha256||e?.artifact_bundle?.model_source_sha256||"").toLowerCase();return{artifact_sha256:cee.test(n)?n:null,source:t}}function T8(e={},{textTokens:t,imageCount:n=0,tokensPerImage:i=null,batchSize:o=1,stateStorageBits:a=16,memoryCapacityBytes:r=null,source:s="declared_scenario"}={}){let c=t1(t,"textTokens"),u=uee(n,"imageCount"),l=u>0?t1(i,"tokensPerImage"):null;if(u===0&&i!=null)throw new Error("tokensPerImage requires imageCount greater than zero.");let _=t1(o,"batchSize");if(!lee.has(a))throw new Error("stateStorageBits must be 8, 16, or 32.");let p=r==null?null:Cg(r);if(r!=null&&(p==null||p<=0n))throw new Error("memoryCapacityBytes must be a positive exact integer.");let d=BigInt(u)*BigInt(l||0),m=BigInt(c)+d;if(m>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The total token budget exceeds the safe integer range.");let f=e?.on_device_llm||{},g=Cg(f?.state?.kv_projection?.elements_per_token_per_batch),h=Cg(f?.state?.recurrent_projection?.recurrent_state_elements_all_layers_per_batch),b=Cg(f?.storage?.serialized_tensor_bytes_decimal),A=Number.isSafeInteger(f?.architecture?.context_length)&&f.architecture.context_length>0?f.architecture.context_length:null,y=A==null?"serialized_context_unbound":m<=BigInt(A)?"within_serialized_context":"exceeds_serialized_context",x=g==null?null:(g*m+(h||0n))*BigInt(_),v=x==null?null:x*BigInt(a/8),I=b==null||v==null?null:b+v,w=dS(I,p),N={schema:see,status:g==null?"not_assessable_kv_contract_unbound":y==="exceeds_serialized_context"?"derived_scenario_exceeds_serialized_context":"assessed_conditional_token_budget",evidence_class:g==null?"DECLARED/NOT_ASSESSABLE":"DECLARED/DERIVED_CONDITIONAL_SCENARIO",identity:_ee(e,s),token_budget:{text_tokens:c,image_count:u,tokens_per_image:l,image_tokens:aa(d),total_context_tokens:aa(m),batch_size:_,state_storage_bits:a,evidence_class:"DECLARED"},serialized_context_contract:{context_length:A,assessment:y,evidence_class:A==null?"NOT_ASSESSABLE":"OBSERVED_OR_SOURCE_BACKED"},state_projection:{state_kind:g!=null&&h!=null?"hybrid_kv_ssm":g!=null?"transformer_kv":"not_assessable",kv_elements_per_token_per_batch:g==null?null:aa(g),recurrent_elements_per_batch:h==null?null:aa(h),logical_state_elements:x==null?null:aa(x),logical_state_bytes:v==null?null:aa(v),evidence_class:v==null?"NOT_ASSESSABLE":"DERIVED_CONDITIONAL_SCENARIO"},memory_feasibility:{schema:"deepbom.llm_token_budget_memory_scenario.v1",status:w.status,evidence_class:I==null?"NOT_ASSESSABLE":"OBSERVED_STORAGE_PLUS_DERIVED_CONDITIONAL_STATE",capacity_scope:"single_aggregate_primary_memory_budget",residency_assumption:Af,serialized_weight_floor_bytes:b==null?null:aa(b),logical_state_bytes:v==null?null:aa(v),static_lower_bound_bytes:I==null?null:aa(I),declared_capacity_bytes:p==null?null:aa(p),deficit_bytes:w.deficit_bytes,headroom_after_lower_bound_bytes:w.headroom_after_lower_bound_bytes,fit_claim:w.fit_claim},boundary:"Text and image-token counts are user-declared scenario inputs. Image preprocessing, projector output cardinality, special-token insertion, runtime allocation, backend lowering, kernel choice, latency, task accuracy, and device fit are not inferred. A lower bound at or below capacity does not prove fit."};return{...N,scenario_sha256:K(Q(N))}}import{createHash as pee,randomBytes as mee}from"node:crypto";import{access as fee,mkdir as hee,open as D8,rename as M8,unlink as $8}from"node:fs/promises";import up from"node:path";var z8="deepbom.gate_policy_profile.v1",dee="deepbom.gate_policy_profile_result.v1",O8=Object.freeze({engineering:Object.freeze({id:"engineering",label:"Engineering artifact gate",blocking_finding_kinds:Object.freeze(["artifact_defect"]),purpose:"Block defects observed in the deployment artifact while retaining cautions and external evidence gaps for review."}),regulatory:Object.freeze({id:"regulatory",label:"Regulatory evidence-completeness gate",blocking_finding_kinds:Object.freeze(["artifact_defect","evidence_gap"]),purpose:"Block observed artifact defects and unresolved evidence gaps before a controlled release review."})});function R8(){return Object.values(O8).map(e=>({schema:z8,id:e.id,label:e.label,blocking_finding_kinds:[...e.blocking_finding_kinds],purpose:e.purpose,boundary:B8(e.id)}))}function n1(e,t){let n=String(t||"").trim().toLowerCase(),i=O8[n];if(!i)throw new Error("--policy must be engineering or regulatory.");let o=Array.isArray(e?.findings)?e.findings:[],a={artifact_defect:0,caution:0,evidence_gap:0};for(let s of o)a[s.finding_kind]=(a[s.finding_kind]||0)+1;let r=o.filter(s=>i.blocking_finding_kinds.includes(s.finding_kind));return{schema:dee,status:r.length?"block":"pass",profile:n,profile_schema:z8,blocking_finding_kinds:[...i.blocking_finding_kinds],finding_count:o.length,finding_kind_counts:a,blocking_finding_count:r.length,blocking_finding_ids:r.map(s=>s.id),evidence_envelope_sha256:e?.envelope_sha256||null,interpretation_boundary:B8(n)}}function B8(e){return e==="regulatory"?"This profile checks evidence completeness for review workflow entry. It does not determine legal compliance, safety, clinical performance, or regulatory acceptance.":"This profile checks artifact defects only. Passing does not resolve cautions, external evidence gaps, runtime behavior, model quality, or task safety."}var L8="deepbom.cli_capabilities.v1",gee="deepbom.cli_error.v1",bee="deepbom.cli_finding_policy_result.v1",yee="deepbom.cli_defect_gate_result.v1",Aee="2.1.0",i1=Object.freeze(["informational","low","medium","high"]),kg=new Map(i1.map((e,t)=>[e,t]));function q8(e,{defaultTarget:t,deltaTargets:n}={}){return{schema:L8,cli_version:String(e),optional_numerical_ir:{weight:{schema:"deepbom.weight_ir.v1",flag:"--weight-analysis",section:"weight_ir",analysis_schema:"deepbom.weight_analysis.v1",analysis_section:"weight_analysis",comparison_schema:"deepbom.weight_comparison.v1",comparison_section:"weight_comparison",baseline_flag:"--weight-baseline",options_flag:"--weight-options",mapping_flag:"--weight-mapping",features:["channels","signed_cosine_similarity","singular_spectrum","sparsity_2_4","affine_quantization","aligned_baseline_comparison"],formats:["onnx","tflite","gguf","safetensors","coreml","executorch"],coverage:"decoder-dependent; every storage object is accounted for",execution:!1},activation:{schema:"deepbom.activation_ir.v1",capture_schema:"deepbom.activation_capture.v1",flag:"--activation-evidence",section:"activation_ir",execution:!1,trust:"imported evidence; consistency checked, not attested"},default_enabled:!1,output:"json",maximum_weight_values:1e8,maximum_capture_values:1e6},analysis_engine:"shared_browser_cli_javascript_and_tflite_wasm",commands:[{name:"audit",input_count:1,outputs:[...Oo]},{name:"gguf",input_count:1,outputs:[...Oo]},{name:"batch",input_count:1,outputs:["summary","deepbom.batch_result.v1"],manifest_schema:"deepbom.batch_manifest.v1"},{name:"verify",input_count:1,declaration_count:1,declaration_kinds:["artifact_derived_or_supplied_interface_contract","cyclonedx_1_7_bom"],outputs:["summary","markdown","deepbom.cli_interface_contract_verification.v1","deepbom.bom_artifact_reconciliation.v1"]},{name:"contract capture",input_count:1,outputs:["summary","deepbom.artifact_derived_interface_baseline.v1"],production_approval_inferred:!1},{name:"diff",input_count:2,outputs:["summary","markdown","deepbom.semantic_artifact_diff.v1","deepbom.tensor_encoding_diff.v1"],supported_formats:["tflite","onnx","coreml","gguf","safetensors","executorch"],matching_format_required:!0},{name:"explore",input_count:1,outputs:["summary","deepbom.redesign_pareto.v1"]},{name:"graph",input_count:1,outputs:["svg","png","html","mermaid","dot","deepbom.artifact_ir.v2","deepbom.model_ir.v1","deepbom.graph_ir.v1","deepbom.visualization_manifest.v1"]},{name:"model-summary",input_count:1,outputs:["table","markdown","deepbom.model_summary.v1"],levels:["auto","operation","block","storage"],trainability_inferred:!1,runtime_order_inferred:!1},{name:"visualize",input_count:1,outputs:["monochrome_a4_svg","black_white_300dpi_png","caption_sidecars","deepbom.model_ir_visualization_manifest.v1"],views:["identity-boundary","architecture-overview","block-detail","exhaustive","static-runtime","observed-runtime"],regulatory_conclusion_inferred:!1},{name:"placement",input_count:1,outputs:["deepbom.placement_comparison.v1"]},{name:"accelerator collect nvidia",input_count:0,outputs:["deepbom.accelerator_profile.v1"]},{name:"explain-rule",input_count:0,optional_identifier_count:1,outputs:["deepbom.rule_explanation.v1","deepbom.rule_explanation_index.v1"]},{name:"self-test",input_count:0,outputs:["deepbom.cli_self_test.v1"]},{name:"capabilities",input_count:0,outputs:[L8]},{name:"integrate",input_count:0,outputs:["deepbom.agent_integration.v1"],targets:["codex","claude-code","generic"],writes_require_apply:!0}],inputs:{standalone_extensions:[".tflite",".onnx",".gguf",".safetensors",".mlmodel",".pte",".ptd",".pb",".h5",".hdf5",".keras",".pt2",".pt",".pth",".ckpt"],package_kinds:["coreml_mlpackage","onnx_external_data","safetensors_sharded_repository","executorch_ptd","tensorflow_savedmodel"],preview_boundaries:{static_graph:["tensorflow_graphdef","tensorflow_savedmodel_first_metagraph","keras_declarative_config","pt2_declarative_graph"],safe_envelope_only:["generic_hdf5","pytorch_pt_pth_ckpt"],arbitrary_framework_object_construction:!1},remote_sources:{huggingface:"full_commit_required",gcs:"object_generation_required",https:"sha256_required",kaggle:"not_yet_available_use_verified_local_or_https_sha256",content_addressed_cache:!0,remote_code_execution:!1},symbolic_stdin:!1,symbolic_stdin_reason:"Artifact identity, sidecar resolution, and bounded range reads require a stable regular file or package directory."},default_audit_output:a_,output_contracts:{...z1(),analysis:{media_type:"application/json",compatibility_alias_for:["json","json-compact"],stability:"format_specific_complete_evidence"}},bounded_projections:{gguf_tensor_table:{invocation:"deepbom gguf <artifact.gguf> --tensors --compact",schema:"deepbom.tensor_table.v1",pagination:"--tensor-offset <n> --tensor-limit <1..1000>",default_scan:"structure",excludes:["decoded_tensor_values","tensor_numerical_integrity_ledgers"]},tensor_encoding_inventory:{invocation:"deepbom audit <artifact> --encoding-inventory --compact",schema:"deepbom.tensor_encoding_inventory.v1",supported_formats:["gguf","safetensors","onnx","tflite"],default_scan_for_range_read_containers:"structure",evidence_scope:"serialized_tensor_encoding_only"},model_ir_document_views:{invocation:"deepbom visualize <artifact> --view all --orientation portrait -o model-views.zip",schema:"deepbom.model_ir_visualization_manifest.v1",canonical_vector:"monochrome ISO A4 SVG with source subject references",compatibility_raster:"300-DPI opaque black-white PNG",boundary:"engineering evidence only; no standard-conformance or regulatory-approval claim"},format_neutral_model_summary:{invocation:"deepbom model-summary <artifact> --level auto --format table",schema:"deepbom.model_summary.v1",levels:["auto","operation","block","storage"],boundary:"serialized storage is not framework trainability; display order is not runtime order; unknown values are not zero-filled"}},provenance_inputs:{conversion_receipt:"deepbom.conversion_receipt.v1",source_code_serialization_loaded:!1,output_artifact_binding:"exact_sha256_and_format",converter_claim_evidence_class:"DECLARED_UNVERIFIED"},scan_policies:{modes:["auto","structure","integrity","full"],gguf_safetensors_range_read:!0,gguf_safetensors_auto_structure_above_bytes:"10737418240",gguf_safetensors_auto_integrity_above_bytes:"2147483648",monolithic_executable_fail_closed_above_bytes:"1073741824",payload_execution:!1},public_product_contracts:qx(),accelerator_profiles:{nvidia_collector_schema:"deepbom.accelerator_profile.v1",legacy_nvidia_binding_schema:"deepbom.accelerator_profile_binding.v1",binding_schema:"deepbom.accelerator_binding.v1",evidence_stages:["serialized_artifact","source_eligibility","selected_build","compiled_plan","observed_assignment","measured_execution"],imports:{coreml_compute_plan:"deepbom.coreml_compute_plan.v1",edgetpu_compiler_evidence:"deepbom.edgetpu_compiler_evidence.v1",litert_qualcomm_compiler_dispatch_evidence:"deepbom.litert_qualcomm_compiler_dispatch_evidence.v1",tensorrt_parser_observation:"deepbom.tensorrt_parser_observation.v1",tensorrt_engine_inspector:"deepbom.tensorrt_engine_inspector_evidence.v1"},cpu_cost_profile_separate:!0,selected_build_inferred_from_host_profile:!1,runtime_assignment_inferred_from_host_profile:!1,llm_vram_comparison:"conditional_static_lower_bound_only"},automation:{finding_gate_levels:i1,finding_kinds:["artifact_defect","caution","evidence_gap"],default_gate:"artifact_defect_only",review_policy_schema:"deepbom.review_policy.v1",review_policy_states:["execution_status","coverage_status","finding_policy_status"],builtin_policy_profiles:R8(),identity_scoped_expiring_exceptions:!0,deterministic_json:!0,reproducible_timestamp_sources:["--timestamp","SOURCE_DATE_EPOCH"],atomic_file_output:!0,no_clobber_output:!0,structured_stderr:["text","json"],mcp_stdio_server:{invocation:"deepbom mcp",transport:"stdio_jsonrpc",protocol_versions:["2025-11-25","2025-06-18","2025-03-26","2024-11-05"],tools:["deepbom_capabilities","deepbom_audit","deepbom_diff","deepbom_explain_rule"],default_audit_output:a_,detailed_outputs_are_explicit:!0,local_path_policy:"DEEPBOM_MCP_ALLOWED_ROOTS_or_launch_directory",bounded_environment_controls:["DEEPBOM_MCP_MAX_RESPONSE_BYTES","DEEPBOM_MCP_MAX_FRAME_BYTES","DEEPBOM_MCP_TOOL_TIMEOUT_MS","DEEPBOM_MCP_MAX_CONCURRENT","DEEPBOM_MCP_MAX_QUEUE"],hosted_endpoint:!1}},targets:{default_tflite_target:t||null,default_diff_targets:Array.isArray(n)?[...n]:[],custom_tflite_target_profile:!0},exit_codes:{0:"command completed and any requested gate passed",1:"invalid invocation, unreadable input, unsupported artifact, or analysis/output failure",2:"verification contradiction or finding policy blocked",3:"verification could not establish a complete release binding",4:"independently supplied artifact SHA-256 did not match the observed artifact"},privacy:{model_bytes_network_transfer:!1,telemetry:!1,analysis_location:"local_process"}}}function j8(e,{version:t,policyResult:n=null}={}){if(e?.schema!=="deepbom.artifact_evidence_envelope.v1")throw new Error("SARIF projection requires a deepbom.artifact_evidence_envelope.v1 document.");let i=Array.isArray(e.findings)?e.findings:[],o=[...new Map(i.map(l=>[l.id,l])).values()],a=new Map(o.map((l,_)=>[l.id,_])),r=o.map(l=>{let _=ow(l.id);return{id:l.id,name:wee(l.id),shortDescription:{text:l.title||_?.title||l.id},fullDescription:{text:l.summary||l.title||_?.title||l.id},help:{text:_?.remediation||l.recommendation||l.interpretation||"Review the hash-bound DEEPBOM evidence envelope."},defaultConfiguration:{level:P8(l)},properties:{category:l.rule_id||null,deepbomEvidenceClass:l.evidence_class||null,deepbomSeverity:_p(l.severity),deepbomFindingKind:l.finding_kind||"caution",deepbomRuleCatalogSchema:_?"deepbom.finding_rule_explanation.v1":null,deepbomRuleTriggerContract:_?.trigger_contract||null}}}),s=xee(e.identity?.filename||"model"),c={location:{uri:s},roles:["analysisTarget"],...e.identity?.sha256?{hashes:{"sha-256":e.identity.sha256}}:{},properties:{format:e.identity?.format||null,byteLength:e.identity?.byte_length??null}},u=i.map(l=>({ruleId:l.id,ruleIndex:a.get(l.id),level:P8(l),message:{text:l.summary||l.title||l.id},locations:[{physicalLocation:{artifactLocation:{uri:s,index:0}}}],partialFingerprints:{"deepbomFinding/v1":Eee(JSON.stringify({artifact_sha256:e.identity?.sha256||null,finding_id:l.id,evidence_class:l.evidence_class||null,source_pointers:l.source_pointers||[]}))},properties:{deepbomEvidenceClass:l.evidence_class||null,deepbomSeverity:_p(l.severity),deepbomFindingKind:l.finding_kind||"caution",deepbomStatus:l.status||null,deepbomInterpretation:l.interpretation||null,deepbomRecommendation:l.recommendation||null,deepbomSourcePointers:l.source_pointers||[]}}));return{$schema:"https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",version:Aee,runs:[{tool:{driver:{name:"DEEPBOM",semanticVersion:String(t),informationUri:"https://deepbom.org",rules:r}},automationDetails:{id:`deepbom/${e.identity?.sha256||e.envelope_sha256}`},artifacts:[c],results:u,invocations:[{executionSuccessful:!0,properties:{evidenceEnvelopeSha256:e.envelope_sha256,findingPolicy:n}}],properties:{deepbomEvidenceEnvelopeSchema:e.schema,deepbomEvidenceEnvelopeSha256:e.envelope_sha256,deepbomEvidenceBoundary:e.evidence_boundary}}]}}function F8(e,t="none"){let n=o1(t),i=Array.isArray(e?.findings)?e.findings:[],o=Object.fromEntries(i1.map(s=>[s,0]));for(let s of i)o[_p(s?.severity)]+=1;let a=n==="none"?Number.POSITIVE_INFINITY:kg.get(n),r=i.filter(s=>kg.get(_p(s?.severity))>=a);return{schema:bee,status:r.length?"block":"pass",fail_on:n,finding_count:i.length,severity_counts:o,blocking_finding_count:r.length,blocking_finding_ids:r.map(s=>s.id),evidence_envelope_sha256:e?.envelope_sha256||null}}function Q8(e){let t=Array.isArray(e?.findings)?e.findings:[],n={artifact_defect:0,caution:0,evidence_gap:0};for(let o of t)n[o.finding_kind]=(n[o.finding_kind]||0)+1;let i=t.filter(o=>o.finding_kind==="artifact_defect");return{schema:yee,status:i.length?"block":"pass",gate:"defects",finding_count:t.length,finding_kind_counts:n,blocking_finding_count:i.length,blocking_finding_ids:i.map(o=>o.id),evidence_envelope_sha256:e?.envelope_sha256||null}}function o1(e){let t=String(e||"none").trim().toLowerCase();if(t==="info")return"informational";if(t!=="none"&&!kg.has(t))throw new Error("--fail-on must be none, informational, low, medium, or high.");return t}function a1(e,t=process.env){if(e)return vee(e,"--timestamp");let n=String(t?.SOURCE_DATE_EPOCH||"").trim();if(!n)return null;if(!/^\d+$/.test(n))throw new Error("SOURCE_DATE_EPOCH must be a non-negative integer number of seconds.");let i=Number(n);if(!Number.isSafeInteger(i))throw new Error("SOURCE_DATE_EPOCH exceeds the safe integer range.");return new Date(i*1e3).toISOString()}async function Pa(e,t,{noClobber:n=!1}={}){let i=up.resolve(e),o=up.dirname(i);await hee(o,{recursive:!0});let a=up.join(o,`.${up.basename(i)}.${process.pid}.${mee(8).toString("hex")}.tmp`),r;try{if(r=await D8(a,"wx",384),await r.writeFile(t,"utf8"),await r.sync(),await r.close(),r=null,n){let s;try{s=await D8(i,"wx",384),await s.close(),s=null,await M8(a,i)}catch(c){throw s&&await s.close().catch(()=>{}),c?.code!=="EEXIST"&&await $8(i).catch(()=>{}),c}}else await M8(a,i)}catch(s){throw r&&await r.close().catch(()=>{}),await $8(a).catch(()=>{}),n&&s?.code==="EEXIST"?new Error(`Output already exists: ${i}`):s}}function U8(e,t=process.argv.slice(2),n=process.env){let i=G8(e);return Nee(t,n)==="json"?`${JSON.stringify(i)}
|
|
58
58
|
`:`deepbom: ${i.message}
|
|
59
59
|
`}function G8(e){let t=e?.message||String(e),n=Iee(t),i=Cee(n,t);return{schema:gee,code:n,message:t,exit_code:n==="artifact_identity_mismatch"?4:1,expected:i.expected,observed:i.observed,suggested_action:i.suggested_action}}function V8(e){return G8(e).exit_code}function vee(e,t){let n=Date.parse(e);if(!Number.isFinite(n))throw new Error(`${t} must be an ISO-8601 timestamp.`);return new Date(n).toISOString()}function _p(e){let t=String(e||"informational").trim().toLowerCase();return t==="info"||t==="note"?"informational":kg.has(t)?t:"informational"}function P8(e){let t=_p(e.severity);return e.finding_kind==="evidence_gap"?"note":e.finding_kind!=="artifact_defect"?["high","medium"].includes(t)?"warning":"note":t==="high"?"error":t==="medium"?"warning":"note"}function wee(e){let t=String(e||"DEEPBOMFinding").replace(/[^A-Za-z0-9_]/g,"_");return/^[A-Za-z_]/.test(t)?t:`DEEPBOM_${t}`}function xee(e){return String(e).replaceAll("\\","/").split("/").map(t=>encodeURIComponent(t)).join("/")}function Eee(e){return pee("sha256").update(e,"utf8").digest("hex")}function Nee(e,t){let n=e.indexOf("--error-format"),i=n>=0?e[n+1]:t?.DEEPBOM_ERROR_FORMAT;return String(i||"text").toLowerCase()==="json"?"json":"text"}function Iee(e){return/Artifact SHA-256 mismatch: expected [a-f0-9]{64}, observed [a-f0-9]{64}/i.test(e)?"artifact_identity_mismatch":/unknown option|unexpected positional|required|must be|mutually exclusive|valid only|does not accept/i.test(e)?"invalid_invocation":/unsupported artifact format|no analyzer is registered|requires a .* artifact/i.test(e)?"unsupported_artifact":/cannot read|unavailable|does not exist|not found|no such file or directory|must be a regular file or directory/i.test(e)?"input_unavailable":/output already exists|EACCES|EPERM|ENOSPC/i.test(e)?"output_failure":/invalid|mismatch|failed|unsafe|changed during analysis/i.test(e)?"artifact_or_evidence_invalid":"analysis_failure"}function Cee(e,t){let n=t.match(/Artifact SHA-256 mismatch: expected ([a-f0-9]{64}), observed ([a-f0-9]{64})/i);if(n)return{expected:{sha256:n[1].toLowerCase()},observed:{sha256:n[2].toLowerCase()},suggested_action:"Stop the pipeline and confirm the immutable artifact source or update the independently reviewed digest."};let i=t.match(/payload range (\d+):(\d+) exceeds source length (\d+)/i);if(i)return{expected:{minimum_byte_length:Number(i[2]),payload_range:[Number(i[1]),Number(i[2])]},observed:{byte_length:Number(i[3])},suggested_action:"The file is likely truncated or its tensor directory is corrupt. Reacquire it from an immutable source and verify its SHA-256 before retrying."};let o={invalid_invocation:"Correct the command arguments; run deepbom --help or deepbom capabilities --format agent-text before retrying.",unsupported_artifact:"Supply one supported serialized deployment artifact or package directory and inspect deepbom capabilities for accepted formats.",input_unavailable:"Confirm that the path exists and is readable, or use an explicitly immutable remote source with the required digest binding.",output_failure:"Choose a writable output path, free sufficient space, and use --no-clobber only when replacement must be refused.",artifact_or_evidence_invalid:"Treat the input as invalid or contradictory; inspect the complete message and reacquire or regenerate the affected evidence.",analysis_failure:"Preserve the failing bytes and command, then rerun with --error-format json for a machine-readable diagnostic."};return{expected:null,observed:null,suggested_action:o[e]||o.analysis_failure}}async function H8(e){try{return await fee(up.resolve(e)),!0}catch{return!1}}function Z8(e,t,n){try{let r=Be.__wbindgen_add_to_stack_pointer(-16),s=Tg(e,Be.__wbindgen_export),c=zn,u=sa(t,Be.__wbindgen_export,Be.__wbindgen_export2),l=zn,_=sa(n,Be.__wbindgen_export,Be.__wbindgen_export2),p=zn;Be.analyze_tflite_for_target(r,s,c,u,l,_,p);var i=_n().getInt32(r+0,!0),o=_n().getInt32(r+4,!0),a=_n().getInt32(r+8,!0);if(a)throw ra(o);return ra(i)}finally{Be.__wbindgen_add_to_stack_pointer(16)}}function X8(e,t,n,i,o){try{let c=Be.__wbindgen_add_to_stack_pointer(-16),u=Tg(e,Be.__wbindgen_export),l=zn,_=sa(t,Be.__wbindgen_export,Be.__wbindgen_export2),p=zn,d=Tg(n,Be.__wbindgen_export),m=zn,f=sa(i,Be.__wbindgen_export,Be.__wbindgen_export2),g=zn,h=sa(o,Be.__wbindgen_export,Be.__wbindgen_export2),b=zn;Be.compute_deployment_delta(c,u,l,_,p,d,m,f,g,h,b);var a=_n().getInt32(c+0,!0),r=_n().getInt32(c+4,!0),s=_n().getInt32(c+8,!0);if(s)throw ra(r);return ra(a)}finally{Be.__wbindgen_add_to_stack_pointer(16)}}function W8(e,t,n,i){try{let s=Be.__wbindgen_add_to_stack_pointer(-16),c=Tg(e,Be.__wbindgen_export),u=zn,l=sa(t,Be.__wbindgen_export,Be.__wbindgen_export2),_=zn,p=sa(n,Be.__wbindgen_export,Be.__wbindgen_export2),d=zn;Be.explore_tflite_redesign_pareto(s,c,u,l,_,p,d,Lt(i));var o=_n().getInt32(s+0,!0),a=_n().getInt32(s+4,!0),r=_n().getInt32(s+8,!0);if(r)throw ra(a);return ra(o)}finally{Be.__wbindgen_add_to_stack_pointer(16)}}function Y8(){return Be.runtime_guard()>>>0}function kee(){return{__proto__:null,"./tflite_wasm_audit_bg.js":{__proto__:null,__wbg_Error_fdd633d4bb5dd76a:function(t,n){let i=Error(r1(t,n));return Lt(i)},__wbg_Number_c4bdf66bb78f7977:function(t){return Number(Pe(t))},__wbg_String_8564e559799eccda:function(t,n){let i=String(Pe(n)),o=sa(i,Be.__wbindgen_export,Be.__wbindgen_export2),a=zn;_n().setInt32(t+4,a,!0),_n().setInt32(t+0,o,!0)},__wbg___wbindgen_bigint_get_as_i64_d9e915702856f831:function(t,n){let i=Pe(n),o=typeof i=="bigint"?i:void 0;_n().setBigInt64(t+8,Ql(o)?BigInt(0):o,!0),_n().setInt32(t+0,!Ql(o),!0)},__wbg___wbindgen_boolean_get_edaed31a367ce1bd:function(t){let n=Pe(t),i=typeof n=="boolean"?n:void 0;return Ql(i)?16777215:i?1:0},__wbg___wbindgen_debug_string_8a447059637473e2:function(t,n){let i=l1(Pe(n)),o=sa(i,Be.__wbindgen_export,Be.__wbindgen_export2),a=zn;_n().setInt32(t+4,a,!0),_n().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4990f46af709e33c:function(t,n){return Pe(t)in Pe(n)},__wbg___wbindgen_is_bigint_90b5ccfe67c78460:function(t){return typeof Pe(t)=="bigint"},__wbg___wbindgen_is_function_acc5528be2b923f2:function(t){return typeof Pe(t)=="function"},__wbg___wbindgen_is_object_0beba4a1980d3eea:function(t){let n=Pe(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_undefined_721f8decd50c87a3:function(t){return Pe(t)===void 0},__wbg___wbindgen_jsval_eq_4e8c38722cb8ff51:function(t,n){return Pe(t)===Pe(n)},__wbg___wbindgen_jsval_loose_eq_4b9aba9e5b3c4582:function(t,n){return Pe(t)==Pe(n)},__wbg___wbindgen_number_get_1cc01dd708740256:function(t,n){let i=Pe(n),o=typeof i=="number"?i:void 0;_n().setFloat64(t+8,Ql(o)?0:o,!0),_n().setInt32(t+0,!Ql(o),!0)},__wbg___wbindgen_string_get_71bb4348194e31f0:function(t,n){let i=Pe(n),o=typeof i=="string"?i:void 0;var a=Ql(o)?0:sa(o,Be.__wbindgen_export,Be.__wbindgen_export2),r=zn;_n().setInt32(t+4,r,!0),_n().setInt32(t+0,a,!0)},__wbg___wbindgen_throw_ea4887a5f8f9a9db:function(t,n){throw new Error(r1(t,n))},__wbg_call_8e98ed2f3c86c4b5:function(){return s1(function(t,n){let i=Pe(t).call(Pe(n));return Lt(i)},arguments)},__wbg_done_b62d4a7d2286852a:function(t){return Pe(t).done},__wbg_get_9a29be2cb383ed9a:function(){return s1(function(t,n){let i=Reflect.get(Pe(t),Pe(n));return Lt(i)},arguments)},__wbg_get_unchecked_54a4374c38e08460:function(t,n){let i=Pe(t)[n>>>0];return Lt(i)},__wbg_get_with_ref_key_6412cf3094599694:function(t,n){let i=Pe(t)[Pe(n)];return Lt(i)},__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da:function(t){let n;try{n=Pe(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_Uint8Array_f080092dc70f5d58:function(t){let n;try{n=Pe(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_isArray_145a34fd0a38d37b:function(t){return Array.isArray(Pe(t))},__wbg_isSafeInteger_a3389a198582f5f6:function(t){return Number.isSafeInteger(Pe(t))},__wbg_iterator_cc47ba25a2be735a:function(){return Lt(Symbol.iterator)},__wbg_length_589238bdcf171f0e:function(t){return Pe(t).length},__wbg_length_c6054974c0a6cdb9:function(t){return Pe(t).length},__wbg_new_2e117a478906f062:function(){let t=new Object;return Lt(t)},__wbg_new_36e147a8ced3c6e0:function(){let t=new Array;return Lt(t)},__wbg_new_81880fb5002cb255:function(t){let n=new Uint8Array(Pe(t));return Lt(n)},__wbg_new_from_slice_11a22f36c0757610:function(t,n){let i=new Int8Array(zee(t,n));return Lt(i)},__wbg_new_from_slice_543b875b27789a8f:function(t,n){let i=new Uint8Array(K8(t,n));return Lt(i)},__wbg_new_from_slice_6696ab0c133d3f19:function(t,n){let i=new Float32Array(Tee(t,n));return Lt(i)},__wbg_next_0c4066e251d2eff9:function(){return s1(function(t){let n=Pe(t).next();return Lt(n)},arguments)},__wbg_next_402fa10b59ab20c3:function(t){let n=Pe(t).next;return Lt(n)},__wbg_now_d2e0afbad4edbe82:function(){return Date.now()},__wbg_prototypesetcall_d721637c7ca66eb8:function(t,n,i){Uint8Array.prototype.set.call(K8(t,n),Pe(i))},__wbg_set_6be42768c690e380:function(t,n,i){Pe(t)[ra(n)]=ra(i)},__wbg_set_dc601f4a69da0bc2:function(t,n,i){Pe(t)[n>>>0]=ra(i)},__wbg_value_49f783bb59765962:function(t){let n=Pe(t).value;return Lt(n)},__wbindgen_cast_0000000000000001:function(t){return Lt(t)},__wbindgen_cast_0000000000000002:function(t){return Lt(t)},__wbindgen_cast_0000000000000003:function(t,n){let i=r1(t,n);return Lt(i)},__wbindgen_cast_0000000000000004:function(t){let n=BigInt.asUintN(64,t);return Lt(n)},__wbindgen_object_clone_ref:function(t){let n=Pe(t);return Lt(n)},__wbindgen_object_drop_ref:function(t){ra(t)}}}}function Lt(e){fp===qa.length&&qa.push(qa.length+1);let t=fp;return fp=qa[t],qa[t]=e,t}function l1(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,a="[";o>0&&(a+=l1(e[0]));for(let r=1;r<o;r++)a+=", "+l1(e[r]);return a+="]",a}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),i;if(n&&n.length>1)i=n[1];else return toString.call(e);if(i=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
|
|
60
|
-
${e.stack}`:i}function See(e){e<1028||(qa[e]=fp,fp=e)}function Tee(e,t){return e=e>>>0,Oee().subarray(e/4,e/4+t)}function zee(e,t){return e=e>>>0,Ree().subarray(e/1,e/1+t)}function K8(e,t){return e=e>>>0,Ul().subarray(e/1,e/1+t)}var rc=null;function _n(){return(rc===null||rc.buffer.detached===!0||rc.buffer.detached===void 0&&rc.buffer!==Be.memory.buffer)&&(rc=new DataView(Be.memory.buffer)),rc}var dp=null;function Oee(){return(dp===null||dp.byteLength===0)&&(dp=new Float32Array(Be.memory.buffer)),dp}var pp=null;function Ree(){return(pp===null||pp.byteLength===0)&&(pp=new Int8Array(Be.memory.buffer)),pp}function r1(e,t){return Dee(e>>>0,t)}var mp=null;function Ul(){return(mp===null||mp.byteLength===0)&&(mp=new Uint8Array(Be.memory.buffer)),mp}function Pe(e){return qa[e]}function s1(e,t){try{return e.apply(this,t)}catch(n){Be.__wbindgen_export3(Lt(n))}}var qa=new Array(1024).fill(void 0);qa.push(void 0,null,!0,!1);var fp=qa.length;function Ql(e){return e==null}function Tg(e,t){let n=t(e.length*1,1)>>>0;return Ul().set(e,n/1),zn=e.length,n}function sa(e,t,n){if(n===void 0){let s=hp.encode(e),c=t(s.length,1)>>>0;return Ul().subarray(c,c+s.length).set(s),zn=s.length,c}let i=e.length,o=t(i,1)>>>0,a=Ul(),r=0;for(;r<i;r++){let s=e.charCodeAt(r);if(s>127)break;a[o+r]=s}if(r!==i){r!==0&&(e=e.slice(r)),o=n(o,i,i=r+e.length*3,1)>>>0;let s=Ul().subarray(o+r,o+i),c=hp.encodeInto(e,s);r+=c.written,o=n(o,i,r,1)>>>0}return zn=r,o}function ra(e){let t=Pe(e);return See(e),t}var Sg=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Sg.decode();var Bee=2146435072,c1=0;function Dee(e,t){return c1+=t,c1>=Bee&&(Sg=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Sg.decode(),c1=t),Sg.decode(Ul().subarray(e,e+t))}var hp=new TextEncoder;"encodeInto"in hp||(hp.encodeInto=function(e,t){let n=hp.encode(e);return t.set(n),{read:e.length,written:n.length}});var zn=0,Mee,$ee,Be;function Lee(e,t){return $ee=e,Be=e.exports,Mee=t,rc=null,dp=null,pp=null,mp=null,Be}function J8(e){if(Be!==void 0)return Be;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=kee();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return Lee(n,e)}var eu="android_mid_a55",x1=typeof __filename=="string"?vt.dirname(__filename):vt.dirname(Kee(import.meta.url)),Mg=Object.freeze([eu,"rpi4_a72","x86_avx2","wasm_simd"]),Zee=16384,Ap=16*1024*1024,B4=1024*1024*1024,D4=10*1024*1024*1024,M4=2*1024*1024*1024,Tt="1.
|
|
60
|
+
${e.stack}`:i}function See(e){e<1028||(qa[e]=fp,fp=e)}function Tee(e,t){return e=e>>>0,Oee().subarray(e/4,e/4+t)}function zee(e,t){return e=e>>>0,Ree().subarray(e/1,e/1+t)}function K8(e,t){return e=e>>>0,Ul().subarray(e/1,e/1+t)}var rc=null;function _n(){return(rc===null||rc.buffer.detached===!0||rc.buffer.detached===void 0&&rc.buffer!==Be.memory.buffer)&&(rc=new DataView(Be.memory.buffer)),rc}var dp=null;function Oee(){return(dp===null||dp.byteLength===0)&&(dp=new Float32Array(Be.memory.buffer)),dp}var pp=null;function Ree(){return(pp===null||pp.byteLength===0)&&(pp=new Int8Array(Be.memory.buffer)),pp}function r1(e,t){return Dee(e>>>0,t)}var mp=null;function Ul(){return(mp===null||mp.byteLength===0)&&(mp=new Uint8Array(Be.memory.buffer)),mp}function Pe(e){return qa[e]}function s1(e,t){try{return e.apply(this,t)}catch(n){Be.__wbindgen_export3(Lt(n))}}var qa=new Array(1024).fill(void 0);qa.push(void 0,null,!0,!1);var fp=qa.length;function Ql(e){return e==null}function Tg(e,t){let n=t(e.length*1,1)>>>0;return Ul().set(e,n/1),zn=e.length,n}function sa(e,t,n){if(n===void 0){let s=hp.encode(e),c=t(s.length,1)>>>0;return Ul().subarray(c,c+s.length).set(s),zn=s.length,c}let i=e.length,o=t(i,1)>>>0,a=Ul(),r=0;for(;r<i;r++){let s=e.charCodeAt(r);if(s>127)break;a[o+r]=s}if(r!==i){r!==0&&(e=e.slice(r)),o=n(o,i,i=r+e.length*3,1)>>>0;let s=Ul().subarray(o+r,o+i),c=hp.encodeInto(e,s);r+=c.written,o=n(o,i,r,1)>>>0}return zn=r,o}function ra(e){let t=Pe(e);return See(e),t}var Sg=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Sg.decode();var Bee=2146435072,c1=0;function Dee(e,t){return c1+=t,c1>=Bee&&(Sg=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Sg.decode(),c1=t),Sg.decode(Ul().subarray(e,e+t))}var hp=new TextEncoder;"encodeInto"in hp||(hp.encodeInto=function(e,t){let n=hp.encode(e);return t.set(n),{read:e.length,written:n.length}});var zn=0,Mee,$ee,Be;function Lee(e,t){return $ee=e,Be=e.exports,Mee=t,rc=null,dp=null,pp=null,mp=null,Be}function J8(e){if(Be!==void 0)return Be;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=kee();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return Lee(n,e)}var eu="android_mid_a55",x1=typeof __filename=="string"?vt.dirname(__filename):vt.dirname(Kee(import.meta.url)),Mg=Object.freeze([eu,"rpi4_a72","x86_avx2","wasm_simd"]),Zee=16384,Ap=16*1024*1024,B4=1024*1024*1024,D4=10*1024*1024*1024,M4=2*1024*1024*1024,Tt="1.106.0",$4="9b7305aa7a5b2487a94000806f21907b4615d30636be0a28d1c41a7aea2e0050",L4="82a2feef00eb6ab03d82f2b30cd17f4d826e2d8307cb059eccd6a0f3120059b2";async function Xee(e){let t=rne(e);if(t.help)return dne(t.command);if(t.version)return _e.stdout.write(`${Tt}
|
|
61
61
|
`);if((t.weightBaseline||t.weightOptions||t.weightMapping)&&(t.weightAnalysis=!0),t.weightMapping&&!t.weightBaseline)throw new Error("--weight-mapping requires --weight-baseline.");if((t.weightAnalysis||t.activationEvidence)&&!["audit","gguf"].includes(t.command))throw new Error("Numerical IR options apply only to audit or gguf.");if(t.command==="capabilities"){tte(t),await Yl(t);let L=q8(Tt,{defaultTarget:eu,deltaTargets:Mg});if(t.outputFormat==="agent-text"){let P=ene(L);t.output&&t.output!=="-"?await Pa(t.output,P,{noClobber:t.noClobber}):_e.stdout.write(P);return}let F=t.outputFormat==="agent-json"?G1(L):L;return Vi(t,F,()=>Jte(L))}if(t.command==="integrate"){ate(t);let L=await W1({action:t.integrationAction,target:t.integrationTarget||null,apply:t.apply,version:Tt});return Vi(t,L,()=>tne(L))}if(t.command==="mcp")return b1(t,"mcp",{allowInput:!1}),j1({cliEntry:_e.argv[1],version:Tt});if(t.command==="self-test")return b1(t,"self-test",{allowInput:!1}),await Yl(t),ste(t);if(t.command==="batch"){nte(t),await Yl(t);let L=await ite(t);await Vi(t,L,()=>Xte(L)),L.failed_count>0&&(_e.exitCode=1);return}if(t.command==="explain-rule"){b1(t,"explain-rule",{allowInput:!0}),await Yl(t);let L=t.listRules||!t.input?{schema:"deepbom.rule_explanation_index.v1",rules:jO()}:qO(t.input);return Vi(t,L,()=>ine(L))}if(t.command==="accelerator"){rte(t),await Yl(t);let L=await zR({collectorVersion:Tt,deviceIndex:t.deviceIndex,includeDeviceIdentifiers:t.includeDeviceIdentifiers});return Vi(t,L,()=>one(L))}if(!t.input)throw new Error("An artifact path is required.");Jee(t),await Yl(t);let n=await Wee(t);if(t.command==="diff")return lte(t,n);let i=await Yee(t.input,t);i=await Mw(t.input,i,q4(t));let o=i.path,a=i.virtual_bundle_members?await Nw(i.virtual_bundle_members,"remote-model"):await Ew(o),r=a.filename,s=a.kind==="file"?wb(r,a.prefix):"package";if(t.tensorTable&&s!=="gguf")throw new Error("--tensors is valid only with the gguf command or a GGUF artifact shorthand.");let c=V4((t.tensorTable||t.encodingInventory)&&!t.scanExplicit?"structure":t.scan,s,a);if((t.targetProfile||t.targetExplicit)&&a.kind==="file"&&s!=="tflite")throw new Error(`${t.targetProfile?"--target-profile":"--target"} applies only to TFLite artifacts, received ${s}.`);if(t.externalDataRoot&&a.kind!=="file")throw new Error("--external-data-dir applies only to an ONNX or ExecuTorch PTE file.");if(t.executorchBuild&&(a.kind!=="file"||s!=="executorch"))throw new Error("--executorch-build applies only to an ExecuTorch PTE artifact.");if(a.kind==="file"&&["unsupported","pytorch_pickle"].includes(s))throw new Error(`Unsupported artifact format: ${s}`);let u=t.executorchBuild?await xn(t.executorchBuild,"executorch_selected_build_attestation"):null,l=t.acceleratorProfile?await xn(t.acceleratorProfile,"nvidia_accelerator_profile"):null,_=t.reviewPolicy?await xn(t.reviewPolicy,"review_policy"):null,p=t.coreMlComputePlan?await xn(t.coreMlComputePlan,"coreml_compute_plan"):null,d=t.edgeTpuCompilerEvidence?await xn(t.edgeTpuCompilerEvidence,"edgetpu_compiler_evidence"):null,m=t.liteRtQualcommEvidence?await xn(t.liteRtQualcommEvidence,"litert_qualcomm_compiler_dispatch_evidence"):null,f=t.conversionReceipt?await xn(t.conversionReceipt,"conversion_receipt"):null,g=null;if(a.kind==="file"&&s==="onnx"&&i.acquisition?.source?.kind==="huggingface"&&!t.externalDataRoot){let L=await Io(a);g=gs(L,r);let F=[...new Set((g?.onnx_external_data?.tensors||[]).map(P=>String(P.normalized_location||"")).filter(Boolean))].sort();F.length&&(i=await $w(t.input,i,F,q4(t))),i.external_data_members&&(c=H4(c,t.scan,g,i.closure))}let h=await G4({input:a,filename:r,format:s,target:n.value,externalDataRoot:t.externalDataRoot||i.closure?.model_root||"",execuTorchBuild:u,scanPolicy:c,preanalyzedOnnx:g,externalDataMembers:i.external_data_members});h=qd(h);let b=String(h.format||s).toLowerCase();if(["unsupported","pytorch_pickle"].includes(b))throw new Error(`Unsupported artifact format: ${b}`);if(t.targetProfile&&b!=="tflite")throw new Error(`--target-profile applies only to TFLite artifacts, received ${b}.`);if(t.targetExplicit&&b!=="tflite")throw new Error(`--target applies only to TFLite artifacts, received ${b}.`);if(t.contract&&t.command!=="verify")throw new Error("--contract is valid only with the verify command.");if(t.request&&t.command!=="explore")throw new Error("--request is valid only with the explore command.");if(t.externalDataRoot&&!["onnx","executorch"].includes(b))throw new Error("--external-data-dir applies only to an ONNX or ExecuTorch PTE file.");if(t.executorchBuild&&(b!=="executorch"||h.executorch_container!=="pte"))throw new Error("--executorch-build applies only to an ExecuTorch PTE artifact.");if(t.command==="gguf"&&b!=="gguf")throw new Error(`The gguf command requires a GGUF artifact, received ${b}.`);if(t.encodingInventory&&!["gguf","safetensors","onnx","tflite"].includes(b))throw new Error(`--encoding-inventory requires GGUF, SafeTensors, ONNX, or TFLite tensor evidence, received ${b}.`);if((t.context||t.batch!==1||t.stateBits!==16||t.memoryMib||t.images||t.tokensPerImage)&&!["tflite","onnx","gguf","safetensors"].includes(b))throw new Error("LLM token-budget options require a TFLite, ONNX, GGUF, or SafeTensors artifact with a statically derived KV-state contract.");if(!t.context&&(t.batch!==1||t.stateBits!==16||t.memoryMib||t.images||t.tokensPerImage))throw new Error("--batch, --state-bits, --memory-mib, --images, and --tokens-per-image require --context.");if(t.images>0!=(t.tokensPerImage!=null))throw new Error("--images and --tokens-per-image must be provided together.");let y=a.kind==="file"?{...await Iw(a),format:b}:K4(h,b,r);if(t.expectedSha256&&y.sha256!==t.expectedSha256)throw new Error(`Artifact SHA-256 mismatch: expected ${t.expectedSha256}, observed ${y.sha256}.`);if(i.acquisition&&i.closure?.kind!=="huggingface_safetensors_shards"&&y.sha256!==i.acquisition.file.sha256)throw new Error("Analyzed artifact SHA-256 differs from the remote acquisition receipt.");I1(h,y),f&&(h.conversion_receipt=V5(f.document,{filename:y.filename,format:y.format,sha256:y.sha256,byte_length_decimal:String(y.size)},{receiptFileSha256:f.sha256})),h.cli_scan_policy=c,h.artifact_set=Z4(y,i.acquisition,h,i.closure),b==="onnx"&&mA(h),h.accelerator_bindings=[],b==="tflite"&&(h.cpu_cost_target_binding=g0(h.target_profile,{bindingSource:n.bindingSource,sourceInput:n.evidence}),n.evidence&&(h.cli_target_profile_input={...n.evidence,resolved_target_id:h.target_profile?.id||null,resolved_target_profile_sha256:h.target_profile?.profile_sha256||null}));let x=y.sha256;if(p){if(b!=="coreml")throw new Error("--coreml-compute-plan applies only to a Core ML artifact or package.");h.coreml_compute_plan=x8(p.document,h,{fileSha256:p.sha256}),h.accelerator_bindings.push(u0(h,h.coreml_compute_plan))}if(d){if(b!=="tflite")throw new Error("--edgetpu-compiler-evidence applies only to a TFLite artifact.");h.edgetpu_compiler_evidence=gb(d.document,h,{fileSha256:d.sha256}),h.accelerator_bindings.push(d0(h,h.edgetpu_compiler_evidence))}if(m){if(b!=="tflite")throw new Error("--litert-qualcomm-evidence applies only to a TFLite artifact.");h.litert_qualcomm_evidence=yb(m.document,h,{fileSha256:m.sha256}),h.accelerator_bindings.push(p0(h,h.litert_qualcomm_evidence))}if(["onnx","tflite"].includes(b)&&(h.on_device_llm=Zo(h)),t.llmMemoryProfile&&!["gguf","safetensors"].includes(b))throw new Error("--llm-memory-profile applies only to GGUF or SafeTensors artifacts with an exact layer-storage contract.");if((t.tensorrtLlmConfig||t.tensorrtLlmBinding)&&b!=="safetensors")throw new Error("--tensorrt-llm-config and --tensorrt-llm-binding apply only to a SafeTensors artifact in this CLI surface.");if(t.tensorrtLlmConfig){let L={tensorrt_llm_engine_config:await xn(t.tensorrtLlmConfig,"tensorrt_llm_engine_config")};t.tensorrtLlmBinding&&(L.tensorrt_llm_binding=await xn(t.tensorrtLlmBinding,"tensorrt_llm_binding")),h.on_device_llm=Zo(h,{sidecars:L})}else if(t.tensorrtLlmBinding)throw new Error("--tensorrt-llm-binding requires --tensorrt-llm-config.");if(t.llmMemoryProfile){h.on_device_llm||(h.on_device_llm=Zo(h));let L=await xn(t.llmMemoryProfile,"llm_static_memory_profile");h.on_device_llm.static_memory_placement=Ef(h.on_device_llm,h,L)}if(t.context){h.on_device_llm||(h.on_device_llm=Zo(h));let L=Ete(h,t.context,{imageCount:t.images,tokensPerImage:t.tokensPerImage,batchSize:t.batch,stateBits:t.stateBits,memoryMib:t.memoryMib});h.llm_token_budget_scenario=L,h.cli_context_scenario=L}if((t.tensorrtProfile||t.tensorrtParserEvidence||t.tensorrtEngineInspector)&&b!=="onnx")throw new Error("--tensorrt-profile, --tensorrt-parser-evidence, and --tensorrt-engine-inspector apply only to ONNX artifacts.");if(b==="onnx"){let L=t.tensorrtParserEvidence?await w1(t.tensorrtParserEvidence):null,F=t.tensorrtEngineInspector?await w1(t.tensorrtEngineInspector):null,P=t.tensorrtProfile?await w1(t.tensorrtProfile):L?.build_profile||null;h.tensorrt_static_preflight=JO(h,P,L,F);let X=f0(h,h.tensorrt_static_preflight);X&&h.accelerator_bindings.push(X)}if(l)h.accelerator_profile_binding=k5(h,l,{deviceIndex:t.acceleratorDeviceIndex}),h.accelerator_bindings.push(_0(h,h.accelerator_profile_binding));else if(t.acceleratorDeviceIndex!=null)throw new Error("--accelerator-device requires --accelerator-profile.");h.accelerator_bindings=xh(h.accelerator_bindings,h0(h),m0(h));let v=_?e1(_.document):null;v?h.policy_identity={schema:v.schema,policy_sha256:v.policy_sha256,source_file_sha256:_.sha256,mode:v.mode}:t.policyProfile&&(h.policy_identity={schema:"deepbom.gate_policy_profile.v1",profile:t.policyProfile,mode:"builtin_evidence_gate"});let I=P4(t)?Jd(h,{...y,artifact_set_sha256:h.artifact_set?.artifact_set_sha256||null}):null;if(P4(t)&&!I)throw new Error("Canonical Artifact Evidence IR could not be constructed for the analyzed artifact.");let w=I?.primary_view||h;if(t.weightAnalysis||t.activationEvidence){if(!["audit","gguf"].includes(t.command)||t.outputFormat!=="analysis"||t.summary||t.tensorTable)throw new Error("Optional numerical IR requires audit/gguf with --output-format json (or json-compact).");let{buildActivationIr:L,buildNumericalEvidenceBundle:F}=await Promise.resolve().then(()=>(d4(),_4));if(t.weightAnalysis){if(a.kind!=="file")throw new Error("Weight IR currently requires one serialized artifact file; select the model or tensor member from the package.");let{collectWeightAnalysis:P,compareWeightAnalyses:X}=await Promise.resolve().then(()=>(R4(),O4)),j=t.weightOptions?(await xn(t.weightOptions,"weight options")).document:{};await a.file.assertUnchanged();let J=await P(I.model_ir,h,a.file,{options:j});if(h.weight_ir=J.weight_ir,h.weight_analysis=J.weight_analysis,t.weightBaseline){let W=await E1(t.weightBaseline,{...t,targetExplicit:!1,targetProfile:""},n);if(W.input.kind!=="file")throw new Error("Weight comparison requires a single baseline artifact file.");await W.input.file.assertUnchanged();let se=await P(W.artifactIrContext.model_ir,W.analysis,W.input.file,{options:{...j,tensor_ids:[],axes:{}}});await W.input.file.assertUnchanged();let Y=t.weightMapping?(await xn(t.weightMapping,"weight comparison mapping")).document:[];h.weight_comparison=X(se,J,{mapping:Y})}await a.file.assertUnchanged()}t.activationEvidence&&(h.activation_ir=L(I.model_ir,(await xn(t.activationEvidence,"activation capture")).document)),h.numerical_evidence_bundle=F(I.model_ir,h.weight_ir,h.activation_ir)}if(t.command==="graph")return mte(t,I);if(t.command==="visualize")return fte(t,I);if(t.command==="model-summary")return hte(t,I);if(t.command==="placement")return ete(t,w,y);if(t.command==="verify")return _te(t,w,y,I);if(t.command==="contract")return dte(t,w,y);if(t.command==="explore")return pte(t,w,y,a,n.value);let N=a1(t.timestamp),S=Fs(w,{hash:x,fileSizeBytes:y.size,filename:y.filename,generatedAt:N,provenance:{analyzer:"DEEPBOM",version:Tt,command:t.command,target_profile_id:h.target_profile?.id||null}}),O=w0(S);if(!O.valid)throw new Error(`Canonical evidence envelope validation failed: ${O.errors.join(", ")}`);let B=RO({analysis:w,envelope:S,artifactIrContext:I}),k=v?I8(S,v,{analyzerVersion:Tt,rulepackVersion:h.rulepack_version||null,evaluatedAt:N||new Date().toISOString(),sourceFileSha256:_.sha256}):t.policyProfile?n1(S,t.policyProfile):t.gate==="defects"?Q8(S):t.failOn!=="none"?F8(S,t.failOn):null,D=t.outputFormat==="cyclonedx"?eg(w,{hash:x,fileSizeBytes:y.size,timestamp:N||new Date().toISOString(),...h.target_profile?{target:h.target_profile,targetId:h.target_profile.id}:{},artifactIr:I.artifact_ir}):t.outputFormat==="envelope"?S:t.outputFormat==="sarif"?j8(S,{version:Tt,policyResult:k}):h,q=["analysis","summary"].includes(t.outputFormat)?zte(D,t,B,I):D;if(await Vi(t,q,()=>t.tensorTable?t.render==="markdown"?Ste(q):Kte(q):t.encodingInventory?Zte(q):t.render==="markdown"?kte(B):Ite(B)),t.policyOutput&&await Pa(t.policyOutput,`${JSON.stringify(k,null,t.compact?0:2)}
|
|
62
62
|
`,{noClobber:t.noClobber}),k?.status==="block"){let L=k.blocking_finding_count??k.finding_policy?.blocking_finding_count??0,F=k.profile??k.fail_on??k.finding_policy?.fail_on??"configured policy";_e.stderr.write(`deepbom: review policy blocked (${L} finding(s) at or above ${F}; coverage ${k.coverage_status||"not evaluated"}).
|
|
63
63
|
`),_e.exitCode=2}}async function Wee(e){if(!e.targetProfile)return{value:e.target||eu,evidence:null,bindingSource:e.targetExplicit?"explicit_id":"default_assumption"};if(e.targetExplicit)throw new Error("--target and --target-profile are mutually exclusive.");let t=await xn(e.targetProfile,"target_profile",Zee),n=TT(t.document),i=Q(n);return{value:JSON.stringify(n),bindingSource:"profile_file",evidence:{schema:"deepbom.cli_target_profile_input.v1",filename:t.path,byte_length:t.byte_length,source_sha256:t.sha256,normalized_profile_sha256:ii("sha256").update(i,"utf8").digest("hex"),duplicate_key_validation:"complete"}}}function P4(e){return!!e?.command}function Yee(e,t){return ap(e,{cacheDir:t.cacheDir||void 0,expectedSha256:t.expectedSha256,offline:t.offline,maximumBytes:BigInt(t.maxDownloadGib)*1024n*1024n*1024n})}function q4(e){return{cacheDir:e.cacheDir||void 0,expectedSha256:e.expectedSha256,offline:e.offline,maximumBytes:BigInt(e.maxDownloadGib)*1024n*1024n*1024n}}function Jee(e){if(e.deviceIndex!=null||e.includeDeviceIdentifiers)throw new Error("--device and --include-device-identifiers apply only to accelerator collect nvidia.");if(e.targetProfile&&e.targetExplicit)throw new Error("--target and --target-profile are mutually exclusive.");if(e.contract&&e.command!=="verify")throw new Error("--contract is valid only with the verify command.");if(e.bom&&e.command!=="verify")throw new Error("--bom is valid only with the verify command.");if(e.componentRef&&!e.bom)throw new Error("--component-ref requires --bom.");if(e.request&&e.command!=="explore")throw new Error("--request is valid only with the explore command.");if((e.sections.length||e.pointer||e.listSections)&&!["audit","gguf"].includes(e.command))throw new Error("--section, --pointer, and --list-sections are valid only with audit or gguf.");if(e.tensorTable&&!["audit","gguf","diff"].includes(e.command))throw new Error("--tensors is valid only with audit, gguf, or diff.");if((e.tensorOffset>0||e.tensorLimit!==null)&&!e.tensorTable)throw new Error("--tensor-offset and --tensor-limit require --tensors.");if(e.encodingInventory&&!["audit","gguf"].includes(e.command))throw new Error("--encoding-inventory is valid only with audit or gguf.");if(e.view&&!["graph","visualize"].includes(e.command))throw new Error("--view is valid only with the graph or visualize command.");if(e.command==="verify"&&!!e.contract==!!e.bom)throw new Error("The verify command requires exactly one of --contract <json> or --bom <CycloneDX-1.7.json>.");if(e.command==="contract"&&e.contractAction!=="capture")throw new Error("The contract command supports only: deepbom contract capture <artifact>.");if(e.command==="diff"&&!e.candidate)throw new Error("The diff command requires baseline and candidate artifacts.");if(e.executorchBuild&&e.command!=="audit")throw new Error("--executorch-build is valid only with the audit command.");if(e.scanExplicit&&["verify","diff","explore"].includes(e.command))throw new Error(`--scan is not accepted by the ${e.command} command.`);if(e.acceleratorProfile&&!["audit","gguf","graph"].includes(e.command))throw new Error("--accelerator-profile is valid only with audit, gguf, or graph.");if((e.coreMlComputePlan||e.edgeTpuCompilerEvidence||e.liteRtQualcommEvidence)&&!["audit","graph","placement"].includes(e.command))throw new Error("Compiled accelerator evidence is valid only with audit, graph, or placement.");if((e.reviewPolicy||e.policyProfile)&&!["audit","gguf"].includes(e.command))throw new Error("--policy and --review-policy are valid only with audit or gguf.");if(e.acceleratorDeviceIndex!=null&&!e.acceleratorProfile)throw new Error("--accelerator-device requires --accelerator-profile.");if(+!!e.policyProfile+ +!!e.reviewPolicy+Number(e.failOnExplicit)+ +(e.gate!=="none")>1)throw new Error("--policy, --gate, --review-policy, and --fail-on are mutually exclusive policy sources.");if(e.policyOutput&&e.failOn==="none"&&!e.reviewPolicy&&!e.policyProfile&&e.gate==="none")throw new Error("--policy-output requires --policy, --gate, --fail-on, or --review-policy.");if(e.noClobber&&!e.output&&!e.policyOutput)throw new Error("--no-clobber requires --output or --policy-output.");if(e.noClobber&&e.output==="-"&&!e.policyOutput)throw new Error("--no-clobber cannot protect stdout; provide a file path with --output.");if(e.policyOutput==="-")throw new Error("--policy-output requires a file path; use --output - for the primary document.");if(e.timestamp&&e.command!=="contract"&&e.outputFormat==="analysis"&&e.failOn==="none"&&e.gate==="none"&&!e.policyProfile)throw new Error("--timestamp applies only to envelope, CycloneDX, SARIF, or finding-policy evidence.");if(["verify","diff","explore"].includes(e.command)&&(e.failOn!=="none"||e.gate!=="none"||e.policyProfile||e.policyOutput))throw new Error(`The ${e.command} command does not accept finding-policy options.`);if(["verify","diff","explore"].includes(e.command)&&e.timestamp)throw new Error(`The ${e.command} command does not accept --timestamp.`);if(e.output&&e.output!=="-"&&e.policyOutput&&vt.resolve(e.output)===vt.resolve(e.policyOutput))throw new Error("--output and --policy-output must identify different files.");if(["verify","diff","explore"].includes(e.command)&&vp(e,e.command),e.command==="graph"){if(e.failOn!=="none"||e.gate!=="none"||e.policyProfile||e.policyOutput)throw new Error("The graph command does not accept finding-policy options.");if(e.timestamp)throw new Error("The graph command is deterministic and does not accept --timestamp.");if(e.contract||e.request)throw new Error("The graph command does not accept verify or redesign sidecars.")}if(e.command==="visualize"){if(e.failOn!=="none"||e.gate!=="none"||e.policyProfile||e.policyOutput||e.reviewPolicy)throw new Error("The visualize command does not accept finding-policy options.");if(e.timestamp)throw new Error("The visualize command is deterministic and does not accept --timestamp.");if(e.contract||e.request||e.bom)throw new Error("The visualize command does not accept verify, BOM, or redesign sidecars.")}if(e.command==="model-summary"){if(e.failOn!=="none"||e.gate!=="none"||e.policyProfile||e.policyOutput||e.reviewPolicy)throw new Error("The model-summary command does not accept finding-policy options.");if(e.timestamp)throw new Error("The model-summary command is deterministic and does not accept --timestamp.");if(e.contract||e.request||e.bom)throw new Error("The model-summary command does not accept verify, BOM, or redesign sidecars.")}if(e.command==="placement"){if(e.failOn!=="none"||e.gate!=="none"||e.policyProfile||e.policyOutput||e.reviewPolicy)throw new Error("The placement command does not accept finding-policy options.");if(e.timestamp)throw new Error("The placement command is deterministic and does not accept --timestamp.");if(e.contract||e.request)throw new Error("The placement command does not accept verify or redesign sidecars.");if(e.formatExplicit)throw new Error("The placement command emits deepbom.placement_comparison.v1; --format is not supported.")}else if(e.placementProfilesExplicit)throw new Error("--profiles is valid only with the placement command.")}async function ete(e,t,n){let i=t.coreml_compute_plan||null,o=Ab(t,i),a=e.placementProfiles==null?o.placement_comparison:Op(t,o.static_profiles,{selectedProfileIds:e.placementProfiles});await Vi(e,a,()=>Yte(a,n))}async function Yl(e){if(!e.noClobber)return;let t=[e.output==="-"?"":e.output,e.policyOutput].filter(Boolean);for(let n of t)if(await H8(n))throw new Error(`Output already exists: ${vt.resolve(n)}`)}function tte(e){if(e.input)throw new Error("The capabilities command does not accept an artifact path.");if(wp(e,["targetProfile","contract","request","context","images","tokensPerImage","batch","stateBits","memoryMib","tensorrtProfile","tensorrtParserEvidence","tensorrtEngineInspector","tensorrtLlmConfig","tensorrtLlmBinding","llmMemoryProfile","conversionReceipt","acceleratorProfile","coreMlComputePlan","edgeTpuCompilerEvidence","liteRtQualcommEvidence","externalDataRoot","executorchBuild","policyOutput","cacheDir","expectedSha256","offline"],"capabilities"),e.targetExplicit||e.failOn!=="none"||e.gate!=="none"||e.policyProfile)throw new Error("The capabilities command does not accept target or finding-policy options.");if(e.sections.length||e.pointer||e.listSections||e.tensorTable||e.encodingInventory)throw new Error("The capabilities command does not accept analysis-selection options.");if(e.deviceIndex!=null||e.includeDeviceIdentifiers)throw new Error("The capabilities command does not accept NVIDIA collector options.");if(e.acceleratorDeviceIndex!=null)throw new Error("The capabilities command does not accept --accelerator-device.");if(e.scanExplicit)throw new Error("The capabilities command does not accept --scan.");if(e.placementProfilesExplicit)throw new Error("The capabilities command does not accept --profiles.");if(e.maxDownloadExplicit)throw new Error("The capabilities command does not accept --max-download-gib.");if(e.timestamp)throw new Error("The capabilities command does not accept --timestamp.");if(e.noClobber&&!e.output)throw new Error("--no-clobber requires --output.");if(e.noClobber&&e.output==="-")throw new Error("--no-clobber cannot protect stdout; provide a file path with --output.");if(e.formatExplicit&&e.outputFormat!=="agent-json")throw new Error("The capabilities command supports only --format agent-json.");if(e.outputFormat==="agent-json"&&e.json)throw new Error("--format agent-json conflicts with --json.")}function nte(e){if(!e.input)throw new Error("The batch command requires a deepbom.batch_manifest.v1 path.");if(!e.batchOutputDir)throw new Error("The batch command requires --batch-output-dir <directory>.");if(e.candidate||e.targetExplicit||e.targetProfile||e.contract||e.request||e.sections.length||e.pointer||e.listSections||e.tensorTable||e.encodingInventory||e.scanExplicit||e.policyProfile||e.reviewPolicy||e.gate!=="none"||e.failOn!=="none"||e.context||e.batch!==1||e.stateBits!==16||e.memoryMib||e.images||e.tokensPerImage||e.offline||e.cacheDir||e.expectedSha256||e.maxDownloadExplicit||e.timestamp)throw new Error("The batch command accepts only its manifest, --batch-output-dir, JSON/compact output, --output, and --no-clobber.");if(e.outputFormat!=="analysis")throw new Error("The batch command emits deepbom.batch_result.v1 and does not accept --output-format.")}async function ite(e){let t=vt.resolve(e.input),n=await Jl(t),i=Ao(new TextDecoder().decode(n),"batch manifest");if(i.schema!=="deepbom.batch_manifest.v1"||!Array.isArray(i.artifacts)||!i.artifacts.length||i.artifacts.length>1e4)throw new Error("Batch manifest must be deepbom.batch_manifest.v1 with 1..10000 artifacts.");let o=new Set,a=vt.dirname(t),r=vt.resolve(e.batchOutputDir);await Hee(r,{recursive:!0});let s=[];for(let l of i.artifacts){let _=String(l?.id||""),p=String(l?.path||"").replaceAll("\\","/"),d=String(l?.expected_sha256||"").toLowerCase(),m=String(l?.scan||"auto").toLowerCase(),f=String(l?.output||"envelope").toLowerCase();if(!/^[a-z0-9][a-z0-9_.-]{0,127}$/i.test(_)||o.has(_))throw new Error(`Batch artifact id is invalid or duplicated: ${_||"<empty>"}.`);if(o.add(_),!p||p.startsWith("/")||/^[A-Za-z]:/.test(p)||p.split("/").some(v=>!v||v==="."||v===".."))throw new Error(`Batch artifact ${_} path must be a safe manifest-relative path.`);if(!/^[a-f0-9]{64}$/.test(d))throw new Error(`Batch artifact ${_} requires a lowercase expected_sha256.`);if(!["auto","structure","integrity","full"].includes(m))throw new Error(`Batch artifact ${_} has an invalid scan policy.`);if(!["analysis","envelope","cyclonedx","sarif"].includes(f))throw new Error(`Batch artifact ${_} has an invalid output kind.`);let g=vt.resolve(a,...p.split("/")),h=a.endsWith(vt.sep)?a:`${a}${vt.sep}`;if(g!==a&&!g.startsWith(h))throw new Error(`Batch artifact ${_} escapes the manifest directory.`);let b=vt.join(r,`${_}.json`),A=["audit",g,"--scan",m,"--expected-sha256",d,"--output",b,"--no-clobber","--compact"];f!=="analysis"&&A.push("--output-format",f);let y=await ote(A),x=null;if(y.status===0){let v=await Jl(b);JSON.parse(new TextDecoder().decode(v)),x=ii("sha256").update(v).digest("hex")}s.push({id:_,path:p,expected_sha256:d,scan:m,output:f,status:y.status===0?"pass":"fail",exit_code:y.status,output_file:y.status===0?`${_}.json`:null,output_sha256:x,diagnostic:y.status===0?null:y.stderr.slice(0,4096)})}let c=s.filter(l=>l.status==="pass").length,u={schema:"deepbom.batch_result.v1",manifest:{filename:vt.basename(t),sha256:ii("sha256").update(n).digest("hex"),artifact_count:i.artifacts.length},execution:"sequential_bounded_child_processes",output_directory_name:vt.basename(r),passed_count:c,failed_count:s.length-c,results:s,interpretation_boundary:"The batch result records deterministic per-artifact CLI outcomes. It does not combine artifacts into one model, infer lineage, or turn a policy result into release authorization."};return{...u,batch_result_sha256:ii("sha256").update(Q(u)).digest("hex")}}function ote(e){let t=/^node(?:\.exe)?$/i.test(vt.basename(_e.execPath)),n=_e.execPath,i=t?[_e.argv[1],...e]:e;return new Promise((o,a)=>{let r=Vee(n,i,{cwd:_e.cwd(),env:_e.env,windowsHide:!0}),s="";r.stderr.on("data",c=>{s.length<4096&&(s+=String(c).slice(0,4096-s.length))}),r.on("error",a),r.on("close",c=>o({status:Number.isInteger(c)?c:1,stderr:s}))})}function ate(e){if(!new Set(["install","status","remove"]).has(e.integrationAction))throw new Error("The integrate command requires codex, claude-code, generic, status, or remove.");if(e.integrationAction!=="status"&&!e.integrationTarget)throw new Error(`deepbom integrate ${e.integrationAction} requires a target.`);if(e.integrationAction==="status"&&e.apply)throw new Error("deepbom integrate status does not accept --apply.");if(wp(e,["targetProfile","contract","request","context","images","tokensPerImage","batch","stateBits","memoryMib","tensorrtProfile","tensorrtParserEvidence","tensorrtEngineInspector","tensorrtLlmConfig","tensorrtLlmBinding","llmMemoryProfile","conversionReceipt","acceleratorProfile","coreMlComputePlan","edgeTpuCompilerEvidence","liteRtQualcommEvidence","externalDataRoot","executorchBuild","policyOutput","reviewPolicy","cacheDir","expectedSha256","offline"],"integrate"),e.input||e.candidate||e.targetExplicit||e.failOn!=="none"||e.gate!=="none"||e.policyProfile)throw new Error("The integrate command does not accept artifact, target, or finding-policy options.");if(e.sections.length||e.pointer||e.listSections||e.tensorTable||e.encodingInventory||e.scanExplicit||e.placementProfilesExplicit||e.maxDownloadExplicit||e.timestamp)throw new Error("The integrate command does not accept analysis-selection, scan, placement, download, or timestamp options.");if(e.outputFormat!=="analysis")throw new Error("The integrate command emits deepbom.agent_integration.v1 and does not accept --format.")}function rte(e){if(e.input||e.candidate)throw new Error("The accelerator collect nvidia command does not accept an artifact path.");if(e.acceleratorAction!=="collect"||e.acceleratorProvider!=="nvidia")throw new Error("The accelerator command requires: deepbom accelerator collect nvidia.");if(wp(e,["targetProfile","contract","request","context","images","tokensPerImage","batch","stateBits","memoryMib","tensorrtProfile","tensorrtParserEvidence","tensorrtEngineInspector","tensorrtLlmConfig","tensorrtLlmBinding","llmMemoryProfile","conversionReceipt","acceleratorProfile","coreMlComputePlan","edgeTpuCompilerEvidence","liteRtQualcommEvidence","externalDataRoot","executorchBuild","policyOutput","cacheDir","expectedSha256","offline"],"accelerator collect nvidia"),e.acceleratorDeviceIndex!=null)throw new Error("The collector uses --device, not --accelerator-device.");if(e.gate!=="none"||e.policyProfile||e.sections.length||e.pointer||e.listSections||e.tensorTable||e.encodingInventory)throw new Error("The accelerator command does not accept gate or analysis-selection options.");if(e.scanExplicit)throw new Error("The accelerator collect nvidia command does not accept --scan.");if(e.placementProfilesExplicit)throw new Error("The accelerator collect nvidia command does not accept --profiles.");if(e.targetExplicit||e.failOn!=="none")throw new Error("The accelerator collect nvidia command does not accept target or finding-policy options.");if(e.maxDownloadExplicit)throw new Error("The accelerator collect nvidia command does not accept --max-download-gib.");if(e.timestamp)throw new Error("The accelerator collect nvidia command records its observation time and does not accept --timestamp.");if(e.noClobber&&!e.output)throw new Error("--no-clobber requires --output.");if(e.noClobber&&e.output==="-")throw new Error("--no-clobber cannot protect stdout; provide a file path with --output.");if(e.formatExplicit)throw new Error("The accelerator command emits deepbom.accelerator_profile.v1; --format is not supported.")}function b1(e,t,{allowInput:n}){if(!n&&(e.input||e.candidate))throw new Error(`The ${t} command does not accept an artifact path.`);if(e.candidate)throw new Error(`The ${t} command accepts at most one rule identifier.`);if(wp(e,["targetProfile","contract","request","context","images","tokensPerImage","batch","stateBits","memoryMib","tensorrtProfile","tensorrtParserEvidence","tensorrtEngineInspector","tensorrtLlmConfig","tensorrtLlmBinding","llmMemoryProfile","conversionReceipt","acceleratorProfile","coreMlComputePlan","edgeTpuCompilerEvidence","liteRtQualcommEvidence","externalDataRoot","executorchBuild","policyOutput","reviewPolicy","cacheDir","expectedSha256","offline"],t),e.targetExplicit||e.failOn!=="none"||e.gate!=="none"||e.policyProfile)throw new Error(`The ${t} command does not accept target or finding-policy options.`);if(e.sections.length||e.pointer||e.listSections||e.tensorTable||e.encodingInventory)throw new Error(`The ${t} command does not accept analysis-selection options.`);if(e.deviceIndex!=null||e.includeDeviceIdentifiers||e.acceleratorDeviceIndex!=null)throw new Error(`The ${t} command does not accept device options.`);if(e.scanExplicit||e.placementProfilesExplicit||e.maxDownloadExplicit||e.timestamp)throw new Error(`The ${t} command does not accept scan, placement, download, or timestamp options.`);if(e.outputFormat!=="analysis")throw new Error(`The ${t} command emits its own evidence schema.`)}async function ste(e){let t=[],n=await X4("tflite_wasm_audit_bg.wasm"),i=await Jl(n),o=ii("sha256").update(i).digest("hex");await U4(),t.push({id:"tflite_wasm_asset",status:Y8()===0?"pass":"fail",sha256:o});let a=await cte(),r=await Jl(a),s=ii("sha256").update(r).digest("hex");if(L4&&s!==L4)throw new Error("The packaged self-test probe failed its release SHA-256 check.");let c=gs(r,"deepbom-self-test.onnx");I1(c,{filename:"deepbom-self-test.onnx",format:"onnx",sha256:s,size:r.length}),c.artifact_set=s0({filename:c.filename,format:c.format,sha256:s,byteLength:r.length});let u=Jd(c,{filename:c.filename,format:c.format,sha256:s,size:r.length,artifact_set_sha256:c.artifact_set.artifact_set_sha256}),l=Fs(u.primary_view,{hash:s,fileSizeBytes:r.length,filename:c.filename}),_=w0(l);t.push({id:"onnx_probe_analysis",status:c.operator_count>0?"pass":"fail",operator_count:c.operator_count}),t.push({id:"artifact_evidence_envelope",status:_.valid?"pass":"fail",errors:_.errors});let p=eg(u.primary_view,{hash:s,fileSizeBytes:r.length,timestamp:"2000-01-01T00:00:00.000Z",artifactIr:u.artifact_ir});t.push({id:"cyclonedx_1_7_export",status:p?.specVersion==="1.7"?"pass":"fail",spec_version:p?.specVersion||null});let d=t.every(f=>f.status==="pass")?"pass":"fail",m={schema:"deepbom.cli_self_test.v1",version:Tt,status:d,checks:t,interpretation_boundary:"This deterministic installation check verifies packaged assets and one bounded parser/export path. It is not a full hardware, runtime, or corpus validation."};if(d!=="pass")throw new Error(`DEEPBOM self-test failed: ${t.filter(f=>f.status!=="pass").map(f=>f.id).join(", ")}`);return Vi(e,m,()=>nne(m))}async function cte(){let e=[vt.resolve(x1,"deepbom-self-test.onnx"),vt.resolve(x1,"../web/samples/gpu_partition_probe.onnx")];for(let t of e)try{return await Q4(t),t}catch{}throw new Error(`Required self-test probe was not found. Checked: ${e.join(", ")}`)}async function lte(e,t){vp(e,"diff"),wp(e,["contract","request","context","images","tokensPerImage","batch","stateBits","memoryMib","tensorrtProfile","tensorrtParserEvidence","tensorrtEngineInspector","tensorrtLlmConfig","tensorrtLlmBinding","llmMemoryProfile","conversionReceipt","externalDataRoot","executorchBuild"],"diff");let n=await E1(e.input,e,t,{expectedSha256:e.expectedSha256}),i=await E1(e.candidate,e,t);if(n.format!==i.format)throw new Error(`The diff command requires matching artifact formats, received ${n.format} and ${i.format}.`);let o=null;if(n.format==="tflite"){let s=e.targetProfile?[t.value,...Mg]:e.targetExplicit?[t.value,...Mg.filter(c=>c!==e.target)]:[...Mg];o=X8(await Io(n.input),n.input.filename,await Io(i.input),i.input.filename,JSON.stringify(s)),o.change_impact=ute(o),o=JSON.parse(JSON.stringify(o))}let a=ZR(n.artifactIrContext.artifact_ir,i.artifactIrContext.artifact_ir,{tfliteDeploymentDelta:o});(n.source.acquisition||i.source.acquisition)&&(a=j4({...a,cli_artifact_sources:{baseline:n.source.acquisition,candidate:i.source.acquisition}})),t.evidence&&n.format==="tflite"&&(a=j4({...a,cli_target_profile_input:t.evidence})),XR(a);let r=e.tensorTable?Lte(a,n.analysis,i.analysis,e):a;return Vi(e,r,()=>e.render==="markdown"?e.tensorTable?qte(r):$te(a):e.tensorTable?Pte(r):Mte(a))}async function E1(e,t,n,{expectedSha256:i=""}={}){let o={cacheDir:t.cacheDir||void 0,expectedSha256:i,offline:t.offline,maximumBytes:BigInt(t.maxDownloadGib)*1024n*1024n*1024n},a=await ap(e,o);a=await Mw(e,a,o);let r=a.virtual_bundle_members?await Nw(a.virtual_bundle_members,"remote-model"):await Ew(a.path),s=r.kind==="file"?wb(r.filename,r.prefix):"package";if(r.kind==="file"&&["unsupported","pytorch_pickle"].includes(s))throw new Error(`Unsupported artifact format: ${s}`);let c=V4("auto",s,r),u=null;if(r.kind==="file"&&s==="onnx"&&a.acquisition?.source?.kind==="huggingface"){let m=await Io(r);u=gs(m,r.filename);let f=[...new Set((u?.onnx_external_data?.tensors||[]).map(g=>String(g.normalized_location||"")).filter(Boolean))].sort();f.length&&(a=await $w(e,a,f,o)),a.external_data_members&&(c=H4(c,"auto",u,a.closure))}let l=await G4({input:r,filename:r.filename,format:s,target:n.value,externalDataRoot:a.closure?.model_root||"",execuTorchBuild:null,scanPolicy:c,preanalyzedOnnx:u,externalDataMembers:a.external_data_members});l=qd(l);let _=String(l.format||s).toLowerCase();if(["unsupported","pytorch_pickle"].includes(_))throw new Error(`Unsupported artifact format: ${_}`);if((t.targetProfile||t.targetExplicit)&&_!=="tflite")throw new Error(`${t.targetProfile?"--target-profile":"--target"} applies only to TFLite artifacts, received ${_}.`);let p=r.kind==="file"?{...await Iw(r),format:_}:K4(l,_,r.filename);if(i&&p.sha256!==i)throw new Error(`Artifact SHA-256 mismatch: expected ${i}, observed ${p.sha256}.`);if(a.acquisition&&a.closure?.kind!=="huggingface_safetensors_shards"&&p.sha256!==a.acquisition.file.sha256)throw new Error("Analyzed artifact SHA-256 differs from the remote acquisition receipt.");I1(l,p),l.cli_scan_policy=c,l.artifact_set=Z4(p,a.acquisition,l,a.closure),_==="onnx"&&mA(l),_==="tflite"&&(l.cpu_cost_target_binding=g0(l.target_profile,{bindingSource:n.bindingSource,sourceInput:n.evidence}));let d=Jd(l,{...p,artifact_set_sha256:l.artifact_set?.artifact_set_sha256||null});if(!d)throw new Error(`Canonical Artifact Evidence IR could not be constructed for ${p.filename}.`);return{source:a,input:r,format:_,artifact:p,analysis:l,artifactIrContext:d}}function j4(e){let{semantic_diff_sha256:t,...n}=e;return{...n,semantic_diff_sha256:ii("sha256").update(Q(n)).digest("hex")}}function ute(e){let t=e.graph_delta||{},n=e.alignment||{},i=e.alignment_rows||[],o=[],a=[],r=[];t.input_contract_changed&&o.push("external_input_contract_changed"),t.output_contract_changed&&o.push("external_output_contract_changed"),((n.added_op_count||0)>0||(n.removed_op_count||0)>0)&&o.push("operator_topology_changed"),i.some(u=>u.output_shape_changed===!0)&&o.push("internal_shape_contract_changed"),i.some(u=>u.quantization_transition===!0)&&o.push("quantization_contract_changed"),Number(t.signed_total_macs||0)!==0&&a.push("nominal_compute_changed"),Number(t.signed_predicted_effective_chain_breaks||0)!==0&&a.push("predicted_partition_boundary_changed"),Number(t.signed_delegated_mac_ratio||0)!==0&&a.push("predicted_delegated_mac_ratio_changed"),(e.target_deltas||[]).some(u=>Number(u.signed_delta_us||0)!==0)&&a.push("modeled_target_cost_changed");let s=e.baseline?.sha256!==e.candidate?.sha256;return s&&r.push("artifact_bytes_changed_task_behavior_not_statically_established"),{schema:"deepbom.change_impact.v1",categories:[y1("integration_revalidation",o),y1("deployment_reassessment",a),y1("task_performance_reassessment",r)],highest_action:o.length?"integration_revalidation":a.length?"deployment_reassessment":r.length?"task_performance_reassessment":"no_change_observed",documentation_only_status:s?"not_established_from_artifact_delta":"not_applicable_no_byte_change",interpretation_boundary:"Categories identify engineering evidence that should be revisited. They do not determine a regulatory submission path, release authorization, clinical significance, or whether changed bytes are metadata-only without a signed conversion or build receipt."}}function y1(e,t){return{id:e,required:t.length>0,reasons:[...new Set(t)]}}async function _te(e,t,n,i){if(vp(e,"verify"),e.bom){let c=await xn(e.bom,"cyclonedx_1_7_bom",Ap),u=eg(t,{hash:n.sha256,fileSizeBytes:n.size,timestamp:"1970-01-01T00:00:00.000Z",artifactIr:i?.artifact_ir||null,evidenceMode:"standalone"}),l=SO({bom:c.document,expectedBom:u,additionalExpectedBoms:[CO(t,{hash:n.sha256,fileSizeBytes:n.size,generatedAt:"1970-01-01T00:00:00.000Z",artifactIr:i?.artifact_ir||null})],artifact:n,componentRef:e.componentRef,bomSource:{filename:c.path,byte_length:c.byte_length,sha256:c.sha256,duplicate_key_validation:"complete"}});await Vi(e,l,()=>e.render==="markdown"?Qte(l):Fte(l)),_e.exitCode=l.gate_result==="block"?2:l.gate_result==="pending"?3:0;return}let o=ea(t);if(!Array.isArray(o.parameters)||o.parameters.length===0)throw new Error(`${n.format} does not expose a serialized external interface contract for verification.`);let a=await xn(e.contract,"production_interface_contract",Ap),r=Zv(o,a.document,n.sha256),s={schema:"deepbom.cli_interface_contract_verification.v1",command:"verify",artifact:n,target_profile:t.target_profile||null,declaration:{filename:a.path,byte_length:a.byte_length,sha256:a.sha256,duplicate_key_validation:"complete"},interface_contract_ledger:o,comparison:r,interpretation_boundary:"This command compares serialized external tensor ABI facts with one supplied declaration. It does not establish preprocessing semantics that are absent from both sources, runtime assignment, inference correctness, task accuracy, clinical validity, or release readiness."};await Vi(e,s,()=>e.render==="markdown"?jte(s):Dte(s)),_e.exitCode=r.gate_result==="pass"?0:r.gate_result==="block"?2:3}async function dte(e,t,n){vp(e,"contract capture");let i=ea(t);if(!Array.isArray(i.parameters)||i.parameters.length===0)throw new Error(`${n.format} does not expose a serialized external interface contract for capture.`);let a={schema:"deepbom.artifact_derived_interface_baseline.v1",source_kind:"artifact_derived_baseline",captured_at:a1(e.timestamp)||new Date().toISOString(),artifact_sha256:n.sha256,artifact:{filename:n.filename,format:n.format,byte_length:n.size},analyzer:{name:"DEEPBOM",semantic_version:Tt,build_commit:Pn.buildCommit,build_content_sha256:Pn.buildContentSha256,rulepack_version:Pn.rulepackVersion,rulepack_sha256:Pn.rulepackSha256},interface_contract_ledger_sha256:i.ledger_sha256,parameters:i.parameters,interpretation_boundary:"This is an artifact-derived baseline for later serialized external-interface comparison. It is not an approved production declaration, implementation attestation, runtime contract, task-quality result, or release authorization."},r={...a,baseline_contract_sha256:ii("sha256").update(Q(a)).digest("hex")};return Vi(e,r,()=>Ute(r))}async function pte(e,t,n,i,o){if(vp(e,"explore"),n.format!=="tflite"||i.kind!=="file")throw new Error(`The explore command supports standalone TFLite artifacts only, received ${n.format}.`);let a=e.request?await xn(e.request,"redesign_request",Ap):null,r=a?.document||{schema:"deepbom.redesign_request.v1",source_sha256:n.sha256,input_height:null,input_width:null,width_multiplier:1,activation_dtype:"source",block_edits:[]};if(!r||typeof r!="object"||Array.isArray(r))throw new Error("The redesign request must be a JSON object.");let s={...r,source_sha256:r.source_sha256||n.sha256},c=await Io(i),u=W8(c,n.filename,o,s);return u.artifact=n,u.target_profile=t.target_profile||null,a&&(u.request_input={filename:a.path,byte_length:a.byte_length,sha256:a.sha256,duplicate_key_validation:"complete"}),t.cli_target_profile_input&&(u.cli_target_profile_input=t.cli_target_profile_input),Vi(e,u,()=>Wte(u))}async function mte(e,t){let n=t.artifact_ir,i=t.model_ir,o=t.graph_ir;if(e.outputFormat==="png"){let r=u8(o,{view:e.view});e.output&&e.output!=="-"?await Pa(e.output,r.bytes,{noClobber:e.noClobber}):_e.stdout.write(r.bytes);return}let a=c8(o,{view:e.view,format:e.outputFormat,compact:e.compact,artifactIr:n,modelIr:i});e.output&&e.output!=="-"?await Pa(e.output,a.text,{noClobber:e.noClobber}):_e.stdout.write(a.text)}async function U4(){let e=await Jl(await X4("tflite_wasm_audit_bg.wasm"));if($4&&ii("sha256").update(e).digest("hex")!==$4)throw new Error("Packaged TFLite WASM failed its release SHA-256 check.");J8({module:e})}async function Vi(e,t,n){let i=e.outputFormat==="summary"||e.render==="markdown",o=!i&&(e.json||e.compact||!!e.output||e.outputFormat!=="analysis"||e.sections?.length||e.pointer||e.listSections),a=i||!o?n():`${JSON.stringify(t,C1,e.compact?0:2)}
|