edsger 0.82.0 → 0.84.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.
Files changed (113) hide show
  1. package/README.md +101 -2
  2. package/assets/README.md +31 -18
  3. package/assets/audit/base.yaml +187 -0
  4. package/assets/audit/csharp.yaml +46 -0
  5. package/assets/audit/dart.yaml +46 -0
  6. package/assets/audit/go.yaml +46 -0
  7. package/assets/audit/java.yaml +46 -0
  8. package/assets/audit/python.yaml +49 -0
  9. package/assets/audit/typescript.yaml +51 -0
  10. package/assets/audit-viewer/assets/audit--os0TXXZ.css +1 -0
  11. package/assets/audit-viewer/assets/audit-CSblYELs.js +2 -0
  12. package/assets/audit-viewer/audit.html +31 -0
  13. package/assets/audit-viewer-single.html +32 -0
  14. package/assets/diagrams/base.yaml +351 -0
  15. package/assets/diagrams/csharp.yaml +48 -0
  16. package/assets/diagrams/dart.yaml +41 -0
  17. package/assets/diagrams/go.yaml +44 -0
  18. package/assets/diagrams/java.yaml +43 -0
  19. package/assets/diagrams/python.yaml +41 -0
  20. package/assets/diagrams/typescript.yaml +45 -0
  21. package/assets/diagrams-viewer/assets/abnfDiagram-VRR7QNED-CWLpbgGU.js +1 -0
  22. package/assets/diagrams-viewer/assets/arc-B4VipCr_.js +1 -0
  23. package/assets/diagrams-viewer/assets/architectureDiagram-ZJ3FMSHR-BMDodQXV.js +36 -0
  24. package/assets/diagrams-viewer/assets/blockDiagram-677ZJIJ3-DbHoVVH-.js +132 -0
  25. package/assets/diagrams-viewer/assets/c4Diagram-LMCZKHZV-CyUEj98S.js +10 -0
  26. package/assets/diagrams-viewer/assets/channel-DWh7ErxY.js +1 -0
  27. package/assets/diagrams-viewer/assets/chunk-2Q5K7J3B-CWu0p0os.js +1 -0
  28. package/assets/diagrams-viewer/assets/chunk-32BRIVSS-BhVWSCoK.js +1 -0
  29. package/assets/diagrams-viewer/assets/chunk-5VM5RSS4-B_2wZBAn.js +15 -0
  30. package/assets/diagrams-viewer/assets/chunk-EX3LRPZG-D_MRgtfL.js +231 -0
  31. package/assets/diagrams-viewer/assets/chunk-JWPE2WC7-dsh1qiy0.js +1 -0
  32. package/assets/diagrams-viewer/assets/chunk-MOJQB5TN-BvLm4a6B.js +88 -0
  33. package/assets/diagrams-viewer/assets/chunk-RYQCIY6F-gJyPbIpx.js +1 -0
  34. package/assets/diagrams-viewer/assets/chunk-V7JOEXUC-BMvj0zJM.js +206 -0
  35. package/assets/diagrams-viewer/assets/chunk-VR4S4FIN-Di2iBUXs.js +1 -0
  36. package/assets/diagrams-viewer/assets/chunk-XXDRQBXY-Cfajbd4I.js +1 -0
  37. package/assets/diagrams-viewer/assets/classDiagram-OUVF2IWQ-winWhRce.js +1 -0
  38. package/assets/diagrams-viewer/assets/classDiagram-v2-EOCWNBFH-winWhRce.js +1 -0
  39. package/assets/diagrams-viewer/assets/cose-bilkent-JH36ORCC-ClE2EhTL.js +1 -0
  40. package/assets/diagrams-viewer/assets/cynefin-VYW2F7L2-nm5z0Jwc.js +178 -0
  41. package/assets/diagrams-viewer/assets/cynefinDiagram-TSTJHNR4-CGhnRh5V.js +62 -0
  42. package/assets/diagrams-viewer/assets/cytoscape.esm-CUqq0XTU.js +331 -0
  43. package/assets/diagrams-viewer/assets/dagre-VKFMJZFB-COlahHKk.js +4 -0
  44. package/assets/diagrams-viewer/assets/defaultLocale-DX6XiGOO.js +1 -0
  45. package/assets/diagrams-viewer/assets/diagram-FQU43EPY-DsUclBK0.js +3 -0
  46. package/assets/diagrams-viewer/assets/diagram-G47NLZAW-CnjT9SvX.js +24 -0
  47. package/assets/diagrams-viewer/assets/diagram-NH7WQ7WH-DiGoGOyA.js +24 -0
  48. package/assets/diagrams-viewer/assets/diagram-OA4YK3LP-qi8nz9qe.js +30 -0
  49. package/assets/diagrams-viewer/assets/diagram-WEI45ONY-BV3PGzwL.js +41 -0
  50. package/assets/diagrams-viewer/assets/diagrams-8nCc1utO.css +1 -0
  51. package/assets/diagrams-viewer/assets/diagrams-CF48btj0.js +314 -0
  52. package/assets/diagrams-viewer/assets/ebnfDiagram-CCIWWBDH-CtKWe-dh.js +1 -0
  53. package/assets/diagrams-viewer/assets/erDiagram-Q63AITRT-Aajee3Fz.js +85 -0
  54. package/assets/diagrams-viewer/assets/flowDiagram-23GEKE2U-N3Xe2K9t.js +156 -0
  55. package/assets/diagrams-viewer/assets/ganttDiagram-NO4QXBWP-Bjicdg8S.js +292 -0
  56. package/assets/diagrams-viewer/assets/gitGraphDiagram-IHSO6WYX-CacIXKIe.js +106 -0
  57. package/assets/diagrams-viewer/assets/graph-C2PyVmSI.js +1 -0
  58. package/assets/diagrams-viewer/assets/infoDiagram-FWYZ7A6U-CVmDapTx.js +2 -0
  59. package/assets/diagrams-viewer/assets/init-Gi6I4Gst.js +1 -0
  60. package/assets/diagrams-viewer/assets/ishikawaDiagram-FXEZZL3T-DMJf1YQN.js +70 -0
  61. package/assets/diagrams-viewer/assets/journeyDiagram-5HDEW3XC-Bk_U6MPk.js +139 -0
  62. package/assets/diagrams-viewer/assets/kanban-definition-HUTT4EX6-n05wGXiD.js +89 -0
  63. package/assets/diagrams-viewer/assets/katex-C5jXJg4s.js +257 -0
  64. package/assets/diagrams-viewer/assets/layout-HEHzrzvT.js +1 -0
  65. package/assets/diagrams-viewer/assets/linear-DD_zky65.js +1 -0
  66. package/assets/diagrams-viewer/assets/map-BQHxRNoK.js +1 -0
  67. package/assets/diagrams-viewer/assets/mindmap-definition-LN4V7U3C-BWt_I9vr.js +96 -0
  68. package/assets/diagrams-viewer/assets/ordinal-Cboi1Yqb.js +1 -0
  69. package/assets/diagrams-viewer/assets/pegDiagram-2B236MQR-CCZTIXBZ.js +1 -0
  70. package/assets/diagrams-viewer/assets/pieDiagram-ENE6RG2P-BmIQql1w.js +39 -0
  71. package/assets/diagrams-viewer/assets/quadrantDiagram-ABIIQ3AL-BPvOH5QN.js +7 -0
  72. package/assets/diagrams-viewer/assets/railroadDiagram-RFXS5EU6-DpgVbjSl.js +1 -0
  73. package/assets/diagrams-viewer/assets/requirementDiagram-TGXJPOKE-CDVpI3MH.js +84 -0
  74. package/assets/diagrams-viewer/assets/sankeyDiagram-HTMAVEWB-DU2J23Xy.js +40 -0
  75. package/assets/diagrams-viewer/assets/sequenceDiagram-DBY2YBRQ-BIVlCWU4.js +162 -0
  76. package/assets/diagrams-viewer/assets/sizeCapture-X5ZJPWSS-C9KxyKN2.js +1 -0
  77. package/assets/diagrams-viewer/assets/stateDiagram-2N3HPSRC-Ba5mRI9d.js +1 -0
  78. package/assets/diagrams-viewer/assets/stateDiagram-v2-6OUMAXLB-Dw-0OG6b.js +1 -0
  79. package/assets/diagrams-viewer/assets/swimlanes-5IMT3BWC-aOsD2O80.js +2 -0
  80. package/assets/diagrams-viewer/assets/swimlanesDiagram-G3AALYLV-KujklZml.js +8 -0
  81. package/assets/diagrams-viewer/assets/timeline-definition-FHXFAJF6-CmYd84Hc.js +120 -0
  82. package/assets/diagrams-viewer/assets/vennDiagram-L72KCM5P-CDiMK-z9.js +34 -0
  83. package/assets/diagrams-viewer/assets/wardleyDiagram-EHGQE667-BKLsv25u.js +78 -0
  84. package/assets/diagrams-viewer/assets/xychartDiagram-FW5EYKEG-Bpj6Ub-a.js +7 -0
  85. package/assets/diagrams-viewer/diagrams.html +31 -0
  86. package/assets/diagrams-viewer-single.html +3593 -0
  87. package/assets/manifest.yaml +13 -1
  88. package/assets/mindmap/base.yaml +115 -0
  89. package/assets/mindmap/csharp.yaml +32 -0
  90. package/assets/mindmap/dart.yaml +42 -0
  91. package/assets/mindmap/go.yaml +33 -0
  92. package/assets/mindmap/java.yaml +40 -0
  93. package/assets/mindmap/python.yaml +43 -0
  94. package/assets/mindmap/typescript.yaml +47 -0
  95. package/assets/mindmap-viewer/assets/mindmap-D7KMR9EM.css +1 -0
  96. package/assets/mindmap-viewer/assets/mindmap-Di5RM-4N.js +4 -0
  97. package/assets/mindmap-viewer/mindmap.html +31 -0
  98. package/assets/mindmap-viewer-single.html +34 -0
  99. package/assets/schema/audit.schema.json +66 -0
  100. package/assets/schema/diagrams.schema.json +100 -0
  101. package/assets/schema/mindmap.schema.json +69 -0
  102. package/assets/skills/audit/SKILL.md +76 -0
  103. package/assets/skills/diagram/SKILL.md +70 -0
  104. package/assets/skills/mindmap/SKILL.md +69 -0
  105. package/assets/viewer/assets/index-BFtGar9N.css +1 -0
  106. package/assets/viewer/assets/index-XOKyyudT.js +3 -0
  107. package/assets/viewer/index.html +19 -2
  108. package/assets/viewer-single.html +21 -4
  109. package/dist/index.js +1720 -318
  110. package/dist/index.js.map +1 -1
  111. package/package.json +2 -2
  112. package/assets/viewer/assets/index-C7hwGkuU.js +0 -3
  113. package/assets/viewer/assets/index-Dhc-7q5o.css +0 -1
@@ -0,0 +1,51 @@
1
+ id: typescript
2
+ name: TypeScript / JavaScript Audit Overlay
3
+ version: 0.1.0
4
+ kind: audit
5
+ extends: base
6
+ appliesTo: [typescript]
7
+
8
+ dimensions:
9
+ - id: ts-legacy
10
+ title: Legacy JavaScript Patterns
11
+ defaultSeverity: medium
12
+ guidance: >
13
+ Pre-modern JS surviving in a modern codebase: `var`, callback pyramids or
14
+ hand-rolled promise chains where async/await is standard, CommonJS in a
15
+ package that should be (or claims to be) ESM, `arguments` juggling,
16
+ prototype fiddling, and deprecated Node APIs (`new Buffer()`,
17
+ `fs.exists`, `url.parse`, `domain`). Also flag EOL Node targets in
18
+ `engines`/CI matrices.
19
+ checklist:
20
+ - No `var`; no callback-style async where async/await fits
21
+ - Module system is coherent (ESM/CJS not accidentally mixed)
22
+ - No deprecated Node APIs (new Buffer, fs.exists, url.parse, …)
23
+ - Supported Node versions only (engines/CI not targeting EOL releases)
24
+
25
+ - id: ts-types
26
+ title: Type-System Discipline
27
+ defaultSeverity: medium
28
+ guidance: >
29
+ `any` and `as any` escapes, unexplained `@ts-ignore`/`@ts-expect-error`,
30
+ `tsconfig` without `strict`, non-null assertions papering over design
31
+ problems, untyped boundaries (JSON.parse results trusted blindly), and
32
+ public APIs whose types are broader or vaguer than the implementation.
33
+ checklist:
34
+ - tsconfig has strict mode on (or a documented reason why not)
35
+ - No unexplained any / ts-ignore escapes
36
+ - External data validated at the boundary before being trusted as typed
37
+
38
+ - id: ts-packaging
39
+ title: Package & Publishing Hygiene
40
+ defaultSeverity: medium
41
+ guidance: >
42
+ package.json as a professional artifact: correct `exports`/`main`/`types`
43
+ fields, sensible `files` whitelist, `engines` declared, scripts that work
44
+ on a fresh clone, committed lockfile matching the manifest, and no
45
+ leftover fields from abandoned setups (husky without hooks, jest config
46
+ with vitest installed, etc.).
47
+ checklist:
48
+ - exports/main/types point at real, shipped files
49
+ - files whitelist keeps the published tarball lean
50
+ - Scripts run on a fresh clone; lockfile is committed and current
51
+ - No configuration for tools the repo no longer uses
@@ -0,0 +1 @@
1
+ :root,:root[data-theme=dark]{--bg: #0d1117;--panel: #161b22;--panel-2: #1c2129;--border: #30363d;--text: #e6edf3;--muted: #8b949e;--accent: #58a6ff;--on-accent: #04101f;--chart-line: #e6edf3;--chart-axis: #8b949e;--chart-grid: #21262d;color-scheme:dark}:root[data-theme=light]{--bg: #ffffff;--panel: #f6f8fa;--panel-2: #eaeef2;--border: #d0d7de;--text: #1f2328;--muted: #59636e;--accent: #0969da;--on-accent: #ffffff;--chart-line: #1f2328;--chart-axis: #59636e;--chart-grid: #d8dee4;color-scheme:light}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;background:var(--panel-2);padding:1px 5px;border-radius:5px}.app{max-width:1040px;margin:0 auto;padding:0 20px 60px}.topbar{display:flex;align-items:baseline;justify-content:space-between;padding:22px 0 14px}.brand{display:flex;align-items:baseline;gap:10px}.logo{font-weight:800;font-size:22px;letter-spacing:-.5px}.subtitle{color:var(--muted)}.repo{color:var(--muted);font-family:ui-monospace,monospace}.topbar-actions{display:flex;align-items:center;gap:14px}.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;padding:0;background:var(--panel-2);border:1px solid var(--border);border-radius:8px;color:var(--text);font-size:15px;line-height:1;cursor:pointer}.theme-toggle:hover{border-color:var(--accent);color:var(--accent)}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:22px}.tab{background:none;border:none;border-bottom:2px solid transparent;color:var(--muted);padding:10px 14px;font-size:14px;cursor:pointer}.tab:hover{color:var(--text)}.tab.active{color:var(--text);border-bottom-color:var(--accent);font-weight:600}.stack{display:flex;flex-direction:column;gap:18px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}@media (max-width: 720px){.two-col{grid-template-columns:1fr}}.card{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:18px 20px}.card-title{margin:0 0 14px;font-size:15px;font-weight:600}.hero{display:flex;gap:26px;align-items:center;background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:22px}@media (max-width: 720px){.hero{flex-direction:column;align-items:flex-start}}.hero-meta{flex:1}.summary{margin:0 0 14px;font-size:15px}.facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px 18px;margin:0}.facts div{display:flex;flex-direction:column}.facts dt{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.4px}.facts dd{margin:2px 0 0}.ring svg{display:block}.ring-track{fill:none;stroke:var(--border);stroke-width:12}.ring-value{fill:none;stroke-width:12;stroke-linecap:round;transition:stroke-dasharray .6s ease}.ring-score{font-size:34px;font-weight:800;text-anchor:middle}.ring-grade{font-size:12px;fill:var(--muted);text-anchor:middle}.bar-row{display:grid;grid-template-columns:220px 1fr 120px;align-items:center;gap:12px;padding:5px 0}@media (max-width: 620px){.bar-row{grid-template-columns:130px 1fr 70px}}.bar-label{color:var(--text)}.bar-track{background:var(--panel-2);border-radius:6px;height:10px;overflow:hidden}.bar-fill{height:100%;border-radius:6px;transition:width .5s ease}.bar-value{color:var(--muted);text-align:right;font-variant-numeric:tabular-nums}.list{margin:0;padding-left:18px}.list li{margin:4px 0}.list.good li::marker{color:#3fb950}.list.bad li::marker{color:#f85149}.recs{list-style:none;margin:0;padding:0}.recs li{padding:8px 0;border-bottom:1px solid var(--border)}.recs li:last-child{border-bottom:none}.pill{display:inline-block;font-size:11px;text-transform:uppercase;border-radius:20px;padding:2px 8px;margin-right:8px;font-weight:700}.pill.high{background:#6e2019;color:#ff7b72}.pill.medium{background:#5a4212;color:#e3b341}.pill.low{background:#22333b;color:#7ee2c8}:root[data-theme=light] .pill.high{background:#ffebe9;color:#cf222e}:root[data-theme=light] .pill.medium{background:#fff8c5;color:#9a6700}:root[data-theme=light] .pill.low{background:#dafbe1;color:#1a7f37}.run-picker{display:flex;align-items:center;gap:10px}.run-picker select,select{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:6px 10px}.crit-list{display:flex;flex-direction:column;gap:6px}.crit{border:1px solid var(--border);border-radius:8px;padding:8px 12px;background:var(--panel-2)}.crit summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none}.crit summary::-webkit-details-marker{display:none}.score-chip{font-variant-numeric:tabular-nums;font-weight:700;color:#0d1117;border-radius:6px;padding:1px 8px;font-size:12px}.crit-title{font-weight:500}.crit-just{margin:10px 0 6px;color:var(--text)}.evidence{margin:0;padding-left:18px}.evidence li{margin:3px 0}.table-wrap{overflow-x:auto}table.history{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}table.history th,table.history td{padding:7px 10px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}table.history th{color:var(--muted);font-weight:600;font-size:12px}table.history .num{text-align:right}table.history .cat{color:var(--muted)}table.history .strong{font-weight:700}.up{color:#3fb950}.down{color:#f85149}:root[data-theme=light] .up,:root[data-theme=light] .list.good li::marker{color:#1a7f37}:root[data-theme=light] .down,:root[data-theme=light] .list.bad li::marker{color:#cf222e}.grade-dot{font-size:10px}.chart{width:100%}.legend{display:flex;gap:18px;color:var(--muted);margin-top:12px;flex-wrap:wrap}.legend.wrap span{display:inline-flex;align-items:center;gap:6px}.swatch{width:12px;height:12px;border-radius:3px;display:inline-block}.empty{text-align:center;color:var(--muted);padding:60px 20px}.muted{color:var(--muted)}.foot{text-align:center;color:var(--muted);margin-top:34px;font-size:12px}.uplot,.u-title,.u-legend{color:var(--text)}.u-legend .u-marker{border-radius:2px}:root{--sev-critical: #f85149;--sev-high: #f0883e;--sev-medium: #d29922;--sev-low: #58a6ff;--sev-info: #8b949e;--quick: #3fb950}:root[data-theme=light]{--sev-critical: #cf222e;--sev-high: #bc4c00;--sev-medium: #9a6700;--sev-low: #0969da;--sev-info: #59636e;--quick: #1a7f37}.audit-summary{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:20px 22px}.audit-summary .summary{font-size:15px;margin:0 0 14px}.audit-summary .omitted{margin:12px 0 0;font-size:12.5px}.sev-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}.sev-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:var(--panel-2);color:var(--text);border-radius:999px;padding:4px 12px;font:inherit;font-size:12.5px;cursor:pointer}.sev-chip .sev-count{font-weight:700}.sev-chip.sev-critical .sev-count{color:var(--sev-critical)}.sev-chip.sev-high .sev-count{color:var(--sev-high)}.sev-chip.sev-medium .sev-count{color:var(--sev-medium)}.sev-chip.sev-low .sev-count{color:var(--sev-low)}.sev-chip.sev-info .sev-count{color:var(--sev-info)}.sev-chip.quick .sev-count{color:var(--quick)}.sev-chip:hover{border-color:var(--accent)}.sev-chip.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,var(--panel-2))}.run-select{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:4px 8px;font:inherit}.findings-panel{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:14px 18px 22px}.findings-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--border);margin-bottom:6px}.search{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:6px 10px;font:inherit;font-size:13px;flex:1;min-width:200px}.search:focus{outline:none;border-color:var(--accent)}.ghost-btn{background:none;border:1px solid var(--border);color:var(--muted);border-radius:6px;padding:5px 10px;font-size:12.5px;cursor:pointer}.ghost-btn:hover{color:var(--text);border-color:var(--accent)}.count-note{font-size:12.5px}.dimension-group{margin-top:16px}.dimension-title{font-size:15px;margin:0 0 8px}.count-badge{font-size:11px;color:var(--muted);background:var(--panel-2);border-radius:999px;padding:1px 8px;margin-left:6px;vertical-align:2px;font-weight:600}.finding{border:1px solid var(--border);border-left-width:3px;border-radius:8px;margin-bottom:8px;background:var(--panel-2)}.finding.sev-border-critical{border-left-color:var(--sev-critical)}.finding.sev-border-high{border-left-color:var(--sev-high)}.finding.sev-border-medium{border-left-color:var(--sev-medium)}.finding.sev-border-low{border-left-color:var(--sev-low)}.finding.sev-border-info{border-left-color:var(--sev-info)}.finding-head{display:flex;align-items:center;gap:10px;width:100%;background:none;border:none;color:var(--text);font:inherit;text-align:left;padding:9px 12px;cursor:pointer;min-width:0}.finding-title{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.finding-loc{flex:none;max-width:34%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:color-mix(in srgb,var(--accent) 75%,var(--text))}.more-loc{flex:none;font-size:11px;color:var(--muted);background:var(--panel);border-radius:999px;padding:1px 7px}.sev-badge{flex:none;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;border-radius:5px;padding:2px 7px;color:var(--bg)}.sev-badge.sev-critical{background:var(--sev-critical)}.sev-badge.sev-high{background:var(--sev-high)}.sev-badge.sev-medium{background:var(--sev-medium)}.sev-badge.sev-low{background:var(--sev-low)}.sev-badge.sev-info{background:var(--sev-info)}.effort{flex:none;margin-left:auto;font-size:11px;border:1px solid var(--border);border-radius:999px;padding:1px 8px;color:var(--muted)}.effort-quick{color:var(--quick);border-color:color-mix(in srgb,var(--quick) 40%,var(--border))}.chevron{flex:none;color:var(--muted);transition:transform .12s ease}.chevron.open{transform:rotate(90deg)}.finding-body{padding:0 12px 12px 44px}.finding-body p{margin:0 0 8px}.finding-body .fix{color:var(--muted)}.finding-body .fix strong{color:var(--quick)}.finding-body .also code{margin-right:6px}.positives{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:16px 20px}.positives h2{margin:0 0 8px;font-size:15px}.positives ul{margin:0;padding-left:20px;color:var(--muted)}@media (max-width: 640px){.finding-loc{display:none}.finding-body{padding-left:12px}}
@@ -0,0 +1,2 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();var G,m,Ce,A,ae,Ae,Ee,Y,U,L,Ne,_e,X,Z,W={},j=[],je=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,z=Array.isArray;function C(e,t){for(var n in t)e[n]=t[n];return e}function oe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Be(e,t,n){var o,r,i,l={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?G.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return M(e,l,o,r,null)}function M(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Ce,__i:-1,__u:0};return r==null&&m.vnode!=null&&m.vnode(i),i}function V(e){return e.children}function R(e,t){this.props=e,this.context=t}function F(e,t){if(t==null)return e.__?F(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?F(e):null}function Ge(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],r=[],i=C({},t);i.__v=t.__v+1,m.vnode&&m.vnode(i),le(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??F(t),!!(32&t.__u),r),i.__v=t.__v,i.__.__k[i.__i]=i,Le(o,i,r),t.__e=t.__=null,i.__e!=n&&Pe(i)}}function Pe(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Pe(e)}function de(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!B.__r++||ae!=m.debounceRendering)&&((ae=m.debounceRendering)||Ae)(B)}function B(){try{for(var e,t=1;A.length;)A.length>t&&A.sort(Ee),e=A.shift(),t=A.length,Ge(e)}finally{A.length=B.__r=0}}function Fe(e,t,n,o,r,i,l,a,s,u,h){var g,_,f,v,T,$,y,p=o&&o.__k||j,d=t.length;for(s=ze(n,t,p,s,d),g=0;g<d;g++)(f=n.__k[g])!=null&&(_=f.__i!=-1&&p[f.__i]||W,f.__i=g,$=le(e,f,_,r,i,l,a,s,u,h),v=f.__e,f.ref&&_.ref!=f.ref&&(_.ref&&se(_.ref,null,f),h.push(f.ref,f.__c||v,f)),T==null&&v!=null&&(T=v),(y=!!(4&f.__u))||_.__k===f.__k?(s=He(f,s,e,y),y&&_.__e&&(_.__e=null)):typeof f.type=="function"&&$!==void 0?s=$:v&&(s=v.nextSibling),f.__u&=-7);return n.__e=T,s}function ze(e,t,n,o,r){var i,l,a,s,u,h=n.length,g=h,_=0;for(e.__k=new Array(r),i=0;i<r;i++)(l=t[i])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[i]=M(null,l,null,null,null):z(l)?l=e.__k[i]=M(V,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[i]=M(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[i]=l,s=i+_,l.__=e,l.__b=e.__b+1,a=null,(u=l.__i=Ve(l,n,s,g))!=-1&&(g--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(r>h?_--:r<h&&_++),typeof l.type!="function"&&(l.__u|=4)):u!=s&&(u==s-1?_--:u==s+1?_++:(u>s?_--:_++,l.__u|=4))):e.__k[i]=null;if(g)for(i=0;i<h;i++)(a=n[i])!=null&&!(2&a.__u)&&(a.__e==o&&(o=F(a)),qe(a,a));return o}function He(e,t,n,o){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=He(r[i],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=F(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ve(e,t,n,o){var r,i,l,a=e.key,s=e.type,u=t[n],h=u!=null&&(2&u.__u)==0;if(u===null&&a==null||h&&a==u.key&&s==u.type)return n;if(o>(h?1:0)){for(r=n-1,i=n+1;r>=0||i<t.length;)if((u=t[l=r>=0?r--:i++])!=null&&!(2&u.__u)&&a==u.key&&s==u.type)return l}return-1}function fe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||je.test(t)?n:n+"px"}function O(e,t,n,o,r){var i,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||fe(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||fe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Ne,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n[L]=o[L]:(n[L]=_e,e.addEventListener(t,i?Z:X,i)):e.removeEventListener(t,i?Z:X,i);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function he(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[U]==null)t[U]=_e++;else if(t[U]<n[L])return;return n(m.event?m.event(t):t)}}}function le(e,t,n,o,r,i,l,a,s,u){var h,g,_,f,v,T,$,y,p,d,S,b,H,ue,D,K,x=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(s=!!(32&n.__u),i=[a=t.__e=n.__e]),(h=m.__b)&&h(t);e:if(typeof x=="function"){g=l.length;try{if(p=t.props,d=x.prototype&&x.prototype.render,S=(h=x.contextType)&&o[h.__c],b=h?S?S.props.value:h.__:o,n.__c?y=(_=t.__c=n.__c).__=_.__E:(d?t.__c=_=new x(p,b):(t.__c=_=new R(p,b),_.constructor=x,_.render=Ye),S&&S.sub(_),_.state||(_.state={}),_.__n=o,f=_.__d=!0,_.__h=[],_._sb=[]),d&&_.__s==null&&(_.__s=_.state),d&&x.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=C({},_.__s)),C(_.__s,x.getDerivedStateFromProps(p,_.__s))),v=_.props,T=_.state,_.__v=t,f)d&&x.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),d&&_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(d&&x.getDerivedStateFromProps==null&&p!==v&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(p,b),t.__v==n.__v||!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(p,_.__s,b)===!1){t.__v!=n.__v&&(_.props=p,_.state=_.__s,_.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(N){N&&(N.__=t)}),j.push.apply(_.__h,_._sb),_._sb=[],_.__h.length&&l.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(p,_.__s,b),d&&_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(v,T,$)})}if(_.context=b,_.props=p,_.__P=e,_.__e=!1,H=m.__r,ue=0,d)_.state=_.__s,_.__d=!1,H&&H(t),h=_.render(_.props,_.state,_.context),j.push.apply(_.__h,_._sb),_._sb=[];else do _.__d=!1,H&&H(t),h=_.render(_.props,_.state,_.context),_.state=_.__s;while(_.__d&&++ue<25);_.state=_.__s,_.getChildContext!=null&&(o=C(C({},o),_.getChildContext())),d&&!f&&_.getSnapshotBeforeUpdate!=null&&($=_.getSnapshotBeforeUpdate(v,T)),D=h!=null&&h.type===V&&h.key==null?Ie(h.props.children):h,a=Fe(e,z(D)?D:[D],t,n,o,r,i,l,a,s,u),_.base=t.__e,t.__u&=-161,_.__h.length&&l.push(_),y&&(_.__E=_.__=null)}catch(N){if(l.length=g,t.__v=null,s||i!=null)if(N.then){for(t.__u|=s?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i!=null&&(i[i.indexOf(a)]=null),t.__e=a}else{if(i!=null)for(K=i.length;K--;)oe(i[K]);ee(t)}else t.__e=n.__e,!t.__k&&n.__k&&(t.__k=n.__k),N.then||ee(t);m.__e(N,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Ke(n.__e,t,n,o,r,i,l,s,u);return(h=m.diffed)&&h(t),128&t.__u?void 0:a}function ee(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ee))}function Le(e,t,n){for(var o=0;o<n.length;o++)se(n[o],n[++o],n[++o]);m.__c&&m.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(i){i.call(r)})}catch(i){m.__e(i,r.__v)}})}function Ie(e){return typeof e!="object"||e==null||e.__b>0?e:z(e)?e.map(Ie):e.constructor!==void 0?null:C({},e)}function Ke(e,t,n,o,r,i,l,a,s){var u,h,g,_,f,v,T,$=n.props||W,y=t.props,p=t.type;if(p=="svg"?r="http://www.w3.org/2000/svg":p=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((f=i[u])&&"setAttribute"in f==!!p&&(p?f.localName==p:f.nodeType==3)){e=f,i[u]=null;break}}if(e==null){if(p==null)return document.createTextNode(y);e=document.createElementNS(r,p,y.is&&y),a&&(m.__m&&m.__m(t,i),a=!1),i=null}if(p==null)$===y||a&&e.data==y||(e.data=y);else{if(i=p=="textarea"&&y.defaultValue!=null?null:i&&G.call(e.childNodes),!a&&i!=null)for($={},u=0;u<e.attributes.length;u++)$[(f=e.attributes[u]).name]=f.value;for(u in $)f=$[u],u=="dangerouslySetInnerHTML"?g=f:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||O(e,u,null,f,r);for(u in y)f=y[u],u=="children"?_=f:u=="dangerouslySetInnerHTML"?h=f:u=="value"?v=f:u=="checked"?T=f:a&&typeof f!="function"||$[u]===f||O(e,u,f,$[u],r);if(h)a||g&&(h.__html==g.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(g&&(e.innerHTML=""),Fe(t.type=="template"?e.content:e,z(_)?_:[_],t,n,o,p=="foreignObject"?"http://www.w3.org/1999/xhtml":r,i,l,i?i[0]:n.__k&&F(n,0),a,s),i!=null)for(u=i.length;u--;)oe(i[u]);a&&p!="textarea"||(u="value",p=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[u]||p=="progress"&&!v||p=="option"&&v!=$[u])&&O(e,u,v,$[u],r),u="checked",T!=null&&T!=e[u]&&O(e,u,T,$[u],r))}return e}function se(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(r){m.__e(r,n)}}function qe(e,t,n){var o,r;if(m.unmount&&m.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||se(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){m.__e(i,t)}o.base=o.__P=o.__n=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&qe(o[r],t,n||typeof e.type!="function");n||oe(e.__e),e.__c=e.__=e.__e=void 0}function Ye(e,t,n){return this.constructor(e,n)}function Je(e,t,n){var o,r,i,l;t==document&&(t=document.documentElement),m.__&&m.__(e,t),r=(o=!1)?null:t.__k,i=[],l=[],le(t,e=t.__k=Be(V,null,[e]),r||W,W,t.namespaceURI,r?null:t.firstChild?G.call(t.childNodes):null,i,r?r.__e:t.firstChild,o,l),Le(i,e,l),e.props.children=null}G=j.slice,m={__e:function(e,t,n,o){for(var r,i,l;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(a){e=a}throw e}},Ce=0,R.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=C({},this.state),typeof e=="function"&&(e=e(C({},n),this.props)),e&&C(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),de(this))},R.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),de(this))},R.prototype.render=V,A=[],Ae=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ee=function(e,t){return e.__v.__b-t.__v.__b},B.__r=0,Y=Math.random().toString(8),U="__d"+Y,L="__a"+Y,Ne=/(PointerCapture)$|Capture$/i,_e=0,X=he(!1),Z=he(!0);var Qe=0;function c(e,t,n,o,r,i){t||(t={});var l,a,s=t;if("ref"in s)for(a in s={},t)a=="ref"?l=t[a]:s[a]=t[a];var u={type:e,props:s,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Qe,__i:-1,__u:0,__source:r,__self:i};if(typeof e=="function"&&(l=e.defaultProps))for(a in l)s[a]===void 0&&(s[a]=l[a]);return m.vnode&&m.vnode(u),u}var I,k,J,pe,te=0,De=[],w=m,me=w.__b,ge=w.__r,ve=w.diffed,ye=w.__c,be=w.unmount,ke=w.__;function ce(e,t){w.__h&&w.__h(k,e,te||t),te=0;var n=k.__H||(k.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function P(e){return te=1,Xe(Me,e)}function Xe(e,t,n){var o=ce(I++,2);if(o.t=e,!o.__c&&(o.__=[Me(void 0,t),function(a){var s=o.__N?o.__N[0]:o.__[0],u=o.t(s,a);s!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=k,!k.__f)){var r=function(a,s,u){if(!o.__c.__H)return!0;var h=!1,g=o.__c.props!==a;if(o.__c.__H.__.some(function(f){if(f.__N){h=!0;var v=f.__[0];f.__=f.__N,f.__N=void 0,v!==f.__[0]&&(g=!0)}}),i){var _=i.call(this,a,s,u);return h?_||g:_}return!h||g};k.__f=!0;var i=k.shouldComponentUpdate,l=k.componentWillUpdate;k.componentWillUpdate=function(a,s,u){if(this.__e){var h=i;i=void 0,r(a,s,u),i=h}l&&l.call(this,a,s,u)},k.shouldComponentUpdate=r}return o.__N||o.__}function ne(e,t){var n=ce(I++,3);!w.__s&&Ue(n.__H,t)&&(n.__=e,n.u=t,k.__H.__h.push(n))}function E(e,t){var n=ce(I++,7);return Ue(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function we(){for(var e;e=De.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ie),t.__h.some(Oe),t.__h=[]}catch(n){t.__h=[],w.__e(n,e.__v)}}}w.__b=function(e){k=null,me&&me(e)},w.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ke&&ke(e,t)},w.__r=function(e){ge&&ge(e),I=0;var t=(k=e.__c).__H;t&&(J===k?(t.__h=[],k.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.length&&we(),I=0)),J=k},w.diffed=function(e){ve&&ve(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(De.push(t)!==1&&pe===w.requestAnimationFrame||((pe=w.requestAnimationFrame)||Ze)(we)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),J=k=null},w.__c=function(e,t){t.some(function(n){try{n.__h.some(ie),n.__h=n.__h.filter(function(o){return!o.__||Oe(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],w.__e(o,n.__v)}}),ye&&ye(e,t)},w.unmount=function(e){be&&be(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(o){try{ie(o)}catch(r){t=r}}),n.__H=void 0,t&&w.__e(t,n.__v))};var $e=typeof requestAnimationFrame=="function";function Ze(e){var t,n=function(){clearTimeout(o),$e&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);$e&&(t=requestAnimationFrame(n))}function ie(e){var t=k,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),k=t}function Oe(e){var t=k;e.__c=e.__(),k=t}function Ue(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Me(e,t){return typeof t=="function"?t(e):t}async function et(){if(window.__EDSGER_AUDIT__)return Se(window.__EDSGER_AUDIT__);const e=await fetch("./edsger-audit.json",{cache:"no-store"});if(!e.ok)throw new Error(`Could not load edsger-audit.json (HTTP ${e.status})`);return Se(await e.json())}function Se(e){const t=[...e.history??[]].sort((n,o)=>n.generatedAt<o.generatedAt?-1:n.generatedAt>o.generatedAt?1:0);return{repo:e.repo,latest:e.latest??null,history:t,runs:e.runs??{}}}const tt=["critical","high","medium","low","info"],Q={severities:new Set,dimension:null,query:"",quickOnly:!1};function nt(e,t){if(t.severities.size&&!t.severities.has(e.severity)||t.dimension&&e.dimension!==t.dimension||t.quickOnly&&e.effort!=="quick")return!1;const n=t.query.trim().toLowerCase();return n?[e.title,e.detail,e.suggestion??"",e.file,...e.moreLocations??[]].join(`
2
+ `).toLowerCase().includes(n):!0}function it(e,t){return e.filter(n=>nt(n,t))}function rt(e,t){const n=t.map(r=>({...r,findings:[]})),o=new Map(n.map(r=>[r.id,r]));for(const r of e){let i=o.get(r.dimension);i||(i={id:r.dimension,title:Re(r.dimension),findings:[]},o.set(r.dimension,i),n.push(i)),i.findings.push(r)}return n.filter(r=>r.findings.length>0)}function _t(e){const t={critical:0,high:0,medium:0,low:0,info:0};for(const n of e)t[n.severity]++;return t}function Re(e){return e.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function ot(e){return!e.file||e.file==="-"?"":e.line?`${e.file}:${e.line}`:e.file}const We="edsger-theme",re=new Set;function lt(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function st(){if(typeof document<"u"){const e=document.documentElement.getAttribute("data-theme");if(e==="light"||e==="dark")return e}try{const e=localStorage.getItem(We);if(e==="light"||e==="dark")return e}catch{}return lt()}let q=st();typeof document<"u"&&!document.documentElement.getAttribute("data-theme")&&document.documentElement.setAttribute("data-theme",q);function ct(){return q}function ut(e){q=e,typeof document<"u"&&document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(We,e)}catch{}for(const t of re)t()}function at(){ut(q==="dark"?"light":"dark")}function dt(e){return re.add(e),()=>{re.delete(e)}}function ft(){const[e,t]=P(q);return ne(()=>dt(()=>t(ct())),[]),e}function ht(){const e=ft(),n=`Switch to ${e==="dark"?"light":"dark"} mode`;return c("button",{type:"button",class:"theme-toggle",title:n,"aria-label":n,onClick:()=>at(),children:c("span",{"aria-hidden":"true",children:e==="dark"?"☀":"☾"})})}function Te(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function pt(){var p;const[e,t]=P(null),[n,o]=P(null),[r,i]=P(null),[l,a]=P(Q);ne(()=>{et().then(t).catch(d=>o(d instanceof Error?d.message:String(d)))},[]);const s=E(()=>e?r&&e.runs[r]?e.runs[r]:e.latest:null,[e,r]),u=E(()=>e?[...e.history].reverse():[],[e]);ne(()=>{a(Q)},[s]);const h=E(()=>{var S;return s?(S=s.dimensions)!=null&&S.length?s.dimensions:[...new Set(s.findings.map(b=>b.dimension))].map(b=>({id:b,title:Re(b)})):[]},[s]),g=E(()=>s?it(s.findings,l):[],[s,l]),_=E(()=>rt(g,h),[g,h]),f=E(()=>_t((s==null?void 0:s.findings)??[]),[s]),v=E(()=>((s==null?void 0:s.findings)??[]).filter(d=>d.effort==="quick"&&d.severity!=="info").length,[s]),T=d=>{a(S=>{const b=new Set(S.severities);return b.has(d)?b.delete(d):b.add(d),{...S,severities:b}})},$=l.severities.size>0||l.dimension!==null||l.query.trim()!==""||l.quickOnly,y=(e==null?void 0:e.repo)??(s==null?void 0:s.repo)??"";return c("div",{class:"app",children:[c("header",{class:"topbar",children:[c("div",{class:"brand",children:[c("span",{class:"logo",children:"edsger"}),c("span",{class:"subtitle",children:"audit"})]}),c("div",{class:"topbar-actions",children:[y?c("div",{class:"repo",children:y}):null,c(ht,{})]})]}),c("main",{class:"content",children:n?c("div",{class:"empty",children:[c("strong",{children:"Failed to load data."}),c("div",{class:"muted",children:n})]}):e?s?c("div",{class:"stack",children:[c("section",{class:"audit-summary",children:[c("p",{class:"summary",children:s.summary}),c("div",{class:"sev-chips",role:"group","aria-label":"Filter by severity",children:[tt.map(d=>f[d]?c("button",{class:`sev-chip sev-${d} ${l.severities.has(d)?"on":""}`,onClick:()=>T(d),title:`Toggle ${d} findings`,children:[c("span",{class:"sev-count",children:f[d]})," ",d]},d):null),v?c("button",{class:`sev-chip quick ${l.quickOnly?"on":""}`,onClick:()=>a(d=>({...d,quickOnly:!d.quickOnly})),title:"Show only quick-effort findings",children:[c("span",{class:"sev-count",children:v})," quick wins"]}):null]}),c("dl",{class:"facts",children:[c("div",{children:[c("dt",{children:"Languages"}),c("dd",{children:s.languages.join(", ")||"generic"})]}),c("div",{children:[c("dt",{children:"Standard"}),c("dd",{children:[s.standard.name," v",s.standard.version]})]}),c("div",{children:[c("dt",{children:"Commit"}),c("dd",{children:(p=s.git)!=null&&p.commit?c("code",{children:[s.git.commit,s.git.branch?` (${s.git.branch})`:"",s.git.dirty?" ✻":""]}):"—"})]}),c("div",{children:[c("dt",{children:"Generated"}),c("dd",{children:Te(s.generatedAt)})]}),u.length>1?c("div",{children:[c("dt",{children:"Run"}),c("dd",{children:c("select",{class:"run-select",value:r??s.runId,onChange:d=>i(d.target.value),children:u.map(d=>c("option",{value:d.runId,children:[Te(d.generatedAt)," · ",d.total," findings"]},d.runId))})})]}):null]}),s.omitted>0?c("p",{class:"omitted muted",children:[s.omitted," lower-severity finding(s) omitted by the standard's maxFindings policy."]}):null]}),c("section",{class:"findings-panel",children:[c("div",{class:"findings-toolbar",children:[c("input",{class:"search",type:"search",placeholder:"Search findings, files, fixes…",value:l.query,onInput:d=>a(S=>({...S,query:d.target.value}))}),c("select",{class:"run-select",value:l.dimension??"",onChange:d=>{const S=d.target.value;a(b=>({...b,dimension:S||null}))},children:[c("option",{value:"",children:"All dimensions"}),h.map(d=>c("option",{value:d.id,children:d.title},d.id))]}),$?c("button",{class:"ghost-btn",onClick:()=>a(Q),children:["Clear (",g.length,"/",s.total,")"]}):c("span",{class:"muted count-note",children:[s.total," findings"]})]}),_.length===0?c("div",{class:"empty muted",children:s.total===0?"No findings — spotless.":"Nothing matches the filters."}):_.map(d=>c("div",{class:"dimension-group",children:[c("h2",{class:"dimension-title",children:[d.title," ",c("span",{class:"count-badge",children:d.findings.length})]}),d.findings.map((S,b)=>c(mt,{finding:S},`${d.id}-${b}`))]},d.id))]}),s.positives.length?c("section",{class:"positives",children:[c("h2",{children:"What the repo does well"}),c("ul",{children:s.positives.map(d=>c("li",{children:d},d))})]}):null]}):c("div",{class:"empty",children:["No audit yet. Run ",c("code",{children:"edsger audit"}),"."]}):c("div",{class:"empty",children:"Loading…"})}),c("footer",{class:"foot",children:c("span",{children:"Generated by edsger"})})]})}function mt({finding:e}){const[t,n]=P(!1),o=ot(e);return c("article",{class:`finding sev-border-${e.severity}`,children:[c("button",{class:"finding-head",onClick:()=>n(r=>!r),"aria-expanded":t,children:[c("span",{class:`sev-badge sev-${e.severity}`,children:e.severity}),c("span",{class:"finding-title",children:e.title}),o?c("code",{class:"finding-loc",children:o}):c("span",{class:"muted",children:"repo-wide"}),e.moreLocations.length?c("span",{class:"more-loc",children:["+",e.moreLocations.length]}):null,c("span",{class:`effort effort-${e.effort}`,children:e.effort}),c("span",{class:`chevron ${t?"open":""}`,children:"›"})]}),t?c("div",{class:"finding-body",children:[c("p",{children:e.detail}),e.moreLocations.length?c("p",{class:"also",children:["Also in:"," ",e.moreLocations.map(r=>c("code",{children:r},r))]}):null,e.suggestion?c("p",{class:"fix",children:[c("strong",{children:"Fix:"})," ",e.suggestion]}):null]}):null]})}const xe=document.getElementById("app");xe&&Je(c(pt,{}),xe);
@@ -0,0 +1,31 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <script>
7
+ (function () {
8
+ try {
9
+ var t = localStorage.getItem("edsger-theme");
10
+ if (t !== "light" && t !== "dark") {
11
+ t =
12
+ window.matchMedia &&
13
+ window.matchMedia("(prefers-color-scheme: light)").matches
14
+ ? "light"
15
+ : "dark";
16
+ }
17
+ document.documentElement.setAttribute("data-theme", t);
18
+ } catch (e) {
19
+ document.documentElement.setAttribute("data-theme", "dark");
20
+ }
21
+ })();
22
+ </script>
23
+ <title>Edsger — Audit</title>
24
+ <!-- __EDSGER_AUDIT__ is injected here when exported as a single self-contained file. -->
25
+ <script type="module" crossorigin src="./assets/audit-CSblYELs.js"></script>
26
+ <link rel="stylesheet" crossorigin href="./assets/audit--os0TXXZ.css">
27
+ </head>
28
+ <body>
29
+ <div id="app"></div>
30
+ </body>
31
+ </html>
@@ -0,0 +1,32 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <script>
7
+ (function () {
8
+ try {
9
+ var t = localStorage.getItem("edsger-theme");
10
+ if (t !== "light" && t !== "dark") {
11
+ t =
12
+ window.matchMedia &&
13
+ window.matchMedia("(prefers-color-scheme: light)").matches
14
+ ? "light"
15
+ : "dark";
16
+ }
17
+ document.documentElement.setAttribute("data-theme", t);
18
+ } catch (e) {
19
+ document.documentElement.setAttribute("data-theme", "dark");
20
+ }
21
+ })();
22
+ </script>
23
+ <title>Edsger — Audit</title>
24
+ <!-- __EDSGER_AUDIT__ is injected here when exported as a single self-contained file. -->
25
+ <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();var G,m,Ce,A,ae,Ae,Ee,Y,U,L,Ne,_e,X,Z,W={},j=[],je=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,z=Array.isArray;function C(e,t){for(var n in t)e[n]=t[n];return e}function oe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Be(e,t,n){var o,r,i,l={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?G.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return M(e,l,o,r,null)}function M(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Ce,__i:-1,__u:0};return r==null&&m.vnode!=null&&m.vnode(i),i}function V(e){return e.children}function R(e,t){this.props=e,this.context=t}function F(e,t){if(t==null)return e.__?F(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?F(e):null}function Ge(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],r=[],i=C({},t);i.__v=t.__v+1,m.vnode&&m.vnode(i),le(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??F(t),!!(32&t.__u),r),i.__v=t.__v,i.__.__k[i.__i]=i,Le(o,i,r),t.__e=t.__=null,i.__e!=n&&Pe(i)}}function Pe(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Pe(e)}function de(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!B.__r++||ae!=m.debounceRendering)&&((ae=m.debounceRendering)||Ae)(B)}function B(){try{for(var e,t=1;A.length;)A.length>t&&A.sort(Ee),e=A.shift(),t=A.length,Ge(e)}finally{A.length=B.__r=0}}function Fe(e,t,n,o,r,i,l,a,s,u,h){var g,_,f,v,T,$,y,p=o&&o.__k||j,d=t.length;for(s=ze(n,t,p,s,d),g=0;g<d;g++)(f=n.__k[g])!=null&&(_=f.__i!=-1&&p[f.__i]||W,f.__i=g,$=le(e,f,_,r,i,l,a,s,u,h),v=f.__e,f.ref&&_.ref!=f.ref&&(_.ref&&se(_.ref,null,f),h.push(f.ref,f.__c||v,f)),T==null&&v!=null&&(T=v),(y=!!(4&f.__u))||_.__k===f.__k?(s=He(f,s,e,y),y&&_.__e&&(_.__e=null)):typeof f.type=="function"&&$!==void 0?s=$:v&&(s=v.nextSibling),f.__u&=-7);return n.__e=T,s}function ze(e,t,n,o,r){var i,l,a,s,u,h=n.length,g=h,_=0;for(e.__k=new Array(r),i=0;i<r;i++)(l=t[i])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[i]=M(null,l,null,null,null):z(l)?l=e.__k[i]=M(V,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[i]=M(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[i]=l,s=i+_,l.__=e,l.__b=e.__b+1,a=null,(u=l.__i=Ve(l,n,s,g))!=-1&&(g--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(r>h?_--:r<h&&_++),typeof l.type!="function"&&(l.__u|=4)):u!=s&&(u==s-1?_--:u==s+1?_++:(u>s?_--:_++,l.__u|=4))):e.__k[i]=null;if(g)for(i=0;i<h;i++)(a=n[i])!=null&&!(2&a.__u)&&(a.__e==o&&(o=F(a)),qe(a,a));return o}function He(e,t,n,o){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=He(r[i],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=F(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ve(e,t,n,o){var r,i,l,a=e.key,s=e.type,u=t[n],h=u!=null&&(2&u.__u)==0;if(u===null&&a==null||h&&a==u.key&&s==u.type)return n;if(o>(h?1:0)){for(r=n-1,i=n+1;r>=0||i<t.length;)if((u=t[l=r>=0?r--:i++])!=null&&!(2&u.__u)&&a==u.key&&s==u.type)return l}return-1}function fe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||je.test(t)?n:n+"px"}function O(e,t,n,o,r){var i,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||fe(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||fe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Ne,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n[L]=o[L]:(n[L]=_e,e.addEventListener(t,i?Z:X,i)):e.removeEventListener(t,i?Z:X,i);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function he(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[U]==null)t[U]=_e++;else if(t[U]<n[L])return;return n(m.event?m.event(t):t)}}}function le(e,t,n,o,r,i,l,a,s,u){var h,g,_,f,v,T,$,y,p,d,S,b,H,ue,D,K,x=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(s=!!(32&n.__u),i=[a=t.__e=n.__e]),(h=m.__b)&&h(t);e:if(typeof x=="function"){g=l.length;try{if(p=t.props,d=x.prototype&&x.prototype.render,S=(h=x.contextType)&&o[h.__c],b=h?S?S.props.value:h.__:o,n.__c?y=(_=t.__c=n.__c).__=_.__E:(d?t.__c=_=new x(p,b):(t.__c=_=new R(p,b),_.constructor=x,_.render=Ye),S&&S.sub(_),_.state||(_.state={}),_.__n=o,f=_.__d=!0,_.__h=[],_._sb=[]),d&&_.__s==null&&(_.__s=_.state),d&&x.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=C({},_.__s)),C(_.__s,x.getDerivedStateFromProps(p,_.__s))),v=_.props,T=_.state,_.__v=t,f)d&&x.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),d&&_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(d&&x.getDerivedStateFromProps==null&&p!==v&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(p,b),t.__v==n.__v||!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(p,_.__s,b)===!1){t.__v!=n.__v&&(_.props=p,_.state=_.__s,_.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(N){N&&(N.__=t)}),j.push.apply(_.__h,_._sb),_._sb=[],_.__h.length&&l.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(p,_.__s,b),d&&_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(v,T,$)})}if(_.context=b,_.props=p,_.__P=e,_.__e=!1,H=m.__r,ue=0,d)_.state=_.__s,_.__d=!1,H&&H(t),h=_.render(_.props,_.state,_.context),j.push.apply(_.__h,_._sb),_._sb=[];else do _.__d=!1,H&&H(t),h=_.render(_.props,_.state,_.context),_.state=_.__s;while(_.__d&&++ue<25);_.state=_.__s,_.getChildContext!=null&&(o=C(C({},o),_.getChildContext())),d&&!f&&_.getSnapshotBeforeUpdate!=null&&($=_.getSnapshotBeforeUpdate(v,T)),D=h!=null&&h.type===V&&h.key==null?Ie(h.props.children):h,a=Fe(e,z(D)?D:[D],t,n,o,r,i,l,a,s,u),_.base=t.__e,t.__u&=-161,_.__h.length&&l.push(_),y&&(_.__E=_.__=null)}catch(N){if(l.length=g,t.__v=null,s||i!=null)if(N.then){for(t.__u|=s?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i!=null&&(i[i.indexOf(a)]=null),t.__e=a}else{if(i!=null)for(K=i.length;K--;)oe(i[K]);ee(t)}else t.__e=n.__e,!t.__k&&n.__k&&(t.__k=n.__k),N.then||ee(t);m.__e(N,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Ke(n.__e,t,n,o,r,i,l,s,u);return(h=m.diffed)&&h(t),128&t.__u?void 0:a}function ee(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ee))}function Le(e,t,n){for(var o=0;o<n.length;o++)se(n[o],n[++o],n[++o]);m.__c&&m.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(i){i.call(r)})}catch(i){m.__e(i,r.__v)}})}function Ie(e){return typeof e!="object"||e==null||e.__b>0?e:z(e)?e.map(Ie):e.constructor!==void 0?null:C({},e)}function Ke(e,t,n,o,r,i,l,a,s){var u,h,g,_,f,v,T,$=n.props||W,y=t.props,p=t.type;if(p=="svg"?r="http://www.w3.org/2000/svg":p=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((f=i[u])&&"setAttribute"in f==!!p&&(p?f.localName==p:f.nodeType==3)){e=f,i[u]=null;break}}if(e==null){if(p==null)return document.createTextNode(y);e=document.createElementNS(r,p,y.is&&y),a&&(m.__m&&m.__m(t,i),a=!1),i=null}if(p==null)$===y||a&&e.data==y||(e.data=y);else{if(i=p=="textarea"&&y.defaultValue!=null?null:i&&G.call(e.childNodes),!a&&i!=null)for($={},u=0;u<e.attributes.length;u++)$[(f=e.attributes[u]).name]=f.value;for(u in $)f=$[u],u=="dangerouslySetInnerHTML"?g=f:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||O(e,u,null,f,r);for(u in y)f=y[u],u=="children"?_=f:u=="dangerouslySetInnerHTML"?h=f:u=="value"?v=f:u=="checked"?T=f:a&&typeof f!="function"||$[u]===f||O(e,u,f,$[u],r);if(h)a||g&&(h.__html==g.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(g&&(e.innerHTML=""),Fe(t.type=="template"?e.content:e,z(_)?_:[_],t,n,o,p=="foreignObject"?"http://www.w3.org/1999/xhtml":r,i,l,i?i[0]:n.__k&&F(n,0),a,s),i!=null)for(u=i.length;u--;)oe(i[u]);a&&p!="textarea"||(u="value",p=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[u]||p=="progress"&&!v||p=="option"&&v!=$[u])&&O(e,u,v,$[u],r),u="checked",T!=null&&T!=e[u]&&O(e,u,T,$[u],r))}return e}function se(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(r){m.__e(r,n)}}function qe(e,t,n){var o,r;if(m.unmount&&m.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||se(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){m.__e(i,t)}o.base=o.__P=o.__n=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&qe(o[r],t,n||typeof e.type!="function");n||oe(e.__e),e.__c=e.__=e.__e=void 0}function Ye(e,t,n){return this.constructor(e,n)}function Je(e,t,n){var o,r,i,l;t==document&&(t=document.documentElement),m.__&&m.__(e,t),r=(o=!1)?null:t.__k,i=[],l=[],le(t,e=t.__k=Be(V,null,[e]),r||W,W,t.namespaceURI,r?null:t.firstChild?G.call(t.childNodes):null,i,r?r.__e:t.firstChild,o,l),Le(i,e,l),e.props.children=null}G=j.slice,m={__e:function(e,t,n,o){for(var r,i,l;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(a){e=a}throw e}},Ce=0,R.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=C({},this.state),typeof e=="function"&&(e=e(C({},n),this.props)),e&&C(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),de(this))},R.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),de(this))},R.prototype.render=V,A=[],Ae=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ee=function(e,t){return e.__v.__b-t.__v.__b},B.__r=0,Y=Math.random().toString(8),U="__d"+Y,L="__a"+Y,Ne=/(PointerCapture)$|Capture$/i,_e=0,X=he(!1),Z=he(!0);var Qe=0;function c(e,t,n,o,r,i){t||(t={});var l,a,s=t;if("ref"in s)for(a in s={},t)a=="ref"?l=t[a]:s[a]=t[a];var u={type:e,props:s,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Qe,__i:-1,__u:0,__source:r,__self:i};if(typeof e=="function"&&(l=e.defaultProps))for(a in l)s[a]===void 0&&(s[a]=l[a]);return m.vnode&&m.vnode(u),u}var I,k,J,pe,te=0,De=[],w=m,me=w.__b,ge=w.__r,ve=w.diffed,ye=w.__c,be=w.unmount,ke=w.__;function ce(e,t){w.__h&&w.__h(k,e,te||t),te=0;var n=k.__H||(k.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function P(e){return te=1,Xe(Me,e)}function Xe(e,t,n){var o=ce(I++,2);if(o.t=e,!o.__c&&(o.__=[Me(void 0,t),function(a){var s=o.__N?o.__N[0]:o.__[0],u=o.t(s,a);s!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=k,!k.__f)){var r=function(a,s,u){if(!o.__c.__H)return!0;var h=!1,g=o.__c.props!==a;if(o.__c.__H.__.some(function(f){if(f.__N){h=!0;var v=f.__[0];f.__=f.__N,f.__N=void 0,v!==f.__[0]&&(g=!0)}}),i){var _=i.call(this,a,s,u);return h?_||g:_}return!h||g};k.__f=!0;var i=k.shouldComponentUpdate,l=k.componentWillUpdate;k.componentWillUpdate=function(a,s,u){if(this.__e){var h=i;i=void 0,r(a,s,u),i=h}l&&l.call(this,a,s,u)},k.shouldComponentUpdate=r}return o.__N||o.__}function ne(e,t){var n=ce(I++,3);!w.__s&&Ue(n.__H,t)&&(n.__=e,n.u=t,k.__H.__h.push(n))}function E(e,t){var n=ce(I++,7);return Ue(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function we(){for(var e;e=De.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ie),t.__h.some(Oe),t.__h=[]}catch(n){t.__h=[],w.__e(n,e.__v)}}}w.__b=function(e){k=null,me&&me(e)},w.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ke&&ke(e,t)},w.__r=function(e){ge&&ge(e),I=0;var t=(k=e.__c).__H;t&&(J===k?(t.__h=[],k.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.length&&we(),I=0)),J=k},w.diffed=function(e){ve&&ve(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(De.push(t)!==1&&pe===w.requestAnimationFrame||((pe=w.requestAnimationFrame)||Ze)(we)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),J=k=null},w.__c=function(e,t){t.some(function(n){try{n.__h.some(ie),n.__h=n.__h.filter(function(o){return!o.__||Oe(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],w.__e(o,n.__v)}}),ye&&ye(e,t)},w.unmount=function(e){be&&be(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(o){try{ie(o)}catch(r){t=r}}),n.__H=void 0,t&&w.__e(t,n.__v))};var $e=typeof requestAnimationFrame=="function";function Ze(e){var t,n=function(){clearTimeout(o),$e&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);$e&&(t=requestAnimationFrame(n))}function ie(e){var t=k,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),k=t}function Oe(e){var t=k;e.__c=e.__(),k=t}function Ue(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Me(e,t){return typeof t=="function"?t(e):t}async function et(){if(window.__EDSGER_AUDIT__)return Se(window.__EDSGER_AUDIT__);const e=await fetch("./edsger-audit.json",{cache:"no-store"});if(!e.ok)throw new Error(`Could not load edsger-audit.json (HTTP ${e.status})`);return Se(await e.json())}function Se(e){const t=[...e.history??[]].sort((n,o)=>n.generatedAt<o.generatedAt?-1:n.generatedAt>o.generatedAt?1:0);return{repo:e.repo,latest:e.latest??null,history:t,runs:e.runs??{}}}const tt=["critical","high","medium","low","info"],Q={severities:new Set,dimension:null,query:"",quickOnly:!1};function nt(e,t){if(t.severities.size&&!t.severities.has(e.severity)||t.dimension&&e.dimension!==t.dimension||t.quickOnly&&e.effort!=="quick")return!1;const n=t.query.trim().toLowerCase();return n?[e.title,e.detail,e.suggestion??"",e.file,...e.moreLocations??[]].join(`
26
+ `).toLowerCase().includes(n):!0}function it(e,t){return e.filter(n=>nt(n,t))}function rt(e,t){const n=t.map(r=>({...r,findings:[]})),o=new Map(n.map(r=>[r.id,r]));for(const r of e){let i=o.get(r.dimension);i||(i={id:r.dimension,title:Re(r.dimension),findings:[]},o.set(r.dimension,i),n.push(i)),i.findings.push(r)}return n.filter(r=>r.findings.length>0)}function _t(e){const t={critical:0,high:0,medium:0,low:0,info:0};for(const n of e)t[n.severity]++;return t}function Re(e){return e.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function ot(e){return!e.file||e.file==="-"?"":e.line?`${e.file}:${e.line}`:e.file}const We="edsger-theme",re=new Set;function lt(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function st(){if(typeof document<"u"){const e=document.documentElement.getAttribute("data-theme");if(e==="light"||e==="dark")return e}try{const e=localStorage.getItem(We);if(e==="light"||e==="dark")return e}catch{}return lt()}let q=st();typeof document<"u"&&!document.documentElement.getAttribute("data-theme")&&document.documentElement.setAttribute("data-theme",q);function ct(){return q}function ut(e){q=e,typeof document<"u"&&document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(We,e)}catch{}for(const t of re)t()}function at(){ut(q==="dark"?"light":"dark")}function dt(e){return re.add(e),()=>{re.delete(e)}}function ft(){const[e,t]=P(q);return ne(()=>dt(()=>t(ct())),[]),e}function ht(){const e=ft(),n=`Switch to ${e==="dark"?"light":"dark"} mode`;return c("button",{type:"button",class:"theme-toggle",title:n,"aria-label":n,onClick:()=>at(),children:c("span",{"aria-hidden":"true",children:e==="dark"?"☀":"☾"})})}function Te(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function pt(){var p;const[e,t]=P(null),[n,o]=P(null),[r,i]=P(null),[l,a]=P(Q);ne(()=>{et().then(t).catch(d=>o(d instanceof Error?d.message:String(d)))},[]);const s=E(()=>e?r&&e.runs[r]?e.runs[r]:e.latest:null,[e,r]),u=E(()=>e?[...e.history].reverse():[],[e]);ne(()=>{a(Q)},[s]);const h=E(()=>{var S;return s?(S=s.dimensions)!=null&&S.length?s.dimensions:[...new Set(s.findings.map(b=>b.dimension))].map(b=>({id:b,title:Re(b)})):[]},[s]),g=E(()=>s?it(s.findings,l):[],[s,l]),_=E(()=>rt(g,h),[g,h]),f=E(()=>_t((s==null?void 0:s.findings)??[]),[s]),v=E(()=>((s==null?void 0:s.findings)??[]).filter(d=>d.effort==="quick"&&d.severity!=="info").length,[s]),T=d=>{a(S=>{const b=new Set(S.severities);return b.has(d)?b.delete(d):b.add(d),{...S,severities:b}})},$=l.severities.size>0||l.dimension!==null||l.query.trim()!==""||l.quickOnly,y=(e==null?void 0:e.repo)??(s==null?void 0:s.repo)??"";return c("div",{class:"app",children:[c("header",{class:"topbar",children:[c("div",{class:"brand",children:[c("span",{class:"logo",children:"edsger"}),c("span",{class:"subtitle",children:"audit"})]}),c("div",{class:"topbar-actions",children:[y?c("div",{class:"repo",children:y}):null,c(ht,{})]})]}),c("main",{class:"content",children:n?c("div",{class:"empty",children:[c("strong",{children:"Failed to load data."}),c("div",{class:"muted",children:n})]}):e?s?c("div",{class:"stack",children:[c("section",{class:"audit-summary",children:[c("p",{class:"summary",children:s.summary}),c("div",{class:"sev-chips",role:"group","aria-label":"Filter by severity",children:[tt.map(d=>f[d]?c("button",{class:`sev-chip sev-${d} ${l.severities.has(d)?"on":""}`,onClick:()=>T(d),title:`Toggle ${d} findings`,children:[c("span",{class:"sev-count",children:f[d]})," ",d]},d):null),v?c("button",{class:`sev-chip quick ${l.quickOnly?"on":""}`,onClick:()=>a(d=>({...d,quickOnly:!d.quickOnly})),title:"Show only quick-effort findings",children:[c("span",{class:"sev-count",children:v})," quick wins"]}):null]}),c("dl",{class:"facts",children:[c("div",{children:[c("dt",{children:"Languages"}),c("dd",{children:s.languages.join(", ")||"generic"})]}),c("div",{children:[c("dt",{children:"Standard"}),c("dd",{children:[s.standard.name," v",s.standard.version]})]}),c("div",{children:[c("dt",{children:"Commit"}),c("dd",{children:(p=s.git)!=null&&p.commit?c("code",{children:[s.git.commit,s.git.branch?` (${s.git.branch})`:"",s.git.dirty?" ✻":""]}):"—"})]}),c("div",{children:[c("dt",{children:"Generated"}),c("dd",{children:Te(s.generatedAt)})]}),u.length>1?c("div",{children:[c("dt",{children:"Run"}),c("dd",{children:c("select",{class:"run-select",value:r??s.runId,onChange:d=>i(d.target.value),children:u.map(d=>c("option",{value:d.runId,children:[Te(d.generatedAt)," · ",d.total," findings"]},d.runId))})})]}):null]}),s.omitted>0?c("p",{class:"omitted muted",children:[s.omitted," lower-severity finding(s) omitted by the standard's maxFindings policy."]}):null]}),c("section",{class:"findings-panel",children:[c("div",{class:"findings-toolbar",children:[c("input",{class:"search",type:"search",placeholder:"Search findings, files, fixes…",value:l.query,onInput:d=>a(S=>({...S,query:d.target.value}))}),c("select",{class:"run-select",value:l.dimension??"",onChange:d=>{const S=d.target.value;a(b=>({...b,dimension:S||null}))},children:[c("option",{value:"",children:"All dimensions"}),h.map(d=>c("option",{value:d.id,children:d.title},d.id))]}),$?c("button",{class:"ghost-btn",onClick:()=>a(Q),children:["Clear (",g.length,"/",s.total,")"]}):c("span",{class:"muted count-note",children:[s.total," findings"]})]}),_.length===0?c("div",{class:"empty muted",children:s.total===0?"No findings — spotless.":"Nothing matches the filters."}):_.map(d=>c("div",{class:"dimension-group",children:[c("h2",{class:"dimension-title",children:[d.title," ",c("span",{class:"count-badge",children:d.findings.length})]}),d.findings.map((S,b)=>c(mt,{finding:S},`${d.id}-${b}`))]},d.id))]}),s.positives.length?c("section",{class:"positives",children:[c("h2",{children:"What the repo does well"}),c("ul",{children:s.positives.map(d=>c("li",{children:d},d))})]}):null]}):c("div",{class:"empty",children:["No audit yet. Run ",c("code",{children:"edsger audit"}),"."]}):c("div",{class:"empty",children:"Loading…"})}),c("footer",{class:"foot",children:c("span",{children:"Generated by edsger"})})]})}function mt({finding:e}){const[t,n]=P(!1),o=ot(e);return c("article",{class:`finding sev-border-${e.severity}`,children:[c("button",{class:"finding-head",onClick:()=>n(r=>!r),"aria-expanded":t,children:[c("span",{class:`sev-badge sev-${e.severity}`,children:e.severity}),c("span",{class:"finding-title",children:e.title}),o?c("code",{class:"finding-loc",children:o}):c("span",{class:"muted",children:"repo-wide"}),e.moreLocations.length?c("span",{class:"more-loc",children:["+",e.moreLocations.length]}):null,c("span",{class:`effort effort-${e.effort}`,children:e.effort}),c("span",{class:`chevron ${t?"open":""}`,children:"›"})]}),t?c("div",{class:"finding-body",children:[c("p",{children:e.detail}),e.moreLocations.length?c("p",{class:"also",children:["Also in:"," ",e.moreLocations.map(r=>c("code",{children:r},r))]}):null,e.suggestion?c("p",{class:"fix",children:[c("strong",{children:"Fix:"})," ",e.suggestion]}):null]}):null]})}const xe=document.getElementById("app");xe&&Je(c(pt,{}),xe);</script>
27
+ <style rel="stylesheet" crossorigin>:root,:root[data-theme=dark]{--bg: #0d1117;--panel: #161b22;--panel-2: #1c2129;--border: #30363d;--text: #e6edf3;--muted: #8b949e;--accent: #58a6ff;--on-accent: #04101f;--chart-line: #e6edf3;--chart-axis: #8b949e;--chart-grid: #21262d;color-scheme:dark}:root[data-theme=light]{--bg: #ffffff;--panel: #f6f8fa;--panel-2: #eaeef2;--border: #d0d7de;--text: #1f2328;--muted: #59636e;--accent: #0969da;--on-accent: #ffffff;--chart-line: #1f2328;--chart-axis: #59636e;--chart-grid: #d8dee4;color-scheme:light}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;background:var(--panel-2);padding:1px 5px;border-radius:5px}.app{max-width:1040px;margin:0 auto;padding:0 20px 60px}.topbar{display:flex;align-items:baseline;justify-content:space-between;padding:22px 0 14px}.brand{display:flex;align-items:baseline;gap:10px}.logo{font-weight:800;font-size:22px;letter-spacing:-.5px}.subtitle{color:var(--muted)}.repo{color:var(--muted);font-family:ui-monospace,monospace}.topbar-actions{display:flex;align-items:center;gap:14px}.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;padding:0;background:var(--panel-2);border:1px solid var(--border);border-radius:8px;color:var(--text);font-size:15px;line-height:1;cursor:pointer}.theme-toggle:hover{border-color:var(--accent);color:var(--accent)}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:22px}.tab{background:none;border:none;border-bottom:2px solid transparent;color:var(--muted);padding:10px 14px;font-size:14px;cursor:pointer}.tab:hover{color:var(--text)}.tab.active{color:var(--text);border-bottom-color:var(--accent);font-weight:600}.stack{display:flex;flex-direction:column;gap:18px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}@media (max-width: 720px){.two-col{grid-template-columns:1fr}}.card{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:18px 20px}.card-title{margin:0 0 14px;font-size:15px;font-weight:600}.hero{display:flex;gap:26px;align-items:center;background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:22px}@media (max-width: 720px){.hero{flex-direction:column;align-items:flex-start}}.hero-meta{flex:1}.summary{margin:0 0 14px;font-size:15px}.facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px 18px;margin:0}.facts div{display:flex;flex-direction:column}.facts dt{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.4px}.facts dd{margin:2px 0 0}.ring svg{display:block}.ring-track{fill:none;stroke:var(--border);stroke-width:12}.ring-value{fill:none;stroke-width:12;stroke-linecap:round;transition:stroke-dasharray .6s ease}.ring-score{font-size:34px;font-weight:800;text-anchor:middle}.ring-grade{font-size:12px;fill:var(--muted);text-anchor:middle}.bar-row{display:grid;grid-template-columns:220px 1fr 120px;align-items:center;gap:12px;padding:5px 0}@media (max-width: 620px){.bar-row{grid-template-columns:130px 1fr 70px}}.bar-label{color:var(--text)}.bar-track{background:var(--panel-2);border-radius:6px;height:10px;overflow:hidden}.bar-fill{height:100%;border-radius:6px;transition:width .5s ease}.bar-value{color:var(--muted);text-align:right;font-variant-numeric:tabular-nums}.list{margin:0;padding-left:18px}.list li{margin:4px 0}.list.good li::marker{color:#3fb950}.list.bad li::marker{color:#f85149}.recs{list-style:none;margin:0;padding:0}.recs li{padding:8px 0;border-bottom:1px solid var(--border)}.recs li:last-child{border-bottom:none}.pill{display:inline-block;font-size:11px;text-transform:uppercase;border-radius:20px;padding:2px 8px;margin-right:8px;font-weight:700}.pill.high{background:#6e2019;color:#ff7b72}.pill.medium{background:#5a4212;color:#e3b341}.pill.low{background:#22333b;color:#7ee2c8}:root[data-theme=light] .pill.high{background:#ffebe9;color:#cf222e}:root[data-theme=light] .pill.medium{background:#fff8c5;color:#9a6700}:root[data-theme=light] .pill.low{background:#dafbe1;color:#1a7f37}.run-picker{display:flex;align-items:center;gap:10px}.run-picker select,select{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:6px 10px}.crit-list{display:flex;flex-direction:column;gap:6px}.crit{border:1px solid var(--border);border-radius:8px;padding:8px 12px;background:var(--panel-2)}.crit summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none}.crit summary::-webkit-details-marker{display:none}.score-chip{font-variant-numeric:tabular-nums;font-weight:700;color:#0d1117;border-radius:6px;padding:1px 8px;font-size:12px}.crit-title{font-weight:500}.crit-just{margin:10px 0 6px;color:var(--text)}.evidence{margin:0;padding-left:18px}.evidence li{margin:3px 0}.table-wrap{overflow-x:auto}table.history{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}table.history th,table.history td{padding:7px 10px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}table.history th{color:var(--muted);font-weight:600;font-size:12px}table.history .num{text-align:right}table.history .cat{color:var(--muted)}table.history .strong{font-weight:700}.up{color:#3fb950}.down{color:#f85149}:root[data-theme=light] .up,:root[data-theme=light] .list.good li::marker{color:#1a7f37}:root[data-theme=light] .down,:root[data-theme=light] .list.bad li::marker{color:#cf222e}.grade-dot{font-size:10px}.chart{width:100%}.legend{display:flex;gap:18px;color:var(--muted);margin-top:12px;flex-wrap:wrap}.legend.wrap span{display:inline-flex;align-items:center;gap:6px}.swatch{width:12px;height:12px;border-radius:3px;display:inline-block}.empty{text-align:center;color:var(--muted);padding:60px 20px}.muted{color:var(--muted)}.foot{text-align:center;color:var(--muted);margin-top:34px;font-size:12px}.uplot,.u-title,.u-legend{color:var(--text)}.u-legend .u-marker{border-radius:2px}:root{--sev-critical: #f85149;--sev-high: #f0883e;--sev-medium: #d29922;--sev-low: #58a6ff;--sev-info: #8b949e;--quick: #3fb950}:root[data-theme=light]{--sev-critical: #cf222e;--sev-high: #bc4c00;--sev-medium: #9a6700;--sev-low: #0969da;--sev-info: #59636e;--quick: #1a7f37}.audit-summary{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:20px 22px}.audit-summary .summary{font-size:15px;margin:0 0 14px}.audit-summary .omitted{margin:12px 0 0;font-size:12.5px}.sev-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}.sev-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:var(--panel-2);color:var(--text);border-radius:999px;padding:4px 12px;font:inherit;font-size:12.5px;cursor:pointer}.sev-chip .sev-count{font-weight:700}.sev-chip.sev-critical .sev-count{color:var(--sev-critical)}.sev-chip.sev-high .sev-count{color:var(--sev-high)}.sev-chip.sev-medium .sev-count{color:var(--sev-medium)}.sev-chip.sev-low .sev-count{color:var(--sev-low)}.sev-chip.sev-info .sev-count{color:var(--sev-info)}.sev-chip.quick .sev-count{color:var(--quick)}.sev-chip:hover{border-color:var(--accent)}.sev-chip.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,var(--panel-2))}.run-select{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:4px 8px;font:inherit}.findings-panel{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:14px 18px 22px}.findings-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--border);margin-bottom:6px}.search{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:6px 10px;font:inherit;font-size:13px;flex:1;min-width:200px}.search:focus{outline:none;border-color:var(--accent)}.ghost-btn{background:none;border:1px solid var(--border);color:var(--muted);border-radius:6px;padding:5px 10px;font-size:12.5px;cursor:pointer}.ghost-btn:hover{color:var(--text);border-color:var(--accent)}.count-note{font-size:12.5px}.dimension-group{margin-top:16px}.dimension-title{font-size:15px;margin:0 0 8px}.count-badge{font-size:11px;color:var(--muted);background:var(--panel-2);border-radius:999px;padding:1px 8px;margin-left:6px;vertical-align:2px;font-weight:600}.finding{border:1px solid var(--border);border-left-width:3px;border-radius:8px;margin-bottom:8px;background:var(--panel-2)}.finding.sev-border-critical{border-left-color:var(--sev-critical)}.finding.sev-border-high{border-left-color:var(--sev-high)}.finding.sev-border-medium{border-left-color:var(--sev-medium)}.finding.sev-border-low{border-left-color:var(--sev-low)}.finding.sev-border-info{border-left-color:var(--sev-info)}.finding-head{display:flex;align-items:center;gap:10px;width:100%;background:none;border:none;color:var(--text);font:inherit;text-align:left;padding:9px 12px;cursor:pointer;min-width:0}.finding-title{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.finding-loc{flex:none;max-width:34%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:color-mix(in srgb,var(--accent) 75%,var(--text))}.more-loc{flex:none;font-size:11px;color:var(--muted);background:var(--panel);border-radius:999px;padding:1px 7px}.sev-badge{flex:none;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;border-radius:5px;padding:2px 7px;color:var(--bg)}.sev-badge.sev-critical{background:var(--sev-critical)}.sev-badge.sev-high{background:var(--sev-high)}.sev-badge.sev-medium{background:var(--sev-medium)}.sev-badge.sev-low{background:var(--sev-low)}.sev-badge.sev-info{background:var(--sev-info)}.effort{flex:none;margin-left:auto;font-size:11px;border:1px solid var(--border);border-radius:999px;padding:1px 8px;color:var(--muted)}.effort-quick{color:var(--quick);border-color:color-mix(in srgb,var(--quick) 40%,var(--border))}.chevron{flex:none;color:var(--muted);transition:transform .12s ease}.chevron.open{transform:rotate(90deg)}.finding-body{padding:0 12px 12px 44px}.finding-body p{margin:0 0 8px}.finding-body .fix{color:var(--muted)}.finding-body .fix strong{color:var(--quick)}.finding-body .also code{margin-right:6px}.positives{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:16px 20px}.positives h2{margin:0 0 8px;font-size:15px}.positives ul{margin:0;padding-left:20px;color:var(--muted)}@media (max-width: 640px){.finding-loc{display:none}.finding-body{padding-left:12px}}</style>
28
+ </head>
29
+ <body>
30
+ <div id="app"></div>
31
+ </body>
32
+ </html>
@@ -0,0 +1,351 @@
1
+ id: base
2
+ name: Universal Diagram Catalog
3
+ version: 0.1.0
4
+ kind: diagrams
5
+ extends: null
6
+ appliesTo: ["*"]
7
+ # A catalog of professional software diagrams. For a given repository the agent
8
+ # inspects the code, decides which diagrams genuinely fit the project's
9
+ # characteristics (using `detect` + `appliesWhen`), then emits Mermaid source for
10
+ # each selected diagram, grounded in real files. Diagrams that do not apply are
11
+ # simply omitted — a library needs different diagrams than a microservice.
12
+
13
+ groups:
14
+ # ----------------------------------------------------------------------------
15
+ - id: architecture
16
+ name: Architecture & Structure
17
+ description: >
18
+ How the system is decomposed into parts and how those parts relate — from
19
+ the outside-in (C4) down to individual types. The backbone for almost any
20
+ repository.
21
+ diagrams:
22
+ - id: system-context
23
+ title: System Context
24
+ type: flowchart
25
+ appliesWhen: >
26
+ Almost any project. Shows the software as a single box surrounded by
27
+ the users (personas) and external systems it talks to (APIs, queues,
28
+ third-party services, databases it does not own).
29
+ detect: ["*"]
30
+ guidance: >
31
+ C4 Level 1. Read the README, entry points, HTTP/SDK clients, env vars,
32
+ and config to find who uses the system and which external systems it
33
+ integrates with. Emit a `flowchart LR` with the system as one central
34
+ node, actors on the left, external systems on the right, and labelled
35
+ edges describing each relationship ("uses", "reads from", "publishes
36
+ to"). Keep it to a single screen — do not expand internals here.
37
+ references:
38
+ - "https://c4model.com/#SystemContextDiagram"
39
+ - id: container-architecture
40
+ title: Container / Service Architecture
41
+ type: flowchart
42
+ appliesWhen: >
43
+ Projects made of more than one deployable/runnable unit, or a clear
44
+ app + datastore + worker split (web app, API, SPA frontend, worker,
45
+ cache, database, message broker). Skip for a single-file script.
46
+ detect: ["docker-compose*", "Dockerfile", "k8s", "*.tf", "helm", "procfile", "services"]
47
+ guidance: >
48
+ C4 Level 2. Identify the runnable containers (frontend, backend, worker,
49
+ scheduler) and the data stores/brokers they use. Read docker-compose,
50
+ Kubernetes/Helm manifests, Terraform, Procfile, and the service dirs.
51
+ Emit a `flowchart TB` grouping related containers in `subgraph`s, with
52
+ each container labelled by its technology (e.g. "API [Node/Express]")
53
+ and edges labelled with the protocol ("HTTPS/JSON", "gRPC", "SQL",
54
+ "AMQP"). Include datastores as cylinder-style nodes.
55
+ references:
56
+ - "https://c4model.com/#ContainerDiagram"
57
+ - id: component-breakdown
58
+ title: Component Breakdown
59
+ type: flowchart
60
+ appliesWhen: >
61
+ A single application/service with enough internal structure that its
62
+ major components (controllers, services, repositories, adapters) are
63
+ worth showing. Best for a backend/service with layered architecture.
64
+ detect: ["controllers", "services", "repositories", "handlers", "usecases", "domain"]
65
+ guidance: >
66
+ C4 Level 3 — zoom into one container. Read the source tree of the main
67
+ app and identify its cohesive components and the direction of
68
+ dependencies between them (e.g. HTTP layer → use-cases → repositories →
69
+ DB). Emit a `flowchart TB` with one node per component and directed
70
+ edges. Prefer showing the dependency direction faithfully over being
71
+ exhaustive.
72
+ references:
73
+ - "https://c4model.com/#ComponentDiagram"
74
+ - id: module-dependency
75
+ title: Module / Package Dependency Graph
76
+ type: flowchart
77
+ appliesWhen: >
78
+ Any non-trivial codebase, especially monorepos and multi-package repos.
79
+ Shows how top-level modules/packages import one another and surfaces
80
+ layering violations or cycles.
81
+ detect:
82
+ [
83
+ "packages",
84
+ "apps",
85
+ "libs",
86
+ "src",
87
+ "internal",
88
+ "pnpm-workspace.yaml",
89
+ "lerna.json",
90
+ "go.mod"
91
+ ]
92
+ guidance: >
93
+ Map the import/dependency edges between the top-level modules or
94
+ workspace packages (not every file — the coarse structure). Use Grep on
95
+ import/require/use statements or read the workspace manifest. Emit a
96
+ `flowchart LR`; if you detect an import cycle, keep the edges honest and
97
+ note the cycle in the description. Aim for 5–20 nodes.
98
+ - id: class-structure
99
+ title: Key Class / Type Structure
100
+ type: classDiagram
101
+ appliesWhen: >
102
+ Object-oriented or strongly-typed codebases where the core abstractions
103
+ are classes/interfaces/structs with inheritance or composition worth
104
+ showing (frameworks, SDKs, domain-rich services). Skip for thin
105
+ script-style code.
106
+ detect: ["class ", "interface ", "abstract", "struct ", "trait "]
107
+ guidance: >
108
+ Pick the 6–15 most important types on the core domain/abstraction and
109
+ model them with a Mermaid `classDiagram`: key fields and methods,
110
+ inheritance (`<|--`), composition (`*--`), and association (`-->`).
111
+ Favour the load-bearing abstractions over data-transfer objects.
112
+ references:
113
+ - "https://en.wikipedia.org/wiki/Class_diagram"
114
+
115
+ # ----------------------------------------------------------------------------
116
+ - id: behavioral
117
+ name: Behaviour & Control Flow
118
+ description: >
119
+ How the system behaves over time — the ordered interactions, the control
120
+ flow of important logic, and the lifecycles of stateful things.
121
+ diagrams:
122
+ - id: request-sequence
123
+ title: Request / Interaction Sequence
124
+ type: sequenceDiagram
125
+ appliesWhen: >
126
+ Any system with a meaningful end-to-end flow across participants — an
127
+ HTTP request through middleware to the DB, a CLI command, an auth
128
+ handshake, a webhook round-trip, an agent tool-call loop.
129
+ detect: ["route", "handler", "controller", "middleware", "endpoint", "api", "rpc"]
130
+ guidance: >
131
+ Choose the single most representative flow (e.g. the primary API request
132
+ or the main command) and trace it through the real participants (Client,
133
+ API, Service, DB, external API). Emit a `sequenceDiagram` with `->>`
134
+ calls and `-->>` returns, `activate`/`deactivate` where it clarifies,
135
+ and `alt`/`opt` for the important branches (error/success). Keep to one
136
+ coherent scenario rather than every path.
137
+ references:
138
+ - "https://en.wikipedia.org/wiki/Sequence_diagram"
139
+ - id: function-flowchart
140
+ title: Critical Function Flowchart
141
+ type: flowchart
142
+ appliesWhen: >
143
+ There is a non-trivial algorithm or decision-heavy function at the heart
144
+ of the project (a scheduler, parser, pricing/scoring engine, state
145
+ reducer, retry/backoff loop). Skip if the logic is mostly straight-line.
146
+ detect: ["*"]
147
+ guidance: >
148
+ Find the most important branching function and render its control flow
149
+ as a `flowchart TD`: decisions as `{diamond}` nodes with Yes/No edges,
150
+ processing as rectangles, and terminal states clearly marked. Stay
151
+ faithful to the actual branches and loops in the code; reference the
152
+ function by file and name in the description.
153
+ references:
154
+ - "https://en.wikipedia.org/wiki/Flowchart"
155
+ - id: state-machine
156
+ title: Lifecycle / State Machine
157
+ type: stateDiagram-v2
158
+ appliesWhen: >
159
+ Something in the domain moves through explicit states — an order,
160
+ job, session, connection, deployment, request, or a UI/workflow with
161
+ statuses/enums. Very common in services and workflow engines.
162
+ detect: ["status", "state", "enum", "PENDING", "ACTIVE", "workflow", "lifecycle"]
163
+ guidance: >
164
+ Identify a stateful entity and its transitions from enums/status fields
165
+ and the code that mutates them. Emit a `stateDiagram-v2` with `[*]`
166
+ start/end, named states, and labelled transitions (the event/condition
167
+ that causes each move). Keep every transition traceable to real code.
168
+ references:
169
+ - "https://en.wikipedia.org/wiki/UML_state_machine"
170
+ - id: user-journey
171
+ title: User Journey
172
+ type: journey
173
+ appliesWhen: >
174
+ Products with a human-facing flow (web/mobile app, CLI UX, onboarding)
175
+ where the sequence of user steps and their friction is meaningful.
176
+ Skip for pure infrastructure/libraries.
177
+ detect: ["frontend", "ui", "pages", "views", "components", "onboarding", "signup"]
178
+ guidance: >
179
+ Sketch the primary user's path through the product as a Mermaid
180
+ `journey` with 1–2 sections and steps scored 1–5 for experience. Ground
181
+ the steps in real screens/commands/endpoints, not invented ones.
182
+
183
+ # ----------------------------------------------------------------------------
184
+ - id: data
185
+ name: Data & Persistence
186
+ description: >
187
+ The shape of the data the system owns and how it moves — schemas, domain
188
+ models, and data-flow.
189
+ diagrams:
190
+ - id: er-diagram
191
+ title: Entity–Relationship (Database Schema)
192
+ type: erDiagram
193
+ appliesWhen: >
194
+ The project owns a relational schema or ORM models/migrations. One of
195
+ the highest-value diagrams whenever a database is present.
196
+ detect:
197
+ [
198
+ "*.sql",
199
+ "migrations",
200
+ "schema.prisma",
201
+ "models",
202
+ "entity",
203
+ "@Entity",
204
+ "CREATE TABLE",
205
+ "ActiveRecord",
206
+ "sqlalchemy",
207
+ "gorm"
208
+ ]
209
+ guidance: >
210
+ Read the schema/migrations/ORM models and reconstruct the entities,
211
+ their key columns (with types and PK/FK markers), and the relationships
212
+ with correct cardinality. Emit a Mermaid `erDiagram` using
213
+ `||--o{`-style crow's-foot notation. Include the important tables; you
214
+ may omit pure join-table noise if you show the relationship it encodes.
215
+ references:
216
+ - "https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model"
217
+ - id: data-flow
218
+ title: Data Flow Diagram
219
+ type: flowchart
220
+ appliesWhen: >
221
+ Data moves through stages/transformations — pipelines, ETL/ELT, event
222
+ streaming, ingestion→processing→storage, ML training/inference. Skip
223
+ for simple CRUD apps already covered by the ER diagram.
224
+ detect:
225
+ ["pipeline", "etl", "kafka", "queue", "stream", "worker", "producer", "consumer", "dag"]
226
+ guidance: >
227
+ Trace data from its sources through each processing step to its sinks.
228
+ Emit a `flowchart LR` where external entities/sources and data stores
229
+ are visually distinct from processes; label edges with what data flows.
230
+ Follow classic DFD intent (processes, data stores, data flows, external
231
+ entities) using Mermaid shapes.
232
+ references:
233
+ - "https://en.wikipedia.org/wiki/Data-flow_diagram"
234
+ - id: domain-model
235
+ title: Domain Model
236
+ type: classDiagram
237
+ appliesWhen: >
238
+ Domain-rich applications whose core concepts and relationships are not
239
+ fully captured by a database schema (DDD-style aggregates, value
240
+ objects, rich business entities). Complements or replaces the ER diagram
241
+ for non-relational or logic-heavy domains.
242
+ detect: ["domain", "aggregate", "entity", "valueobject", "model"]
243
+ guidance: >
244
+ Model the ubiquitous-language concepts and their relationships as a
245
+ `classDiagram`, emphasising aggregates/roots, multiplicities, and the
246
+ associations that carry business meaning rather than storage details.
247
+ references:
248
+ - "https://martinfowler.com/eaaCatalog/domainModel.html"
249
+
250
+ # ----------------------------------------------------------------------------
251
+ - id: deployment
252
+ name: Deployment & Operations
253
+ description: >
254
+ Where the code runs and how it gets there — runtime topology and the
255
+ delivery pipeline.
256
+ diagrams:
257
+ - id: deployment-topology
258
+ title: Deployment Topology
259
+ type: flowchart
260
+ appliesWhen: >
261
+ Anything with a defined runtime environment: containers, Kubernetes,
262
+ serverless, VMs, a CDN/edge, managed databases. Skip for a plain
263
+ library with no deployment story.
264
+ detect:
265
+ [
266
+ "Dockerfile",
267
+ "docker-compose*",
268
+ "k8s",
269
+ "kubernetes",
270
+ "helm",
271
+ "*.tf",
272
+ "serverless.yml",
273
+ "vercel.json",
274
+ "fly.toml",
275
+ ".github/workflows"
276
+ ]
277
+ guidance: >
278
+ Read infra manifests (Docker/K8s/Helm/Terraform/serverless configs) and
279
+ model the runtime nodes/zones and what is deployed onto each. Emit a
280
+ `flowchart TB` using `subgraph`s for boundaries (client, edge/CDN,
281
+ cluster/VPC, managed services) and nodes for the deployed units, with
282
+ edges for network paths. This is the C4 deployment view.
283
+ references:
284
+ - "https://c4model.com/#DeploymentDiagram"
285
+ - id: cicd-pipeline
286
+ title: CI/CD Pipeline
287
+ type: flowchart
288
+ appliesWhen: >
289
+ A CI/CD configuration exists (GitHub Actions, GitLab CI, CircleCI,
290
+ Jenkins, etc.). Shows the stages from commit to release.
291
+ detect:
292
+ [
293
+ ".github/workflows",
294
+ ".gitlab-ci.yml",
295
+ "Jenkinsfile",
296
+ ".circleci",
297
+ "azure-pipelines.yml",
298
+ "buildkite"
299
+ ]
300
+ guidance: >
301
+ Read the pipeline definition(s) and render the stages and their
302
+ dependencies as a `flowchart LR` (trigger → build → test/lint →
303
+ package → deploy environments), including gates/approvals and parallel
304
+ jobs where present. Keep stage names faithful to the config.
305
+
306
+ # ----------------------------------------------------------------------------
307
+ - id: process
308
+ name: Process, Domain & Planning
309
+ description: >
310
+ Higher-level maps of the domain, the collaboration workflow, and the plan —
311
+ useful for onboarding and communication. Include only when the evidence
312
+ exists; never invent a roadmap.
313
+ diagrams:
314
+ - id: domain-mindmap
315
+ title: Domain / Feature Mind Map
316
+ type: mindmap
317
+ appliesWhen: >
318
+ A useful onboarding overview for most non-trivial repos: the main
319
+ feature areas / bounded contexts / subsystems and what each contains.
320
+ detect: ["*"]
321
+ guidance: >
322
+ Summarise the repository's major areas as a Mermaid `mindmap` rooted at
323
+ the project name, branching into subsystems/features and their notable
324
+ pieces. Derive branches from the real directory structure and README,
325
+ not aspiration.
326
+ - id: git-branching
327
+ title: Branching / Release Model
328
+ type: gitGraph
329
+ appliesWhen: >
330
+ The repository follows a discernible branching or release strategy
331
+ (trunk-based, GitFlow, release branches, tags) worth documenting.
332
+ Optional; skip if history is trivial.
333
+ detect: ["CONTRIBUTING", "release", "CHANGELOG", "tags", ".github"]
334
+ guidance: >
335
+ Infer the branching model from CONTRIBUTING docs, branch names, tags,
336
+ and CHANGELOG, and illustrate it with a Mermaid `gitGraph` (main plus
337
+ representative feature/release branches, commits, merges, tags). This is
338
+ illustrative of the model, not a literal replay of history.
339
+ - id: requirements
340
+ title: Requirements Traceability
341
+ type: requirementDiagram
342
+ appliesWhen: >
343
+ The repo documents explicit requirements/specs and you can trace them to
344
+ components that satisfy them (regulated, spec-driven, or RFC-heavy
345
+ projects). Optional and evidence-gated.
346
+ detect: ["requirements", "specs", "rfc", "docs/adr", "SPEC"]
347
+ guidance: >
348
+ Extract stated requirements and the elements that satisfy them from
349
+ docs/specs, and render a Mermaid `requirementDiagram` with
350
+ `requirement`/`element` nodes and `satisfies`/`traces` relationships.
351
+ Only include requirements actually written down in the repo.