@davidbalzan/groundwork-console 0.1.0 → 0.1.3

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 (97) hide show
  1. package/README.md +44 -0
  2. package/bin/groundwork-console.mjs +12 -3
  3. package/dist/kitresolve.js +17 -0
  4. package/dist/server.js +31 -3
  5. package/dist/skills.js +13 -5
  6. package/package.json +1 -1
  7. package/public/assets/{abnfDiagram-N423BO3Z-DPhyKd1N.js → abnfDiagram-N423BO3Z-B9qt2Lrn.js} +1 -1
  8. package/public/assets/{arc-DmkLmHHi.js → arc-Bu5e98OE.js} +1 -1
  9. package/public/assets/architecture-TIHT7OUA-Bga-lAng.js +1 -0
  10. package/public/assets/{architectureDiagram-T3A2C74G-BXFkjpze.js → architectureDiagram-T3A2C74G-C9YgdNEk.js} +1 -1
  11. package/public/assets/{blockDiagram-VBNYF7ZC-Ddhca5b4.js → blockDiagram-VBNYF7ZC-KV2ZfVrI.js} +1 -1
  12. package/public/assets/{c4Diagram-5PPSVZJV-D4M2Oz2j.js → c4Diagram-5PPSVZJV-BOIhWD29.js} +1 -1
  13. package/public/assets/channel-BdIShFYL.js +1 -0
  14. package/public/assets/{chunk-2GRJ4B5K-B2cLnEJA.js → chunk-2GRJ4B5K-BOYqDFv-.js} +1 -1
  15. package/public/assets/{chunk-4I5QYGJK-CVuqmZe1.js → chunk-4I5QYGJK-aPXqNUlF.js} +1 -1
  16. package/public/assets/{chunk-5RXB4S5H-CAj33Qry.js → chunk-5RXB4S5H-BESU8h4l.js} +1 -1
  17. package/public/assets/{chunk-6Q2QTUOP-B6kTvnZS.js → chunk-6Q2QTUOP-Dy_tviVm.js} +1 -1
  18. package/public/assets/{chunk-7Z6QIM7H-BCYMaGkK.js → chunk-7Z6QIM7H-CViytsd0.js} +1 -1
  19. package/public/assets/{chunk-GF5L2VYU-eAfQwP-A.js → chunk-GF5L2VYU-Bw_WxctK.js} +1 -1
  20. package/public/assets/{chunk-I66GZJ75-DyWmv43M.js → chunk-I66GZJ75-CyLcz-VG.js} +1 -1
  21. package/public/assets/{chunk-JQJVKLGR-xpwVLHiM.js → chunk-JQJVKLGR-BehQOyT2.js} +1 -1
  22. package/public/assets/{chunk-KBJHAD2P-BsIw_3BM.js → chunk-KBJHAD2P-Cv0WMvkU.js} +1 -1
  23. package/public/assets/{chunk-NSK5VX7P-Dy4p7ORp.js → chunk-NSK5VX7P-Duq5i1Q8.js} +1 -1
  24. package/public/assets/{chunk-QR6OTTB3-D8k2NFkq.js → chunk-QR6OTTB3-Xi-RqgB3.js} +1 -1
  25. package/public/assets/{chunk-RYQCIY6F-TbGMiTbW.js → chunk-RYQCIY6F-pkCoj5q-.js} +1 -1
  26. package/public/assets/{chunk-UBXNYLIW-By3VqDlw.js → chunk-UBXNYLIW-BRvAYX25.js} +1 -1
  27. package/public/assets/{chunk-W5SLKNZC-B6TSWP8U.js → chunk-W5SLKNZC-Bjt98ztx.js} +1 -1
  28. package/public/assets/{chunk-WRU74C26-CqCOF3fo.js → chunk-WRU74C26-a9B5o7qU.js} +1 -1
  29. package/public/assets/{chunk-XXDRQBXY-B6BeKGFV.js → chunk-XXDRQBXY-KvoTdu-7.js} +1 -1
  30. package/public/assets/classDiagram-JCYQIIEL-D2R4WmWG.js +1 -0
  31. package/public/assets/classDiagram-v2-OCEON4UE-D2R4WmWG.js +1 -0
  32. package/public/assets/{cose-bilkent-JH36ORCC-2ieLCSa1.js → cose-bilkent-JH36ORCC-N6ziZwxK.js} +1 -1
  33. package/public/assets/{cynefin-VYW2F7L2-BfajhBFb.js → cynefin-VYW2F7L2-CIULy749.js} +1 -1
  34. package/public/assets/{cynefinDiagram-MW4NZA55-DZFY7WjS.js → cynefinDiagram-MW4NZA55-Du-pmosA.js} +1 -1
  35. package/public/assets/{dagre-VZM6K2ZE-DECeuEL2.js → dagre-VZM6K2ZE-HGby89Zn.js} +1 -1
  36. package/public/assets/{diagram-7IWD3JNH-DA6fCDep.js → diagram-7IWD3JNH-B7q3-bCI.js} +1 -1
  37. package/public/assets/{diagram-B4RE2ZJO-Dj8QoIQR.js → diagram-B4RE2ZJO-YWiWiMdK.js} +1 -1
  38. package/public/assets/{diagram-LBJQPF4R-9JYAugOO.js → diagram-LBJQPF4R-BPCYGRvd.js} +1 -1
  39. package/public/assets/{diagram-Q27KOJAE-ecTfssa6.js → diagram-Q27KOJAE-B2LXUwVb.js} +1 -1
  40. package/public/assets/{diagram-UB23O5K3-DOGgwSDm.js → diagram-UB23O5K3-BNVtmpPQ.js} +1 -1
  41. package/public/assets/{dist-DTWyzWtG.js → dist-BVRuovsg.js} +1 -1
  42. package/public/assets/{ebnfDiagram-BXEA7PRR-BGmWK80p.js → ebnfDiagram-BXEA7PRR-BWXGcOBy.js} +1 -1
  43. package/public/assets/{erDiagram-JOGREHBK-CNl1QvhN.js → erDiagram-JOGREHBK-Bs7Rt9fE.js} +1 -1
  44. package/public/assets/eventmodeling-45OFAUF4-DNrXe8VH.js +1 -0
  45. package/public/assets/flowDiagram-UKHOOZJN-Bx68YkAo.js +1 -0
  46. package/public/assets/{ganttDiagram-PKOTCBZU-C01y-MjT.js → ganttDiagram-PKOTCBZU-76WOMwTJ.js} +1 -1
  47. package/public/assets/{gitGraph-TEB2WS4Q-BW4zQmf5.js → gitGraph-TEB2WS4Q-ChX3jwy9.js} +1 -1
  48. package/public/assets/{gitGraphDiagram-DS77QQ5N-CnlU6XMJ.js → gitGraphDiagram-DS77QQ5N-Df90jw60.js} +1 -1
  49. package/public/assets/{index-DrqxoBmk.js → index-Duxs51eO.js} +3 -3
  50. package/public/assets/{info-DKCQHKI2--A5cJC9V.js → info-DKCQHKI2-B4sk1tEu.js} +1 -1
  51. package/public/assets/{infoDiagram-6WML65LV-Cz2UOAMW.js → infoDiagram-6WML65LV-CwHXQy_Y.js} +1 -1
  52. package/public/assets/{ishikawaDiagram-WSZJBQD7-B4Iqm47_.js → ishikawaDiagram-WSZJBQD7-9Wx7fEa-.js} +1 -1
  53. package/public/assets/{journeyDiagram-NVQOT4AX-BU0js6EE.js → journeyDiagram-NVQOT4AX-YjyFj4j3.js} +1 -1
  54. package/public/assets/{kanban-definition-27J2QSJJ-DmeEPzz0.js → kanban-definition-27J2QSJJ-CCSVpJmG.js} +1 -1
  55. package/public/assets/{line-Dxi6NubD.js → line-BNlogVke.js} +1 -1
  56. package/public/assets/{linear-tama2Fqh.js → linear-DtHynSNJ.js} +1 -1
  57. package/public/assets/{mermaid-parser.core-bGhrBY9T.js → mermaid-parser.core-Tzw7YIHZ.js} +3 -3
  58. package/public/assets/{mermaid.core-_OoTZaAK.js → mermaid.core-BYlHVIMn.js} +4 -4
  59. package/public/assets/{mindmap-definition-FAOFIHXS-BRJt4F9_.js → mindmap-definition-FAOFIHXS-D3RdOamQ.js} +1 -1
  60. package/public/assets/{packet-7NZHBO7P-DAZsca60.js → packet-7NZHBO7P-Gg9ynt_Q.js} +1 -1
  61. package/public/assets/{pegDiagram-VL7TDLO6-2k0rcz9N.js → pegDiagram-VL7TDLO6-CF8QpCrl.js} +1 -1
  62. package/public/assets/{pie-RZYD4A2V-ojW1YX_G.js → pie-RZYD4A2V-tZaCjWV1.js} +1 -1
  63. package/public/assets/{pieDiagram-7S7Q4E2Y-CrrciDrS.js → pieDiagram-7S7Q4E2Y-q9v-b_KS.js} +1 -1
  64. package/public/assets/{quadrantDiagram-CIZ2JOQS-Dj5lMd95.js → quadrantDiagram-CIZ2JOQS-C1jEdjlT.js} +1 -1
  65. package/public/assets/{radar-I7S5WNFK-flsKqrK_.js → radar-I7S5WNFK-Dq9mh9W6.js} +1 -1
  66. package/public/assets/{railroad-3IZDKUUU-BX9H_OcC.js → railroad-3IZDKUUU-Di1R2Dd0.js} +1 -1
  67. package/public/assets/railroad-abnf-AHOZXSZD-CUlgmRQa.js +1 -0
  68. package/public/assets/railroad-ebnf-EBAXGLYW-sFLjr1iD.js +1 -0
  69. package/public/assets/railroad-peg-LSFZ7HO6-BjRYu4TF.js +1 -0
  70. package/public/assets/{railroadDiagram-AXF67PYL-BRNOv6Sh.js → railroadDiagram-AXF67PYL-LvRdE_s1.js} +1 -1
  71. package/public/assets/{requirementDiagram-LRYGKXZP-BqJbwH3b.js → requirementDiagram-LRYGKXZP-BnZ07FeK.js} +1 -1
  72. package/public/assets/{sankeyDiagram-W5VNT64P-BE7fRCAN.js → sankeyDiagram-W5VNT64P-E8-ON6IS.js} +1 -1
  73. package/public/assets/{sequenceDiagram-SI44F4Z6-Cwt-L1ko.js → sequenceDiagram-SI44F4Z6-DlVaUXz0.js} +1 -1
  74. package/public/assets/{src-Bc2f8joo.js → src-qdf2s-T4.js} +1 -1
  75. package/public/assets/{stateDiagram-OKZ733FA-etLHG0qi.js → stateDiagram-OKZ733FA-B9ThZGE5.js} +1 -1
  76. package/public/assets/stateDiagram-v2-UEYNNEHI-Bt0yXMXs.js +1 -0
  77. package/public/assets/{swimlanes-SLNWSIFB-B06NxeYI.js → swimlanes-SLNWSIFB-DtPuEFdj.js} +1 -1
  78. package/public/assets/swimlanesDiagram-ULZ7WXOC-MLUjmCjx.js +8 -0
  79. package/public/assets/{timeline-definition-Z64GVDOM-BihNR1uq.js → timeline-definition-Z64GVDOM-BR4Z5jFy.js} +1 -1
  80. package/public/assets/{treeView-QDETBFTQ-CImTfOYf.js → treeView-QDETBFTQ-BgvlYe1u.js} +1 -1
  81. package/public/assets/{treemap-6X3UGDF4-DBRjbghn.js → treemap-6X3UGDF4-BIP2RMFS.js} +1 -1
  82. package/public/assets/{vennDiagram-T6HMQDX7-HcbmXJRd.js → vennDiagram-T6HMQDX7-DA80iXM-.js} +1 -1
  83. package/public/assets/{wardley-OPB4EBWU-xY5d-6YU.js → wardley-OPB4EBWU-Dcxb0gTX.js} +1 -1
  84. package/public/assets/{wardleyDiagram-T6FBY63Y-B6KN3TYi.js → wardleyDiagram-T6FBY63Y-i2RYxGIr.js} +1 -1
  85. package/public/assets/{xychartDiagram-ELKLHX3M-AAW8Pwrl.js → xychartDiagram-ELKLHX3M-BWEBGjsc.js} +1 -1
  86. package/public/index.html +1 -1
  87. package/public/assets/architecture-TIHT7OUA-MgcjoiPc.js +0 -1
  88. package/public/assets/channel-BAs2g7Wn.js +0 -1
  89. package/public/assets/classDiagram-JCYQIIEL-D8vKmZUF.js +0 -1
  90. package/public/assets/classDiagram-v2-OCEON4UE-D8vKmZUF.js +0 -1
  91. package/public/assets/eventmodeling-45OFAUF4-GcvHanur.js +0 -1
  92. package/public/assets/flowDiagram-UKHOOZJN-DdgmWP6g.js +0 -1
  93. package/public/assets/railroad-abnf-AHOZXSZD-DD8mz__c.js +0 -1
  94. package/public/assets/railroad-ebnf-EBAXGLYW-CWer5P7V.js +0 -1
  95. package/public/assets/railroad-peg-LSFZ7HO6-DDrRJYYw.js +0 -1
  96. package/public/assets/stateDiagram-v2-UEYNNEHI-Crgtg4pC.js +0 -1
  97. package/public/assets/swimlanesDiagram-ULZ7WXOC-C8S-XAyy.js +0 -8
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-_OoTZaAK.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-Bc2f8joo.js","assets/chunk-I66GZJ75-DyWmv43M.js","assets/chunk-NSK5VX7P-Dy4p7ORp.js","assets/dist-DTWyzWtG.js","assets/chunk-4I5QYGJK-CVuqmZe1.js","assets/chunk-WRU74C26-CqCOF3fo.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-UBXNYLIW-By3VqDlw.js","assets/chunk-W5SLKNZC-B6TSWP8U.js","assets/chunk-QR6OTTB3-D8k2NFkq.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-7Z6QIM7H-BCYMaGkK.js","assets/line-Dxi6NubD.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-BYlHVIMn.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-qdf2s-T4.js","assets/chunk-I66GZJ75-CyLcz-VG.js","assets/chunk-NSK5VX7P-Duq5i1Q8.js","assets/dist-BVRuovsg.js","assets/chunk-4I5QYGJK-aPXqNUlF.js","assets/chunk-WRU74C26-a9B5o7qU.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-UBXNYLIW-BRvAYX25.js","assets/chunk-W5SLKNZC-Bjt98ztx.js","assets/chunk-QR6OTTB3-Xi-RqgB3.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-7Z6QIM7H-CViytsd0.js","assets/line-BNlogVke.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js"])))=>i.map(i=>d[i]);
2
2
  var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=o(((e,t)=>{t.exports=m()})),g=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=o((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var P=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function L(e){return{current:e}}function R(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function z(e,t){re++,ne[re]=e.current,e.current=t}var ie=L(null),ae=L(null),oe=L(null),se=L(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(ie),z(ie,e)}function le(){R(ie),R(ae),R(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Hd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(R(ie),R(ae)),se.current===e&&(R(se),Qf._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -21,7 +21,7 @@ Error generating stack: `+e.message+`
21
21
  `),t=t.replace(Dc,`�`),e.src=t}function kc(e){let t;e.inlineMode?(t=new e.Token(`inline`,``,0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Ac(e){let t=e.tokens,n=0;for(let e=0;e<t.length;e++)t[e].type!==`reference_definition`&&(e!==n&&(t[n]=t[e]),n++);t.length!==n&&(t.length=n)}function jc(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];r.type===`inline`&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function Mc(e){return/^<a[>\s]/i.test(e)}function Nc(e){return/^<\/a\s*>/i.test(e)}function Pc(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!==`inline`||!e.md.linkify.test(t[n].content))continue;let r=t[n].children,i=0;for(let a=r.length-1;a>=0;a--){let o=r[a];if(o.type===`link_close`){for(a--;r[a].level!==o.level&&r[a].type!==`link_open`;)a--;continue}if(o.type===`html_inline`&&(Mc(o.content)&&i>0&&i--,Nc(o.content)&&i++),!(i>0)&&o.type===`text`&&e.md.linkify.test(o.content)){let i=o.content,s=e.md.linkify.match(i),c=[],l=o.level,u=0;s.length>0&&s[0].index===0&&a>0&&r[a-1].type===`text_special`&&(s=s.slice(1));for(let t=0;t<s.length;t++){let n=s[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let a=s[t].text;a=s[t].schema?s[t].schema===`mailto:`&&!/^mailto:/i.test(a)?e.md.normalizeLinkText(`mailto:${a}`).replace(/^mailto:/,``):e.md.normalizeLinkText(a):e.md.normalizeLinkText(`http://${a}`).replace(/^http:\/\//,``);let o=s[t].index;if(o>u){let t=new e.Token(`text`,``,0);t.content=i.slice(u,o),t.level=l,c.push(t)}let d=new e.Token(`link_open`,`a`,1);d.attrs=[[`href`,r]],d.level=l++,d.markup=`linkify`,d.info=`auto`,c.push(d);let f=new e.Token(`text`,``,0);f.content=a,f.level=l,c.push(f);let p=new e.Token(`link_close`,`a`,-1);p.level=--l,p.markup=`linkify`,p.info=`auto`,c.push(p),u=s[t].lastIndex}if(u<i.length){let t=new e.Token(`text`,``,0);t.content=i.slice(u),t.level=l,c.push(t)}t[n].children=r=Us(r,a,c)}}}}var Fc=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Ic=/\((c|tm|r)\)/i,Lc=/\((c|tm|r)\)/gi,Rc={c:`©`,r:`®`,tm:`™`};function zc(e,t){return Rc[t.toLowerCase()]}function Bc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&(r.content=r.content.replace(Lc,zc)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function Vc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&Fc.test(r.content)&&(r.content=r.content.replace(/\+-/g,`±`).replace(/\.{2,}/g,`…`).replace(/([?!])…/g,`$1..`).replace(/([?!]){4,}/g,`$1$1$1`).replace(/,{2,}/g,`,`).replace(/(^|[^-])---(?=[^-]|$)/gm,`$1—`).replace(/(^|\s)--(?=\s|$)/gm,`$1–`).replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,`$1–`)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function Hc(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(Ic.test(e.tokens[t].content)&&Bc(e.tokens[t].children),Fc.test(e.tokens[t].content)&&Vc(e.tokens[t].children))}var Uc=/['"]/,Wc=/['"]/g,Gc=`’`;function Kc(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function qc(e,t){let n=``,r=0;t.sort((e,t)=>e.pos-t.pos);for(let i=0;i<t.length;i++){let a=t[i];n+=e.slice(r,a.pos)+a.ch,r=a.pos+1}return n+e.slice(r)}function Jc(e,t){let n,r=[],i={};for(let a=0;a<e.length;a++){let o=e[a],s=e[a].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,o.type!==`text`)continue;let c=o.content,l=0,u=c.length;OUTER:for(;l<u;){Wc.lastIndex=l;let o=Wc.exec(c);if(!o)break;let d=!0,f=!0;l=o.index+1;let p=o[0]===`'`,m=32;if(o.index-1>=0)m=c.charCodeAt(o.index-1);else for(n=a-1;n>=0&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(l<u)h=c.charCodeAt(l);else for(n=a+1;n<e.length&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}let g=lc(m)||cc(m),_=lc(h)||cc(h),v=oc(m),y=oc(h);if(y?d=!1:_&&(v||g||(d=!1)),v?f=!1:g&&(y||_||(f=!1)),h===34&&o[0]===`"`&&m>=48&&m<=57&&(f=d=!1),d&&f&&(d=g,f=_),!d&&!f){p&&Kc(i,a,o.index,Gc);continue}if(f)for(n=r.length-1;n>=0;n--){let e=r[n];if(r[n].level<s)break;if(e.single===p&&r[n].level===s){e=r[n];let s,c;p?(s=t.md.options.quotes[2],c=t.md.options.quotes[3]):(s=t.md.options.quotes[0],c=t.md.options.quotes[1]),Kc(i,a,o.index,c),Kc(i,e.token,e.pos,s),r.length=n;continue OUTER}}d?r.push({token:a,pos:o.index,single:p,level:s}):f&&p&&Kc(i,a,o.index,Gc)}}Object.keys(i).forEach(function(t){let n=Number(t);e[n].content=qc(e[n].content,i[t])})}function Yc(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!Uc.test(e.tokens[t].content)||Jc(e.tokens[t].children,e)}function Xc(e){let t,n,r=e.length;for(t=0;t<r;t++)e[t].type===`text_special`&&(e[t].type=`text`);for(t=n=0;t<r;t++)e[t].type===`text`&&t+1<r&&e[t+1].type===`text`?e[t+1].content=e[t].content+e[t+1].content:(t!==n&&(e[n]=e[t]),n++);t!==n&&(e.length=n)}function Zc(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if(r[e].type!==`inline`)continue;let i=r[e].children,a=i.length;for(t=0;t<a;t++)i[t].type===`text_special`&&(i[t].type=`text`),i[t].children&&Xc(i[t].children);for(t=n=0;t<a;t++)i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var Qc=[[`normalize`,Oc],[`block`,kc],[`strip_references`,Ac],[`inline`,jc],[`linkify`,Pc],[`replacements`,Hc],[`smartquotes`,Yc],[`text_join`,Zc]],$c=class{constructor(){Y(this,`ruler`,new Sc),Y(this,`State`,Tc);for(let e=0;e<Qc.length;e++)this.ruler.push(Qc[e][0],Qc[e][1])}process(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)}},el=class{constructor(e,t,n,r){Y(this,`bMarks`,[]),Y(this,`eMarks`,[]),Y(this,`tShift`,[]),Y(this,`sCount`,[]),Y(this,`bsCount`,[]),Y(this,`blkIndent`,0),Y(this,`line`,0),Y(this,`lineMax`,0),Y(this,`tight`,!1),Y(this,`listIndent`,-1),Y(this,`parentType`,`root`),Y(this,`level`,0),Y(this,`Token`,xc),this.src=e,this.md=t,this.env=n,this.tokens=r;let i=this.src;for(let e=0,t=0,n=0,r=0,a=i.length,o=!1;t<a;t++){let s=i.charCodeAt(t);if(!o){if(ac(s)){n++,s===9?r+=4-r%4:r++;continue}o=!0}(s===10||t===a-1)&&(s!==10&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new xc(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){for(let t=this.src.length;e<t&&ac(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!ac(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return``;let i=Array(t-e);for(let a=0,o=e;o<t;o++,a++){let e=0,s=this.bMarks[o],c=s,l;for(l=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];c<l&&e<n;){let t=this.src.charCodeAt(c);if(ac(t))t===9?e+=4-(e+this.bsCount[o])%4:e++;else if(c-s<this.tShift[o])e++;else break;c++}e>n?i[a]=Array(e-n+1).join(` `)+this.src.slice(c,l):i[a]=this.src.slice(c,l)}return i.join(``)}},tl=65536;function nl(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function rl(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),a=!1,o=0,s=``;for(;r<n;)i===124&&(a?(s+=e.substring(o,r-1),o=r):(t.push(s+e.substring(o,r)),s=``,o=r+1)),a=i===92,r++,i=e.charCodeAt(r);return t.push(s+e.substring(o)),t}function il(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;let o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!ac(s)||o===45&&ac(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!ac(t))return!1;a++}let c=nl(e,t+1),l=c.split(`|`),u=[];for(let e=0;e<l.length;e++){let t=l[e].trim();if(!t){if(e===0||e===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;t.charCodeAt(t.length-1)===58?u.push(t.charCodeAt(0)===58?`center`:`right`):t.charCodeAt(0)===58?u.push(`left`):u.push(``)}if(c=nl(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=rl(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop();let d=l.length;if(d===0||d!==u.length)return!1;if(r)return!0;let f=e.parentType;e.parentType=`table`;let p=e.md.block.ruler.getRules(`blockquote`),m=e.push(`table_open`,`table`,1),h=[t,0];m.map=h;let g=e.push(`thead_open`,`thead`,1);g.map=[t,t+1];let _=e.push(`tr_open`,`tr`,1);_.map=[t,t+1];for(let t=0;t<l.length;t++){let n=e.push(`th_open`,`th`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t].trim(),r.children=[],e.push(`th_close`,`th`,-1)}e.push(`tr_close`,`tr`,-1),e.push(`thead_close`,`thead`,-1);let v,y=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r||(c=nl(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=rl(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>tl))break;if(i===t+2){let n=e.push(`tbody_open`,`tbody`,1);n.map=v=[t+2,0]}let a=e.push(`tr_open`,`tr`,1);a.map=[i,i+1];for(let t=0;t<d;t++){let n=e.push(`td_open`,`td`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t]?l[t].trim():``,r.children=[],e.push(`td_close`,`td`,-1)}e.push(`tr_close`,`tr`,-1)}return v&&(e.push(`tbody_close`,`tbody`,-1),v[1]=i),e.push(`table_close`,`table`,-1),h[1]=i,e.parentType=f,e.line=i,!0}function al(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;let a=e.push(`code_block`,`code`,0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
22
22
  `,a.map=[t,e.line],!0}function ol(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function sl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(ac(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function cl(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!ac(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(o)),!0}function ll(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!ac(e.src.charCodeAt(r))?-1:r}function ul(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!ac(a))?-1:i}function dl(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function fl(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p;if((p=ul(e,c))>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if((p=ll(e,c))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){C=!0;break}if(C)break;if(d){if(p=ul(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=ll(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&dl(e,h),!0}function pl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!ac(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!ac(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&ac(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&ac(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=uc(c.slice(1,l));if(!_)return!1;if(r)return!0;e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d});let v=e.push(`reference_definition`,``,0);v.map=[t,o],v.hidden=!0;let y=Object.create(null);return y.label=_,v.meta=y,e.line=o,!0}var ml=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),hl=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,gl=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,_l=RegExp(`^(?:${hl}|${gl}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),vl=RegExp(`^(?:${hl}|${gl})`),yl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(${ml.join(`|`)})(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(`${vl.source}\\s*$`),/^$/,!1]];function bl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<yl.length&&!yl[s][0].test(o);s++);if(s===yl.length)return!1;if(r)return yl[s][2];let c=t+1,l=yl[s][1].test(``);if(!yl[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(l||!e.isEmpty(c)));c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),yl[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let u=e.push(`html_block`,``,0);return u.map=[t,c],u.content=e.getLines(t,c,e.blkIndent,!0),!0}function xl(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!ac(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&ac(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h${s}`,1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=fc(e.src.slice(i,a)),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h${s}`,-1);return d.markup=`########`.slice(0,s),!0}function Sl(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=i,!1;let c=fc(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;let l=e.push(`heading_open`,`h${a}`,1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h${a}`,-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function Cl(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=fc(e.getLines(t,a,e.blkIndent,!1));e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}var wl=[[`table`,il,[`paragraph`,`reference`]],[`code`,al],[`fence`,ol,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,sl,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,cl,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,fl,[`paragraph`,`reference`,`blockquote`]],[`reference`,pl],[`html_block`,bl,[`paragraph`,`reference`,`blockquote`]],[`heading`,xl,[`paragraph`,`reference`,`blockquote`]],[`lheading`,Sl],[`paragraph`,Cl]],Tl=class{constructor(){Y(this,`ruler`,new Sc),Y(this,`State`,el);for(let e=0;e<wl.length;e++)this.ruler.push(wl[e][0],wl[e][1],{alt:(wl[e][2]||[]).slice()})}tokenize(e,t,n){let r=this.ruler.getRules(``),i=r.length,a=e.md.options.maxNesting,o=t,s=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=n;break}let t=e.line,c=!1;for(let a=0;a<i;a++)if(c=r[a](e,o,n,!1),c){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!c)throw Error(`none of the block rules matched`);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}}parse(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)}},El=class{constructor(e,t,n,r){Y(this,`pos`,0),Y(this,`level`,0),Y(this,`pending`,``),Y(this,`pendingLevel`,0),Y(this,`cache`,{}),Y(this,`backticks`,{}),Y(this,`backticksScanned`,!1),Y(this,`linkLevel`,0),Y(this,`delimiters`,[]),Y(this,`_prev_delimiters`,[]),Y(this,`Token`,xc),this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new xc(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e}push(e,t,n){this.pending&&this.pushPending();let r=new xc(e,t,n),i;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r}scanDelims(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)==55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)==56320){let t=this.src.charCodeAt(e-2);i=(t&64512)==55296?65536+(t-55296<<10)+(i-56320):65533}else(i&64512)==55296&&(i=65533);let a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let o=a-e,s=a<n?this.src.charCodeAt(a):32;if((s&64512)==55296){let e=this.src.charCodeAt(a+1);s=(e&64512)==56320?65536+(s-55296<<10)+(e-56320):65533}else(s&64512)==56320&&(s=65533);let c=lc(i)||cc(i),l=lc(s)||cc(s),u=oc(i),d=oc(s),f=!d&&(!l||u||c),p=!u&&(!c||d||l);return{can_open:f&&(t||!p||c),can_close:p&&(t||!f||l),length:o}}};function Dl(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Ol(e,t){let n=e.pos;for(;n<e.posMax&&!Dl(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var kl=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Al(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=e.pending.match(kl);if(!i)return!1;let a=i[1],o=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!o)return!1;let s=o.url;if(s.length<=a.length)return!1;let c=s.length;for(;c>0&&s.charCodeAt(c-1)===42;)c--;c!==s.length&&(s=s.slice(0,c));let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,l]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(s);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=s.length-a.length,!0}function jl(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t){if(r>=0&&e.pending.charCodeAt(r)===32){if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0)}else e.push(`softbreak`,`br`,0)}for(n++;n<i&&ac(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Ml=[];for(let e=0;e<256;e++)Ml.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){Ml[e.charCodeAt(0)]=1});function Nl(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),ac(i));)n++;return e.pos=n,!0}if(i===32){if(!t){let t=e.push(`text_special`,``,0);t.content=`\\`,t.markup=`\\`,t.info=`escape`}return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\`+a;if(!t){let t=e.push(`text_special`,``,0);t.content=i<256&&Ml[i]!==0?a:o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function Pl(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;let a=e.src.slice(r,n),o=a.length;if(e.backticksScanned&&(e.backticks[o]||0)<=r)return t||(e.pending+=a),e.pos+=o,!0;let s=n,c;for(;(c=e.src.indexOf("`",s))!==-1;){for(s=c+1;s<i&&e.src.charCodeAt(s)===96;)s++;let r=s-c;if(r===o){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=a,t.content=e.src.slice(n,c).replace(/\n/g,` `).replace(/^ (.+) $/,`$1`)}return e.pos=s,!0}e.backticks[r]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=o,!0}function X(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function Fl(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function Z(e){let t=e.tokens_meta,n=e.tokens_meta.length;Fl(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&Fl(e,n)}}var Q={tokenize:X,postProcess:Z};function Il(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function Ll(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function Rl(e){let t=e.tokens_meta,n=e.tokens_meta.length;Ll(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&Ll(e,n)}}var zl={tokenize:Il,postProcess:Rl};function Bl(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),!(!ac(n)&&n!==10));m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),!(!ac(n)&&n!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),!(!ac(n)&&n!==10));m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),r=uc(r),a=e.env.references[r],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];if(t.attrs=n,s&&n.push([`title`,s]),r){let e=Object.create(null);e.label=r,t.meta=e}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}function Vl(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),!(!ac(n)&&n!==10));a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),!(!ac(n)&&n!==10));a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),!(!ac(n)&&n!==10));a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),i=uc(i),o=e.env.references[i],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),a=[[`src`,u],[`alt`,``]];if(n.attrs=a,n.children=t,n.content=r,c&&a.push([`title`,c]),i){let e=Object.create(null);e.label=i,n.meta=e}}return e.pos=a,e.posMax=f,!0}var Hl=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Ul=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Wl(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(Ul.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(Hl.test(a)){let n=e.md.normalizeLink(`mailto:${a}`);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function Gl(e){return/^<a[>\s]/i.test(e)}function Kl(e){return/^<\/a\s*>/i.test(e)}function ql(e){let t=e|32;return t>=97&&t<=122}function Jl(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!ql(i))return!1;let a=e.src.slice(r).match(_l);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],Gl(t.content)&&e.linkLevel++,Kl(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var Yl=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Xl=/^&([a-z][a-z0-9]{1,31});/i;function Zl(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(Yl);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=Ws(t)?Gs(t):Gs(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(Xl);if(r){let n=ns(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}function Ql(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function $l(e){let t=e.tokens_meta,n=e.tokens_meta.length;Ql(e.delimiters);for(let e=0;e<n;e++){let n=t[e]?.delimiters;n&&Ql(n)}}function eu(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}var tu=[[`text`,Ol],[`linkify`,Al],[`newline`,jl],[`escape`,Nl],[`backticks`,Pl],[`strikethrough`,Q.tokenize],[`emphasis`,zl.tokenize],[`link`,Bl],[`image`,Vl],[`autolink`,Wl],[`html_inline`,Jl],[`entity`,Zl]],nu=[[`balance_pairs`,$l],[`strikethrough`,Q.postProcess],[`emphasis`,zl.postProcess],[`fragments_join`,eu]],ru=class{constructor(){Y(this,`ruler`,new Sc),Y(this,`ruler2`,new Sc),Y(this,`State`,El);for(let e=0;e<tu.length;e++)this.ruler.push(tu[e][0],tu[e][1]);for(let e=0;e<nu.length;e++)this.ruler2.push(nu[e][0],nu[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache;if(a[t]!==void 0){e.pos=a[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos}tokenize(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)}},iu={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`strip_references`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`strip_references`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}}},au=/^(vbscript|javascript|file|data):/,ou=/^data:image\/(gif|png|jpeg|webp);/,su=[`http:`,`https:`,`mailto:`],cu=class{validateLink(e){let t=e.trim().toLowerCase();return!au.test(t)||ou.test(t)}normalizeLink(e){let t=Ao(e,!0);if(t.hostname&&(!t.protocol||su.indexOf(t.protocol)>=0))try{t.hostname=Rs.toASCII(t.hostname)}catch{}return _o(vo(t))}normalizeLinkText(e){let t=Ao(e,!0);if(t.hostname&&(!t.protocol||su.indexOf(t.protocol)>=0))try{t.hostname=Rs.toUnicode(t.hostname)}catch{}return mo(vo(t),mo.defaultChars+`%`)}constructor(...e){Y(this,`inline`,new ru),Y(this,`block`,new Tl),Y(this,`core`,new $c),Y(this,`renderer`,new wc),Y(this,`linkify`,new ds),Y(this,`utils`,Vs),Y(this,`helpers`,Object.assign({},_c));let[t,n]=e;typeof t==`string`?(this.configure(t),n&&this.set(n)):(this.configure(`default`),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e==`string`){let n=e;if(t=iu[n],!t)throw Error(`Wrong 'markdown-it' preset "${n}", check name`)}else t=e;if(!t)throw Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});let n=t.components;if(n){[`core`,`block`,`inline`].forEach(e=>{let t=n[e]?.rules;t&&this[e].ruler.enableOnly(t)});let e=n.inline?.rules2;e&&this.inline.ruler2.enableOnly(e)}return this}enable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(t=>{n=n.concat(this[t].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(e=>n.indexOf(e)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(t=>{n=n.concat(this[t].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(e=>n.indexOf(e)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!=`string`)throw Error(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};Y(cu,`Token`,xc),Y(cu,`Ruler`,Sc),Y(cu,`Renderer`,wc),Y(cu,`ParserCore`,$c),Y(cu,`StateCore`,Tc),Y(cu,`ParserBlock`,Tl),Y(cu,`StateBlock`,el),Y(cu,`ParserInline`,ru),Y(cu,`StateInline`,El);var lu=new(Hs(cu))({html:!1,linkify:!0,typographer:!1}),uu=0;lu.core.ruler.push(`source_map`,e=>{for(let t of e.tokens)t.map&&t.block&&t.nesting>=0&&t.type!==`inline`&&(t.attrSet(`data-line`,String(t.map[0]+1+uu)),t.attrSet(`data-line-end`,String(t.map[1]+1+uu)))});var du=lu.renderer.rules.fence;lu.renderer.rules.fence=(e,t,n,r,i)=>{let a=e[t],o=a.map?` data-line="${a.map[0]+1+uu}" data-line-end="${a.map[1]+1+uu}"`:``;return a.info.trim()===`mermaid`?`<div class="mermaid"${o}>${lu.utils.escapeHtml(a.content)}</div>`:du(e,t,n,r,i).replace(/^<pre/,`<pre${o}`)};var fu=new Map;function pu(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);return t?{meta:t[1].split(`
23
23
  `).map(e=>{let t=e.indexOf(`:`);return t>0?[e.slice(0,t).trim(),e.slice(t+1).trim()]:null}).filter(e=>!!e&&!!e[0]),body:e.slice(t[0].length)}:{meta:null,body:e}}function mu(e){let t=fu.get(e);if(t)return t;let{meta:n,body:r}=pu(e),i=e.length-r.length?e.slice(0,e.length-r.length).split(`
24
- `).length-1:0,a=n?`<div class="frontmatter" data-line="1" data-line-end="${i+1}"><table>${n.map(([e,t])=>`<tr><th>${lu.utils.escapeHtml(e)}</th><td>${lu.utils.escapeHtml(t)}</td></tr>`).join(``)}</table></div>`:``;uu=i;let o=a+lu.render(r).replace(/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,(e,t,n)=>`<a class="wikilink" href="#/docs/${encodeURIComponent(t)}">${n??t}</a>`).replace(/<li([^>]*)>\[( |x|X)\] /g,(e,t,n)=>`<li${t} class="task"><input type="checkbox" disabled${n.trim()?` checked`:``}> `);return fu.size>200&&fu.clear(),fu.set(e,o),o}var hu={theme:`base`,themeVariables:{primaryColor:`#FFFFFF`,primaryBorderColor:`#2B1D14`,primaryTextColor:`#2B1D14`,lineColor:`#9A7A60`,secondaryColor:`#FBE3D0`,tertiaryColor:`#EFE5D8`,fontFamily:`"Source Sans 3", system-ui, sans-serif`,fontSize:`13px`}};function gu(e){let t=[],n=e.newStart,r=!1;for(let i of e.lines)if(i.startsWith(`+`)){let e=t[t.length-1];e&&e[1]===n?e[1]=n+1:t.push([n,n+1]),n++,r=!1}else i.startsWith(`-`)?r||=(t.push([n,n+1]),!0):(n++,r=!1);return t}function _u(e,t){e.querySelectorAll(`[data-chg]`).forEach(e=>{e.removeAttribute(`data-chg`),e.removeAttribute(`data-hunk`),e.classList.remove(`chg-uncommitted`,`chg-commit`)});let n=[...e.querySelectorAll(`[data-line]`)];t.forEach((e,t)=>e.hunks.forEach((r,i)=>{let a=gu(r),o=n.filter(e=>{let t=+e.dataset.line,n=+e.dataset.lineEnd;return a.some(([e,r])=>t<r&&n>e)});for(let n of o)o.some(e=>e!==n&&n.contains(e))||n.dataset.chg!==`uncommitted`&&(n.dataset.chg=e.kind,n.dataset.hunk=`${t}:${i}`,n.classList.add(e.kind===`uncommitted`?`chg-uncommitted`:`chg-commit`))}))}function vu(e,t){if(t.length===0)return e;let n=document.createElement(`div`);return n.innerHTML=e,_u(n,t),n.innerHTML}var yu=(0,P.memo)(function({html:e,className:t,onOver:n,onLeave:r}){let i=(0,P.useRef)(null);return(0,P.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.querySelectorAll(`.mermaid:not([data-processed])`);if(t.length===0)return;let n=!1;return oi(async()=>{let{default:e}=await import(`./mermaid.core-_OoTZaAK.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])).then(async({default:e})=>{n||(e.initialize({startOnLoad:!1,...hu}),await e.run({nodes:t}))}),()=>{n=!0}},[e]),(0,B.jsx)(`div`,{ref:i,className:`md ${t}`,dangerouslySetInnerHTML:{__html:e},onMouseOver:n,onMouseLeave:r})});function bu({source:e,changes:t=[],className:n=``}){let r=mu(e),[i,a]=(0,P.useState)(null),o=(0,P.useMemo)(()=>vu(r,t),[r,t]),s=(0,P.useRef)(t);s.current=t;let c=(0,P.useCallback)(e=>{let t=e.target.closest(`[data-hunk]`);if(!t){a(e=>e&&null);return}let[n,r]=t.dataset.hunk.split(`:`).map(Number),i=s.current[n],o=i?.hunks[r];if(!i||!o){a(null);return}let c=t.getBoundingClientRect();a({x:Math.min(c.left,window.innerWidth-560),y:c.bottom+6,change:i,hunk:o})},[]),l=(0,P.useCallback)(()=>a(null),[]);return(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(yu,{html:o,className:n,onOver:c,onLeave:l}),i&&(0,B.jsxs)(`div`,{className:`fixed z-50 max-w-[540px] max-h-[50vh] overflow-auto bg-paper border border-sand rounded-kit shadow-panel text-[12px]`,style:{left:i.x,top:i.y},children:[(0,B.jsxs)(`div`,{className:`px-3 py-1.5 border-b border-sand font-mono flex gap-2 items-baseline ${i.change.kind===`uncommitted`?`text-amber`:`text-leaf`}`,children:[(0,B.jsx)(`b`,{children:i.change.kind===`uncommitted`?`uncommitted`:`last commit`}),(0,B.jsx)(`span`,{className:`text-ink3 truncate`,children:i.change.label}),(0,B.jsxs)(`span`,{className:`ml-auto text-tan`,children:[`@@ +`,i.hunk.newStart,`,`,i.hunk.newLines]})]}),(0,B.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono leading-[1.5] whitespace-pre-wrap`,children:i.hunk.lines.map((e,t)=>(0,B.jsx)(`div`,{className:e.startsWith(`+`)?`bg-moss-wash text-moss`:e.startsWith(`-`)?`bg-brick-wash text-brick line-through decoration-brick/40`:`text-umber`,children:e},t))})]})]})}function xu(e,t){let n=e.trim().replace(/^['"`<(]+|[>'"`)]+$/g,``),r,i=n.match(/:(\d+)$/);i&&(r=Number(i[1]),n=n.slice(0,-i[0].length)),n.startsWith(`[[`)&&n.endsWith(`]]`)&&(n=n.slice(2,-2).split(`|`)[0].trim()),n=n.replace(/\\/g,`/`);let a=n.toLowerCase().lastIndexOf(`/docs/`);a>=0&&(n=n.slice(a+1)),n.startsWith(`./`)&&(n=n.slice(2));let o=n.toLowerCase().startsWith(`docs/`)?n.slice(5):n,s=o.replace(/\.md$/i,``);if(!t.length)return/^[\w./-]+\.md$/i.test(o)?{file:o,line:r}:s&&!s.includes(` `)?{file:`${s}.md`,line:r}:null;let c=t.filter(e=>{let t=e.replace(/\.md$/i,``),n=e.split(`/`).pop()?.replace(/\.md$/i,``);return e===o||e===`${o}.md`||t===s||t.endsWith(`/${s}`)||e.endsWith(`/${o}`)||n===s});return c.length===1?{file:c[0],line:r}:c.includes(o)?{file:o,line:r}:c.includes(`${o}.md`)?{file:`${o}.md`,line:r}:null}var Su=/\[\[([^\]|]+)(?:\|[^\]]+)?\]\](?::\d+)?|(?:(?:~\/|\.{1,2}\/)?(?:[\w.-]+\/)+)?[\w.-]+\.md(?::\d+)?/g;function Cu(e,t,n){return e==null||typeof e==`boolean`||typeof e==`number`?e:typeof e==`string`?wu(e,t,n):Array.isArray(e)?e.map((e,r)=>{let i=Cu(e,t,n);return(0,P.isValidElement)(i)&&i.key==null?(0,P.cloneElement)(i,{key:r}):i}):(0,P.isValidElement)(e)&&e.props.children!=null?(0,P.cloneElement)(e,void 0,Cu(e.props.children,t,n)):e}function wu(e,t,n){if(Su.lastIndex=0,!Su.test(e))return e;Su.lastIndex=0;let r=[],i=0,a,o=0;for(;a=Su.exec(e);){a.index>i&&r.push(e.slice(i,a.index));let s=a[0],c=xu(s,t);c?r.push((0,B.jsx)(`button`,{type:`button`,className:`md-ref`,title:`Open ${c.file}${c.line?`:${c.line}`:``}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n(c)},children:s},`md-${o++}`)):r.push(s),i=a.index+s.length}return i<e.length&&r.push(e.slice(i)),r.length===1?r[0]:r}var Tu=(0,P.createContext)({files:[],open:()=>{},linkify:e=>e}),Eu=()=>(0,P.useContext)(Tu);function Du({children:e}){let{current:t}=za(),n=ar(),[r,i]=(0,P.useState)(null),a=q(t?`/projects/${t}/docs`:null,3e4).data?.files??[],o=q(r?`/projects/${r.project}/docs/${encodeURIComponent(r.ref.file)}`:null),s=(e,n)=>{let r=n||t;r&&i({ref:e,project:r})};return(0,P.useEffect)(()=>{if(!r)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),e.preventDefault(),i(null))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[r]),(0,P.useEffect)(()=>{if(!r||!o.data||!r.ref.line)return;let e=setTimeout(()=>document.getElementById(`L${r.ref.line}`)?.scrollIntoView({block:`center`}),80);return()=>clearTimeout(e)},[r,o.data]),(0,B.jsxs)(Tu.Provider,{value:{files:a,open:s,linkify:(e,n)=>Cu(e,a,e=>s(e,n||t))},children:[e,r&&(0,B.jsx)(`div`,{className:`fixed inset-0 z-[70] bg-walnut/40 flex items-start justify-center pt-[8vh] px-4`,onMouseDown:e=>{e.target===e.currentTarget&&i(null)},children:(0,B.jsxs)(`div`,{className:`w-[min(820px,94vw)] max-h-[84vh] bg-paper border border-sand rounded-kit shadow-panel grid grid-rows-[auto_1fr] overflow-hidden`,children:[(0,B.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3 truncate`,title:o.data?.path??r.ref.file,children:[o.data?.path??`docs/${r.ref.file}`,r.ref.line?`:${r.ref.line}`:``]}),(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,B.jsx)(K,{size:`sm`,onClick:()=>{n(`/docs/${encodeURIComponent(r.ref.file)}${r.ref.line?`?view=source&line=${r.ref.line}`:``}`),i(null)},children:`Open in Docs`}),(0,B.jsx)(K,{size:`sm`,onClick:()=>i(null),children:`Close (Esc)`})]})]}),(0,B.jsxs)(`div`,{className:`overflow-auto px-6 py-4`,children:[o.loading&&(0,B.jsx)(`div`,{className:`text-[13px] text-umber`,children:`loading…`}),o.error&&(0,B.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load — not in `,r.project,`’s docs/? `,o.error]}),o.data&&(0,B.jsx)(bu,{source:o.data.source})]})]})})]})}var Ou=[`circle`,`square`,`diamond`,`hexagon`,`triangle`,`shield`,`leaf`,`pentagon`];function ku(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Au=e=>Ou[ku(e)%Ou.length];function ju(e,t){let n=t/2,r=t/2-1,i=(e,t=-Math.PI/2)=>Array.from({length:e},(i,a)=>{let o=t+a*2*Math.PI/e;return`${(n+r*Math.cos(o)).toFixed(2)},${(n+r*Math.sin(o)).toFixed(2)}`}).join(` `);switch(e){case`circle`:return(0,B.jsx)(`circle`,{cx:n,cy:n,r});case`square`:return(0,B.jsx)(`rect`,{x:1.5,y:1.5,width:t-3,height:t-3,rx:2});case`diamond`:return(0,B.jsx)(`polygon`,{points:i(4)});case`hexagon`:return(0,B.jsx)(`polygon`,{points:i(6,0)});case`triangle`:return(0,B.jsx)(`polygon`,{points:i(3)});case`pentagon`:return(0,B.jsx)(`polygon`,{points:i(5)});case`shield`:return(0,B.jsx)(`path`,{d:`M${n} 1.5 L${t-1.5} ${t*.3} V${t*.55} Q${t-1.5} ${t-2} ${n} ${t-1.5} Q1.5 ${t-2} 1.5 ${t*.55} V${t*.3} Z`});case`leaf`:return(0,B.jsx)(`path`,{d:`M${n} 1.5 Q${t-1.5} ${t*.35} ${t-2.5} ${t-2} Q${t*.35} ${t-1.5} 1.5 ${n} Q${t*.35} 1.5 ${n} 1.5 Z`})}}function Mu({id:e,role:t,size:n=18,state:r,active:i,className:a=``}){let o=td(t),s=Au(e),c=r===`dead`?.35:r===`idle`?.7:1,l=e.replace(/[^a-z0-9]/gi,``).slice(0,1).toUpperCase();return(0,B.jsxs)(`span`,{className:`relative inline-flex shrink-0 ${a}`,style:{width:n,height:n},title:`${e}${t?` · ${t}`:``}`,children:[(0,B.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{opacity:c},"aria-hidden":!0,children:[(0,B.jsx)(`g`,{fill:o,stroke:o,strokeWidth:`1`,children:ju(s,n)}),(0,B.jsx)(`text`,{x:n/2,y:n/2+n*.22,textAnchor:`middle`,fontSize:n*.55,fontFamily:`JetBrains Mono, monospace`,fontWeight:`700`,fill:`#FCFAF6`,children:l})]}),i&&(0,B.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 w-2 h-2 rounded-full bg-moss ring-2 ring-paper`,children:(0,B.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})})]})}var Nu=e=>/done|merged|deployed|complete|closed|✅/i.test(e);function Pu(e){return e?e.workstreams.rows.filter(e=>!(`malformed`in e)).map(e=>e.schema===`workstreams.v1`?{name:e.stream,owner:e.owner,status:e.status,note:e.lastNote??``}:{name:e.lane,owner:e.owner,status:e.state,note:e.currentSlice??``}).map(e=>({...e,done:Nu(e.status)})):[]}var Fu=e=>e.match(/^Task\s+(\d+)\b/i)?.[1]??null;function Iu(e,t,n){if(!n)return null;let r=t.replace(/\./g,`\\.`),i=RegExp(`(^|\\b)(P${r}[-.\\s]?T${n}\\b|Phase\\s*${r}\\b.*\\bT(?:ask)?\\s*${n}\\b)`,`i`);return e.find(e=>i.test(e.name))??null}function Lu(e,t){let n=e.trim().toLowerCase();return t.find(e=>e.toLowerCase()===n)??t.find(e=>n.includes(e.toLowerCase()))??null}function Ru({text:e}){let t=[],n=/(`[^`]+`)|(\*\*[^*]+\*\*)|(\[\[([^\]|]+)(?:\|([^\]]+))?\]\])/g,r=0,i,a=0;for(;i=n.exec(e);)i.index>r&&t.push(e.slice(r,i.index)),i[1]?t.push((0,B.jsx)(`code`,{className:`font-mono text-[.92em] px-1 rounded bg-linen text-walnut`,children:i[1].slice(1,-1)},a++)):i[2]?t.push((0,B.jsx)(`b`,{children:i[2].slice(2,-2)},a++)):t.push((0,B.jsx)(V,{to:`/docs/${encodeURIComponent(i[4])}`,onClick:e=>e.stopPropagation(),className:`text-ember-deep`,children:i[5]??i[4]},a++)),r=i.index+i[0].length;return r<e.length&&t.push(e.slice(r)),(0,B.jsx)(B.Fragment,{children:t})}function zu({stream:e,agents:t,size:n=`sm`}){if(!e)return null;let r=Lu(e.owner,t.map(e=>e.agentId));return(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 shrink-0`,title:`${e.name} · ${e.owner} · ${e.status}${e.note?` · ${e.note}`:``}`,children:[r?(0,B.jsx)($u,{id:r,bare:!0,size:n}):(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[11px] text-umber`,children:[(0,B.jsx)(Mu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,B.jsx)(G,{tone:e.done?`ok`:/block/i.test(e.status)?`bad`:/queued|hold|wait/i.test(e.status)?`warn`:`neutral`,children:e.status.replace(/^[^\w]+/,``).slice(0,16)})]})}function Bu({project:e,phase:t,highlight:n,maxH:r=`46vh`,compact:i=!1}){let{data:a,error:o}=q(`/projects/${e}/phases/${t.id}/tasks`,15e3),s=q(`/projects/${e}/board`,15e3).data,c=q(`/bus/agents`,2e4).data??[],l=Pu(s),[u,d]=(0,P.useState)({});return o?(0,B.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-brick`,children:o}):a?a.sections.length===0?(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No tasks yet — run `,(0,B.jsx)(`code`,{children:`/plan-phase`}),` (roadmap → Plan).`]}):(0,B.jsx)(`div`,{className:`grid gap-0 overflow-auto min-w-0`,style:{maxHeight:r},children:a.sections.map(e=>{let r=e.tasks.filter(e=>e.done).length,o=r===e.tasks.length,s=Iu(l,t.n,Fu(e.title)),f=!!n&&!!s&&Lu(s.owner,c.map(e=>e.agentId))===n,p=i&&o&&!u[e.line];return(0,B.jsxs)(`div`,{className:`border-b border-sand last:border-b-0 min-w-0 ${f?`bg-ember/[.04]`:``}`,children:[(0,B.jsxs)(`div`,{className:`sticky top-0 z-[1] px-3 py-1.5 min-w-0 ${f?`bg-ember-wash`:`bg-cream`} ${i?`grid gap-0.5`:`flex items-center gap-2`}`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[i&&o&&(0,B.jsx)(`button`,{type:`button`,onClick:()=>d(t=>({...t,[e.line]:!t[e.line]})),className:`border-0 bg-transparent p-0 cursor-pointer font-mono text-[11px] text-tan w-3 shrink-0`,title:p?`show done sub-steps`:`collapse`,children:p?`▸`:`▾`}),f&&(0,B.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-ember shrink-0`,title:`this agent's task`}),(0,B.jsx)(V,{to:`/docs/${encodeURIComponent(a.file)}?view=source&line=${e.line}`,className:`font-semibold text-[12px] hover:no-underline hover:text-ember-deep truncate ${o?`text-tan`:`text-umber`}`,children:e.title}),(0,B.jsxs)(`span`,{className:`font-mono text-[11px] shrink-0 ${o?`text-leaf`:`text-tan`}`,children:[r,`/`,e.tasks.length,o?` ✓`:``]}),!i&&(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[(0,B.jsx)(zu,{stream:s,agents:c}),(0,B.jsx)(`span`,{className:`h-1 w-24 rounded-full bg-linen overflow-hidden`,children:(0,B.jsx)(`span`,{className:`block h-full ${o?`bg-leaf`:`bg-ember`}`,style:{width:`${e.tasks.length?r/e.tasks.length*100:0}%`}})})]})]}),i&&s&&(0,B.jsx)(`div`,{className:`flex items-center gap-2 min-w-0 pl-5`,children:(0,B.jsx)(zu,{stream:s,agents:c})})]}),!p&&e.tasks.map(e=>(0,B.jsxs)(V,{to:`/docs/${encodeURIComponent(a.file)}?view=source&line=${e.line}`,className:`grid grid-cols-[var(--spacing-gutter)_minmax(0,1fr)] items-start hover:no-underline hover:bg-linen/60 text-inherit border-t border-sand/60 min-w-0`,style:{paddingLeft:e.depth*12},children:[(0,B.jsx)(`span`,{className:`self-stretch flex items-start justify-center pt-1.5 font-mono text-[11px] border-r border-sand ${e.done?`text-leaf`:`text-tan`}`,children:e.done?`- [x]`:`- [ ]`}),(0,B.jsx)(`span`,{className:`px-3 py-1.5 min-w-0 break-words ${i?`text-[12px] leading-snug`:`text-[13px]`} ${e.done?`text-tan line-through decoration-dust`:``}`,children:(0,B.jsx)(Ru,{text:e.text})})]},e.line))]},e.line)})}):(0,B.jsx)(`div`,{className:`px-3 py-2 font-mono text-[12px] text-tan`,children:`…`})}function Vu({project:e,phase:t,onClose:n}){let{data:r}=q(`/projects/${e}/phases/${t.id}/tasks`,15e3),i=r?.total?Math.round(r.done/r.total*100):0;return(0,B.jsxs)(`div`,{className:`mt-3 border border-sand rounded-kit bg-paper`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-sand`,children:[(0,B.jsx)(`b`,{className:`text-[13px]`,children:t.title}),(0,B.jsx)(G,{tone:r?.total&&r.done===r.total?`ok`:`neutral`,children:r?`${r.done}/${r.total} · ${i}%`:`…`}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:r?.file??`no tasks file`}),(0,B.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[r?.file&&(0,B.jsx)(V,{to:`/docs/${encodeURIComponent(r.file)}`,className:`hover:no-underline`,children:(0,B.jsx)(K,{size:`sm`,tone:`ghost`,children:`Open doc`})}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:n,children:`✕`})]})]}),(0,B.jsx)(Bu,{project:e,phase:t})]})}var Hu=`/api`,Uu=/\[image: (\S+) · (\S+)\]/g;function Wu(){let[e,t]=(0,P.useState)([]),[n,r]=(0,P.useState)(0),[i,a]=(0,P.useState)(null),o=(0,P.useCallback)(async e=>{let n=e.filter(e=>e.type.startsWith(`image/`));if(n.length){r(e=>e+n.length),a(null);for(let e of n)try{let n=new FormData;n.append(`file`,e,e.name||`paste.png`);let r=await fetch(`${Hu}/uploads`,{method:`POST`,body:n}),i=await r.json();if(!r.ok)throw Error(i.error??`${r.status}`);t(e=>e.some(e=>e.name===i.name)?e:[...e,i])}catch(e){a(e.message)}finally{r(e=>e-1)}}},[]),s=(0,P.useCallback)(e=>{let t=Array.from(e.clipboardData?.files??[]);t.length&&(e.preventDefault(),o(t))},[o]),c=(0,P.useCallback)(e=>{let t=Array.from(e.dataTransfer?.files??[]);t.length&&(e.preventDefault(),o(t))},[o]),l=(0,P.useCallback)(e=>{e.dataTransfer?.types.includes(`Files`)&&e.preventDefault()},[]);return{items:e,busy:n>0,err:i,onPaste:s,onDrop:c,onDragOver:l,remove:e=>t(t=>t.filter(t=>t.name!==e)),clear:()=>t([]),withRefs:t=>e.length?`${t.trim()}${t.trim()?`
24
+ `).length-1:0,a=n?`<div class="frontmatter" data-line="1" data-line-end="${i+1}"><table>${n.map(([e,t])=>`<tr><th>${lu.utils.escapeHtml(e)}</th><td>${lu.utils.escapeHtml(t)}</td></tr>`).join(``)}</table></div>`:``;uu=i;let o=a+lu.render(r).replace(/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,(e,t,n)=>`<a class="wikilink" href="#/docs/${encodeURIComponent(t)}">${n??t}</a>`).replace(/<li([^>]*)>\[( |x|X)\] /g,(e,t,n)=>`<li${t} class="task"><input type="checkbox" disabled${n.trim()?` checked`:``}> `);return fu.size>200&&fu.clear(),fu.set(e,o),o}var hu={theme:`base`,themeVariables:{primaryColor:`#FFFFFF`,primaryBorderColor:`#2B1D14`,primaryTextColor:`#2B1D14`,lineColor:`#9A7A60`,secondaryColor:`#FBE3D0`,tertiaryColor:`#EFE5D8`,fontFamily:`"Source Sans 3", system-ui, sans-serif`,fontSize:`13px`}};function gu(e){let t=[],n=e.newStart,r=!1;for(let i of e.lines)if(i.startsWith(`+`)){let e=t[t.length-1];e&&e[1]===n?e[1]=n+1:t.push([n,n+1]),n++,r=!1}else i.startsWith(`-`)?r||=(t.push([n,n+1]),!0):(n++,r=!1);return t}function _u(e,t){e.querySelectorAll(`[data-chg]`).forEach(e=>{e.removeAttribute(`data-chg`),e.removeAttribute(`data-hunk`),e.classList.remove(`chg-uncommitted`,`chg-commit`)});let n=[...e.querySelectorAll(`[data-line]`)];t.forEach((e,t)=>e.hunks.forEach((r,i)=>{let a=gu(r),o=n.filter(e=>{let t=+e.dataset.line,n=+e.dataset.lineEnd;return a.some(([e,r])=>t<r&&n>e)});for(let n of o)o.some(e=>e!==n&&n.contains(e))||n.dataset.chg!==`uncommitted`&&(n.dataset.chg=e.kind,n.dataset.hunk=`${t}:${i}`,n.classList.add(e.kind===`uncommitted`?`chg-uncommitted`:`chg-commit`))}))}function vu(e,t){if(t.length===0)return e;let n=document.createElement(`div`);return n.innerHTML=e,_u(n,t),n.innerHTML}var yu=(0,P.memo)(function({html:e,className:t,onOver:n,onLeave:r}){let i=(0,P.useRef)(null);return(0,P.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.querySelectorAll(`.mermaid:not([data-processed])`);if(t.length===0)return;let n=!1;return oi(async()=>{let{default:e}=await import(`./mermaid.core-BYlHVIMn.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])).then(async({default:e})=>{n||(e.initialize({startOnLoad:!1,...hu}),await e.run({nodes:t}))}),()=>{n=!0}},[e]),(0,B.jsx)(`div`,{ref:i,className:`md ${t}`,dangerouslySetInnerHTML:{__html:e},onMouseOver:n,onMouseLeave:r})});function bu({source:e,changes:t=[],className:n=``}){let r=mu(e),[i,a]=(0,P.useState)(null),o=(0,P.useMemo)(()=>vu(r,t),[r,t]),s=(0,P.useRef)(t);s.current=t;let c=(0,P.useCallback)(e=>{let t=e.target.closest(`[data-hunk]`);if(!t){a(e=>e&&null);return}let[n,r]=t.dataset.hunk.split(`:`).map(Number),i=s.current[n],o=i?.hunks[r];if(!i||!o){a(null);return}let c=t.getBoundingClientRect();a({x:Math.min(c.left,window.innerWidth-560),y:c.bottom+6,change:i,hunk:o})},[]),l=(0,P.useCallback)(()=>a(null),[]);return(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(yu,{html:o,className:n,onOver:c,onLeave:l}),i&&(0,B.jsxs)(`div`,{className:`fixed z-50 max-w-[540px] max-h-[50vh] overflow-auto bg-paper border border-sand rounded-kit shadow-panel text-[12px]`,style:{left:i.x,top:i.y},children:[(0,B.jsxs)(`div`,{className:`px-3 py-1.5 border-b border-sand font-mono flex gap-2 items-baseline ${i.change.kind===`uncommitted`?`text-amber`:`text-leaf`}`,children:[(0,B.jsx)(`b`,{children:i.change.kind===`uncommitted`?`uncommitted`:`last commit`}),(0,B.jsx)(`span`,{className:`text-ink3 truncate`,children:i.change.label}),(0,B.jsxs)(`span`,{className:`ml-auto text-tan`,children:[`@@ +`,i.hunk.newStart,`,`,i.hunk.newLines]})]}),(0,B.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono leading-[1.5] whitespace-pre-wrap`,children:i.hunk.lines.map((e,t)=>(0,B.jsx)(`div`,{className:e.startsWith(`+`)?`bg-moss-wash text-moss`:e.startsWith(`-`)?`bg-brick-wash text-brick line-through decoration-brick/40`:`text-umber`,children:e},t))})]})]})}function xu(e,t){let n=e.trim().replace(/^['"`<(]+|[>'"`)]+$/g,``),r,i=n.match(/:(\d+)$/);i&&(r=Number(i[1]),n=n.slice(0,-i[0].length)),n.startsWith(`[[`)&&n.endsWith(`]]`)&&(n=n.slice(2,-2).split(`|`)[0].trim()),n=n.replace(/\\/g,`/`);let a=n.toLowerCase().lastIndexOf(`/docs/`);a>=0&&(n=n.slice(a+1)),n.startsWith(`./`)&&(n=n.slice(2));let o=n.toLowerCase().startsWith(`docs/`)?n.slice(5):n,s=o.replace(/\.md$/i,``);if(!t.length)return/^[\w./-]+\.md$/i.test(o)?{file:o,line:r}:s&&!s.includes(` `)?{file:`${s}.md`,line:r}:null;let c=t.filter(e=>{let t=e.replace(/\.md$/i,``),n=e.split(`/`).pop()?.replace(/\.md$/i,``);return e===o||e===`${o}.md`||t===s||t.endsWith(`/${s}`)||e.endsWith(`/${o}`)||n===s});return c.length===1?{file:c[0],line:r}:c.includes(o)?{file:o,line:r}:c.includes(`${o}.md`)?{file:`${o}.md`,line:r}:null}var Su=/\[\[([^\]|]+)(?:\|[^\]]+)?\]\](?::\d+)?|(?:(?:~\/|\.{1,2}\/)?(?:[\w.-]+\/)+)?[\w.-]+\.md(?::\d+)?/g;function Cu(e,t,n){return e==null||typeof e==`boolean`||typeof e==`number`?e:typeof e==`string`?wu(e,t,n):Array.isArray(e)?e.map((e,r)=>{let i=Cu(e,t,n);return(0,P.isValidElement)(i)&&i.key==null?(0,P.cloneElement)(i,{key:r}):i}):(0,P.isValidElement)(e)&&e.props.children!=null?(0,P.cloneElement)(e,void 0,Cu(e.props.children,t,n)):e}function wu(e,t,n){if(Su.lastIndex=0,!Su.test(e))return e;Su.lastIndex=0;let r=[],i=0,a,o=0;for(;a=Su.exec(e);){a.index>i&&r.push(e.slice(i,a.index));let s=a[0],c=xu(s,t);c?r.push((0,B.jsx)(`button`,{type:`button`,className:`md-ref`,title:`Open ${c.file}${c.line?`:${c.line}`:``}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n(c)},children:s},`md-${o++}`)):r.push(s),i=a.index+s.length}return i<e.length&&r.push(e.slice(i)),r.length===1?r[0]:r}var Tu=(0,P.createContext)({files:[],open:()=>{},linkify:e=>e}),Eu=()=>(0,P.useContext)(Tu);function Du({children:e}){let{current:t}=za(),n=ar(),[r,i]=(0,P.useState)(null),a=q(t?`/projects/${t}/docs`:null,3e4).data?.files??[],o=q(r?`/projects/${r.project}/docs/${encodeURIComponent(r.ref.file)}`:null),s=(e,n)=>{let r=n||t;r&&i({ref:e,project:r})};return(0,P.useEffect)(()=>{if(!r)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),e.preventDefault(),i(null))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[r]),(0,P.useEffect)(()=>{if(!r||!o.data||!r.ref.line)return;let e=setTimeout(()=>document.getElementById(`L${r.ref.line}`)?.scrollIntoView({block:`center`}),80);return()=>clearTimeout(e)},[r,o.data]),(0,B.jsxs)(Tu.Provider,{value:{files:a,open:s,linkify:(e,n)=>Cu(e,a,e=>s(e,n||t))},children:[e,r&&(0,B.jsx)(`div`,{className:`fixed inset-0 z-[70] bg-walnut/40 flex items-start justify-center pt-[8vh] px-4`,onMouseDown:e=>{e.target===e.currentTarget&&i(null)},children:(0,B.jsxs)(`div`,{className:`w-[min(820px,94vw)] max-h-[84vh] bg-paper border border-sand rounded-kit shadow-panel grid grid-rows-[auto_1fr] overflow-hidden`,children:[(0,B.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2 min-w-0`,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3 truncate`,title:o.data?.path??r.ref.file,children:[o.data?.path??`docs/${r.ref.file}`,r.ref.line?`:${r.ref.line}`:``]}),(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0`,children:[(0,B.jsx)(K,{size:`sm`,onClick:()=>{n(`/docs/${encodeURIComponent(r.ref.file)}${r.ref.line?`?view=source&line=${r.ref.line}`:``}`),i(null)},children:`Open in Docs`}),(0,B.jsx)(K,{size:`sm`,onClick:()=>i(null),children:`Close (Esc)`})]})]}),(0,B.jsxs)(`div`,{className:`overflow-auto px-6 py-4`,children:[o.loading&&(0,B.jsx)(`div`,{className:`text-[13px] text-umber`,children:`loading…`}),o.error&&(0,B.jsxs)(`div`,{className:`text-[13px] text-brick`,children:[`Could not load — not in `,r.project,`’s docs/? `,o.error]}),o.data&&(0,B.jsx)(bu,{source:o.data.source})]})]})})]})}var Ou=[`circle`,`square`,`diamond`,`hexagon`,`triangle`,`shield`,`leaf`,`pentagon`];function ku(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Au=e=>Ou[ku(e)%Ou.length];function ju(e,t){let n=t/2,r=t/2-1,i=(e,t=-Math.PI/2)=>Array.from({length:e},(i,a)=>{let o=t+a*2*Math.PI/e;return`${(n+r*Math.cos(o)).toFixed(2)},${(n+r*Math.sin(o)).toFixed(2)}`}).join(` `);switch(e){case`circle`:return(0,B.jsx)(`circle`,{cx:n,cy:n,r});case`square`:return(0,B.jsx)(`rect`,{x:1.5,y:1.5,width:t-3,height:t-3,rx:2});case`diamond`:return(0,B.jsx)(`polygon`,{points:i(4)});case`hexagon`:return(0,B.jsx)(`polygon`,{points:i(6,0)});case`triangle`:return(0,B.jsx)(`polygon`,{points:i(3)});case`pentagon`:return(0,B.jsx)(`polygon`,{points:i(5)});case`shield`:return(0,B.jsx)(`path`,{d:`M${n} 1.5 L${t-1.5} ${t*.3} V${t*.55} Q${t-1.5} ${t-2} ${n} ${t-1.5} Q1.5 ${t-2} 1.5 ${t*.55} V${t*.3} Z`});case`leaf`:return(0,B.jsx)(`path`,{d:`M${n} 1.5 Q${t-1.5} ${t*.35} ${t-2.5} ${t-2} Q${t*.35} ${t-1.5} 1.5 ${n} Q${t*.35} 1.5 ${n} 1.5 Z`})}}function Mu({id:e,role:t,size:n=18,state:r,active:i,className:a=``}){let o=td(t),s=Au(e),c=r===`dead`?.35:r===`idle`?.7:1,l=e.replace(/[^a-z0-9]/gi,``).slice(0,1).toUpperCase();return(0,B.jsxs)(`span`,{className:`relative inline-flex shrink-0 ${a}`,style:{width:n,height:n},title:`${e}${t?` · ${t}`:``}`,children:[(0,B.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 ${n} ${n}`,style:{opacity:c},"aria-hidden":!0,children:[(0,B.jsx)(`g`,{fill:o,stroke:o,strokeWidth:`1`,children:ju(s,n)}),(0,B.jsx)(`text`,{x:n/2,y:n/2+n*.22,textAnchor:`middle`,fontSize:n*.55,fontFamily:`JetBrains Mono, monospace`,fontWeight:`700`,fill:`#FCFAF6`,children:l})]}),i&&(0,B.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 w-2 h-2 rounded-full bg-moss ring-2 ring-paper`,children:(0,B.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-moss animate-ping opacity-60`})})]})}var Nu=e=>/done|merged|deployed|complete|closed|✅/i.test(e);function Pu(e){return e?e.workstreams.rows.filter(e=>!(`malformed`in e)).map(e=>e.schema===`workstreams.v1`?{name:e.stream,owner:e.owner,status:e.status,note:e.lastNote??``}:{name:e.lane,owner:e.owner,status:e.state,note:e.currentSlice??``}).map(e=>({...e,done:Nu(e.status)})):[]}var Fu=e=>e.match(/^Task\s+(\d+)\b/i)?.[1]??null;function Iu(e,t,n){if(!n)return null;let r=t.replace(/\./g,`\\.`),i=RegExp(`(^|\\b)(P${r}[-.\\s]?T${n}\\b|Phase\\s*${r}\\b.*\\bT(?:ask)?\\s*${n}\\b)`,`i`);return e.find(e=>i.test(e.name))??null}function Lu(e,t){let n=e.trim().toLowerCase();return t.find(e=>e.toLowerCase()===n)??t.find(e=>n.includes(e.toLowerCase()))??null}function Ru({text:e}){let t=[],n=/(`[^`]+`)|(\*\*[^*]+\*\*)|(\[\[([^\]|]+)(?:\|([^\]]+))?\]\])/g,r=0,i,a=0;for(;i=n.exec(e);)i.index>r&&t.push(e.slice(r,i.index)),i[1]?t.push((0,B.jsx)(`code`,{className:`font-mono text-[.92em] px-1 rounded bg-linen text-walnut`,children:i[1].slice(1,-1)},a++)):i[2]?t.push((0,B.jsx)(`b`,{children:i[2].slice(2,-2)},a++)):t.push((0,B.jsx)(V,{to:`/docs/${encodeURIComponent(i[4])}`,onClick:e=>e.stopPropagation(),className:`text-ember-deep`,children:i[5]??i[4]},a++)),r=i.index+i[0].length;return r<e.length&&t.push(e.slice(r)),(0,B.jsx)(B.Fragment,{children:t})}function zu({stream:e,agents:t,size:n=`sm`}){if(!e)return null;let r=Lu(e.owner,t.map(e=>e.agentId));return(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 shrink-0`,title:`${e.name} · ${e.owner} · ${e.status}${e.note?` · ${e.note}`:``}`,children:[r?(0,B.jsx)($u,{id:r,bare:!0,size:n}):(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[11px] text-umber`,children:[(0,B.jsx)(Mu,{id:e.owner,size:14,state:`dead`}),e.owner]}),(0,B.jsx)(G,{tone:e.done?`ok`:/block/i.test(e.status)?`bad`:/queued|hold|wait/i.test(e.status)?`warn`:`neutral`,children:e.status.replace(/^[^\w]+/,``).slice(0,16)})]})}function Bu({project:e,phase:t,highlight:n,maxH:r=`46vh`,compact:i=!1}){let{data:a,error:o}=q(`/projects/${e}/phases/${t.id}/tasks`,15e3),s=q(`/projects/${e}/board`,15e3).data,c=q(`/bus/agents`,2e4).data??[],l=Pu(s),[u,d]=(0,P.useState)({});return o?(0,B.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-brick`,children:o}):a?a.sections.length===0?(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`No tasks yet — run `,(0,B.jsx)(`code`,{children:`/plan-phase`}),` (roadmap → Plan).`]}):(0,B.jsx)(`div`,{className:`grid gap-0 overflow-auto min-w-0`,style:{maxHeight:r},children:a.sections.map(e=>{let r=e.tasks.filter(e=>e.done).length,o=r===e.tasks.length,s=Iu(l,t.n,Fu(e.title)),f=!!n&&!!s&&Lu(s.owner,c.map(e=>e.agentId))===n,p=i&&o&&!u[e.line];return(0,B.jsxs)(`div`,{className:`border-b border-sand last:border-b-0 min-w-0 ${f?`bg-ember/[.04]`:``}`,children:[(0,B.jsxs)(`div`,{className:`sticky top-0 z-[1] px-3 py-1.5 min-w-0 ${f?`bg-ember-wash`:`bg-cream`} ${i?`grid gap-0.5`:`flex items-center gap-2`}`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[i&&o&&(0,B.jsx)(`button`,{type:`button`,onClick:()=>d(t=>({...t,[e.line]:!t[e.line]})),className:`border-0 bg-transparent p-0 cursor-pointer font-mono text-[11px] text-tan w-3 shrink-0`,title:p?`show done sub-steps`:`collapse`,children:p?`▸`:`▾`}),f&&(0,B.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-ember shrink-0`,title:`this agent's task`}),(0,B.jsx)(V,{to:`/docs/${encodeURIComponent(a.file)}?view=source&line=${e.line}`,className:`font-semibold text-[12px] hover:no-underline hover:text-ember-deep truncate ${o?`text-tan`:`text-umber`}`,children:e.title}),(0,B.jsxs)(`span`,{className:`font-mono text-[11px] shrink-0 ${o?`text-leaf`:`text-tan`}`,children:[r,`/`,e.tasks.length,o?` ✓`:``]}),!i&&(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[(0,B.jsx)(zu,{stream:s,agents:c}),(0,B.jsx)(`span`,{className:`h-1 w-24 rounded-full bg-linen overflow-hidden`,children:(0,B.jsx)(`span`,{className:`block h-full ${o?`bg-leaf`:`bg-ember`}`,style:{width:`${e.tasks.length?r/e.tasks.length*100:0}%`}})})]})]}),i&&s&&(0,B.jsx)(`div`,{className:`flex items-center gap-2 min-w-0 pl-5`,children:(0,B.jsx)(zu,{stream:s,agents:c})})]}),!p&&e.tasks.map(e=>(0,B.jsxs)(V,{to:`/docs/${encodeURIComponent(a.file)}?view=source&line=${e.line}`,className:`grid grid-cols-[var(--spacing-gutter)_minmax(0,1fr)] items-start hover:no-underline hover:bg-linen/60 text-inherit border-t border-sand/60 min-w-0`,style:{paddingLeft:e.depth*12},children:[(0,B.jsx)(`span`,{className:`self-stretch flex items-start justify-center pt-1.5 font-mono text-[11px] border-r border-sand ${e.done?`text-leaf`:`text-tan`}`,children:e.done?`- [x]`:`- [ ]`}),(0,B.jsx)(`span`,{className:`px-3 py-1.5 min-w-0 break-words ${i?`text-[12px] leading-snug`:`text-[13px]`} ${e.done?`text-tan line-through decoration-dust`:``}`,children:(0,B.jsx)(Ru,{text:e.text})})]},e.line))]},e.line)})}):(0,B.jsx)(`div`,{className:`px-3 py-2 font-mono text-[12px] text-tan`,children:`…`})}function Vu({project:e,phase:t,onClose:n}){let{data:r}=q(`/projects/${e}/phases/${t.id}/tasks`,15e3),i=r?.total?Math.round(r.done/r.total*100):0;return(0,B.jsxs)(`div`,{className:`mt-3 border border-sand rounded-kit bg-paper`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-sand`,children:[(0,B.jsx)(`b`,{className:`text-[13px]`,children:t.title}),(0,B.jsx)(G,{tone:r?.total&&r.done===r.total?`ok`:`neutral`,children:r?`${r.done}/${r.total} · ${i}%`:`…`}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:r?.file??`no tasks file`}),(0,B.jsxs)(`span`,{className:`ml-auto flex gap-1.5`,children:[r?.file&&(0,B.jsx)(V,{to:`/docs/${encodeURIComponent(r.file)}`,className:`hover:no-underline`,children:(0,B.jsx)(K,{size:`sm`,tone:`ghost`,children:`Open doc`})}),(0,B.jsx)(K,{size:`sm`,tone:`ghost`,onClick:n,children:`✕`})]})]}),(0,B.jsx)(Bu,{project:e,phase:t})]})}var Hu=`/api`,Uu=/\[image: (\S+) · (\S+)\]/g;function Wu(){let[e,t]=(0,P.useState)([]),[n,r]=(0,P.useState)(0),[i,a]=(0,P.useState)(null),o=(0,P.useCallback)(async e=>{let n=e.filter(e=>e.type.startsWith(`image/`));if(n.length){r(e=>e+n.length),a(null);for(let e of n)try{let n=new FormData;n.append(`file`,e,e.name||`paste.png`);let r=await fetch(`${Hu}/uploads`,{method:`POST`,body:n}),i=await r.json();if(!r.ok)throw Error(i.error??`${r.status}`);t(e=>e.some(e=>e.name===i.name)?e:[...e,i])}catch(e){a(e.message)}finally{r(e=>e-1)}}},[]),s=(0,P.useCallback)(e=>{let t=Array.from(e.clipboardData?.files??[]);t.length&&(e.preventDefault(),o(t))},[o]),c=(0,P.useCallback)(e=>{let t=Array.from(e.dataTransfer?.files??[]);t.length&&(e.preventDefault(),o(t))},[o]),l=(0,P.useCallback)(e=>{e.dataTransfer?.types.includes(`Files`)&&e.preventDefault()},[]);return{items:e,busy:n>0,err:i,onPaste:s,onDrop:c,onDragOver:l,remove:e=>t(t=>t.filter(t=>t.name!==e)),clear:()=>t([]),withRefs:t=>e.length?`${t.trim()}${t.trim()?`
25
25
  `:``}${e.map(e=>e.ref).join(`
26
26
  `)}`:t,hasContent:t=>!!t.trim()||e.length>0}}function Gu({a:e}){return!e.items.length&&!e.busy&&!e.err?null:(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[e.items.map(t=>(0,B.jsxs)(`span`,{className:`relative inline-flex items-center gap-1 border border-sand rounded-kit bg-cream/60 p-0.5`,title:`${t.path}\n${t.url}`,children:[(0,B.jsx)(`img`,{src:t.url,alt:t.name,className:`h-10 w-auto max-w-[120px] rounded object-cover`}),(0,B.jsxs)(`span`,{className:`font-mono text-[10px] text-ink3 pr-1`,children:[Math.round(t.bytes/1024),` KB`]}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>e.remove(t.name),className:`absolute -top-1.5 -right-1.5 w-4 h-4 rounded-full bg-walnut text-paper text-[10px] leading-none border-0 cursor-pointer`,title:`remove`,children:`×`})]},t.name)),e.busy&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-ink3`,children:`uploading…`}),e.err&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-brick`,children:e.err})]})}function Ku({text:e}){let t=[],n=0,r,i=0;for(Uu.lastIndex=0;r=Uu.exec(e);){r.index>n&&t.push(e.slice(n,r.index));let[,a,o]=r;t.push((0,B.jsx)(`a`,{href:o,target:`_blank`,rel:`noreferrer`,className:`inline-block align-top my-1 mr-1 border border-sand rounded-kit p-0.5 bg-cream/60 hover:no-underline`,title:a,children:(0,B.jsx)(`img`,{src:o,alt:a.split(`/`).pop(),className:`max-h-40 max-w-[280px] rounded object-contain`,loading:`lazy`})},i++)),n=r.index+r[0].length}return n<e.length&&t.push(e.slice(n)),(0,B.jsx)(B.Fragment,{children:t})}var qu=`/api`;function Ju({agentId:e,onClose:t}){let{linkify:n}=Eu(),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(200),[l,u]=(0,P.useState)(!0),[d,f]=(0,P.useState)(!0),[p,m]=(0,P.useState)(()=>localStorage.getItem(`groundwork-console.pane.tasks`)!==`0`),h=e=>{m(e),localStorage.setItem(`groundwork-console.pane.tasks`,e?`1`:`0`)},{current:g,projects:_}=za(),v=q(`/admin/bus-writes`,1e4).data?.enabled??!1,y=(q(`/bus/agents`,3e4).data??[]).find(t=>t.agentId===e),b=y?.project&&_.some(e=>e.name===y.project||e.room===y.project)?_.find(e=>e.name===y.project||e.room===y.project).name:g,[x,S]=(0,P.useState)(``),[C,w]=(0,P.useState)(null),T=Wu(),E=async()=>{if(T.hasContent(x)){w(`sending`);try{let t=await Fa(`/actions/send`,{as:`david`,to:e,text:T.withRefs(x)});w(t.status===`ok`?`sent — lands in the pane via tmux-push`:t.error??t.log?.slice(-1)[0]??`failed`),t.status===`ok`&&(S(``),T.clear())}catch(e){w(e.message)}}},D=(0,P.useRef)(null);return(0,P.useEffect)(()=>{let t=!0,n=async()=>{try{let n=await fetch(`${qu}/bus/agents/${encodeURIComponent(e)}/pane?lines=${s}${d?`&colors=1`:``}`),r=await n.json();if(!t)return;if(!n.ok){o(r.error??`${n.status}`);return}o(null),i(r)}catch(e){t&&o(e.message)}};n();let r=setInterval(n,3e3);return()=>{t=!1,clearInterval(r)}},[e,s,d]),(0,P.useEffect)(()=>{l&&D.current&&(D.current.scrollTop=D.current.scrollHeight)},[r,l]),(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,B.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex justify-end`,onMouseDown:e=>{e.target===e.currentTarget&&t()},children:(0,B.jsxs)(`div`,{className:`${p?`w-[min(1340px,calc(100vw-16px))]`:`w-[min(920px,92vw)]`} h-full max-h-screen bg-paper border-l border-sand shadow-panel grid grid-rows-[auto_minmax(0,1fr)] whitespace-normal text-left transition-[width] duration-200`,style:{borderTop:`4px solid ${td(y?.role)}`},children:[(0,B.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand flex items-center gap-2`,children:[(0,B.jsx)(Mu,{id:e,role:y?.role,size:22,state:y?.liveness,active:y?.active}),(0,B.jsx)(`span`,{className:`font-display font-bold text-[16px] text-umber`,children:e}),y?.role&&(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.06em]`,style:{color:td(y.role)},children:y.role}),r&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[r.pane,` · `,r.command]}),r.active?(0,B.jsx)(G,{tone:`ok`,children:`active`}):(0,B.jsx)(G,{tone:`outline`,children:`quiet`}),(0,B.jsxs)(`span`,{className:`font-mono text-[11px] text-tan`,children:[r.lines,` lines · `,new Date(r.capturedAt).toLocaleTimeString()]})]}),(0,B.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,B.jsx)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden`,children:[[`colors`,d,()=>f(e=>!e)],[`tasks`,p,()=>h(!p)],[`follow`,l,()=>u(e=>!e)]].map(([e,t,n])=>(0,B.jsx)(`button`,{type:`button`,onClick:n,"aria-pressed":t,className:`px-2 py-[3px] text-[11px] font-mono border-0 cursor-pointer ${t?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:e},e))}),(0,B.jsx)(`select`,{value:s,onChange:e=>c(Number(e.target.value)),className:`font-mono text-[11px] px-1.5 py-1 border border-dust rounded bg-paper text-umber`,children:[100,200,500,1e3,2e3].map(e=>(0,B.jsxs)(`option`,{value:e,children:[e,` lines`]},e))}),(0,B.jsx)(K,{size:`sm`,onClick:t,children:`Close (Esc)`})]})]}),(0,B.jsxs)(`div`,{className:`min-h-0 grid ${p?`grid-cols-[minmax(0,1fr)_minmax(300px,380px)]`:`grid-cols-1`}`,children:[(0,B.jsxs)(`div`,{className:`min-h-0 grid grid-rows-[minmax(0,1fr)_auto]`,children:[(0,B.jsx)(`pre`,{ref:D,className:`m-0 px-4 py-3 min-h-0 overflow-auto font-mono text-[12px] leading-[1.45] whitespace-pre-wrap break-words pane-dark`,children:a?(0,B.jsx)(`span`,{className:`text-brick`,children:a}):r?n(d&&r.ansi?uo(r.ansi):r.text):`capturing…`}),(0,B.jsxs)(`div`,{className:`px-4 py-2 border-t border-sand grid gap-1.5`,children:[(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2 items-center`,children:[(0,B.jsx)(`input`,{value:x,onChange:e=>S(e.target.value),onKeyDown:e=>{e.key===`Enter`&&v&&E()},onPaste:T.onPaste,onDrop:T.onDrop,onDragOver:T.onDragOver,disabled:!v,placeholder:v?`DM ${e} as david — paste or drop an image, delivered by its tmux-push into this pane`:`DM needs bus writes on (header badge)`,className:`text-[13px] px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut`}),(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:E,disabled:!v||!T.hasContent(x)||T.busy||C===`sending`,children:`Send DM`})]}),(0,B.jsx)(Gu,{a:T}),(0,B.jsxs)(`div`,{className:`font-mono text-[11px] text-tan`,children:[`read-only `,(0,B.jsx)(`code`,{children:`tmux capture-pane`}),` · 3 s refresh · the console never types into panes — the DM goes through the bus (a Run) and the agent's own pusher types it`,C&&C!==`sending`?(0,B.jsxs)(`span`,{className:/^sent/.test(C)?` text-leaf`:` text-brick`,children:[` · `,C]}):null]})]})]}),p&&(0,B.jsx)(Yu,{project:b,agentId:e})]})]})})}function Yu({project:e,agentId:t}){let n=q(e?`/projects/${e}/board`:null,15e3).data,r=q(`/bus/agents`,2e4).data??[],i=n?.phases.find(e=>e.state===`ongoing`)??n?.phases.find(e=>e.state===`planned`),a=Pu(n).filter(e=>!e.done&&Lu(e.owner,r.map(e=>e.agentId))===t);return(0,B.jsxs)(`aside`,{className:`min-h-0 min-w-0 overflow-hidden border-l border-sand bg-cream/40 grid grid-rows-[auto_auto_minmax(0,1fr)]`,children:[(0,B.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand flex items-center gap-2 flex-wrap`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:`now`}),i?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(V,{to:`/board`,className:`font-semibold text-[13px] text-walnut hover:text-ember-deep hover:no-underline`,children:i.title}),(0,B.jsx)(G,{tone:i.state===`ongoing`?`david`:`neutral`,children:i.state}),(0,B.jsxs)(`span`,{className:`font-mono text-[11px] text-ink3`,children:[i.done,`/`,i.total]})]}):(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:e?`no phase in flight`:`no project selected`})]}),(0,B.jsxs)(`div`,{className:`px-3 py-2 border-b border-sand grid gap-1`,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[10px] uppercase tracking-[.1em] text-tan`,children:[t,` is on`]}),a.length===0&&(0,B.jsx)(`span`,{className:`text-[12px] text-umber`,children:`no active stream owned by this agent`}),a.map(e=>(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,B.jsx)(`span`,{className:`font-mono text-umber truncate`,title:e.note,children:e.name}),(0,B.jsx)(`span`,{className:`ml-auto`,children:(0,B.jsx)(zu,{stream:e,agents:r})})]},e.name))]}),i&&e?(0,B.jsx)(Bu,{project:e,phase:i,highlight:t,maxH:`100%`,compact:!0}):(0,B.jsx)(`div`,{className:`px-3 py-3 text-[12px] text-umber`,children:`Pick a project (header) to see its phase tasks.`})]})}var Xu=`/api`,Zu=e=>{if(!e)return`—`;let t=Math.floor((Date.now()-e)/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:`${Math.floor(t/3600)}h`};function Qu({agentId:e,lines:t=4,className:n=``,label:r}){let[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(!1);(0,P.useEffect)(()=>{let n=!0,r=async()=>{try{let r=await fetch(`${Xu}/bus/agents/${encodeURIComponent(e)}/pane?lines=${t+6}&colors=1`),i=await r.json();if(!n)return;if(!r.ok){s(i.error??String(r.status));return}s(null),a(i)}catch(e){n&&s(e.message)}};r();let i=setInterval(r,3e3);return()=>{n=!1,clearInterval(i)}},[e,t]);let u=e=>e.split(`
27
27
  `).filter(e=>e.trim().length>0).slice(-t).join(`
@@ -36,5 +36,5 @@ Error generating stack: `+e.message+`
36
36
  `),e.result===void 0?``:`
37
37
  `+JSON.stringify(e.result,null,1).slice(0,2e3),e.error?`
38
38
  `+e.error:``]})]});return(0,B.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[10vh]`,onMouseDown:e=>{e.target===e.currentTarget&&s()},children:(0,B.jsxs)(`div`,{className:`w-[600px] bg-paper border rounded-kit shadow-panel ${t?`border-brick`:`border-sand`}`,children:[(0,B.jsx)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] ${t?`text-brick`:`text-umber`}`,children:e}),(0,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px] text-umber`,children:[n,o&&!m&&(0,B.jsx)(`div`,{children:(0,B.jsx)(K,{size:`sm`,onClick:_,disabled:u,children:u?`…`:`Preview (dry-run)`})}),m&&v(m),!f&&(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:[`Type `,r,` to confirm`]}),(0,B.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}),f&&v(f)]}),(0,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:s,children:f?`Close`:`Cancel`}),!f&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:g,disabled:c!==r||u,children:u?(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,B.jsx)(Ma,{}),` Running…`]}):`Run`})]})]})})}var bf=`18px 1.6fr 1fr 1fr 1fr 1.2fr auto`,xf=[[`automation`,`groundwork-console: reads + prefixed sends only; no record authority`],[`coordinator`,`routes work, noise sink, faces the fleet`],[`coord-worker`,`lane owner, own worktree, cites every DONE`],[`coord-qa`,`quality gate; PASS/FAIL @ head`],[`coord-ci`,`release operator; merges on cited PASS`],[`coord-aide`,`David’s comms point; owns QUEUE`],[`coord-audit`,`read-only architecture drift`],[`coord-fleet`,`stands up a fleet in tmux`],[`coord-handover`,`context-clear snapshot`]],Sf=e=>e===null?`—`:e<6e4?`just now`:e<36e5?`${Math.round(e/6e4)} min`:e<864e5?`${Math.round(e/36e5)} h`:`${Math.round(e/864e5)} d`;function Cf(){let{current:e,projects:t}=za(),{data:n,error:r,loading:i}=q(`/bus/agents`,2e4),[a,o]=(0,P.useState)(`project`),{runs:s}=Ha(),c=q(`/kit`).data,[l,u]=(0,P.useState)(!1),d=s.find(e=>e.label===`bus doctor`&&e.status===`ok`),f=d?.result,p=async()=>{u(!0);try{await Fa(`/actions/bus-doctor`)}finally{u(!1)}},[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(null),[b,x]=(0,P.useState)(!1),[S,C]=(0,P.useState)(!1),w=q(a===`project`&&e?`/projects/${e}/fleet`:null,2e4).data,T=q(`/admin/bus-writes`,1e4).data?.enabled??!1,E=ar(),D=n??[],O=t.find(t=>t.name===e)?.room,k=D.filter(t=>t.project===e||O&&t.project===O),A=a===`project`?k:D,j=A.filter(e=>e.liveness===`dead`&&![`groundwork-console`,`david`].includes(e.agentId)).map(e=>e.agentId),M=A.filter(e=>e.liveness===`live`).length,N=e=>t.find(t=>t.name===e.project||t.room&&t.room===e.project)?.name,ee=e=>N(e)??`~${e.project??`—`}`,F=a===`all`?[...new Set(D.map(ee))].sort((e,t)=>!!e.startsWith(`~`)-+!!t.startsWith(`~`)||e.localeCompare(t)):[e],I=e=>{if(e.startsWith(`~`))return{title:`#${e.slice(1)}`,path:`not registered as a project`,registered:!1};let n=t.find(t=>t.name===e);return{title:e,path:n?.room?`#${n.room}`:`no room linked`,registered:!0}};return(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Fleets`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber whitespace-nowrap`,children:[a===`project`?`${e} · `:`all projects · `,A.length,` registered · `,M,` live`]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap justify-end`,children:[(0,B.jsxs)(`span`,{className:`inline-flex border border-dust rounded-kit overflow-hidden whitespace-nowrap`,children:[(0,B.jsxs)(`button`,{onClick:()=>o(`project`),"aria-pressed":a===`project`,className:`px-2.5 py-[5px] text-[12px] font-medium border-0 cursor-pointer ${a===`project`?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:[e||`project`,` · `,k.length]}),(0,B.jsxs)(`button`,{onClick:()=>o(`all`),"aria-pressed":a===`all`,className:`px-2.5 py-[5px] text-[12px] font-medium border-0 cursor-pointer ${a===`all`?`bg-walnut text-paper`:`bg-paper text-umber`}`,children:[`all · `,D.length]})]}),(0,B.jsx)(K,{size:`sm`,onClick:()=>E(`/monitor`),children:`Monitor`}),(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>x(!0),title:`spawn an agent into tmux for this project`,children:`Spawn agent…`}),(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(K,{size:`sm`,onClick:()=>C(e=>!e),"aria-expanded":S,children:`Admin ▾`}),S&&(0,B.jsxs)(`div`,{className:`absolute right-0 top-[calc(100%+6px)] z-40 w-[260px] bg-paper border border-sand rounded-kit shadow-panel whitespace-normal text-left`,onMouseLeave:()=>C(!1),children:[(0,B.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen border-b border-sand`,onClick:()=>{C(!1),p()},disabled:l,children:[l?`Running doctor…`:`Run bus doctor`,(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`MCP doctor as groundwork-console · read-only`})]}),(0,B.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen border-b border-sand`,onClick:()=>{C(!1),_({kind:`prune`})},children:[`Prune bus data…`,(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`old messages/status/inbox · dry-run first`})]}),(0,B.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen border-b border-sand disabled:opacity-50`,onClick:()=>{C(!1),_({kind:`dead`})},disabled:j.length===0,children:[`Unregister dead (`,j.length,a===`project`?` in ${e}`:``,`)…`,(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`force_unregister agents inactive > 24 h`})]}),O&&(0,B.jsxs)(`button`,{className:`w-full text-left px-3 py-2 text-[13px] border-0 bg-transparent cursor-pointer hover:bg-linen text-brick`,onClick:()=>{C(!1),h(!0)},children:[`Decommission fleet + #`,O,`…`,(0,B.jsx)(`div`,{className:`font-mono text-[11px] text-tan`,children:`unregister members + delete room`})]}),!T&&(0,B.jsx)(`div`,{className:`px-3 py-2 font-mono text-[11px] text-tan border-t border-sand`,children:`bus writes are off — admin actions dry-run / refuse`})]})]})]})]}),b&&(0,B.jsx)(kd,{project:e,canWrite:T,onClose:()=>{x(!1)}}),v&&(0,B.jsx)(Ju,{agentId:v,onClose:()=>y(null)}),g?.kind===`prune`&&(0,B.jsx)(yf,{title:`Prune bus data`,confirmWord:`PRUNE`,action:`/actions/prune`,payload:{dryRun:!1,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0},preview:()=>Fa(`/actions/prune`,{dryRun:!0,olderThanDays:30,targets:[`rooms`,`status`,`inbox`,`receipts`,`members`],removeOrphanInboxes:!0}),onClose:()=>_(null),body:(0,B.jsxs)(`div`,{children:[`MCP `,(0,B.jsx)(`code`,{children:`prune`}),`: removes room messages / status entries / inbox items / receipts older than `,(0,B.jsx)(`b`,{children:`30 days`}),` (decisions kept longer), orphan inboxes and stale memberships. Preview first — the tool has a native dry-run. Requires bus writes on.`]})}),g?.kind===`dead`&&(0,B.jsx)(yf,{danger:!0,title:`Unregister ${j.length} dead agent${j.length===1?``:`s`}`,confirmWord:`UNREGISTER`,action:`/actions/unregister-dead`,payload:{agentIds:j},onClose:()=>_(null),body:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`code`,{children:`force_unregister`}),` for every agent in `,(0,B.jsx)(`b`,{children:a===`project`?e:`all projects`}),` whose last activity is over 24 h old: `,(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-walnut break-words`,children:j.join(`, `)}),`. Registry entries, transports and inbox markers go; room history stays. Requires bus writes on.`]})}),g?.kind===`one`&&(0,B.jsx)(yf,{danger:!0,title:`Unregister ${g.id}`,confirmWord:g.id,action:`/actions/unregister`,payload:{agentId:g.id},onClose:()=>_(null),body:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`code`,{children:`force_unregister`}),` `,(0,B.jsx)(`b`,{children:g.id}),`. Requires bus writes on.`]})}),m&&O&&(0,B.jsx)(wf,{room:O,project:e,agents:k.map(e=>e.agentId),onClose:()=>h(!1)}),r&&(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,r]}),a===`project`&&w?.state===`present`&&(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Fleet`,icon:`fleet`,path:`${w.live.length} live · topology`}),(0,B.jsx)(`div`,{className:`px-3 py-3`,children:(0,B.jsx)(Ad,{project:e,fleet:w,canWrite:T,onOpenPane:e=>y(e)})})]}),a===`project`&&(0,B.jsx)(Nd,{project:e,canWrite:T}),A.length===0&&!i&&a===`all`&&(0,B.jsx)(U,{className:`px-4 py-3 text-[13px] text-umber`,children:`No agents registered on the bus.`}),F.filter(e=>a!==`all`||A.some(t=>ee(t)===e)).map(e=>{let t=I(e),n=a===`all`?A.filter(t=>ee(t)===e):A;return(0,B.jsxs)(U,{children:[a===`all`&&(0,B.jsx)(W,{title:t.title,icon:`fleet`,path:`${t.path} · ${n.length} agent${n.length===1?``:`s`}`,children:!t.registered&&(0,B.jsx)(G,{tone:`outline`,children:`not registered`})}),(0,B.jsxs)(ka,{cols:bf,children:[(0,B.jsx)(`span`,{}),(0,B.jsx)(`span`,{children:`Agent`}),(0,B.jsx)(`span`,{children:`Role`}),(0,B.jsx)(`span`,{children:`Project`}),(0,B.jsx)(`span`,{children:`Transport`}),(0,B.jsx)(`span`,{children:`Pane · last seen`}),(0,B.jsx)(`span`,{})]}),n.map(e=>(0,B.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:bf},children:[(0,B.jsx)(ja,{state:e.liveness,active:e.active}),(0,B.jsx)(`span`,{className:`font-mono font-medium text-[13px] truncate`,children:e.agentId}),(0,B.jsx)(`span`,{className:`text-umber text-[13px] truncate`,children:e.role??`—`}),(0,B.jsx)(`span`,{className:`font-mono text-[13px] truncate`,children:e.project??`—`}),(0,B.jsx)(`span`,{className:`justify-self-start`,children:e.transport?(0,B.jsx)(G,{tone:`outline`,children:e.transport}):e.liveness===`dead`?(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`}):(0,B.jsx)(G,{tone:`warn`,children:`not attached`})}),(0,B.jsxs)(`span`,{className:`font-mono text-[12px] text-ink3`,children:[e.pane?(0,B.jsx)(`button`,{className:`border-0 bg-transparent p-0 font-mono text-[12px] text-ember-deep cursor-pointer underline decoration-dotted`,onClick:()=>y(e.agentId),title:`view pane`,children:e.pane}):`—`,` · `,Sf(e.heartbeatAgeMs),e.paneCommand?(0,B.jsxs)(`span`,{className:`text-tan`,children:[` · `,e.paneCommand]}):``]}),e.liveness===`dead`?(0,B.jsx)(K,{tone:`ghost`,size:`sm`,onClick:()=>_({kind:`one`,id:e.agentId}),children:`Unregister`}):(0,B.jsx)(K,{tone:`ghost`,size:`sm`,onClick:()=>id(e.agentId),children:`DM`})]},e.agentId))]},e)})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Liveness rule`,icon:`health`,path:`pane activity ∨ heartbeat`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`last seen = freshest of tmux `,(0,B.jsx)(`code`,{children:`window_activity`}),`, heartbeat, transport/inbox mtimes · `,(0,B.jsx)(`b`,{className:`text-walnut`,children:`live`}),` < 15 min · idle < 24 h · dead beyond. Pulsing dot = pane output in the last 60 s. Click a pane id to watch it (read-only).`]})]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Roles`,icon:`fleet`,path:`playbook ${c?.packages?.playbook?.version??`…`}`}),(0,B.jsx)(`div`,{className:`px-3 pt-1.5 pb-2.5 grid gap-1 text-[13px] text-umber`,children:xf.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:e}),` — `,t]},e))})]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Bus doctor`,icon:`doctor`,path:f?`mcp doctor · ${new Date(d.endedAt??d.startedAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`:`mcp doctor as groundwork-console`,children:f&&(0,B.jsx)(G,{tone:f.healthy?`ok`:`warn`,children:f.healthy?`healthy`:`${f.summary.warn} warn · ${f.summary.error} error`})}),!f&&(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:[`Press `,(0,B.jsx)(`b`,{children:`Run doctor`}),` — calls the MCP `,(0,B.jsx)(`code`,{children:`doctor`}),` tool as `,(0,B.jsx)(`code`,{children:`groundwork-console`}),` (automation). Read-only; `,(0,B.jsx)(`code`,{children:`fix`}),` stays gated.`]}),f?.findings.filter(e=>e.level!==`ok`).map(e=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] min-h-10 items-center border-b border-sand last:border-b-0`,children:[(0,B.jsx)(`div`,{className:`self-stretch flex items-center justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`!`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 min-w-0`,children:[(0,B.jsx)(G,{tone:e.level===`error`?`bad`:`warn`,children:e.check}),e.fixable&&(0,B.jsx)(`span`,{className:`ml-1.5 inline-flex`,children:(0,B.jsx)(G,{tone:`outline`,children:`fixable`})}),e.detail&&(0,B.jsx)(`div`,{className:`text-[13px] text-umber mt-1 break-words`,children:e.detail})]})]},e.check)),f&&(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[12px] font-mono text-ink3`,children:[f.summary.ok,` ok · `,f.summary.warn,` warn · `,f.summary.error,` error`]})]})]})]})}function wf({room:e,project:t,agents:n,onClose:r}){let[i,a]=(0,P.useState)(``),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(null);return(0,B.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-walnut/30 flex items-start justify-center pt-[12vh]`,onMouseDown:e=>{e.target===e.currentTarget&&r()},children:(0,B.jsxs)(`div`,{className:`w-[560px] bg-paper border border-brick rounded-kit shadow-panel`,children:[(0,B.jsxs)(`div`,{className:`px-4 py-3 border-b border-sand font-display font-bold text-[18px] text-brick`,children:[`Decommission fleet + channel #`,e]}),(0,B.jsxs)(`div`,{className:`p-4 grid gap-3 text-[13px]`,children:[(0,B.jsxs)(`div`,{className:`text-umber`,children:[`This will `,(0,B.jsxs)(`b`,{className:`text-walnut`,children:[`force_unregister `,n.length,` agent`,n.length===1?``:`s`]}),` (`,n.slice(0,6).join(`, `),n.length>6?`…`:``,`), then `,(0,B.jsxs)(`b`,{className:`text-walnut`,children:[`delete_room #`,e]}),` (message history is kept in `,(0,B.jsx)(`code`,{children:`~/agent-coord/history`}),`). Repo and seam files are never touched.`]}),(0,B.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked)}),` also remove `,(0,B.jsx)(`b`,{children:t}),` from groundwork-console.config.json`]}),(0,B.jsxs)(`label`,{className:`grid gap-1`,children:[(0,B.jsx)(`span`,{className:`font-mono text-[11px] uppercase tracking-[.08em] text-ink3`,children:`Type the room name to confirm`}),(0,B.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:e,className:`px-2.5 py-2 border border-dust rounded-kit bg-paper text-walnut font-mono`})]}),(0,B.jsxs)(`div`,{className:`text-[12px] text-umber`,children:[`Bus writes are gated: without `,(0,B.jsx)(`code`,{children:`GROUNDWORK_CONSOLE_BUS_WRITES=1`}),` on the API this runs as a `,(0,B.jsx)(`b`,{children:`dry-run`}),` and records what it would do (see Runs). With the switch on, it executes as `,(0,B.jsx)(`code`,{children:`groundwork-console`}),`.`]}),u&&(0,B.jsxs)(`div`,{className:`p-2 rounded-kit border ${u.status===`ok`?`border-moss-line bg-moss-wash/50`:`border-brick-line bg-brick-wash/50`}`,children:[(0,B.jsxs)(`div`,{className:`font-mono text-[12px]`,children:[(0,B.jsx)(G,{tone:u.status===`ok`?`ok`:`bad`,children:u.status}),` `,(0,B.jsx)(`b`,{children:u.label})]}),(0,B.jsx)(`pre`,{className:`m-0 mt-1 font-mono text-[12px] whitespace-pre-wrap`,children:u.log.join(`
39
- `)})]})]}),(0,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:r,children:u?`Close`:`Cancel`}),!u&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:async()=>{l(!0);try{d(await Fa(`/actions/decommission`,{room:e,confirm:i,removeProject:o}))}finally{l(!1)}},disabled:i!==e||c,children:c?`Running…`:`Decommission`})]})]})})}var Tf=`1.4fr .6fr .9fr .9fr 1.2fr 2fr`,Ef=({on:e,label:t})=>(0,B.jsx)(`span`,{className:`font-mono text-[11px] px-1.5 py-0.5 rounded ${e?`bg-linen text-umber`:`text-tan line-through opacity-60`}`,children:t});function Df(){let{current:e}=za(),{data:t,error:n,refresh:r}=q(e?`/projects/${e}/skills`:null,6e4),[i,a]=(0,P.useState)(null);if(n)return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});if(!t)return(0,B.jsx)(`div`,{className:`p-4 text-umber`,children:`Scanning skills…`});let o=t.groundwork,s=t.playbook,c=o.skills.filter(e=>e.installed&&e.inSync===!1).length+s.cards.filter(e=>e.installed&&(e.inSync===!1||e.legacyEssay)).length+ +!!o.driftedVersion+s.legacyDirs.length;return(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[i===`gw`&&(0,B.jsx)(yf,{title:`groundwork update · ${e}`,confirmWord:e,action:`/actions/groundwork-update/${e}`,payload:{all:!0,docs:!0},onClose:()=>{a(null),r()},body:(0,B.jsxs)(`div`,{children:[`Runs `,(0,B.jsxs)(`code`,{children:[`groundwork update `,`<repo>`,` --all --docs`]}),` from the kit (`,o.kitVersion,`): refreshes installed skills + IDE mirrors, adds skills added upstream, refreshes the generic reference docs (methodology, COMMANDS, _INDEX), bumps `,(0,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),`. `,(0,B.jsx)(`b`,{className:`text-walnut`,children:`Writes into the repo working tree`}),` (uncommitted — review in Docs, which highlights the changes). Project docs (PRD, WORKSTREAMS…) are left alone.`]})}),i===`pb`&&(0,B.jsx)(yf,{title:`agent-coordination update (global)`,confirmWord:`UPDATE`,action:`/actions/playbook-update`,payload:{dryRun:!1},preview:()=>Fa(`/actions/playbook-update`,{dryRun:!0}),onClose:()=>{a(null),r()},body:(0,B.jsxs)(`div`,{children:[`Re-syncs the playbook field cards into `,(0,B.jsx)(`code`,{children:`~/.claude/skills`}),` (+ essay + slices, all harness mirrors) from the kit (`,s.kitVersion,`); removes legacy dirs. Machine-global. Preview shows the exact plan.`]})}),(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Skills`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`what each harness can run — `,e,` and globally · byte-compared to the kit`]})]}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[c,` need attention`]})]}),(0,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Groundwork · per repo`,icon:`skills`,eyebrow:`payload/skills · .claude/skills`,path:`marker ${o.versionMarker??`—`} · kit ${o.kitVersion}`,children:[o.driftedVersion&&(0,B.jsxs)(G,{tone:`warn`,children:[`behind `,o.kitVersion]}),(0,B.jsx)(K,{size:`sm`,tone:o.driftedVersion?`primary`:`default`,onClick:()=>a(`gw`),children:`groundwork update…`})]}),(0,B.jsxs)(ka,{cols:Tf,children:[(0,B.jsx)(`span`,{children:`Skill`}),(0,B.jsx)(`span`,{children:`Tier`}),(0,B.jsx)(`span`,{children:`Installed`}),(0,B.jsx)(`span`,{children:`In sync`}),(0,B.jsx)(`span`,{children:`Mirrors`}),(0,B.jsx)(`span`,{children:`Description`})]}),o.skills.map(e=>(0,B.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:Tf},children:[(0,B.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{children:(0,B.jsx)(G,{tone:e.tier===`min`?`neutral`:`outline`,children:e.tier===`min`?`core`:`optional`})}),(0,B.jsx)(`span`,{children:e.installed?(0,B.jsx)(G,{tone:`ok`,children:`installed`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsx)(`span`,{children:e.installed?e.inSync?(0,B.jsx)(G,{tone:`ok`,children:`= kit`}):(0,B.jsx)(G,{tone:`warn`,children:`differs`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsxs)(`span`,{className:`flex gap-1`,children:[(0,B.jsx)(Ef,{on:e.mirrors.cursor,label:`cursor`}),(0,B.jsx)(Ef,{on:e.mirrors.vscode,label:`vscode`})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name))]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Playbook · machine-global`,icon:`skills`,eyebrow:`field cards`,path:`${(s.homes??[]).map(e=>`${e.harness}: ${e.dir.replace(/^\/Users\/[^/]+/,`~`)}`).join(` · `)||`~/.claude/skills`} · kit ${s.kitVersion}`,children:(0,B.jsx)(K,{size:`sm`,onClick:()=>a(`pb`),children:`agent-coordination update…`})}),(0,B.jsxs)(ka,{cols:Tf,children:[(0,B.jsx)(`span`,{children:`Card`}),(0,B.jsx)(`span`,{children:`Slices`}),(0,B.jsx)(`span`,{children:`Installed`}),(0,B.jsx)(`span`,{children:`In sync`}),(0,B.jsx)(`span`,{children:`Mirrors`}),(0,B.jsx)(`span`,{children:`Description`})]}),s.cards.map(e=>(0,B.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:Tf},children:[(0,B.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{children:e.legacyEssay?(0,B.jsx)(G,{tone:`warn`,children:`775-line essay`}):(0,B.jsxs)(G,{tone:`outline`,children:[e.slices,` slice`,e.slices===1?``:`s`]})}),(0,B.jsx)(`span`,{children:e.installed?(0,B.jsx)(G,{tone:`ok`,children:`installed`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsx)(`span`,{children:e.installed?e.inSync?(0,B.jsx)(G,{tone:`ok`,children:`= kit`}):(0,B.jsx)(G,{tone:`warn`,children:`differs`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsxs)(`span`,{className:`flex gap-1 flex-wrap`,children:[(0,B.jsx)(Ef,{on:e.installed,label:`claude`}),(0,B.jsx)(Ef,{on:!!e.homes?.grok?.installed,label:`grok${e.homes?.grok?.installed&&e.homes.grok.inSync===!1?` ≠`:``}`}),(0,B.jsx)(Ef,{on:e.mirrors.cursor,label:`cursor`}),(0,B.jsx)(Ef,{on:e.mirrors.vscode,label:`vscode`}),(0,B.jsx)(Ef,{on:e.mirrors.opencode,label:`opencode`})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name)),s.legacyDirs.length>0&&(0,B.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px]`,children:[(0,B.jsx)(G,{tone:`warn`,children:`legacy dirs`}),` `,(0,B.jsxs)(`span`,{className:`text-umber`,children:[s.legacyDirs.join(`, `),` still in `,s.globalDir,` — installer removes them`]})]})]})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`How this is measured`,icon:`doctor`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1.5`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`In sync`}),` — SHA-1 of the installed `,(0,B.jsx)(`code`,{children:`SKILL.md`}),` equals the kit source (installers copy verbatim).`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Mirrors`}),` — presence of `,(0,B.jsx)(`code`,{children:`.cursor/commands/<n>.md`}),`, `,(0,B.jsx)(`code`,{children:`.vscode/prompts/<n>.prompt.md`}),`, `,(0,B.jsx)(`code`,{children:`~/.config/opencode/skills/<n>`}),`.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Marker`}),` — `,(0,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` vs the kit’s groundwork version.`]}),(0,B.jsxs)(`div`,{children:[`Asked grok for `,(0,B.jsx)(`code`,{children:`groundwork list --json`}),` / `,(0,B.jsx)(`code`,{children:`agent-coordination list --json`}),` to replace the scan.`]})]})]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Harness mirrors`,icon:`skills`,path:`seam skills-mirror`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 grid gap-2 text-[13px] text-umber`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Claude Code`}),` — canonical `,(0,B.jsx)(`code`,{children:`SKILL.md`}),`; playbook global.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Cursor`}),` — `,(0,B.jsx)(`code`,{children:`.cursor/commands`}),`, GENERATED banner.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`VS Code`}),` — `,(0,B.jsx)(`code`,{children:`.vscode/prompts`}),`, mode from allowed-tools.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`OpenCode`}),` — auto-discovers `,(0,B.jsx)(`code`,{children:`~/.claude/skills`}),`; templated MCP tool names.`]})]})]})]})]})}var Of=[[`Tier 0 · QA gate`,`typecheck · build · real tests · independent behaviour check → VERDICT PASS @ head`,`coord-qa`],[`Tier 1 · merge → qa`,`CI merges on cited PASS, squash-verify, auto-deploy to qa in < 10 min, smoke`,`coord-ci`],[`Tier 2 · async`,`long suites, perf, security — never blocking; results chased by ci`,`coord-ci`],[`Prod · promotion`,`David only. Fix-forward on qa.`,`david`]],kf={"Open PRs":`prs`,"Cutover Gates":`gates`,"Needs David":`needsDavid`,Risks:`risks`,Rooms:`rooms`,"Decisions Recorded":`decisions`},Af=e=>/pass|merged|deployed|✅|green|done/i.test(e)?`ok`:/fail|red|blocked/i.test(e)?`bad`:/david/i.test(e)?`david`:/hold|risk|pending|open/i.test(e)?`warn`:`neutral`,jf=e=>!!e&&Ta.includes(e),Mf=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``;function Nf({s:e}){let t=e.table?e.table.headers.map(()=>`1fr`).join(` `):``;return(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:e.title,icon:kf[e.title],eyebrow:`## ${e.title} · coordinator-only`,path:`docs/WORKSTREAMS.md`}),e.table&&e.table.rows.length>0&&(0,B.jsx)(ka,{cols:t,children:e.table.headers.map(e=>(0,B.jsx)(`span`,{children:e},e))}),e.table&&e.table.rows.length===1&&Object.values(e.table.rows[0]).every(e=>/^(—|-|none|n\/a|)$/i.test(e.trim())||/none open/i.test(e))?(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`none open`}):e.table?.rows.map((n,r)=>(0,B.jsx)(Oa,{glyph:`|`,raw:Object.values(n).join(` | `),children:(0,B.jsx)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:t},children:e.table.headers.map((e,t)=>{let r=n[e]??``,i=/status|state|gate|verdict/i.test(e),a=r.length<=28&&!/[`(]/.test(r);return(0,B.jsx)(`span`,{className:`min-w-0 truncate ${t===0?`font-medium`:`text-[13px] text-umber`}`,title:r,children:i&&r&&a?(0,B.jsx)(G,{tone:Af(r),children:r}):r||(0,B.jsx)(`span`,{className:`text-tan`,children:`—`})},e)})})},r)),e.bullets?.map((e,t)=>(0,B.jsx)(Oa,{glyph:`-`,children:(0,B.jsx)(`div`,{className:`py-2 text-[14px]`,children:e})},t)),!e.table?.rows.length&&!e.bullets?.length&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`})]})}function Pf(){let{current:e}=za(),{data:t,error:n}=q(e?`/projects/${e}/release`:null,3e4),r=q(`/kit`).data;if(n)return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});let i=t?.extensions??[],a=i.filter(e=>e.title!==`Rooms`);return(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Release`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[e,` · coordinator-extension sections of docs/WORKSTREAMS.md + bus VERDICT/DONE`]})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:`tier-1 ceiling 10 min · prod = David`})]}),(0,B.jsx)(`div`,{className:`grid grid-cols-4 border border-sand rounded-kit overflow-hidden max-[980px]:grid-cols-2`,children:Of.map(([e,t,n],r)=>(0,B.jsxs)(`div`,{className:`px-3.5 py-3 border-r border-sand last:border-r-0 ${r===3?`bg-ember-wash`:`bg-paper`}`,children:[(0,B.jsx)(`b`,{className:`block font-bold text-[13px] mb-1 ${r===3?`text-ember-deep`:`text-umber`}`,children:e}),(0,B.jsx)(`span`,{className:`text-[12px] leading-[1.5]`,children:t}),(0,B.jsx)(`span`,{className:`block font-mono font-medium text-[11px] text-ink3 mt-1.5`,children:n})]},e))}),!t&&(0,B.jsx)(`div`,{className:`text-umber text-[13px]`,children:`Reading WORKSTREAMS…`}),t&&i.length===0&&(0,B.jsx)(U,{className:`px-4 py-3 text-[13px] text-umber`,children:`No coordinator-extension sections in this project’s WORKSTREAMS.md (solo project, or not adopted yet).`}),a.map(e=>(0,B.jsx)(Nf,{s:e},e.title))]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Dock telemetry`,icon:`bus`,path:`VERDICT / DONE from the room`}),(t?.telemetry??[]).length===0&&(0,B.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:`no VERDICT/DONE messages yet`}),(t?.telemetry??[]).map((e,t)=>{let n=String(e.text??``),r=e.prefix??n.split(/[:\s]/)[0];return(0,B.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,B.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`#`}),(0,B.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Mf(e.ts)})]}),(0,B.jsxs)(`div`,{className:`text-[13px] break-words line-clamp-3`,children:[jf(r)&&(0,B.jsx)(Da,{prefix:r,fail:/FAIL/.test(n)}),n.replace(/^\w[\w ]*:?\s*/,``)]})]})]},e.id??t)})]}),i.find(e=>e.title===`Rooms`)&&(0,B.jsx)(Nf,{s:i.find(e=>e.title===`Rooms`)}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Kit versions`,icon:`kit`,path:`kit.json`}),(0,B.jsx)(`div`,{className:`px-3 py-2 grid gap-1 font-mono text-[12px] text-umber`,children:r?.packages?Object.entries(r.packages).map(([e,t])=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2`,children:[(0,B.jsx)(`span`,{children:t.name}),(0,B.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):`—`})]}),t&&(0,B.jsx)(`div`,{className:`text-[11px] font-mono text-tan px-1`,children:t.source})]})]})}var Ff={queued:`outline`,running:`warn`,ok:`ok`,failed:`bad`,cancelled:`neutral`},If={mcp:`MCP tool`,cli:`CLI`,bus:`bus send`,shell:`shell`,seam:`seam write`},Lf=e=>{let t=(e.endedAt??Date.now())-e.startedAt;return t<1e3?`${t} ms`:`${(t/1e3).toFixed(1)} s`},Rf=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function zf(){let{runs:e,running:t}=Ha(),[n]=Fi(),[r,i]=(0,P.useState)(n.get(`run`));(0,P.useEffect)(()=>{let e=n.get(`run`);e&&i(e)},[n]);let a=e.find(e=>e.id===r)??e[0];return(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_480px] gap-4 p-4 max-[1100px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Runs`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`every action the console performs — MCP tools, CLIs, bus sends, shells · `,t,` running`]})]}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[`last `,e.length]})]}),(0,B.jsxs)(U,{children:[e.length===0&&(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`Nothing has run yet. Try `,(0,B.jsx)(`b`,{children:`Run doctor`}),` on Fleets or `,(0,B.jsx)(`b`,{children:`Doctor`}),` on the Board.`]}),e.map(e=>(0,B.jsxs)(`button`,{onClick:()=>i(e.id),className:`w-full text-left grid grid-cols-[var(--spacing-gutter)_1fr_auto] items-center min-h-10 border-b border-sand last:border-b-0 border-0 bg-transparent cursor-pointer hover:bg-linen/60 ${a?.id===e.id?`bg-linen/70`:``}`,children:[(0,B.jsx)(`span`,{className:`self-stretch flex items-center justify-center font-mono text-[12px] border-r border-sand ${e.status===`running`?`text-amber animate-pulse`:e.status===`failed`?`text-brick`:`text-tan`}`,children:e.status===`running`?(0,B.jsx)(Ma,{size:12}):e.status===`ok`?`✓`:e.status===`failed`?`✗`:`○`}),(0,B.jsx)(`span`,{className:`px-3 py-1.5 min-w-0`,children:(0,B.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,B.jsx)(G,{tone:Ff[e.status],children:e.status}),(0,B.jsx)(`b`,{className:`text-[13px] truncate`,children:e.label}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:If[e.kind]}),e.project&&(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.project}),e.sideEffects&&(0,B.jsx)(G,{tone:`david`,children:`side effects`})]})}),(0,B.jsxs)(`span`,{className:`px-3 font-mono text-[12px] text-ink3 whitespace-nowrap`,children:[Rf(e.startedAt),` · `,Lf(e)]})]},e.id))]})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[a?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:a.label,icon:`health`,path:`${a.id} · ${If[a.kind]}`,children:(0,B.jsx)(G,{tone:Ff[a.status],children:a.status})}),a.args&&(0,B.jsx)(`div`,{className:`px-3 py-2 font-mono text-[12px] text-ink3 border-b border-sand break-all`,children:JSON.stringify(a.args)}),(0,B.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[12px] leading-[1.6] text-umber whitespace-pre-wrap max-h-[40vh] overflow-auto`,children:a.log.join(`
39
+ `)})]})]}),(0,B.jsxs)(`div`,{className:`px-4 py-3 border-t border-sand flex justify-end gap-2`,children:[(0,B.jsx)(K,{size:`sm`,onClick:r,children:u?`Close`:`Cancel`}),!u&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:async()=>{l(!0);try{d(await Fa(`/actions/decommission`,{room:e,confirm:i,removeProject:o}))}finally{l(!1)}},disabled:i!==e||c,children:c?`Running…`:`Decommission`})]})]})})}var Tf=`1.4fr .6fr .9fr .9fr 1.2fr 2fr`,Ef=({on:e,label:t})=>(0,B.jsx)(`span`,{className:`font-mono text-[11px] px-1.5 py-0.5 rounded ${e?`bg-linen text-umber`:`text-tan line-through opacity-60`}`,children:t});function Df(){let{current:e}=za(),{data:t,error:n,refresh:r}=q(e?`/projects/${e}/skills`:null,6e4),[i,a]=(0,P.useState)(null);if(n)return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});if(!t)return(0,B.jsx)(`div`,{className:`p-4 text-umber`,children:`Scanning skills…`});let o=t.groundwork,s=t.playbook,c=o.skills.filter(e=>e.installed&&e.inSync===!1).length+s.cards.filter(e=>e.installed&&(e.inSync===!1||e.legacyEssay)).length+ +!!o.driftedVersion+s.legacyDirs.length;return(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[i===`gwinit`&&(0,B.jsx)(yf,{title:`groundwork init · ${e}`,confirmWord:e,action:`/actions/groundwork-init/${e}`,payload:{},onClose:()=>{a(null),r()},body:(0,B.jsxs)(`div`,{children:[`Runs `,(0,B.jsx)(`code`,{children:`groundwork init <repo>`}),` — installs the skills, IDE mirrors and the `,(0,B.jsx)(`code`,{children:`docs/`}),` scaffold (WORKSTREAMS/QUEUE/DONE/FACTS, methodology, templates, phases/) into the working tree. Nothing is committed; review with `,(0,B.jsx)(`code`,{children:`git status`}),`. Only offered when `,(0,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` is missing.`]})}),i===`gw`&&(0,B.jsx)(yf,{title:`groundwork update · ${e}`,confirmWord:e,action:`/actions/groundwork-update/${e}`,payload:{all:!0,docs:!0},onClose:()=>{a(null),r()},body:(0,B.jsxs)(`div`,{children:[`Runs `,(0,B.jsxs)(`code`,{children:[`groundwork update `,`<repo>`,` --all --docs`]}),` from the kit (`,o.kitVersion,`): refreshes installed skills + IDE mirrors, adds skills added upstream, refreshes the generic reference docs (methodology, COMMANDS, _INDEX), bumps `,(0,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),`. `,(0,B.jsx)(`b`,{className:`text-walnut`,children:`Writes into the repo working tree`}),` (uncommitted — review in Docs, which highlights the changes). Project docs (PRD, WORKSTREAMS…) are left alone.`]})}),i===`pb`&&(0,B.jsx)(yf,{title:`agent-coordination update (global)`,confirmWord:`UPDATE`,action:`/actions/playbook-update`,payload:{dryRun:!1},preview:()=>Fa(`/actions/playbook-update`,{dryRun:!0}),onClose:()=>{a(null),r()},body:(0,B.jsxs)(`div`,{children:[`Re-syncs the playbook field cards into `,(0,B.jsx)(`code`,{children:`~/.claude/skills`}),` (+ essay + slices, all harness mirrors) from the kit (`,s.kitVersion,`); removes legacy dirs. Machine-global. Preview shows the exact plan.`]})}),(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Skills`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`what each harness can run — `,e,` and globally · byte-compared to the kit`]})]}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[c,` need attention`]})]}),(0,B.jsxs)(U,{children:[(0,B.jsxs)(W,{title:`Groundwork · per repo`,icon:`skills`,eyebrow:`payload/skills · .claude/skills`,path:`marker ${o.versionMarker??`—`} · kit ${o.kitVersion}`,children:[o.driftedVersion&&(0,B.jsxs)(G,{tone:`warn`,children:[`behind `,o.kitVersion]}),!o.versionMarker&&(0,B.jsx)(K,{size:`sm`,tone:`primary`,onClick:()=>a(`gwinit`),title:`this repo has no docs/.groundwork/VERSION — install Groundwork`,children:`groundwork init…`}),o.versionMarker&&(0,B.jsx)(K,{size:`sm`,tone:o.driftedVersion?`primary`:`default`,onClick:()=>a(`gw`),children:`groundwork update…`})]}),(0,B.jsxs)(ka,{cols:Tf,children:[(0,B.jsx)(`span`,{children:`Skill`}),(0,B.jsx)(`span`,{children:`Tier`}),(0,B.jsx)(`span`,{children:`Installed`}),(0,B.jsx)(`span`,{children:`In sync`}),(0,B.jsx)(`span`,{children:`Mirrors`}),(0,B.jsx)(`span`,{children:`Description`})]}),o.skills.map(e=>(0,B.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:Tf},children:[(0,B.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{children:(0,B.jsx)(G,{tone:e.tier===`min`?`neutral`:`outline`,children:e.tier===`min`?`core`:`optional`})}),(0,B.jsx)(`span`,{children:e.installed?(0,B.jsx)(G,{tone:`ok`,children:`installed`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsx)(`span`,{children:e.installed?e.inSync?(0,B.jsx)(G,{tone:`ok`,children:`= kit`}):(0,B.jsx)(G,{tone:`warn`,children:`differs`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsxs)(`span`,{className:`flex gap-1`,children:[(0,B.jsx)(Ef,{on:e.mirrors.cursor,label:`cursor`}),(0,B.jsx)(Ef,{on:e.mirrors.vscode,label:`vscode`})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name))]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Playbook · machine-global`,icon:`skills`,eyebrow:`field cards`,path:`${(s.homes??[]).map(e=>`${e.harness}: ${e.dir.replace(/^\/Users\/[^/]+/,`~`)}`).join(` · `)||`~/.claude/skills`} · kit ${s.kitVersion}`,children:(0,B.jsx)(K,{size:`sm`,onClick:()=>a(`pb`),children:`agent-coordination update…`})}),(0,B.jsxs)(ka,{cols:Tf,children:[(0,B.jsx)(`span`,{children:`Card`}),(0,B.jsx)(`span`,{children:`Slices`}),(0,B.jsx)(`span`,{children:`Installed`}),(0,B.jsx)(`span`,{children:`In sync`}),(0,B.jsx)(`span`,{children:`Mirrors`}),(0,B.jsx)(`span`,{children:`Description`})]}),s.cards.map(e=>(0,B.jsxs)(`div`,{className:`grid gap-3 items-center px-3 min-h-10 border-b border-sand last:border-b-0 hover:bg-linen/60`,style:{gridTemplateColumns:Tf},children:[(0,B.jsxs)(`span`,{className:`font-mono font-medium text-[13px]`,children:[`/`,e.name]}),(0,B.jsx)(`span`,{children:e.legacyEssay?(0,B.jsx)(G,{tone:`warn`,children:`775-line essay`}):(0,B.jsxs)(G,{tone:`outline`,children:[e.slices,` slice`,e.slices===1?``:`s`]})}),(0,B.jsx)(`span`,{children:e.installed?(0,B.jsx)(G,{tone:`ok`,children:`installed`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsx)(`span`,{children:e.installed?e.inSync?(0,B.jsx)(G,{tone:`ok`,children:`= kit`}):(0,B.jsx)(G,{tone:`warn`,children:`differs`}):(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-tan`,children:`—`})}),(0,B.jsxs)(`span`,{className:`flex gap-1 flex-wrap`,children:[(0,B.jsx)(Ef,{on:e.installed,label:`claude`}),(0,B.jsx)(Ef,{on:!!e.homes?.grok?.installed,label:`grok${e.homes?.grok?.installed&&e.homes.grok.inSync===!1?` ≠`:``}`}),(0,B.jsx)(Ef,{on:e.mirrors.cursor,label:`cursor`}),(0,B.jsx)(Ef,{on:e.mirrors.vscode,label:`vscode`}),(0,B.jsx)(Ef,{on:e.mirrors.opencode,label:`opencode`})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber truncate`,title:e.description,children:e.description})]},e.name)),s.legacyDirs.length>0&&(0,B.jsxs)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px]`,children:[(0,B.jsx)(G,{tone:`warn`,children:`legacy dirs`}),` `,(0,B.jsxs)(`span`,{className:`text-umber`,children:[s.legacyDirs.join(`, `),` still in `,s.globalDir,` — installer removes them`]})]})]})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`How this is measured`,icon:`doctor`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1.5`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`In sync`}),` — SHA-1 of the installed `,(0,B.jsx)(`code`,{children:`SKILL.md`}),` equals the kit source (installers copy verbatim).`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Mirrors`}),` — presence of `,(0,B.jsx)(`code`,{children:`.cursor/commands/<n>.md`}),`, `,(0,B.jsx)(`code`,{children:`.vscode/prompts/<n>.prompt.md`}),`, `,(0,B.jsx)(`code`,{children:`~/.config/opencode/skills/<n>`}),`.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Marker`}),` — `,(0,B.jsx)(`code`,{children:`docs/.groundwork/VERSION`}),` vs the kit’s groundwork version.`]}),(0,B.jsxs)(`div`,{children:[`Asked grok for `,(0,B.jsx)(`code`,{children:`groundwork list --json`}),` / `,(0,B.jsx)(`code`,{children:`agent-coordination list --json`}),` to replace the scan.`]})]})]}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Harness mirrors`,icon:`skills`,path:`seam skills-mirror`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 grid gap-2 text-[13px] text-umber`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Claude Code`}),` — canonical `,(0,B.jsx)(`code`,{children:`SKILL.md`}),`; playbook global.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`Cursor`}),` — `,(0,B.jsx)(`code`,{children:`.cursor/commands`}),`, GENERATED banner.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`VS Code`}),` — `,(0,B.jsx)(`code`,{children:`.vscode/prompts`}),`, mode from allowed-tools.`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`OpenCode`}),` — auto-discovers `,(0,B.jsx)(`code`,{children:`~/.claude/skills`}),`; templated MCP tool names.`]})]})]})]})]})}var Of=[[`Tier 0 · QA gate`,`typecheck · build · real tests · independent behaviour check → VERDICT PASS @ head`,`coord-qa`],[`Tier 1 · merge → qa`,`CI merges on cited PASS, squash-verify, auto-deploy to qa in < 10 min, smoke`,`coord-ci`],[`Tier 2 · async`,`long suites, perf, security — never blocking; results chased by ci`,`coord-ci`],[`Prod · promotion`,`David only. Fix-forward on qa.`,`david`]],kf={"Open PRs":`prs`,"Cutover Gates":`gates`,"Needs David":`needsDavid`,Risks:`risks`,Rooms:`rooms`,"Decisions Recorded":`decisions`},Af=e=>/pass|merged|deployed|✅|green|done/i.test(e)?`ok`:/fail|red|blocked/i.test(e)?`bad`:/david/i.test(e)?`david`:/hold|risk|pending|open/i.test(e)?`warn`:`neutral`,jf=e=>!!e&&Ta.includes(e),Mf=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``;function Nf({s:e}){let t=e.table?e.table.headers.map(()=>`1fr`).join(` `):``;return(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:e.title,icon:kf[e.title],eyebrow:`## ${e.title} · coordinator-only`,path:`docs/WORKSTREAMS.md`}),e.table&&e.table.rows.length>0&&(0,B.jsx)(ka,{cols:t,children:e.table.headers.map(e=>(0,B.jsx)(`span`,{children:e},e))}),e.table&&e.table.rows.length===1&&Object.values(e.table.rows[0]).every(e=>/^(—|-|none|n\/a|)$/i.test(e.trim())||/none open/i.test(e))?(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`none open`}):e.table?.rows.map((n,r)=>(0,B.jsx)(Oa,{glyph:`|`,raw:Object.values(n).join(` | `),children:(0,B.jsx)(`div`,{className:`grid gap-3 items-center py-1.5`,style:{gridTemplateColumns:t},children:e.table.headers.map((e,t)=>{let r=n[e]??``,i=/status|state|gate|verdict/i.test(e),a=r.length<=28&&!/[`(]/.test(r);return(0,B.jsx)(`span`,{className:`min-w-0 truncate ${t===0?`font-medium`:`text-[13px] text-umber`}`,title:r,children:i&&r&&a?(0,B.jsx)(G,{tone:Af(r),children:r}):r||(0,B.jsx)(`span`,{className:`text-tan`,children:`—`})},e)})})},r)),e.bullets?.map((e,t)=>(0,B.jsx)(Oa,{glyph:`-`,children:(0,B.jsx)(`div`,{className:`py-2 text-[14px]`,children:e})},t)),!e.table?.rows.length&&!e.bullets?.length&&(0,B.jsx)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:`empty`})]})}function Pf(){let{current:e}=za(),{data:t,error:n}=q(e?`/projects/${e}/release`:null,3e4),r=q(`/kit`).data;if(n)return(0,B.jsx)(`div`,{className:`p-4`,children:(0,B.jsxs)(U,{className:`px-4 py-3 text-[13px] text-brick`,children:[`API error: `,n]})});let i=t?.extensions??[],a=i.filter(e=>e.title!==`Rooms`);return(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_340px] gap-4 p-4 max-[980px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Release`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[e,` · coordinator-extension sections of docs/WORKSTREAMS.md + bus VERDICT/DONE`]})]}),(0,B.jsx)(`span`,{className:`text-[13px] text-umber`,children:`tier-1 ceiling 10 min · prod = David`})]}),(0,B.jsx)(`div`,{className:`grid grid-cols-4 border border-sand rounded-kit overflow-hidden max-[980px]:grid-cols-2`,children:Of.map(([e,t,n],r)=>(0,B.jsxs)(`div`,{className:`px-3.5 py-3 border-r border-sand last:border-r-0 ${r===3?`bg-ember-wash`:`bg-paper`}`,children:[(0,B.jsx)(`b`,{className:`block font-bold text-[13px] mb-1 ${r===3?`text-ember-deep`:`text-umber`}`,children:e}),(0,B.jsx)(`span`,{className:`text-[12px] leading-[1.5]`,children:t}),(0,B.jsx)(`span`,{className:`block font-mono font-medium text-[11px] text-ink3 mt-1.5`,children:n})]},e))}),!t&&(0,B.jsx)(`div`,{className:`text-umber text-[13px]`,children:`Reading WORKSTREAMS…`}),t&&i.length===0&&(0,B.jsx)(U,{className:`px-4 py-3 text-[13px] text-umber`,children:`No coordinator-extension sections in this project’s WORKSTREAMS.md (solo project, or not adopted yet).`}),a.map(e=>(0,B.jsx)(Nf,{s:e},e.title))]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Dock telemetry`,icon:`bus`,path:`VERDICT / DONE from the room`}),(t?.telemetry??[]).length===0&&(0,B.jsx)(`div`,{className:`px-3 py-2 text-[13px] text-umber`,children:`no VERDICT/DONE messages yet`}),(t?.telemetry??[]).map((e,t)=>{let n=String(e.text??``),r=e.prefix??n.split(/[:\s]/)[0];return(0,B.jsxs)(`div`,{className:`grid grid-cols-[var(--spacing-gutter)_1fr] border-b border-sand last:border-b-0`,children:[(0,B.jsx)(`div`,{className:`py-2.5 flex justify-center font-mono text-[12px] text-tan border-r border-sand`,children:`#`}),(0,B.jsxs)(`div`,{className:`px-3 pt-2 pb-2.5 min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2 items-baseline mb-0.5`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.from}),(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:Mf(e.ts)})]}),(0,B.jsxs)(`div`,{className:`text-[13px] break-words line-clamp-3`,children:[jf(r)&&(0,B.jsx)(Da,{prefix:r,fail:/FAIL/.test(n)}),n.replace(/^\w[\w ]*:?\s*/,``)]})]})]},e.id??t)})]}),i.find(e=>e.title===`Rooms`)&&(0,B.jsx)(Nf,{s:i.find(e=>e.title===`Rooms`)}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Kit versions`,icon:`kit`,path:`kit.json`}),(0,B.jsx)(`div`,{className:`px-3 py-2 grid gap-1 font-mono text-[12px] text-umber`,children:r?.packages?Object.entries(r.packages).map(([e,t])=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2`,children:[(0,B.jsx)(`span`,{children:t.name}),(0,B.jsx)(`b`,{className:`text-walnut`,children:t.version})]},e)):`—`})]}),t&&(0,B.jsx)(`div`,{className:`text-[11px] font-mono text-tan px-1`,children:t.source})]})]})}var Ff={queued:`outline`,running:`warn`,ok:`ok`,failed:`bad`,cancelled:`neutral`},If={mcp:`MCP tool`,cli:`CLI`,bus:`bus send`,shell:`shell`,seam:`seam write`},Lf=e=>{let t=(e.endedAt??Date.now())-e.startedAt;return t<1e3?`${t} ms`:`${(t/1e3).toFixed(1)} s`},Rf=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function zf(){let{runs:e,running:t}=Ha(),[n]=Fi(),[r,i]=(0,P.useState)(n.get(`run`));(0,P.useEffect)(()=>{let e=n.get(`run`);e&&i(e)},[n]);let a=e.find(e=>e.id===r)??e[0];return(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_480px] gap-4 p-4 max-[1100px]:grid-cols-1`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3.5 content-start min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:`font-display font-bold text-[34px] leading-[1.1] tracking-[-.015em] text-ember`,children:`Runs`}),(0,B.jsxs)(`span`,{className:`ml-3 text-[13px] text-umber`,children:[`every action the console performs — MCP tools, CLIs, bus sends, shells · `,t,` running`]})]}),(0,B.jsxs)(`span`,{className:`text-[13px] text-umber`,children:[`last `,e.length]})]}),(0,B.jsxs)(U,{children:[e.length===0&&(0,B.jsxs)(`div`,{className:`px-3 py-3 text-[13px] text-umber`,children:[`Nothing has run yet. Try `,(0,B.jsx)(`b`,{children:`Run doctor`}),` on Fleets or `,(0,B.jsx)(`b`,{children:`Doctor`}),` on the Board.`]}),e.map(e=>(0,B.jsxs)(`button`,{onClick:()=>i(e.id),className:`w-full text-left grid grid-cols-[var(--spacing-gutter)_1fr_auto] items-center min-h-10 border-b border-sand last:border-b-0 border-0 bg-transparent cursor-pointer hover:bg-linen/60 ${a?.id===e.id?`bg-linen/70`:``}`,children:[(0,B.jsx)(`span`,{className:`self-stretch flex items-center justify-center font-mono text-[12px] border-r border-sand ${e.status===`running`?`text-amber animate-pulse`:e.status===`failed`?`text-brick`:`text-tan`}`,children:e.status===`running`?(0,B.jsx)(Ma,{size:12}):e.status===`ok`?`✓`:e.status===`failed`?`✗`:`○`}),(0,B.jsx)(`span`,{className:`px-3 py-1.5 min-w-0`,children:(0,B.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,B.jsx)(G,{tone:Ff[e.status],children:e.status}),(0,B.jsx)(`b`,{className:`text-[13px] truncate`,children:e.label}),(0,B.jsx)(`span`,{className:`font-mono text-[11px] text-tan`,children:If[e.kind]}),e.project&&(0,B.jsx)(`span`,{className:`font-mono text-[12px] text-ink3`,children:e.project}),e.sideEffects&&(0,B.jsx)(G,{tone:`david`,children:`side effects`})]})}),(0,B.jsxs)(`span`,{className:`px-3 font-mono text-[12px] text-ink3 whitespace-nowrap`,children:[Rf(e.startedAt),` · `,Lf(e)]})]},e.id))]})]}),(0,B.jsxs)(`aside`,{className:`grid gap-3.5 content-start min-w-0`,children:[a?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:a.label,icon:`health`,path:`${a.id} · ${If[a.kind]}`,children:(0,B.jsx)(G,{tone:Ff[a.status],children:a.status})}),a.args&&(0,B.jsx)(`div`,{className:`px-3 py-2 font-mono text-[12px] text-ink3 border-b border-sand break-all`,children:JSON.stringify(a.args)}),(0,B.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[12px] leading-[1.6] text-umber whitespace-pre-wrap max-h-[40vh] overflow-auto`,children:a.log.join(`
40
40
  `)||`—`}),a.error&&(0,B.jsx)(`div`,{className:`px-3 py-2 border-t border-sand text-[13px] text-brick`,children:a.error})]}),a.result!==void 0&&(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`Result`,icon:`docs`}),(0,B.jsx)(`pre`,{className:`m-0 px-3 py-2 font-mono text-[12px] leading-[1.55] text-walnut whitespace-pre-wrap max-h-[45vh] overflow-auto`,children:typeof a.result==`string`?a.result:JSON.stringify(a.result,null,2)})]})]}):(0,B.jsx)(U,{className:`px-4 py-3 text-[13px] text-umber`,children:`Select a run to see its log and result.`}),(0,B.jsxs)(U,{children:[(0,B.jsx)(W,{title:`What can run`,icon:`gates`}),(0,B.jsxs)(`div`,{className:`px-3 py-2 text-[13px] text-umber grid gap-1`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`now`}),` — read-only MCP tools (doctor, list_*, status, read_messages…) as `,(0,B.jsx)(`code`,{children:`groundwork-console`}),` / automation; read-only CLIs (groundwork doctor/status/list).`]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{className:`text-walnut`,children:`gated`}),` — bus sends (rules engine, replies), prune / unregister, seam writes, shells. Each will appear here with a `,(0,B.jsx)(`span`,{className:`inline-flex`,children:(0,B.jsx)(G,{tone:`david`,children:`side effects`})}),` marker.`]}),(0,B.jsx)(`div`,{className:`text-tan`,children:`Runs are in-memory (last 200) in v0.1.`})]})]})]})]})}var Bf=Oi([{path:`/`,Component:vd,children:[{index:!0,Component:Ld},{path:`board`,Component:Gd},{path:`bus`,Component:$d},{path:`monitor`,Component:hf},{path:`ops`,Component:_f,children:[{index:!0,element:(0,B.jsx)(Lr,{to:`/ops/fleets`,replace:!0})},{path:`fleets`,Component:Cf},{path:`skills`,Component:Df},{path:`release`,Component:Pf},{path:`runs`,Component:zf},{path:`events`,Component:vf}]},{path:`fleet`,element:(0,B.jsx)(Lr,{to:`/ops/fleets`,replace:!0})},{path:`release`,element:(0,B.jsx)(Lr,{to:`/ops/release`,replace:!0})},{path:`skills`,element:(0,B.jsx)(Lr,{to:`/ops/skills`,replace:!0})},{path:`runs`,element:(0,B.jsx)(Lr,{to:`/ops/runs`,replace:!0})},{path:`docs/:doc?`,Component:sf}]}]);try{for(let e of Object.keys(localStorage))if(e.startsWith(`kit-console.`)){let t=`groundwork-console.`+e.slice(12);localStorage.getItem(t)===null&&localStorage.setItem(t,localStorage.getItem(e)),localStorage.removeItem(e)}}catch{}(0,ni.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(P.StrictMode,{children:(0,B.jsx)(Ra,{children:(0,B.jsx)(Va,{children:(0,B.jsx)(eo,{children:(0,B.jsx)(Nr,{router:Bf})})})})}));export{o as n,l as r,oi as t};
@@ -1 +1 @@
1
- import"./chunk-KEIR6QF5-BICK3FdT.js";import{w as e}from"./mermaid-parser.core-bGhrBY9T.js";export{e as createInfoServices};
1
+ import"./chunk-KEIR6QF5-BICK3FdT.js";import{w as e}from"./mermaid-parser.core-Tzw7YIHZ.js";export{e as createInfoServices};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./mermaid-parser.core-bGhrBY9T.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Bc2f8joo.js";import{c as r}from"./chunk-I66GZJ75-DyWmv43M.js";import{a as i}from"./mermaid.core-_OoTZaAK.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.16.1`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram
1
+ import{n as e}from"./mermaid-parser.core-Tzw7YIHZ.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-qdf2s-T4.js";import{c as r}from"./chunk-I66GZJ75-CyLcz-VG.js";import{a as i}from"./mermaid.core-BYlHVIMn.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.16.1`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram
2
2
  `+e);let o=i(t);r(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Bc2f8joo.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-DyWmv43M.js";import{p as d}from"./chunk-NSK5VX7P-Dy4p7ORp.js";import{t as f}from"./rough.esm-Dy-Kn_BL.js";import{a as p}from"./mermaid.core-_OoTZaAK.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-qdf2s-T4.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-CyLcz-VG.js";import{p as d}from"./chunk-NSK5VX7P-Duq5i1Q8.js";import{t as f}from"./rough.esm-Dy-Kn_BL.js";import{a as p}from"./mermaid.core-BYlHVIMn.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Bc2f8joo.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-DyWmv43M.js";import{t as d}from"./arc-DmkLmHHi.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-2GRJ4B5K-B2cLnEJA.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-qdf2s-T4.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-I66GZJ75-CyLcz-VG.js";import{t as d}from"./arc-Bu5e98OE.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-2GRJ4B5K-BOYqDFv-.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Bc2f8joo.js";import{J as n,et as r,f as i,rt as a,tt as o,x as s,z as c}from"./chunk-I66GZJ75-DyWmv43M.js";import"./chunk-NSK5VX7P-Dy4p7ORp.js";import"./chunk-4I5QYGJK-CVuqmZe1.js";import"./chunk-WRU74C26-CqCOF3fo.js";import{t as l}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-UBXNYLIW-By3VqDlw.js";import"./chunk-W5SLKNZC-B6TSWP8U.js";import{a as u,c as d,i as f}from"./chunk-QR6OTTB3-D8k2NFkq.js";import{a as p,n as m,t as h}from"./mermaid.core-_OoTZaAK.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-qdf2s-T4.js";import{J as n,et as r,f as i,rt as a,tt as o,x as s,z as c}from"./chunk-I66GZJ75-CyLcz-VG.js";import"./chunk-NSK5VX7P-Duq5i1Q8.js";import"./chunk-4I5QYGJK-aPXqNUlF.js";import"./chunk-WRU74C26-a9B5o7qU.js";import{t as l}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-UBXNYLIW-BRvAYX25.js";import"./chunk-W5SLKNZC-Bjt98ztx.js";import{a as u,c as d,i as f}from"./chunk-QR6OTTB3-Xi-RqgB3.js";import{a as p,n as m,t as h}from"./mermaid.core-BYlHVIMn.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{n as e,t}from"./path-fybaL0A-.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-NSK5VX7P-Dy4p7ORp.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
1
+ import{n as e,t}from"./path-fybaL0A-.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-NSK5VX7P-Duq5i1Q8.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
@@ -1 +1 @@
1
- import{l as e,n as t,o as n,r,t as i}from"./src-Bc2f8joo.js";import{i as a,n as o,r as s,t as c}from"./defaultLocale-BFoDCU3G.js";import{t as l}from"./init-C-OQMol4.js";function u(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function d(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function f(e){let t,n,r;e.length===2?(t=e===u||e===d?e:p,n=e,r=e):(t=u,n=(t,n)=>u(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function p(){return 0}function m(e){return e===null?NaN:+e}var h=f(u),g=h.right;h.left,f(m).center;var _=Math.sqrt(50),v=Math.sqrt(10),y=Math.sqrt(2);function b(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=_?10:a>=v?5:a>=y?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?b(e,t,n*2):[s,c,l]}function x(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?b(t,e,n):b(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function S(e,t,n){return t=+t,e=+e,n=+n,b(e,t,n)[2]}function C(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?S(t,e,n):S(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function w(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function T(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=k(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function D(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function O(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=k(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function k(a,o){var s=typeof o,c;return o==null||s===`boolean`?n(o):(s===`number`?t:s===`string`?(c=e(o))?(o=c,r):i:o instanceof e?r:o instanceof Date?D:T(o)?w:Array.isArray(o)?E:typeof o.valueOf!=`function`&&typeof o.toString!=`function`||isNaN(o)?O:t)(a,o)}function A(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function j(e){return Math.max(0,-a(Math.abs(e)))}function M(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(t)/3)))*3-a(Math.abs(e)))}function N(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,a(t)-a(e))+1}function P(e){return function(){return e}}function F(e){return+e}var I=[0,1];function L(e){return e}function R(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:P(isNaN(t)?NaN:.5)}function z(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function B(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=R(i,r),a=n(o,a)):(r=R(r,i),a=n(a,o)),function(e){return a(r(e))}}function V(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=R(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=g(e,t,1,r)-1;return a[n](i[n](t))}}function H(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function U(){var e=I,n=I,r=k,i,a,o,s=L,c,l,u;function d(){var t=Math.min(e.length,n.length);return s!==L&&(s=z(e[0],e[t-1])),c=t>2?V:B,l=u=null,f}function f(t){return t==null||isNaN(t=+t)?o:(l||=c(e.map(i),n,r))(i(s(t)))}return f.invert=function(r){return s(a((u||=c(n,e.map(i),t))(r)))},f.domain=function(t){return arguments.length?(e=Array.from(t,F),d()):e.slice()},f.range=function(e){return arguments.length?(n=Array.from(e),d()):n.slice()},f.rangeRound=function(e){return n=Array.from(e),r=A,d()},f.clamp=function(e){return arguments.length?(s=e?!0:L,d()):s!==L},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function W(){return U()(L,L)}function G(e,t,n,r){var i=C(e,t,n),a;switch(r=s(r??`,f`),r.type){case`s`:var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=M(i,l))&&(r.precision=a),o(r,l);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=N(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=j(i))&&(r.precision=a-(r.type===`%`)*2)}return c(r)}function K(e){var t=e.domain;return e.ticks=function(e){var n=t();return x(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return G(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=S(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function q(){var e=W();return e.copy=function(){return H(e,q())},l.apply(e,arguments),K(e)}export{f as a,C as i,W as n,H as r,q as t};
1
+ import{l as e,n as t,o as n,r,t as i}from"./src-qdf2s-T4.js";import{i as a,n as o,r as s,t as c}from"./defaultLocale-BFoDCU3G.js";import{t as l}from"./init-C-OQMol4.js";function u(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function d(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function f(e){let t,n,r;e.length===2?(t=e===u||e===d?e:p,n=e,r=e):(t=u,n=(t,n)=>u(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function p(){return 0}function m(e){return e===null?NaN:+e}var h=f(u),g=h.right;h.left,f(m).center;var _=Math.sqrt(50),v=Math.sqrt(10),y=Math.sqrt(2);function b(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=_?10:a>=v?5:a>=y?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?b(e,t,n*2):[s,c,l]}function x(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?b(t,e,n):b(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function S(e,t,n){return t=+t,e=+e,n=+n,b(e,t,n)[2]}function C(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?S(t,e,n):S(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function w(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function T(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=k(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function D(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function O(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=k(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function k(a,o){var s=typeof o,c;return o==null||s===`boolean`?n(o):(s===`number`?t:s===`string`?(c=e(o))?(o=c,r):i:o instanceof e?r:o instanceof Date?D:T(o)?w:Array.isArray(o)?E:typeof o.valueOf!=`function`&&typeof o.toString!=`function`||isNaN(o)?O:t)(a,o)}function A(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function j(e){return Math.max(0,-a(Math.abs(e)))}function M(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(t)/3)))*3-a(Math.abs(e)))}function N(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,a(t)-a(e))+1}function P(e){return function(){return e}}function F(e){return+e}var I=[0,1];function L(e){return e}function R(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:P(isNaN(t)?NaN:.5)}function z(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function B(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=R(i,r),a=n(o,a)):(r=R(r,i),a=n(a,o)),function(e){return a(r(e))}}function V(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=R(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=g(e,t,1,r)-1;return a[n](i[n](t))}}function H(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function U(){var e=I,n=I,r=k,i,a,o,s=L,c,l,u;function d(){var t=Math.min(e.length,n.length);return s!==L&&(s=z(e[0],e[t-1])),c=t>2?V:B,l=u=null,f}function f(t){return t==null||isNaN(t=+t)?o:(l||=c(e.map(i),n,r))(i(s(t)))}return f.invert=function(r){return s(a((u||=c(n,e.map(i),t))(r)))},f.domain=function(t){return arguments.length?(e=Array.from(t,F),d()):e.slice()},f.range=function(e){return arguments.length?(n=Array.from(e),d()):n.slice()},f.rangeRound=function(e){return n=Array.from(e),r=A,d()},f.clamp=function(e){return arguments.length?(s=e?!0:L,d()):s!==L},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function W(){return U()(L,L)}function G(e,t,n,r){var i=C(e,t,n),a;switch(r=s(r??`,f`),r.type){case`s`:var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=M(i,l))&&(r.precision=a),o(r,l);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=N(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=j(i))&&(r.precision=a-(r.type===`%`)*2)}return c(r)}function K(e){var t=e.domain;return e.ticks=function(e){var n=t();return x(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return G(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=S(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function q(){var e=W();return e.copy=function(){return H(e,q())},l.apply(e,arguments),K(e)}export{f as a,C as i,W as n,H as r,q as t};