showai-reader 0.10.0-reader.oi4tdyjp → 0.10.0-reader.pb4kagun

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 (62) hide show
  1. package/README.md +1 -1
  2. package/chunks/CardGrid-TRO37NZO.js +2 -0
  3. package/chunks/CommandReference-YOBZ67AR.js +3 -0
  4. package/chunks/ComparisonMatrix-P3TVMSP7.js +1 -0
  5. package/chunks/{EventTimeline-EUOZGK5I.js → EventTimeline-PL6EEZLL.js} +1 -1
  6. package/chunks/{ExperimentTracker-ULN4Z5OW.js → ExperimentTracker-QLIXOBDQ.js} +1 -1
  7. package/chunks/{ExternalDiagram-6XIHKA7E.js → ExternalDiagram-ZTY4TDJJ.js} +3 -3
  8. package/chunks/{Flowchart-CLUQTGTM.js → Flowchart-PRS65CS3.js} +1 -1
  9. package/chunks/{G2Chart-DIG5VQML.js → G2Chart-TOPADKCR.js} +2 -2
  10. package/chunks/LayerDiagram-3CLVCITA.js +2 -0
  11. package/chunks/{Mindmap-6XNXEXFE.js → Mindmap-3XJLR4JB.js} +1 -1
  12. package/chunks/RichTextEditor-6ICZMOD6.js +156 -0
  13. package/chunks/{Roadmap-J643DY2U.js → Roadmap-SPBI3665.js} +1 -1
  14. package/chunks/{Scene3D-KGHIFPQH.js → Scene3D-MUQ74HZI.js} +2 -2
  15. package/chunks/SequenceDiagram-OOQN7BWQ.js +2 -0
  16. package/chunks/StatusTree-B6NZDDIZ.js +1 -0
  17. package/chunks/StepGuide-MWZV4NYU.js +1 -0
  18. package/chunks/StructureBrowser-CVA2IQML.js +3 -0
  19. package/chunks/{Waterfall-WQQRXMRH.js → Waterfall-B2BPYBF3.js} +1 -1
  20. package/chunks/chunk-2MWQ4I4F.js +1 -0
  21. package/chunks/chunk-4AKSPULD.js +9 -0
  22. package/chunks/{chunk-LXPCGURF.js → chunk-4RYRJOIW.js} +1 -1
  23. package/chunks/chunk-5CTTY5BQ.js +2 -0
  24. package/chunks/{chunk-57OQN4T3.js → chunk-6G2M37RQ.js} +1 -1
  25. package/chunks/chunk-AAGG3TEN.js +1 -0
  26. package/chunks/{chunk-5KANJNMG.js → chunk-BR33OQJ3.js} +1 -1
  27. package/chunks/chunk-GLP5VV7P.js +1 -0
  28. package/chunks/chunk-H7ALO2Q6.js +349 -0
  29. package/chunks/{chunk-HC6FTJAR.js.LEGAL.txt → chunk-H7ALO2Q6.js.LEGAL.txt} +3 -0
  30. package/chunks/{chunk-5HKZMSJF.js → chunk-KQR52I3G.js} +8 -8
  31. package/chunks/chunk-MLBEJ7IZ.js +1 -0
  32. package/chunks/{chunk-4M3FPEBB.js → chunk-PDHAXJXJ.js} +1 -1
  33. package/chunks/{chunk-A2JDK7HA.js → chunk-QD4XRUJK.js} +1 -1
  34. package/chunks/chunk-S7HOQGTC.js +4 -0
  35. package/chunks/{chunk-MCD72KVU.js → chunk-WP3ME37P.js} +2 -2
  36. package/chunks/chunk-XXZZVMLJ.js +1 -0
  37. package/index.js +1 -1
  38. package/manifest.json +5 -5
  39. package/package.json +1 -1
  40. package/reader-PB4KAGUN.js +51 -0
  41. package/chunks/CardGrid-AJZKUXS6.js +0 -2
  42. package/chunks/CommandReference-RV7YII3H.js +0 -3
  43. package/chunks/ComparisonMatrix-ZZD2G2AA.js +0 -1
  44. package/chunks/LayerDiagram-ERF2NRNM.js +0 -2
  45. package/chunks/RichTextEditor-6VUVXVYN.js +0 -156
  46. package/chunks/SequenceDiagram-G7UAIBJJ.js +0 -2
  47. package/chunks/StatusTree-BO3E5N3J.js +0 -1
  48. package/chunks/StepGuide-QYQ74I56.js +0 -1
  49. package/chunks/StructureBrowser-IKXDOONV.js +0 -3
  50. package/chunks/chunk-C2OMFGU2.js +0 -4
  51. package/chunks/chunk-HC6FTJAR.js +0 -21
  52. package/chunks/chunk-HPTQVBGO.js +0 -329
  53. package/chunks/chunk-JZTWI7SZ.js +0 -1
  54. package/chunks/chunk-KYWOOES7.js +0 -2
  55. package/chunks/chunk-NL63BEBA.js +0 -1
  56. package/chunks/chunk-WWRZIZ7N.js +0 -1
  57. package/reader-OI4TDYJP.js +0 -51
  58. /package/chunks/{G2Chart-DIG5VQML.js.LEGAL.txt → G2Chart-TOPADKCR.js.LEGAL.txt} +0 -0
  59. /package/chunks/{Scene3D-KGHIFPQH.js.LEGAL.txt → Scene3D-MUQ74HZI.js.LEGAL.txt} +0 -0
  60. /package/chunks/{chunk-KYWOOES7.js.LEGAL.txt → chunk-5CTTY5BQ.js.LEGAL.txt} +0 -0
  61. /package/chunks/{chunk-MCD72KVU.js.LEGAL.txt → chunk-WP3ME37P.js.LEGAL.txt} +0 -0
  62. /package/{reader-OI4TDYJP.js.LEGAL.txt → reader-PB4KAGUN.js.LEGAL.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ import{a as ts}from"./chunk-XXZZVMLJ.js";import{a as G,d as U}from"./chunk-AIBH6MTQ.js";import"./chunk-MLBEJ7IZ.js";import{f as Z,h as ss}from"./chunk-2MWQ4I4F.js";import{Ab as J,a as Q,c as ls,mb as Y}from"./chunk-H7ALO2Q6.js";import{a as V}from"./chunk-J6IRWTF7.js";import{c as B}from"./chunk-DCANE7XH.js";var h=B(ls(),1);Q(`.sb-block.sq-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.sq-block li:not(svg){padding:0}.sb-block.sq-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.sq-block{--sq-text: var(--sb-text);--sq-muted: var(--sb-muted);--sq-faint: color-mix(in srgb, var(--sb-muted) 70%, transparent);--sq-line: var(--sb-line);--sq-paper: var(--sb-surface);--sq-soft: var(--sb-soft);--sq-accent: var(--sb-accent);--sq-accent-soft: var(--sb-accent-soft);--sq-wire: color-mix(in srgb, var(--sb-muted) 85%, var(--sb-text));--sq-teal: #0d8579;--sq-teal-soft: #e6f4f2;--sq-orange: #bf6528;--sq-orange-soft: #fbefe6;--sq-violet: #7348d0;--sq-violet-soft: #f2edfc;--sq-rose: #c4415a;--sq-rose-soft: #fbebee;--sq-slate: #526476;--sq-slate-soft: #edf1f4;--t: var(--sq-accent);--ts: var(--sq-accent-soft);color:var(--sq-text);font-family:inherit;font-size:14px;line-height:1.65;padding:8px 0;overflow-wrap:anywhere}:root[data-theme=dark] .sb-block.sq-block,[data-theme=dark] .sb-block.sq-block{--sq-teal: #4fc4b6;--sq-teal-soft: #163734;--sq-orange: #e79c64;--sq-orange-soft: #3b2b1e;--sq-violet: #b497ff;--sq-violet-soft: #2e2648;--sq-rose: #f0839a;--sq-rose-soft: #3e222a;--sq-slate: #a2b2c2;--sq-slate-soft: #242d35}.sb-block.sq-block *{box-sizing:border-box}.sb-block.sq-block [data-tone=accent]{--t: var(--sq-accent);--ts: var(--sq-accent-soft)}.sb-block.sq-block [data-tone=teal]{--t: var(--sq-teal);--ts: var(--sq-teal-soft)}.sb-block.sq-block [data-tone=orange]{--t: var(--sq-orange);--ts: var(--sq-orange-soft)}.sb-block.sq-block [data-tone=violet]{--t: var(--sq-violet);--ts: var(--sq-violet-soft)}.sb-block.sq-block [data-tone=rose]{--t: var(--sq-rose);--ts: var(--sq-rose-soft)}.sb-block.sq-block [data-tone=slate]{--t: var(--sq-slate);--ts: var(--sq-slate-soft)}.sb-block.sq-block .sq-top{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 12px}.sb-block.sq-block .sq-title{margin:0;font-size:16px;line-height:1.5;font-weight:650}.sb-block.sq-block .sq-description{margin:2px 0 0;color:var(--sq-muted);font-size:13px}.sb-block.sq-block .sq-hint{flex:none;font-size:12px;color:var(--sq-faint);white-space:nowrap}.sb-block.sq-block code{font-family:var(--mono, ui-monospace, Menlo, Consolas, monospace);font-size:.88em;background:var(--sq-soft);border-radius:4px;padding:1px 5px}.sb-block.sq-block .sq-svg{display:block;max-width:100%;height:auto;overflow:visible;border-radius:6px;user-select:none;-webkit-user-select:none}.sb-block.sq-block .sq-svg:focus{outline:none}.sb-block.sq-block .sq-svg:focus-visible{outline:2px solid var(--sq-accent);outline-offset:2px}.sb-block.sq-block .sq-svg text{font-family:inherit}.sb-block.sq-block .sq-life{stroke:var(--sq-line);stroke-width:1.2;stroke-dasharray:3 4}.sb-block.sq-block .sq-life[data-on]{stroke:var(--t);stroke-opacity:.45;stroke-dasharray:none}.sb-block.sq-block .sq-actor rect{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-actor[data-on] rect{fill:var(--ts);stroke:var(--t);stroke-width:1.4}.sb-block.sq-block .sq-alabel{fill:var(--sq-text);font-size:14px;font-weight:600}.sb-block.sq-block .sq-asub{fill:var(--sq-muted);font-size:12px}.sb-block.sq-block .sq-icon{font-size:15px}.sb-block.sq-block .sq-band{fill:var(--sq-accent-soft);opacity:.6}.sb-block.sq-block .sq-step{cursor:pointer;transition:opacity .2s ease}.sb-block.sq-block .sq-hit{fill:transparent}.sb-block.sq-block .sq-line{fill:none;stroke:var(--sq-wire);stroke-width:1.4;stroke-linejoin:round}.sb-block.sq-block .sq-line[data-reply]{stroke-dasharray:5 4}.sb-block.sq-block .sq-head{fill:var(--sq-wire)}.sb-block.sq-block .sq-open{fill:none;stroke:var(--sq-wire);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.sb-block.sq-block .sq-label{fill:var(--sq-text);font-size:13px;font-weight:500}.sb-block.sq-block .sq-note{fill:var(--sq-orange-soft);stroke:var(--sq-orange);stroke-opacity:.35}.sb-block.sq-block .sq-num circle{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-num text{fill:var(--sq-muted);font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums}.sb-block.sq-block .sq-step[data-state=todo]{opacity:.3}.sb-block.sq-block .sq-step[data-state=todo]:hover{opacity:.55}.sb-block.sq-block .sq-step[data-state=cur] .sq-line{stroke:var(--sq-accent);stroke-width:2}.sb-block.sq-block .sq-step[data-state=cur] .sq-head{fill:var(--sq-accent)}.sb-block.sq-block .sq-step[data-state=cur] .sq-open{stroke:var(--sq-accent);stroke-width:2}.sb-block.sq-block .sq-step[data-state=cur] .sq-label{font-weight:650}.sb-block.sq-block .sq-step[data-state=cur] .sq-num circle{fill:var(--sq-accent);stroke:var(--sq-accent)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num text{fill:var(--sq-paper)}.sb-block.sq-block .sq-step[data-state=cur] .sq-note{stroke-opacity:.8}.sb-block.sq-block .sq-actor rect,.sb-block.sq-block .sq-life{transition:fill .2s ease,stroke .2s ease}.sb-block.sq-block .sq-panel{margin-top:14px;border:1px solid var(--sq-line);border-radius:10px;background:var(--sq-soft);overflow:hidden}.sb-block.sq-block .sq-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:10px 12px}.sb-block.sq-block .sq-buttons{display:flex;flex-wrap:wrap;gap:6px}.sb-block.sq-block .sq-buttons button{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:13px;line-height:1;color:var(--sq-text);background:var(--sq-paper);border:1px solid var(--sq-line);border-radius:6px;padding:7px 11px 7px 9px;cursor:pointer;transition:border-color .15s ease}.sb-block.sq-block .sq-buttons button:hover:not(:disabled){border-color:var(--sq-muted)}.sb-block.sq-block .sq-buttons button:disabled{color:var(--sq-faint);cursor:default}.sb-block.sq-block .sq-buttons svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.sb-block.sq-block .sq-buttons svg .sq-fill{fill:currentColor;stroke:none}.sb-block.sq-block .sq-buttons .sq-play{background:var(--sq-accent);border-color:var(--sq-accent);color:var(--sq-paper)}.sb-block.sq-block .sq-buttons .sq-play:disabled{opacity:.5;color:var(--sq-paper)}.sb-block.sq-block .sq-buttons button:focus-visible,.sb-block.sq-block .sq-list button:focus-visible,.sb-block.sq-block a:focus-visible{outline:2px solid var(--sq-accent);outline-offset:2px}.sb-block.sq-block .sq-count{font-size:12px;color:var(--sq-muted);font-variant-numeric:tabular-nums;white-space:nowrap}.sb-block.sq-block .sq-progress{height:2px;background:var(--sq-line)}.sb-block.sq-block .sq-progress i{display:block;height:100%;background:var(--sq-accent);transition:width .25s ease}.sb-block.sq-block .sq-detail{padding:14px 18px 16px;background:var(--sq-paper)}.sb-block.sq-block .sq-meta,.sb-block.sq-block .sq-route{display:flex;align-items:center;flex-wrap:wrap;gap:5px 6px;font-size:12px;color:var(--sq-muted)}.sb-block.sq-block .sq-meta em,.sb-block.sq-block .sq-route em{font-style:normal;font-size:12px;color:var(--sq-faint);margin-left:2px}.sb-block.sq-block .sq-detail h4{margin:8px 0 4px;font-size:15px;line-height:1.5;font-weight:650}.sb-block.sq-block .sq-md p{margin:0 0 6px;font-size:14px;line-height:1.7}.sb-block.sq-block .sq-md p:last-child{margin-bottom:0}.sb-block.sq-block .sq-md strong{font-weight:650}.sb-block.sq-block .sq-md a{color:var(--sq-accent);text-underline-offset:3px}.sb-block.sq-block .sq-lnum{flex:none;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--sq-accent);color:var(--sq-paper);font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums}.sb-block.sq-block .sq-chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;line-height:1;padding:4px 8px;border-radius:6px;background:var(--ts);color:var(--t);font-weight:600;white-space:nowrap}.sb-block.sq-block .sq-arrow{color:var(--sq-faint);font-size:13px}.sb-block.sq-block .sq-cast{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.sb-block.sq-block .sq-panel-bar{margin:0 0 10px}.sb-block.sq-block .sq-panel-bar .sq-buttons button{padding:7px 9px}.sb-block.sq-block .sq-list{list-style:none;margin:0;padding:0;position:relative}.sb-block.sq-block .sq-list:before{content:"";position:absolute;left:21px;top:16px;bottom:16px;width:1px;background:var(--sq-line)}.sb-block.sq-block .sq-list li{position:relative;border-radius:10px;transition:opacity .2s ease}.sb-block.sq-block .sq-list li[data-state=todo]{opacity:.5}.sb-block.sq-block .sq-list li[data-state=cur]{background:var(--sq-soft);box-shadow:inset 0 0 0 1px var(--sq-line)}.sb-block.sq-block .sq-list button{display:flex;align-items:flex-start;gap:12px;width:100%;font:inherit;text-align:left;color:inherit;background:none;border:0;padding:10px;cursor:pointer;border-radius:10px}.sb-block.sq-block .sq-list .sq-lnum{position:relative;margin-top:1px;background:var(--sq-paper);color:var(--sq-muted);box-shadow:inset 0 0 0 1px var(--sq-line)}.sb-block.sq-block .sq-list li[data-state=cur] .sq-lnum{background:var(--sq-accent);color:var(--sq-paper);box-shadow:none}.sb-block.sq-block .sq-lbody{flex:1;min-width:0;display:grid;gap:5px}.sb-block.sq-block .sq-ltitle{font-size:14px;line-height:1.5;font-weight:500}.sb-block.sq-block .sq-list li[data-state=cur] .sq-ltitle{font-weight:650}.sb-block.sq-block .sq-ldetail{padding:0 14px 12px 44px}.sb-block.sq-block .sq-static{display:none}@media(prefers-reduced-motion:reduce){.sb-block.sq-block .sq-step,.sb-block.sq-block .sq-actor rect,.sb-block.sq-block .sq-life,.sb-block.sq-block .sq-progress i,.sb-block.sq-block .sq-list li,.sb-block.sq-block .sq-buttons button{transition:none}}@media print{.sb-block.sq-block .sq-hint,.sb-block.sq-block .sq-panel,.sb-block.sq-block .sq-list,.sb-block.sq-block .sq-cast{display:none}.sb-block.sq-block .sq-step[data-state]{opacity:1}.sb-block.sq-block .sq-band{display:none}.sb-block.sq-block .sq-actor[data-on] rect{fill:var(--sq-paper);stroke:var(--sq-line);stroke-width:1}.sb-block.sq-block .sq-life[data-on]{stroke:var(--sq-line);stroke-opacity:1;stroke-dasharray:3 4}.sb-block.sq-block .sq-step[data-state=cur] .sq-line,.sb-block.sq-block .sq-step[data-state=cur] .sq-open{stroke:var(--sq-wire);stroke-width:1.4}.sb-block.sq-block .sq-step[data-state=cur] .sq-head{fill:var(--sq-wire)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num circle{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num text{fill:var(--sq-muted)}.sb-block.sq-block .sq-static{display:block;margin-top:12px}.sb-block.sq-block .sq-static-title{margin:0 0 6px;font-weight:650}.sb-block.sq-block .sq-static ol{margin:0;padding-left:22px}.sb-block.sq-block .sq-static li{break-inside:avoid;margin-bottom:8px}.sb-block.sq-block .sq-static b{display:block;font-weight:600}}
2
+ `);var es=V("sequenceDiagram",{"zh-CN":{title:"\u65F6\u5E8F\u56FE",diagram:"\u65F6\u5E8F\u56FE\uFF0C\u5171 {count} \u6B65\u3002\u65B9\u5411\u952E\u5207\u6362\u6B65\u9AA4\uFF0CHome / End \u8DF3\u5230\u9996\u5C3E\u3002",controls:"\u6B65\u9AA4\u63A7\u5236",prev:"\u4E0A\u4E00\u6B65",next:"\u4E0B\u4E00\u6B65",play:"\u64AD\u653E",pause:"\u6682\u505C",restart:"\u91CD\u6765",count:"\u7B2C {current} / {total} \u6B65",hint:"\u70B9\u51FB\u7BAD\u5934\u8DF3\u5230\u8BE5\u6B65 \xB7 \u65B9\u5411\u952E\u5207\u6362",reply:"\u8FD4\u56DE",note:"\u5907\u6CE8",stepTitle:"{number}. {from} \u2192 {to}\uFF1A{label}",allSteps:"\u5168\u90E8\u6B65\u9AA4",actors:"\u53C2\u4E0E\u8005"},en:{title:"Sequence diagram",diagram:"Sequence diagram with {count} steps. Arrow keys change the step; Home and End jump to the ends.",controls:"Step controls",prev:"Previous",next:"Next",play:"Play",pause:"Pause",restart:"Restart",count:"Step {current} of {total}",hint:"Click an arrow to jump \xB7 arrow keys to step",reply:"reply",note:"note",stepTitle:"{number}. {from} \u2192 {to}: {label}",allSteps:"All steps",actors:"Participants"}});var s=B(Y(),1),ns=1600,rs=46,cs=56,os="system-ui, -apple-system, sans-serif";function F({source:e}){return(0,s.jsx)(s.Fragment,{children:U(e).map((o,l)=>(0,s.jsx)("p",{children:(0,s.jsx)(ts,{source:o})},l))})}var j;function is(e){return j===void 0&&(j=typeof document>"u"?null:document.createElement("canvas").getContext("2d")),(o,l,b=400)=>{if(j)return j.font=`${b} ${l}px ${e}`,j.measureText(o).width;let n=0;for(let m of o)n+=/[\u2e80-\uffff]/.test(m)?l:l*.58;return n}}function K(e,o,l,b,n=400){if(e(o,b,n)<=l)return o;let m=Array.from(o),N=0,S=m.length;for(;N<S;){let H=N+S+1>>1;e(`${m.slice(0,H).join("")}\u2026`,b,n)<=l?N=H:S=H-1}return`${m.slice(0,N).join("").trimEnd()}\u2026`}function bs(e){let o=(Array.isArray(e.actors)?e.actors:[]).map(n=>({...n,tone:G.includes(n.tone)?n.tone:"accent"})),l=new Map(o.map((n,m)=>[n.id,m])),b=[];for(let n of Array.isArray(e.steps)?e.steps:[]){let m=l.get(n.from),N=l.get(n.to);m===void 0||N===void 0||b.push({...n,a:m,b:N,kind:n.kind==="reply"||n.kind==="note"?n.kind:"call"})}return{actors:o,steps:b}}var ps={prev:(0,s.jsx)("path",{d:"M10 3.5 5.5 8l4.5 4.5"}),next:(0,s.jsx)("path",{d:"M6 3.5 10.5 8 6 12.5"}),play:(0,s.jsx)("path",{className:"sq-fill",d:"M5 3.2v9.6L12.6 8z"}),pause:(0,s.jsx)("path",{className:"sq-fill",d:"M4.5 3.5h2.4v9H4.5zM9.1 3.5h2.4v9H9.1z"}),restart:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M3.5 8a4.5 4.5 0 1 0 1.4-3.3"}),(0,s.jsx)("path",{d:"M4.6 2.2v2.7h2.7"})]})},I=({name:e})=>(0,s.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:ps[e]});function X({actor:e}){return(0,s.jsxs)("span",{className:"sq-chip","data-tone":e.tone,children:[e.icon&&(0,s.jsx)("span",{"aria-hidden":"true",children:e.icon}),e.label]})}function _({step:e,actors:o,t:l}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(X,{actor:o[e.a]}),e.a!==e.b&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"sq-arrow","aria-hidden":"true",children:e.kind==="note"?"\xB7":"\u2192"}),(0,s.jsx)(X,{actor:o[e.b]})]}),e.kind!=="call"&&(0,s.jsx)("em",{children:l(e.kind)})]})}function as(e,o,l){return e.key==="Home"?0:e.key==="End"?l-1:e.key==="ArrowRight"||e.key==="ArrowDown"?Math.min(l-1,o+1):e.key==="ArrowLeft"||e.key==="ArrowUp"?Math.max(0,o-1):null}function qs({actors:e,steps:o,width:l,current:b,measure:n,go:m,label:N,stepTitle:S}){let T=(l-8)/e.length,L=t=>4+T*(t+.5),W=e.some(t=>t.sub)?58:42,D=Math.min(T-12,176),v=[],P=W+16;for(let t of o){let c=t.kind!=="note"&&t.a===t.b?cs:rs;v.push({top:P,h:c,y:P+30}),P+=c}let f=P+14,p=o[b],O=new Set(p?[p.a,p.b]:[]),z=(t,c,q)=>(0,s.jsxs)("g",{className:"sq-num",children:[(0,s.jsx)("circle",{cx:t,cy:c,r:10}),(0,s.jsx)("text",{x:t,y:c+4,textAnchor:"middle",children:q+1})]});return(0,s.jsxs)("svg",{className:"sq-svg",width:l,height:f,viewBox:`0 0 ${l} ${f}`,tabIndex:0,role:"group","aria-label":N,onKeyDown:t=>{let c=as(t,b,o.length);c!==null&&(t.preventDefault(),m(c))},children:[e.map((t,c)=>(0,s.jsx)("line",{className:"sq-life","data-tone":t.tone,"data-on":O.has(c)?"":void 0,x1:L(c),x2:L(c),y1:W,y2:f-4},t.id)),p&&(0,s.jsx)("rect",{className:"sq-band",x:2,y:v[b].top+3,width:l-4,height:v[b].h-6,rx:8}),e.map((t,c)=>{let q=L(c),M=t.icon?26:0,r=K(n,t.label,D-20-M,14,600),w=q-(n(r,14,600)+M)/2,y=t.sub?K(n,t.sub,D-16,12):"",g=t.sub?24:W/2+5;return(0,s.jsxs)("g",{className:"sq-actor","data-tone":t.tone,"data-on":O.has(c)?"":void 0,children:[(0,s.jsx)("rect",{x:q-D/2,y:1,width:D,height:W-2,rx:10}),t.icon&&(0,s.jsx)("text",{className:"sq-icon",x:w+9,y:g,textAnchor:"middle",children:t.icon}),(0,s.jsx)("text",{className:"sq-alabel",x:w+M,y:g,children:r}),y&&(0,s.jsx)("text",{className:"sq-asub",x:q,y:g+19,textAnchor:"middle",children:y}),(0,s.jsx)("title",{children:t.sub?`${t.label} \xB7 ${t.sub}`:t.label})]},t.id)}),o.map((t,c)=>{let q=v[c],M=c<b?"done":c===b?"cur":"todo",r=L(t.a),w=L(t.b),y=13,g=M==="cur"?600:500,a,i;if(t.kind==="note"){let k=Math.min(r,w),$=Math.max(r,w),x=n(t.label,y,g)+52,d,u;if(t.a===t.b){let E=Math.min(x,T-8);d=k-E/2,u=k+E/2}else if(d=k-T*.36,u=$+T*.36,u-d<x){let E=(k+$)/2;d=E-x/2,u=E+x/2}d=Math.max(4,d),u=Math.min(l-4,u);let C=K(n,t.label,u-d-52,y,g),R=27+n(C,y,g),A=(d+u)/2-R/2;a=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{className:"sq-note",x:d,y:q.top+8,width:u-d,height:30,rx:6}),z(A+10,q.top+23,c),(0,s.jsx)("text",{className:"sq-label",x:A+27,y:q.top+27.5,children:C})]}),i={x:d,w:u-d}}else if(t.a===t.b){let k=r+74+n(t.label,y,g)<l-4||r<l/2,$=k?1:-1,x=q.top+16,d=q.top+40,u=r+$*30,C=K(n,t.label,k?l-4-(r+70):r-74,y,g),R=27+n(C,y,g),A=k?r+44:r-44-R;a=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{className:"sq-line","data-reply":t.kind==="reply"?"":void 0,d:`M${r},${x}H${u-$*6}Q${u},${x} ${u},${x+6}V${d-6}Q${u},${d} ${u-$*6},${d}H${r+$*8}`}),(0,s.jsx)("path",{className:"sq-head",d:`M${r+$},${d}l${$*8},-4.5v9z`}),z(A+10,(x+d)/2,c),(0,s.jsx)("text",{className:"sq-label",x:A+27,y:(x+d)/2+4.5,children:C})]});let E=k?r-8:A-4;i={x:E,w:(k?A+R+8:r+8)-E}}else{let k=w>r?1:-1,$=r+k*2,x=w-k*2,d=K(n,t.label,Math.max(84,Math.abs(w-r)+T*.4-36),y,g),u=27+n(d,y,g),C=Math.max(4,Math.min(l-4-u,(r+w)/2-u/2)),R=t.kind==="reply";a=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{className:"sq-line","data-reply":R?"":void 0,d:`M${$},${q.y}H${x-k*(R?1:7)}`}),R?(0,s.jsx)("path",{className:"sq-open",d:`M${x-k*8},${q.y-5}L${x},${q.y}L${x-k*8},${q.y+5}`}):(0,s.jsx)("path",{className:"sq-head",d:`M${x},${q.y}l${-k*8},-4.5v9z`}),z(C+10,q.y-15,c),(0,s.jsx)("text",{className:"sq-label",x:C+27,y:q.y-10.5,children:d})]});let A=Math.min(r,w,C)-6;i={x:A,w:Math.max(r,w,C+u)+6-A}}return(0,s.jsxs)("g",{className:"sq-step","data-state":M,"data-kind":t.kind,onClick:()=>m(c),children:[(0,s.jsx)("rect",{className:"sq-hit",x:i.x,y:q.top+2,width:i.w,height:q.h-4}),a,(0,s.jsx)("title",{children:S(t,c)})]},c)})]})}function ws({data:e}){let o=J(es),l=e,{actors:b,steps:n}=(0,h.useMemo)(()=>bs(l),[l]),m=(0,h.useRef)(null),N=(0,h.useRef)(null),[S,H]=(0,h.useState)(800),[T,L]=(0,h.useState)(os),[W,D]=(0,h.useState)(0),[v,P]=(0,h.useState)(!1),f=n.length,p=Math.min(W,Math.max(0,f-1));(0,h.useEffect)(()=>{let a=m.current;if(!a)return;L(getComputedStyle(a).fontFamily||os);let i=()=>H(Math.floor(a.clientWidth));if(i(),typeof ResizeObserver!="function")return;let k=new ResizeObserver(i);return k.observe(a),()=>k.disconnect()},[]),(0,h.useEffect)(()=>{if(!v)return;let a=setInterval(()=>D(i=>Math.min(i+1,f-1)),ns);return()=>clearInterval(a)},[v,f]),(0,h.useEffect)(()=>{v&&p>=f-1&&P(!1)},[p,v,f]);let O=(0,h.useMemo)(()=>is(T),[T]),z=a=>{P(!1),D(Math.max(0,Math.min(f-1,a)))},t=()=>{if(v)return P(!1);p>=f-1&&D(0),P(!0)},c=(a,i)=>o("stepTitle",{number:i+1,from:b[a.a].label,to:b[a.b].label,label:a.label}),q=ss(l.title,o("title")),M=S<640||(S-8)/Math.max(1,b.length)<96,r=n[p],w=a=>a<p?"done":a===p?"cur":"todo",y=(0,s.jsxs)("div",{className:"sq-bar",children:[(0,s.jsxs)("div",{className:"sq-buttons",role:"group","aria-label":o("controls"),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>z(p-1),disabled:p===0,children:[(0,s.jsx)(I,{name:"prev"}),(0,s.jsx)("span",{children:o("prev")})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>z(p+1),disabled:p>=f-1,children:[(0,s.jsx)(I,{name:"next"}),(0,s.jsx)("span",{children:o("next")})]}),(0,s.jsxs)("button",{type:"button",className:"sq-play","aria-pressed":v,onClick:t,disabled:f<2,children:[(0,s.jsx)(I,{name:v?"pause":"play"}),(0,s.jsx)("span",{children:o(v?"pause":"play")})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>z(0),disabled:p===0&&!v,children:[(0,s.jsx)(I,{name:"restart"}),(0,s.jsx)("span",{children:o("restart")})]})]}),(0,s.jsx)("span",{className:"sq-count","aria-live":"polite",children:o("count",{current:p+1,total:f})})]}),g=(0,s.jsx)("div",{className:"sq-progress","aria-hidden":"true",children:(0,s.jsx)("i",{style:{width:`${(p+1)/Math.max(1,f)*100}%`}})});return(0,s.jsxs)("section",{className:"sb-block sq-block","aria-label":q,ref:m,"data-narrow":M?"":void 0,children:[(l.title||l.description||!M)&&(0,s.jsxs)("div",{className:"sq-top",children:[(0,s.jsxs)("div",{children:[l.title&&(0,s.jsx)("h3",{className:"sq-title",children:(0,s.jsx)(Z,{text:l.title})}),l.description&&(0,s.jsx)("p",{className:"sq-description",children:l.description})]}),!M&&f>0&&(0,s.jsx)("span",{className:"sq-hint",children:o("hint")})]}),r&&(M?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"sq-cast","aria-label":o("actors"),children:b.map(a=>(0,s.jsx)(X,{actor:a},a.id))}),(0,s.jsxs)("div",{className:"sq-panel sq-panel-bar",children:[y,g]}),(0,s.jsx)("ol",{className:"sq-list",ref:N,onKeyDown:a=>{let i=as(a,p,f);i!==null&&(a.preventDefault(),z(i),N.current?.querySelectorAll("button")[i]?.focus())},children:n.map((a,i)=>(0,s.jsxs)("li",{"data-state":w(i),"data-kind":a.kind,children:[(0,s.jsxs)("button",{type:"button","aria-current":i===p?"step":void 0,onClick:()=>z(i),children:[(0,s.jsx)("span",{className:"sq-lnum",children:i+1}),(0,s.jsxs)("span",{className:"sq-lbody",children:[(0,s.jsx)("span",{className:"sq-route",children:(0,s.jsx)(_,{step:a,actors:b,t:o})}),(0,s.jsx)("span",{className:"sq-ltitle",children:a.label})]})]}),i===p&&a.detail&&(0,s.jsx)("div",{className:"sq-ldetail sq-md",children:(0,s.jsx)(F,{source:a.detail})})]},i))})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(qs,{actors:b,steps:n,width:S,current:p,measure:O,go:z,label:o("diagram",{count:f}),stepTitle:c}),(0,s.jsxs)("div",{className:"sq-panel",children:[y,g,(0,s.jsxs)("div",{className:"sq-detail","aria-live":"polite",children:[(0,s.jsxs)("div",{className:"sq-meta",children:[(0,s.jsx)("span",{className:"sq-lnum",children:p+1}),(0,s.jsx)(_,{step:r,actors:b,t:o})]}),(0,s.jsx)("h4",{children:r.label}),r.detail&&(0,s.jsx)("div",{className:"sq-md",children:(0,s.jsx)(F,{source:r.detail})})]})]})]})),(0,s.jsxs)("div",{className:"sq-static",children:[(0,s.jsx)("p",{className:"sq-static-title",children:o("allSteps")}),(0,s.jsx)("ol",{children:n.map((a,i)=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"sq-route",children:(0,s.jsx)(_,{step:a,actors:b,t:o})}),(0,s.jsx)("b",{children:a.label}),a.detail&&(0,s.jsx)("div",{className:"sq-md",children:(0,s.jsx)(F,{source:a.detail})})]},i))})]})]})}export{F as DetailText,ws as SequenceDiagramBlock};
@@ -0,0 +1 @@
1
+ import{a as X}from"./chunk-QD4XRUJK.js";import{a as L,d as U}from"./chunk-KF47DKNH.js";import{f as z,h as H}from"./chunk-2MWQ4I4F.js";import{Ab as q,c as te,mb as O}from"./chunk-H7ALO2Q6.js";import"./chunk-J6IRWTF7.js";import{c as B}from"./chunk-DCANE7XH.js";var m=B(te(),1);var t=B(O(),1),R={done:"\u2713",failed:"\u2715",active:"\u25CF",todo:"\u25CB",paused:"\u2016"},Y={done:["var(--an-good)","var(--an-good-soft)"],failed:["var(--an-bad)","var(--an-bad-soft)"],active:["var(--an-info)","var(--an-info-soft)"],todo:["var(--an-idle)","var(--an-idle-soft)"],paused:["var(--an-warn)","var(--an-warn-soft)"]},v=s=>({"--tone":s.color??Y[s.tone][0],"--tone-soft":s.color?`color-mix(in srgb, ${s.color} 14%, transparent)`:Y[s.tone][1]}),se=new Map(L.map(s=>[s.id,s.label])),ae={done:"tree.status.done",active:"tree.status.active",failed:"tree.status.failed",todo:"tree.status.todo",paused:"tree.status.paused"};function ne(s,o){let a=ae[s.id];return a&&se.get(s.id)===s.label?{...s,label:o(a)}:s}function oe(){let s=(0,m.useRef)(null),[o,a]=(0,m.useState)(800);return(0,m.useEffect)(()=>{let r=s.current;if(!r)return;let d=new ResizeObserver(([c])=>a(c.contentRect.width));return d.observe(r),()=>d.disconnect()},[]),[s,o]}function V({items:s,statuses:o,height:a}){return(0,t.jsx)("div",{className:"an-bar",style:a?{height:a,borderRadius:a/2}:void 0,children:o.map(r=>{let d=s.filter(c=>c.status===r.id).length;return d?(0,t.jsx)("div",{style:{...v(r),width:`${d/s.length*100}%`,background:"var(--tone)"}},r.id):null})})}function pe({data:s}){let o=q(X),a=s,r=(a.statuses??L).map(e=>ne(e,o)),d=new Map(r.map(e=>[e.id,e])),c=a.groups.flatMap(e=>e.items),G=U(a),[J,E]=oe(),[g,Q]=(0,m.useState)(()=>(c.find(e=>d.get(e.status)?.tone==="active")??c[0])?.id??""),[h,Z]=(0,m.useState)(null),N=E<980?E:E-316,b=!!a.root&&N>760,k=b?150:0,W=200,D=b?46:36,y=b?k+D:0,S=y+W+D,I=Math.max(180,N-S),K=38,P=16,p=0,x=[],$=[];for(let e of a.groups){let n=p;for(let l of e.items)x.push({item:l,y:p+K/2,group:e}),p+=K;$.push({group:e,y:(n+p)/2,top:n,bottom:p}),p+=P}let A=Math.max(0,p-P),C=A/2,i=c.find(e=>e.id===g),_=a.groups.find(e=>e.items.some(n=>n.id===g)),f=i?d.get(i.status):void 0,F=e=>h!==null&&e.status!==h;return(0,t.jsxs)("section",{className:"sb-block an-block","aria-label":H(a.title,o("tree.title")),children:[(0,t.jsxs)("div",{className:"an-head",children:[a.title&&(0,t.jsx)("h3",{className:"an-title",children:(0,t.jsx)(z,{text:a.title})}),a.description&&(0,t.jsx)("p",{className:"an-sub",children:a.description}),(0,t.jsx)("div",{className:"an-tools",role:"group","aria-label":o("tree.highlightByStatus"),children:r.map(e=>(0,t.jsx)("button",{type:"button",className:"an-chip",style:{...v(e),color:"var(--tone)"},"aria-pressed":h===e.id,onClick:()=>Z(h===e.id?null:e.id),children:`${R[e.tone]} ${e.label} ${G[e.id]??0}`},e.id))})]}),(0,t.jsxs)("div",{className:"an-tree-layout",ref:J,children:[(0,t.jsxs)("div",{className:"an-tree",style:{height:A,width:N},children:[(0,t.jsxs)("svg",{width:N,height:A,"aria-hidden":"true",children:[b&&$.map(({group:e,y:n})=>{let l=(k+y)/2;return(0,t.jsx)("path",{d:`M${k},${C} C${l},${C} ${l},${n} ${y},${n}`,fill:"none",stroke:"var(--an-line)",strokeWidth:1.5},e.id)}),x.map(({item:e,y:n,group:l})=>{let w=$.find(ee=>ee.group.id===l.id),u=d.get(e.status),T=y+W,M=(T+S)/2,j=u.tone==="todo"||u.tone==="paused";return(0,t.jsx)("path",{d:`M${T},${w.y} C${M},${w.y} ${M},${n} ${S},${n}`,fill:"none",style:v(u),stroke:"var(--tone)",strokeOpacity:F(e)?.12:j?.45:.7,strokeWidth:e.id===g?2.5:1.6,strokeDasharray:u.tone==="failed"||u.tone==="todo"?"4 4":void 0},e.id)})]}),b&&(0,t.jsxs)("div",{className:"an-root",style:{left:0,top:C-60,width:k,height:120},children:[(0,t.jsx)("small",{children:o("tree.question")}),a.root]}),$.map(({group:e,y:n,top:l,bottom:w})=>{let u=Math.max(56,Math.min(w-l-6,92)),T=e.items.filter(M=>d.get(M.status)?.tone==="done").length;return(0,t.jsxs)("div",{className:"an-group",style:{left:y,top:n-u/2,width:W,height:u},children:[(0,t.jsxs)("div",{className:"an-group-top",children:[(0,t.jsx)("b",{children:e.label}),(0,t.jsxs)("span",{children:[T,"/",e.items.length]})]}),e.summary&&u>70&&(0,t.jsx)("div",{className:"an-group-summary",children:e.summary}),(0,t.jsx)(V,{items:e.items,statuses:r})]},e.id)}),x.map(({item:e,y:n})=>{let l=d.get(e.status);return(0,t.jsxs)("button",{type:"button",className:`an-item an-st-${l.tone}${e.id===g?" is-selected":""}${F(e)?" is-dim":""}`,style:{...v(l),left:S,top:n-15,width:I,height:30},"aria-pressed":e.id===g,onClick:()=>Q(e.id),children:[(0,t.jsx)("span",{className:"an-mark","aria-label":l.label,children:R[l.tone]}),(0,t.jsx)("span",{className:"an-item-label",children:e.label}),e.result&&I>420&&(0,t.jsx)("span",{className:"an-item-result",children:e.result}),e.source&&(0,t.jsx)("span",{className:"an-item-source",children:e.source})]},e.id)})]}),i&&f&&(0,t.jsxs)("aside",{className:"an-detail","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"an-panel",children:[_&&(0,t.jsx)("div",{className:"an-sub",children:_.label}),(0,t.jsx)("h4",{children:i.label}),(0,t.jsxs)("span",{className:"an-pill",style:v(f),children:[R[f.tone]," ",f.label]}),i.source&&(0,t.jsxs)("span",{className:"an-sub",children:[" \xB7 ",o("tree.source",{source:i.source})]}),i.detail&&(0,t.jsxs)("div",{className:"an-field",children:[(0,t.jsx)("small",{children:o("tree.detail")}),i.detail]}),i.result&&(0,t.jsxs)("div",{className:"an-result-box",style:v(f),children:[(0,t.jsx)("small",{style:{color:"var(--tone)",fontWeight:600},children:o("tree.result")}),(0,t.jsx)("div",{children:i.result})]}),i.links&&i.links.length>0&&(0,t.jsxs)("div",{className:"an-field",children:[(0,t.jsx)("small",{children:o("tree.links")}),(0,t.jsx)("div",{className:"an-tags",children:i.links.map(e=>(0,t.jsx)("span",{className:"an-tag",children:e},e))})]})]}),(0,t.jsxs)("div",{className:"an-panel",children:[(0,t.jsx)("p",{className:"an-panel-title",children:o("tree.overall")}),(0,t.jsx)(V,{items:c,statuses:r,height:10}),(0,t.jsx)("div",{className:"an-legend",children:r.map(e=>(0,t.jsxs)("span",{style:v(e),children:[(0,t.jsx)("b",{children:R[e.tone]})," ",e.label," ",G[e.id]??0]},e.id))})]})]})]}),(0,t.jsxs)("details",{className:"an-static",children:[(0,t.jsx)("summary",{children:o("tree.readAll",{count:c.length})}),a.groups.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{children:e.label}),(0,t.jsx)("ul",{children:e.items.map(n=>(0,t.jsxs)("li",{children:[(0,t.jsx)("b",{children:d.get(n.status)?.label})," \xB7"," ",n.result?o("tree.itemResult",{label:n.label,result:n.result}):n.label]},n.id))})]},e.id))]})]})}export{pe as StatusTreeBlock};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-S7HOQGTC.js";import"./chunk-XXZZVMLJ.js";import"./chunk-BR33OQJ3.js";import"./chunk-MLBEJ7IZ.js";import"./chunk-2MWQ4I4F.js";import"./chunk-H7ALO2Q6.js";import"./chunk-J6IRWTF7.js";import"./chunk-DCANE7XH.js";export{a as CodePanel,b as StepGuideBlock};
@@ -0,0 +1,3 @@
1
+ import{a as y}from"./chunk-XXZZVMLJ.js";import{a as T,b as I,c as O}from"./chunk-4RYRJOIW.js";import{d as E}from"./chunk-MLBEJ7IZ.js";import{f as K,h as $}from"./chunk-2MWQ4I4F.js";import{Ab as M,a as P,c as U,mb as D}from"./chunk-H7ALO2Q6.js";import{a as A}from"./chunk-J6IRWTF7.js";import{c as j}from"./chunk-DCANE7XH.js";var c=j(U(),1);P(`.sb-block.stb-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.stb-block li:not(svg){padding:0}.sb-block.stb-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.stb-block{--stb-text: var(--text, #222222);--stb-muted: var(--muted, #6a6a6a);--stb-faint: var(--subtle, #929292);--stb-line: var(--line, #dddddd);--stb-paper: var(--paper, #ffffff);--stb-surface: var(--surface, #fafafa);--stb-hover: var(--hover, #f7f7f7);--stb-accent: var(--accent, #120a8f);--stb-accent-soft: var(--accent-soft, #eeedf9);--stb-mono: var(--font-mono, ui-monospace, Menlo, Consolas, monospace);--stb-object: #7348d0;--stb-object-soft: #f2edfc;--stb-array: #0d8579;--stb-array-soft: #e6f4f2;--stb-note: #a8582a;color:var(--stb-text);font-family:inherit;font-size:14px;line-height:1.7;padding:8px 0;container-type:inline-size}:root[data-theme=dark] .sb-block.stb-block,[data-theme=dark] .sb-block.stb-block{--stb-object: #b497ff;--stb-object-soft: #2e2648;--stb-array: #4fc4b6;--stb-array-soft: #163734;--stb-note: #e79c64}.sb-block.stb-block *{box-sizing:border-box}.sb-block.stb-block .stb-heading{margin:0 0 10px;font-size:17px;font-weight:700}.sb-block.stb-block .stb-frame{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);border:1px solid var(--stb-line);border-radius:10px;overflow:hidden;background:var(--stb-paper)}.sb-block.stb-block .stb-nav{background:var(--stb-surface);border-right:1px solid var(--stb-line);padding:8px 0;min-width:0}.sb-block.stb-block .stb-tree{display:flex;flex-direction:column;gap:1px}.sb-block.stb-block .stb-row{position:relative;display:flex;align-items:center;gap:6px;min-height:30px;margin:0 6px;padding:0 10px 0 calc(8px + var(--depth) * 18px);border-radius:6px;cursor:pointer;font-family:var(--stb-mono);font-size:12.5px;line-height:1.2;color:var(--stb-text);user-select:none;-webkit-user-select:none}.sb-block.stb-block .stb-row:hover{background:var(--stb-hover)}.sb-block.stb-block .stb-row.is-selected{background:var(--stb-accent-soft)}.sb-block.stb-block .stb-row.is-selected .stb-name{color:var(--stb-accent);font-weight:600}.sb-block.stb-block .stb-row:focus{outline:none}.sb-block.stb-block .stb-row:focus-visible{outline:2px solid var(--stb-accent);outline-offset:-2px}.sb-block.stb-block .stb-guide{position:absolute;top:0;bottom:-1px;left:calc(8px + var(--level) * 18px + 6px);width:1px;background:var(--stb-line)}.sb-block.stb-block .stb-row.is-selected .stb-guide{background:color-mix(in srgb,var(--stb-accent) 18%,transparent)}.sb-block.stb-block .stb-chevron{flex:none;display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-right:-1px;border-radius:4px;color:var(--stb-faint)}.sb-block.stb-block .stb-chevron svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}.sb-block.stb-block .stb-chevron.is-open svg{transform:rotate(90deg)}.sb-block.stb-block .stb-row:hover .stb-chevron:not(.is-none){color:var(--stb-muted)}.sb-block.stb-block .stb-name,.sb-block.stb-block .stb-type{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 0}.sb-block.stb-block .stb-type{color:var(--stb-faint);font-family:var(--stb-mono);font-size:11.5px}.sb-block.stb-block .stb-badge{flex:none;margin-left:auto;display:inline-flex;align-items:center;height:19px;padding:0 7px;border-radius:6px;background:var(--stb-surface);border:1px solid var(--stb-line);font-family:var(--font-sans, inherit);font-size:11px;line-height:1;color:var(--stb-muted);white-space:nowrap}.sb-block.stb-block .stb-row .stb-badge{background:var(--stb-paper)}.sb-block.stb-block .stb-row.is-selected .stb-badge{border-color:color-mix(in srgb,var(--stb-accent) 22%,transparent);color:var(--stb-accent)}.sb-block.stb-block .stb-icon{flex:none;width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center}.sb-block.stb-block svg.stb-icon{overflow:visible}.sb-block.stb-block .stb-icon.is-dir path{fill:color-mix(in srgb,var(--stb-accent) 14%,transparent);stroke:var(--stb-accent);stroke-width:1.2;stroke-linejoin:round}.sb-block.stb-block .stb-icon.is-dir.is-open path{fill:color-mix(in srgb,var(--stb-accent) 30%,transparent)}.sb-block.stb-block .stb-icon.is-file path{fill:none;stroke:var(--stb-muted);stroke-width:1.2;stroke-linejoin:round}.sb-block.stb-block .stb-icon.is-file path:first-child{fill:var(--stb-paper)}.sb-block.stb-block .stb-icon.is-field rect{fill:none;stroke:var(--stb-faint);stroke-width:1.3}.sb-block.stb-block .stb-icon.is-glyph{font-family:var(--stb-mono);font-size:10.5px;font-weight:700;letter-spacing:-.5px;border-radius:4px;line-height:16px}.sb-block.stb-block .stb-icon.is-object{color:var(--stb-object);background:var(--stb-object-soft)}.sb-block.stb-block .stb-icon.is-array{color:var(--stb-array);background:var(--stb-array-soft);letter-spacing:-2px;padding-right:2px}.sb-block.stb-block .stb-detail{padding:18px 24px 22px;min-width:0;overflow-wrap:anywhere}.sb-block.stb-block .stb-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:2px 4px;font-family:var(--stb-mono);font-size:11.5px;line-height:1.5;color:var(--stb-muted)}.sb-block.stb-block .stb-crumbs button{border:0;background:none;font:inherit;cursor:pointer;color:var(--stb-muted);border-radius:4px;padding:0 2px}.sb-block.stb-block .stb-crumbs button:hover{color:var(--stb-accent)}.sb-block.stb-block .stb-crumbs button:focus-visible{outline:2px solid var(--stb-accent);outline-offset:2px}.sb-block.stb-block .stb-crumbs [aria-current]{color:var(--stb-text);padding:0 2px}.sb-block.stb-block .stb-sep{color:var(--stb-faint)}.sb-block.stb-block .stb-title{display:flex;flex-wrap:wrap;align-items:center;gap:6px 9px;margin-top:12px}.sb-block.stb-block .stb-title .stb-icon{width:18px;height:18px}.sb-block.stb-block .stb-title .stb-icon.is-glyph{font-size:11.5px;line-height:18px}.sb-block.stb-block .stb-title h4{margin:0;font-family:var(--stb-mono);font-size:17px;line-height:1.35;font-weight:600;letter-spacing:-.01em}.sb-block.stb-block .stb-dtype{font-family:var(--stb-mono);font-size:12px;line-height:1.5;color:var(--stb-muted);background:var(--stb-surface);border-radius:6px;padding:1px 7px}.sb-block.stb-block .stb-title .stb-badge{margin-left:0}.sb-block.stb-block .stb-meta{margin-top:3px;padding-left:27px;font-size:12px;color:var(--stb-faint)}.sb-block.stb-block .stb-summary{margin:12px 0 0;font-size:15px;line-height:1.65}.sb-block.stb-block .stb-body{margin-top:2px}.sb-block.stb-block .stb-para{margin:10px 0 0;line-height:1.75}.sb-block.stb-block ul.stb-para{padding-left:18px}.sb-block.stb-block ul.stb-para li+li{margin-top:3px}.sb-block.stb-block .stb-empty{margin:14px 0 0;font-size:13px;color:var(--stb-faint)}.sb-block.stb-block .stb-code{margin-top:16px;border:1px solid var(--stb-line);border-radius:8px;background:var(--stb-surface);overflow:hidden}.sb-block.stb-block .stb-codebar{display:flex;align-items:center;gap:8px;padding:5px 6px 5px 12px;border-bottom:1px solid var(--stb-line)}.sb-block.stb-block .stb-lang{font-family:var(--stb-mono);font-size:11px;color:var(--stb-muted);letter-spacing:.03em}.sb-block.stb-block .stb-copystate{flex:1;min-width:0;text-align:right;font-size:11.5px;color:var(--stb-note);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sb-block.stb-block .stb-copy{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:var(--stb-muted);font:inherit;font-size:12px;cursor:pointer}.sb-block.stb-block .stb-copy:hover{background:var(--stb-line);color:var(--stb-text)}.sb-block.stb-block .stb-copy:focus-visible{outline:2px solid var(--stb-accent);outline-offset:2px}.sb-block.stb-block .stb-copy svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.sb-block.stb-block .stb-copy.is-done{color:var(--stb-array)}.sb-block.stb-block .stb-code .stb-pre{margin:0;padding:12px 14px 14px;overflow-x:auto;font-family:var(--stb-mono);font-size:12.5px;line-height:1.65;white-space:pre;tab-size:2;scrollbar-width:thin}.sb-block.stb-block .stb-code code{font:inherit;background:none;border:0;padding:0;border-radius:0;color:inherit;overflow-wrap:normal}.sb-block.stb-block .stb-kids{margin-top:20px}.sb-block.stb-block .stb-kidshead{font-size:12px;font-weight:600;color:var(--stb-muted);letter-spacing:.04em;margin-bottom:4px}.sb-block.stb-block .stb-kid{display:grid;grid-template-columns:16px auto minmax(0,1fr);align-items:center;gap:9px;width:100%;padding:7px 8px;border:0;border-top:1px solid var(--stb-line);border-radius:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.sb-block.stb-block .stb-kid:last-child{border-bottom:1px solid var(--stb-line)}.sb-block.stb-block .stb-kid:hover{background:var(--stb-hover)}.sb-block.stb-block .stb-kid:focus-visible{outline:2px solid var(--stb-accent);outline-offset:-2px;border-radius:4px}.sb-block.stb-block .stb-kidname{font-family:var(--stb-mono);font-size:12.5px;white-space:nowrap}.sb-block.stb-block .stb-kidsum{font-size:12.5px;color:var(--stb-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sb-block.stb-block .stb-detail code,.sb-block.stb-block .stb-caption code,.sb-block.stb-block .stb-print code{font-family:var(--stb-mono);font-size:.88em;background:var(--stb-surface);border:1px solid var(--stb-line);border-radius:4px;padding:0 4px;overflow-wrap:anywhere}.sb-block.stb-block a{color:var(--stb-accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--stb-accent) 35%,transparent)}.sb-block.stb-block a:hover{border-bottom-color:var(--stb-accent)}.sb-block.stb-block strong{font-weight:600}.sb-block.stb-block .stb-caption{margin:10px 2px 0;font-size:12.5px;line-height:1.65;color:var(--stb-muted)}.sb-block.stb-block .stb-print{display:none}.sb-block.stb-block .stb-print ul{list-style:none;margin:0;padding-left:18px}.sb-block.stb-block .stb-print>ul{padding-left:0}.sb-block.stb-block .stb-print li{margin:2px 0;break-inside:avoid}.sb-block.stb-block .stb-print-name{font-family:var(--stb-mono);font-weight:600;margin-right:6px}.sb-block.stb-block .stb-print .stb-type{display:inline;margin-right:6px}.sb-block.stb-block .stb-print .stb-badge{display:inline;height:auto;margin:0;padding:0 4px}.sb-block.stb-block .stb-print-summary{color:var(--stb-muted)}@container (max-width: 640px){.sb-block.stb-block .stb-frame{grid-template-columns:minmax(0,1fr)}.sb-block.stb-block .stb-nav{border-right:0;border-bottom:1px solid var(--stb-line)}.sb-block.stb-block .stb-detail{padding:16px 16px 18px}.sb-block.stb-block .stb-row{padding-left:calc(6px + var(--depth) * 16px)}.sb-block.stb-block .stb-guide{left:calc(6px + var(--level) * 16px + 6px)}.sb-block.stb-block .stb-summary{font-size:14.5px}}@media(prefers-reduced-motion:reduce){.sb-block.stb-block *{transition:none!important}}@media print{.sb-block.stb-block .stb-frame{display:none}.sb-block.stb-block .stb-print{display:block;font-size:12.5px;line-height:1.6}}
2
+ `);var B=A("structureBrowser",{"zh-CN":{title:"\u7ED3\u6784\u6D4F\u89C8\u5668",tree:"\u7ED3\u6784",path:"\u8DEF\u5F84","kind.dir":"\u6587\u4EF6\u5939","kind.file":"\u6587\u4EF6","kind.object":"\u5BF9\u8C61","kind.array":"\u6570\u7EC4","kind.field":"\u5B57\u6BB5",childCount:{other:"{count} \u4E2A\u5B50\u9879"},contains:"\u5305\u542B",example:"\u793A\u4F8B",copy:"\u590D\u5236",copied:"\u5DF2\u590D\u5236",copyLabel:"\u590D\u5236\u793A\u4F8B\uFF1A{name}",selectedToCopy:"\u5DF2\u9009\u4E2D\uFF0C\u6309 \u2318C / Ctrl+C \u590D\u5236",toggle:"\u5C55\u5F00\u6216\u6536\u8D77 {name}",noDetail:"\u8FD9\u4E00\u9879\u6CA1\u6709\u66F4\u591A\u8BF4\u660E\u3002",empty:"\u6CA1\u6709\u53EF\u663E\u793A\u7684\u7ED3\u6784\u3002"},en:{title:"Structure browser",tree:"Structure",path:"Path","kind.dir":"Folder","kind.file":"File","kind.object":"Object","kind.array":"Array","kind.field":"Field",childCount:{one:"{count} child",other:"{count} children"},contains:"Contains",example:"Example",copy:"Copy",copied:"Copied",copyLabel:"Copy example: {name}",selectedToCopy:"Selected \u2014 press \u2318C / Ctrl+C to copy",toggle:"Expand or collapse {name}",noDetail:"No further description for this item.",empty:"There is no structure to show."}});var t=j(D(),1);function _({source:l}){return l.trim().split(/\n\s*\n/).map((i,b)=>{let s=i.split(`
3
+ `);return s.every(a=>/^\s*[-•]\s+/.test(a))?(0,t.jsx)("ul",{className:"stb-para",children:s.map((a,d)=>(0,t.jsx)("li",{children:(0,t.jsx)(y,{source:a.replace(/^\s*[-•]\s+/,"")})},d))},b):(0,t.jsx)("p",{className:"stb-para",children:s.map((a,d)=>(0,t.jsxs)(c.Fragment,{children:[d>0&&(0,t.jsx)("br",{}),(0,t.jsx)(y,{source:a})]},d))},b)})}function L({kind:l,open:i}){return l==="dir"?(0,t.jsx)("svg",{className:`stb-icon is-dir${i?" is-open":""}`,viewBox:"0 0 16 16","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M1.75 4.25c0-.69.56-1.25 1.25-1.25h2.6l1.4 1.5h6c.69 0 1.25.56 1.25 1.25v6c0 .69-.56 1.25-1.25 1.25H3c-.69 0-1.25-.56-1.25-1.25z"})}):l==="file"?(0,t.jsxs)("svg",{className:"stb-icon is-file",viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 1.75h5.2L12.75 5.3v8.2c0 .41-.34.75-.75.75H4a.75.75 0 0 1-.75-.75V2.5c0-.41.34-.75.75-.75z"}),(0,t.jsx)("path",{d:"M9 1.9v3.6h3.6"})]}):l==="object"?(0,t.jsx)("span",{className:"stb-icon is-glyph is-object","aria-hidden":"true",children:"{}"}):l==="array"?(0,t.jsx)("span",{className:"stb-icon is-glyph is-array","aria-hidden":"true",children:"[ ]"}):(0,t.jsx)("svg",{className:"stb-icon is-field",viewBox:"0 0 16 16","aria-hidden":"true",children:(0,t.jsx)("rect",{x:"5",y:"5",width:"6",height:"6",rx:"1.5",transform:"rotate(45 8 8)"})})}function q({code:l,lang:i,name:b}){let s=M(B),a=(0,c.useRef)(null),d=(0,c.useRef)(void 0),[m,k]=(0,c.useState)("idle");(0,c.useEffect)(()=>()=>window.clearTimeout(d.current),[]);let p=x=>{k(x),window.clearTimeout(d.current),d.current=window.setTimeout(()=>k("idle"),x==="copied"?1500:4e3)},h=()=>{let x=window.getSelection();if(a.current&&x){let g=document.createRange();g.selectNodeContents(a.current),x.removeAllRanges(),x.addRange(g)}p("selected")},w=()=>{if(!navigator.clipboard)return h();navigator.clipboard.writeText(l).then(()=>p("copied"),h)};return(0,t.jsxs)("div",{className:"stb-code",children:[(0,t.jsxs)("div",{className:"stb-codebar",children:[(0,t.jsx)("span",{className:"stb-lang",children:i||s("example")}),(0,t.jsx)("span",{className:"stb-copystate","aria-live":"polite",children:m==="selected"?s("selectedToCopy"):""}),(0,t.jsxs)("button",{type:"button",className:`stb-copy${m==="copied"?" is-done":""}`,"aria-label":s("copyLabel",{name:b}),onClick:w,children:[m==="copied"?(0,t.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3.5 8.5l3 3 6-6.5"})}):(0,t.jsxs)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.6"}),(0,t.jsx)("path",{d:"M10.5 3.5v-.4A1.6 1.6 0 0 0 8.9 1.5H4.1A1.6 1.6 0 0 0 2.5 3.1v4.8a1.6 1.6 0 0 0 1.6 1.6h.4"})]}),s(m==="copied"?"copied":"copy")]})]}),(0,t.jsx)("pre",{className:"stb-pre",children:(0,t.jsx)("code",{ref:a,children:l})})]})}function F({items:l,roots:i},b){let s=new Set;for(let k of l.values())k.node.open&&k.children.length&&s.add(k.path);let a=b?I(b):"",d=l.has(a)?a:null,m=d??i[0]??null;if(d)for(let k=d;k;k=l.get(k).parent)l.get(k).children.length&&s.add(k);else!s.size&&m&&l.get(m).children.length&&s.add(m);return{selected:m,open:s}}function H({paths:l,outline:i}){return(0,t.jsx)("ul",{children:l.map(b=>{let s=i.items.get(b);return(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"stb-print-name",children:s.node.name}),s.node.type&&(0,t.jsx)("span",{className:"stb-type",children:s.node.type}),s.node.badge&&(0,t.jsx)("span",{className:"stb-badge",children:s.node.badge}),s.node.summary&&(0,t.jsxs)("span",{className:"stb-print-summary",children:[" \u2014 ",(0,t.jsx)(y,{source:s.node.summary,links:!1})]}),s.children.length>0&&(0,t.jsx)(H,{paths:s.children,outline:i})]},b)})})}function ot({data:l}){let i=M(B),b=l,s=(0,c.useMemo)(()=>O(b.nodes??[]),[b.nodes]),{items:a,roots:d}=s,[m,k]=(0,c.useState)(()=>F(s,b.initial));(0,c.useEffect)(()=>k(F(s,b.initial)),[s,b.initial]);let{selected:p,open:h}=m,w=(e,o)=>k(u=>{let r=new Set(u.open);return o==="open"||o==="flip"&&!r.has(e)?r.add(e):(o==="close"||o==="flip")&&r.delete(e),{selected:e,open:r}}),x=e=>k(o=>{let u=new Set(o.open);for(let r=a.get(e)?.parent??null;r;r=a.get(r).parent)u.add(r);return{selected:e,open:u}}),g=(0,c.useMemo)(()=>{let e=[],o=u=>{for(let r of u){let f=a.get(r);e.push(f),f.children.length&&h.has(r)&&o(f.children)}};return o(d),e},[a,d,h]),z=(0,c.useRef)(new Map),C=(0,c.useRef)(!1);(0,c.useLayoutEffect)(()=>{C.current&&p&&z.current.get(p)?.focus(),C.current=!1},[p,g]);let R=e=>{if(!p)return;let o=a.get(p),u=g.findIndex(f=>f.path===p),r=(f,v)=>{e.preventDefault(),f&&(C.current=!0,w(f,v))};switch(e.key){case"ArrowDown":return r(g[u+1]?.path);case"ArrowUp":return r(g[u-1]?.path);case"Home":return r(g[0]?.path);case"End":return r(g[g.length-1]?.path);case"ArrowRight":return o.children.length?h.has(p)?r(o.children[0]):r(p,"open"):e.preventDefault();case"ArrowLeft":return o.children.length&&h.has(p)?r(p,"close"):r(o.parent);case"Enter":case" ":return o.children.length?r(p,"flip"):e.preventDefault()}},n=p?a.get(p):void 0,S=[];for(let e=p;e;e=a.get(e).parent)S.unshift(a.get(e));let V=e=>e.parent?a.get(e.parent).children:d;return(0,t.jsxs)("section",{className:"sb-block stb-block","aria-label":$(b.title,i("title")),children:[b.title&&(0,t.jsx)("h3",{className:"stb-heading",children:(0,t.jsx)(K,{text:b.title})}),(0,t.jsxs)("div",{className:"stb-frame",children:[(0,t.jsx)("div",{className:"stb-nav",children:(0,t.jsx)("div",{className:"stb-tree",role:"tree","aria-label":i("tree"),onKeyDown:R,children:g.map(e=>{let o=h.has(e.path),u=e.path===p,r=V(e);return(0,t.jsxs)("div",{ref:f=>{f?z.current.set(e.path,f):z.current.delete(e.path)},role:"treeitem","aria-level":e.depth+1,"aria-setsize":r.length,"aria-posinset":r.indexOf(e.path)+1,"aria-selected":u,"aria-expanded":e.children.length?o:void 0,tabIndex:u?0:-1,className:`stb-row${u?" is-selected":""}`,style:{"--depth":e.depth},onClick:()=>w(e.path,e.children.length&&(!o||u)?"flip":void 0),children:[Array.from({length:e.depth},(f,v)=>(0,t.jsx)("i",{className:"stb-guide",style:{"--level":v},"aria-hidden":"true"},v)),(0,t.jsx)("span",{className:`stb-chevron${e.children.length?"":" is-none"}${o?" is-open":""}`,"aria-hidden":"true",title:e.children.length?i("toggle",{name:e.node.name}):void 0,onClick:f=>{e.children.length&&(f.stopPropagation(),k(v=>{let N=new Set(v.open);return N.has(e.path)?N.delete(e.path):N.add(e.path),{...v,open:N}}))},children:e.children.length>0&&(0,t.jsx)("svg",{viewBox:"0 0 12 12",children:(0,t.jsx)("path",{d:"M4.5 2.75L7.75 6 4.5 9.25"})})}),(0,t.jsx)(L,{kind:e.kind,open:o}),(0,t.jsx)("span",{className:"stb-name",children:e.node.name}),e.node.type&&(0,t.jsx)("span",{className:"stb-type",children:e.node.type}),e.node.badge&&(0,t.jsx)("span",{className:"stb-badge",children:e.node.badge})]},e.path)})})}),(0,t.jsx)("div",{className:"stb-detail","aria-live":"polite",children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("nav",{className:"stb-crumbs","aria-label":i("path"),children:S.map((e,o)=>(0,t.jsxs)(c.Fragment,{children:[o>0&&(0,t.jsx)("span",{className:"stb-sep","aria-hidden":"true",children:"/"}),o<S.length-1?(0,t.jsx)("button",{type:"button",onClick:()=>w(e.path),children:T(e.node.name)}):(0,t.jsx)("span",{"aria-current":"location",children:T(e.node.name)})]},e.path))}),(0,t.jsxs)("div",{className:"stb-title",children:[(0,t.jsx)(L,{kind:n.kind}),(0,t.jsx)("h4",{children:n.node.name}),n.node.type&&(0,t.jsx)("span",{className:"stb-dtype",children:n.node.type}),n.node.badge&&(0,t.jsx)("span",{className:"stb-badge",children:n.node.badge})]}),(0,t.jsxs)("div",{className:"stb-meta",children:[i(`kind.${n.kind}`),n.children.length>0&&` \xB7 ${i("childCount",{count:n.children.length})}`]}),n.node.summary&&(0,t.jsx)("p",{className:"stb-summary",children:(0,t.jsx)(y,{source:n.node.summary})}),n.node.detail&&(0,t.jsx)("div",{className:"stb-body",children:(0,t.jsx)(_,{source:n.node.detail})}),n.node.example&&(0,t.jsx)(q,{code:n.node.example,lang:n.node.exampleLang,name:n.node.name},n.path),n.children.length>0&&(0,t.jsxs)("div",{className:"stb-kids",children:[(0,t.jsx)("div",{className:"stb-kidshead",children:i("contains")}),n.children.map(e=>{let o=a.get(e);return(0,t.jsxs)("button",{type:"button",className:"stb-kid",onClick:()=>x(e),children:[(0,t.jsx)(L,{kind:o.kind}),(0,t.jsx)("span",{className:"stb-kidname",children:o.node.name}),o.node.summary&&(0,t.jsx)("span",{className:"stb-kidsum",children:E(o.node.summary)})]},e)})]}),!n.node.summary&&!n.node.detail&&!n.node.example&&!n.children.length&&(0,t.jsx)("p",{className:"stb-empty",children:i("noDetail")})]}):(0,t.jsx)("p",{className:"stb-empty",children:i("empty")})})]}),(0,t.jsx)("div",{className:"stb-print",children:(0,t.jsx)(H,{paths:d,outline:s})}),b.caption&&(0,t.jsx)("p",{className:"stb-caption",children:(0,t.jsx)(y,{source:b.caption})})]})}export{ot as StructureBrowserBlock};
@@ -1,2 +1,2 @@
1
- import{f as P,g as j}from"./chunk-3RZMLHCB.js";import{d as X}from"./chunk-NL63BEBA.js";import{a as H,c as be,jb as C,lb as V,mb as q}from"./chunk-HC6FTJAR.js";import{a as O}from"./chunk-J6IRWTF7.js";import{c as A}from"./chunk-DCANE7XH.js";var c=A(be(),1);H(`.sb-block.wf-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.wf-block li:not(svg){padding:0}.sb-block.wf-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.wf-block{--wf-text: var(--text, #222222);--wf-muted: var(--muted, #6a6a6a);--wf-line: var(--line, #dddddd);--wf-paper: var(--paper, #ffffff);--wf-surface: var(--surface, #fafafa);--wf-accent: var(--accent, #120a8f);--wf-accent-soft: var(--accent-soft, #eeedf9);--wf-good: #1d5fc4;--wf-bad: #c4402f;color:var(--wf-text);font-family:inherit;font-size:14px;line-height:1.5;padding:8px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;container-type:inline-size}:root[data-theme=dark] .sb-block.wf-block,[data-theme=dark] .sb-block.wf-block{--wf-good: #7fb0f0;--wf-bad: #ef8a7c}.sb-block.wf-block *{box-sizing:border-box}.sb-block.wf-block .wf-tone-total{--wf-tone: var(--wf-text)}.sb-block.wf-block .wf-tone-good{--wf-tone: var(--wf-good)}.sb-block.wf-block .wf-tone-bad{--wf-tone: var(--wf-bad)}.sb-block.wf-block .wf-eyebrow{font-size:11.5px;letter-spacing:.06em;color:var(--wf-muted);font-weight:600}.sb-block.wf-block .wf-title{font-size:17px;font-weight:700;margin:2px 0 0}.sb-block.wf-block .wf-story{margin:6px 0 14px;font-size:18px;line-height:1.42;font-weight:650;max-width:44em}.sb-block.wf-block .wf-heads{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin:0;border-top:2px solid var(--wf-text);border-bottom:1px solid var(--wf-line)}.sb-block.wf-block .wf-head{display:flex;flex-direction:column;gap:2px;padding:10px 14px 11px 0;min-width:0}.sb-block.wf-block .wf-head+.wf-head{padding-left:16px;border-left:1px solid var(--wf-line)}.sb-block.wf-block .wf-head dt{font-size:12px;color:var(--wf-muted);font-weight:600}.sb-block.wf-block .wf-head dd{margin:0;display:flex;flex-direction:column;gap:2px}.sb-block.wf-block .wf-head b{font-size:26px;line-height:1.1;font-weight:750;letter-spacing:-.02em;white-space:nowrap}.sb-block.wf-block .wf-head dd span{font-size:12.5px;font-weight:600;color:var(--wf-tone)}.sb-block.wf-block .wf-head dd .wf-tone-total{color:var(--wf-muted)}.sb-block.wf-block .wf-body{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr);gap:20px;margin-top:14px;align-items:stretch}.sb-block.wf-block .wf-chart{margin:0;min-width:0}.sb-block.wf-block .wf-scroll{overflow-x:auto}.sb-block.wf-block .wf-canvas{position:relative}.sb-block.wf-block .wf-canvas svg{display:block;overflow:visible}.sb-block.wf-block .wf-gridline{stroke:var(--wf-line)}.sb-block.wf-block .wf-zero{stroke:var(--wf-muted)}.sb-block.wf-block .wf-tick{font-size:11px;fill:var(--wf-muted)}.sb-block.wf-block .wf-break path{fill:none;stroke:var(--wf-muted);stroke-width:1.4}.sb-block.wf-block .wf-bar{cursor:pointer;outline:none}.sb-block.wf-block .wf-slot{fill:transparent}.sb-block.wf-block .wf-bar.is-active .wf-slot{fill:var(--wf-accent-soft)}.sb-block.wf-block .wf-bar:focus-visible .wf-slot{stroke:var(--wf-accent);stroke-width:2}.sb-block.wf-block .wf-fill{fill:var(--wf-tone);opacity:.78;transition:opacity .15s}.sb-block.wf-block .wf-bar:hover .wf-fill,.sb-block.wf-block .wf-bar.is-active .wf-fill{opacity:1}.sb-block.wf-block .wf-connector{stroke:var(--wf-muted);stroke-dasharray:3 3}.sb-block.wf-block .wf-value{font-size:12.5px;font-weight:700;fill:var(--wf-tone)}.sb-block.wf-block .wf-labels{position:absolute;left:0;right:0;height:44px}.sb-block.wf-block .wf-labels span{position:absolute;top:4px;padding:0 4px;text-align:center;font-size:12px;font-weight:600;line-height:1.3;color:var(--wf-muted);cursor:pointer}.sb-block.wf-block .wf-labels span.is-active{color:var(--wf-text);font-weight:750}.sb-block.wf-block .wf-chart figcaption{font-size:11.5px;color:var(--wf-muted);margin-top:4px;display:flex;flex-direction:column;gap:2px}.sb-block.wf-block .wf-warn{color:var(--wf-bad);font-weight:600}.sb-block.wf-block .wf-side{border-radius:12px;background:var(--wf-surface);border:1px solid var(--wf-line);padding:14px 16px;display:flex;flex-direction:column;min-width:0}.sb-block.wf-block .wf-side-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.sb-block.wf-block .wf-side-top span{font-size:13px;font-weight:700}.sb-block.wf-block .wf-side-top b{font-size:23px;font-weight:750;letter-spacing:-.02em;color:var(--wf-tone);white-space:nowrap}.sb-block.wf-block .wf-side-title{font-size:12px;color:var(--wf-muted);margin:2px 0 10px;font-weight:600}.sb-block.wf-block .wf-side ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}.sb-block.wf-block .wf-row{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:600}.sb-block.wf-block .wf-row span:first-child{min-width:0}.sb-block.wf-block .wf-num{white-space:nowrap}.sb-block.wf-block .wf-num em{font-style:normal;color:var(--wf-muted);margin-left:6px;font-size:12px}.sb-block.wf-block .wf-track{height:7px;border-radius:4px;background:color-mix(in srgb,var(--wf-line) 70%,transparent);margin-top:4px;overflow:hidden}.sb-block.wf-block .wf-track span{display:block;height:100%;border-radius:4px;background:var(--wf-tone);transition:width .3s ease}.sb-block.wf-block .wf-muted{color:var(--wf-muted);font-size:12px;margin:8px 0 0}.sb-block.wf-block .wf-note{font-size:12.5px;line-height:1.45;margin:12px 0 0;padding-top:10px;border-top:1px solid var(--wf-line)}.sb-block.wf-block .wf-hint{margin:auto 0 0;padding-top:10px;font-size:11.5px;color:var(--wf-muted)}.sb-block.wf-block .wf-static{margin-top:12px;font-size:13px}.sb-block.wf-block .wf-static summary{cursor:pointer;color:var(--wf-muted)}.sb-block.wf-block .wf-static table{border-collapse:collapse;width:100%;margin-top:8px}.sb-block.wf-block .wf-static th,.sb-block.wf-block .wf-static td{border-bottom:1px solid var(--wf-line);padding:4px 6px;text-align:left;vertical-align:top}@container (max-width: 760px){.sb-block.wf-block .wf-body{grid-template-columns:minmax(0,1fr)}.sb-block.wf-block .wf-head b{font-size:22px}.sb-block.wf-block .wf-story{font-size:16px}}@container (max-width: 420px){.sb-block.wf-block .wf-head+.wf-head{padding-left:0;border-left:0}}@media(prefers-reduced-motion:reduce){.sb-block.wf-block .wf-fill,.sb-block.wf-block .wf-track span{transition:none}}@media print{.sb-block.wf-block .wf-hint{display:none}.sb-block.wf-block .wf-scroll{overflow:visible}}
1
+ import{f as P,g as j}from"./chunk-3RZMLHCB.js";import{h as X}from"./chunk-2MWQ4I4F.js";import{Ab as q,a as H,c as be,mb as C,zb as V}from"./chunk-H7ALO2Q6.js";import{a as O}from"./chunk-J6IRWTF7.js";import{c as A}from"./chunk-DCANE7XH.js";var c=A(be(),1);H(`.sb-block.wf-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.wf-block li:not(svg){padding:0}.sb-block.wf-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.wf-block{--wf-text: var(--text, #222222);--wf-muted: var(--muted, #6a6a6a);--wf-line: var(--line, #dddddd);--wf-paper: var(--paper, #ffffff);--wf-surface: var(--surface, #fafafa);--wf-accent: var(--accent, #120a8f);--wf-accent-soft: var(--accent-soft, #eeedf9);--wf-good: #1d5fc4;--wf-bad: #c4402f;color:var(--wf-text);font-family:inherit;font-size:14px;line-height:1.5;padding:8px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;container-type:inline-size}:root[data-theme=dark] .sb-block.wf-block,[data-theme=dark] .sb-block.wf-block{--wf-good: #7fb0f0;--wf-bad: #ef8a7c}.sb-block.wf-block *{box-sizing:border-box}.sb-block.wf-block .wf-tone-total{--wf-tone: var(--wf-text)}.sb-block.wf-block .wf-tone-good{--wf-tone: var(--wf-good)}.sb-block.wf-block .wf-tone-bad{--wf-tone: var(--wf-bad)}.sb-block.wf-block .wf-eyebrow{font-size:11.5px;letter-spacing:.06em;color:var(--wf-muted);font-weight:600}.sb-block.wf-block .wf-title{font-size:17px;font-weight:700;margin:2px 0 0}.sb-block.wf-block .wf-story{margin:6px 0 14px;font-size:18px;line-height:1.42;font-weight:650;max-width:44em}.sb-block.wf-block .wf-heads{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin:0;border-top:2px solid var(--wf-text);border-bottom:1px solid var(--wf-line)}.sb-block.wf-block .wf-head{display:flex;flex-direction:column;gap:2px;padding:10px 14px 11px 0;min-width:0}.sb-block.wf-block .wf-head+.wf-head{padding-left:16px;border-left:1px solid var(--wf-line)}.sb-block.wf-block .wf-head dt{font-size:12px;color:var(--wf-muted);font-weight:600}.sb-block.wf-block .wf-head dd{margin:0;display:flex;flex-direction:column;gap:2px}.sb-block.wf-block .wf-head b{font-size:26px;line-height:1.1;font-weight:750;letter-spacing:-.02em;white-space:nowrap}.sb-block.wf-block .wf-head dd span{font-size:12.5px;font-weight:600;color:var(--wf-tone)}.sb-block.wf-block .wf-head dd .wf-tone-total{color:var(--wf-muted)}.sb-block.wf-block .wf-body{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr);gap:20px;margin-top:14px;align-items:stretch}.sb-block.wf-block .wf-chart{margin:0;min-width:0}.sb-block.wf-block .wf-scroll{overflow-x:auto}.sb-block.wf-block .wf-canvas{position:relative}.sb-block.wf-block .wf-canvas svg{display:block;overflow:visible}.sb-block.wf-block .wf-gridline{stroke:var(--wf-line)}.sb-block.wf-block .wf-zero{stroke:var(--wf-muted)}.sb-block.wf-block .wf-tick{font-size:11px;fill:var(--wf-muted)}.sb-block.wf-block .wf-break path{fill:none;stroke:var(--wf-muted);stroke-width:1.4}.sb-block.wf-block .wf-bar{cursor:pointer;outline:none}.sb-block.wf-block .wf-slot{fill:transparent}.sb-block.wf-block .wf-bar.is-active .wf-slot{fill:var(--wf-accent-soft)}.sb-block.wf-block .wf-bar:focus-visible .wf-slot{stroke:var(--wf-accent);stroke-width:2}.sb-block.wf-block .wf-fill{fill:var(--wf-tone);opacity:.78;transition:opacity .15s}.sb-block.wf-block .wf-bar:hover .wf-fill,.sb-block.wf-block .wf-bar.is-active .wf-fill{opacity:1}.sb-block.wf-block .wf-connector{stroke:var(--wf-muted);stroke-dasharray:3 3}.sb-block.wf-block .wf-value{font-size:12.5px;font-weight:700;fill:var(--wf-tone)}.sb-block.wf-block .wf-labels{position:absolute;left:0;right:0;height:44px}.sb-block.wf-block .wf-labels span{position:absolute;top:4px;padding:0 4px;text-align:center;font-size:12px;font-weight:600;line-height:1.3;color:var(--wf-muted);cursor:pointer}.sb-block.wf-block .wf-labels span.is-active{color:var(--wf-text);font-weight:750}.sb-block.wf-block .wf-chart figcaption{font-size:11.5px;color:var(--wf-muted);margin-top:4px;display:flex;flex-direction:column;gap:2px}.sb-block.wf-block .wf-warn{color:var(--wf-bad);font-weight:600}.sb-block.wf-block .wf-side{border-radius:12px;background:var(--wf-surface);border:1px solid var(--wf-line);padding:14px 16px;display:flex;flex-direction:column;min-width:0}.sb-block.wf-block .wf-side-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.sb-block.wf-block .wf-side-top span{font-size:13px;font-weight:700}.sb-block.wf-block .wf-side-top b{font-size:23px;font-weight:750;letter-spacing:-.02em;color:var(--wf-tone);white-space:nowrap}.sb-block.wf-block .wf-side-title{font-size:12px;color:var(--wf-muted);margin:2px 0 10px;font-weight:600}.sb-block.wf-block .wf-side ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}.sb-block.wf-block .wf-row{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:600}.sb-block.wf-block .wf-row span:first-child{min-width:0}.sb-block.wf-block .wf-num{white-space:nowrap}.sb-block.wf-block .wf-num em{font-style:normal;color:var(--wf-muted);margin-left:6px;font-size:12px}.sb-block.wf-block .wf-track{height:7px;border-radius:4px;background:color-mix(in srgb,var(--wf-line) 70%,transparent);margin-top:4px;overflow:hidden}.sb-block.wf-block .wf-track span{display:block;height:100%;border-radius:4px;background:var(--wf-tone);transition:width .3s ease}.sb-block.wf-block .wf-muted{color:var(--wf-muted);font-size:12px;margin:8px 0 0}.sb-block.wf-block .wf-note{font-size:12.5px;line-height:1.45;margin:12px 0 0;padding-top:10px;border-top:1px solid var(--wf-line)}.sb-block.wf-block .wf-hint{margin:auto 0 0;padding-top:10px;font-size:11.5px;color:var(--wf-muted)}.sb-block.wf-block .wf-static{margin-top:12px;font-size:13px}.sb-block.wf-block .wf-static summary{cursor:pointer;color:var(--wf-muted)}.sb-block.wf-block .wf-static table{border-collapse:collapse;width:100%;margin-top:8px}.sb-block.wf-block .wf-static th,.sb-block.wf-block .wf-static td{border-bottom:1px solid var(--wf-line);padding:4px 6px;text-align:left;vertical-align:top}@container (max-width: 760px){.sb-block.wf-block .wf-body{grid-template-columns:minmax(0,1fr)}.sb-block.wf-block .wf-head b{font-size:22px}.sb-block.wf-block .wf-story{font-size:16px}}@container (max-width: 420px){.sb-block.wf-block .wf-head+.wf-head{padding-left:0;border-left:0}}@media(prefers-reduced-motion:reduce){.sb-block.wf-block .wf-fill,.sb-block.wf-block .wf-track span{transition:none}}@media print{.sb-block.wf-block .wf-hint{display:none}.sb-block.wf-block .wf-scroll{overflow:visible}}
2
2
  `);var _=O("waterfall",{"zh-CN":{title:"\u7011\u5E03\u6865\u56FE","kind.total":"\u5408\u8BA1","kind.up":"\u589E\u52A0","kind.down":"\u51CF\u5C11",chart:"\u4ECE\u671F\u521D\u5230\u671F\u672B\u7684\u9010\u9879\u53D8\u52A8",step:"{label}\uFF0C{kind} {value}",hint:"\u70B9\u51FB\u67F1\u5B50\u6216\u7528\u65B9\u5411\u952E\u5207\u6362\uFF0C\u67E5\u770B\u8FD9\u4E00\u6B65\u7684\u6784\u6210\u3002",axisFloor:"\u7EB5\u8F74\u4ECE {value} \u8D77\uFF0C\u4EE5\u4FBF\u770B\u6E05\u53D8\u52A8\u3002",mismatch:"\u300C{label}\u300D\u5199\u7684\u662F {stated}\uFF0C\u5404\u9879\u7D2F\u8BA1\u4E3A {computed}\uFF0C\u4E24\u8005\u5BF9\u4E0D\u4E0A\u3002",share:"\u5360\u6BD4",noBreakdown:"\u8FD9\u4E00\u6B65\u6CA1\u6709\u5217\u51FA\u6784\u6210\u3002",breakdownGap:"\u660E\u7EC6\u5408\u8BA1 {sum}\uFF0C\u4E0E\u8FD9\u4E00\u6B65\u7684 {value} \u76F8\u5DEE {gap}\u3002",readAll:"\u4EE5\u8868\u683C\u9605\u8BFB\u5168\u90E8\u6B65\u9AA4\uFF08{count}\uFF09","column.step":"\u6B65\u9AA4","column.kind":"\u7C7B\u578B","column.value":"\u53D8\u52A8","column.level":"\u7D2F\u8BA1"},en:{title:"Waterfall","kind.total":"Total","kind.up":"Increase","kind.down":"Decrease",chart:"Step-by-step change from opening to closing value",step:"{label}, {kind} {value}",hint:"Click a bar or use the arrow keys to see what makes up that step.",axisFloor:"The axis starts at {value} so the changes stay visible.",mismatch:"\u201C{label}\u201D states {stated}, but the steps add up to {computed}.",share:"Share",noBreakdown:"No breakdown is listed for this step.",breakdownGap:"Items add up to {sum}, {gap} away from this step's {value}.",readAll:"Read every step as a table ({count})","column.step":"Step","column.kind":"Kind","column.value":"Change","column.level":"Running total"}});var t=A(C(),1),u=300,s={left:52,right:8,top:28,bottom:12},de=64;function we(){let m=(0,c.useRef)(null),[i,b]=(0,c.useState)(640);return(0,c.useEffect)(()=>{let l=m.current;if(!l)return;let a=new ResizeObserver(([n])=>b(n.contentRect.width));return a.observe(l),()=>a.disconnect()},[]),[m,i]}function pe(m,i){let b=(i-m)/4,l=10**Math.floor(Math.log10(b)),a=[1,2,2.5,5,10].map(d=>d*l).find(d=>d>=b)??b,n=[];for(let d=Math.ceil(m/a)*a;d<=i+a*1e-6;d+=a)n.push(Number(d.toPrecision(12)));return n}function Ne({data:m}){let i=q(_),b=V(),l=m,a=l.steps,n=l.format??{},d=l.upIsGood??!0,J=(0,c.useMemo)(()=>new Intl.NumberFormat(b,{minimumFractionDigits:n.decimals??0,maximumFractionDigits:n.decimals??0}),[b,n.decimals]),Q=(0,c.useMemo)(()=>new Intl.NumberFormat(b,{maximumFractionDigits:n.decimals??0}),[b,n.decimals]),f=(e,o=!1,h=!1)=>{let D=(h?Q:J).format(Math.abs(e)/(n.divisor??1));return`${e<0?"\u2212":o&&e>0?"+":""}${n.prefix??""}${D}${n.suffix??""}`},y=e=>e.kind==="total"?f(e.value):f(e.kind==="down"?-e.value:e.value,!0),F=e=>e==="total"||e==="neutral"?"total":e==="up"===d?"good":"bad",{spans:N}=P(a),E=N.map((e,o)=>a[o].kind==="total"?a[o].value:a[o].kind==="down"?e[0]:e[1]),U=j(l),[Y,M]=(0,c.useState)(()=>l.initialStep??a[1]?.id??a[0].id),r=a.find(e=>e.id===Y)??a[0],[Z,ee]=we(),K=(0,c.useRef)(null),G=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=()=>{G.current&&(G.current.open=!0)};return window.addEventListener("beforeprint",e),()=>window.removeEventListener("beforeprint",e)},[]);let g=Math.max(ee,s.left+s.right+a.length*de),z=Math.max(...N.map(e=>e[1])),te=Math.min(...N.map(e=>e[0])),w=l.axisFloor??Math.min(0,te),I=pe(w,z>w?z:w+1),oe=Math.max(z,I[I.length-1]??z),p=e=>s.top+(1-(Math.max(e,w)-w)/(oe-w||1))*(u-s.top-s.bottom),k=(g-s.left-s.right)/a.length,S=Math.min(k*.6,72),L=e=>s.left+e*k+(k-S)/2,T=w>0,ae=e=>{let o=a[(e+a.length)%a.length];M(o.id),K.current?.querySelector(`[data-step="${CSS.escape(o.id)}"]`)?.focus()},le=(e,o)=>{e.key==="Enter"||e.key===" "?(e.preventDefault(),M(a[o].id)):(e.key==="ArrowRight"||e.key==="ArrowLeft")&&(e.preventDefault(),ae(o+(e.key==="ArrowRight"?1:-1)))},v=r.breakdown?.items??[],x=v.reduce((e,o)=>e+o.value,0),se=Math.max(1e-9,...v.map(e=>Math.abs(e.value))),ie=.5*(n.divisor??1)/10**(n.decimals??0),ne=v.length>0&&Math.abs(x-Math.abs(r.value))>ie,B=e=>i(`kind.${e}`);return(0,t.jsxs)("section",{className:"sb-block wf-block","aria-label":X(l.title,i("title")),children:[l.eyebrow&&(0,t.jsx)("div",{className:"wf-eyebrow",children:l.eyebrow}),l.title&&(0,t.jsx)("h3",{className:"wf-title",children:l.title}),l.narrative&&(0,t.jsx)("p",{className:"wf-story",children:l.narrative}),l.headlines&&l.headlines.length>0&&(0,t.jsx)("dl",{className:"wf-heads",children:l.headlines.map((e,o)=>(0,t.jsxs)("div",{className:"wf-head",children:[(0,t.jsx)("dt",{children:e.label}),(0,t.jsxs)("dd",{children:[(0,t.jsx)("b",{children:e.value}),e.detail&&(0,t.jsx)("span",{className:`wf-tone-${F(e.tone??"neutral")}`,children:e.detail})]})]},o))}),(0,t.jsxs)("div",{className:"wf-body",children:[(0,t.jsxs)("figure",{className:"wf-chart",children:[(0,t.jsx)("div",{className:"wf-scroll",ref:Z,children:(0,t.jsxs)("div",{className:"wf-canvas",style:{width:g,height:u+44},children:[(0,t.jsxs)("svg",{width:g,height:u,role:"group","aria-label":i("chart"),children:[I.map(e=>(0,t.jsxs)("g",{"aria-hidden":"true",children:[(0,t.jsx)("line",{className:"wf-gridline",x1:s.left,x2:g-s.right,y1:p(e),y2:p(e)}),(0,t.jsx)("text",{className:"wf-tick",x:s.left-8,y:p(e)+4,textAnchor:"end",children:f(e,!1,!0)})]},e)),w<0&&(0,t.jsx)("line",{className:"wf-zero","aria-hidden":"true",x1:s.left,x2:g-s.right,y1:p(0),y2:p(0)}),T&&(0,t.jsxs)("g",{className:"wf-break","aria-hidden":"true",children:[(0,t.jsx)("path",{d:`M${s.left-5} ${u-s.bottom+2} l5 -5 l5 5`}),(0,t.jsx)("path",{d:`M${s.left-5} ${u-s.bottom+8} l5 -5 l5 5`})]}),(0,t.jsx)("g",{ref:K,children:a.map((e,o)=>{let[h,D]=N[o],$=L(o),R=p(D),re=Math.max(2,p(h)-R),W=e.id===r.id,ce=o<a.length-1;return(0,t.jsxs)("g",{className:`wf-bar wf-tone-${F(e.kind)}${W?" is-active":""}`,"data-step":e.id,tabIndex:0,role:"button","aria-pressed":W,"aria-label":i("step",{label:e.label,kind:B(e.kind),value:y(e)}),onClick:()=>M(e.id),onKeyDown:fe=>le(fe,o),children:[(0,t.jsx)("rect",{className:"wf-slot",x:s.left+o*k+2,y:s.top-24,width:k-4,height:u-s.top+22,rx:8}),(0,t.jsx)("rect",{className:"wf-fill",x:$,y:R,width:S,height:re,rx:3}),ce&&(0,t.jsx)("line",{className:"wf-connector",x1:$+S,x2:L(o+1),y1:p(E[o]),y2:p(E[o])}),(0,t.jsx)("text",{className:"wf-value",x:$+S/2,y:R-7,textAnchor:"middle",children:y(e)})]},e.id)})})]}),(0,t.jsx)("div",{className:"wf-labels",style:{top:u},"aria-hidden":"true",children:a.map((e,o)=>(0,t.jsx)("span",{className:e.id===r.id?"is-active":void 0,style:{left:s.left+o*k,width:k},onClick:()=>M(e.id),children:e.label},e.id))})]})}),(0,t.jsxs)("figcaption",{children:[l.axisNote??(T?i("axisFloor",{value:f(w)}):null),U.map(e=>(0,t.jsx)("span",{className:"wf-warn",role:"status",children:i("mismatch",{label:a.find(o=>o.id===e.id).label,stated:f(e.stated),computed:f(e.computed)})},e.id))]})]}),(0,t.jsxs)("aside",{className:`wf-side wf-tone-${F(r.kind)}`,"aria-live":"polite",children:[(0,t.jsxs)("div",{className:"wf-side-top",children:[(0,t.jsx)("span",{children:r.label}),(0,t.jsx)("b",{children:y(r)})]}),r.breakdown?.title&&(0,t.jsx)("div",{className:"wf-side-title",children:r.breakdown.title}),v.length>0?(0,t.jsx)("ul",{children:v.map((e,o)=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("div",{className:"wf-row",children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsxs)("span",{className:"wf-num",children:[f(e.value),(0,t.jsx)("em",{"aria-label":i("share"),children:x?`${Math.round(e.value/x*100)}%`:"\u2013"})]})]}),(0,t.jsx)("div",{className:"wf-track","aria-hidden":"true",children:(0,t.jsx)("span",{style:{width:`${Math.abs(e.value)/se*100}%`}})})]},o))}):(0,t.jsx)("p",{className:"wf-muted",children:i("noBreakdown")}),ne&&(0,t.jsx)("p",{className:"wf-muted",children:i("breakdownGap",{sum:f(x),value:f(Math.abs(r.value)),gap:f(Math.abs(x-Math.abs(r.value)))})}),r.breakdown?.note&&(0,t.jsx)("p",{className:"wf-note",children:r.breakdown.note}),(0,t.jsx)("p",{className:"wf-hint",children:i("hint")})]})]}),(0,t.jsxs)("details",{className:"wf-static",ref:G,children:[(0,t.jsx)("summary",{children:i("readAll",{count:a.length})}),(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:i("column.step")}),(0,t.jsx)("th",{children:i("column.kind")}),(0,t.jsx)("th",{children:i("column.value")}),(0,t.jsx)("th",{children:i("column.level")})]})}),(0,t.jsx)("tbody",{children:a.map((e,o)=>(0,t.jsxs)("tr",{children:[(0,t.jsxs)("td",{children:[e.label,e.breakdown&&e.breakdown.items.length>0&&(0,t.jsx)("div",{className:"wf-muted",children:e.breakdown.items.map(h=>`${h.label} ${f(h.value)}`).join(" \xB7 ")})]}),(0,t.jsx)("td",{children:B(e.kind)}),(0,t.jsx)("td",{children:y(e)}),(0,t.jsx)("td",{children:f(E[o])})]},e.id))})]})]})]})}export{Ne as WaterfallBlock};
@@ -0,0 +1 @@
1
+ import{Ab as A,Bb as w,Na as y,c as B,lb as h,mb as a,nb as $,qb as x,rb as R}from"./chunk-H7ALO2Q6.js";import{a as T}from"./chunk-J6IRWTF7.js";import{c as s}from"./chunk-DCANE7XH.js";var c=s(B(),1),S=s($(),1),H=s(a(),1),b=(0,c.createContext)(null),z=(0,c.createContext)(null);function C({children:e}){let t=(0,c.useContext)(b);return t?t.selected&&t.target?(0,S.createPortal)(e,t.target):null:e}function E({children:e}){let t=(0,c.useContext)(b);return t?t.target?(0,S.createPortal)((0,H.jsx)("div",{className:"board-component-settings","data-surface-ui":!0,hidden:!t.selected,onKeyDown:o=>{o.key==="Escape"&&t.closeSettings&&(o.preventDefault(),o.stopPropagation(),t.closeSettings(),t.target?.querySelector(".sb-actions > button.sb-icon-button.is-active:last-child")?.focus({preventScroll:!0}))},children:e}),t.target):null:e}var r=s(a(),1),I=(e,t=!0)=>(w(),{className:"showai-note","data-showai-note":e,...t?{tabIndex:0}:{}});function v({text:e,focusable:t=!0}){return(0,r.jsx)(r.Fragment,{children:x(e).map((o,i)=>o.type==="note"?(0,r.jsx)("span",{...I(o.note,t),children:o.text},i):o.text)})}function q({text:e}){return(0,r.jsx)(r.Fragment,{children:x(e).map((t,o)=>t.type==="note"?(0,r.jsx)("tspan",{...I(t.note,!1),children:t.text},o):t.text)})}var f=s(B(),1);var L=T("blocks",{"zh-CN":{blockActions:"\u7EC4\u4EF6\u64CD\u4F5C",closeSettings:"\u5173\u95ED\u8BBE\u7F6E",editBlock:"\u7F16\u8F91\u533A\u5757"},en:{blockActions:"Block actions",closeSettings:"Close settings",editBlock:"Edit block"}});var n=s(a(),1),M=new Set(["\u6570\u636E\u56FE\u8868|\u6570\u636E\u5E93|\u5173\u952E\u6307\u6807|\u4EA4\u4E92\u8BA1\u7B97|\u56FE\u7247\u753B\u5ECA|\u4EA4\u4E92\u6D41\u7A0B\u56FE|\u601D\u7EF4\u5BFC\u56FE|G2 \u56FE\u8868|\u56FE\u8868","\u67F1\u72B6\u56FE|\u6298\u7EBF\u56FE|\u9762\u79EF\u56FE|\u6563\u70B9\u56FE|\u6C14\u6CE1\u56FE|\u5206\u7EC4\u67F1\u72B6\u56FE|\u53CC\u5411\u6761\u5F62\u56FE|\u96F7\u8FBE\u56FE|\u5F84\u5411\u6761\u5F62\u56FE|\u5E73\u884C\u5750\u6807|\u56DE\u5F52\u66F2\u7EBF","\u997C\u56FE|\u73AF\u56FE|\u5806\u53E0\u67F1\u72B6\u56FE|\u5806\u53E0\u9762\u79EF\u56FE|\u73AB\u7470\u56FE|\u9A6C\u8D5B\u514B\u56FE|\u77E9\u5F62\u6811\u56FE|\u65ED\u65E5\u56FE|\u6F0F\u6597\u56FE","\u76F4\u65B9\u56FE|\u7BB1\u7EBF\u56FE|\u5C0F\u63D0\u7434\u56FE|\u5206\u5E03\u66F2\u7EBF|\u5BC6\u5EA6\u70ED\u529B\u56FE|\u8272\u5757\u56FE|\u7B49\u9AD8\u7EBF\u56FE|\u830E\u53F6\u56FE","\u6851\u57FA\u56FE|\u5F26\u56FE|\u5F27\u56FE|\u5706\u5F62\u6253\u5305\u56FE|\u97E6\u6069\u56FE|\u7518\u7279\u56FE|K \u7EBF\u56FE|Kagi \u8F6C\u5411\u56FE|\u87BA\u65CB\u56FE","\u5206\u7EA7\u8BBE\u8272\u5730\u56FE|\u70B9\u5730\u56FE|\u6C14\u6CE1\u5730\u56FE|\u4EEA\u8868\u76D8|\u5B50\u5F39\u56FE|\u8BCD\u4E91"].join("|").split("|"));function Y(e,t){return typeof e=="string"&&e.trim()&&!M.has(e.trim())?R(e):t}function Z({title:e,defaultTitle:t,description:o,editable:i,editing:l,onEdit:p,children:g}){let u=A(L),m=(0,f.useContext)(b);(0,f.useLayoutEffect)(()=>{if(!(!m||!l||!p))return m.closeSettings=p,()=>{m.closeSettings===p&&delete m.closeSettings}},[m,l,p]);let d=e?.trim(),k=d&&d!==t&&!M.has(d)?d:"",N=!!(k||o?.trim());return!N&&!g&&!i?null:(0,n.jsxs)("div",{className:`sb-header${N?" has-caption":""}${l?" is-editing":""}`,children:[N&&(0,n.jsxs)("div",{className:"sb-heading",children:[k&&(0,n.jsx)("div",{className:"sb-title",children:(0,n.jsx)(v,{text:k})}),o?.trim()&&(0,n.jsx)("p",{className:"sb-description",children:(0,n.jsx)(v,{text:o})})]}),(g||i)&&(0,n.jsx)(C,{children:(0,n.jsxs)("div",{className:"sb-actions",role:"group","aria-label":u("blockActions"),children:[g,i&&(0,n.jsx)("button",{type:"button",className:`sb-icon-button ${l?"is-active":""}`,onClick:p,"aria-label":u(l?"closeSettings":"editBlock"),title:u(l?"closeSettings":"editBlock"),children:l?(0,n.jsx)(h,{size:16}):(0,n.jsx)(y,{size:16})})]})})]})}function _({icon:e,title:t,description:o,action:i}){return(0,n.jsxs)("div",{className:"sb-empty",children:[e,(0,n.jsx)("strong",{children:t}),o&&(0,n.jsx)("p",{children:o}),i]})}function j({label:e,children:t,className:o=""}){return(0,n.jsxs)("label",{className:`sb-field ${o}`,children:[(0,n.jsx)("span",{children:e}),t]})}export{b as a,z as b,C as c,E as d,I as e,v as f,q as g,Y as h,Z as i,_ as j,j as k};