@marimo-team/frontend 0.14.12-dev0 → 0.14.12

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 (127) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-B9BmPz9a.js → ConnectedDataExplorerComponent-CBKTnGIO.js} +1 -1
  2. package/dist/assets/{ImageComparisonComponent-CNTqLdnf.js → ImageComparisonComponent-D_1rLFqD.js} +1 -1
  3. package/dist/assets/{VegaLite-DLKRDJvl.js → VegaLite-B_dlvmS8.js} +1 -1
  4. package/dist/assets/_baseEach-BRg52hSf.js +1 -0
  5. package/dist/assets/_baseMap-C8GGmDJG.js +1 -0
  6. package/dist/assets/_baseUniq-DNyfrpcN.js +1 -0
  7. package/dist/assets/{_createAggregator-C_WhAECr.js → _createAggregator-Baj-S-w2.js} +1 -1
  8. package/dist/assets/{any-language-editor-DrZjy7mH.js → any-language-editor-DpXFI5QG.js} +1 -1
  9. package/dist/assets/{architectureDiagram-NQ2NVSRB-DqJfNlvg.js → architectureDiagram-SUXI7LT5-B47ODzlu.js} +3 -3
  10. package/dist/assets/{blockDiagram-PHRCVELO-BMyZ52bP.js → blockDiagram-6J76NXCF-DAEJc3eE.js} +6 -6
  11. package/dist/assets/{c4Diagram-6F6E4RAY-DveKwcb7.js → c4Diagram-6F6E4RAY-ttnVRT3Y.js} +1 -1
  12. package/dist/assets/channel-ukMKC8Ba.js +1 -0
  13. package/dist/assets/{chunk-353BL4L5-DBdJb07A.js → chunk-353BL4L5-D2cH1aM-.js} +1 -1
  14. package/dist/assets/{chunk-67H74DCK-DG8iWVJ-.js → chunk-67H74DCK-BhK3V2TP.js} +1 -1
  15. package/dist/assets/{chunk-AACKK3MU-CDOdA9eC.js → chunk-AACKK3MU-BGsWBcze.js} +1 -1
  16. package/dist/assets/{chunk-BFAMUDN2-Cf6198RO.js → chunk-BFAMUDN2-DbnMfH-q.js} +1 -1
  17. package/dist/assets/{chunk-E2GYISFI-fSvIEcyU.js → chunk-E2GYISFI-2-NOnWc3.js} +1 -1
  18. package/dist/assets/{chunk-6OLS64BW-Dmt4rYEQ.js → chunk-OW32GOEJ-Bz6eMZz9.js} +1 -1
  19. package/dist/assets/{chunk-SKB7J2MH-B7Z1FsaJ.js → chunk-SKB7J2MH-C9m7rnpG.js} +1 -1
  20. package/dist/assets/{chunk-QEP2MXWD-D6FP1cQC.js → chunk-SZ463SBG-9jmdZ7UB.js} +1 -1
  21. package/dist/assets/{circle-play-CBftacWk.js → circle-play-DjJ5u-05.js} +1 -1
  22. package/dist/assets/classDiagram-M3E45YP4-X_c0WAZt.js +1 -0
  23. package/dist/assets/classDiagram-v2-YAWTLIQI-X_c0WAZt.js +1 -0
  24. package/dist/assets/clone-Bk2-uU7a.js +1 -0
  25. package/dist/assets/{compile-mbjlQ5nn.js → compile-C1fgVjKt.js} +8 -8
  26. package/dist/assets/cytoscape.esm-CzSnbbKZ.js +325 -0
  27. package/dist/assets/{dagre-FFZHY6LT-DX9cGWLP.js → dagre-JOIXM2OF-CcaBCP5W.js} +1 -1
  28. package/dist/assets/{data-grid-overlay-editor-C4fyHnn1.js → data-grid-overlay-editor-BZwv-WhT.js} +1 -1
  29. package/dist/assets/{diagram-5UYTHUR4-BgOShMim.js → diagram-5UYTHUR4-D9BnbEeD.js} +1 -1
  30. package/dist/assets/diagram-VMROVX33-C_v4sUOK.js +24 -0
  31. package/dist/assets/{diagram-ZTM2IBQH-m55tqkSF.js → diagram-ZTM2IBQH-DkfH8XUB.js} +1 -1
  32. package/dist/assets/edit-page-TN4XAy2z.js +147 -0
  33. package/dist/assets/{erDiagram-R3QVA2FD-B8SQvwhp.js → erDiagram-3M52JZNH-BF32hHK0.js} +1 -1
  34. package/dist/assets/{flowDiagram-PKI6S5ZS-BTbZVZp0.js → flowDiagram-KYDEHFYC-C55z-Ujy.js} +1 -1
  35. package/dist/assets/{ganttDiagram-EK5VF46D-Dkuqvb7b.js → ganttDiagram-EK5VF46D-CPBRY9C7.js} +3 -3
  36. package/dist/assets/{gitGraphDiagram-GW3U2K7C-BMQ8L_am.js → gitGraphDiagram-GW3U2K7C-DcxuZq_j.js} +1 -1
  37. package/dist/assets/{glide-data-editor-BKZWFNVv.js → glide-data-editor-DEySJ-Uv.js} +11 -11
  38. package/dist/assets/{graph-CFDemIXQ.js → graph-Wnsqj3W7.js} +1 -1
  39. package/dist/assets/{home-page-DUbYTF9g.js → home-page-DcMrkDPE.js} +3 -3
  40. package/dist/assets/{index-CH2sakSJ.js → index-4EoOw_ED.js} +1 -1
  41. package/dist/assets/{index-CRY746sV.js → index-B1o5PWgw.js} +1 -1
  42. package/dist/assets/{index-B0-K_sX8.js → index-B2587e_p.js} +1 -1
  43. package/dist/assets/{index-ChVO1Vdj.js → index-BamjPWEC.js} +1 -1
  44. package/dist/assets/index-BlYahtg3.js +1 -0
  45. package/dist/assets/index-C-IG5Jr8.js +1 -0
  46. package/dist/assets/index-C4BBG11u.js +1 -0
  47. package/dist/assets/index-CF_KIi0p.js +1 -0
  48. package/dist/assets/index-D98B-7XN.js +1 -0
  49. package/dist/assets/index-DGjhFk6m.js +1 -0
  50. package/dist/assets/index-DYmhnlX1.js +507 -0
  51. package/dist/assets/index-Db00Ydia.js +1 -0
  52. package/dist/assets/index-Dqf23Hvm.js +1 -0
  53. package/dist/assets/{index-MUMVp22V.js → index-QfsoKVOY.js} +1 -1
  54. package/dist/assets/index-RoS9j4wO.js +1 -0
  55. package/dist/assets/index-S3mjG3Uz.css +1 -0
  56. package/dist/assets/index-Z1jc58tW.js +1 -0
  57. package/dist/assets/index-a8t0EFic.js +1 -0
  58. package/dist/assets/{index-C_e9XjpS.js → index-kzqyjt1O.js} +1 -1
  59. package/dist/assets/{index-d0CXXxee.js → index-wRtWpsgQ.js} +2 -2
  60. package/dist/assets/{infoDiagram-RLU2ROGC-DAW5X38W.js → infoDiagram-LHK5PUON-DiXY5W-u.js} +1 -1
  61. package/dist/assets/{journeyDiagram-EWQZEKCU--6lJjuiM.js → journeyDiagram-EWQZEKCU-Nm6fcEAi.js} +1 -1
  62. package/dist/assets/{kanban-definition-ILFWEQ3N-CXNPWHB8.js → kanban-definition-ZSS6B67P-CGqK-B6v.js} +1 -1
  63. package/dist/assets/{layout-Jgv95YSr.js → layout-DdtO6MuW.js} +1 -1
  64. package/dist/assets/{linear-DtgEMbrz.js → linear-CCLVHXdb.js} +1 -1
  65. package/dist/assets/links-BOSKRjH_.js +17 -0
  66. package/dist/assets/loro_wasm_bg-C3hKWL9L.js +2 -0
  67. package/dist/assets/mermaid-DonGMagM.js +207 -0
  68. package/dist/assets/min-DCdo07Qe.js +1 -0
  69. package/dist/assets/mindmap-definition-6CBA2TL7-DV80ltbO.js +95 -0
  70. package/dist/assets/{number-overlay-editor-C3hemckO.js → number-overlay-editor-DPd2PkyH.js} +1 -1
  71. package/dist/assets/{pieDiagram-NIOCPIFQ-B-zGF99A.js → pieDiagram-NIOCPIFQ-CLg8zuiX.js} +3 -3
  72. package/dist/assets/{quadrantDiagram-2OG54O6I-2tF9b_2b.js → quadrantDiagram-2OG54O6I-Q-Nbai62.js} +1 -1
  73. package/dist/assets/{react-plotly-CdJaKwaj.js → react-plotly-BUhpkTZA.js} +200 -200
  74. package/dist/assets/{requirementDiagram-SO3GGRV7-DEa34SeY.js → requirementDiagram-QOLK2EJ7-B9SoIsLP.js} +1 -1
  75. package/dist/assets/run-page-c4k7pMUk.js +1 -0
  76. package/dist/assets/sankeyDiagram-4UZDY2LN-Bgg2hsKs.js +10 -0
  77. package/dist/assets/sequenceDiagram-SKLFT4DO-BzFcDEng.js +122 -0
  78. package/dist/assets/{slides-component-C2uc6kmf.js → slides-component-BhqZju_R.js} +1 -1
  79. package/dist/assets/{sortBy-Bob7dKSt.js → sortBy-C43Pp6GY.js} +1 -1
  80. package/dist/assets/{stateDiagram-XX37X6EN-DUi_goR8.js → stateDiagram-MI5ZYTHO-CSucWgeR.js} +1 -1
  81. package/dist/assets/stateDiagram-v2-5AN5P6BG-BT7qyLYw.js +1 -0
  82. package/dist/assets/storage-DZZHoZaf.js +25 -0
  83. package/dist/assets/{terminal-BkOhnp-S.js → terminal-CknBNEbl.js} +1 -1
  84. package/dist/assets/{time-BXb9z1yv.js → time-bZ-arUoy.js} +1 -1
  85. package/dist/assets/{timeline-definition-RI47OAVP-CTWn3WQu.js → timeline-definition-MYPXXCX6-MZqqJbkt.js} +3 -3
  86. package/dist/assets/tracing-D77Keje5.js +2 -0
  87. package/dist/assets/{trash-BWRVB_br.js → trash-BZiJbQ0d.js} +1 -1
  88. package/dist/assets/treemap-75Q7IDZK-BAq6XOUv.js +126 -0
  89. package/dist/assets/{vega-component-CX_u3Hhp.js → vega-component-oHitp1cz.js} +1 -1
  90. package/dist/assets/{worker-BYA2ASe8.js → worker-Bma4sWEs.js} +1 -1
  91. package/dist/assets/{xychartDiagram-H2YORKM3-D0JoLNE8.js → xychartDiagram-H2YORKM3-D5zeDIcK.js} +1 -1
  92. package/dist/index.html +2 -2
  93. package/package.json +9 -19
  94. package/dist/assets/_baseEach-BjDLzUwG.js +0 -1
  95. package/dist/assets/_baseMap-CuZ-LBtv.js +0 -1
  96. package/dist/assets/_baseUniq-DqHaT24V.js +0 -1
  97. package/dist/assets/channel-LYGgdr1R.js +0 -1
  98. package/dist/assets/classDiagram-BGRH5UQR-BQbZmSV-.js +0 -1
  99. package/dist/assets/classDiagram-v2-O24JOBDK-BQbZmSV-.js +0 -1
  100. package/dist/assets/clone-DD3sG0_1.js +0 -1
  101. package/dist/assets/cytoscape.esm-UYyVlru8.js +0 -10
  102. package/dist/assets/diagram-3EMPZRKU-BwXQu6c-.js +0 -24
  103. package/dist/assets/edit-page-BMW2Fhcz.js +0 -148
  104. package/dist/assets/index-1az6nvpO.js +0 -1
  105. package/dist/assets/index-B9WlbtVk.js +0 -1
  106. package/dist/assets/index-BWEPJWCF.js +0 -1
  107. package/dist/assets/index-CE3mbf8H.js +0 -1
  108. package/dist/assets/index-CaHkXpUp.js +0 -1
  109. package/dist/assets/index-CfvA7bvb.js +0 -1
  110. package/dist/assets/index-CsdFJkJw.css +0 -1
  111. package/dist/assets/index-CylrdBnG.js +0 -1
  112. package/dist/assets/index-D3Er-byj.js +0 -1
  113. package/dist/assets/index-D_Dmmo5g.js +0 -1
  114. package/dist/assets/index-Drq4Lpl3.js +0 -1
  115. package/dist/assets/index-NLK5-sPO.js +0 -1
  116. package/dist/assets/index-_lj65MZR.js +0 -507
  117. package/dist/assets/links-Bjf-1I2i.js +0 -17
  118. package/dist/assets/mermaid-DCMac0Ai.js +0 -152
  119. package/dist/assets/min-VDyC-auF.js +0 -1
  120. package/dist/assets/mindmap-definition-CZNETY7S-BEd6cR16.js +0 -95
  121. package/dist/assets/run-page-Bg1x8WTa.js +0 -1
  122. package/dist/assets/sankeyDiagram-4UZDY2LN-DUIUN-K8.js +0 -10
  123. package/dist/assets/sequenceDiagram-ZIKVLSP4-BZGddaB9.js +0 -122
  124. package/dist/assets/stateDiagram-v2-GD6S3NHB-CdRNmgeb.js +0 -1
  125. package/dist/assets/storage-CTvz5ejZ.js +0 -25
  126. package/dist/assets/tracing-Z4QREdu3.js +0 -2
  127. package/dist/assets/treemap-FKARHQ26-AlpUch0p.js +0 -126
@@ -1,4 +1,4 @@
1
- import{b as ve,W as ae,co as De,j as pe,cp as Re,L as xe}from"./index-_lj65MZR.js";var ge,me={exports:{}},fe,Se,Ae=ge?me.exports:(ge=1,me.exports=(fe={},(()=>{var J=fe;function Y(z,q,B){return z.addEventListener(q,B),{dispose:()=>{B&&z.removeEventListener(q,B)}}}Object.defineProperty(J,"__esModule",{value:!0}),J.AttachAddon=void 0,J.AttachAddon=class{constructor(z,q){this._disposables=[],this._socket=z,this._socket.binaryType="arraybuffer",this._bidirectional=!(q&&q.bidirectional===!1)}activate(z){this._disposables.push(Y(this._socket,"message",q=>{const B=q.data;z.write(typeof B=="string"?B:new Uint8Array(B))})),this._bidirectional&&(this._disposables.push(z.onData(q=>this._sendData(q))),this._disposables.push(z.onBinary(q=>this._sendBinary(q)))),this._disposables.push(Y(this._socket,"close",()=>this.dispose())),this._disposables.push(Y(this._socket,"error",()=>this.dispose()))}dispose(){for(const z of this._disposables)z.dispose()}_sendData(z){this._checkOpenSocket()&&this._socket.send(z)}_sendBinary(z){if(!this._checkOpenSocket())return;const q=new Uint8Array(z.length);for(let B=0;B<z.length;++B)q[B]=255&z.charCodeAt(B);this._socket.send(q)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),fe)),Ce={exports:{}},be,we,Be=Se?Ce.exports:(Se=1,be=()=>(()=>{var J,Y={};return J=Y,Object.defineProperty(J,"__esModule",{value:!0}),J.FitAddon=void 0,J.FitAddon=class{activate(z){this._terminal=z}dispose(){}fit(){const z=this.proposeDimensions();if(!z||!this._terminal||isNaN(z.cols)||isNaN(z.rows))return;const q=this._terminal._core;this._terminal.rows===z.rows&&this._terminal.cols===z.cols||(q._renderService.clear(),this._terminal.resize(z.cols,z.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const z=this._terminal._core,q=z._renderService.dimensions;if(q.css.cell.width===0||q.css.cell.height===0)return;const B=this._terminal.options.scrollback===0?0:z.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),d=l-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/q.css.cell.width)),rows:Math.max(1,Math.floor(n/q.css.cell.height))}}},Y})(),Ce.exports=be()),ye={exports:{}},Ee,Te=(we||(we=1,Ee=ye,function(J,Y){Ee.exports=Y()}(globalThis,()=>(()=>{var J={4567:function(B,r,o){var l=this&&this.__decorate||function(e,t,a,f){var u,p=arguments.length,c=p<3?t:f===null?f=Object.getOwnPropertyDescriptor(t,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,t,a,f);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(c=(p<3?u(c):p>3?u(t,a,c):u(t,a))||c);return p>3&&c&&Object.defineProperty(t,a,c),c},_=this&&this.__param||function(e,t){return function(a,f){t(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(9924),v=o(844),g=o(4725),h=o(2585),i=o(3656);let s=r.AccessibilityManager=class extends v.Disposable{constructor(e,t,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let u=0;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);if(this._topBoundaryFocusListener=u=>this._handleBoundaryFocus(u,0),this._bottomBoundaryFocusListener=u=>this._handleBoundaryFocus(u,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(u=>this._handleResize(u.rows))),this.register(this._terminal.onRender(u=>this._refreshRows(u.start,u.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(u=>this._handleChar(u))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ import{b as ve,W as ae,cp as De,j as pe,cq as Re,L as xe}from"./index-DYmhnlX1.js";var ge,me={exports:{}},fe,Se,Ae=ge?me.exports:(ge=1,me.exports=(fe={},(()=>{var J=fe;function Y(z,q,B){return z.addEventListener(q,B),{dispose:()=>{B&&z.removeEventListener(q,B)}}}Object.defineProperty(J,"__esModule",{value:!0}),J.AttachAddon=void 0,J.AttachAddon=class{constructor(z,q){this._disposables=[],this._socket=z,this._socket.binaryType="arraybuffer",this._bidirectional=!(q&&q.bidirectional===!1)}activate(z){this._disposables.push(Y(this._socket,"message",q=>{const B=q.data;z.write(typeof B=="string"?B:new Uint8Array(B))})),this._bidirectional&&(this._disposables.push(z.onData(q=>this._sendData(q))),this._disposables.push(z.onBinary(q=>this._sendBinary(q)))),this._disposables.push(Y(this._socket,"close",()=>this.dispose())),this._disposables.push(Y(this._socket,"error",()=>this.dispose()))}dispose(){for(const z of this._disposables)z.dispose()}_sendData(z){this._checkOpenSocket()&&this._socket.send(z)}_sendBinary(z){if(!this._checkOpenSocket())return;const q=new Uint8Array(z.length);for(let B=0;B<z.length;++B)q[B]=255&z.charCodeAt(B);this._socket.send(q)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),fe)),Ce={exports:{}},be,we,Be=Se?Ce.exports:(Se=1,be=()=>(()=>{var J,Y={};return J=Y,Object.defineProperty(J,"__esModule",{value:!0}),J.FitAddon=void 0,J.FitAddon=class{activate(z){this._terminal=z}dispose(){}fit(){const z=this.proposeDimensions();if(!z||!this._terminal||isNaN(z.cols)||isNaN(z.rows))return;const q=this._terminal._core;this._terminal.rows===z.rows&&this._terminal.cols===z.cols||(q._renderService.clear(),this._terminal.resize(z.cols,z.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const z=this._terminal._core,q=z._renderService.dimensions;if(q.css.cell.width===0||q.css.cell.height===0)return;const B=this._terminal.options.scrollback===0?0:z.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),d=l-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/q.css.cell.width)),rows:Math.max(1,Math.floor(n/q.css.cell.height))}}},Y})(),Ce.exports=be()),ye={exports:{}},Ee,Te=(we||(we=1,Ee=ye,function(J,Y){Ee.exports=Y()}(globalThis,()=>(()=>{var J={4567:function(B,r,o){var l=this&&this.__decorate||function(e,t,a,f){var u,p=arguments.length,c=p<3?t:f===null?f=Object.getOwnPropertyDescriptor(t,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,t,a,f);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(c=(p<3?u(c):p>3?u(t,a,c):u(t,a))||c);return p>3&&c&&Object.defineProperty(t,a,c),c},_=this&&this.__param||function(e,t){return function(a,f){t(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(9924),v=o(844),g=o(4725),h=o(2585),i=o(3656);let s=r.AccessibilityManager=class extends v.Disposable{constructor(e,t,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let u=0;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);if(this._topBoundaryFocusListener=u=>this._handleBoundaryFocus(u,0),this._bottomBoundaryFocusListener=u=>this._handleBoundaryFocus(u,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(u=>this._handleResize(u.rows))),this.register(this._terminal.onRender(u=>this._refreshRows(u.start,u.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(u=>this._handleChar(u))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(u=>this._handleTab(u))),this.register(this._terminal.onKey(u=>this._handleKey(u.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,i.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const a=this._terminal.buffer,f=a.lines.length.toString();for(let u=e;u<=t;u++){const p=a.lines.get(a.ydisp+u),c=[],m=(p==null?void 0:p.translateToString(!0,void 0,void 0,c))||"",y=(a.ydisp+u+1).toString(),k=this._rowElements[u];k&&(m.length===0?(k.innerText="\xA0",this._rowColumns.set(k,[0,1])):(k.textContent=m,this._rowColumns.set(k,c)),k.setAttribute("aria-posinset",y),k.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){const a=e.target,f=this._rowElements[t===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(t===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let u,p;if(t===0?(u=a,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(u=this._rowElements.shift(),p=a,this._rowContainer.removeChild(u)),u.removeEventListener("focus",this._topBoundaryFocusListener),p.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){const c=this._createAccessibilityTreeNode();this._rowElements.unshift(c),this._rowContainer.insertAdjacentElement("afterbegin",c)}else{const c=this._createAccessibilityTreeNode();this._rowElements.push(c),this._rowContainer.appendChild(c)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var m;if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let t={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===a.node&&t.offset>a.offset)&&([t,a]=[a,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;const f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:((m=f.textContent)==null?void 0:m.length)??0}),!this._rowContainer.contains(a.node))return;const u=({node:y,offset:k})=>{const L=y instanceof Text?y.parentNode:y;let w=parseInt(L==null?void 0:L.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const x=this._rowColumns.get(L);if(!x)return console.warn("columns is null. Race condition?"),null;let T=k<x.length?x[k]:x.slice(-1)[0]+1;return T>=this._terminal.cols&&(++w,T=0),{row:w,column:T}},p=u(t),c=u(a);if(p&&c){if(p.row>c.row||p.row===c.row&&p.column>=c.column)throw new Error("invalid range");this._terminal.select(p.column,p.row,(c.row-p.row)*this._terminal.cols-p.column+c.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=s=l([_(1,h.IInstantiationService),_(2,g.ICoreBrowserService),_(3,g.IRenderService)],s)},3614:(B,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function l(d,v){return v?"\x1B[200~"+d+"\x1B[201~":d}function _(d,v,g,h){d=l(d=o(d),g.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),v.value=""}function n(d,v,g){const h=g.getBoundingClientRect(),i=d.clientX-h.left-10,s=d.clientY-h.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${i}px`,v.style.top=`${s}px`,v.style.zIndex="1000",v.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=l,r.copyHandler=function(d,v){d.clipboardData&&d.clipboardData.setData("text/plain",v.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,v,g,h){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),v,g,h)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,v,g,h,i){n(d,v,g),i&&h.rightClickSelect(d),v.value=h.selectionText,v.select()}},7239:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const l=o(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,l,_,n){o.addEventListener(l,_,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(l,_,n))}}}},3551:function(B,r,o){var l=this&&this.__decorate||function(s,e,t,a){var f,u=arguments.length,p=u<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(s,e,t,a);else for(var c=s.length-1;c>=0;c--)(f=s[c])&&(p=(u<3?f(p):u>3?f(e,t,p):f(e,t))||p);return u>3&&p&&Object.defineProperty(e,t,p),p},_=this&&this.__param||function(s,e){return function(t,a){e(t,a,s)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;const n=o(3656),d=o(8460),v=o(844),g=o(2585),h=o(4725);let i=r.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(s,e,t,a,f){super(),this._element=s,this._mouseService=e,this._renderService=t,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)(()=>{var u;this._lastMouseEvent=void 0,(u=this._activeProviderReplies)==null||u.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(s){this._lastMouseEvent=s;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const t=s.composedPath();for(let a=0;a<t.length;a++){const f=t[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(s){if(this._activeLine!==s.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(s,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,s)||(this._clearCurrentLink(),this._askForLink(s,!0))}_askForLink(s,e){var a,f;this._activeProviderReplies&&e||((a=this._activeProviderReplies)==null||a.forEach(u=>{u==null||u.forEach(p=>{p.link.dispose&&p.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=s.y);let t=!1;for(const[u,p]of this._linkProviderService.linkProviders.entries())e?(f=this._activeProviderReplies)!=null&&f.get(u)&&(t=this._checkLinkProviderResult(u,s,t)):p.provideLinks(s.y,c=>{var y,k;if(this._isMouseOut)return;const m=c==null?void 0:c.map(L=>({link:L}));(y=this._activeProviderReplies)==null||y.set(u,m),t=this._checkLinkProviderResult(u,s,t),((k=this._activeProviderReplies)==null?void 0:k.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(s.y,this._activeProviderReplies)})}_removeIntersectingLinks(s,e){const t=new Set;for(let a=0;a<e.size;a++){const f=e.get(a);if(f)for(let u=0;u<f.length;u++){const p=f[u],c=p.link.range.start.y<s?0:p.link.range.start.x,m=p.link.range.end.y>s?this._bufferService.cols:p.link.range.end.x;for(let y=c;y<=m;y++){if(t.has(y)){f.splice(u--,1);break}t.add(y)}}}}_checkLinkProviderResult(s,e,t){var u;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(s);let f=!1;for(let p=0;p<s;p++)this._activeProviderReplies.has(p)&&!this._activeProviderReplies.get(p)||(f=!0);if(!f&&a){const p=a.find(c=>this._linkAtPosition(c.link,e));p&&(t=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!t)for(let p=0;p<this._activeProviderReplies.size;p++){const c=(u=this._activeProviderReplies.get(p))==null?void 0:u.find(m=>this._linkAtPosition(m.link,e));if(c){t=!0,this._handleNewLink(c);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(s){if(!this._currentLink)return;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(s,this._currentLink.link.text)}_clearCurrentLink(s,e){this._currentLink&&this._lastMouseEvent&&(!s||!e||this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(s){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(s.link,e)&&(this._currentLink=s,this._currentLink.state={decorations:{underline:s.link.decorations===void 0||s.link.decorations.underline,pointerCursor:s.link.decorations===void 0||s.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,s.link,this._lastMouseEvent),s.link.decorations={},Object.defineProperties(s.link.decorations,{pointerCursor:{get:()=>{var t,a;return(a=(t=this._currentLink)==null?void 0:t.state)==null?void 0:a.decorations.pointerCursor},set:t=>{var a;(a=this._currentLink)!=null&&a.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",t))}},underline:{get:()=>{var t,a;return(a=(t=this._currentLink)==null?void 0:t.state)==null?void 0:a.decorations.underline},set:t=>{var a,f,u;(a=this._currentLink)!=null&&a.state&&((u=(f=this._currentLink)==null?void 0:f.state)==null?void 0:u.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(s.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const a=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){const u=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);u&&this._askForLink(u,!1)}})))}_linkHover(s,e,t){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&s.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(t,e.text)}_fireUnderlineEvent(s,e){const t=s.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-a-1,t.end.x,t.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(s,e,t){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&s.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(t,e.text)}_linkAtPosition(s,e){const t=s.range.start.y*this._bufferService.cols+s.range.start.x,a=s.range.end.y*this._bufferService.cols+s.range.end.x,f=e.y*this._bufferService.cols+e.x;return t<=f&&f<=a}_positionFromMouseEvent(s,e,t){const a=t.getCoords(s,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(s,e,t,a,f){return{x1:s,y1:e,x2:t,y2:a,cols:this._bufferService.cols,fg:f}}};r.Linkifier=i=l([_(1,h.IMouseService),_(2,h.IRenderService),_(3,g.IBufferService),_(4,h.ILinkProviderService)],i)},9042:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,r,o){var l=this&&this.__decorate||function(h,i,s,e){var t,a=arguments.length,f=a<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,i,s,e);else for(var u=h.length-1;u>=0;u--)(t=h[u])&&(f=(a<3?t(f):a>3?t(i,s,f):t(i,s))||f);return a>3&&f&&Object.defineProperty(i,s,f),f},_=this&&this.__param||function(h,i){return function(s,e){i(s,e,h)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let v=r.OscLinkProvider=class{constructor(h,i,s){this._bufferService=h,this._optionsService=i,this._oscLinkService=s}provideLinks(h,i){var m;const s=this._bufferService.buffer.lines.get(h-1);if(!s)return void i(void 0);const e=[],t=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=s.getTrimmedLength();let u=-1,p=-1,c=!1;for(let y=0;y<f;y++)if(p!==-1||s.hasContent(y)){if(s.loadCell(y,a),a.hasExtendedAttrs()&&a.extended.urlId){if(p===-1){p=y,u=a.extended.urlId;continue}c=a.extended.urlId!==u}else p!==-1&&(c=!0);if(c||p!==-1&&y===f-1){const k=(m=this._oscLinkService.getLinkData(u))==null?void 0:m.uri;if(k){const L={start:{x:p+1,y:h},end:{x:y+(c||y!==f-1?0:1),y:h}};let w=!1;if(!(t!=null&&t.allowNonHttpProtocols))try{const x=new URL(k);["http:","https:"].includes(x.protocol)||(w=!0)}catch{w=!0}w||e.push({text:k,range:L,activate:(x,T)=>t?t.activate(x,T,L):g(0,T),hover:(x,T)=>{var P;return(P=t==null?void 0:t.hover)==null?void 0:P.call(t,x,T,L)},leave:(x,T)=>{var P;return(P=t==null?void 0:t.leave)==null?void 0:P.call(t,x,T,L)}})}c=!1,a.hasExtendedAttrs()&&a.extended.urlId?(p=y,u=a.extended.urlId):(p=-1,u=-1)}}i(e)}};function g(h,i){if(confirm(`Do you want to navigate to ${i}?
4
4
 
@@ -1 +1 @@
1
- import{R,r as ln,d as S,e as q,C as z,n as d,h as fn}from"./timer-Bqd5yn_a.js";import{c as bn,a as pn}from"./linear-DtgEMbrz.js";import{i as yn}from"./init-DLRA0X12.js";import{bx as vn,by as m,bz as M,bA as N,bB as D,bC as E,bD as wn,bE as G,bF as P,bG as H,bH as gn,bI as J,bJ as K,bK as O,bL as Q,bM as T,bN as U,bO as mn,bP as dn,bQ as Mn,bR as Nn,bS as Dn,bT as In,bU as kn}from"./index-_lj65MZR.js";function xn(n,r){let i;if(r===void 0)for(const e of n)e!=null&&(i<e||i===void 0&&e>=e)&&(i=e);else{let e=-1;for(let a of n)(a=r(a,++e,n))!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}return i}function Pn(n,r){let i;if(r===void 0)for(const e of n)e!=null&&(i>e||i===void 0&&e>=e)&&(i=e);else{let e=-1;for(let a of n)(a=r(a,++e,n))!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}return i}function Y(n,r,i,e,a,s){const o=[[m,1,M],[m,5,5*M],[m,15,15*M],[m,30,30*M],[s,1,N],[s,5,5*N],[s,15,15*N],[s,30,30*N],[a,1,D],[a,3,3*D],[a,6,6*D],[a,12,12*D],[e,1,E],[e,2,2*E],[i,1,wn],[r,1,G],[r,3,3*G],[n,1,P]];function b(l,u,c){const v=Math.abs(u-l)/c,h=vn(([,,x])=>x).right(o,v);if(h===o.length)return n.every(H(l/P,u/P,c));if(h===0)return gn.every(Math.max(H(l,u,c),1));const[w,k]=o[v/o[h-1][2]<o[h][2]/v?h-1:h];return w.every(k)}return[function(l,u,c){const v=u<l;v&&([l,u]=[u,l]);const h=c&&typeof c.range=="function"?c:b(l,u,c),w=h?h.range(l,+u+1):[];return v?w.reverse():w},b]}const[An,Bn]=Y(In,Dn,Nn,Mn,dn,mn),[Cn,Fn]=Y(U,T,Q,O,K,J),j=Math.PI/180,V=180/Math.PI,W=.96422,X=.82521,Z=4/29,g=6/29,_=3*g*g,Ln=g*g*g;function $(n){if(n instanceof p)return new p(n.l,n.a,n.b,n.opacity);if(n instanceof y)return an(n);n instanceof R||(n=ln(n));var r,i,e=F(n.r),a=F(n.g),s=F(n.b),o=A((.2225045*e+.7168786*a+.0606169*s)/1);return e===a&&a===s?r=i=o:(r=A((.4360747*e+.3850649*a+.1430804*s)/W),i=A((.0139322*e+.0971045*a+.7141733*s)/X)),new p(116*o-16,500*(r-o),200*(o-i),n.opacity)}function nn(n,r,i,e){return arguments.length===1?$(n):new p(n,r,i,e??1)}function p(n,r,i,e){this.l=+n,this.a=+r,this.b=+i,this.opacity=+e}function A(n){return n>Ln?Math.pow(n,1/3):n/_+Z}function B(n){return n>g?n*n*n:_*(n-Z)}function C(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function F(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function I(n,r,i,e){return arguments.length===1?function(a){if(a instanceof y)return new y(a.h,a.c,a.l,a.opacity);if(a instanceof p||(a=$(a)),a.a===0&&a.b===0)return new y(NaN,0<a.l&&a.l<100?0:NaN,a.l,a.opacity);var s=Math.atan2(a.b,a.a)*V;return new y(s<0?s+360:s,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}(n):new y(n,r,i,e??1)}function y(n,r,i,e){this.h=+n,this.c=+r,this.l=+i,this.opacity=+e}function an(n){if(isNaN(n.h))return new p(n.l,0,0,n.opacity);var r=n.h*j;return new p(n.l,Math.cos(r)*n.c,Math.sin(r)*n.c,n.opacity)}function rn(n){return function(r,i){var e=n((r=I(r)).h,(i=I(i)).h),a=d(r.c,i.c),s=d(r.l,i.l),o=d(r.opacity,i.opacity);return function(b){return r.h=e(b),r.c=a(b),r.l=s(b),r.opacity=o(b),r+""}}}S(p,nn,q(z,{brighter(n){return new p(this.l+18*(n??1),this.a,this.b,this.opacity)},darker(n){return new p(this.l-18*(n??1),this.a,this.b,this.opacity)},rgb(){var n=(this.l+16)/116,r=isNaN(this.a)?n:n+this.a/500,i=isNaN(this.b)?n:n-this.b/200;return r=W*B(r),n=1*B(n),i=X*B(i),new R(C(3.1338561*r-1.6168667*n-.4906146*i),C(-.9787684*r+1.9161415*n+.033454*i),C(.0719453*r-.2289914*n+1.4052427*i),this.opacity)}})),S(y,I,q(z,{brighter(n){return new y(this.h,this.c,this.l+18*(n??1),this.opacity)},darker(n){return new y(this.h,this.c,this.l-18*(n??1),this.opacity)},rgb(){return an(this).rgb()}}));const Rn=rn(fn);var Sn=rn(d);function en(n,r){var i,e=0,a=(n=n.slice()).length-1,s=n[e],o=n[a];return o<s&&(i=e,e=a,a=i,i=s,s=o,o=i),n[e]=r.floor(s),n[a]=r.ceil(o),n}function qn(n){return new Date(n)}function zn(n){return n instanceof Date?+n:+new Date(+n)}function L(n,r,i,e,a,s,o,b,l,u){var c=bn(),v=c.invert,h=c.domain,w=u(".%L"),k=u(":%S"),x=u("%I:%M"),tn=u("%I %p"),sn=u("%a %d"),on=u("%b %d"),un=u("%B"),cn=u("%Y");function hn(t){return(l(t)<t?w:b(t)<t?k:o(t)<t?x:s(t)<t?tn:e(t)<t?a(t)<t?sn:on:i(t)<t?un:cn)(t)}return c.invert=function(t){return new Date(v(t))},c.domain=function(t){return arguments.length?h(Array.from(t,zn)):h().map(qn)},c.ticks=function(t){var f=h();return n(f[0],f[f.length-1],t??10)},c.tickFormat=function(t,f){return f==null?hn:u(f)},c.nice=function(t){var f=h();return t&&typeof t.range=="function"||(t=r(f[0],f[f.length-1],t??10)),t?h(en(f,t)):c},c.copy=function(){return pn(c,L(n,r,i,e,a,s,o,b,l,u))},c}function En(){return yn.apply(L(Cn,Fn,U,T,Q,O,K,J,m,kn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{xn as a,An as b,L as c,V as d,I as e,Sn as h,Rn as i,nn as l,Pn as m,en as n,j as r,En as t,Bn as u};
1
+ import{R,r as ln,d as S,e as q,C as z,n as d,h as fn}from"./timer-Bqd5yn_a.js";import{c as bn,a as pn}from"./linear-CCLVHXdb.js";import{i as yn}from"./init-DLRA0X12.js";import{by as vn,bz as m,bA as M,bB as N,bC as D,bD as E,bE as wn,bF as G,bG as x,bH as H,bI as gn,bJ as J,bK as K,bL as O,bM as Q,bN as T,bO as U,bP as mn,bQ as dn,bR as Mn,bS as Nn,bT as Dn,bU as In,bV as kn}from"./index-DYmhnlX1.js";function Pn(n,r){let i;if(r===void 0)for(const e of n)e!=null&&(i<e||i===void 0&&e>=e)&&(i=e);else{let e=-1;for(let a of n)(a=r(a,++e,n))!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}return i}function xn(n,r){let i;if(r===void 0)for(const e of n)e!=null&&(i>e||i===void 0&&e>=e)&&(i=e);else{let e=-1;for(let a of n)(a=r(a,++e,n))!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}return i}function V(n,r,i,e,a,s){const o=[[m,1,M],[m,5,5*M],[m,15,15*M],[m,30,30*M],[s,1,N],[s,5,5*N],[s,15,15*N],[s,30,30*N],[a,1,D],[a,3,3*D],[a,6,6*D],[a,12,12*D],[e,1,E],[e,2,2*E],[i,1,wn],[r,1,G],[r,3,3*G],[n,1,x]];function b(l,u,c){const v=Math.abs(u-l)/c,h=vn(([,,P])=>P).right(o,v);if(h===o.length)return n.every(H(l/x,u/x,c));if(h===0)return gn.every(Math.max(H(l,u,c),1));const[w,k]=o[v/o[h-1][2]<o[h][2]/v?h-1:h];return w.every(k)}return[function(l,u,c){const v=u<l;v&&([l,u]=[u,l]);const h=c&&typeof c.range=="function"?c:b(l,u,c),w=h?h.range(l,+u+1):[];return v?w.reverse():w},b]}const[An,Bn]=V(In,Dn,Nn,Mn,dn,mn),[Cn,Fn]=V(U,T,Q,O,K,J),Y=Math.PI/180,j=180/Math.PI,W=.96422,X=.82521,Z=4/29,g=6/29,_=3*g*g,Ln=g*g*g;function $(n){if(n instanceof p)return new p(n.l,n.a,n.b,n.opacity);if(n instanceof y)return an(n);n instanceof R||(n=ln(n));var r,i,e=F(n.r),a=F(n.g),s=F(n.b),o=A((.2225045*e+.7168786*a+.0606169*s)/1);return e===a&&a===s?r=i=o:(r=A((.4360747*e+.3850649*a+.1430804*s)/W),i=A((.0139322*e+.0971045*a+.7141733*s)/X)),new p(116*o-16,500*(r-o),200*(o-i),n.opacity)}function nn(n,r,i,e){return arguments.length===1?$(n):new p(n,r,i,e??1)}function p(n,r,i,e){this.l=+n,this.a=+r,this.b=+i,this.opacity=+e}function A(n){return n>Ln?Math.pow(n,1/3):n/_+Z}function B(n){return n>g?n*n*n:_*(n-Z)}function C(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function F(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function I(n,r,i,e){return arguments.length===1?function(a){if(a instanceof y)return new y(a.h,a.c,a.l,a.opacity);if(a instanceof p||(a=$(a)),a.a===0&&a.b===0)return new y(NaN,0<a.l&&a.l<100?0:NaN,a.l,a.opacity);var s=Math.atan2(a.b,a.a)*j;return new y(s<0?s+360:s,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}(n):new y(n,r,i,e??1)}function y(n,r,i,e){this.h=+n,this.c=+r,this.l=+i,this.opacity=+e}function an(n){if(isNaN(n.h))return new p(n.l,0,0,n.opacity);var r=n.h*Y;return new p(n.l,Math.cos(r)*n.c,Math.sin(r)*n.c,n.opacity)}function rn(n){return function(r,i){var e=n((r=I(r)).h,(i=I(i)).h),a=d(r.c,i.c),s=d(r.l,i.l),o=d(r.opacity,i.opacity);return function(b){return r.h=e(b),r.c=a(b),r.l=s(b),r.opacity=o(b),r+""}}}S(p,nn,q(z,{brighter(n){return new p(this.l+18*(n??1),this.a,this.b,this.opacity)},darker(n){return new p(this.l-18*(n??1),this.a,this.b,this.opacity)},rgb(){var n=(this.l+16)/116,r=isNaN(this.a)?n:n+this.a/500,i=isNaN(this.b)?n:n-this.b/200;return r=W*B(r),n=1*B(n),i=X*B(i),new R(C(3.1338561*r-1.6168667*n-.4906146*i),C(-.9787684*r+1.9161415*n+.033454*i),C(.0719453*r-.2289914*n+1.4052427*i),this.opacity)}})),S(y,I,q(z,{brighter(n){return new y(this.h,this.c,this.l+18*(n??1),this.opacity)},darker(n){return new y(this.h,this.c,this.l-18*(n??1),this.opacity)},rgb(){return an(this).rgb()}}));const Rn=rn(fn);var Sn=rn(d);function en(n,r){var i,e=0,a=(n=n.slice()).length-1,s=n[e],o=n[a];return o<s&&(i=e,e=a,a=i,i=s,s=o,o=i),n[e]=r.floor(s),n[a]=r.ceil(o),n}function qn(n){return new Date(n)}function zn(n){return n instanceof Date?+n:+new Date(+n)}function L(n,r,i,e,a,s,o,b,l,u){var c=bn(),v=c.invert,h=c.domain,w=u(".%L"),k=u(":%S"),P=u("%I:%M"),tn=u("%I %p"),sn=u("%a %d"),on=u("%b %d"),un=u("%B"),cn=u("%Y");function hn(t){return(l(t)<t?w:b(t)<t?k:o(t)<t?P:s(t)<t?tn:e(t)<t?a(t)<t?sn:on:i(t)<t?un:cn)(t)}return c.invert=function(t){return new Date(v(t))},c.domain=function(t){return arguments.length?h(Array.from(t,zn)):h().map(qn)},c.ticks=function(t){var f=h();return n(f[0],f[f.length-1],t??10)},c.tickFormat=function(t,f){return f==null?hn:u(f)},c.nice=function(t){var f=h();return t&&typeof t.range=="function"||(t=r(f[0],f[f.length-1],t??10)),t?h(en(f,t)):c},c.copy=function(){return pn(c,L(n,r,i,e,a,s,o,b,l,u))},c}function En(){return yn.apply(L(Cn,Fn,U,T,Q,O,K,J,m,kn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Pn as a,An as b,L as c,j as d,I as e,Sn as h,Rn as i,nn as l,xn as m,en as n,Y as r,En as t,Bn as u};
@@ -1,9 +1,9 @@
1
- import{_ as r,c as yt,l as $,T as gt,V as ft,W as mt,X as xt,B as bt,Y as _t,y as kt}from"./mermaid-DCMac0Ai.js";import{s as V}from"./transform-CDNfLgV5.js";import{d as K}from"./arc-ZB5pDULS.js";import"./index-_lj65MZR.js";import"./step-BwsUM5iJ.js";import"./timer-Bqd5yn_a.js";var G=function(){var n=r(function(s,h,l,p){for(l=l||{},p=s.length;p--;l[s[p]]=h);return l},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],o=[1,10],i=[1,11],a=[1,12],u=[1,13],f=[1,16],d=[1,17],g={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:r(function(s,h,l,p,y,c,v){var x=c.length-1;switch(y){case 1:return c[x-1];case 2:case 6:case 7:this.$=[];break;case 3:c[x-1].push(c[x]),this.$=c[x-1];break;case 4:case 5:this.$=c[x];break;case 8:p.getCommonDb().setDiagramTitle(c[x].substr(6)),this.$=c[x].substr(6);break;case 9:this.$=c[x].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=c[x].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(c[x].substr(8)),this.$=c[x].substr(8);break;case 15:p.addTask(c[x],0,""),this.$=c[x];break;case 16:p.addEvent(c[x].substr(2)),this.$=c[x]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:o,14:i,16:a,17:u,18:14,19:15,20:f,21:d},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:o,14:i,16:a,17:u,18:14,19:15,20:f,21:d},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:r(function(s,h){if(!h.recoverable){var l=new Error(s);throw l.hash=h,l}this.trace(s)},"parseError"),parse:r(function(s){var h=this,l=[0],p=[],y=[null],c=[],v=this.table,x="",N=0,P=0,D=c.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(I.yy[M]=this.yy[M]);b.setInput(s,I.yy),I.yy.lexer=b,I.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var k=b.yylloc;c.push(k);var A=b.options&&b.options.ranges;function L(){var T;return typeof(T=p.pop()||b.lex()||1)!="number"&&(T instanceof Array&&(T=(p=T).pop()),T=h.symbols_[T]||T),T}typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r(function(T){l.length=l.length-2*T,y.length=y.length-T,c.length=c.length-T},"popStack"),r(L,"lex");for(var w,E,S,X,z,C,Z,B,O={};;){if(E=l[l.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(w==null&&(w=L()),S=v[E]&&v[E][w]),S===void 0||!S.length||!S[0]){var J="";for(z in B=[],v[E])this.terminals_[z]&&z>2&&B.push("'"+this.terminals_[z]+"'");J=b.showPosition?"Parse error on line "+(N+1)+`:
1
+ import{_ as r,c as yt,l as $,T as gt,V as ft,W as mt,X as xt,B as bt,Y as _t,y as kt}from"./mermaid-DonGMagM.js";import{s as G}from"./transform-CDNfLgV5.js";import{d as K}from"./arc-ZB5pDULS.js";import"./index-DYmhnlX1.js";import"./step-BwsUM5iJ.js";import"./timer-Bqd5yn_a.js";var Y=function(){var n=r(function(s,h,l,p){for(l=l||{},p=s.length;p--;l[s[p]]=h);return l},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],o=[1,10],i=[1,11],a=[1,12],u=[1,13],f=[1,16],d=[1,17],g={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:r(function(s,h,l,p,y,c,w){var x=c.length-1;switch(y){case 1:return c[x-1];case 2:case 6:case 7:this.$=[];break;case 3:c[x-1].push(c[x]),this.$=c[x-1];break;case 4:case 5:this.$=c[x];break;case 8:p.getCommonDb().setDiagramTitle(c[x].substr(6)),this.$=c[x].substr(6);break;case 9:this.$=c[x].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=c[x].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(c[x].substr(8)),this.$=c[x].substr(8);break;case 15:p.addTask(c[x],0,""),this.$=c[x];break;case 16:p.addEvent(c[x].substr(2)),this.$=c[x]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:o,14:i,16:a,17:u,18:14,19:15,20:f,21:d},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:o,14:i,16:a,17:u,18:14,19:15,20:f,21:d},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:r(function(s,h){if(!h.recoverable){var l=new Error(s);throw l.hash=h,l}this.trace(s)},"parseError"),parse:r(function(s){var h=this,l=[0],p=[],y=[null],c=[],w=this.table,x="",A=0,L=0,D=c.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(I.yy[H]=this.yy[H]);b.setInput(s,I.yy),I.yy.lexer=b,I.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var M=b.yylloc;c.push(M);var v=b.options&&b.options.ranges;function N(){var E;return typeof(E=p.pop()||b.lex()||1)!="number"&&(E instanceof Array&&(E=(p=E).pop()),E=h.symbols_[E]||E),E}typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r(function(E){l.length=l.length-2*E,y.length=y.length-E,c.length=c.length-E},"popStack"),r(N,"lex");for(var k,T,S,z,B,C,Z,F,O={};;){if(T=l[l.length-1],this.defaultActions[T]?S=this.defaultActions[T]:(k==null&&(k=N()),S=w[T]&&w[T][k]),S===void 0||!S.length||!S[0]){var J="";for(B in F=[],w[T])this.terminals_[B]&&B>2&&F.push("'"+this.terminals_[B]+"'");J=b.showPosition?"Parse error on line "+(A+1)+`:
2
2
  `+b.showPosition()+`
3
- Expecting `+B.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(N+1)+": Unexpected "+(w==1?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(J,{text:b.match,token:this.terminals_[w]||w,line:b.yylineno,loc:k,expected:B})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+w);switch(S[0]){case 1:l.push(w),y.push(b.yytext),c.push(b.yylloc),l.push(S[1]),w=null,P=b.yyleng,x=b.yytext,N=b.yylineno,k=b.yylloc;break;case 2:if(C=this.productions_[S[1]][1],O.$=y[y.length-C],O._$={first_line:c[c.length-(C||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(C||1)].first_column,last_column:c[c.length-1].last_column},A&&(O._$.range=[c[c.length-(C||1)].range[0],c[c.length-1].range[1]]),(X=this.performAction.apply(O,[x,P,N,I.yy,S[1],y,c].concat(D)))!==void 0)return X;C&&(l=l.slice(0,-1*C*2),y=y.slice(0,-1*C),c=c.slice(0,-1*C)),l.push(this.productions_[S[1]][0]),y.push(O.$),c.push(O._$),Z=v[l[l.length-2]][l[l.length-1]],l.push(Z);break;case 3:return!0}}return!0},"parse")},_=function(){return{EOF:1,parseError:r(function(s,h){if(!this.yy.parser)throw new Error(s);this.yy.parser.parseError(s,h)},"parseError"),setInput:r(function(s,h){return this.yy=h||this.yy||{},this._input=s,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:r(function(){var s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.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),s},"input"),unput:r(function(s){var h=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var p=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),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).
3
+ Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(A+1)+": Unexpected "+(k==1?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(J,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:M,expected:F})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(S[0]){case 1:l.push(k),y.push(b.yytext),c.push(b.yylloc),l.push(S[1]),k=null,L=b.yyleng,x=b.yytext,A=b.yylineno,M=b.yylloc;break;case 2:if(C=this.productions_[S[1]][1],O.$=y[y.length-C],O._$={first_line:c[c.length-(C||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(C||1)].first_column,last_column:c[c.length-1].last_column},v&&(O._$.range=[c[c.length-(C||1)].range[0],c[c.length-1].range[1]]),(z=this.performAction.apply(O,[x,L,A,I.yy,S[1],y,c].concat(D)))!==void 0)return z;C&&(l=l.slice(0,-1*C*2),y=y.slice(0,-1*C),c=c.slice(0,-1*C)),l.push(this.productions_[S[1]][0]),y.push(O.$),c.push(O._$),Z=w[l[l.length-2]][l[l.length-1]],l.push(Z);break;case 3:return!0}}return!0},"parse")},_=function(){return{EOF:1,parseError:r(function(s,h){if(!this.yy.parser)throw new Error(s);this.yy.parser.parseError(s,h)},"parseError"),setInput:r(function(s,h){return this.yy=h||this.yy||{},this._input=s,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:r(function(){var s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.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),s},"input"),unput:r(function(s){var h=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var p=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),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var s=this.pastInput(),h=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
5
  `+h+"^"},"showPosition"),test_match:r(function(s,h){var l,p,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),(p=s[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var c in y)this[c]=y[c];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;var s,h,l,p;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),c=0;c<y.length;c++)if((l=this._input.match(this.rules[y[c]]))&&(!h||l[0].length>h[0].length)){if(h=l,p=c,this.options.backtrack_lexer){if((s=this.test_match(l,y[c]))!==!1)return s;if(this._backtrack){h=!1;continue}return!1}if(!this.options.flex)break}return h?(s=this.test_match(h,y[p]))!==!1&&s:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var s=this.next();return s||this.lex()},"lex"),begin:r(function(s){this.conditionStack.push(s)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(s){return(s=this.conditionStack.length-1-Math.abs(s||0))>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:r(function(s){this.begin(s)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(s,h,l,p){switch(l){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function m(){this.yy={}}return g.lexer=_,r(m,"Parser"),m.prototype=g,g.Parser=m,new m}();G.parser=G;var wt=G,Q={};bt(Q,{addEvent:()=>ot,addSection:()=>it,addTask:()=>at,addTaskOrg:()=>ct,clear:()=>nt,default:()=>vt,getCommonDb:()=>et,getSections:()=>st,getTasks:()=>rt});var j="",tt=0,Y=[],F=[],R=[],et=r(()=>_t,"getCommonDb"),nt=r(function(){Y.length=0,F.length=0,j="",R.length=0,kt()},"clear"),it=r(function(n){j=n,Y.push(n)},"addSection"),st=r(function(){return Y},"getSections"),rt=r(function(){let n=lt(),t=0;for(;!n&&t<100;)n=lt(),t++;return F.push(...R),F},"getTasks"),at=r(function(n,t,e){const o={id:tt++,section:j,type:j,task:n,score:t||0,events:e?[e]:[]};R.push(o)},"addTask"),ot=r(function(n){R.find(t=>t.id===tt-1).events.push(n)},"addEvent"),ct=r(function(n){const t={section:j,type:j,description:n,task:n,classes:[]};F.push(t)},"addTaskOrg"),lt=r(function(){const n=r(function(e){return R[e].processed},"compileTask");let t=!0;for(const[e,o]of R.entries())n(e),t=t&&o.processed;return t},"compileTasks"),vt={clear:nt,getCommonDb:et,addSection:it,getSections:st,getTasks:rt,addTask:at,addTaskOrg:ct,addEvent:ot},W=r(function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),St=r(function(n,t){const o=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=n.append("g");function a(d){const g=K().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function u(d){const g=K().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function f(d){d.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",t.cx-5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r(a,"smile"),r(u,"sad"),r(f,"ambivalent"),t.score>3?a(i):t.score<3?u(i):f(i),o},"drawFace"),$t=r(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),ht=r(function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),o=n.append("text");o.attr("x",t.x),o.attr("y",t.y),o.attr("class","legend"),o.style("text-anchor",t.anchor),t.class!==void 0&&o.attr("class",t.class);const i=o.append("tspan");return i.attr("x",t.x+2*t.textMargin),i.text(e),o},"drawText"),Tt=r(function(n,t){function e(i,a,u,f,d){return i+","+a+" "+(i+u)+","+a+" "+(i+u)+","+(a+f-d)+" "+(i+u-1.2*d)+","+(a+f)+" "+i+","+(a+f)}r(e,"genPoints");const o=n.append("polygon");o.attr("points",e(t.x,t.y,50,20,7)),o.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ht(n,t)},"drawLabel"),Et=r(function(n,t,e){const o=n.append("g"),i=q();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,W(o,i),ut(e)(t.text,o,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),dt=-1,It=r(function(n,t,e){const o=t.x+e.width/2,i=n.append("g");dt++,i.append("line").attr("id","task"+dt).attr("x1",o).attr("y1",t.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),St(i,{cx:o,cy:300+30*(5-t.score),score:t.score});const a=q();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=e.width,a.height=e.height,a.class="task task-type-"+t.num,a.rx=3,a.ry=3,W(i,a),ut(e)(t.task,i,a.x,a.y,a.width,a.height,{class:"task"},e,t.colour)},"drawTask"),Mt=r(function(n,t){W(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Nt=r(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),q=r(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ut=function(){function n(i,a,u,f,d,g,_,m){o(a.append("text").attr("x",u+d/2).attr("y",f+g/2+5).style("font-color",m).style("text-anchor","middle").text(i),_)}function t(i,a,u,f,d,g,_,m,s){const{taskFontSize:h,taskFontFamily:l}=m,p=i.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const c=y*h-h*(p.length-1)/2,v=a.append("text").attr("x",u+d/2).attr("y",f).attr("fill",s).style("text-anchor","middle").style("font-size",h).style("font-family",l);v.append("tspan").attr("x",u+d/2).attr("dy",c).text(p[y]),v.attr("y",f+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),o(v,_)}}function e(i,a,u,f,d,g,_,m){const s=a.append("switch"),h=s.append("foreignObject").attr("x",u).attr("y",f).attr("width",d).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,s,u,f,d,g,_,m),o(h,_)}function o(i,a){for(const u in a)u in a&&i.attr(u,a[u])}return r(n,"byText"),r(t,"byTspan"),r(e,"byFo"),r(o,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?n:t}}(),At=r(function(n){n.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function U(n,t){n.each(function(){var e,o=V(this),i=o.text().split(/(\s+|<br>)/).reverse(),a=[],u=o.attr("y"),f=parseFloat(o.attr("dy")),d=o.text(null).append("tspan").attr("x",0).attr("y",u).attr("dy",f+"em");for(let g=0;g<i.length;g++)e=i[i.length-1-g],a.push(e),d.text(a.join(" ").trim()),(d.node().getComputedTextLength()>t||e==="<br>")&&(a.pop(),d.text(a.join(" ").trim()),a=e==="<br>"?[""]:[e],d=o.append("tspan").attr("x",0).attr("y",u).attr("dy","1.1em").text(e))})}r(U,"wrap");var Ct=r(function(n,t,e,o){var _;const i=e%12-1,a=n.append("g");t.section=i,a.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+i);const u=a.append("g"),f=a.append("g"),d=f.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(U,t.width).node().getBBox(),g=(_=o.fontSize)!=null&&_.replace?o.fontSize.replace("px",""):o.fontSize;return t.height=d.height+1.1*g*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,f.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Pt(u,t,i,o),t},"drawNode"),Lt=r(function(n,t,e){var u;const o=n.append("g"),i=o.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(U,t.width).node().getBBox(),a=(u=e.fontSize)!=null&&u.replace?e.fontSize.replace("px",""):e.fontSize;return o.remove(),i.height+1.1*a*.5+t.padding},"getVirtualNodeHeight"),Pt=r(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),H={drawRect:W,drawCircle:$t,drawSection:Et,drawText:ht,drawLabel:Tt,drawTask:It,drawBackgroundRect:Mt,getTextObj:Nt,getNoteRect:q,initGraphics:At,drawNode:Ct,getVirtualNodeHeight:Lt},Ht=r(function(n,t,e,o){var b,I;const i=yt(),a=i.leftMargin??50;$.debug("timeline",o.db);const u=i.securityLevel;let f;u==="sandbox"&&(f=V("#i"+t));const d=V(u==="sandbox"?f.nodes()[0].contentDocument.body:"body").select("#"+t);d.append("g");const g=o.db.getTasks(),_=o.db.getCommonDb().getDiagramTitle();$.debug("task",g),H.initGraphics(d);const m=o.db.getSections();$.debug("sections",m);let s=0,h=0,l=0,p=0,y=50+a,c=50;p=50;let v=0,x=!0;m.forEach(function(M){const k={number:v,descr:M,section:v,width:150,padding:20,maxHeight:s},A=H.getVirtualNodeHeight(d,k,i);$.debug("sectionHeight before draw",A),s=Math.max(s,A+20)});let N=0,P=0;$.debug("tasks.length",g.length);for(const[M,k]of g.entries()){const A={number:M,descr:k,section:k.section,width:150,padding:20,maxHeight:h},L=H.getVirtualNodeHeight(d,A,i);$.debug("taskHeight before draw",L),h=Math.max(h,L+20),N=Math.max(N,k.events.length);let w=0;for(const E of k.events){const S={descr:E,section:k.section,number:k.section,width:150,padding:20,maxHeight:50};w+=H.getVirtualNodeHeight(d,S,i)}k.events.length>0&&(w+=10*(k.events.length-1)),P=Math.max(P,w)}$.debug("maxSectionHeight before draw",s),$.debug("maxTaskHeight before draw",h),m&&m.length>0?m.forEach(M=>{const k=g.filter(E=>E.section===M),A={number:v,descr:M,section:v,width:200*Math.max(k.length,1)-50,padding:20,maxHeight:s};$.debug("sectionNode",A);const L=d.append("g"),w=H.drawNode(L,A,v,i);$.debug("sectionNode output",w),L.attr("transform",`translate(${y}, 50)`),c+=s+50,k.length>0&&pt(d,k,v,y,c,h,i,N,P,s,!1),y+=200*Math.max(k.length,1),c=50,v++}):(x=!1,pt(d,g,v,y,c,h,i,N,P,s,!0));const D=d.node().getBBox();$.debug("bounds",D),_&&d.append("text").text(_).attr("x",D.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),l=x?s+h+150:h+100,d.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",l).attr("x2",D.width+3*a).attr("y2",l).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),gt(void 0,d,((b=i.timeline)==null?void 0:b.padding)??50,((I=i.timeline)==null?void 0:I.useMaxWidth)??!1)},"draw"),pt=r(function(n,t,e,o,i,a,u,f,d,g,_){var m;for(const s of t){const h={descr:s.task,section:e,number:e,width:150,padding:20,maxHeight:a};$.debug("taskNode",h);const l=n.append("g").attr("class","taskWrapper"),p=H.drawNode(l,h,e,u).height;if($.debug("taskHeight after draw",p),l.attr("transform",`translate(${o}, ${i})`),a=Math.max(a,p),s.events){const y=n.append("g").attr("class","lineWrapper");let c=a;i+=100,c+=Ot(n,s.events,e,o,i,u),i-=100,y.append("line").attr("x1",o+95).attr("y1",i+a).attr("x2",o+95).attr("y2",i+a+100+d+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}o+=200,_&&!((m=u.timeline)!=null&&m.disableMulticolor)&&e++}i-=10},"drawTasks"),Ot=r(function(n,t,e,o,i,a){let u=0;const f=i;i+=100;for(const d of t){const g={descr:d,section:e,number:e,width:150,padding:20,maxHeight:50};$.debug("eventNode",g);const _=n.append("g").attr("class","eventWrapper"),m=H.drawNode(_,g,e,a).height;u+=m,_.attr("transform",`translate(${o}, ${i})`),i=i+10+m}return i=f,u},"drawEvents"),jt={setConf:r(()=>{},"setConf"),draw:Ht},Rt=r(n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],ft(n["lineColor"+e])?n["lineColor"+e]=mt(n["lineColor"+e],20):n["lineColor"+e]=xt(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const o=""+(17-3*e);t+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var s=this.next();return s||this.lex()},"lex"),begin:r(function(s){this.conditionStack.push(s)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(s){return(s=this.conditionStack.length-1-Math.abs(s||0))>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:r(function(s){this.begin(s)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(s,h,l,p){switch(l){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function m(){this.yy={}}return g.lexer=_,r(m,"Parser"),m.prototype=g,g.Parser=m,new m}();Y.parser=Y;var wt=Y,Q={};bt(Q,{addEvent:()=>ot,addSection:()=>it,addTask:()=>at,addTaskOrg:()=>ct,clear:()=>nt,default:()=>vt,getCommonDb:()=>et,getSections:()=>st,getTasks:()=>rt});var j="",tt=0,q=[],W=[],R=[],et=r(()=>_t,"getCommonDb"),nt=r(function(){q.length=0,W.length=0,j="",R.length=0,kt()},"clear"),it=r(function(n){j=n,q.push(n)},"addSection"),st=r(function(){return q},"getSections"),rt=r(function(){let n=lt(),t=0;for(;!n&&t<100;)n=lt(),t++;return W.push(...R),W},"getTasks"),at=r(function(n,t,e){const o={id:tt++,section:j,type:j,task:n,score:t||0,events:e?[e]:[]};R.push(o)},"addTask"),ot=r(function(n){R.find(t=>t.id===tt-1).events.push(n)},"addEvent"),ct=r(function(n){const t={section:j,type:j,description:n,task:n,classes:[]};W.push(t)},"addTaskOrg"),lt=r(function(){const n=r(function(e){return R[e].processed},"compileTask");let t=!0;for(const[e,o]of R.entries())n(e),t=t&&o.processed;return t},"compileTasks"),vt={clear:nt,getCommonDb:et,addSection:it,getSections:st,getTasks:rt,addTask:at,addTaskOrg:ct,addEvent:ot},V=r(function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),St=r(function(n,t){const o=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=n.append("g");function a(d){const g=K().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function u(d){const g=K().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function f(d){d.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",t.cx-5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r(a,"smile"),r(u,"sad"),r(f,"ambivalent"),t.score>3?a(i):t.score<3?u(i):f(i),o},"drawFace"),$t=r(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),ht=r(function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),o=n.append("text");o.attr("x",t.x),o.attr("y",t.y),o.attr("class","legend"),o.style("text-anchor",t.anchor),t.class!==void 0&&o.attr("class",t.class);const i=o.append("tspan");return i.attr("x",t.x+2*t.textMargin),i.text(e),o},"drawText"),Tt=r(function(n,t){function e(i,a,u,f,d){return i+","+a+" "+(i+u)+","+a+" "+(i+u)+","+(a+f-d)+" "+(i+u-1.2*d)+","+(a+f)+" "+i+","+(a+f)}r(e,"genPoints");const o=n.append("polygon");o.attr("points",e(t.x,t.y,50,20,7)),o.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ht(n,t)},"drawLabel"),Et=r(function(n,t,e){const o=n.append("g"),i=U();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,V(o,i),ut(e)(t.text,o,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),dt=-1,It=r(function(n,t,e){const o=t.x+e.width/2,i=n.append("g");dt++,i.append("line").attr("id","task"+dt).attr("x1",o).attr("y1",t.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),St(i,{cx:o,cy:300+30*(5-t.score),score:t.score});const a=U();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=e.width,a.height=e.height,a.class="task task-type-"+t.num,a.rx=3,a.ry=3,V(i,a),ut(e)(t.task,i,a.x,a.y,a.width,a.height,{class:"task"},e,t.colour)},"drawTask"),Mt=r(function(n,t){V(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Nt=r(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),U=r(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ut=function(){function n(i,a,u,f,d,g,_,m){o(a.append("text").attr("x",u+d/2).attr("y",f+g/2+5).style("font-color",m).style("text-anchor","middle").text(i),_)}function t(i,a,u,f,d,g,_,m,s){const{taskFontSize:h,taskFontFamily:l}=m,p=i.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const c=y*h-h*(p.length-1)/2,w=a.append("text").attr("x",u+d/2).attr("y",f).attr("fill",s).style("text-anchor","middle").style("font-size",h).style("font-family",l);w.append("tspan").attr("x",u+d/2).attr("dy",c).text(p[y]),w.attr("y",f+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),o(w,_)}}function e(i,a,u,f,d,g,_,m){const s=a.append("switch"),h=s.append("foreignObject").attr("x",u).attr("y",f).attr("width",d).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,s,u,f,d,g,_,m),o(h,_)}function o(i,a){for(const u in a)u in a&&i.attr(u,a[u])}return r(n,"byText"),r(t,"byTspan"),r(e,"byFo"),r(o,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?n:t}}(),At=r(function(n){n.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function X(n,t){n.each(function(){var e,o=G(this),i=o.text().split(/(\s+|<br>)/).reverse(),a=[],u=o.attr("y"),f=parseFloat(o.attr("dy")),d=o.text(null).append("tspan").attr("x",0).attr("y",u).attr("dy",f+"em");for(let g=0;g<i.length;g++)e=i[i.length-1-g],a.push(e),d.text(a.join(" ").trim()),(d.node().getComputedTextLength()>t||e==="<br>")&&(a.pop(),d.text(a.join(" ").trim()),a=e==="<br>"?[""]:[e],d=o.append("tspan").attr("x",0).attr("y",u).attr("dy","1.1em").text(e))})}r(X,"wrap");var Ct=r(function(n,t,e,o){var _;const i=e%12-1,a=n.append("g");t.section=i,a.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+i);const u=a.append("g"),f=a.append("g"),d=f.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(X,t.width).node().getBBox(),g=(_=o.fontSize)!=null&&_.replace?o.fontSize.replace("px",""):o.fontSize;return t.height=d.height+1.1*g*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,f.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Pt(u,t,i,o),t},"drawNode"),Lt=r(function(n,t,e){var u;const o=n.append("g"),i=o.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(X,t.width).node().getBBox(),a=(u=e.fontSize)!=null&&u.replace?e.fontSize.replace("px",""):e.fontSize;return o.remove(),i.height+1.1*a*.5+t.padding},"getVirtualNodeHeight"),Pt=r(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),P={drawRect:V,drawCircle:$t,drawSection:Et,drawText:ht,drawLabel:Tt,drawTask:It,drawBackgroundRect:Mt,getTextObj:Nt,getNoteRect:U,initGraphics:At,drawNode:Ct,getVirtualNodeHeight:Lt},Ht=r(function(n,t,e,o){var b,I,H;const i=yt(),a=((b=i.timeline)==null?void 0:b.leftMargin)??50;$.debug("timeline",o.db);const u=i.securityLevel;let f;u==="sandbox"&&(f=G("#i"+t));const d=G(u==="sandbox"?f.nodes()[0].contentDocument.body:"body").select("#"+t);d.append("g");const g=o.db.getTasks(),_=o.db.getCommonDb().getDiagramTitle();$.debug("task",g),P.initGraphics(d);const m=o.db.getSections();$.debug("sections",m);let s=0,h=0,l=0,p=0,y=50+a,c=50;p=50;let w=0,x=!0;m.forEach(function(M){const v={number:w,descr:M,section:w,width:150,padding:20,maxHeight:s},N=P.getVirtualNodeHeight(d,v,i);$.debug("sectionHeight before draw",N),s=Math.max(s,N+20)});let A=0,L=0;$.debug("tasks.length",g.length);for(const[M,v]of g.entries()){const N={number:M,descr:v,section:v.section,width:150,padding:20,maxHeight:h},k=P.getVirtualNodeHeight(d,N,i);$.debug("taskHeight before draw",k),h=Math.max(h,k+20),A=Math.max(A,v.events.length);let T=0;for(const S of v.events){const z={descr:S,section:v.section,number:v.section,width:150,padding:20,maxHeight:50};T+=P.getVirtualNodeHeight(d,z,i)}v.events.length>0&&(T+=10*(v.events.length-1)),L=Math.max(L,T)}$.debug("maxSectionHeight before draw",s),$.debug("maxTaskHeight before draw",h),m&&m.length>0?m.forEach(M=>{const v=g.filter(S=>S.section===M),N={number:w,descr:M,section:w,width:200*Math.max(v.length,1)-50,padding:20,maxHeight:s};$.debug("sectionNode",N);const k=d.append("g"),T=P.drawNode(k,N,w,i);$.debug("sectionNode output",T),k.attr("transform",`translate(${y}, 50)`),c+=s+50,v.length>0&&pt(d,v,w,y,c,h,i,A,L,s,!1),y+=200*Math.max(v.length,1),c=50,w++}):(x=!1,pt(d,g,w,y,c,h,i,A,L,s,!0));const D=d.node().getBBox();$.debug("bounds",D),_&&d.append("text").text(_).attr("x",D.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),l=x?s+h+150:h+100,d.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",l).attr("x2",D.width+3*a).attr("y2",l).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),gt(void 0,d,((I=i.timeline)==null?void 0:I.padding)??50,((H=i.timeline)==null?void 0:H.useMaxWidth)??!1)},"draw"),pt=r(function(n,t,e,o,i,a,u,f,d,g,_){var m;for(const s of t){const h={descr:s.task,section:e,number:e,width:150,padding:20,maxHeight:a};$.debug("taskNode",h);const l=n.append("g").attr("class","taskWrapper"),p=P.drawNode(l,h,e,u).height;if($.debug("taskHeight after draw",p),l.attr("transform",`translate(${o}, ${i})`),a=Math.max(a,p),s.events){const y=n.append("g").attr("class","lineWrapper");let c=a;i+=100,c+=Ot(n,s.events,e,o,i,u),i-=100,y.append("line").attr("x1",o+95).attr("y1",i+a).attr("x2",o+95).attr("y2",i+a+100+d+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}o+=200,_&&!((m=u.timeline)!=null&&m.disableMulticolor)&&e++}i-=10},"drawTasks"),Ot=r(function(n,t,e,o,i,a){let u=0;const f=i;i+=100;for(const d of t){const g={descr:d,section:e,number:e,width:150,padding:20,maxHeight:50};$.debug("eventNode",g);const _=n.append("g").attr("class","eventWrapper"),m=P.drawNode(_,g,e,a).height;u+=m,_.attr("transform",`translate(${o}, ${i})`),i=i+10+m}return i=f,u},"drawEvents"),jt={setConf:r(()=>{},"setConf"),draw:Ht},Rt=r(n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],ft(n["lineColor"+e])?n["lineColor"+e]=mt(n["lineColor"+e],20):n["lineColor"+e]=xt(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const o=""+(17-3*e);t+=`
7
7
  .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
8
8
  fill: ${n["cScale"+e]};
9
9
  }
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-kzqyjt1O.js","./VegaLite-B_dlvmS8.js","./index-DYmhnlX1.js","./index-S3mjG3Uz.css","./compile-C1fgVjKt.js","./time-bZ-arUoy.js","./timer-Bqd5yn_a.js","./linear-CCLVHXdb.js","./init-DLRA0X12.js","./range-CtcPcB_L.js","./zoom-COrs4lFh.js","./ordinal-DDUp3AbE.js","./colors-bszWmPJw.js","./step-BwsUM5iJ.js","./arc-ZB5pDULS.js","./index-BEQfoZiP.js","./index-4EoOw_ED.js"])))=>i.map(i=>d[i]);
2
+ import{c as Z,a as N,T as O,U as G,V as J,W as k,j as s,b as K,_ as Q,X as tt,Y as U,Z as et,$ as rt,a0 as st,a1 as A,a2 as it,a3 as ot,a4 as at,a5 as lt,__tla as nt}from"./index-DYmhnlX1.js";import{c as mt}from"./compile-C1fgVjKt.js";import{r as ct,u as pt,__tla as dt}from"./storage-DZZHoZaf.js";import{P as ut,C as ht,f as Y,E as xt,a as gt,__tla as ft}from"./edit-page-TN4XAy2z.js";import{A as vt}from"./links-BOSKRjH_.js";import{C as jt}from"./circle-play-DjJ5u-05.js";import"./time-bZ-arUoy.js";import"./timer-Bqd5yn_a.js";import"./linear-CCLVHXdb.js";import"./init-DLRA0X12.js";import"./range-CtcPcB_L.js";import"./zoom-COrs4lFh.js";import"./ordinal-DDUp3AbE.js";import"./colors-bszWmPJw.js";import"./step-BwsUM5iJ.js";import"./arc-ZB5pDULS.js";import"./index-BEQfoZiP.js";import"./index-B1o5PWgw.js";import"./index-BamjPWEC.js";import"./index-C4BBG11u.js";import"./index-Dqf23Hvm.js";import"./index-DGjhFk6m.js";import"./index-RoS9j4wO.js";import"./index-B2587e_p.js";import"./index-C-IG5Jr8.js";import"./index-a8t0EFic.js";import"./index-Z1jc58tW.js";import"./index-BlYahtg3.js";import"./index-D98B-7XN.js";import"./index-CF_KIi0p.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./trash-BZiJbQ0d.js";import"./_createAggregator-Baj-S-w2.js";import"./_baseEach-BRg52hSf.js";import{__tla as yt}from"./loro_wasm_bg-C3hKWL9L.js";import"./transform-CDNfLgV5.js";import"./sortBy-C43Pp6GY.js";import"./_baseMap-C8GGmDJG.js";import"./index-4EoOw_ED.js";let W,w,It=Promise.all([(()=>{try{return nt}catch{}})(),(()=>{try{return dt}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return yt}catch{}})()]).then(async()=>{const X=Z("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),M="hoveredCellId",P="cellHover",C="cell",R="startTimestamp",L="endTimestamp",z="status";let E,B,$,H,V,q,D,F;E=G(new Map),W=()=>{const e=N.c(28),{runIds:t,runMap:r}=O(ct),l=O(E),{clearRuns:o}=pt(),{theme:a}=J(),[i,u]=k.useState("above");let m;e[0]!==i?(m=()=>{u(i==="above"?"sideBySide":"above")},e[0]=i,e[1]=m):m=e[1];const x=m;if(t.length===0){let h;return e[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ut,{title:"No traces",description:s.jsx("span",{children:"Cells that have ran will appear here."}),icon:s.jsx(vt,{})}),e[2]=h):h=e[2],h}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),e[3]=d):d=e[3];const c=i==="sideBySide";let g,p,y,f,v,I;if(e[4]!==c||e[5]!==x?(g=s.jsxs("div",{className:"flex flex-row gap-1 items-center",children:[d,s.jsx("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:x,defaultChecked:c,className:"h-3 cursor-pointer"})]}),e[4]=c,e[5]=x,e[6]=g):g=e[6],e[7]!==o?(p=s.jsx(ht,{dataTestId:"clear-traces-button",onClick:o}),e[7]=o,e[8]=p):p=e[8],e[9]!==g||e[10]!==p?(y=s.jsxs("div",{className:"flex flex-row justify-end gap-3",children:[g,p]}),e[9]=g,e[10]=p,e[11]=y):y=e[11],e[12]!==i||e[13]!==l||e[14]!==t||e[15]!==r||e[16]!==a){let h;e[18]!==i||e[19]!==l||e[20]!==r||e[21]!==a?(h=(_,n)=>{const j=r.get(_);if(j)return s.jsx(H,{run:j,isExpanded:l.get(j.runId),isMostRecentRun:n===0,chartPosition:i,theme:a},j.runId)},e[18]=i,e[19]=l,e[20]=r,e[21]=a,e[22]=h):h=e[22],f=t.map(h),e[12]=i,e[13]=l,e[14]=t,e[15]=r,e[16]=a,e[17]=f}else f=e[17];return e[23]!==f?(v=s.jsx("div",{className:"flex flex-col gap-3",children:f}),e[23]=f,e[24]=v):v=e[24],e[25]!==y||e[26]!==v?(I=s.jsxs("div",{className:"py-1 px-2 overflow-y-scroll",children:[y,v]}),e[25]=y,e[26]=v,e[27]=I):I=e[27],I},B=K.lazy(()=>Q(()=>import("./index-kzqyjt1O.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url).then(e=>({default:e.Vega}))),$=e=>{const t=N.c(10),{ref:r,width:l}=lt(),o=l===void 0?300:l,a=e.theme==="dark"?"dark":void 0,i=o-50;let u,m;return t[0]!==e.height||t[1]!==e.signalListeners||t[2]!==e.vegaSpec||t[3]!==a||t[4]!==i?(u=s.jsx(k.Suspense,{children:s.jsx(B,{spec:e.vegaSpec,theme:a,width:i,height:e.height,signalListeners:e.signalListeners,actions:!1})}),t[0]=e.height,t[1]=e.signalListeners,t[2]=e.vegaSpec,t[3]=a,t[4]=i,t[5]=u):u=t[5],t[6]!==e.className||t[7]!==r||t[8]!==u?(m=s.jsx("div",{className:e.className,ref:r,children:u}),t[6]=e.className,t[7]=r,t[8]=u,t[9]=m):m=t[9],m},H=({run:e,isMostRecentRun:t,chartPosition:r,isExpanded:l,theme:o})=>{const a=tt(E),i=(l=l??t)?it:ot,u=s.jsx(i,{height:16,className:"inline"}),m=s.jsxs("span",{className:"text-sm cursor-pointer",onClick:()=>{a(x=>{const d=new Map(x);return d.set(e.runId,!l),d})},children:["Run - ",U(e.runStartTime),u]});return l?s.jsx(V,{run:e,chartPosition:r,theme:o,title:m},e.runId):s.jsx("div",{className:"flex flex-col",children:s.jsx("pre",{className:"font-mono font-semibold",children:m})},e.runId)},V=e=>{const t=N.c(32),{run:r,chartPosition:l,theme:o,title:a}=e,[i,u]=k.useState();let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m={[P]:(_,n)=>{var S;const j=n,b=(S=j.cell)==null?void 0:S[0];u(b??null)}},t[0]=m):m=t[0];const x=m,d=et();let c,g;if(t[1]!==d||t[2]!==l||t[3]!==r.cellRuns||t[4]!==r.runId||t[5]!==o){const _=[...r.cellRuns.values()].map(n=>{const j=n.elapsedTime??0;return{cell:n.cellId,cellNum:d.inOrderIds.indexOf(n.cellId),startTimestamp:w(n.startTime),endTimestamp:w(n.startTime+j),elapsedTime:Y(1e3*j),status:n.status}});c=`hiddenInputElement-${r.runId}`,g=mt(function(n,j,b,S){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",background:S==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:M,bind:{element:`#${j}`}},{name:P,select:{type:"point",on:"mouseover",fields:[C],clear:"mouseout"}}],height:{step:23},encoding:{y:{field:"cellNum",scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:b==="sideBySide"?null:void 0},x:{field:R,type:"temporal",axis:{orient:"top",title:null}},x2:{field:L,type:"temporal"},tooltip:[{field:R,type:"temporal",timeUnit:"hoursminutessecondsmilliseconds",title:"Start"},{field:L,type:"temporal",timeUnit:"hoursminutessecondsmilliseconds",title:"End"}],size:{value:{expr:`${M} == toString(datum.${C}) ? 19.5 : 18`}},color:{field:z,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:n},transform:[{calculate:`datum.${z} === 'queued' ? 9999999999999 : datum.${R}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}(_,c,l,o)),t[1]=d,t[2]=l,t[3]=r.cellRuns,t[4]=r.runId,t[5]=o,t[6]=c,t[7]=g}else c=t[6],g=t[7];const p=g.spec;let y;t[8]!==c||t[9]!==i||t[10]!==r?(y=s.jsx(q,{run:r,hoveredCellId:i,hiddenInputElementId:c}),t[8]=c,t[9]=i,t[10]=r,t[11]=y):y=t[11];const f=y;if(l==="above"){let _,n,j;return t[12]!==o||t[13]!==p?(_=s.jsx($,{vegaSpec:p,height:120,signalListeners:x,theme:o}),t[12]=o,t[13]=p,t[14]=_):_=t[14],t[15]!==_||t[16]!==a||t[17]!==f?(n=s.jsxs("pre",{className:"font-mono font-semibold",children:[a,_,f]}),t[15]=_,t[16]=a,t[17]=f,t[18]=n):n=t[18],t[19]!==r.runId||t[20]!==n?(j=s.jsx("div",{className:"flex flex-col",children:n},r.runId),t[19]=r.runId,t[20]=n,t[21]=j):j=t[21],j}let v,I,h;return t[22]!==a||t[23]!==f?(v=s.jsxs("pre",{className:"font-mono font-semibold",children:[a,f]}),t[22]=a,t[23]=f,t[24]=v):v=t[24],t[25]!==o||t[26]!==p?(I=s.jsx($,{className:"-mt-0.5 flex-1",vegaSpec:p,height:100,signalListeners:x,theme:o}),t[25]=o,t[26]=p,t[27]=I):I=t[27],t[28]!==r.runId||t[29]!==v||t[30]!==I?(h=s.jsxs("div",{className:"flex flex-row",children:[v,I]},r.runId),t[28]=r.runId,t[29]=v,t[30]=I,t[31]=h):h=t[31],h},q=e=>{const t=N.c(12),{run:r,hoveredCellId:l,hiddenInputElementId:o}=e,a=k.useRef(null);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=p=>{a.current&&(a.current.value=String(p),a.current.dispatchEvent(new Event("input",{bubbles:!0})))},t[0]=i):i=t[0];const u=i,m=l||"";let x,d,c,g;return t[1]!==o||t[2]!==m?(x=s.jsx("input",{type:"text",id:o,defaultValue:m,hidden:!0,ref:a}),t[1]=o,t[2]=m,t[3]=x):x=t[3],t[4]!==r.cellRuns?(d=[...r.cellRuns.values()],t[4]=r.cellRuns,t[5]=d):d=t[5],t[6]!==l||t[7]!==d?(c=d.map(p=>s.jsx(F,{cellRun:p,hovered:p.cellId===l,dispatchHoverEvent:u},p.cellId)),t[6]=l,t[7]=d,t[8]=c):c=t[8],t[9]!==x||t[10]!==c?(g=s.jsxs("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[x,c]}),t[9]=x,t[10]=c,t[11]=g):g=t[11],g},D={success:s.jsx(gt,{color:"green",size:14}),running:s.jsx(jt,{color:"var(--blue-10)",size:14}),error:s.jsx(at,{color:"red",size:14}),queued:s.jsx(X,{color:"grey",size:14})},F=e=>{const t=N.c(39),{cellRun:r,hovered:l,dispatchHoverEvent:o}=e;let a;t[0]!==r.elapsedTime?(a=r.elapsedTime?Y(1e3*r.elapsedTime):"-",t[0]=r.elapsedTime,t[1]=a):a=t[1];const i=a;let u;t[2]!==r.elapsedTime||t[3]!==i?(u=r.elapsedTime?s.jsxs("span",{children:["This cell took ",s.jsx(xt,{elapsedTime:i})," to run"]}):s.jsx("span",{children:"This cell has not been run"}),t[2]=r.elapsedTime,t[3]=i,t[4]=u):u=t[4];const m=u;let x;t[5]!==r.cellId||t[6]!==o?(x=()=>{o(r.cellId)},t[5]=r.cellId,t[6]=o,t[7]=x):x=t[7];const d=x;let c;t[8]!==o?(c=()=>{o(null)},t[8]=o,t[9]=c):c=t[9];const g=c,p=l&&"bg-[var(--gray-3)] opacity-100";let y,f,v,I,h,_,n;t[10]!==p?(y=rt("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-[var(--gray-3)] hover:opacity-100",p),t[10]=p,t[11]=y):y=t[11],t[12]!==r.startTime?(f=U(r.startTime),t[12]=r.startTime,t[13]=f):f=t[13],t[14]!==f?(v=s.jsxs("span",{className:"text-[var(--gray-10)] dark:text-[var(--gray-11)]",children:["[",f,"]"]}),t[14]=f,t[15]=v):v=t[15],t[16]!==r.cellId?(I=s.jsxs("span",{className:"text-[var(--gray-10)] w-16",children:["(",s.jsx(st,{cellId:r.cellId}),")"]}),t[16]=r.cellId,t[17]=I):I=t[17],t[18]!==r.code?(h=s.jsx("span",{className:"w-40 truncate -ml-1",children:r.code}),t[18]=r.code,t[19]=h):h=t[19],t[20]!==i?(_=s.jsx("span",{className:"text-[var(--gray-10)] dark:text-[var(--gray-11)]",children:i}),t[20]=i,t[21]=_):_=t[21],t[22]!==m||t[23]!==_?(n=s.jsx(A,{content:m,children:_}),t[22]=m,t[23]=_,t[24]=n):n=t[24];const j=D[r.status];let b,S,T;return t[25]!==r.status||t[26]!==j?(b=s.jsx(A,{content:r.status,children:j}),t[25]=r.status,t[26]=j,t[27]=b):b=t[27],t[28]!==n||t[29]!==b?(S=s.jsxs("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[n,b]}),t[28]=n,t[29]=b,t[30]=S):S=t[30],t[31]!==d||t[32]!==g||t[33]!==h||t[34]!==S||t[35]!==y||t[36]!==v||t[37]!==I?(T=s.jsxs("div",{className:y,onMouseEnter:d,onMouseLeave:g,children:[v,I,h,S]}),t[31]=d,t[32]=g,t[33]=h,t[34]=S,t[35]=y,t[36]=v,t[37]=I,t[38]=T):T=t[38],T},w=function(e){try{const t=new Date(1e3*e),r=t.getFullYear(),l=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),a=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0"),u=String(t.getSeconds()).padStart(2,"0");return`${r}-${l}-${o} ${a}:${i}:${u}.${String(t.getMilliseconds()).padStart(3,"0")}`}catch{return""}}});export{W as Tracing,It as __tla,w as formatChartTime};
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-_lj65MZR.js";/**
1
+ import{c as t}from"./index-DYmhnlX1.js";/**
2
2
  * @license lucide-react v0.525.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.