showai-reader 0.9.0-reader.cppyr4f7 → 0.9.0-reader.cutjua3r

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 (53) hide show
  1. package/README.md +1 -1
  2. package/chunks/CardGrid-F5LYBSDH.js +2 -0
  3. package/chunks/CommandReference-5TSKPHE3.js +3 -0
  4. package/chunks/{ComparisonMatrix-YQJRBJHK.js → ComparisonMatrix-27M44OZJ.js} +1 -1
  5. package/chunks/EventTimeline-35QURTAO.js +2 -0
  6. package/chunks/{ExperimentTracker-L4ERILSH.js → ExperimentTracker-P4QX3TFY.js} +1 -1
  7. package/chunks/{ExternalDiagram-CESN6AFD.js → ExternalDiagram-AKYOCLQZ.js} +3157 -768
  8. package/chunks/Flowchart-ZNPOCEPD.js +12 -0
  9. package/chunks/{G2Chart-N3VN7CJU.js → G2Chart-IA56I52P.js} +2 -2
  10. package/chunks/LayerDiagram-ES4DSFBP.js +2 -0
  11. package/chunks/{Mindmap-H2BMB2CH.js → Mindmap-SQCZEOJ2.js} +2 -2
  12. package/chunks/RichTextEditor-W3DYD6M3.js +157 -0
  13. package/chunks/Roadmap-GTVA7DQG.js +2 -0
  14. package/chunks/{Scene3D-RIDB2UPZ.js → Scene3D-H2F5Y2G3.js} +2 -2
  15. package/chunks/SequenceDiagram-VLOO736H.js +2 -0
  16. package/chunks/{StatusTree-DE6SBNV3.js → StatusTree-L6XZCK7R.js} +1 -1
  17. package/chunks/StepGuide-DLY5ZBMO.js +1 -0
  18. package/chunks/StructureBrowser-H72Y64DB.js +3 -0
  19. package/chunks/Waterfall-QA3U6LNC.js +2 -0
  20. package/chunks/{chunk-24VJITFC.js → chunk-2HAL7KBM.js} +1 -1
  21. package/chunks/chunk-3I4CQ55U.js +1 -0
  22. package/chunks/chunk-3RZMLHCB.js +1 -0
  23. package/chunks/chunk-AIBH6MTQ.js +1 -0
  24. package/chunks/chunk-D74K2NKW.js +1 -0
  25. package/chunks/chunk-EM2ABYID.js +1 -0
  26. package/chunks/chunk-EXOUDPUB.js +4 -0
  27. package/chunks/chunk-GLP5VV7P.js +1 -0
  28. package/chunks/chunk-HSNLLTYJ.js +2 -0
  29. package/chunks/chunk-JXKAISUX.js +1 -0
  30. package/chunks/{chunk-EJKNO2TI.js → chunk-JYWKSXK3.js} +1 -1
  31. package/chunks/chunk-NJBFXE6W.js +1 -0
  32. package/chunks/{chunk-UYGYV3XW.js → chunk-NWCMWKOF.js} +2 -2
  33. package/chunks/{chunk-KS3LLFYE.js → chunk-OYYVZA2J.js} +49 -47
  34. package/chunks/chunk-PVMEUQFU.js +21 -0
  35. package/chunks/{chunk-Z2EQGXZF.js.LEGAL.txt → chunk-PVMEUQFU.js.LEGAL.txt} +11 -9
  36. package/chunks/{chunk-X2BFI7UA.js → chunk-VQIPL7NG.js} +1 -1
  37. package/chunks/chunk-YLTLOYBH.js +1 -0
  38. package/index.js +1 -1
  39. package/manifest.json +5 -5
  40. package/package.json +1 -1
  41. package/reader-CUTJUA3R.js +44 -0
  42. package/chunks/Flowchart-7I3IRBXN.js +0 -10
  43. package/chunks/RichTextEditor-XPGN2LUL.js +0 -155
  44. package/chunks/chunk-M3KEZP5Z.js +0 -1
  45. package/chunks/chunk-QBNRB4AJ.js +0 -1
  46. package/chunks/chunk-Z2EQGXZF.js +0 -21
  47. package/chunks/chunk-ZZKYSVG3.js +0 -2
  48. package/reader-CPPYR4F7.js +0 -41
  49. /package/chunks/{Flowchart-7I3IRBXN.js.LEGAL.txt → Flowchart-ZNPOCEPD.js.LEGAL.txt} +0 -0
  50. /package/chunks/{G2Chart-N3VN7CJU.js.LEGAL.txt → G2Chart-IA56I52P.js.LEGAL.txt} +0 -0
  51. /package/chunks/{Scene3D-RIDB2UPZ.js.LEGAL.txt → Scene3D-H2F5Y2G3.js.LEGAL.txt} +0 -0
  52. /package/chunks/{chunk-UYGYV3XW.js.LEGAL.txt → chunk-NWCMWKOF.js.LEGAL.txt} +0 -0
  53. /package/{reader-CPPYR4F7.js.LEGAL.txt → reader-CUTJUA3R.js.LEGAL.txt} +0 -0
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  The [ShowAI](https://showai.renaissancemind.ai) page reader, built from ShowAI 0.9.0 as code-split ES modules. Inline conversation pages written by `render-artifact --cdn` import it and load each component's code only when the page uses it.
4
4
 
5
5
  ```js
6
- const { mount } = await import("https://cdn.jsdelivr.net/npm/showai-reader@0.9.0-reader.cppyr4f7/index.js");
6
+ const { mount } = await import("https://cdn.jsdelivr.net/npm/showai-reader@0.9.0-reader.cutjua3r/index.js");
7
7
  mount(document.getElementById("page"), { artifact });
8
8
  ```
9
9
 
@@ -0,0 +1,2 @@
1
+ import{a as v}from"./chunk-3I4CQ55U.js";import{d as k,e as f}from"./chunk-NJBFXE6W.js";import{a as p,b as d}from"./chunk-D74K2NKW.js";import{d as h}from"./chunk-VQIPL7NG.js";import{a as g,jb as b,mb as x}from"./chunk-PVMEUQFU.js";import{c as s,d as m}from"./chunk-DUIGVKKG.js";g(`.sb-block.cg-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.cg-block li:not(svg){padding:0}.sb-block.cg-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.cg-block{--cg-text: var(--text, #222222);--cg-muted: var(--muted, #6a6a6a);--cg-faint: var(--subtle, #929292);--cg-line: var(--line, #dddddd);--cg-surface: var(--surface, #fafafa);--cg-accent: var(--accent, #120a8f);--cg-accent-soft: var(--accent-soft, #eeedf9);--cg-mono: var(--font-mono, ui-monospace, Menlo, Consolas, monospace);--cg-teal: #0d8579;--cg-teal-soft: #e6f4f2;--cg-warm: #bf6528;--cg-warm-soft: #fbefe6;--cg-violet: #7348d0;--cg-violet-soft: #f2edfc;--cg-rose: #c4415a;--cg-rose-soft: #fbebee;--cg-slate: #526476;--cg-slate-soft: #edf1f4;color:var(--cg-text);font-family:inherit;font-size:14px;line-height:1.7;padding:8px 0;container-type:inline-size}:root[data-theme=dark] .sb-block.cg-block,[data-theme=dark] .sb-block.cg-block{--cg-teal: #4fc4b6;--cg-teal-soft: #163734;--cg-warm: #e79c64;--cg-warm-soft: #3b2b1e;--cg-violet: #b497ff;--cg-violet-soft: #2e2648;--cg-rose: #f0839a;--cg-rose-soft: #3e222a;--cg-slate: #a2b2c2;--cg-slate-soft: #242d35}.sb-block.cg-block *{box-sizing:border-box}.sb-block.cg-block .cg-tone-brand{--tone: var(--cg-accent);--tone-soft: var(--cg-accent-soft)}.sb-block.cg-block .cg-tone-teal{--tone: var(--cg-teal);--tone-soft: var(--cg-teal-soft)}.sb-block.cg-block .cg-tone-warm{--tone: var(--cg-warm);--tone-soft: var(--cg-warm-soft)}.sb-block.cg-block .cg-tone-violet{--tone: var(--cg-violet);--tone-soft: var(--cg-violet-soft)}.sb-block.cg-block .cg-tone-rose{--tone: var(--cg-rose);--tone-soft: var(--cg-rose-soft)}.sb-block.cg-block .cg-tone-slate{--tone: var(--cg-slate);--tone-soft: var(--cg-slate-soft)}.sb-block.cg-block .cg-heading{margin:0 0 10px;font-size:17px;font-weight:700}.sb-block.cg-block .cg-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.sb-block.cg-block .cg-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(var(--cg-columns, 3),minmax(0,1fr));gap:12px}.sb-block.cg-block .cg-item{display:flex;min-width:0;margin:0}.sb-block.cg-block .cg-card{position:relative;flex:1;min-width:0;display:flex;color:inherit;text-decoration:none;border:1px solid var(--cg-line);border-radius:10px;background:transparent;overflow-wrap:anywhere;transition:border-color .15s,background-color .15s}.sb-block.cg-block .cg-card.is-link{cursor:pointer}.sb-block.cg-block .cg-card.is-link:hover{border-color:color-mix(in srgb,var(--tone) 45%,var(--cg-line));background:var(--cg-surface)}.sb-block.cg-block .cg-card:focus-visible{outline:2px solid var(--cg-accent);outline-offset:2px}.sb-block.cg-block .cg-icon{flex:none;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:8px;background:var(--tone-soft);font-size:17px;line-height:1;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}.sb-block.cg-block .cg-tag{flex:none;display:inline-block;font-size:11.5px;line-height:1;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:4px;padding:4px 7px;white-space:nowrap}.sb-block.cg-block .cg-title{display:flex;align-items:center;gap:6px;min-width:0;font-size:16px;line-height:1.45;font-weight:600}.sb-block.cg-block .cg-body{display:block;font-size:13.5px;line-height:1.7;color:var(--cg-muted)}.sb-block.cg-block .cg-body strong{color:var(--cg-text);font-weight:600}.sb-block.cg-block .cg-body code{font-family:var(--cg-mono);font-size:.86em;color:var(--cg-text);background:var(--cg-surface);border:1px solid var(--cg-line);border-radius:4px;padding:0 4px;word-break:break-all}.sb-block.cg-block .cg-body a{color:var(--cg-accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--cg-accent) 35%,transparent)}.sb-block.cg-block .cg-arrow{flex:none;width:15px;height:15px;fill:none;stroke:var(--tone);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:translate(-4px);transition:opacity .15s,transform .15s}.sb-block.cg-block .cg-card.is-link:hover .cg-arrow,.sb-block.cg-block .cg-card.is-link:focus-visible .cg-arrow{opacity:1;transform:none}@media(hover:none){.sb-block.cg-block .cg-arrow{opacity:.7;transform:none}}.sb-block.cg-block.cg-tile .cg-card{flex-direction:column;padding:18px 18px 16px}.sb-block.cg-block .cg-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}.sb-block.cg-block.cg-tile .cg-body{margin-top:4px}.sb-block.cg-block.cg-row .cg-grid{gap:8px}.sb-block.cg-block.cg-row .cg-card{align-items:center;gap:14px;padding:12px 16px 12px 12px}.sb-block.cg-block.cg-row .cg-icon{width:36px;height:36px}.sb-block.cg-block.cg-row .cg-card:not(:has(.cg-icon)){padding-left:16px}.sb-block.cg-block .cg-text{flex:1;min-width:0;display:block}.sb-block.cg-block.cg-row .cg-title{font-size:15px;line-height:1.5;flex-wrap:wrap;gap:4px 8px}.sb-block.cg-block.cg-row .cg-tag{font-size:11px;padding:3px 6px}.sb-block.cg-block.cg-row .cg-body{font-size:13px;line-height:1.6}.sb-block.cg-block.cg-row .cg-arrow{opacity:.35;transform:none;stroke:var(--cg-faint)}.sb-block.cg-block.cg-row .cg-card.is-link:hover .cg-arrow,.sb-block.cg-block.cg-row .cg-card.is-link:focus-visible .cg-arrow{opacity:1;stroke:var(--tone);transform:translate(2px)}@container (max-width: 820px){.sb-block.cg-block[data-columns="4"] .cg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (max-width: 560px){.sb-block.cg-block .cg-grid{grid-template-columns:minmax(0,1fr)}.sb-block.cg-block.cg-tile .cg-card{padding:14px 16px}.sb-block.cg-block.cg-tile .cg-card:has(.cg-icon){display:grid;grid-template-columns:34px minmax(0,1fr);grid-template-areas:"icon title" "icon body";column-gap:14px;align-items:start}.sb-block.cg-block.cg-tile .cg-card:has(.cg-icon) .cg-top{display:contents}.sb-block.cg-block.cg-tile .cg-card:has(.cg-icon) .cg-icon{grid-area:icon;margin-top:2px}.sb-block.cg-block.cg-tile .cg-card:has(.cg-icon) .cg-title{grid-area:title}.sb-block.cg-block.cg-tile .cg-card:has(.cg-icon) .cg-body{grid-area:body;margin-top:2px}.sb-block.cg-block.cg-tile .cg-card:has(.cg-icon) .cg-tag{position:absolute;top:15px;right:14px}.sb-block.cg-block.cg-tile .cg-card:has(.cg-icon):has(.cg-tag) .cg-title{padding-right:64px}.sb-block.cg-block.cg-tile .cg-top{margin-bottom:10px}}@media(prefers-reduced-motion:reduce){.sb-block.cg-block *{transition:none!important}}@media print{.sb-block.cg-block .cg-item{break-inside:avoid}.sb-block.cg-block .cg-arrow{display:none}.sb-block.cg-block.cg-row .cg-card.is-link{flex-wrap:wrap}.sb-block.cg-block .cg-card.is-link[href^=http]:after,.sb-block.cg-block .cg-card.is-link[href^="mailto:"]:after{content:attr(href);flex-basis:100%;color:var(--cg-faint);font-size:11px;overflow-wrap:anywhere}}
2
+ `);var w=m("cardGrid",{"zh-CN":{title:"\u5361\u7247\u5BFC\u822A",opensInNewTab:"\uFF08\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00\uFF09"},en:{title:"Card grid",opensInNewTab:"(opens in a new tab)"}});var c=s(b(),1),u=()=>(0,c.jsx)("svg",{className:"cg-arrow",viewBox:"0 0 16 16","aria-hidden":"true",children:(0,c.jsx)("path",{d:"M3.5 8h9M8.5 4l4 4-4 4"})});function C({card:a,tile:n,linked:o}){let l=(0,c.jsx)("span",{className:"cg-body",children:(0,c.jsx)(v,{source:a.body,links:!o})}),t=a.icon&&(0,c.jsx)("span",{className:"cg-icon","aria-hidden":"true",children:a.icon}),e=a.tag&&(0,c.jsx)("span",{className:"cg-tag",children:a.tag});return n?(0,c.jsxs)(c.Fragment,{children:[(t||e)&&(0,c.jsxs)("span",{className:"cg-top",children:[t||(0,c.jsx)("span",{}),e]}),(0,c.jsxs)("span",{className:"cg-title",children:[(0,c.jsx)("span",{children:a.title}),o&&(0,c.jsx)(u,{})]}),l]}):(0,c.jsxs)(c.Fragment,{children:[t,(0,c.jsxs)("span",{className:"cg-text",children:[(0,c.jsxs)("span",{className:"cg-title",children:[(0,c.jsx)("span",{children:a.title}),e]}),l]}),o&&(0,c.jsx)(u,{})]})}function D({data:a}){let n=x(w),o=a,l=o.variant==="row"?"row":"tile",t=f(o);return(0,c.jsxs)("section",{className:`sb-block cg-block cg-${l}`,"aria-label":h(o.title,n("title")),"data-columns":t,style:{"--cg-columns":t},children:[o.title&&(0,c.jsx)("h3",{className:"cg-heading",children:o.title}),(0,c.jsx)("ul",{className:"cg-grid",children:o.cards.map((e,y)=>{let N=k.includes(e.tone)?e.tone:"brand",r=e.href&&p(e.href)?e.href:null,i=(0,c.jsx)(C,{card:e,tile:l==="tile",linked:!!r});return(0,c.jsx)("li",{className:`cg-item cg-tone-${N}`,children:r&&d(r)?(0,c.jsxs)("a",{className:"cg-card is-link",href:r,target:"_blank",rel:"noopener noreferrer",children:[i,(0,c.jsx)("span",{className:"cg-hidden",children:n("opensInNewTab")})]}):r?(0,c.jsx)("a",{className:"cg-card is-link",href:r,children:i}):(0,c.jsx)("div",{className:"cg-card",children:i})},y)})})]})}export{D as CardGridBlock};
@@ -0,0 +1,3 @@
1
+ import{a as V}from"./chunk-EXOUDPUB.js";import{a as M}from"./chunk-3I4CQ55U.js";import{d as G,e as _,f as I}from"./chunk-YLTLOYBH.js";import"./chunk-D74K2NKW.js";import{d as U}from"./chunk-VQIPL7NG.js";import{a as P,c as cr,jb as Z,mb as O}from"./chunk-PVMEUQFU.js";import{c as E,d as j}from"./chunk-DUIGVKKG.js";var b=E(cr(),1);P(`.sb-block.cr-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.cr-block li:not(svg){padding:0}.sb-block.cr-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.cr-block{--cr-text: var(--text, #222222);--cr-muted: var(--muted, #6a6a6a);--cr-faint: var(--subtle, #929292);--cr-line: var(--line, #dddddd);--cr-paper: var(--paper, #ffffff);--cr-surface: var(--surface, #fafafa);--cr-hover: var(--hover, #f7f7f7);--cr-accent: var(--accent, #120a8f);--cr-accent-soft: var(--accent-soft, #eeedf9);--cr-mark: #f3d9a4;--cr-mono: var(--font-mono, ui-monospace, monospace);color:var(--cr-text);font-family:inherit;font-size:14px;line-height:1.7;padding:8px 0;container-type:inline-size}:root[data-theme=dark] .sb-block.cr-block,[data-theme=dark] .sb-block.cr-block{--cr-mark: #5c4520}.sb-block.cr-block *{box-sizing:border-box}.sb-block.cr-block .cr-head{margin-bottom:12px}.sb-block.cr-block .cr-heading{margin:0;font-size:17px;font-weight:700}.sb-block.cr-block .cr-sub{margin:2px 0 0;color:var(--cr-muted);font-size:13px}.sb-block.cr-block strong{font-weight:650}.sb-block.cr-block a{color:var(--cr-accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--cr-accent) 35%,transparent)}.sb-block.cr-block a:hover{border-bottom-color:var(--cr-accent)}.sb-block.cr-block mark{background:var(--cr-mark);color:inherit;border-radius:2px;padding:0}.sb-block.cr-block .cr-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}.sb-block.cr-block .cr-search{display:flex;align-items:center;gap:8px;height:42px;padding:0 8px 0 13px;border:1px solid var(--cr-line);border-radius:8px;background:var(--cr-surface);transition:border-color .15s}.sb-block.cr-block .cr-search:focus-within{border-color:var(--cr-accent);outline:2px solid color-mix(in srgb,var(--cr-accent) 22%,transparent);outline-offset:1px}.sb-block.cr-block .cr-glass{flex:none;width:16px;height:16px;fill:none;stroke:var(--cr-muted);stroke-width:1.5;stroke-linecap:round}.sb-block.cr-block .cr-search input{flex:1;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;color:var(--cr-text);font:inherit;font-size:14px}.sb-block.cr-block .cr-search input::placeholder{color:var(--cr-faint)}.sb-block.cr-block .cr-search input::-webkit-search-cancel-button{display:none}.sb-block.cr-block .cr-total{flex:none;padding-right:6px;font-size:12px;color:var(--cr-faint);font-variant-numeric:tabular-nums}.sb-block.cr-block .cr-clear{flex:none;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--cr-muted);cursor:pointer}.sb-block.cr-block .cr-clear:hover{background:var(--cr-hover);color:var(--cr-text)}.sb-block.cr-block .cr-clear svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}.sb-block.cr-block .cr-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.sb-block.cr-block .cr-chips button,.sb-block.cr-block .cr-emptyactions button{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid var(--cr-line);border-radius:6px;background:transparent;color:var(--cr-text);font:inherit;font-size:12.5px;line-height:1;white-space:nowrap;cursor:pointer}.sb-block.cr-block .cr-chips button span{font-size:11px;color:var(--cr-faint);font-variant-numeric:tabular-nums}.sb-block.cr-block .cr-chips button:hover,.sb-block.cr-block .cr-emptyactions button:hover{background:var(--cr-hover)}.sb-block.cr-block .cr-chips button[aria-pressed=true]{background:var(--cr-accent-soft);border-color:color-mix(in srgb,var(--cr-accent) 30%,transparent);color:var(--cr-accent);font-weight:650}.sb-block.cr-block .cr-chips button[aria-pressed=true] span{color:var(--cr-accent);opacity:.75}.sb-block.cr-block .cr-chips button.is-zero{color:var(--cr-faint)}.sb-block.cr-block button:focus-visible{outline:2px solid var(--cr-accent);outline-offset:2px}.sb-block.cr-block .cr-list{margin-top:14px;border:1px solid var(--cr-line);border-radius:10px;overflow:hidden}.sb-block.cr-block .cr-section+.cr-section{border-top:1px solid var(--cr-line)}.sb-block.cr-block .cr-grouphead{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:8px 16px;background:var(--cr-surface);border-bottom:1px solid var(--cr-line);font-size:12px;font-weight:650;letter-spacing:.04em;color:var(--cr-muted);line-height:1.5}.sb-block.cr-block .cr-groupcount{font-weight:400;letter-spacing:0;color:var(--cr-faint);font-variant-numeric:tabular-nums}.sb-block.cr-block .cr-section ul{list-style:none;margin:0;padding:0}.sb-block.cr-block .cr-item+.cr-item{border-top:1px solid var(--cr-line)}.sb-block.cr-block .cr-item.is-open{background:var(--cr-surface)}.sb-block.cr-block .cr-row{display:flex;align-items:flex-start;gap:12px;width:100%;padding:12px 16px;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.sb-block.cr-block .cr-row[data-static]{cursor:default}.sb-block.cr-block .cr-row:hover{background:var(--cr-hover)}.sb-block.cr-block .cr-row[data-static]:hover{background:none}.sb-block.cr-block .cr-row:focus-visible{outline-offset:-2px;border-radius:6px}.sb-block.cr-block .cr-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sb-block.cr-block .cr-cmd{display:block;padding:0;border-radius:0;background:none;color:inherit;font-family:var(--cr-mono);font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.sb-block.cr-block .cr-cmd>span{white-space:nowrap}.sb-block.cr-block .cr-cmd>span.is-long{white-space:normal}.sb-block.cr-block .cr-verb{font-weight:700}.sb-block.cr-block .cr-prog,.sb-block.cr-block .cr-ph,.sb-block.cr-block .cr-arg{color:var(--cr-muted)}.sb-block.cr-block .cr-prog{color:var(--cr-faint)}.sb-block.cr-block .cr-summary{font-size:13px;line-height:1.55;color:var(--cr-muted)}.sb-block.cr-block .cr-paramhits{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-top:2px;font-size:11.5px;color:var(--cr-faint)}.sb-block.cr-block .cr-chev{flex:none;width:12px;height:12px;margin-top:6px;fill:none;stroke:var(--cr-faint);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}.sb-block.cr-block .cr-row:hover .cr-chev{stroke:var(--cr-muted)}.sb-block.cr-block .is-open .cr-chev{transform:rotate(180deg)}.sb-block.cr-block .cr-more{display:flex;align-items:center;gap:6px;width:100%;padding:9px 16px;border:0;border-top:1px solid var(--cr-line);background:none;font:inherit;font-size:12.5px;color:var(--cr-accent);text-align:left;cursor:pointer}.sb-block.cr-block .cr-more:hover{background:var(--cr-hover)}.sb-block.cr-block .cr-more:focus-visible{outline-offset:-2px}.sb-block.cr-block .cr-more svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.sb-block.cr-block .cr-detail{padding:0 16px 18px;margin-right:24px}.sb-block.cr-block .cr-detail[hidden]{display:none}.sb-block.cr-block .cr-para{margin:8px 0 0;font-size:13.5px;line-height:1.75}.sb-block.cr-block ul.cr-para{padding-left:18px}.sb-block.cr-block .cr-params{width:100%;border-collapse:collapse;margin-top:12px;font-size:13px}.sb-block.cr-block .cr-params thead th{padding:0 0 6px;font-size:11.5px;font-weight:500;color:var(--cr-faint);text-align:left;border-bottom:1px solid var(--cr-line)}.sb-block.cr-block .cr-params tbody th,.sb-block.cr-block .cr-params tbody td{padding:8px 0;border-bottom:1px solid var(--cr-line);vertical-align:top;text-align:left;line-height:1.6}.sb-block.cr-block .cr-params tbody th{width:1%;padding-right:20px;white-space:nowrap;font-weight:400}.sb-block.cr-block .cr-params tbody th code{font-size:12.5px;background:none;border:0;padding:0}.sb-block.cr-block .cr-detail .sg-code{margin-top:14px}.sb-block.cr-block .cr-summary code,.sb-block.cr-block .cr-detail :not(pre)>code,.sb-block.cr-block .cr-paramhits code,.sb-block.cr-block .cr-emptyhint code{font-family:var(--cr-mono);font-size:.9em;background:var(--cr-surface);border:1px solid var(--cr-line);border-radius:4px;padding:0 4px;overflow-wrap:anywhere}.sb-block.cr-block .cr-empty{margin-top:14px;padding:34px 20px 30px;border:1px solid var(--cr-line);border-radius:10px;text-align:center}.sb-block.cr-block .cr-empty svg{width:40px;height:40px;fill:none;stroke:var(--cr-faint);stroke-width:1.6;stroke-linecap:round}.sb-block.cr-block .cr-emptytitle{margin:8px 0 0;font-size:14.5px;font-weight:500;overflow-wrap:anywhere}.sb-block.cr-block .cr-emptyhint{margin:4px 0 0;font-size:12.5px;color:var(--cr-muted)}.sb-block.cr-block .cr-emptyactions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:14px}.sb-block.cr-block .cr-emptyactions:empty{display:none}@container (max-width: 640px){.sb-block.cr-block .cr-row{padding:11px 12px;gap:8px}.sb-block.cr-block .cr-total{display:none}.sb-block.cr-block .cr-detail{padding:0 12px 16px;margin-right:0}.sb-block.cr-block .cr-grouphead{padding:8px 12px}.sb-block.cr-block .cr-cmd{font-size:12.5px}.sb-block.cr-block .cr-params,.sb-block.cr-block .cr-params tbody,.sb-block.cr-block .cr-params tr,.sb-block.cr-block .cr-params tbody th,.sb-block.cr-block .cr-params tbody td{display:block;width:auto}.sb-block.cr-block .cr-params thead{display:none}.sb-block.cr-block .cr-params tr{padding:8px 0;border-bottom:1px solid var(--cr-line)}.sb-block.cr-block .cr-params tbody th,.sb-block.cr-block .cr-params tbody td{padding:0;border:0;white-space:normal}}@media(prefers-reduced-motion:reduce){.sb-block.cr-block *,.sb-block.cr-block *:after{transition:none!important}}@media print{.sb-block.cr-block .cr-search,.sb-block.cr-block .cr-chips,.sb-block.cr-block .cr-more,.sb-block.cr-block .cr-chev,.sb-block.cr-block .cr-emptyactions{display:none}.sb-block.cr-block .cr-item[hidden],.sb-block.cr-block .cr-detail[hidden]{display:block}.sb-block.cr-block .cr-list{border:0}.sb-block.cr-block .cr-item,.sb-block.cr-block .cr-section{break-inside:avoid}}
2
+ `);var F=j("commandReference",{"zh-CN":{title:"\u547D\u4EE4\u53C2\u8003",placeholder:"\u641C\u7D22\u547D\u4EE4\u3001\u53C2\u6570\u6216\u7528\u9014",search:"\u641C\u7D22\u547D\u4EE4",clear:"\u6E05\u9664\u641C\u7D22",total:"{count} \u6761\u547D\u4EE4",found:"\u627E\u5230 {count} \u6761\u547D\u4EE4",filter:"\u6309\u5206\u7EC4\u7B5B\u9009",all:"\u5168\u90E8",params:"\u53C2\u6570",paramName:"\u53C2\u6570",paramMeaning:"\u8BF4\u660E",example:"\u793A\u4F8B",exampleName:"{command} \u7684\u793A\u4F8B",groupCount:"{shown} / {total}",showMore:"\u663E\u793A\u5176\u4F59 {count} \u6761{group}\u547D\u4EE4",noMatch:"\u6CA1\u6709\u4E0E\u300C{query}\u300D\u5339\u914D\u7684\u547D\u4EE4",noMatchIn:"\u6CA1\u6709\u4E0E\u300C{query}\u300D\u5339\u914D\u7684\u547D\u4EE4\uFF08{group}\uFF09",emptyGroup:"\u300C{group}\u300D\u4E2D\u6CA1\u6709\u547D\u4EE4",emptyHint:"\u8BD5\u8BD5\u66F4\u77ED\u7684\u5173\u952E\u8BCD\uFF0C\u6216\u641C\u7D22\u53C2\u6570\u540D\u3002",viewAll:"\u5728\u5168\u90E8\u5206\u7EC4\u4E2D\u67E5\u770B\uFF08{count} \u6761\uFF09"},en:{title:"Command reference",placeholder:"Search commands, parameters or purposes",search:"Search commands",clear:"Clear search",total:{one:"{count} command",other:"{count} commands"},found:{one:"{count} command found",other:"{count} commands found"},filter:"Filter by group",all:"All",params:"Parameters",paramName:"Parameter",paramMeaning:"Meaning",example:"Example",exampleName:"example of {command}",groupCount:"{shown} / {total}",showMore:"Show {count} more in {group}",noMatch:"No command matches \u201C{query}\u201D",noMatchIn:"No command matches \u201C{query}\u201D in {group}",emptyGroup:"{group} has no commands",emptyHint:"Try a shorter keyword, or search for a parameter name.",viewAll:"View in all groups ({count})"}});var r=E(Z(),1),g="\0all",B=6;function Q(l,c,t=0,m=l.length,s="h"){let n=[],d=t,i=0;for(let[f,y]of c){if(y<=d||f>=m)continue;let x=Math.max(f,d),v=Math.min(y,m);x>d&&n.push(l.slice(d,x)),n.push((0,r.jsx)("mark",{children:l.slice(x,v)},`${s}${i++}`)),d=v}return d<m&&n.push(l.slice(d,m)),n}var tr=l=>l.length?(c,t)=>(0,r.jsx)("span",{children:Q(c,I(c,l),0,c.length,t)},t):void 0;function ar({text:l,terms:c,program:t}){let m=I(l,c),s=[],n=/\S+/g,d,i=0,f=!0,y=!1,x=!0,v=0;for(;d=n.exec(l);){let u=d[0],w=d.index,k=w+u.length;w>i&&s.push(l.slice(i,w));let h;f&&t&&u===t?h="prog":!y&&/^[A-Za-z_][\w.-]*$/.test(u)&&!/^[A-Z][A-Z0-9_]*$/.test(u)?(h="verb",y=!0,/[_.]/.test(u)&&(x=!1)):x&&/^[a-z][a-z0-9-]*$/.test(u)?h="verb":(x=!1,h=/^\[?-{1,2}[A-Za-z]/.test(u)?"flag":/^[[<(]?[A-Z][A-Z0-9_]*(?:[|,.][A-Z0-9_]+)*[\]>)]?\]?$|^[[<].*[\]>]$/.test(u)?"ph":"arg"),f=!1,s.push((0,r.jsx)("span",{className:`cr-${h}${u.length>32?" is-long":""}`,children:Q(l,m,w,k,`t${v}.`)},v)),v++,i=k}return i<l.length&&s.push(l.slice(i)),(0,r.jsx)("code",{className:"cr-cmd",children:s})}function nr({source:l}){return(0,r.jsx)(r.Fragment,{children:l.trim().split(/\n\s*\n/).map((c,t)=>{let m=c.split(`
3
+ `);return m.every(s=>/^\s*[-•]\s+/.test(s))?(0,r.jsx)("ul",{className:"cr-para",children:m.map((s,n)=>(0,r.jsx)("li",{children:(0,r.jsx)(M,{source:s.replace(/^\s*[-•]\s+/,"")})},n))},t):(0,r.jsx)("p",{className:"cr-para",children:m.map((s,n)=>(0,r.jsxs)("span",{children:[n>0&&(0,r.jsx)("br",{}),(0,r.jsx)(M,{source:s})]},n))},t)})})}function gr({data:l}){let c=O(F),t=l,m=(0,b.useId)(),s=(0,b.useMemo)(()=>t.commands.map((e,a)=>({...e,key:e.id??`#${a}`})),[t.commands]),[n,d]=(0,b.useState)(""),[i,f]=(0,b.useState)(g),[y,x]=(0,b.useState)(()=>new Set),[v,u]=(0,b.useState)(()=>new Set),w=(0,b.useDeferredValue)(n),k=(0,b.useMemo)(()=>G(w),[w]),h=tr(k),$=(0,b.useRef)(null),D=(0,b.useRef)(null),z=(0,b.useMemo)(()=>k.length?s.filter(e=>_(e,k)):s,[s,k]),A=t.groups.map(e=>({...e,total:s.filter(a=>a.group===e.id).length,items:z.filter(a=>a.group===e.id)})),L=A.filter(e=>(i===g||e.id===i)&&e.items.length),J=L.reduce((e,a)=>e+a.items.length,0),R=A.find(e=>e.id===i)?.label,W=L.length>1||i===g,X=(e,a)=>i===g&&!k.length&&!v.has(e)&&a>B+2,Y=e=>x(a=>{let o=new Set(a);return o.has(e)?o.delete(e):o.add(e),o}),T=()=>{d(""),$.current?.focus()},H=()=>[...D.current?.querySelectorAll(".cr-row:not([hidden] *)")??[]],rr=e=>{if(e.key==="Escape"&&n&&(e.preventDefault(),d("")),e.key==="ArrowDown"){let a=H()[0];if(!a)return;e.preventDefault(),a.focus()}},er=e=>{if(e.key!=="ArrowDown"&&e.key!=="ArrowUp")return;let a=H(),o=a.indexOf(document.activeElement);o<0||(e.preventDefault(),e.key==="ArrowUp"&&o===0?$.current?.focus():a[Math.max(0,Math.min(a.length-1,o+(e.key==="ArrowDown"?1:-1)))]?.focus())};return(0,r.jsxs)("section",{className:"sb-block cr-block","aria-label":U(t.title,c("title")),children:[(t.title||t.description)&&(0,r.jsxs)("div",{className:"cr-head",children:[t.title&&(0,r.jsx)("h3",{className:"cr-heading",children:t.title}),t.description&&(0,r.jsx)("p",{className:"cr-sub",children:(0,r.jsx)(M,{source:t.description})})]}),(0,r.jsxs)("div",{className:"cr-search",children:[(0,r.jsxs)("svg",{className:"cr-glass",viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"7",cy:"7",r:"4.6"}),(0,r.jsx)("path",{d:"M10.4 10.4l3.3 3.3"})]}),(0,r.jsx)("input",{ref:$,type:"search",value:n,placeholder:t.placeholder??c("placeholder"),"aria-label":c("search"),"aria-controls":`${m}-list`,spellCheck:!1,autoComplete:"off",onChange:e=>d(e.currentTarget.value),onKeyDown:rr}),n?(0,r.jsx)("button",{type:"button",className:"cr-clear",onClick:T,"aria-label":c("clear"),children:(0,r.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M5 5l6 6M11 5l-6 6"})})}):(0,r.jsx)("span",{className:"cr-total",children:c("total",{count:s.length})})]}),(0,r.jsx)("p",{className:"cr-status",role:"status",children:k.length?c("found",{count:z.length}):""}),(0,r.jsxs)("div",{className:"cr-chips",role:"group","aria-label":c("filter"),children:[(0,r.jsxs)("button",{type:"button","aria-pressed":i===g,onClick:()=>f(g),children:[c("all"),(0,r.jsx)("span",{children:z.length})]}),A.map(e=>(0,r.jsxs)("button",{type:"button","aria-pressed":i===e.id,className:e.items.length?void 0:"is-zero",onClick:()=>f(a=>a===e.id?g:e.id),children:[e.label,(0,r.jsx)("span",{children:e.items.length})]},e.id))]}),J?(0,r.jsx)("div",{className:"cr-list",id:`${m}-list`,ref:D,onKeyDown:er,children:L.map(e=>{let a=X(e.id,e.items.length);return(0,r.jsxs)("section",{className:"cr-section","aria-label":e.label,children:[W&&(0,r.jsxs)("div",{className:"cr-grouphead",children:[(0,r.jsx)("span",{children:e.label}),(0,r.jsx)("span",{className:"cr-groupcount",children:k.length?c("groupCount",{shown:e.items.length,total:e.total}):e.total})]}),(0,r.jsx)("ul",{children:e.items.map((o,or)=>{let S=y.has(o.key),q=`${m}-d${o.key}`,N=!!(o.detail||o.params?.length||o.examples?.length),K=k.length?(o.params??[]).filter(p=>k.some(C=>!o.command.toLowerCase().includes(C)&&!o.summary.toLowerCase().includes(C)&&`${p.name} ${p.meaning}`.toLowerCase().includes(C))):[];return(0,r.jsxs)("li",{className:`cr-item${S?" is-open":""}`,hidden:a&&or>=B,children:[(0,r.jsxs)("button",{type:"button",className:"cr-row","aria-expanded":N?S:void 0,"aria-controls":N?q:void 0,"data-static":N?void 0:"",onClick:()=>N&&Y(o.key),children:[(0,r.jsxs)("span",{className:"cr-main",children:[(0,r.jsx)(ar,{text:o.command,terms:k,program:t.program}),(0,r.jsx)("span",{className:"cr-summary",children:(0,r.jsx)(M,{source:o.summary,mark:h,links:!1})}),K.length>0&&(0,r.jsxs)("span",{className:"cr-paramhits",children:[c("params"),K.slice(0,4).map(p=>(0,r.jsx)("code",{children:h?h(p.name,p.name):p.name},p.name))]})]}),N&&(0,r.jsx)("svg",{className:"cr-chev",viewBox:"0 0 12 12","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M3 4.75L6 7.75 9 4.75"})})]}),N&&(0,r.jsxs)("div",{className:"cr-detail",id:q,hidden:!S,children:[o.detail&&(0,r.jsx)("div",{className:"cr-body",children:(0,r.jsx)(nr,{source:o.detail})}),o.params&&o.params.length>0&&(0,r.jsxs)("table",{className:"cr-params",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:c("paramName")}),(0,r.jsx)("th",{scope:"col",children:c("paramMeaning")})]})}),(0,r.jsx)("tbody",{children:o.params.map(p=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:(0,r.jsx)("code",{children:h?h(p.name,p.name):p.name})}),(0,r.jsx)("td",{children:(0,r.jsx)(M,{source:p.meaning})})]},p.name))})]}),o.examples&&o.examples.length>0&&(0,r.jsx)(V,{variants:o.examples.map((p,C)=>({label:p.label??(o.examples.length>1?`${c("example")} ${C+1}`:c("example")),code:p.code})),name:c("exampleName",{command:o.command})})]})]},o.key)})}),a&&(0,r.jsxs)("button",{type:"button",className:"cr-more",onClick:()=>u(o=>new Set(o).add(e.id)),children:[c("showMore",{count:e.items.length-B,group:e.label}),(0,r.jsx)("svg",{viewBox:"0 0 12 12","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M3 4.75L6 7.75 9 4.75"})})]})]},e.id)})}):(0,r.jsxs)("div",{className:"cr-empty",children:[(0,r.jsxs)("svg",{viewBox:"0 0 40 40","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"18",cy:"18",r:"10"}),(0,r.jsx)("path",{d:"M25.5 25.5l7 7"}),(0,r.jsx)("path",{d:"M14 18h8"})]}),(0,r.jsx)("p",{className:"cr-emptytitle",children:n.trim()?i!==g&&R?c("noMatchIn",{query:n.trim(),group:R}):c("noMatch",{query:n.trim()}):c("emptyGroup",{group:R??""})}),(0,r.jsx)("p",{className:"cr-emptyhint",children:c("emptyHint")}),(0,r.jsxs)("div",{className:"cr-emptyactions",children:[i!==g&&z.length>0&&(0,r.jsx)("button",{type:"button",onClick:()=>f(g),children:c("viewAll",{count:z.length})}),n&&(0,r.jsx)("button",{type:"button",onClick:T,children:c("clear")})]})]})]})}export{gr as CommandReferenceBlock};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-24VJITFC.js";import{c as x}from"./chunk-KF47DKNH.js";import{d as w}from"./chunk-X2BFI7UA.js";import{c as O,hb as N,kb as k}from"./chunk-Z2EQGXZF.js";import{c as g}from"./chunk-DUIGVKKG.js";var s=g(O(),1);var e=g(N(),1),c={yes:"\u2713",no:"\u2715",partial:"\u25D0",neutral:"\u2022",na:""},C={yes:"matrix.legend.yes",no:"matrix.legend.no",partial:"matrix.legend.partial",neutral:"matrix.legend.neutral",na:"matrix.legend.na"};function E({data:M}){let n=k(v),a=M,[i,u]=(0,s.useState)(null),[h,$]=(0,s.useState)(!1),R=(0,s.useMemo)(()=>new Map(a.cells.map(t=>[`${t.row}\0${t.column}`,t])),[a.cells]),b=(0,s.useMemo)(()=>new Set(x(a)),[a]),m=h?a.rows.filter(t=>b.has(t.id)):a.rows,S=Object.keys(c).filter(t=>a.cells.some(o=>o.tone===t)),p=a.cells.filter(t=>t.note),f=t=>[t.highlight?"is-highlight":"",i===t.id?"is-focus":""].filter(Boolean).join(" ")||void 0;return(0,e.jsxs)("section",{className:"sb-block an-block","aria-label":w(a.title,n("matrix.title")),children:[(0,e.jsxs)("div",{className:"an-head",children:[a.title&&(0,e.jsx)("h3",{className:"an-title",children:a.title}),a.description&&(0,e.jsx)("p",{className:"an-sub",children:a.description}),(0,e.jsxs)("div",{className:"an-tools",children:[(0,e.jsx)("button",{type:"button",className:"an-chip","aria-pressed":h,onClick:()=>$(t=>!t),children:n("matrix.diffOnly",{count:b.size,total:a.rows.length})}),i&&(0,e.jsx)("button",{type:"button",className:"an-chip",onClick:()=>u(null),children:n("matrix.clearFocus")})]})]}),(0,e.jsx)("div",{className:"an-matrix-scroll",children:(0,e.jsxs)("table",{className:`an-matrix${i?" has-focus":""}`,children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{className:"an-rowhead",scope:"col",children:n("matrix.dimension")}),a.columns.map(t=>(0,e.jsxs)("th",{scope:"col",className:f(t),children:[(0,e.jsxs)("button",{type:"button",className:"an-col-button","aria-pressed":i===t.id,onClick:()=>u(i===t.id?null:t.id),children:[t.label,t.note&&(0,e.jsx)("span",{className:"an-col-note",children:t.note})]}),t.url&&(0,e.jsx)("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"an-col-note",children:n("matrix.source")})]},t.id))]})}),(0,e.jsxs)("tbody",{children:[m.length===0&&(0,e.jsx)("tr",{children:(0,e.jsx)("td",{colSpan:a.columns.length+1,className:"an-empty",children:n("matrix.allSame")})}),m.map((t,o)=>{let T=t.group&&t.group!==m[o-1]?.group;return(0,e.jsxs)(s.Fragment,{children:[T&&(0,e.jsx)("tr",{className:"an-group-row",children:(0,e.jsx)("th",{colSpan:a.columns.length+1,scope:"rowgroup",children:t.group})}),(0,e.jsxs)("tr",{children:[(0,e.jsxs)("th",{className:"an-rowhead",scope:"row",children:[(0,e.jsx)("div",{className:"an-row-label",children:t.label}),t.hint&&(0,e.jsx)("div",{className:"an-row-hint",children:t.hint})]}),a.columns.map(d=>{let r=R.get(`${t.id}\0${d.id}`),l=r?.tone??"na",y=r?.note?p.indexOf(r)+1:0;return(0,e.jsxs)("td",{className:f(d),title:r?.note,children:[(0,e.jsxs)("span",{className:`an-cell an-tone-${l}`,children:[c[l]&&(0,e.jsx)("b",{"aria-hidden":"true",children:c[l]}),(0,e.jsx)("span",{children:r?.text??(l==="na"?"\u2014":a.legend?.[l]??n(C[l]))})]}),y>0&&(0,e.jsx)("sup",{className:"an-note-mark",children:y})]},d.id)})]})]},t.id)})]})]})}),(0,e.jsxs)("div",{className:"an-legend",children:[S.map(t=>(0,e.jsxs)("span",{className:`an-tone-${t}`,children:[c[t]?(0,e.jsx)("b",{children:c[t]}):"\u2014"," ",a.legend?.[t]??n(C[t])]},t)),(0,e.jsx)("span",{children:n("matrix.focusHint")})]}),p.length>0&&(0,e.jsx)("ol",{className:"an-static","aria-label":n("matrix.notes"),children:p.map(t=>(0,e.jsx)("li",{children:n("matrix.note",{column:a.columns.find(o=>o.id===t.column)?.label??"",row:a.rows.find(o=>o.id===t.row)?.label??"",note:t.note??""})},`${t.row}-${t.column}`))})]})}export{E as ComparisonMatrixBlock};
1
+ import{a as v}from"./chunk-2HAL7KBM.js";import{c as x}from"./chunk-KF47DKNH.js";import{d as w}from"./chunk-VQIPL7NG.js";import{c as O,jb as N,mb as k}from"./chunk-PVMEUQFU.js";import{c as g}from"./chunk-DUIGVKKG.js";var s=g(O(),1);var e=g(N(),1),c={yes:"\u2713",no:"\u2715",partial:"\u25D0",neutral:"\u2022",na:""},C={yes:"matrix.legend.yes",no:"matrix.legend.no",partial:"matrix.legend.partial",neutral:"matrix.legend.neutral",na:"matrix.legend.na"};function E({data:M}){let n=k(v),a=M,[i,u]=(0,s.useState)(null),[h,$]=(0,s.useState)(!1),R=(0,s.useMemo)(()=>new Map(a.cells.map(t=>[`${t.row}\0${t.column}`,t])),[a.cells]),b=(0,s.useMemo)(()=>new Set(x(a)),[a]),m=h?a.rows.filter(t=>b.has(t.id)):a.rows,S=Object.keys(c).filter(t=>a.cells.some(o=>o.tone===t)),p=a.cells.filter(t=>t.note),f=t=>[t.highlight?"is-highlight":"",i===t.id?"is-focus":""].filter(Boolean).join(" ")||void 0;return(0,e.jsxs)("section",{className:"sb-block an-block","aria-label":w(a.title,n("matrix.title")),children:[(0,e.jsxs)("div",{className:"an-head",children:[a.title&&(0,e.jsx)("h3",{className:"an-title",children:a.title}),a.description&&(0,e.jsx)("p",{className:"an-sub",children:a.description}),(0,e.jsxs)("div",{className:"an-tools",children:[(0,e.jsx)("button",{type:"button",className:"an-chip","aria-pressed":h,onClick:()=>$(t=>!t),children:n("matrix.diffOnly",{count:b.size,total:a.rows.length})}),i&&(0,e.jsx)("button",{type:"button",className:"an-chip",onClick:()=>u(null),children:n("matrix.clearFocus")})]})]}),(0,e.jsx)("div",{className:"an-matrix-scroll",children:(0,e.jsxs)("table",{className:`an-matrix${i?" has-focus":""}`,children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{className:"an-rowhead",scope:"col",children:n("matrix.dimension")}),a.columns.map(t=>(0,e.jsxs)("th",{scope:"col",className:f(t),children:[(0,e.jsxs)("button",{type:"button",className:"an-col-button","aria-pressed":i===t.id,onClick:()=>u(i===t.id?null:t.id),children:[t.label,t.note&&(0,e.jsx)("span",{className:"an-col-note",children:t.note})]}),t.url&&(0,e.jsx)("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"an-col-note",children:n("matrix.source")})]},t.id))]})}),(0,e.jsxs)("tbody",{children:[m.length===0&&(0,e.jsx)("tr",{children:(0,e.jsx)("td",{colSpan:a.columns.length+1,className:"an-empty",children:n("matrix.allSame")})}),m.map((t,o)=>{let T=t.group&&t.group!==m[o-1]?.group;return(0,e.jsxs)(s.Fragment,{children:[T&&(0,e.jsx)("tr",{className:"an-group-row",children:(0,e.jsx)("th",{colSpan:a.columns.length+1,scope:"rowgroup",children:t.group})}),(0,e.jsxs)("tr",{children:[(0,e.jsxs)("th",{className:"an-rowhead",scope:"row",children:[(0,e.jsx)("div",{className:"an-row-label",children:t.label}),t.hint&&(0,e.jsx)("div",{className:"an-row-hint",children:t.hint})]}),a.columns.map(d=>{let r=R.get(`${t.id}\0${d.id}`),l=r?.tone??"na",y=r?.note?p.indexOf(r)+1:0;return(0,e.jsxs)("td",{className:f(d),title:r?.note,children:[(0,e.jsxs)("span",{className:`an-cell an-tone-${l}`,children:[c[l]&&(0,e.jsx)("b",{"aria-hidden":"true",children:c[l]}),(0,e.jsx)("span",{children:r?.text??(l==="na"?"\u2014":a.legend?.[l]??n(C[l]))})]}),y>0&&(0,e.jsx)("sup",{className:"an-note-mark",children:y})]},d.id)})]})]},t.id)})]})]})}),(0,e.jsxs)("div",{className:"an-legend",children:[S.map(t=>(0,e.jsxs)("span",{className:`an-tone-${t}`,children:[c[t]?(0,e.jsx)("b",{children:c[t]}):"\u2014"," ",a.legend?.[t]??n(C[t])]},t)),(0,e.jsx)("span",{children:n("matrix.focusHint")})]}),p.length>0&&(0,e.jsx)("ol",{className:"an-static","aria-label":n("matrix.notes"),children:p.map(t=>(0,e.jsx)("li",{children:n("matrix.note",{column:a.columns.find(o=>o.id===t.column)?.label??"",row:a.rows.find(o=>o.id===t.row)?.label??"",note:t.note??""})},`${t.row}-${t.column}`))})]})}export{E as ComparisonMatrixBlock};
@@ -0,0 +1,2 @@
1
+ import{a as oe,c as ne,d as le,e as se,f as ae}from"./chunk-JXKAISUX.js";import{d as be}from"./chunk-VQIPL7NG.js";import{a as ee,c as we,jb as te,lb as re,mb as ce}from"./chunk-PVMEUQFU.js";import{c as U,d as ie}from"./chunk-DUIGVKKG.js";var h=U(we(),1);ee(`.sb-block.et-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.et-block li:not(svg){padding:0}.sb-block.et-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.et-block{--et-text: var(--text, #222222);--et-muted: var(--muted, #6a6a6a);--et-line: var(--line, #dddddd);--et-paper: var(--paper, #ffffff);--et-surface: var(--surface, #fafafa);--et-focus: var(--accent, #120a8f);--et-neutral: #6b736d;--et-neutral-soft: #eef0ee;--et-info: #2c64a8;--et-info-soft: #dfeaf6;--et-good: #2f7d5b;--et-good-soft: #dcefe3;--et-warn: #94600f;--et-warn-soft: #f8ead0;--et-bad: #b53f2b;--et-bad-soft: #f8dfd9;--et-accent: var(--accent, #120a8f);--et-accent-soft: var(--accent-soft, #eeedf9);color:var(--et-text);font-family:inherit;font-size:14px;line-height:1.55;padding:8px 0;container-type:inline-size;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}:root[data-theme=dark] .sb-block.et-block,[data-theme=dark] .sb-block.et-block{--et-neutral: #a3aaa5;--et-neutral-soft: #2a2d2b;--et-info: #8bb8eb;--et-info-soft: #1f2d3d;--et-good: #7cc3a0;--et-good-soft: #20352b;--et-warn: #e0a96f;--et-warn-soft: #3a2c1e;--et-bad: #e48b83;--et-bad-soft: #3b2423}.sb-block.et-block *{box-sizing:border-box}.sb-block.et-block .et-head{margin-bottom:10px}.sb-block.et-block .et-title{font-size:17px;font-weight:700;margin:0}.sb-block.et-block .et-sub{color:var(--et-muted);font-size:13px;margin:2px 0 0}.sb-block.et-block .et-summary{display:flex;flex-wrap:wrap;gap:6px 28px;margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid var(--et-line)}.sb-block.et-block .et-summary div{display:flex;align-items:baseline;gap:8px}.sb-block.et-block .et-summary dd{order:-1;margin:0;font-size:20px;font-weight:700;letter-spacing:-.01em}.sb-block.et-block .et-summary dt{font-size:12.5px;color:var(--et-muted)}.sb-block.et-block .et-body{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:16px;align-items:start}.sb-block.et-block .et-body.is-single{grid-template-columns:minmax(0,1fr)}.sb-block.et-block .et-main{min-width:0}.sb-block.et-block .et-readout{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin-bottom:4px;font-size:12.5px;color:var(--et-muted)}.sb-block.et-block .et-now{display:inline-flex;align-items:baseline;gap:6px}.sb-block.et-block .et-now b{font:700 15px ui-monospace,Menlo,monospace;color:var(--et-text)}.sb-block.et-block .et-phase-pill{border-radius:999px;padding:1px 9px;font-size:12px;font-weight:600;color:var(--et-text)}.sb-block.et-block .et-value{display:inline-flex;align-items:center;gap:5px}.sb-block.et-block .et-value i{width:8px;height:8px;border-radius:50%}.sb-block.et-block .et-value b{color:var(--et-text);font-weight:650}.sb-block.et-block .et-chart{min-width:0}.sb-block.et-block .et-chart svg{display:block;width:100%;height:auto;touch-action:pan-y;cursor:col-resize;user-select:none}.sb-block.et-block .et-grid{stroke:var(--et-line);stroke-width:1;opacity:.7}.sb-block.et-block .et-baseline{stroke:var(--et-line);stroke-width:1}.sb-block.et-block .et-tick{font:10.5px ui-monospace,Menlo,monospace;fill:var(--et-muted)}.sb-block.et-block .et-phase-label{font-size:10.5px;font-weight:650;fill:var(--et-muted)}.sb-block.et-block .et-area{fill:currentColor;opacity:.15}.sb-block.et-block .et-line{fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}.sb-block.et-block .et-line.is-dashed{stroke-width:1.8;stroke-dasharray:5 3}.sb-block.et-block .et-cursor{stroke:var(--et-text);stroke-width:1.2}.sb-block.et-block .et-cursor-dot,.sb-block.et-block .et-marker{stroke:var(--et-paper);stroke-width:1.5}.sb-block.et-block .et-marker{cursor:pointer}.sb-block.et-block .et-marker.is-future{opacity:.45}.sb-block.et-block .et-controls{display:flex;align-items:center;gap:8px;margin-top:6px}.sb-block.et-block .et-controls input{flex:1;min-width:0;accent-color:var(--et-text)}.sb-block.et-block .et-step{flex:none;width:28px;height:28px;border:1px solid var(--et-line);border-radius:8px;background:var(--et-paper);color:var(--et-text);font:inherit;font-size:16px;line-height:1;cursor:pointer}.sb-block.et-block .et-step:disabled{opacity:.35;cursor:default}.sb-block.et-block .et-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin-top:8px;font-size:12px;color:var(--et-muted)}.sb-block.et-block .et-legend>span>i{display:inline-block;width:16px;border-top:2px solid currentColor;margin-right:6px;vertical-align:3px}.sb-block.et-block .et-legend>span>i.is-dashed{border-top-style:dashed}.sb-block.et-block .et-phases{display:flex;flex-wrap:wrap;gap:4px}.sb-block.et-block .et-phase-chip{border:1px solid transparent;border-radius:999px;padding:1px 9px;font:inherit;font-size:11.5px;font-weight:600;color:var(--et-text);cursor:pointer}.sb-block.et-block .et-phase-chip small{font:10.5px ui-monospace,Menlo,monospace;color:var(--et-muted);margin-left:5px}.sb-block.et-block .et-phase-chip[aria-pressed=true]{border-color:var(--et-text)}.sb-block.et-block .et-note{margin:6px 0 0;font-size:11.5px;color:var(--et-muted)}.sb-block.et-block .et-events{list-style:none;margin:0;padding:0 4px 0 0;max-height:380px;overflow-y:auto;border-left:2px solid var(--et-line);scrollbar-width:thin}.sb-block.et-block .et-events li{position:relative;padding-left:14px}.sb-block.et-block .et-events li:before{content:"";position:absolute;left:-6px;top:13px;width:10px;height:10px;border-radius:50%;background:var(--et-paper);border:2px solid var(--kind)}.sb-block.et-block .et-events li.is-open:before{background:var(--kind)}.sb-block.et-block .et-events li.is-future{opacity:.55}.sb-block.et-block .et-events button{display:grid;grid-template-columns:auto 1fr;column-gap:8px;row-gap:3px;align-items:center;width:100%;padding:7px 8px;border:0;border-radius:9px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.sb-block.et-block .et-events button:hover{background:var(--et-surface)}.sb-block.et-block .et-events li.is-open .et-card{background:var(--et-paper);box-shadow:0 0 0 1px var(--et-line);border-radius:9px}.sb-block.et-block .et-events li.is-open button:hover{background:transparent}.sb-block.et-block .et-events time{font:700 12px ui-monospace,Menlo,monospace;color:var(--et-text)}.sb-block.et-block .et-kind{justify-self:start;font-size:10.5px;font-weight:700;color:var(--kind);border:1px solid var(--kind);border-radius:999px;padding:0 7px;line-height:17px}.sb-block.et-block .et-events strong{grid-column:1 / -1;font-size:13px;font-weight:600;line-height:1.4}.sb-block.et-block .et-detail{display:none;margin:0 0 4px;padding:2px 8px 8px;font-size:12.5px;line-height:1.55;color:var(--et-muted)}.sb-block.et-block .et-events li.is-open .et-detail{display:block}.sb-block.et-block .et-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.sb-block.et-block .et-step:focus-visible,.sb-block.et-block .et-phase-chip:focus-visible,.sb-block.et-block .et-events button:focus-visible,.sb-block.et-block .et-controls input:focus-visible{outline:2px solid var(--et-focus);outline-offset:2px}@container (max-width: 760px){.sb-block.et-block .et-body{grid-template-columns:minmax(0,1fr)}.sb-block.et-block .et-events{max-height:300px}.sb-block.et-block .et-summary{gap:6px 18px}.sb-block.et-block .et-summary dd{font-size:17px}}@media(prefers-reduced-motion:reduce){.sb-block.et-block .et-events{scroll-behavior:auto}}@media print{.sb-block.et-block .et-controls{display:none}.sb-block.et-block .et-body{grid-template-columns:minmax(0,1fr)}.sb-block.et-block .et-events{max-height:none;overflow:visible}.sb-block.et-block .et-events li{break-inside:avoid}.sb-block.et-block .et-events li.is-future{opacity:1}.sb-block.et-block .et-detail{display:block}.sb-block.et-block .et-events li.is-open .et-card{box-shadow:none}}
2
+ `);var pe=ie("eventTimeline",{"zh-CN":{title:"\u4E8B\u4EF6\u65F6\u95F4\u7EBF",position:"\u4F4D\u7F6E",chart:"{series} \u968F{axis}\u53D8\u5316\uFF0C\u6807\u51FA {count} \u4E2A\u4E8B\u4EF6",chartNoSeries:"\u6CBF{axis}\u6392\u5217\u7684 {count} \u4E2A\u4E8B\u4EF6",summary:"\u8981\u70B9",scrub:"\u62D6\u52A8\u67E5\u770B\u5404\u65F6\u95F4\u70B9",scrubValue:"{point}\uFF0C{event}",noEvent:"\u5C1A\u65E0\u4E8B\u4EF6",previous:"\u4E0A\u4E00\u4E2A\u4E8B\u4EF6",next:"\u4E0B\u4E00\u4E2A\u4E8B\u4EF6",phases:"\u9636\u6BB5",jumpToPhase:"\u8DF3\u5230\u9636\u6BB5 {label}\uFF08{from}\u2013{to}\uFF09",events:"\u4E8B\u4EF6 \xB7 {count}",seriesWithUnit:"{label}\uFF08{unit}\uFF09",future:"\u5C1A\u672A\u53D1\u751F",noValue:"\u65E0\u6570\u636E"},en:{title:"Event timeline",position:"Position",chart:"{series} over {axis}, with {count} events marked",chartNoSeries:"{count} events along {axis}",summary:"Highlights",scrub:"Drag to step through the timeline",scrubValue:"{point}, {event}",noEvent:"No event yet",previous:"Previous event",next:"Next event",phases:"Phases",jumpToPhase:"Jump to phase {label} ({from}\u2013{to})",events:"Events \xB7 {count}",seriesWithUnit:"{label} ({unit})",future:"Not yet reached",noValue:"No data"}});var t=U(te(),1),q=(a="neutral")=>`var(--et-${a})`,K=(a="neutral")=>`var(--et-${a}-soft)`,Ne=["info","bad","good"],F=(a,l)=>a.color??q(a.tone??Ne[l]);function Me(){let a=(0,h.useRef)(null),[l,b]=(0,h.useState)(640);return(0,h.useEffect)(()=>{let n=a.current;if(!n)return;let r=new ResizeObserver(([d])=>b(d.contentRect.width));return r.observe(n),()=>r.disconnect()},[]),[a,l]}function Te(a,l){let b=a/l||1,n=10**Math.floor(Math.log10(b)),r=b/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function de(a){if(!a.length)return null;let l=a.flatMap(s=>s.values.filter(z=>z!==null)),b=Math.min(0,...l,...a.map(s=>s.min??0)),n=Math.max(...l,...a.map(s=>s.max??-1/0));n<=b&&(n=b+1);let r=Te(n-b,4);b=a.some(s=>s.min!==void 0)?Math.min(...a.map(s=>s.min??b)):Math.floor(b/r)*r,n=Math.ceil(n/r)*r;let d=[];for(let s=b;s<=n+r/2;s+=r)d.push(Number(s.toFixed(10)));return{lo:b,hi:n,ticks:d,unit:a.find(s=>s.unit)?.unit}}function $e(a,l,b){return(b==="date"?[1,2,7,14,28,56,91,182,364]:[1,2,5,10,15,20,30,60,120,180,240,360,720]).find(r=>(a-1)/r<=l)??Math.ceil((a-1)/l)}var G=(a,l)=>new Intl.NumberFormat(l,{maximumFractionDigits:Math.abs(a)<10?2:1}).format(a);function De({data:a}){let l=ce(pe),b=re(),n=a,r=n.series??[],d=n.phases??[],s=n.events,z=new Map((n.kinds??[]).map(e=>[e.id,e])),y=oe(n),g=e=>ae(n.axis,e,b),J=e=>{let o=e?z.get(e):void 0;return o?.color??q(o?.tone)},L=se(n),[ue,H]=(0,h.useState)(L),[D,j]=(0,h.useState)(null);(0,h.useEffect)(()=>{H(L),j(null)},[L,y]);let u=Math.min(ue,y-1),m=D!==null&&s[D]?.at===u?D:ne(s,u),T=le(d,u),A=e=>{j(null),H(Math.max(0,Math.min(y-1,e)))},$=e=>{j(e),H(s[e].at)},V=m>0?m-1:null,R=m<s.length-1?m+1:null,[me,X]=Me(),P=X<520,v=de(r.filter(e=>e.axis!=="right")),w=de(r.filter(e=>e.axis==="right")),c={l:v?P?34:42:14,r:w?P?34:42:14,t:d.length?24:12,b:26},x=Math.max(240,X),S=r.length?P?190:240:96,B=x-c.l-c.r,N=S-c.b,k=e=>c.l+e/(y-1)*B,M=e=>o=>N-(o-e.lo)/(e.hi-e.lo)*(N-c.t),Z=e=>e.axis==="right"?w:v,_=r.map(e=>{let o=M(Z(e)),i=o(Math.max(Z(e).lo,0)),p=[[]];e.values.forEach((f,E)=>{f===null?p.push([]):p[p.length-1].push([k(E),o(f)])});let C=p.filter(f=>f.length>0),ge=C.map(f=>f.map(([E,I],ye)=>`${ye?"L":"M"}${E.toFixed(1)},${I.toFixed(1)}`).join("")).join(""),ve=e.area?C.map(f=>`M${f[0][0].toFixed(1)},${i.toFixed(1)}`+f.map(([E,I])=>`L${E.toFixed(1)},${I.toFixed(1)}`).join("")+`L${f[f.length-1][0].toFixed(1)},${i.toFixed(1)}Z`).join(""):"";return{item:e,line:ge,area:ve,y:o}}),ke=$e(y,Math.max(2,Math.floor(B/(P?58:72))),n.axis.type),Q=[];for(let e=0;e<y;e+=ke)Q.push(e);let Y=e=>{let o=e.currentTarget.getBoundingClientRect(),i=(e.clientX-o.left-c.l*o.width/x)/(B*o.width/x);A(Math.round(i*(y-1)))},W=(0,h.useRef)(null);(0,h.useEffect)(()=>{let e=W.current,o=e?.children[Math.max(m,0)];if(!e||!o||e.scrollHeight<=e.clientHeight)return;let i=o.offsetTop-e.offsetTop;if(i<e.scrollTop||i+o.offsetHeight>e.scrollTop+e.clientHeight){let p=matchMedia("(prefers-reduced-motion: reduce)").matches;e.scrollTo({top:Math.max(0,i-32),behavior:p?"auto":"smooth"})}},[m]);let fe=e=>{let o={ArrowDown:m+1,ArrowUp:m-1,Home:0,End:s.length-1};if(!(e.key in o))return;e.preventDefault();let i=Math.max(0,Math.min(s.length-1,o[e.key]));$(i),W.current?.querySelectorAll("button")[i]?.focus()},O=n.axis.label??l("position"),he=r.length?l("chart",{series:r.map(e=>e.label).join(" / "),axis:O,count:s.length}):l("chartNoSeries",{axis:O,count:s.length}),xe=m>=0?s[m]:void 0;return(0,t.jsxs)("section",{className:"sb-block et-block","aria-label":be(n.title,l("title")),children:[(n.title||n.description)&&(0,t.jsxs)("div",{className:"et-head",children:[n.title&&(0,t.jsx)("h3",{className:"et-title",children:n.title}),n.description&&(0,t.jsx)("p",{className:"et-sub",children:n.description})]}),n.summary&&n.summary.length>0&&(0,t.jsx)("dl",{className:"et-summary","aria-label":l("summary"),children:n.summary.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:e.label}),(0,t.jsx)("dd",{style:e.tone?{color:q(e.tone)}:void 0,children:e.value})]},e.label))}),(0,t.jsxs)("div",{className:`et-body${s.length?"":" is-single"}`,children:[(0,t.jsxs)("div",{className:"et-main",children:[(0,t.jsxs)("div",{className:"et-readout","aria-live":"polite",children:[(0,t.jsxs)("span",{className:"et-now",children:[(0,t.jsx)("small",{children:O}),(0,t.jsx)("b",{children:g(u)})]}),T>=0&&(0,t.jsx)("span",{className:"et-phase-pill",style:{background:K(d[T].tone)},children:d[T].label}),r.map((e,o)=>{let i=e.values[u];return(0,t.jsxs)("span",{className:"et-value",children:[(0,t.jsx)("i",{style:{background:F(e,o)}}),e.label," ",(0,t.jsx)("b",{children:i===null?l("noValue"):`${G(i,b)}${e.unit??""}`})]},e.id)})]}),(0,t.jsx)("div",{className:"et-chart",ref:me,children:(0,t.jsxs)("svg",{width:x,height:S,viewBox:`0 0 ${x} ${S}`,role:"img","aria-label":he,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),Y(e)},onPointerMove:e=>{e.buttons&1&&Y(e)},children:[d.map((e,o)=>(0,t.jsx)("rect",{x:k(e.from),y:c.t-20,width:k(e.to)-k(e.from),height:N-c.t+20,fill:K(e.tone),opacity:o===T?1:.55},`band-${e.from}`)),d.map(e=>{let o=k(e.to)-k(e.from)-8,i=[...e.label].reduce((p,C)=>p+(C.charCodeAt(0)>11904?11:6.2),0);return o>=i?(0,t.jsx)("text",{x:k(e.from)+4,y:c.t-7,className:"et-phase-label",children:e.label},`phase-${e.from}`):null}),v?.ticks.map(e=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:c.l,x2:x-c.r,y1:M(v)(e),y2:M(v)(e),className:"et-grid"}),(0,t.jsx)("text",{x:c.l-6,y:M(v)(e),className:"et-tick",textAnchor:"end",dominantBaseline:"middle",children:G(e,b)})]},`l${e}`)),w?.ticks.map(e=>(0,t.jsxs)("g",{children:[!v&&(0,t.jsx)("line",{x1:c.l,x2:x-c.r,y1:M(w)(e),y2:M(w)(e),className:"et-grid"}),(0,t.jsx)("text",{x:x-c.r+6,y:M(w)(e),className:"et-tick",dominantBaseline:"middle",children:G(e,b)})]},`r${e}`)),v?.unit&&(0,t.jsx)("text",{x:c.l-6,y:c.t-7,className:"et-tick",textAnchor:"end",children:v.unit}),w?.unit&&(0,t.jsx)("text",{x:x-c.r+6,y:c.t-7,className:"et-tick",children:w.unit}),(0,t.jsx)("line",{x1:c.l,x2:x-c.r,y1:N,y2:N,className:"et-baseline"}),Q.map(e=>(0,t.jsx)("text",{x:k(e),y:S-8,className:"et-tick",textAnchor:e===0&&c.l<30?"start":"middle",children:g(e)},`x${e}`)),_.map(({item:e,line:o,area:i},p)=>(0,t.jsxs)("g",{style:{color:F(e,p)},children:[i&&(0,t.jsx)("path",{d:i,className:"et-area"}),(0,t.jsx)("path",{d:o,className:`et-line${e.dashed?" is-dashed":""}`})]},e.id)),(0,t.jsx)("line",{x1:k(u),x2:k(u),y1:d.length?c.t-20:c.t,y2:N,className:"et-cursor"}),_.map(({item:e,y:o},i)=>{let p=e.values[u];return p===null?null:(0,t.jsx)("circle",{cx:k(u),cy:o(p),r:4,className:"et-cursor-dot",style:{fill:F(e,i)}},`c-${e.id}`)}),s.map((e,o)=>(0,t.jsx)("circle",{cx:k(e.at),cy:N,r:o===m?6:4,className:`et-marker${e.at>u?" is-future":""}`,style:{fill:J(e.kind)},onPointerDown:i=>{i.stopPropagation(),$(o)},children:(0,t.jsx)("title",{children:`${g(e.at)} ${e.title}`})},`e${o}`))]})}),(0,t.jsxs)("div",{className:"et-controls",children:[(0,t.jsx)("button",{type:"button",className:"et-step","aria-label":l("previous"),title:l("previous"),disabled:V===null,onClick:()=>V!==null&&$(V),children:"\u2039"}),(0,t.jsx)("input",{type:"range",min:0,max:y-1,step:1,value:u,"aria-label":l("scrub"),"aria-valuetext":l("scrubValue",{point:g(u),event:xe?.title??l("noEvent")}),onChange:e=>A(Number(e.target.value))}),(0,t.jsx)("button",{type:"button",className:"et-step","aria-label":l("next"),title:l("next"),disabled:R===null,onClick:()=>R!==null&&$(R),children:"\u203A"})]}),(r.length>0||d.length>0)&&(0,t.jsxs)("div",{className:"et-legend",children:[r.map((e,o)=>(0,t.jsxs)("span",{children:[(0,t.jsx)("i",{className:e.dashed?"is-dashed":void 0,style:{color:F(e,o)}}),e.unit?l("seriesWithUnit",{label:e.label,unit:e.unit}):e.label]},e.id)),d.length>0&&(0,t.jsx)("span",{className:"et-phases",role:"group","aria-label":l("phases"),children:d.map((e,o)=>(0,t.jsxs)("button",{type:"button",className:"et-phase-chip",style:{background:K(e.tone)},"aria-pressed":o===T,"aria-label":l("jumpToPhase",{label:e.label,from:g(e.from),to:g(e.to)}),onClick:()=>A(e.from),children:[e.label,(0,t.jsxs)("small",{children:[g(e.from),"\u2013",g(e.to)]})]},`chip-${e.from}`))})]}),n.note&&(0,t.jsx)("p",{className:"et-note",children:n.note})]}),s.length>0&&(0,t.jsx)("ol",{className:"et-events",ref:W,"aria-label":l("events",{count:s.length}),onKeyDown:fe,children:s.map((e,o)=>{let i=e.kind?z.get(e.kind):void 0,p=o===m;return(0,t.jsx)("li",{className:`${p?"is-open":""}${e.at>u?" is-future":""}`,style:{"--kind":J(e.kind)},children:(0,t.jsxs)("div",{className:"et-card",children:[(0,t.jsxs)("button",{type:"button","aria-current":p?"step":void 0,"aria-expanded":e.detail?p:void 0,tabIndex:p||m===-1&&o===0?0:-1,onClick:()=>$(o),children:[(0,t.jsx)("time",{children:g(e.at)}),i&&(0,t.jsx)("span",{className:"et-kind",children:i.label}),e.at>u&&(0,t.jsx)("span",{className:"et-sr",children:l("future")}),(0,t.jsx)("strong",{children:e.title})]}),e.detail&&(0,t.jsx)("p",{className:"et-detail",children:e.detail})]})},`${e.at}-${o}`)})})]})]})}export{De as EventTimelineBlock};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-24VJITFC.js";import{e as rt}from"./chunk-KF47DKNH.js";import{d as lt}from"./chunk-X2BFI7UA.js";import{c as ut,hb as at,kb as Q}from"./chunk-Z2EQGXZF.js";import{c as J,f as it}from"./chunk-DUIGVKKG.js";var $=J(ut(),1);var t=J(at(),1),O={kept:"tracker.status.kept",discarded:"tracker.status.discarded",failed:"tracker.status.failed",running:"tracker.status.running",stopped:"tracker.status.stopped"},dt=["all","kept","running","discarded","failed","stopped"],X=["#2f6b4f","#3b74b8","#b0473f","#a86b34","#7061b0","#8a918c"],f=i=>Date.parse(i),z=i=>String(i).padStart(2,"0"),j=i=>{let r=new Date(i);return`${z(r.getMonth()+1)}-${z(r.getDate())} ${z(r.getHours())}:${z(r.getMinutes())}`},M=i=>i.toLocaleString(it(),{maximumFractionDigits:Math.abs(i)<10?3:1});function ot(){let i=(0,$.useRef)(null),[r,s]=(0,$.useState)(900);return(0,$.useEffect)(()=>{let h=i.current;if(!h)return;let b=new ResizeObserver(([N])=>s(N.contentRect.width));return b.observe(h),()=>b.disconnect()},[]),[i,r]}function mt({model:i,frontier:r,selected:s,onSelect:h}){let b=Q(Z),[N,x]=ot(),[u,p]=(0,$.useState)(null),H=360,o={l:44,r:16,t:18,b:52},y=28,g=H-o.t-o.b-y,w=i.metric.direction==="higher",B=i.experiments.filter(n=>n.score!==null),E=i.experiments.map(n=>f(n.start)),T=Math.min(...E),S=i.experiments.map(n=>f(n.start)+(n.minutes??0)*6e4),D=Math.max(i.updatedAt?f(i.updatedAt):0,...S,T+36e5),a=[...B.map(n=>n.score),...i.metric.baseline===void 0?[]:[i.metric.baseline]],A=(a.length?Math.max(...a)-Math.min(...a):0)*.1||Math.abs(a[0]??0)*.05||1,L=a.length?Math.min(...a)-A:0,W=a.length?Math.max(...a)+A:1,R=n=>o.l+(n-T)/(D-T)*(x-o.l-o.r),v=n=>o.t+(w?1-(n-L)/(W-L):(n-L)/(W-L))*g,C=o.t+g+y/2+6,G=new Map(i.experiments.map(n=>[n.id,n])),k=new Map((i.groups??[]).map(n=>[n.id,n])),U=new Map((i.runs??[]).map((n,m)=>[n.id,n.color??X[m%X.length]])),F=r.map(n=>G.get(n)),e="";F.forEach((n,m)=>{e+=m===0?`M${R(f(n.start))},${v(n.score)}`:`H${R(f(n.start))}V${v(n.score)}`}),F.length&&(e+=`H${R(D)}`);let l=new Set,c=-1/0;for(let n of F){let m=R(f(n.start));m-c>120&&(l.add(n.id),c=m)}let K=[],tt=(W-L)/5||1,et=Math.pow(10,Math.floor(Math.log10(tt))),Y=[1,2,5,10].map(n=>n*et).find(n=>n>=tt)??10*et;for(let n=Math.ceil(L/Y)*Y;n<=W;n+=Y)K.push(+n.toFixed(6));let nt=[],st=new Date(T);st.setHours(0,0,0,0);for(let n=st.getTime()+864e5;n<D;n+=864e5)nt.push(n);let ct=i.metric.unit??"";return(0,t.jsxs)("div",{className:"an-plot",ref:N,children:[(0,t.jsxs)("svg",{width:x,height:H,role:"img","aria-label":b("tracker.overTime",{metric:i.metric.label}),onMouseLeave:()=>p(null),children:[K.map(n=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{className:"an-grid-line",x1:o.l,x2:x-o.r,y1:v(n),y2:v(n)}),(0,t.jsx)("text",{x:o.l-8,y:v(n)+4,textAnchor:"end",children:M(n)})]},n)),nt.map(n=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:R(n),x2:R(n),y1:o.t,y2:o.t+g+y,stroke:"var(--an-line)"}),(0,t.jsx)("text",{x:R(n)+4,y:H-18,children:j(n).slice(0,5)})]},n)),(0,t.jsx)("rect",{className:"an-lane",x:o.l,y:o.t+g+6,width:Math.max(0,x-o.l-o.r),height:y,rx:6}),(0,t.jsx)("text",{x:o.l+8,y:C+4,children:b("tracker.noScore")}),i.metric.baseline!==void 0&&(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{className:"an-baseline",x1:o.l,x2:x-o.r,y1:v(i.metric.baseline),y2:v(i.metric.baseline)}),(0,t.jsx)("text",{className:"an-baseline-label",x:x-o.r-4,y:v(i.metric.baseline)-5,textAnchor:"end",children:b("tracker.baseline",{value:i.metric.baseline})})]}),e&&(0,t.jsx)("path",{className:"an-frontier",d:e}),i.experiments.map(n=>{let m=R(f(n.start)),_={onMouseEnter:()=>p(n),onClick:()=>h(n.id),className:"an-point"};if(n.score===null)return n.status==="failed"?(0,t.jsxs)("g",{..._,children:[(0,t.jsx)("path",{d:`M${m-5},${C-5}L${m+5},${C+5}M${m+5},${C-5}L${m-5},${C+5}`,stroke:"var(--an-bad)",strokeWidth:2.2}),(0,t.jsx)("circle",{cx:m,cy:C,r:9,fill:"transparent"})]},n.id):(0,t.jsxs)("g",{..._,children:[(0,t.jsx)("circle",{className:n.status==="running"?"an-ring":void 0,cx:m,cy:C,r:6,fill:"none",stroke:"var(--an-info)",strokeWidth:2}),(0,t.jsx)("circle",{cx:m,cy:C,r:3,fill:"var(--an-info)"})]},n.id);let I=v(n.score),V=k.get(n.group??"")?.shape==="diamond",q=U.get(n.id)??(n.status==="kept"?"var(--an-good)":n.status==="stopped"?"var(--an-warn)":"var(--an-idle)");return(0,t.jsxs)("g",{..._,children:[s===n.id&&(0,t.jsx)("circle",{cx:m,cy:I,r:13,fill:"none",stroke:"var(--an-text)",strokeWidth:1.5,strokeDasharray:"3 3"}),V?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("rect",{x:m-7,y:I-7,width:14,height:14,rx:3,transform:`rotate(45 ${m} ${I})`,fill:"var(--an-paper)",stroke:q,strokeWidth:3}),n.status==="running"&&(0,t.jsx)("circle",{className:"an-ring",cx:m,cy:I,r:11,fill:"none",stroke:q,strokeWidth:1.5})]}):n.status==="kept"?(0,t.jsx)("circle",{className:"an-point-kept",cx:m,cy:I,r:5.5}):(0,t.jsx)("circle",{className:"an-point-other",cx:m,cy:I,r:4}),(l.has(n.id)||V)&&(0,t.jsx)("text",{className:`an-point-label${l.has(n.id)?" is-frontier":""}`,x:m+10,y:I-8,style:V?{fill:q}:void 0,children:V?`${n.id} \xB7 ${M(n.score)}`:n.name.length>8?`${n.name.slice(0,8)}\u2026`:n.name})]},n.id)}),(0,t.jsx)("text",{x:o.l,y:H-2,children:b("tracker.startTime")})]}),u&&(0,t.jsxs)("div",{className:"an-tip",style:{left:Math.min(R(f(u.start))+14,x-230),top:u.score===null?C-120:Math.max(0,v(u.score)-20)},children:[(0,t.jsxs)("b",{children:[u.id," \xB7 ",u.name]}),(0,t.jsxs)("span",{children:[j(f(u.start)),u.minutes!==void 0&&` \xB7 ${b("tracker.minutes",{count:u.minutes})}`,u.resources!==void 0&&` \xB7 ${u.resources} ${i.resource?.unit??""}`]}),b("tracker.metricValue",{metric:i.metric.label,value:u.score===null?"\u2014":`${M(u.score)}${ct}`})," ","\xB7 ",b(O[u.status]),u.note&&(0,t.jsx)("span",{children:u.note})]})]})}function pt({chart:i,runs:r,colors:s,hoverStep:h,onHover:b}){let[N,x]=ot(),u=140,p={l:40,r:10,t:8,b:20},H=r.filter(a=>a.series[i.key]?.length),o=H.flatMap(a=>a.series[i.key]),y=Math.max(1,...H.flatMap(a=>a.steps));if(!o.length)return null;let g=Math.min(...o),w=Math.max(...o),B=(w-g)*.08||1;g-=B,w+=B;let E=a=>p.l+a/y*(x-p.l-p.r),T=a=>p.t+(1-(a-g)/(w-g))*(u-p.t-p.b),S=a=>Math.abs(w)<5?a.toFixed(2):M(Math.round(a)),D=a=>{if(h===null)return;let d=a.steps.findIndex(A=>A>=h);return d<0?void 0:{step:a.steps[d],value:a.series[i.key][d]}};return(0,t.jsxs)("div",{className:"an-panel an-mini",ref:N,children:[(0,t.jsxs)("p",{className:"an-panel-title",children:[i.label,i.unit&&(0,t.jsxs)("span",{className:"an-sub",children:[" \xB7 ",i.unit]})]}),(0,t.jsxs)("svg",{width:x,height:u,role:"img","aria-label":i.label,onMouseMove:a=>{let d=a.currentTarget.getBoundingClientRect();b(Math.max(0,Math.min(y,(a.clientX-d.left-p.l)/(x-p.l-p.r)*y)))},onMouseLeave:()=>b(null),children:[[g+(w-g)*.1,(g+w)/2,w-(w-g)*.1].map(a=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{className:"an-grid-line",x1:p.l,x2:x-p.r,y1:T(a),y2:T(a)}),(0,t.jsx)("text",{x:p.l-6,y:T(a)+3,textAnchor:"end",children:S(a)})]},a)),[0,y/2,y].map((a,d)=>(0,t.jsx)("text",{x:E(a),y:u-5,textAnchor:d===0?"start":d===2?"end":"middle",children:M(a)},a)),H.map(a=>(0,t.jsx)("path",{d:a.series[i.key].map((d,A)=>`${A?"L":"M"}${E(a.steps[A])},${T(d)}`).join(""),fill:"none",stroke:s.get(a.id),strokeWidth:2,strokeLinejoin:"round"},a.id)),h!==null&&(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:E(h),x2:E(h),y1:p.t,y2:u-p.b,stroke:"var(--an-text)",strokeOpacity:.35}),H.map(a=>{let d=D(a);return d?(0,t.jsx)("circle",{cx:E(d.step),cy:T(d.value),r:3.5,fill:s.get(a.id),stroke:"var(--an-paper)",strokeWidth:1.5},a.id):null})]})]}),(0,t.jsx)("div",{className:"an-mini-values",children:h!==null&&H.map(a=>{let d=D(a);return(0,t.jsxs)("span",{children:[(0,t.jsx)("b",{style:{color:s.get(a.id)},children:a.id})," ",d?S(d.value):"\u2014"]},a.id)})})]})}function P({label:i,value:r,unit:s,detail:h,wide:b,meter:N}){return(0,t.jsxs)("div",{className:`an-stat${b?" is-wide":""}`,children:[(0,t.jsx)("small",{children:i}),(0,t.jsxs)("div",{className:"an-stat-value",children:[r,s&&(0,t.jsx)("span",{className:"an-stat-unit",children:s})]}),h&&(0,t.jsx)("p",{children:h}),N!==void 0&&(0,t.jsx)("div",{className:"an-meter",children:(0,t.jsx)("i",{style:{width:`${Math.min(100,N*100)}%`}})})]})}function yt({data:i}){let r=Q(Z),s=i,[h,b]=(0,$.useState)("all"),[N,x]=(0,$.useState)(null),[u,p]=(0,$.useState)(new Set),[H,o]=(0,$.useState)(null),y=(0,$.useMemo)(()=>rt(s),[s]),g=s.runs??[],w=s.charts??[],B=new Map(g.map((e,l)=>[e.id,e.color??X[l%X.length]])),E=s.metric.direction==="higher",T=(e,l)=>E?e>l:e<l,S={all:s.experiments.length};for(let e of s.experiments)S[e.status]=(S[e.status]??0)+1;let D=s.experiments.filter(e=>h==="all"||e.status===h).sort((e,l)=>f(l.start)-f(e.start)),a=s.experiments.filter(e=>e.score!==null&&e.status!=="failed"),d=s.groups?.length?s.groups:[{id:"",label:r("tracker.best")}],A=d.map(e=>{let l=a.filter(c=>!s.groups?.length||c.group===e.id);return{group:e,best:l.reduce((c,K)=>!c||T(K.score,c.score)?K:c,null)}}),L=y.length?s.experiments.find(e=>e.id===y[y.length-1]):void 0,W=L&&s.metric.baseline!==void 0?(L.score-s.metric.baseline)*(E?1:-1):0,R=s.experiments.reduce((e,l)=>e+(l.minutes??0)/60*(l.resources??0),0),v=s.metric.unit??"",C=(0,$.useMemo)(()=>{let e=new Map;for(let l of s.experiments){if(!l.category)continue;let c=e.get(l.category)??{total:0,kept:0};c.total+=1,l.status==="kept"&&(c.kept+=1),e.set(l.category,c)}return[...e.entries()].sort((l,c)=>c[1].total-l[1].total)},[s.experiments]),G=Math.max(1,...C.map(([,e])=>e.total)),k=s.experiments.find(e=>e.id===N),U=g.filter(e=>!u.has(e.id)),F=e=>p(l=>{let c=new Set(l);return c.has(e)?c.delete(e):c.add(e),c});return(0,t.jsx)("section",{className:"sb-block an-block","aria-label":lt(s.title,r("tracker.title")),children:(0,t.jsxs)("div",{className:"an-tracker",children:[(0,t.jsxs)("div",{className:"an-head",children:[s.title&&(0,t.jsx)("h3",{className:"an-title",children:s.title}),s.subtitle&&(0,t.jsx)("p",{className:"an-sub",children:s.subtitle}),s.updatedAt&&(0,t.jsx)("p",{className:"an-sub an-tools",children:r("tracker.updatedAt",{time:j(f(s.updatedAt))})})]}),(0,t.jsxs)("div",{className:"an-tracker-grid",children:[(0,t.jsxs)("div",{className:"an-panel an-runs",children:[(0,t.jsxs)("div",{className:"an-runs-head",children:[(0,t.jsx)("p",{className:"an-panel-title",children:r("tracker.runs",{count:s.experiments.length})}),(0,t.jsx)("div",{className:"an-tools",style:{marginLeft:0},role:"group","aria-label":r("tracker.filterByStatus"),children:dt.filter(e=>e==="all"||S[e]).map(e=>(0,t.jsxs)("button",{type:"button",className:"an-chip","aria-pressed":h===e,onClick:()=>b(e),children:[r(e==="all"?"tracker.all":O[e])," ",S[e]??0]},e))})]}),(0,t.jsx)("div",{className:"an-runs-list",children:D.map(e=>{let l=g.find(c=>c.id===e.id);return(0,t.jsxs)("div",{role:"button",tabIndex:0,className:`an-row an-ex-${e.status}${N===e.id?" is-selected":""}`,onClick:()=>x(N===e.id?null:e.id),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),x(N===e.id?null:e.id))},children:[l?(0,t.jsx)("input",{type:"checkbox","aria-label":r("tracker.showRun",{id:l.id}),checked:!u.has(l.id),onClick:c=>c.stopPropagation(),onChange:()=>F(l.id),style:{margin:0,accentColor:B.get(l.id)}}):(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:4,background:"var(--tone)",justifySelf:"center"}}),(0,t.jsx)("b",{style:l?{color:B.get(l.id)}:void 0,children:e.id}),(0,t.jsxs)("span",{className:"an-row-name",children:[e.name,(0,t.jsxs)("small",{children:[j(f(e.start))," \xB7"," ",(0,t.jsx)("span",{className:"an-status",children:r(O[e.status])})]})]}),(0,t.jsx)("span",{className:"an-score",children:e.score===null?"\u2014":M(e.score)})]},e.id)})})]}),(0,t.jsxs)("div",{className:"an-main",children:[(0,t.jsxs)("div",{className:"an-panel",children:[(0,t.jsxs)("div",{className:"an-plot-legend",children:[(0,t.jsxs)("b",{children:[r("tracker.allExperiments",{metric:s.metric.label}),v?` (${v})`:""," \xB7"," ",r(E?"tracker.higherIsBetter":"tracker.lowerIsBetter")]}),y.length>0&&(0,t.jsx)("span",{children:r("tracker.frontier")}),(0,t.jsx)("span",{children:r("tracker.legendKept")}),(0,t.jsx)("span",{children:r("tracker.legendOther")}),s.groups?.some(e=>e.shape==="diamond")&&(0,t.jsxs)("span",{children:["\u25C7"," ",s.groups.filter(e=>e.shape==="diamond").map(e=>e.label).join(r("tracker.listSeparator"))]})]}),(0,t.jsx)(mt,{model:s,frontier:y,selected:N,onSelect:e=>x(N===e?null:e)})]}),w.length>0&&g.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"an-small-multiples",children:w.map(e=>(0,t.jsx)(pt,{chart:e,runs:U,colors:B,hoverStep:H,onHover:o},e.key))}),(0,t.jsxs)("div",{className:"an-legend",children:[g.map(e=>(0,t.jsxs)("span",{style:{opacity:u.has(e.id)?.35:1},children:[(0,t.jsx)("b",{style:{color:B.get(e.id)},children:"\u2501"})," ",e.id," \xB7"," ",e.name]},e.id)),(0,t.jsx)("span",{children:r("tracker.runsHint")})]})]})]}),(0,t.jsxs)("div",{className:"an-stats",children:[(0,t.jsxs)("div",{className:"an-stat-grid",children:[(0,t.jsx)(P,{label:r("tracker.total"),value:String(s.experiments.length),detail:d.length>1?d.map(e=>`${e.label} ${s.experiments.filter(l=>l.group===e.id).length}`).join(" \xB7 "):r("tracker.runningCount",{count:S.running??0})}),A.map(({group:e,best:l})=>l?(0,t.jsx)(P,{label:d.length>1?r("tracker.groupBest",{group:e.label}):r("tracker.currentBest"),value:M(l.score),unit:v,detail:`${l.id} \xB7 ${l.name}`},e.id):null),s.metric.baseline!==void 0&&L&&(0,t.jsx)(P,{label:r("tracker.gain"),value:`${W>=0?"+":"\u2212"}${M(Math.abs(W))}`,unit:v==="%"?"pt":v,detail:r("tracker.gainDetail",{best:M(L.score),baseline:s.metric.baseline})}),(0,t.jsx)(P,{label:r("tracker.keepRate"),value:String(Math.round((S.kept??0)/s.experiments.length*100)),unit:"%",detail:r("tracker.keepRateDetail",{kept:S.kept??0,running:S.running??0})}),s.resource&&(0,t.jsx)(P,{label:r("tracker.resourceHours",{unit:s.resource.unit}),value:M(Math.round(R)),detail:s.resource.budget?r("tracker.budget",{value:M(s.resource.budget)}):void 0,meter:s.resource.budget?R/s.resource.budget:void 0}),s.resource?.costPerHour!==void 0&&(0,t.jsx)(P,{wide:!0,label:r("tracker.cost"),value:`${s.resource.currency??"\xA5"}${M(Math.round(R*s.resource.costPerHour))}`,detail:r("tracker.costRate",{rate:`${s.resource.currency??"\xA5"}${s.resource.costPerHour}`,unit:s.resource.unit})})]}),C.length>0&&(0,t.jsxs)("div",{className:"an-panel",children:[(0,t.jsx)("p",{className:"an-panel-title",children:r("tracker.byCategory")}),C.map(([e,l])=>(0,t.jsxs)("div",{style:{fontSize:11.5,marginBottom:5},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:e}),(0,t.jsxs)("span",{className:"an-sub",children:[l.kept," / ",l.total]})]}),(0,t.jsxs)("div",{className:"an-meter",children:[(0,t.jsx)("i",{className:"is-total",style:{width:`${l.total/G*100}%`}}),(0,t.jsx)("i",{style:{width:`${l.kept/G*100}%`}})]})]},e))]}),k&&(0,t.jsxs)("div",{className:"an-detail-card","aria-live":"polite",children:[(0,t.jsxs)("b",{children:[k.id," \xB7 ",k.name]}),(0,t.jsx)("span",{children:[k.category,s.groups?.find(e=>e.id===k.group)?.label].filter(Boolean).join(" \xB7 ")}),(0,t.jsxs)("span",{children:[j(f(k.start)),k.minutes!==void 0&&` \xB7 ${r("tracker.minutes",{count:k.minutes})}`,k.resources!==void 0&&` \xB7 ${k.resources} ${s.resource?.unit??""}`]}),r("tracker.metricValue",{metric:s.metric.label,value:k.score===null?"\u2014":M(k.score)})," ","\xB7 ",r(O[k.status]),k.note&&(0,t.jsx)("span",{children:k.note})]})]})]}),(0,t.jsxs)("details",{className:"an-static",children:[(0,t.jsx)("summary",{children:r("tracker.readTable",{count:s.experiments.length})}),(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"ID"}),(0,t.jsx)("th",{children:r("tracker.column.name")}),(0,t.jsx)("th",{children:r("tracker.column.start")}),(0,t.jsx)("th",{children:r("tracker.column.status")}),(0,t.jsx)("th",{children:s.metric.label}),(0,t.jsx)("th",{children:r("tracker.column.note")})]})}),(0,t.jsx)("tbody",{children:[...s.experiments].sort((e,l)=>f(e.start)-f(l.start)).map(e=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:e.id}),(0,t.jsx)("td",{children:e.name}),(0,t.jsx)("td",{children:j(f(e.start))}),(0,t.jsx)("td",{children:r(O[e.status])}),(0,t.jsx)("td",{children:e.score===null?"\u2014":M(e.score)}),(0,t.jsx)("td",{children:e.note??""})]},e.id))})]})]})]})})}export{yt as ExperimentTrackerBlock};
1
+ import{a as Z}from"./chunk-2HAL7KBM.js";import{e as rt}from"./chunk-KF47DKNH.js";import{d as lt}from"./chunk-VQIPL7NG.js";import{c as ut,jb as at,mb as Q}from"./chunk-PVMEUQFU.js";import{c as J,f as it}from"./chunk-DUIGVKKG.js";var $=J(ut(),1);var t=J(at(),1),O={kept:"tracker.status.kept",discarded:"tracker.status.discarded",failed:"tracker.status.failed",running:"tracker.status.running",stopped:"tracker.status.stopped"},dt=["all","kept","running","discarded","failed","stopped"],X=["#2f6b4f","#3b74b8","#b0473f","#a86b34","#7061b0","#8a918c"],f=i=>Date.parse(i),z=i=>String(i).padStart(2,"0"),j=i=>{let r=new Date(i);return`${z(r.getMonth()+1)}-${z(r.getDate())} ${z(r.getHours())}:${z(r.getMinutes())}`},M=i=>i.toLocaleString(it(),{maximumFractionDigits:Math.abs(i)<10?3:1});function ot(){let i=(0,$.useRef)(null),[r,s]=(0,$.useState)(900);return(0,$.useEffect)(()=>{let h=i.current;if(!h)return;let b=new ResizeObserver(([N])=>s(N.contentRect.width));return b.observe(h),()=>b.disconnect()},[]),[i,r]}function mt({model:i,frontier:r,selected:s,onSelect:h}){let b=Q(Z),[N,x]=ot(),[u,p]=(0,$.useState)(null),H=360,o={l:44,r:16,t:18,b:52},y=28,g=H-o.t-o.b-y,w=i.metric.direction==="higher",B=i.experiments.filter(n=>n.score!==null),E=i.experiments.map(n=>f(n.start)),T=Math.min(...E),S=i.experiments.map(n=>f(n.start)+(n.minutes??0)*6e4),D=Math.max(i.updatedAt?f(i.updatedAt):0,...S,T+36e5),a=[...B.map(n=>n.score),...i.metric.baseline===void 0?[]:[i.metric.baseline]],A=(a.length?Math.max(...a)-Math.min(...a):0)*.1||Math.abs(a[0]??0)*.05||1,L=a.length?Math.min(...a)-A:0,W=a.length?Math.max(...a)+A:1,R=n=>o.l+(n-T)/(D-T)*(x-o.l-o.r),v=n=>o.t+(w?1-(n-L)/(W-L):(n-L)/(W-L))*g,C=o.t+g+y/2+6,G=new Map(i.experiments.map(n=>[n.id,n])),k=new Map((i.groups??[]).map(n=>[n.id,n])),U=new Map((i.runs??[]).map((n,m)=>[n.id,n.color??X[m%X.length]])),F=r.map(n=>G.get(n)),e="";F.forEach((n,m)=>{e+=m===0?`M${R(f(n.start))},${v(n.score)}`:`H${R(f(n.start))}V${v(n.score)}`}),F.length&&(e+=`H${R(D)}`);let l=new Set,c=-1/0;for(let n of F){let m=R(f(n.start));m-c>120&&(l.add(n.id),c=m)}let K=[],tt=(W-L)/5||1,et=Math.pow(10,Math.floor(Math.log10(tt))),Y=[1,2,5,10].map(n=>n*et).find(n=>n>=tt)??10*et;for(let n=Math.ceil(L/Y)*Y;n<=W;n+=Y)K.push(+n.toFixed(6));let nt=[],st=new Date(T);st.setHours(0,0,0,0);for(let n=st.getTime()+864e5;n<D;n+=864e5)nt.push(n);let ct=i.metric.unit??"";return(0,t.jsxs)("div",{className:"an-plot",ref:N,children:[(0,t.jsxs)("svg",{width:x,height:H,role:"img","aria-label":b("tracker.overTime",{metric:i.metric.label}),onMouseLeave:()=>p(null),children:[K.map(n=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{className:"an-grid-line",x1:o.l,x2:x-o.r,y1:v(n),y2:v(n)}),(0,t.jsx)("text",{x:o.l-8,y:v(n)+4,textAnchor:"end",children:M(n)})]},n)),nt.map(n=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:R(n),x2:R(n),y1:o.t,y2:o.t+g+y,stroke:"var(--an-line)"}),(0,t.jsx)("text",{x:R(n)+4,y:H-18,children:j(n).slice(0,5)})]},n)),(0,t.jsx)("rect",{className:"an-lane",x:o.l,y:o.t+g+6,width:Math.max(0,x-o.l-o.r),height:y,rx:6}),(0,t.jsx)("text",{x:o.l+8,y:C+4,children:b("tracker.noScore")}),i.metric.baseline!==void 0&&(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{className:"an-baseline",x1:o.l,x2:x-o.r,y1:v(i.metric.baseline),y2:v(i.metric.baseline)}),(0,t.jsx)("text",{className:"an-baseline-label",x:x-o.r-4,y:v(i.metric.baseline)-5,textAnchor:"end",children:b("tracker.baseline",{value:i.metric.baseline})})]}),e&&(0,t.jsx)("path",{className:"an-frontier",d:e}),i.experiments.map(n=>{let m=R(f(n.start)),_={onMouseEnter:()=>p(n),onClick:()=>h(n.id),className:"an-point"};if(n.score===null)return n.status==="failed"?(0,t.jsxs)("g",{..._,children:[(0,t.jsx)("path",{d:`M${m-5},${C-5}L${m+5},${C+5}M${m+5},${C-5}L${m-5},${C+5}`,stroke:"var(--an-bad)",strokeWidth:2.2}),(0,t.jsx)("circle",{cx:m,cy:C,r:9,fill:"transparent"})]},n.id):(0,t.jsxs)("g",{..._,children:[(0,t.jsx)("circle",{className:n.status==="running"?"an-ring":void 0,cx:m,cy:C,r:6,fill:"none",stroke:"var(--an-info)",strokeWidth:2}),(0,t.jsx)("circle",{cx:m,cy:C,r:3,fill:"var(--an-info)"})]},n.id);let I=v(n.score),V=k.get(n.group??"")?.shape==="diamond",q=U.get(n.id)??(n.status==="kept"?"var(--an-good)":n.status==="stopped"?"var(--an-warn)":"var(--an-idle)");return(0,t.jsxs)("g",{..._,children:[s===n.id&&(0,t.jsx)("circle",{cx:m,cy:I,r:13,fill:"none",stroke:"var(--an-text)",strokeWidth:1.5,strokeDasharray:"3 3"}),V?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("rect",{x:m-7,y:I-7,width:14,height:14,rx:3,transform:`rotate(45 ${m} ${I})`,fill:"var(--an-paper)",stroke:q,strokeWidth:3}),n.status==="running"&&(0,t.jsx)("circle",{className:"an-ring",cx:m,cy:I,r:11,fill:"none",stroke:q,strokeWidth:1.5})]}):n.status==="kept"?(0,t.jsx)("circle",{className:"an-point-kept",cx:m,cy:I,r:5.5}):(0,t.jsx)("circle",{className:"an-point-other",cx:m,cy:I,r:4}),(l.has(n.id)||V)&&(0,t.jsx)("text",{className:`an-point-label${l.has(n.id)?" is-frontier":""}`,x:m+10,y:I-8,style:V?{fill:q}:void 0,children:V?`${n.id} \xB7 ${M(n.score)}`:n.name.length>8?`${n.name.slice(0,8)}\u2026`:n.name})]},n.id)}),(0,t.jsx)("text",{x:o.l,y:H-2,children:b("tracker.startTime")})]}),u&&(0,t.jsxs)("div",{className:"an-tip",style:{left:Math.min(R(f(u.start))+14,x-230),top:u.score===null?C-120:Math.max(0,v(u.score)-20)},children:[(0,t.jsxs)("b",{children:[u.id," \xB7 ",u.name]}),(0,t.jsxs)("span",{children:[j(f(u.start)),u.minutes!==void 0&&` \xB7 ${b("tracker.minutes",{count:u.minutes})}`,u.resources!==void 0&&` \xB7 ${u.resources} ${i.resource?.unit??""}`]}),b("tracker.metricValue",{metric:i.metric.label,value:u.score===null?"\u2014":`${M(u.score)}${ct}`})," ","\xB7 ",b(O[u.status]),u.note&&(0,t.jsx)("span",{children:u.note})]})]})}function pt({chart:i,runs:r,colors:s,hoverStep:h,onHover:b}){let[N,x]=ot(),u=140,p={l:40,r:10,t:8,b:20},H=r.filter(a=>a.series[i.key]?.length),o=H.flatMap(a=>a.series[i.key]),y=Math.max(1,...H.flatMap(a=>a.steps));if(!o.length)return null;let g=Math.min(...o),w=Math.max(...o),B=(w-g)*.08||1;g-=B,w+=B;let E=a=>p.l+a/y*(x-p.l-p.r),T=a=>p.t+(1-(a-g)/(w-g))*(u-p.t-p.b),S=a=>Math.abs(w)<5?a.toFixed(2):M(Math.round(a)),D=a=>{if(h===null)return;let d=a.steps.findIndex(A=>A>=h);return d<0?void 0:{step:a.steps[d],value:a.series[i.key][d]}};return(0,t.jsxs)("div",{className:"an-panel an-mini",ref:N,children:[(0,t.jsxs)("p",{className:"an-panel-title",children:[i.label,i.unit&&(0,t.jsxs)("span",{className:"an-sub",children:[" \xB7 ",i.unit]})]}),(0,t.jsxs)("svg",{width:x,height:u,role:"img","aria-label":i.label,onMouseMove:a=>{let d=a.currentTarget.getBoundingClientRect();b(Math.max(0,Math.min(y,(a.clientX-d.left-p.l)/(x-p.l-p.r)*y)))},onMouseLeave:()=>b(null),children:[[g+(w-g)*.1,(g+w)/2,w-(w-g)*.1].map(a=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{className:"an-grid-line",x1:p.l,x2:x-p.r,y1:T(a),y2:T(a)}),(0,t.jsx)("text",{x:p.l-6,y:T(a)+3,textAnchor:"end",children:S(a)})]},a)),[0,y/2,y].map((a,d)=>(0,t.jsx)("text",{x:E(a),y:u-5,textAnchor:d===0?"start":d===2?"end":"middle",children:M(a)},a)),H.map(a=>(0,t.jsx)("path",{d:a.series[i.key].map((d,A)=>`${A?"L":"M"}${E(a.steps[A])},${T(d)}`).join(""),fill:"none",stroke:s.get(a.id),strokeWidth:2,strokeLinejoin:"round"},a.id)),h!==null&&(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:E(h),x2:E(h),y1:p.t,y2:u-p.b,stroke:"var(--an-text)",strokeOpacity:.35}),H.map(a=>{let d=D(a);return d?(0,t.jsx)("circle",{cx:E(d.step),cy:T(d.value),r:3.5,fill:s.get(a.id),stroke:"var(--an-paper)",strokeWidth:1.5},a.id):null})]})]}),(0,t.jsx)("div",{className:"an-mini-values",children:h!==null&&H.map(a=>{let d=D(a);return(0,t.jsxs)("span",{children:[(0,t.jsx)("b",{style:{color:s.get(a.id)},children:a.id})," ",d?S(d.value):"\u2014"]},a.id)})})]})}function P({label:i,value:r,unit:s,detail:h,wide:b,meter:N}){return(0,t.jsxs)("div",{className:`an-stat${b?" is-wide":""}`,children:[(0,t.jsx)("small",{children:i}),(0,t.jsxs)("div",{className:"an-stat-value",children:[r,s&&(0,t.jsx)("span",{className:"an-stat-unit",children:s})]}),h&&(0,t.jsx)("p",{children:h}),N!==void 0&&(0,t.jsx)("div",{className:"an-meter",children:(0,t.jsx)("i",{style:{width:`${Math.min(100,N*100)}%`}})})]})}function yt({data:i}){let r=Q(Z),s=i,[h,b]=(0,$.useState)("all"),[N,x]=(0,$.useState)(null),[u,p]=(0,$.useState)(new Set),[H,o]=(0,$.useState)(null),y=(0,$.useMemo)(()=>rt(s),[s]),g=s.runs??[],w=s.charts??[],B=new Map(g.map((e,l)=>[e.id,e.color??X[l%X.length]])),E=s.metric.direction==="higher",T=(e,l)=>E?e>l:e<l,S={all:s.experiments.length};for(let e of s.experiments)S[e.status]=(S[e.status]??0)+1;let D=s.experiments.filter(e=>h==="all"||e.status===h).sort((e,l)=>f(l.start)-f(e.start)),a=s.experiments.filter(e=>e.score!==null&&e.status!=="failed"),d=s.groups?.length?s.groups:[{id:"",label:r("tracker.best")}],A=d.map(e=>{let l=a.filter(c=>!s.groups?.length||c.group===e.id);return{group:e,best:l.reduce((c,K)=>!c||T(K.score,c.score)?K:c,null)}}),L=y.length?s.experiments.find(e=>e.id===y[y.length-1]):void 0,W=L&&s.metric.baseline!==void 0?(L.score-s.metric.baseline)*(E?1:-1):0,R=s.experiments.reduce((e,l)=>e+(l.minutes??0)/60*(l.resources??0),0),v=s.metric.unit??"",C=(0,$.useMemo)(()=>{let e=new Map;for(let l of s.experiments){if(!l.category)continue;let c=e.get(l.category)??{total:0,kept:0};c.total+=1,l.status==="kept"&&(c.kept+=1),e.set(l.category,c)}return[...e.entries()].sort((l,c)=>c[1].total-l[1].total)},[s.experiments]),G=Math.max(1,...C.map(([,e])=>e.total)),k=s.experiments.find(e=>e.id===N),U=g.filter(e=>!u.has(e.id)),F=e=>p(l=>{let c=new Set(l);return c.has(e)?c.delete(e):c.add(e),c});return(0,t.jsx)("section",{className:"sb-block an-block","aria-label":lt(s.title,r("tracker.title")),children:(0,t.jsxs)("div",{className:"an-tracker",children:[(0,t.jsxs)("div",{className:"an-head",children:[s.title&&(0,t.jsx)("h3",{className:"an-title",children:s.title}),s.subtitle&&(0,t.jsx)("p",{className:"an-sub",children:s.subtitle}),s.updatedAt&&(0,t.jsx)("p",{className:"an-sub an-tools",children:r("tracker.updatedAt",{time:j(f(s.updatedAt))})})]}),(0,t.jsxs)("div",{className:"an-tracker-grid",children:[(0,t.jsxs)("div",{className:"an-panel an-runs",children:[(0,t.jsxs)("div",{className:"an-runs-head",children:[(0,t.jsx)("p",{className:"an-panel-title",children:r("tracker.runs",{count:s.experiments.length})}),(0,t.jsx)("div",{className:"an-tools",style:{marginLeft:0},role:"group","aria-label":r("tracker.filterByStatus"),children:dt.filter(e=>e==="all"||S[e]).map(e=>(0,t.jsxs)("button",{type:"button",className:"an-chip","aria-pressed":h===e,onClick:()=>b(e),children:[r(e==="all"?"tracker.all":O[e])," ",S[e]??0]},e))})]}),(0,t.jsx)("div",{className:"an-runs-list",children:D.map(e=>{let l=g.find(c=>c.id===e.id);return(0,t.jsxs)("div",{role:"button",tabIndex:0,className:`an-row an-ex-${e.status}${N===e.id?" is-selected":""}`,onClick:()=>x(N===e.id?null:e.id),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),x(N===e.id?null:e.id))},children:[l?(0,t.jsx)("input",{type:"checkbox","aria-label":r("tracker.showRun",{id:l.id}),checked:!u.has(l.id),onClick:c=>c.stopPropagation(),onChange:()=>F(l.id),style:{margin:0,accentColor:B.get(l.id)}}):(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:4,background:"var(--tone)",justifySelf:"center"}}),(0,t.jsx)("b",{style:l?{color:B.get(l.id)}:void 0,children:e.id}),(0,t.jsxs)("span",{className:"an-row-name",children:[e.name,(0,t.jsxs)("small",{children:[j(f(e.start))," \xB7"," ",(0,t.jsx)("span",{className:"an-status",children:r(O[e.status])})]})]}),(0,t.jsx)("span",{className:"an-score",children:e.score===null?"\u2014":M(e.score)})]},e.id)})})]}),(0,t.jsxs)("div",{className:"an-main",children:[(0,t.jsxs)("div",{className:"an-panel",children:[(0,t.jsxs)("div",{className:"an-plot-legend",children:[(0,t.jsxs)("b",{children:[r("tracker.allExperiments",{metric:s.metric.label}),v?` (${v})`:""," \xB7"," ",r(E?"tracker.higherIsBetter":"tracker.lowerIsBetter")]}),y.length>0&&(0,t.jsx)("span",{children:r("tracker.frontier")}),(0,t.jsx)("span",{children:r("tracker.legendKept")}),(0,t.jsx)("span",{children:r("tracker.legendOther")}),s.groups?.some(e=>e.shape==="diamond")&&(0,t.jsxs)("span",{children:["\u25C7"," ",s.groups.filter(e=>e.shape==="diamond").map(e=>e.label).join(r("tracker.listSeparator"))]})]}),(0,t.jsx)(mt,{model:s,frontier:y,selected:N,onSelect:e=>x(N===e?null:e)})]}),w.length>0&&g.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"an-small-multiples",children:w.map(e=>(0,t.jsx)(pt,{chart:e,runs:U,colors:B,hoverStep:H,onHover:o},e.key))}),(0,t.jsxs)("div",{className:"an-legend",children:[g.map(e=>(0,t.jsxs)("span",{style:{opacity:u.has(e.id)?.35:1},children:[(0,t.jsx)("b",{style:{color:B.get(e.id)},children:"\u2501"})," ",e.id," \xB7"," ",e.name]},e.id)),(0,t.jsx)("span",{children:r("tracker.runsHint")})]})]})]}),(0,t.jsxs)("div",{className:"an-stats",children:[(0,t.jsxs)("div",{className:"an-stat-grid",children:[(0,t.jsx)(P,{label:r("tracker.total"),value:String(s.experiments.length),detail:d.length>1?d.map(e=>`${e.label} ${s.experiments.filter(l=>l.group===e.id).length}`).join(" \xB7 "):r("tracker.runningCount",{count:S.running??0})}),A.map(({group:e,best:l})=>l?(0,t.jsx)(P,{label:d.length>1?r("tracker.groupBest",{group:e.label}):r("tracker.currentBest"),value:M(l.score),unit:v,detail:`${l.id} \xB7 ${l.name}`},e.id):null),s.metric.baseline!==void 0&&L&&(0,t.jsx)(P,{label:r("tracker.gain"),value:`${W>=0?"+":"\u2212"}${M(Math.abs(W))}`,unit:v==="%"?"pt":v,detail:r("tracker.gainDetail",{best:M(L.score),baseline:s.metric.baseline})}),(0,t.jsx)(P,{label:r("tracker.keepRate"),value:String(Math.round((S.kept??0)/s.experiments.length*100)),unit:"%",detail:r("tracker.keepRateDetail",{kept:S.kept??0,running:S.running??0})}),s.resource&&(0,t.jsx)(P,{label:r("tracker.resourceHours",{unit:s.resource.unit}),value:M(Math.round(R)),detail:s.resource.budget?r("tracker.budget",{value:M(s.resource.budget)}):void 0,meter:s.resource.budget?R/s.resource.budget:void 0}),s.resource?.costPerHour!==void 0&&(0,t.jsx)(P,{wide:!0,label:r("tracker.cost"),value:`${s.resource.currency??"\xA5"}${M(Math.round(R*s.resource.costPerHour))}`,detail:r("tracker.costRate",{rate:`${s.resource.currency??"\xA5"}${s.resource.costPerHour}`,unit:s.resource.unit})})]}),C.length>0&&(0,t.jsxs)("div",{className:"an-panel",children:[(0,t.jsx)("p",{className:"an-panel-title",children:r("tracker.byCategory")}),C.map(([e,l])=>(0,t.jsxs)("div",{style:{fontSize:11.5,marginBottom:5},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:e}),(0,t.jsxs)("span",{className:"an-sub",children:[l.kept," / ",l.total]})]}),(0,t.jsxs)("div",{className:"an-meter",children:[(0,t.jsx)("i",{className:"is-total",style:{width:`${l.total/G*100}%`}}),(0,t.jsx)("i",{style:{width:`${l.kept/G*100}%`}})]})]},e))]}),k&&(0,t.jsxs)("div",{className:"an-detail-card","aria-live":"polite",children:[(0,t.jsxs)("b",{children:[k.id," \xB7 ",k.name]}),(0,t.jsx)("span",{children:[k.category,s.groups?.find(e=>e.id===k.group)?.label].filter(Boolean).join(" \xB7 ")}),(0,t.jsxs)("span",{children:[j(f(k.start)),k.minutes!==void 0&&` \xB7 ${r("tracker.minutes",{count:k.minutes})}`,k.resources!==void 0&&` \xB7 ${k.resources} ${s.resource?.unit??""}`]}),r("tracker.metricValue",{metric:s.metric.label,value:k.score===null?"\u2014":M(k.score)})," ","\xB7 ",r(O[k.status]),k.note&&(0,t.jsx)("span",{children:k.note})]})]})]}),(0,t.jsxs)("details",{className:"an-static",children:[(0,t.jsx)("summary",{children:r("tracker.readTable",{count:s.experiments.length})}),(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"ID"}),(0,t.jsx)("th",{children:r("tracker.column.name")}),(0,t.jsx)("th",{children:r("tracker.column.start")}),(0,t.jsx)("th",{children:r("tracker.column.status")}),(0,t.jsx)("th",{children:s.metric.label}),(0,t.jsx)("th",{children:r("tracker.column.note")})]})}),(0,t.jsx)("tbody",{children:[...s.experiments].sort((e,l)=>f(e.start)-f(l.start)).map(e=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:e.id}),(0,t.jsx)("td",{children:e.name}),(0,t.jsx)("td",{children:j(f(e.start))}),(0,t.jsx)("td",{children:r(O[e.status])}),(0,t.jsx)("td",{children:e.score===null?"\u2014":M(e.score)}),(0,t.jsx)("td",{children:e.note??""})]},e.id))})]})]})]})})}export{yt as ExperimentTrackerBlock};