@puddle-code/cli 0.2.16 → 0.2.17

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 (128) hide show
  1. package/CHANGELOG.md +7 -5
  2. package/dist/index.js +3 -2
  3. package/dist/public/assets/{App-BG0mdlS1.js → App-DASEDcLe.js} +2 -2
  4. package/dist/public/assets/{Dashboard-CWiBhmle.js → Dashboard-Bl3f29tM.js} +1 -1
  5. package/dist/public/assets/{EditorTabClose-cB987DFw.js → EditorTabClose-CGQ-k8b_.js} +1 -1
  6. package/dist/public/assets/{FindWidget-CZ_Qh10J.js → FindWidget-BW8xDrPl.js} +1 -1
  7. package/dist/public/assets/{LazyTerminal-DmvpxIqJ.js → LazyTerminal-B8gk-uo4.js} +2 -2
  8. package/dist/public/assets/{ModelRefcount-B3iGJHJf.js → ModelRefcount-sy_Enkuw.js} +1 -1
  9. package/dist/public/assets/{NewProjectDialog-I9vWidJt.js → NewProjectDialog-BWt0U42m.js} +1 -1
  10. package/dist/public/assets/{PaneEditorBody-C4j5nh1M.js → PaneEditorBody-B6weDIvq.js} +3 -3
  11. package/dist/public/assets/{PdfViewer-C5eSzJcC.js → PdfViewer-DAX1ynHZ.js} +2 -2
  12. package/dist/public/assets/{SettingsDialog-BM5YUClE.js → SettingsDialog-CjguTgft.js} +1 -1
  13. package/dist/public/assets/{Terminal-CAPi0WAe.js → Terminal-DGKjw3tx.js} +3 -3
  14. package/dist/public/assets/Workspace-DvgzPZhS.js +20 -0
  15. package/dist/public/assets/{abnfDiagram-VCTEODGH-jGPHgpeM.js → abnfDiagram-VCTEODGH-BQLKt265.js} +1 -1
  16. package/dist/public/assets/architecture-7GRP2DOG-CgvyCu4j.js +1 -0
  17. package/dist/public/assets/{architectureDiagram-5GKGNRK7-WzHiExt_.js → architectureDiagram-5GKGNRK7-CWbnlH__.js} +1 -1
  18. package/dist/public/assets/{blockDiagram-I7D4REHJ-DBRl_xPg.js → blockDiagram-I7D4REHJ-CTgCk_sD.js} +1 -1
  19. package/dist/public/assets/{buffer-store-C32442jB.js → buffer-store-Bo9Pkcvc.js} +2 -2
  20. package/dist/public/assets/{button-1G8TaWHA.js → button-C8rhITNL.js} +1 -1
  21. package/dist/public/assets/{c4Diagram-7LVT6UL2-MDXaO3qN.js → c4Diagram-7LVT6UL2-DekxjUBD.js} +1 -1
  22. package/dist/public/assets/channel-YT90b_V9.js +1 -0
  23. package/dist/public/assets/{chunk-2E4U76K2-AY--rEt0.js → chunk-2E4U76K2-7Kw4IMp8.js} +1 -1
  24. package/dist/public/assets/{chunk-4HAMMTFA-FPp5hj4L.js → chunk-4HAMMTFA-DqQBOHR1.js} +1 -1
  25. package/dist/public/assets/{chunk-75Z2AOVW-BORaUDn8.js → chunk-75Z2AOVW-aSl9pzR1.js} +1 -1
  26. package/dist/public/assets/{chunk-CLGD4ZFX-oFNi47Ux.js → chunk-CLGD4ZFX-Bs5GeGSA.js} +1 -1
  27. package/dist/public/assets/{chunk-DU6HZSFF-CBPmk1pL.js → chunk-DU6HZSFF-D2MERyrK.js} +1 -1
  28. package/dist/public/assets/{chunk-F27PBJKO-DE-cpUSw.js → chunk-F27PBJKO-M551Lok5.js} +1 -1
  29. package/dist/public/assets/{chunk-GMAD6QVW-uwctnGjU.js → chunk-GMAD6QVW-CMGYeAMx.js} +1 -1
  30. package/dist/public/assets/{chunk-GVQU2GXP-BQITYCKv.js → chunk-GVQU2GXP-4zM8Wb-z.js} +1 -1
  31. package/dist/public/assets/{chunk-IMKFNOWR-NpFZBNPP.js → chunk-IMKFNOWR-D30NXye3.js} +1 -1
  32. package/dist/public/assets/{chunk-L3NEJ4N5-DyGyqqsq.js → chunk-L3NEJ4N5--yPwqqSE.js} +1 -1
  33. package/dist/public/assets/{chunk-OSK3NFVY-BJidWKYd.js → chunk-OSK3NFVY-BBXTrREq.js} +1 -1
  34. package/dist/public/assets/{chunk-P2QGCYS3-Dxh_lkTg.js → chunk-P2QGCYS3-ClKqCyNC.js} +1 -1
  35. package/dist/public/assets/{chunk-POPQ4Y6H-C_gyiAmS.js → chunk-POPQ4Y6H-B8R2nhGa.js} +1 -1
  36. package/dist/public/assets/{chunk-PWAF6VOD-By_8bGJX.js → chunk-PWAF6VOD-DbfPo9WU.js} +1 -1
  37. package/dist/public/assets/{chunk-SHT3W25Y-IgOb9-zw.js → chunk-SHT3W25Y-D6SAjpYi.js} +1 -1
  38. package/dist/public/assets/{chunk-SVP7TREG-DA05MA7w.js → chunk-SVP7TREG-I33FgMt5.js} +1 -1
  39. package/dist/public/assets/{chunk-TICWLB2K-RUoyl2rG.js → chunk-TICWLB2K-C3qMCB7N.js} +1 -1
  40. package/dist/public/assets/{chunk-TLUHSLCS-ROOkcM6u.js → chunk-TLUHSLCS-DYPEQGHP.js} +2 -2
  41. package/dist/public/assets/classDiagram-ZZMXUADV-PtOmr7k-.js +1 -0
  42. package/dist/public/assets/classDiagram-v2-VYDZK3BY-PtOmr7k-.js +1 -0
  43. package/dist/public/assets/{context-menu-HlXs3B2p.js → context-menu-CMal4Vkq.js} +1 -1
  44. package/dist/public/assets/{cssMode-BhKXKmly.js → cssMode-Q_jbYJS7.js} +1 -1
  45. package/dist/public/assets/{cynefin-OW5HDTMX-B3kGmmPW.js → cynefin-OW5HDTMX-Cj0lJSw8.js} +1 -1
  46. package/dist/public/assets/{cynefinDiagram-5FMLGOSQ-Ch-mhRC4.js → cynefinDiagram-5FMLGOSQ-BAdaXOUJ.js} +1 -1
  47. package/dist/public/assets/{dagre-GXQ25YYZ-BbkznBXW.js → dagre-GXQ25YYZ-DZhvDIHY.js} +1 -1
  48. package/dist/public/assets/{diagram-S7CK7UJ4-B4SWXzuX.js → diagram-S7CK7UJ4-CH1J8eMv.js} +1 -1
  49. package/dist/public/assets/{diagram-UQ7AKVKN-C7CBIDh7.js → diagram-UQ7AKVKN-BbGb_ZG7.js} +1 -1
  50. package/dist/public/assets/{diagram-VSXAHHWV-B-5Z6jOF.js → diagram-VSXAHHWV-BQRmd7wW.js} +1 -1
  51. package/dist/public/assets/{diagram-VX7I27RA-D-TSzAXO.js → diagram-VX7I27RA-De0v0moC.js} +1 -1
  52. package/dist/public/assets/{diagram-Z3DM3KII-CqpRUlDU.js → diagram-Z3DM3KII-syjB4Ql9.js} +1 -1
  53. package/dist/public/assets/{dialog-DL-fFhai.js → dialog-MILhARIJ.js} +1 -1
  54. package/dist/public/assets/{disclosure-Bj0A7RNa.js → disclosure-WL8seqd7.js} +1 -1
  55. package/dist/public/assets/{dist-FZIjlARg.js → dist-BKmWy1qf.js} +1 -1
  56. package/dist/public/assets/{dist-DzQAeBM9.js → dist-CTEXpOxQ.js} +1 -1
  57. package/dist/public/assets/{ebnfDiagram-PWID7BFC-Cofjwha8.js → ebnfDiagram-PWID7BFC-CsS1lzs8.js} +1 -1
  58. package/dist/public/assets/{erDiagram-RLTQ6QDP-DwodqGKb.js → erDiagram-RLTQ6QDP-D74Eg0Px.js} +1 -1
  59. package/dist/public/assets/eventmodeling-NTZA5JFV-D8Dtm5A_.js +1 -0
  60. package/dist/public/assets/flowDiagram-HODETNUW-CifXrtD0.js +1 -0
  61. package/dist/public/assets/{ganttDiagram-EL5Y4UJY-CcUsJIyb.js → ganttDiagram-EL5Y4UJY-hRp4CMHE.js} +1 -1
  62. package/dist/public/assets/{gitGraph-4MIJSDKK-DFSf-C3S.js → gitGraph-4MIJSDKK-Cnu-0jqK.js} +1 -1
  63. package/dist/public/assets/{gitGraphDiagram-WWUBYQGX-C1lNmV85.js → gitGraphDiagram-WWUBYQGX-BbLrAu69.js} +1 -1
  64. package/dist/public/assets/{htmlMode-BWs3Q_d8.js → htmlMode-fKkE6HC6.js} +1 -1
  65. package/dist/public/assets/{index-DimSEdqL.js → index-Bu40e7h3.js} +2 -2
  66. package/dist/public/assets/{info-A6RAGUB7-syflKP6j.js → info-A6RAGUB7-De1ZvFf0.js} +1 -1
  67. package/dist/public/assets/{infoDiagram-27XIBGKW-D-ypuF8_.js → infoDiagram-27XIBGKW-D33MUhJD.js} +1 -1
  68. package/dist/public/assets/{ishikawaDiagram-5VMMS53U-BkRl4B7A.js → ishikawaDiagram-5VMMS53U-j-7Z1XFa.js} +1 -1
  69. package/dist/public/assets/{journeyDiagram-3NMN7TZE-BDDQuzDH.js → journeyDiagram-3NMN7TZE-CiCtBJeT.js} +1 -1
  70. package/dist/public/assets/{jsonMode-C-J7IxkG.js → jsonMode-CWrpMfsU.js} +1 -1
  71. package/dist/public/assets/{kanban-definition-UXKFOSKX-KHxfc5wc.js → kanban-definition-UXKFOSKX-CO3t97VG.js} +1 -1
  72. package/dist/public/assets/{line-DP_McEBB.js → line-DAutqfiP.js} +1 -1
  73. package/dist/public/assets/{markdown-mermaid-DAuI0dnv.js → markdown-mermaid-Df6N1I2p.js} +2 -2
  74. package/dist/public/assets/{math-BNwf_Ju1.js → math-ykOnDfXw.js} +1 -1
  75. package/dist/public/assets/{media-refresh-store-DwR5z285.js → media-refresh-store-CMKX1eYE.js} +1 -1
  76. package/dist/public/assets/{mermaid-parser.core-ByJNQf82.js → mermaid-parser.core-nSTpUfsy.js} +3 -3
  77. package/dist/public/assets/{mermaid.core-BFVfe-_-.js → mermaid.core-C-1MIKwo.js} +3 -3
  78. package/dist/public/assets/{mindmap-definition-YA3MSWOX-Bo9ob_mQ.js → mindmap-definition-YA3MSWOX-BtgHYzGA.js} +1 -1
  79. package/dist/public/assets/{notification-permission-DVm7P4Wk.js → notification-permission-CQu_knzv.js} +1 -1
  80. package/dist/public/assets/{packet-AYTQ26CC-o07r9Vr8.js → packet-AYTQ26CC-BbwhyFV5.js} +1 -1
  81. package/dist/public/assets/{pdf-BIrMXTqc.js → pdf-iPedJQTf.js} +1 -1
  82. package/dist/public/assets/{pegDiagram-XKGWAZYB-BtqMklw1.js → pegDiagram-XKGWAZYB-Br3jz0I2.js} +1 -1
  83. package/dist/public/assets/{pie-WAS4IAKB-BwpVJNHe.js → pie-WAS4IAKB-BOx_mmDL.js} +1 -1
  84. package/dist/public/assets/{pieDiagram-E7YTZNPT-Dncu9vCX.js → pieDiagram-E7YTZNPT-BfdDBsOS.js} +1 -1
  85. package/dist/public/assets/{project-abbrev-Cx2jLlWm.js → project-abbrev-C634LY_J.js} +1 -1
  86. package/dist/public/assets/{protocol-support-Cnojvarm.js → protocol-support-BVADYPW-.js} +1 -1
  87. package/dist/public/assets/{quadrantDiagram-AXDQQJYC-XuE3YoY0.js → quadrantDiagram-AXDQQJYC-hkrd8KkM.js} +1 -1
  88. package/dist/public/assets/{radar-RG4KPBEZ-DSTJnjXl.js → radar-RG4KPBEZ-Cy3-_Q6E.js} +1 -1
  89. package/dist/public/assets/{railroad-74A4TZTK-BMKVma7c.js → railroad-74A4TZTK-CDDOpnVU.js} +1 -1
  90. package/dist/public/assets/railroad-abnf-HS5TGJTU-DJNWFB0S.js +1 -0
  91. package/dist/public/assets/railroad-ebnf-LZEXJU2U-DhL_POed.js +1 -0
  92. package/dist/public/assets/railroad-peg-WCYAUIDC-L9JOWQyI.js +1 -0
  93. package/dist/public/assets/{railroadDiagram-O6MQD6OU-NYkCNnqw.js → railroadDiagram-O6MQD6OU-F-E1CbPj.js} +1 -1
  94. package/dist/public/assets/{requirementDiagram-BXWQKSXE-B3RL471h.js → requirementDiagram-BXWQKSXE-DGWUf99F.js} +1 -1
  95. package/dist/public/assets/{sankeyDiagram-P5KCCOFB-DHgi9F_Q.js → sankeyDiagram-P5KCCOFB-Bz4fTbJM.js} +1 -1
  96. package/dist/public/assets/{scroll-restoration-CIKfGFs2.js → scroll-restoration-G1GcB9rT.js} +1 -1
  97. package/dist/public/assets/{selection-actions-Cdyt7B5w.js → selection-actions-DCSkg-FE.js} +1 -1
  98. package/dist/public/assets/{sequenceDiagram-WJ2MYXX4-CVzi2D1O.js → sequenceDiagram-WJ2MYXX4-1GGhK0bo.js} +1 -1
  99. package/dist/public/assets/{stateDiagram-D77RDMKH-DngjefeP.js → stateDiagram-D77RDMKH-Co4V5Elx.js} +1 -1
  100. package/dist/public/assets/stateDiagram-v2-MP3YSRHH-CZrnOKxM.js +1 -0
  101. package/dist/public/assets/{swimlanes-42K2YHIH-CyX5RiVy.js → swimlanes-42K2YHIH-Cpvzy5z9.js} +1 -1
  102. package/dist/public/assets/swimlanesDiagram-VR7AAH4N-Cny5_18V.js +8 -0
  103. package/dist/public/assets/{switch-5VXcu2UI.js → switch-D32gPFW_.js} +1 -1
  104. package/dist/public/assets/{timeline-definition-24CTP7MA-DhdTaBK5.js → timeline-definition-24CTP7MA-DEIowN6z.js} +1 -1
  105. package/dist/public/assets/{treeView-Q6P3EWNA-BlUF5psp.js → treeView-Q6P3EWNA-DnWFnDTp.js} +1 -1
  106. package/dist/public/assets/{treemap-WGGIJYW6-CBBJYmO9.js → treemap-WGGIJYW6-VcCqmhfM.js} +1 -1
  107. package/dist/public/assets/{tsMode-D_AutCCc.js → tsMode-DFq1Zlat.js} +1 -1
  108. package/dist/public/assets/{use-ui-state-DIucS4Z6.js → use-ui-state-F93FwHTG.js} +1 -1
  109. package/dist/public/assets/{vennDiagram-4TSXK5OY-Qx2LbVrf.js → vennDiagram-4TSXK5OY-DLQ-sWk-.js} +1 -1
  110. package/dist/public/assets/{view-state-store-Cu5yK2QF.js → view-state-store-nW0b7vA1.js} +1 -1
  111. package/dist/public/assets/{wardley-WFR3VGLG-COf-GTqU.js → wardley-WFR3VGLG-BvAT9rdv.js} +1 -1
  112. package/dist/public/assets/{wardleyDiagram-VM6X3IG4-C4Qc2JCE.js → wardleyDiagram-VM6X3IG4-DIf6ISFB.js} +1 -1
  113. package/dist/public/assets/{ws-BOTI-Z0Y.js → ws-DuBOluvd.js} +1 -1
  114. package/dist/public/assets/{xychartDiagram-S5SC5T6Z-CDRnPbH3.js → xychartDiagram-S5SC5T6Z-Dez9Qhft.js} +1 -1
  115. package/dist/public/index.html +1 -1
  116. package/package.json +2 -2
  117. package/dist/public/assets/Workspace-q_eTRA6m.js +0 -20
  118. package/dist/public/assets/architecture-7GRP2DOG-DP0eDupc.js +0 -1
  119. package/dist/public/assets/channel-CihecDxw.js +0 -1
  120. package/dist/public/assets/classDiagram-ZZMXUADV-D2vAdlHX.js +0 -1
  121. package/dist/public/assets/classDiagram-v2-VYDZK3BY-D2vAdlHX.js +0 -1
  122. package/dist/public/assets/eventmodeling-NTZA5JFV-CHBx7_oz.js +0 -1
  123. package/dist/public/assets/flowDiagram-HODETNUW-D_byNUu2.js +0 -1
  124. package/dist/public/assets/railroad-abnf-HS5TGJTU-Wq7qIXqX.js +0 -1
  125. package/dist/public/assets/railroad-ebnf-LZEXJU2U-nEF79E8p.js +0 -1
  126. package/dist/public/assets/railroad-peg-WCYAUIDC-UPoD6gFx.js +0 -1
  127. package/dist/public/assets/stateDiagram-v2-MP3YSRHH--wHLryr3.js +0 -1
  128. package/dist/public/assets/swimlanesDiagram-VR7AAH4N-BEtZV8RT.js +0 -8
@@ -1,4 +1,4 @@
1
- import{n as e}from"./mermaid-parser.core-ByJNQf82.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-_wZywoZs.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-CBPmk1pL.js";import{g,i as _,m as v}from"./chunk-75Z2AOVW-BORaUDn8.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=t(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}t(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(T,`uniqBy`);var te=t(function(e){C.records.direction=e},`setDirection`),ne=t(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=t(function(){return C.records.options},`getOptions`),ie=t(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let o=S();r=d.sanitizeText(r,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,n.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&n.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(`in pushCommit `+s.id)},`commit`),ae=t(function(e){let t=e.name,r=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=t(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),r&&=d.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=t(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let o=S();if(t=d.sanitizeText(t,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=t(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===t?r+=` *`:r+=` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}t(O,`prettyPrintCommitHistory`);var ce=t(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=t(function(){C.reset(),c()},`clear`),ue=t(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=t(function(){return C.records.branches},`getBranches`),fe=t(function(){return C.records.commits},`getCommits`),k=t(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:t(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return C.records.direction},`getDirection`),getHead:t(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=t((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=t((e,r)=>{let i={Commit:t(e=>r.commit(he(e)),`Commit`),Branch:t(e=>r.branch(ge(e)),`Branch`),Merge:t(e=>r.merge(_e(e)),`Merge`),Checkout:t(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):n.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=t(e=>e.branch,`parseCheckout`),ye=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:t(async t=>{let r=await e(`gitGraph`,t);n.debug(r),pe(r,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=t((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=t(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=t(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=t(e=>{let n,r,i;return K===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Ce=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=t(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=t(e=>Te(e)+M,`calculateCommitPosition`),De=t((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=t((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=t((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=t((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),je=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
1
+ import{n as e}from"./mermaid-parser.core-nSTpUfsy.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-_wZywoZs.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-D2MERyrK.js";import{g,i as _,m as v}from"./chunk-75Z2AOVW-aSl9pzR1.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=t(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}t(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(T,`uniqBy`);var te=t(function(e){C.records.direction=e},`setDirection`),ne=t(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=t(function(){return C.records.options},`getOptions`),ie=t(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let o=S();r=d.sanitizeText(r,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,n.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&n.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(`in pushCommit `+s.id)},`commit`),ae=t(function(e){let t=e.name,r=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=t(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),r&&=d.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=t(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let o=S();if(t=d.sanitizeText(t,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=t(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===t?r+=` *`:r+=` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}t(O,`prettyPrintCommitHistory`);var ce=t(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=t(function(){C.reset(),c()},`clear`),ue=t(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=t(function(){return C.records.branches},`getBranches`),fe=t(function(){return C.records.commits},`getCommits`),k=t(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:t(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return C.records.direction},`getDirection`),getHead:t(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=t((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=t((e,r)=>{let i={Commit:t(e=>r.commit(he(e)),`Commit`),Branch:t(e=>r.branch(ge(e)),`Branch`),Merge:t(e=>r.merge(_e(e)),`Merge`),Checkout:t(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):n.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=t(e=>e.branch,`parseCheckout`),ye=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:t(async t=>{let r=await e(`gitGraph`,t);n.debug(r),pe(r,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=t((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=t(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=t(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=t(e=>{let n,r,i;return K===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Ce=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=t(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=t(e=>Te(e)+M,`calculateCommitPosition`),De=t((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=t((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=t((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=t((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),je=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
2
2
  ${r-a/2-N/2},${l+P}
3
3
  ${r-a/2-N/2},${l-P}
4
4
  ${n.posWithOffset-a/2-N},${l-s-P}
@@ -1 +1 @@
1
- import{h as e}from"./editor.api2-4X9Vh9Zw.js";import{h as t}from"./buffer-store-C32442jB.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-x2nWJpem.js";var b=120*1e3,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-DSJ9zmd7.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends _{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(t){let n=new x(t),o=(...e)=>n.getLanguageServiceWorker(...e),s=t.languageId;e.registerCompletionItemProvider(s,new S(o)),e.registerHoverProvider(s,new a(o)),e.registerDocumentHighlightProvider(s,new p(o)),e.registerLinkProvider(s,new g(o)),e.registerFoldingRangeProvider(s,new v(o)),e.registerDocumentSymbolProvider(s,new u(o)),e.registerSelectionRangeProvider(s,new d(o)),e.registerRenameProvider(s,new m(o)),s===`html`&&(e.registerDocumentFormattingEditProvider(s,new r(o)),e.registerDocumentRangeFormattingEditProvider(s,new i(o)))}function w(t){let n=[],o=[],s=new x(t);n.push(s);let c=(...e)=>s.getLanguageServiceWorker(...e);function l(){let{languageId:n,modeConfiguration:s}=t;E(o),s.completionItems&&o.push(e.registerCompletionItemProvider(n,new S(c))),s.hovers&&o.push(e.registerHoverProvider(n,new a(c))),s.documentHighlights&&o.push(e.registerDocumentHighlightProvider(n,new p(c))),s.links&&o.push(e.registerLinkProvider(n,new g(c))),s.documentSymbols&&o.push(e.registerDocumentSymbolProvider(n,new u(c))),s.rename&&o.push(e.registerRenameProvider(n,new m(c))),s.foldingRanges&&o.push(e.registerFoldingRangeProvider(n,new v(c))),s.selectionRanges&&o.push(e.registerSelectionRangeProvider(n,new d(c))),s.documentFormattingEdits&&o.push(e.registerDocumentFormattingEditProvider(n,new r(c))),s.documentRangeFormattingEdits&&o.push(e.registerDocumentRangeFormattingEditProvider(n,new i(c)))}return l(),n.push(T(o)),T(n)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,w as setupMode,C as setupMode1,n as toRange,y as toTextEdit};
1
+ import{h as e}from"./editor.api2-4X9Vh9Zw.js";import{h as t}from"./buffer-store-Bo9Pkcvc.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-x2nWJpem.js";var b=120*1e3,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-DSJ9zmd7.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends _{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(t){let n=new x(t),o=(...e)=>n.getLanguageServiceWorker(...e),s=t.languageId;e.registerCompletionItemProvider(s,new S(o)),e.registerHoverProvider(s,new a(o)),e.registerDocumentHighlightProvider(s,new p(o)),e.registerLinkProvider(s,new g(o)),e.registerFoldingRangeProvider(s,new v(o)),e.registerDocumentSymbolProvider(s,new u(o)),e.registerSelectionRangeProvider(s,new d(o)),e.registerRenameProvider(s,new m(o)),s===`html`&&(e.registerDocumentFormattingEditProvider(s,new r(o)),e.registerDocumentRangeFormattingEditProvider(s,new i(o)))}function w(t){let n=[],o=[],s=new x(t);n.push(s);let c=(...e)=>s.getLanguageServiceWorker(...e);function l(){let{languageId:n,modeConfiguration:s}=t;E(o),s.completionItems&&o.push(e.registerCompletionItemProvider(n,new S(c))),s.hovers&&o.push(e.registerHoverProvider(n,new a(c))),s.documentHighlights&&o.push(e.registerDocumentHighlightProvider(n,new p(c))),s.links&&o.push(e.registerLinkProvider(n,new g(c))),s.documentSymbols&&o.push(e.registerDocumentSymbolProvider(n,new u(c))),s.rename&&o.push(e.registerRenameProvider(n,new m(c))),s.foldingRanges&&o.push(e.registerFoldingRangeProvider(n,new v(c))),s.selectionRanges&&o.push(e.registerSelectionRangeProvider(n,new d(c))),s.documentFormattingEdits&&o.push(e.registerDocumentFormattingEditProvider(n,new r(c))),s.documentRangeFormattingEdits&&o.push(e.registerDocumentRangeFormattingEditProvider(n,new i(c)))}return l(),n.push(T(o)),T(n)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,w as setupMode,C as setupMode1,n as toRange,y as toTextEdit};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-BG0mdlS1.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/dist-DzQAeBM9.js","assets/protocol-support-Cnojvarm.js","assets/project-abbrev-Cx2jLlWm.js","assets/createLucideIcon-DyMAgLa3.js","assets/dialog-DL-fFhai.js","assets/button-1G8TaWHA.js","assets/x-CZCUod6A.js","assets/LazyTerminal-DmvpxIqJ.js","assets/switch-5VXcu2UI.js","assets/use-ui-state-DIucS4Z6.js","assets/preview-kind-QJSMKfUN.js","assets/debounce-B9DrqirV.js","assets/notification-permission-DVm7P4Wk.js","assets/copy-CGsu8426.js","assets/NewProjectDialog-I9vWidJt.js","assets/use-debounced-value-C86N-mOK.js","assets/ws-BOTI-Z0Y.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-DASEDcLe.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/dist-CTEXpOxQ.js","assets/protocol-support-BVADYPW-.js","assets/project-abbrev-C634LY_J.js","assets/createLucideIcon-DyMAgLa3.js","assets/dialog-MILhARIJ.js","assets/button-C8rhITNL.js","assets/x-CZCUod6A.js","assets/LazyTerminal-B8gk-uo4.js","assets/switch-D32gPFW_.js","assets/use-ui-state-F93FwHTG.js","assets/preview-kind-QJSMKfUN.js","assets/debounce-B9DrqirV.js","assets/notification-permission-CQu_knzv.js","assets/copy-CGsu8426.js","assets/NewProjectDialog-BWt0U42m.js","assets/use-debounced-value-C86N-mOK.js","assets/ws-DuBOluvd.js"])))=>i.map(i=>d[i]);
2
2
  import{r as e,t}from"./rolldown-runtime-QTnfLwEv.js";import{t as n}from"./react-CZI7_Jkm.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function ee(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,ee(e),!m)if(n(c)!==null)m=!0,x||(x=!0,oe());else{var t=n(l);t!==null&&le(b,t.startTime-e)}}var x=!1,te=-1,ne=5,re=-1;function ie(){return g?!0:!(e.unstable_now()-re<ne)}function ae(){if(g=!1,x){var t=e.unstable_now();re=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(ee(t),d=n(c);d!==null&&!(d.expirationTime>t&&ie());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,ee(t),i=!0;break b}d===n(c)&&r(c),ee(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(b,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():x=!1}}}var oe;if(typeof y==`function`)oe=function(){y(ae)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ae,oe=function(){ce.postMessage(null)}}else oe=function(){_(ae,0)};function le(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,le(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,x||(x=!0,oe()))),r},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=t(((e,t)=>{t.exports=r()})),a=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),o=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=t((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),ee=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case b:return`Profiler`;case ee:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case te:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var S=Array.isArray,C=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function T(e,t){he++,me[he]=e.current,e.current=t}var ve=ge(null),ye=ge(null),be=ge(null),xe=ge(null);function Se(e,t){switch(T(be,t),T(ye,e),T(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ve),T(ve,e)}function Ce(){_e(ve),_e(ye),_e(be)}function we(e){e.memoizedState!==null&&T(xe,e);var t=ve.current,n=Hd(t,e.type);t!==n&&(T(ye,e),T(ve,n))}function Te(e){ye.current===e&&(_e(ve),_e(ye)),xe.current===e&&(_e(xe),Qf._currentValue=pe)}var Ee,De;function Oe(e){if(Ee===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||``,De=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+Ee+e+De}var ke=!1;function Ae(e,t){if(!e||ke)return``;ke=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -79,4 +79,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
79
79
  3. Apply what the rules above settle without asking. Ask the user about anything they leave open, stating trade-offs where relevant (e.g. a symlinked .venv saves gigabytes per worktree, but parallel sessions then share mutable dependency state).
80
80
  4. If the user states a standing rule for all future worktrees ("always…", "never…", "from now on…"), write the complete updated rules to \`.puddle/onboarding-notes.md\` in this worktree — full replacement, user-owned prose; record their decision, don't invent policy.
81
81
 
82
- Then proceed with the task below (or await instructions if none is given).`,To=`[puddle] You are joining an existing branch and worktree that other agents may be working in concurrently. Files can change underneath you, so re-check the working tree before you act, and avoid disruptive git operations (resetting, force-pushing, or deleting the branch) that would disrupt work already in progress by others.`,Eo=`This session was interrupted (daemon or machine restart). Processes you started are gone; re-verify your environment before continuing.`,Do=[[`name`,`the resolved display name: user rename, else agent name, else sequence, else id`],[`title`,`the user rename override only (empty when unset)`],[`agentName`,`the agent's own session name (empty when the agent has not named it)`],[`sequence`,`the terminal-title name the process set (empty when it set none)`],[`branch`,`the git branch`],[`cwd`,`the worktree directory's name`],[`id`,`the first 8 characters of the session id`],[`status`,`the session status (running, waiting_input, …)`],[`agent`,`the agent type (empty for terminal sessions)`],[`separator`,`an em dash that appears only between two non-empty neighbours`]],Oo="${name}",ko=[`navy`,`gold`,`blue`,`green`,`red`,`violet`,`cyan`];R({id:bo,name:So,branch_prefix:N(),icon:N().nullable().default(null),icon_colour:N().nullable().default(null),created_at:go}),R({name:So,branch_prefix:N().max(64).optional()}),R({name:So.optional(),branch_prefix:N().max(64).optional(),icon:N().max(64).nullable().optional(),icon_colour:N().max(32).nullable().optional()});var Ao=Na({baseBranch:N().optional(),separateBranch:I().optional(),separateWorktree:I().optional()}),jo=Na({agent:Ao.optional(),terminal:Ao.optional()});Na({allowSkipPermissions:I().default(!1),captureSessionEnv:I().default(!0),terminalAppShortcuts:I().default(!0),onboardingTemplate:N().optional(),concurrentTemplate:N().optional(),restartTemplate:N().optional(),tabTitleTemplate:N().optional(),projectOrder:L(N()).optional(),sessionDefaults:jo.optional(),hotkeys:Va(N(),N()).optional()}),Va(N(),Oa());var Mo=N().regex(/^untitled-\d+\.md$/);R({name:Mo}),R({name:Mo,content:N(),mtime_ms:F()}),R({content:N()}),R({mtime_ms:F()}),R({id:_o,profile_id:bo,agent_type:N(),label:N(),config_dir:N(),skip_permissions_default:I(),logged_in:I(),created_at:go}),R({profile_id:bo,agent_type:N().min(1),label:So,skip_permissions_default:I().optional(),import_dir:N().min(1).optional()}),R({label:So.optional(),skip_permissions_default:I().optional()}),R({stream:N(),term:N(),hint:N().optional()}),Na({account_id:_o,logged_in:I(),session_count:F().int().nonnegative(),active_session_count:F().int().nonnegative(),last_activity_at:go.nullable(),agent_usage:R({input_tokens:F().int().nonnegative(),output_tokens:F().int().nonnegative(),cache_read_input_tokens:F().int().nonnegative(),cache_creation_input_tokens:F().int().nonnegative(),message_count:F().int().nonnegative()}).nullable(),live_usage:R({captured_at:go,context_used_percentage:F().nullable(),total_cost_usd:F().nullable(),model:N().nullable()}).nullable(),subscription:R({windows:L(R({key:N(),label:N(),used_percentage:F(),resets:N().nullable()}))}).nullable()}),R({id:N(),display_name:N(),capabilities:R({resume:I(),skip_permissions:I()}),binary:N().optional(),available:I().optional()}),R({id:_o,path:N(),default_base_branch:N(),onboarding_notes:N().nullable(),fetch_enabled:I(),last_fetched_at:go.nullable()}).extend({orphan_worktrees:L(N())}),R({path:N().min(1),default_base_branch:N().optional(),onboarding_notes:N().nullable().optional(),fetch_enabled:I().optional()}),R({branches:L(R({name:N(),is_session:I(),session_title:N().nullable()}))});var No=R({path:N(),branch:N().nullable(),is_primary:I(),dirty:I().optional(),local_only:I().optional()}),Po=R({name:N(),local_only:I()});R({worktrees:L(No),orphan_branches:L(Po)}),R({default_base_branch:N().optional(),onboarding_notes:N().nullable().optional(),fetch_enabled:I().optional()});var Fo=z([`starting`,`running`,`waiting_input`,`exited`,`interrupted`,`archived`]),Io=z([`agent`,`terminal`]),Lo=R({id:vo,project_id:yo,account_id:_o.nullable(),worktree_path:N(),base_branch:N(),branch:N(),separate_branch:I(),kind:Io,agent_type:N().nullable(),agent_session_ref:N().nullable(),conversation_id:_o.nullable().optional(),parent_conversation_id:_o.nullable().optional(),title:N().nullable(),agent_title:N().nullable().optional(),conversation_missing:I().optional(),branch_owner:I().optional(),native_sync:z([`pending`,`full`,`fallback`]).optional(),osc_title:N().nullable().optional(),status:Fo,cwd:N().nullable().optional(),skip_permissions:I(),created_at:go,updated_at:go,last_activity_at:go.nullable(),worktree_missing:I().optional(),stale_running:I().optional(),git_summary:R({ahead:F().int().nonnegative(),behind:F().int().nonnegative(),dirty_files:F().int().nonnegative()}).nullable().optional()});R({project_id:yo,account_id:_o.optional(),kind:Io.optional(),base_branch:N().min(1).optional(),branch:N().min(1).max(200).optional(),separate_branch:I().optional(),separate_worktree:I().optional(),join_worktree:N().optional(),cwd:N().optional(),title:N().min(1).max(200).optional(),prompt:N().optional(),skip_permissions:I().optional()}),R({title:N().max(200)}),R({account_id:_o}),R({account_id:_o}),R({vars:L(R({name:N(),bytes:F().int().nonnegative(),value:N().optional()}))}),R({cleared:F().int().nonnegative()}),R({force:I().default(!1),delete_branch:I().default(!1)});var Ro=N().min(1).max(5),zo=R({id:yo,profile_id:bo,repo_id:_o,name:N(),abbrev:Ro.nullable().default(null),archived:I().default(!1),created_at:go,updated_at:go});R({profile_id:bo,repo_id:_o,name:N().min(1).max(100),abbrev:Ro.optional()}),R({name:N().min(1).max(100).optional(),abbrev:Ro.optional(),archived:I().optional()}),R({project:zo,sessions:L(Lo)});var Bo=z([`project`,`profile`]);R({id:_o,profile_id:bo,scope:Bo,project_id:yo.nullable(),title:N().nullable(),body:N(),tags:L(N()),agent_type:N().nullable(),position:F(),created_at:go,updated_at:go}),R({profile_id:bo,scope:Bo,project_id:yo.optional(),title:N().max(200).optional(),body:N().min(1),tags:L(N()).optional(),agent_type:N().optional()}),R({scope:Bo.optional(),project_id:yo.nullable().optional(),title:N().max(200).nullable().optional(),body:N().min(1).optional(),tags:L(N()).optional(),agent_type:N().nullable().optional(),position:F().optional()});var Vo=z([`on_demand`,`eager`]),Ho=R({session:vo,path:N().min(1),root:N().min(1).optional()}),Uo=N().regex(/^[a-z][a-z0-9_-]*$/);R({providers:L(R({id:Uo,display_name:N().min(1),extensions:L(N().regex(/^[a-z0-9]+$/)).min(1),input_extensions:L(N().regex(/^[a-z0-9]+$/)).min(1),available:I(),executor:N().min(1).nullable(),eager:I()}))});var Wo=R({source:Ho,provider:Uo.optional(),profile_id:bo.optional(),project_id:yo.optional()}),Go=R({role:N().min(1),media_type:N().min(1),file:Ho}),Ko=R({source:Ho,severity:z([`error`,`warning`,`info`]),message:N().min(1),line:F().int().positive(),column:F().int().positive().optional(),end_line:F().int().positive().optional(),end_column:F().int().positive().optional()}),qo=R({source:Ho.optional(),output:N().optional(),diagnostics:L(Ko).optional()}),Jo=qo.extend({message:N().min(1)}),Yo=R({provider:Uo,executor:N().min(1),revision:F().int().nonnegative(),source:Ho,artifacts:L(Go),navigation:R({kind:N().min(1)}).optional()});Wo.extend({mode:Vo}),R({provider:Uo,mode:Vo,state:z([`idle`,`running`,`succeeded`,`failed`]),revision:F().int().nonnegative(),result:Yo.nullable(),error:Jo.nullable()});var Xo=R({placeholder:N().regex(/^\{\{[a-z][a-z0-9_]*\}\}$/),description:N().min(1)}),Zo=R({mode:Vo,run_when:z([`when_clicked`,`upon_file_change`]),default_command:N().min(1).nullable(),override_command:N().min(1).nullable()}),Qo=Wo.extend({profile_id:bo,project_id:yo});R({provider:Uo,display_name:N().min(1),file_type:N().regex(/^[a-z0-9][a-z0-9_-]*$/),file_path:N().min(1),variables:L(Xo),commands:L(Zo).min(1)}),Qo.extend({mode:Vo,command:N().trim().min(1).max(16384).nullable()});var $o=`00000000-0000-0000-0000-000000000000`,es=R({session:vo,path:N(),kind:z([`file`,`diff`,`commit`,`external`,`untitled`]).optional(),sha:N().optional(),git_area:z([`staged`,`unstaged`]).optional(),root:N().optional(),view:z([`source`,`preview`,`linked`,`locked`]).optional(),compile_mode:Vo.optional(),generated_by:Uo.optional()}),ts=La(`type`,[R({type:B(`editor`),tab:es}),R({type:B(`terminal`),session:vo})]),ns=R({kind:B(`leaf`),id:N(),tabs:L(ts).default([]),activeKey:N().nullable().default(null),previewKey:N().nullable().default(null)}),rs=fo(()=>La(`kind`,[ns,R({kind:B(`split`),id:N(),direction:z([`row`,`col`]),children:L(rs),sizes:L(F())})])),is=Na({layout_tree:rs.nullable().default(null),active_session:vo.nullable().default(null),layout_ref:_o.nullable().default(null)}),as=Na({session_tabs:L(vo).default([]),active_session:vo.nullable().default(null),editor_tabs:L(es).default([]),layout:Na({}).default({}),explorer_pin:vo.nullable().default(null),active_editor_tab:es.nullable().default(null),explorer_open:I().default(!0),sidebar_mode:z([`files`,`diff`,`history`,`changes`,`search`,`worktrees`]).default(`files`),sidebar_collapsed:I().default(!1),sessions_collapsed:I().default(!1),right_panel:z([`sessions`,`scratchpad`]).optional(),session_order:L(vo).default([]),layout_tree:rs.nullable().default(null),layout_mode:z([`profile`,`project`]).optional(),project_layouts:Va(N(),is).default({}),layout_ref:_o.nullable().default(null)});R({ui_state:as}),R({ui_state:as,updated_at:go});var os=z([`project`,`profile`]);R({id:_o,profile_id:bo,scope:os,project_id:yo.nullable(),name:N(),layout_tree:rs.nullable(),active_session:vo.nullable(),created_at:go,updated_at:go}),R({profile_id:bo,scope:os,project_id:yo.optional(),name:N().min(1).max(200),layout_tree:rs.nullable(),active_session:vo.nullable().optional()}),R({name:N().min(1).max(200).optional(),layout_tree:rs.nullable().optional(),active_session:vo.nullable().optional()}),Ho.extend({root:N().min(1),page:F().int().positive(),x:F().finite().nonnegative(),y:F().finite().nonnegative()});var ss=Ho.extend({line:F().int().positive(),column:F().int().nonnegative().optional()}),cs=z([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);R({mime:cs,data:N().min(1)});var ls=R({path:N()});R({path:N(),line:F().int().nullable(),kind:z([`file`,`dir`]).optional(),relative_path:N().optional(),root:N().optional()});var us=R({name:N(),type:z([`file`,`dir`,`symlink`]),size:F().int().nonnegative().nullable(),symlink:I().default(!1)});R({path:N(),entries:L(us)});var ds=R({path:N(),content:N().nullable(),binary:I(),size:F().int().nonnegative(),mtime_ms:F()}),fs=R({mime:N().min(1).max(128),data:N().max(4*2796203)});R({content:N(),expected_mtime_ms:F().optional()}),R({path:N(),mtime_ms:F(),size:F().int().nonnegative()}),R({files:L(R({path:N(),size:F().int().nonnegative()}))}),R({path:N().min(1),kind:z([`file`,`dir`])}),R({from:N().min(1),to:N().min(1)}),R({from:N().min(1),to:N().min(1)}),R({operation:z([`copy`,`move`]),source:R({session_id:vo,root:N().optional()}),from:N().min(1),to:N().min(1)}),R({path:N().min(1)}),R({ok:B(!0),path:N()});var ps=z([`added`,`modified`,`deleted`,`renamed`]),ms=z([`staged`,`unstaged`]),hs=R({path:N(),status:ps,old_path:N().nullable()}),gs=R({against:N(),base_ref:N().nullable(),entries:L(hs),area:ms.optional()}),_s=z([`untracked`,`modified`,`added`,`deleted`,`renamed`,`conflicted`,`ignored`]),vs=R({path:N(),status:_s});R({entries:L(vs)});var ys=R({path:N(),status:_s.exclude([`ignored`]),old_path:N().nullable()});R({repositories:L(R({root:N(),relative_path:N(),name:N(),owning:I(),submodule:I(),initialised:I(),head:N().nullable(),branch:N().nullable(),detached:I(),upstream:N().nullable(),ahead:F().int().nonnegative(),behind:F().int().nonnegative(),has_remote:I(),staged:L(ys),unstaged:L(ys),conflicts:L(ys)})),entries:L(vs)});var bs=R({repository:N().min(1)});bs.extend({paths:L(N().min(1)).min(1)}),bs.extend({message:N().trim().min(1),stage_all:I().optional()}),bs.extend({set_upstream:I().optional()}),R({ok:B(!0),sha:N().optional()}),R({path:N(),content:N().nullable(),binary:I(),exists:I()}),R({path:N(),repository:N().nullable(),repository_path:N().nullable(),head:N().nullable(),content:N().nullable(),binary:I(),exists:I(),tracked:I(),ignored:I()});var xs=R({path:N(),ref:N(),content:N().nullable(),binary:I()}),Ss=R({sha:N(),subject:N(),author_name:N(),author_email:N(),authored_at:go,parents:L(N()).optional()});R({commits:L(Ss),has_more:I()}),R({commit:Ss.extend({body:N()}),parents:L(N()),files:L(hs)});var Cs=R({line:F().int().positive(),text:N()}),ws=R({path:N(),matches:L(Cs)});R({query:N(),files:L(N()),content:L(ws),truncated:I()}),R({ports:L(R({port:F().int().min(1).max(65535),pid:F().int(),command:N(),address:N()})),scanned_at:go}),R({refreshId:N().uuid()}).strict();var Ts=R({status:B(`refreshing`),refreshId:N().uuid(),instance:N().uuid()}),Es=N().regex(/^(agent|shell-[0-9]+)$/),Ds=`home`,Os={cols:F().int().min(2).max(1e3),rows:F().int().min(2).max(500)},ks=La(`t`,[R({t:B(`auth`),token:N().max(128),resource:N().regex(/^[a-f0-9]{64}$/).optional()}),R({t:B(`attach`),session:N(),term:Es,...Os}),R({t:B(`stdin`),session:N(),term:Es,data:N()}),R({t:B(`resize`),session:N(),term:Es,...Os}),R({t:B(`detach`),session:N(),term:Es}),R({t:B(`spawn-shell`),session:N()}),R({t:B(`kill-shell`),session:N(),term:Es}),R({t:B(`subscribe-status`)}),R({t:B(`theme`),fg:N().regex(/^#[0-9a-fA-F]{6}$/),bg:N().regex(/^#[0-9a-fA-F]{6}$/)})]),As=La(`t`,[R({t:B(`authenticated`)}),R({t:B(`shell-spawned`),session:N(),term:N()}),R({t:B(`replay`),session:N(),term:N(),data:N()}),R({t:B(`output`),session:N(),term:N(),data:N()}),R({t:B(`status`),session:N(),status:Fo,last_activity_at:N().nullable()}),R({t:B(`renamed`),session:N(),title:N().nullable(),agent_title:N().nullable().optional(),osc_title:N().nullable().optional()}),R({t:B(`exit`),session:N(),term:N(),code:F()}),R({t:B(`notice`),level:z([`error`,`warning`]),title:N(),detail:N().optional(),session:N().optional(),term:N().optional()}),R({t:B(`account`),account_id:F(),profile_id:N(),logged_in:I()}),R({t:B(`session-switched`),source_session:N(),target_session:N(),target_project:N(),cause:z([`clear`,`resume`,`fork`]),outcome:z([`rebound`,`focused-existing`])}),R({t:B(`sessions-changed`),project_ids:L(N())}),R({t:B(`error`),message:N()})]),js={chunkBytes:32*1024,frameBytes:48*1024,requestBytes:256*1024,responseBytes:16*1024*1024,queueBytes:1024*1024,relayQueueBytes:64*1024*1024,requests:8,connectionsPerHost:8,connectionsPerAccount:16,connections:128,handshakeMs:1e4,invitationMs:3e5,idleMs:720*60*60*1e3,absoluteMs:2160*60*60*1e3},W=N().uuid(),Ms=N().regex(/^[a-f0-9]{64}$/),Ns=N().min(20).max(128),Ps=N().min(1).max(128),Fs=N().trim().min(1).max(80).regex(/^[^\u0000-\u001f\u007f]+$/),Is=N().url().refine(e=>{try{let t=new URL(e);return t.protocol===`https:`&&t.origin===e&&!t.username&&!t.password}catch{return!1}},`An exact HTTPS origin is required`),Ls=R({version:B(3),service:Is,host:W,peer:Ns,invitation:Ms,expires:F().int().positive()}).strict();R({t:B(`connect`),host:W}).strict(),La(`t`,[R({t:B(`registered`),host:W}).strict(),R({t:B(`open`),connection:W,account:Ps}).strict(),R({t:B(`ready`),connection:W,account:Ps}).strict()]);var Rs=R({id:W,peer:Ns,account:Ps,label:Fs,created:F(),lastUsed:F(),expires:F(),status:z([`pending`,`approved`,`revoked`])}),zs=La(`t`,[R({t:B(`status`)}).strict(),R({t:B(`pair`)}).strict(),R({t:B(`devices`)}).strict(),R({t:B(`approve`),id:W}).strict(),R({t:B(`revoke`),id:W}).strict(),R({t:B(`disable`)}).strict()]),Bs=R({enabled:I().optional(),connected:I().optional(),host:W.optional(),peer:Ns.optional(),invitation:Ls.optional(),url:N().url().optional(),devices:L(Rs).optional(),error:N().max(256).optional()}).strict();La(`t`,[R({t:B(`hello`),account:Ps,label:Fs,invitation:Ms.optional()}).strict(),R({t:B(`pending`),device:Rs}).strict(),R({t:B(`admitted`),generation:W,device:W}).strict(),R({t:B(`challenge`),nonce:Ms,generation:W}).strict(),R({t:B(`participate`),nonce:Ms,generation:W,resources:L(W).max(js.requests+1)}).strict(),R({t:B(`request`),id:W,method:z([`GET`,`POST`,`PATCH`]),path:N().max(8192),body:Oa().optional()}).strict(),R({t:B(`response`),id:W,status:F().int().min(100).max(599),body:Oa()}).strict(),R({t:B(`cancel`),id:W}).strict(),R({t:B(`stream`),id:W}).strict(),R({t:B(`terminal`),id:W,message:ks}).strict(),R({t:B(`event`),message:As}).strict(),R({t:B(`sent`),id:W}).strict(),R({t:B(`admin`),id:W,request:zs}).strict(),R({t:B(`admin-result`),id:W,result:Bs}).strict(),R({t:B(`error`),code:z([`rejected`,`expired`,`unavailable`,`protocol_mismatch`]),message:N().max(256)}).strict()]),R({id:W,index:F().int().min(0).max(8192),end:I(),data:N().max(js.chunkBytes)}).strict(),R({id:W,label:Fs,online:I()}),R({providers:L(z([`google`,`github`])),protocol:B(3)}),R({user:R({id:Ps,name:N(),email:N(),emailVerified:I(),twoFactorEnabled:I()}).nullable(),mfaRequired:I()}),R({label:Fs}).strict(),R({host:W,code:Ms,expires:F()}).strict(),R({code:Ms}).strict(),R({credential:Ms}).strict();var Vs=R({challenge:Ms,label:Fs,service:Is,app:Is,expires:F().int().positive()}).strict(),Hs=R({ready:I()}).strict();R({host:W,account:Ps,credential:Ms}).strict().extend({service:Is,app:Is,enabled:I()}).strict();var Us=R({service:Is.optional(),app:Is.optional(),code:Ms.optional(),managed:I().default(!0)}).strict(),Ws=L(F().int().min(0).max(255)).min(32).max(256);R({host:W,peer:Ns,account:Ps,service:Is,label:N(),privateKey:Ws}).strict();var Gs=Fa([zs,R({t:B(`delete_registration`)}).strict()]);Fa([Gs,R({t:B(`enable`),registration:R({service:Is,app:Is,code:Ms}).strict().optional()}).strict(),R({t:B(`reset`)}).strict()]),R({service:Is,code:Ms}).strict();var Ks=R({availability:z([`ready`,`not_installed`,`upgrade_required`]),configured:I(),enabled:I(),connected:I(),canDeleteRegistration:I().optional(),supervisor:z([`systemd`,`launchd`]).nullable(),host:W.optional(),peer:Ns.optional(),service:Is.optional(),app:Is.optional(),devices:L(Rs)});R({profile:bo}).strict(),R({profile:bo,request:Gs}).strict(),R({profile:bo,setup:Us}).strict();var qs=N().regex(/^[a-f0-9]{64}$/),Js=N().regex(/^cn_[a-f0-9]{64}$/),Ys=N().regex(/^br_[a-f0-9]{64}$/),Xs=N().regex(/^iv_[a-f0-9]{64}$/);z([`browser_rejected`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`]),La(`t`,[R({t:B(`open`),profile:bo.optional()}).strict(),R({t:B(`renew`),resources:L(qs).max(2048)}).strict(),R({t:B(`close`)}).strict()]);var Zs=R({t:B(`inspection`),port:F().int().min(1).max(65535),version:U,liveSessions:F().int().nonnegative()});La(`t`,[R({t:B(`authority`),generation:N().uuid(),token:Js.optional(),validForMs:F().int().positive().max(45e3),port:F().int().min(1).max(65535),version:U}).strict(),Zs,R({t:B(`error`),code:z([`unavailable`,`rejected`,`invalid_control`])}).strict()]),R({invitation:Xs}).strict();var Qs=R({credential:Ys});R({status:B(`revoked`)}),R({session:N().uuid(),port:F().int().min(1).max(65535)}).extend({path:N().max(8192).default(`/`)});var $s=R({url:N().url()});R({invitation:Xs}).strict(),R({t:B(`invite`),secret:N().max(128).optional()}).strict(),R({url:N().url()}).strict();var ec=R({instance:N().uuid(),refreshId:N().uuid().nullable(),upstream:z([`ready`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`])}),tc=R({id:N(),hash:N(),lastUsed:F()}),nc=R({hash:N(),browser:N(),prefix:N()});R({version:B(1),origin:N(),target:N(),browsers:L(tc),proxies:L(nc)});var rc={imageBytes:4*1024*1024,chunkBytes:64*1024,idleMs:6e4,lifetimeMs:5*6e4};La(`action`,[R({action:B(`start`),upload:N().uuid(),mime:cs,size:F().int().positive().max(rc.imageBytes)}).strict(),R({action:B(`chunk`),upload:N().uuid(),offset:F().int().nonnegative().max(rc.imageBytes),data:N().min(4).max(4*Math.ceil(rc.chunkBytes/3)).regex(/^[A-Za-z0-9+/]+={0,2}$/).refine(e=>{let t=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return e.length%4==0&&e.length/4*3-t<=rc.chunkBytes},`Image chunk is too large or malformed`)}).strict(),R({action:B(`finish`),upload:N().uuid()}).strict(),R({action:B(`cancel`),upload:N().uuid()}).strict()]);var ic=R({received:F().int().nonnegative().max(rc.imageBytes)}),ac=null;function oc(){return ac}function sc(e){return e}function cc(e){let t=new Set;return{get:()=>localStorage.getItem(sc(e)),set(n){n===null?localStorage.removeItem(sc(e)):localStorage.setItem(sc(e),n);for(let e of t)e()},subscribe(e){return t.add(e),()=>t.delete(e)}}}var lc=cc(`puddle.browser-authorisation`);async function uc(){localStorage.removeItem(`puddle.token`);let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`invite`);if(e.has(`invite`)||e.has(`token`)){let e=new URL(window.location.href);e.hash=``,history.replaceState(null,``,e)}if(t)try{let e=await fetch(`/cockpit/bootstrap`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({invitation:t})});if(!e.ok)return;lc.set(Qs.parse(await e.json()).credential)}catch{}}function dc(){lc.set(null)}var fc=e(n(),1),pc=[{id:`system`,label:`System`},{id:`rangefinder`,label:`Rangefinder`},{id:`drafting`,label:`Drafting`},{id:`invert`,label:`Invert`}],mc=`system`;function hc(e){return pc.some(t=>t.id===e)?e:mc}var gc={uiFontSize:16,cursorPackage:mc,terminalFontSize:13,editorFontSize:14,density:`compact`,terminalScrollback:2e4,editorTabSize:2,editorWordWrap:!1,editorLinkSshHost:``,projectBasedLayout:!0,showAllProjectSessions:!0},_c=`puddle.client-settings`,vc=new Set,yc=null;function bc(e){let t={...e};return t.projectBasedLayout===void 0&&t.showAllProjectSessions!==void 0&&(t.projectBasedLayout=!t.showAllProjectSessions),t.showAllProjectSessions===void 0&&t.projectBasedLayout!==void 0&&(t.showAllProjectSessions=!t.projectBasedLayout),t}function xc(e){return e.terminalScrollback===5e3?{...e,terminalScrollback:gc.terminalScrollback}:e}function Sc(){if(yc)return yc;let e={};try{e=JSON.parse(localStorage.getItem(_c)??`{}`)}catch{}let t={...gc,...xc(bc(e))};return yc={...t,cursorPackage:hc(t.cursorPackage)},yc}function Cc(e){document.documentElement.style.setProperty(`--ui-font-size`,`${e.uiFontSize}px`),document.documentElement.dataset.density=e.density,document.documentElement.dataset.cursorPackage=e.cursorPackage}function wc(){return Sc()}function Tc(e){let t={...Sc(),...e};yc={...t,cursorPackage:hc(t.cursorPackage)},localStorage.setItem(_c,JSON.stringify(yc)),Cc(yc);for(let e of vc)e()}function Ec(){Cc(Sc())}function Dc(){return(0,fc.useSyncExternalStore)(e=>(vc.add(e),()=>vc.delete(e)),()=>Sc())}function Oc(e){return e.split(`/`).map(encodeURIComponent).join(`/`)}function kc(e){return e.replace(/[%#? ]/g,e=>encodeURIComponent(e))}function Ac(e,t,n){let r=Oc(t);return n?`${e}://vscode-remote/ssh-remote+${kc(n)}${r}`:`${e}://file${r}`}function jc(e,t){return e.trim()||t||null}var Mc=cc(`puddle.host`);function Nc(){return jc(wc().editorLinkSshHost,Mc.get())}function Pc(e){return new URLSearchParams(e).get(`host`)?.trim()||null}function Fc(e,t,n){return Pc(e)||(/[#&](?:invite|token)=/.test(t)?null:n)}function Ic(){let e=Fc(window.location.search,window.location.hash,Mc.get());if(Mc.set(e),Pc(window.location.search)!==null){let e=new URL(window.location.href);e.searchParams.delete(`host`),history.replaceState(null,``,e)}}var G=[`dark`,`light`],Lc=`puddle.theme`,Rc=`system`,zc=`dark`,Bc=new Set;function Vc(){return window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function Hc(e){return e===`system`?Vc():e}function Uc(){let e=localStorage.getItem(Lc);return e===`system`||G.includes(e??``)?e:Rc}function Wc(){let e=document.documentElement.dataset.theme;return G.includes(e??``)?e:zc}function Gc(e){localStorage.setItem(Lc,e);let t=Hc(e);document.documentElement.dataset.theme=t;for(let e of Bc)e(t);return t}function Kc(){Gc(Uc()),window.matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{Uc()===`system`&&Gc(`system`)})}function qc(e){return Bc.add(e),()=>Bc.delete(e)}function Jc(e){let t=/^#([0-9a-fA-F]{3,4})$/.exec(e);return t?.[1]?`#${[...t[1]].map(e=>e+e).join(``)}`:e}function Yc(){let e=getComputedStyle(document.documentElement);return t=>Jc(e.getPropertyValue(t).trim())}var Xc=4.5;function Zc(e){return{background:e(`--bg-base`),foreground:e(`--text-primary`),cursor:e(`--accent`),cursorAccent:e(`--bg-base`),selectionBackground:e(`--selection`),black:e(`--ansi-black`),red:e(`--ansi-red`),green:e(`--ansi-green`),yellow:e(`--ansi-yellow`),blue:e(`--ansi-blue`),magenta:e(`--ansi-magenta`),cyan:e(`--ansi-cyan`),white:e(`--ansi-white`),brightBlack:e(`--ansi-bright-black`),brightRed:e(`--ansi-bright-red`),brightGreen:e(`--ansi-bright-green`),brightYellow:e(`--ansi-bright-yellow`),brightBlue:e(`--ansi-bright-blue`),brightMagenta:e(`--ansi-bright-magenta`),brightCyan:e(`--ansi-bright-cyan`),brightWhite:e(`--ansi-bright-white`)}}function Qc(){return Zc(Yc())}function $c(e){return{theme:Zc(e),minimumContrastRatio:Xc}}function el(){return $c(Yc())}function tl(e){return e.replace(`#`,``)}function nl(e,t){return{base:t===`light`?`vs`:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:tl(e(`--text-muted`)),fontStyle:`italic`},{token:`string`,foreground:tl(e(`--ansi-green`))},{token:`number`,foreground:tl(e(`--ansi-yellow`))},{token:`keyword`,foreground:tl(e(`--ansi-blue`))},{token:`type`,foreground:tl(e(`--ansi-cyan`))},{token:`function`,foreground:tl(e(`--ansi-magenta`))}],colors:{"editor.background":e(`--bg-base`),"editor.foreground":e(`--text-primary`),"editor.selectionBackground":e(`--selection`),"editor.lineHighlightBackground":e(`--bg-surface`),"editorCursor.foreground":e(`--accent`),"editorLineNumber.foreground":e(`--text-muted`),"editorLineNumber.activeForeground":e(`--text-secondary`),"editorWidget.background":e(`--bg-elevated`),"editorWidget.border":e(`--border`),focusBorder:e(`--focus-ring`),"diffEditor.insertedTextBackground":e(`--diff-added`),"diffEditor.removedTextBackground":e(`--diff-removed`)}}}function rl(){return nl(Yc(),Wc())}var il=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),al=t(((e,t)=>{t.exports=il()})),ol=al(),sl=`modulepreload`,cl=function(e){return`/`+e},ll={},ul=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=cl(t,n),t=s(t),t in ll)return;ll[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:sl,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};Kc(),Ec(),Ic(),uc().then(async()=>{let{App:e}=await ul(async()=>{let{App:e}=await import(`./App-BG0mdlS1.js`);return{App:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));(0,mo.createRoot)(document.getElementById(`root`)).render((0,ol.jsx)(e,{}))});export{U as $,js as A,ss as B,rc as C,Ks as D,$s as E,xs as F,Jo as G,ts as H,ds as I,wo as J,Co as K,fs as L,Ds as M,Ts as N,Vs as O,gs as P,Do as Q,cs as R,oc as S,ec as T,as as U,$o as V,qo as W,Oo as X,Eo as Y,ko as Z,pc as _,Wc as a,cc as b,Uc as c,Ac as d,ho as et,Nc as f,Dc as g,Tc as h,Yc as i,Bs as j,Hs as k,Qc as l,wc as m,al as n,N as nt,rl as o,Mc as p,To as q,Gc as r,o as rt,qc as s,ul as t,L as tt,el as u,dc as v,ic as w,sc as x,lc as y,ls as z};
82
+ Then proceed with the task below (or await instructions if none is given).`,To=`[puddle] You are joining an existing branch and worktree that other agents may be working in concurrently. Files can change underneath you, so re-check the working tree before you act, and avoid disruptive git operations (resetting, force-pushing, or deleting the branch) that would disrupt work already in progress by others.`,Eo=`This session was interrupted (daemon or machine restart). Processes you started are gone; re-verify your environment before continuing.`,Do=[[`name`,`the resolved display name: user rename, else agent name, else sequence, else id`],[`title`,`the user rename override only (empty when unset)`],[`agentName`,`the agent's own session name (empty when the agent has not named it)`],[`sequence`,`the terminal-title name the process set (empty when it set none)`],[`branch`,`the git branch`],[`cwd`,`the worktree directory's name`],[`id`,`the first 8 characters of the session id`],[`status`,`the session status (running, waiting_input, …)`],[`agent`,`the agent type (empty for terminal sessions)`],[`separator`,`an em dash that appears only between two non-empty neighbours`]],Oo="${name}",ko=[`navy`,`gold`,`blue`,`green`,`red`,`violet`,`cyan`];R({id:bo,name:So,branch_prefix:N(),icon:N().nullable().default(null),icon_colour:N().nullable().default(null),created_at:go}),R({name:So,branch_prefix:N().max(64).optional()}),R({name:So.optional(),branch_prefix:N().max(64).optional(),icon:N().max(64).nullable().optional(),icon_colour:N().max(32).nullable().optional()});var Ao=Na({baseBranch:N().optional(),separateBranch:I().optional(),separateWorktree:I().optional()}),jo=Na({agent:Ao.optional(),terminal:Ao.optional()});Na({allowSkipPermissions:I().default(!1),captureSessionEnv:I().default(!0),terminalAppShortcuts:I().default(!0),onboardingTemplate:N().optional(),concurrentTemplate:N().optional(),restartTemplate:N().optional(),tabTitleTemplate:N().optional(),projectOrder:L(N()).optional(),sessionDefaults:jo.optional(),hotkeys:Va(N(),N()).optional()}),Va(N(),Oa());var Mo=N().regex(/^untitled-\d+\.md$/);R({name:Mo}),R({name:Mo,content:N(),mtime_ms:F()}),R({content:N()}),R({mtime_ms:F()}),R({id:_o,profile_id:bo,agent_type:N(),label:N(),config_dir:N(),skip_permissions_default:I(),logged_in:I(),created_at:go}),R({profile_id:bo,agent_type:N().min(1),label:So,skip_permissions_default:I().optional(),import_dir:N().min(1).optional()}),R({label:So.optional(),skip_permissions_default:I().optional()}),R({stream:N(),term:N(),hint:N().optional()}),Na({account_id:_o,logged_in:I(),session_count:F().int().nonnegative(),active_session_count:F().int().nonnegative(),last_activity_at:go.nullable(),agent_usage:R({input_tokens:F().int().nonnegative(),output_tokens:F().int().nonnegative(),cache_read_input_tokens:F().int().nonnegative(),cache_creation_input_tokens:F().int().nonnegative(),message_count:F().int().nonnegative()}).nullable(),live_usage:R({captured_at:go,context_used_percentage:F().nullable(),total_cost_usd:F().nullable(),model:N().nullable()}).nullable(),subscription:R({windows:L(R({key:N(),label:N(),used_percentage:F(),resets:N().nullable()}))}).nullable()}),R({id:N(),display_name:N(),capabilities:R({resume:I(),skip_permissions:I()}),binary:N().optional(),available:I().optional()}),R({id:_o,path:N(),default_base_branch:N(),onboarding_notes:N().nullable(),fetch_enabled:I(),last_fetched_at:go.nullable()}).extend({orphan_worktrees:L(N())}),R({path:N().min(1),default_base_branch:N().optional(),onboarding_notes:N().nullable().optional(),fetch_enabled:I().optional()}),R({branches:L(R({name:N(),is_session:I(),session_title:N().nullable()}))});var No=R({path:N(),branch:N().nullable(),is_primary:I(),dirty:I().optional(),local_only:I().optional()}),Po=R({name:N(),local_only:I()});R({worktrees:L(No),orphan_branches:L(Po)}),R({default_base_branch:N().optional(),onboarding_notes:N().nullable().optional(),fetch_enabled:I().optional()});var Fo=z([`starting`,`running`,`waiting_input`,`exited`,`interrupted`,`archived`]),Io=z([`agent`,`terminal`]),Lo=R({id:vo,project_id:yo,account_id:_o.nullable(),worktree_path:N(),base_branch:N(),branch:N(),separate_branch:I(),kind:Io,agent_type:N().nullable(),agent_session_ref:N().nullable(),conversation_id:_o.nullable().optional(),parent_conversation_id:_o.nullable().optional(),title:N().nullable(),agent_title:N().nullable().optional(),conversation_missing:I().optional(),branch_owner:I().optional(),native_sync:z([`pending`,`full`,`fallback`]).optional(),osc_title:N().nullable().optional(),status:Fo,cwd:N().nullable().optional(),skip_permissions:I(),created_at:go,updated_at:go,last_activity_at:go.nullable(),worktree_missing:I().optional(),stale_running:I().optional(),git_summary:R({ahead:F().int().nonnegative(),behind:F().int().nonnegative(),dirty_files:F().int().nonnegative()}).nullable().optional()});R({project_id:yo,account_id:_o.optional(),kind:Io.optional(),base_branch:N().min(1).optional(),branch:N().min(1).max(200).optional(),separate_branch:I().optional(),separate_worktree:I().optional(),join_worktree:N().optional(),cwd:N().optional(),title:N().min(1).max(200).optional(),prompt:N().optional(),skip_permissions:I().optional()}),R({title:N().max(200)}),R({account_id:_o}),R({account_id:_o}),R({vars:L(R({name:N(),bytes:F().int().nonnegative(),value:N().optional()}))}),R({cleared:F().int().nonnegative()}),R({force:I().default(!1),delete_branch:I().default(!1)});var Ro=N().min(1).max(5),zo=R({id:yo,profile_id:bo,repo_id:_o,name:N(),abbrev:Ro.nullable().default(null),archived:I().default(!1),created_at:go,updated_at:go});R({profile_id:bo,repo_id:_o,name:N().min(1).max(100),abbrev:Ro.optional()}),R({name:N().min(1).max(100).optional(),abbrev:Ro.optional(),archived:I().optional()}),R({project:zo,sessions:L(Lo)});var Bo=z([`project`,`profile`]);R({id:_o,profile_id:bo,scope:Bo,project_id:yo.nullable(),title:N().nullable(),body:N(),tags:L(N()),agent_type:N().nullable(),position:F(),created_at:go,updated_at:go}),R({profile_id:bo,scope:Bo,project_id:yo.optional(),title:N().max(200).optional(),body:N().min(1),tags:L(N()).optional(),agent_type:N().optional()}),R({scope:Bo.optional(),project_id:yo.nullable().optional(),title:N().max(200).nullable().optional(),body:N().min(1).optional(),tags:L(N()).optional(),agent_type:N().nullable().optional(),position:F().optional()});var Vo=z([`on_demand`,`eager`]),Ho=R({session:vo,path:N().min(1),root:N().min(1).optional()}),Uo=N().regex(/^[a-z][a-z0-9_-]*$/);R({providers:L(R({id:Uo,display_name:N().min(1),extensions:L(N().regex(/^[a-z0-9]+$/)).min(1),input_extensions:L(N().regex(/^[a-z0-9]+$/)).min(1),available:I(),executor:N().min(1).nullable(),eager:I()}))});var Wo=R({source:Ho,provider:Uo.optional(),profile_id:bo.optional(),project_id:yo.optional()}),Go=R({role:N().min(1),media_type:N().min(1),file:Ho}),Ko=R({source:Ho,severity:z([`error`,`warning`,`info`]),message:N().min(1),line:F().int().positive(),column:F().int().positive().optional(),end_line:F().int().positive().optional(),end_column:F().int().positive().optional()}),qo=R({source:Ho.optional(),output:N().optional(),diagnostics:L(Ko).optional()}),Jo=qo.extend({message:N().min(1)}),Yo=R({provider:Uo,executor:N().min(1),revision:F().int().nonnegative(),source:Ho,artifacts:L(Go),navigation:R({kind:N().min(1)}).optional()});Wo.extend({mode:Vo}),R({provider:Uo,mode:Vo,state:z([`idle`,`running`,`succeeded`,`failed`]),revision:F().int().nonnegative(),result:Yo.nullable(),error:Jo.nullable()});var Xo=R({placeholder:N().regex(/^\{\{[a-z][a-z0-9_]*\}\}$/),description:N().min(1)}),Zo=R({mode:Vo,run_when:z([`when_clicked`,`upon_file_change`]),default_command:N().min(1).nullable(),override_command:N().min(1).nullable()}),Qo=Wo.extend({profile_id:bo,project_id:yo});R({provider:Uo,display_name:N().min(1),file_type:N().regex(/^[a-z0-9][a-z0-9_-]*$/),file_path:N().min(1),variables:L(Xo),commands:L(Zo).min(1)}),Qo.extend({mode:Vo,command:N().trim().min(1).max(16384).nullable()});var $o=`00000000-0000-0000-0000-000000000000`,es=R({session:vo,path:N(),kind:z([`file`,`diff`,`commit`,`external`,`untitled`]).optional(),sha:N().optional(),git_area:z([`staged`,`unstaged`]).optional(),root:N().optional(),view:z([`source`,`preview`,`linked`,`locked`]).optional(),compile_mode:Vo.optional(),generated_by:Uo.optional()}),ts=La(`type`,[R({type:B(`editor`),tab:es}),R({type:B(`terminal`),session:vo})]),ns=R({kind:B(`leaf`),id:N(),tabs:L(ts).default([]),activeKey:N().nullable().default(null),previewKey:N().nullable().default(null)}),rs=fo(()=>La(`kind`,[ns,R({kind:B(`split`),id:N(),direction:z([`row`,`col`]),children:L(rs),sizes:L(F())})])),is=Na({layout_tree:rs.nullable().default(null),active_session:vo.nullable().default(null),layout_ref:_o.nullable().default(null)}),as=Na({session_tabs:L(vo).default([]),active_session:vo.nullable().default(null),editor_tabs:L(es).default([]),layout:Na({}).default({}),explorer_pin:vo.nullable().default(null),active_editor_tab:es.nullable().default(null),explorer_open:I().default(!0),sidebar_mode:z([`files`,`diff`,`history`,`changes`,`search`,`worktrees`]).default(`files`),sidebar_collapsed:I().default(!1),sessions_collapsed:I().default(!1),right_panel:z([`sessions`,`scratchpad`]).optional(),session_order:L(vo).default([]),layout_tree:rs.nullable().default(null),layout_mode:z([`profile`,`project`]).optional(),project_layouts:Va(N(),is).default({}),layout_ref:_o.nullable().default(null)});R({ui_state:as}),R({ui_state:as,updated_at:go});var os=z([`project`,`profile`]);R({id:_o,profile_id:bo,scope:os,project_id:yo.nullable(),name:N(),layout_tree:rs.nullable(),active_session:vo.nullable(),created_at:go,updated_at:go}),R({profile_id:bo,scope:os,project_id:yo.optional(),name:N().min(1).max(200),layout_tree:rs.nullable(),active_session:vo.nullable().optional()}),R({name:N().min(1).max(200).optional(),layout_tree:rs.nullable().optional(),active_session:vo.nullable().optional()}),Ho.extend({root:N().min(1),page:F().int().positive(),x:F().finite().nonnegative(),y:F().finite().nonnegative()});var ss=Ho.extend({line:F().int().positive(),column:F().int().nonnegative().optional()}),cs=z([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);R({mime:cs,data:N().min(1)});var ls=R({path:N()});R({path:N(),line:F().int().nullable(),kind:z([`file`,`dir`]).optional(),relative_path:N().optional(),root:N().optional()});var us=R({name:N(),type:z([`file`,`dir`,`symlink`]),size:F().int().nonnegative().nullable(),symlink:I().default(!1)});R({path:N(),entries:L(us)});var ds=R({path:N(),content:N().nullable(),binary:I(),size:F().int().nonnegative(),mtime_ms:F()}),fs=R({mime:N().min(1).max(128),data:N().max(4*2796203)});R({content:N(),expected_mtime_ms:F().optional()}),R({path:N(),mtime_ms:F(),size:F().int().nonnegative()}),R({files:L(R({path:N(),size:F().int().nonnegative()}))}),R({path:N().min(1),kind:z([`file`,`dir`])}),R({from:N().min(1),to:N().min(1)}),R({from:N().min(1),to:N().min(1)}),R({operation:z([`copy`,`move`]),source:R({session_id:vo,root:N().optional()}),from:N().min(1),to:N().min(1)}),R({path:N().min(1)}),R({ok:B(!0),path:N()});var ps=z([`added`,`modified`,`deleted`,`renamed`]),ms=z([`staged`,`unstaged`]),hs=R({path:N(),status:ps,old_path:N().nullable()}),gs=R({against:N(),base_ref:N().nullable(),entries:L(hs),area:ms.optional()}),_s=z([`untracked`,`modified`,`added`,`deleted`,`renamed`,`conflicted`,`ignored`]),vs=R({path:N(),status:_s});R({entries:L(vs)});var ys=R({path:N(),status:_s.exclude([`ignored`]),old_path:N().nullable()});R({repositories:L(R({root:N(),relative_path:N(),name:N(),owning:I(),submodule:I(),initialised:I(),head:N().nullable(),branch:N().nullable(),detached:I(),upstream:N().nullable(),ahead:F().int().nonnegative(),behind:F().int().nonnegative(),has_remote:I(),staged:L(ys),unstaged:L(ys),conflicts:L(ys)})),entries:L(vs)});var bs=R({repository:N().min(1)});bs.extend({paths:L(N().min(1)).min(1)}),bs.extend({message:N().trim().min(1),stage_all:I().optional()}),bs.extend({set_upstream:I().optional()}),R({ok:B(!0),sha:N().optional()}),R({path:N(),content:N().nullable(),binary:I(),exists:I()}),R({path:N(),repository:N().nullable(),repository_path:N().nullable(),head:N().nullable(),content:N().nullable(),binary:I(),exists:I(),tracked:I(),ignored:I()});var xs=R({path:N(),ref:N(),content:N().nullable(),binary:I()}),Ss=R({sha:N(),subject:N(),author_name:N(),author_email:N(),authored_at:go,parents:L(N()).optional()});R({commits:L(Ss),has_more:I()}),R({commit:Ss.extend({body:N()}),parents:L(N()),files:L(hs)});var Cs=R({line:F().int().positive(),text:N()}),ws=R({path:N(),matches:L(Cs)});R({query:N(),files:L(N()),content:L(ws),truncated:I()}),R({ports:L(R({port:F().int().min(1).max(65535),pid:F().int(),command:N(),address:N()})),scanned_at:go}),R({refreshId:N().uuid()}).strict();var Ts=R({status:B(`refreshing`),refreshId:N().uuid(),instance:N().uuid()}),Es=N().regex(/^(agent|shell-[0-9]+)$/),Ds=`home`,Os={cols:F().int().min(2).max(1e3),rows:F().int().min(2).max(500)},ks=La(`t`,[R({t:B(`auth`),token:N().max(128),resource:N().regex(/^[a-f0-9]{64}$/).optional()}),R({t:B(`attach`),session:N(),term:Es,...Os}),R({t:B(`stdin`),session:N(),term:Es,data:N()}),R({t:B(`resize`),session:N(),term:Es,...Os}),R({t:B(`detach`),session:N(),term:Es}),R({t:B(`spawn-shell`),session:N()}),R({t:B(`kill-shell`),session:N(),term:Es}),R({t:B(`subscribe-status`)}),R({t:B(`theme`),fg:N().regex(/^#[0-9a-fA-F]{6}$/),bg:N().regex(/^#[0-9a-fA-F]{6}$/)})]),As=La(`t`,[R({t:B(`authenticated`)}),R({t:B(`shell-spawned`),session:N(),term:N()}),R({t:B(`replay`),session:N(),term:N(),data:N()}),R({t:B(`output`),session:N(),term:N(),data:N()}),R({t:B(`status`),session:N(),status:Fo,last_activity_at:N().nullable()}),R({t:B(`renamed`),session:N(),title:N().nullable(),agent_title:N().nullable().optional(),osc_title:N().nullable().optional()}),R({t:B(`exit`),session:N(),term:N(),code:F()}),R({t:B(`notice`),level:z([`error`,`warning`]),title:N(),detail:N().optional(),session:N().optional(),term:N().optional()}),R({t:B(`account`),account_id:F(),profile_id:N(),logged_in:I()}),R({t:B(`session-switched`),source_session:N(),target_session:N(),target_project:N(),cause:z([`clear`,`resume`,`fork`]),outcome:z([`rebound`,`focused-existing`])}),R({t:B(`sessions-changed`),project_ids:L(N())}),R({t:B(`error`),message:N()})]),js={chunkBytes:32*1024,frameBytes:48*1024,requestBytes:256*1024,responseBytes:16*1024*1024,queueBytes:1024*1024,relayQueueBytes:64*1024*1024,requests:8,connectionsPerHost:8,connectionsPerAccount:16,connections:128,handshakeMs:1e4,invitationMs:3e5,idleMs:720*60*60*1e3,absoluteMs:2160*60*60*1e3},W=N().uuid(),Ms=N().regex(/^[a-f0-9]{64}$/),Ns=N().min(20).max(128),Ps=N().min(1).max(128),Fs=N().trim().min(1).max(80).regex(/^[^\u0000-\u001f\u007f]+$/),Is=N().url().refine(e=>{try{let t=new URL(e);return t.protocol===`https:`&&t.origin===e&&!t.username&&!t.password}catch{return!1}},`An exact HTTPS origin is required`),Ls=R({version:B(3),service:Is,host:W,peer:Ns,invitation:Ms,expires:F().int().positive()}).strict();R({t:B(`connect`),host:W}).strict(),La(`t`,[R({t:B(`registered`),host:W}).strict(),R({t:B(`open`),connection:W,account:Ps}).strict(),R({t:B(`ready`),connection:W,account:Ps}).strict()]);var Rs=R({id:W,peer:Ns,account:Ps,label:Fs,created:F(),lastUsed:F(),expires:F(),status:z([`pending`,`approved`,`revoked`])}),zs=La(`t`,[R({t:B(`status`)}).strict(),R({t:B(`pair`)}).strict(),R({t:B(`devices`)}).strict(),R({t:B(`approve`),id:W}).strict(),R({t:B(`revoke`),id:W}).strict(),R({t:B(`disable`)}).strict()]),Bs=R({enabled:I().optional(),connected:I().optional(),host:W.optional(),peer:Ns.optional(),invitation:Ls.optional(),url:N().url().optional(),devices:L(Rs).optional(),error:N().max(256).optional()}).strict();La(`t`,[R({t:B(`hello`),account:Ps,label:Fs,invitation:Ms.optional()}).strict(),R({t:B(`pending`),device:Rs}).strict(),R({t:B(`admitted`),generation:W,device:W}).strict(),R({t:B(`challenge`),nonce:Ms,generation:W}).strict(),R({t:B(`participate`),nonce:Ms,generation:W,resources:L(W).max(js.requests+1)}).strict(),R({t:B(`request`),id:W,method:z([`GET`,`POST`,`PATCH`]),path:N().max(8192),body:Oa().optional()}).strict(),R({t:B(`response`),id:W,status:F().int().min(100).max(599),body:Oa()}).strict(),R({t:B(`cancel`),id:W}).strict(),R({t:B(`stream`),id:W}).strict(),R({t:B(`terminal`),id:W,message:ks}).strict(),R({t:B(`event`),message:As}).strict(),R({t:B(`sent`),id:W}).strict(),R({t:B(`admin`),id:W,request:zs}).strict(),R({t:B(`admin-result`),id:W,result:Bs}).strict(),R({t:B(`error`),code:z([`rejected`,`expired`,`unavailable`,`protocol_mismatch`]),message:N().max(256)}).strict()]),R({id:W,index:F().int().min(0).max(8192),end:I(),data:N().max(js.chunkBytes)}).strict(),R({id:W,label:Fs,online:I()}),R({providers:L(z([`google`,`github`])),protocol:B(3)}),R({user:R({id:Ps,name:N(),email:N(),emailVerified:I(),twoFactorEnabled:I()}).nullable(),mfaRequired:I()}),R({label:Fs}).strict(),R({host:W,code:Ms,expires:F()}).strict(),R({code:Ms}).strict(),R({credential:Ms}).strict();var Vs=R({challenge:Ms,label:Fs,service:Is,app:Is,expires:F().int().positive()}).strict(),Hs=R({ready:I()}).strict();R({host:W,account:Ps,credential:Ms}).strict().extend({service:Is,app:Is,enabled:I()}).strict();var Us=R({service:Is.optional(),app:Is.optional(),code:Ms.optional(),managed:I().default(!0)}).strict(),Ws=L(F().int().min(0).max(255)).min(32).max(256);R({host:W,peer:Ns,account:Ps,service:Is,label:N(),privateKey:Ws}).strict();var Gs=Fa([zs,R({t:B(`delete_registration`)}).strict()]);Fa([Gs,R({t:B(`enable`),registration:R({service:Is,app:Is,code:Ms}).strict().optional()}).strict(),R({t:B(`reset`)}).strict()]),R({service:Is,code:Ms}).strict();var Ks=R({availability:z([`ready`,`not_installed`,`upgrade_required`]),configured:I(),enabled:I(),connected:I(),canDeleteRegistration:I().optional(),supervisor:z([`systemd`,`launchd`]).nullable(),host:W.optional(),peer:Ns.optional(),service:Is.optional(),app:Is.optional(),devices:L(Rs)});R({profile:bo}).strict(),R({profile:bo,request:Gs}).strict(),R({profile:bo,setup:Us}).strict();var qs=N().regex(/^[a-f0-9]{64}$/),Js=N().regex(/^cn_[a-f0-9]{64}$/),Ys=N().regex(/^br_[a-f0-9]{64}$/),Xs=N().regex(/^iv_[a-f0-9]{64}$/);z([`browser_rejected`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`]),La(`t`,[R({t:B(`open`),profile:bo.optional()}).strict(),R({t:B(`renew`),resources:L(qs).max(2048)}).strict(),R({t:B(`close`)}).strict()]);var Zs=R({t:B(`inspection`),port:F().int().min(1).max(65535),version:U,liveSessions:F().int().nonnegative()});La(`t`,[R({t:B(`authority`),generation:N().uuid(),token:Js.optional(),validForMs:F().int().positive().max(45e3),port:F().int().min(1).max(65535),version:U}).strict(),Zs,R({t:B(`error`),code:z([`unavailable`,`rejected`,`invalid_control`])}).strict()]),R({invitation:Xs}).strict();var Qs=R({credential:Ys});R({status:B(`revoked`)}),R({session:N().uuid(),port:F().int().min(1).max(65535)}).extend({path:N().max(8192).default(`/`)});var $s=R({url:N().url()});R({invitation:Xs}).strict(),R({t:B(`invite`),secret:N().max(128).optional()}).strict(),R({url:N().url()}).strict();var ec=R({instance:N().uuid(),refreshId:N().uuid().nullable(),upstream:z([`ready`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`])}),tc=R({id:N(),hash:N(),lastUsed:F()}),nc=R({hash:N(),browser:N(),prefix:N()});R({version:B(1),origin:N(),target:N(),browsers:L(tc),proxies:L(nc)});var rc={imageBytes:4*1024*1024,chunkBytes:64*1024,idleMs:6e4,lifetimeMs:5*6e4};La(`action`,[R({action:B(`start`),upload:N().uuid(),mime:cs,size:F().int().positive().max(rc.imageBytes)}).strict(),R({action:B(`chunk`),upload:N().uuid(),offset:F().int().nonnegative().max(rc.imageBytes),data:N().min(4).max(4*Math.ceil(rc.chunkBytes/3)).regex(/^[A-Za-z0-9+/]+={0,2}$/).refine(e=>{let t=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return e.length%4==0&&e.length/4*3-t<=rc.chunkBytes},`Image chunk is too large or malformed`)}).strict(),R({action:B(`finish`),upload:N().uuid()}).strict(),R({action:B(`cancel`),upload:N().uuid()}).strict()]);var ic=R({received:F().int().nonnegative().max(rc.imageBytes)}),ac=null;function oc(){return ac}function sc(e){return e}function cc(e){let t=new Set;return{get:()=>localStorage.getItem(sc(e)),set(n){n===null?localStorage.removeItem(sc(e)):localStorage.setItem(sc(e),n);for(let e of t)e()},subscribe(e){return t.add(e),()=>t.delete(e)}}}var lc=cc(`puddle.browser-authorisation`);async function uc(){localStorage.removeItem(`puddle.token`);let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`invite`);if(e.has(`invite`)||e.has(`token`)){let e=new URL(window.location.href);e.hash=``,history.replaceState(null,``,e)}if(t)try{let e=await fetch(`/cockpit/bootstrap`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({invitation:t})});if(!e.ok)return;lc.set(Qs.parse(await e.json()).credential)}catch{}}function dc(){lc.set(null)}var fc=e(n(),1),pc=[{id:`system`,label:`System`},{id:`rangefinder`,label:`Rangefinder`},{id:`drafting`,label:`Drafting`},{id:`invert`,label:`Invert`}],mc=`system`;function hc(e){return pc.some(t=>t.id===e)?e:mc}var gc={uiFontSize:16,cursorPackage:mc,terminalFontSize:13,editorFontSize:14,density:`compact`,terminalScrollback:2e4,editorTabSize:2,editorWordWrap:!1,editorLinkSshHost:``,projectBasedLayout:!0,showAllProjectSessions:!0},_c=`puddle.client-settings`,vc=new Set,yc=null;function bc(e){let t={...e};return t.projectBasedLayout===void 0&&t.showAllProjectSessions!==void 0&&(t.projectBasedLayout=!t.showAllProjectSessions),t.showAllProjectSessions===void 0&&t.projectBasedLayout!==void 0&&(t.showAllProjectSessions=!t.projectBasedLayout),t}function xc(e){return e.terminalScrollback===5e3?{...e,terminalScrollback:gc.terminalScrollback}:e}function Sc(){if(yc)return yc;let e={};try{e=JSON.parse(localStorage.getItem(_c)??`{}`)}catch{}let t={...gc,...xc(bc(e))};return yc={...t,cursorPackage:hc(t.cursorPackage)},yc}function Cc(e){document.documentElement.style.setProperty(`--ui-font-size`,`${e.uiFontSize}px`),document.documentElement.dataset.density=e.density,document.documentElement.dataset.cursorPackage=e.cursorPackage}function wc(){return Sc()}function Tc(e){let t={...Sc(),...e};yc={...t,cursorPackage:hc(t.cursorPackage)},localStorage.setItem(_c,JSON.stringify(yc)),Cc(yc);for(let e of vc)e()}function Ec(){Cc(Sc())}function Dc(){return(0,fc.useSyncExternalStore)(e=>(vc.add(e),()=>vc.delete(e)),()=>Sc())}function Oc(e){return e.split(`/`).map(encodeURIComponent).join(`/`)}function kc(e){return e.replace(/[%#? ]/g,e=>encodeURIComponent(e))}function Ac(e,t,n){let r=Oc(t);return n?`${e}://vscode-remote/ssh-remote+${kc(n)}${r}`:`${e}://file${r}`}function jc(e,t){return e.trim()||t||null}var Mc=cc(`puddle.host`);function Nc(){return jc(wc().editorLinkSshHost,Mc.get())}function Pc(e){return new URLSearchParams(e).get(`host`)?.trim()||null}function Fc(e,t,n){return Pc(e)||(/[#&](?:invite|token)=/.test(t)?null:n)}function Ic(){let e=Fc(window.location.search,window.location.hash,Mc.get());if(Mc.set(e),Pc(window.location.search)!==null){let e=new URL(window.location.href);e.searchParams.delete(`host`),history.replaceState(null,``,e)}}var G=[`dark`,`light`],Lc=`puddle.theme`,Rc=`system`,zc=`dark`,Bc=new Set;function Vc(){return window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function Hc(e){return e===`system`?Vc():e}function Uc(){let e=localStorage.getItem(Lc);return e===`system`||G.includes(e??``)?e:Rc}function Wc(){let e=document.documentElement.dataset.theme;return G.includes(e??``)?e:zc}function Gc(e){localStorage.setItem(Lc,e);let t=Hc(e);document.documentElement.dataset.theme=t;for(let e of Bc)e(t);return t}function Kc(){Gc(Uc()),window.matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{Uc()===`system`&&Gc(`system`)})}function qc(e){return Bc.add(e),()=>Bc.delete(e)}function Jc(e){let t=/^#([0-9a-fA-F]{3,4})$/.exec(e);return t?.[1]?`#${[...t[1]].map(e=>e+e).join(``)}`:e}function Yc(){let e=getComputedStyle(document.documentElement);return t=>Jc(e.getPropertyValue(t).trim())}var Xc=4.5;function Zc(e){return{background:e(`--bg-base`),foreground:e(`--text-primary`),cursor:e(`--accent`),cursorAccent:e(`--bg-base`),selectionBackground:e(`--selection`),black:e(`--ansi-black`),red:e(`--ansi-red`),green:e(`--ansi-green`),yellow:e(`--ansi-yellow`),blue:e(`--ansi-blue`),magenta:e(`--ansi-magenta`),cyan:e(`--ansi-cyan`),white:e(`--ansi-white`),brightBlack:e(`--ansi-bright-black`),brightRed:e(`--ansi-bright-red`),brightGreen:e(`--ansi-bright-green`),brightYellow:e(`--ansi-bright-yellow`),brightBlue:e(`--ansi-bright-blue`),brightMagenta:e(`--ansi-bright-magenta`),brightCyan:e(`--ansi-bright-cyan`),brightWhite:e(`--ansi-bright-white`)}}function Qc(){return Zc(Yc())}function $c(e){return{theme:Zc(e),minimumContrastRatio:Xc}}function el(){return $c(Yc())}function tl(e){return e.replace(`#`,``)}function nl(e,t){return{base:t===`light`?`vs`:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:tl(e(`--text-muted`)),fontStyle:`italic`},{token:`string`,foreground:tl(e(`--ansi-green`))},{token:`number`,foreground:tl(e(`--ansi-yellow`))},{token:`keyword`,foreground:tl(e(`--ansi-blue`))},{token:`type`,foreground:tl(e(`--ansi-cyan`))},{token:`function`,foreground:tl(e(`--ansi-magenta`))}],colors:{"editor.background":e(`--bg-base`),"editor.foreground":e(`--text-primary`),"editor.selectionBackground":e(`--selection`),"editor.lineHighlightBackground":e(`--bg-surface`),"editorCursor.foreground":e(`--accent`),"editorLineNumber.foreground":e(`--text-muted`),"editorLineNumber.activeForeground":e(`--text-secondary`),"editorWidget.background":e(`--bg-elevated`),"editorWidget.border":e(`--border`),focusBorder:e(`--focus-ring`),"diffEditor.insertedTextBackground":e(`--diff-added`),"diffEditor.removedTextBackground":e(`--diff-removed`)}}}function rl(){return nl(Yc(),Wc())}var il=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),al=t(((e,t)=>{t.exports=il()})),ol=al(),sl=`modulepreload`,cl=function(e){return`/`+e},ll={},ul=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=cl(t,n),t=s(t),t in ll)return;ll[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:sl,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};Kc(),Ec(),Ic(),uc().then(async()=>{let{App:e}=await ul(async()=>{let{App:e}=await import(`./App-DASEDcLe.js`);return{App:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));(0,mo.createRoot)(document.getElementById(`root`)).render((0,ol.jsx)(e,{}))});export{U as $,js as A,ss as B,rc as C,Ks as D,$s as E,xs as F,Jo as G,ts as H,ds as I,wo as J,Co as K,fs as L,Ds as M,Ts as N,Vs as O,gs as P,Do as Q,cs as R,oc as S,ec as T,as as U,$o as V,qo as W,Oo as X,Eo as Y,ko as Z,pc as _,Wc as a,cc as b,Uc as c,Ac as d,ho as et,Nc as f,Dc as g,Tc as h,Yc as i,Bs as j,Hs as k,Qc as l,wc as m,al as n,N as nt,rl as o,Mc as p,To as q,Gc as r,o as rt,qc as s,ul as t,L as tt,el as u,dc as v,ic as w,sc as x,lc as y,ls as z};
@@ -1 +1 @@
1
- import"./chunk-FOHPRMQF-CdD2_EOh.js";import{w as e}from"./mermaid-parser.core-ByJNQf82.js";export{e as createInfoServices};
1
+ import"./chunk-FOHPRMQF-CdD2_EOh.js";import{w as e}from"./mermaid-parser.core-nSTpUfsy.js";export{e as createInfoServices};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./mermaid-parser.core-ByJNQf82.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{c as r}from"./chunk-DU6HZSFF-CBPmk1pL.js";import{t as i}from"./chunk-CLGD4ZFX-oFNi47Ux.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram
1
+ import{n as e}from"./mermaid-parser.core-nSTpUfsy.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{c as r}from"./chunk-DU6HZSFF-D2MERyrK.js";import{t as i}from"./chunk-CLGD4ZFX-Bs5GeGSA.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram
2
2
  `+e);let o=i(t);r(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-CBPmk1pL.js";import{p as d}from"./chunk-75Z2AOVW-BORaUDn8.js";import{t as f}from"./chunk-CLGD4ZFX-oFNi47Ux.js";import{t as p}from"./rough.esm-CSKSodPl.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-D2MERyrK.js";import{p as d}from"./chunk-75Z2AOVW-aSl9pzR1.js";import{t as f}from"./chunk-CLGD4ZFX-Bs5GeGSA.js";import{t as p}from"./rough.esm-CSKSodPl.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-_wZywoZs.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-CBPmk1pL.js";import{t as d}from"./arc-BjSQqbzd.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-DE-cpUSw.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-_wZywoZs.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-D2MERyrK.js";import{t as d}from"./arc-BjSQqbzd.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-M551Lok5.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{h as e,p as t}from"./editor.api2-4X9Vh9Zw.js";import{h as n}from"./buffer-store-C32442jB.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b}from"./lspLanguageFeatures-x2nWJpem.js";var x=120*1e3,S=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=n({moduleId:`vs/language/json/jsonWorker`,createWorker:()=>new Worker(new URL(`/assets/json.worker-Oa9UrkKE.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function C(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&E(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&E(e.charCodeAt(r)))for(r++;r<e.length&&E(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&E(e.charCodeAt(r))){for(r++;r<e.length&&E(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
1
+ import{h as e,p as t}from"./editor.api2-4X9Vh9Zw.js";import{h as n}from"./buffer-store-Bo9Pkcvc.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b}from"./lspLanguageFeatures-x2nWJpem.js";var x=120*1e3,S=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=n({moduleId:`vs/language/json/jsonWorker`,createWorker:()=>new Worker(new URL(`/assets/json.worker-Oa9UrkKE.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function C(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&E(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&E(e.charCodeAt(r)))for(r++;r<e.length&&E(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&E(e.charCodeAt(r))){for(r++;r<e.length&&E(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
2
2
  `;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(T(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(w(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(w(t));return o=15}if(T(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
3
3
  `),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!T(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,T(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!E(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(w(e)||T(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function w(e){return e===32||e===9}function T(e){return e===10||e===13}function E(e){return e>=48&&e<=57}var D;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(D||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t));var O=200;Array(O).fill(0).map((e,t)=>`
4
4
  `+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-_wZywoZs.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-DU6HZSFF-CBPmk1pL.js";import"./chunk-75Z2AOVW-BORaUDn8.js";import{t as l}from"./chunk-CLGD4ZFX-oFNi47Ux.js";import"./chunk-PWAF6VOD-By_8bGJX.js";import"./chunk-GMAD6QVW-uwctnGjU.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-Dxh_lkTg.js";import"./chunk-4HAMMTFA-FPp5hj4L.js";import{i as d,r as f}from"./chunk-GVQU2GXP-BQITYCKv.js";import{n as p}from"./chunk-L3NEJ4N5-DyGyqqsq.js";import{n as m,t as h}from"./chunk-LNGE3PJU-DNNNwF8Y.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-_wZywoZs.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-DU6HZSFF-D2MERyrK.js";import"./chunk-75Z2AOVW-aSl9pzR1.js";import{t as l}from"./chunk-CLGD4ZFX-Bs5GeGSA.js";import"./chunk-PWAF6VOD-DbfPo9WU.js";import"./chunk-GMAD6QVW-CMGYeAMx.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-ClKqCyNC.js";import"./chunk-4HAMMTFA-DqQBOHR1.js";import{i as d,r as f}from"./chunk-GVQU2GXP-4zM8Wb-z.js";import{n as p}from"./chunk-L3NEJ4N5--yPwqqSE.js";import{n as m,t as h}from"./chunk-LNGE3PJU-DNNNwF8Y.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{n as e,t}from"./path-BWPyau1x.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-75Z2AOVW-BORaUDn8.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
1
+ import{n as e,t}from"./path-BWPyau1x.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-75Z2AOVW-aSl9pzR1.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-BFVfe-_-.js","assets/index-DimSEdqL.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/index-trR7_UK8.css","assets/purify.es-D8QhFVkO.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-_wZywoZs.js","assets/chunk-DU6HZSFF-CBPmk1pL.js","assets/chunk-75Z2AOVW-BORaUDn8.js","assets/dist-D9sYb5Oa.js","assets/chunk-CLGD4ZFX-oFNi47Ux.js","assets/chunk-PWAF6VOD-By_8bGJX.js","assets/chunk-GMAD6QVW-uwctnGjU.js","assets/chunk-P2QGCYS3-Dxh_lkTg.js","assets/chunk-4HAMMTFA-FPp5hj4L.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-BQITYCKv.js","assets/chunk-OSK3NFVY-BJidWKYd.js","assets/line-DP_McEBB.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-L3NEJ4N5-DyGyqqsq.js","assets/chunk-TLUHSLCS-ROOkcM6u.js","assets/chunk-2E4U76K2-AY--rEt0.js","assets/graphlib-DS17s2tU.js","assets/chunk-LNGE3PJU-DNNNwF8Y.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./index-DimSEdqL.js";var r=e({MERMAID_SELECTOR:()=>i,renderMermaidDiagrams:()=>s}),i=`[data-puddle-mermaid]`,a=0,o=Promise.resolve();function s(e,t,n,r=!1){let i=o.then(()=>c(e,t,n,r));return o=i.catch(()=>void 0),i}async function c(e,r,o,s=!1){if(o?.aborted)return;let c=[...e.querySelectorAll(i)];if(c.length===0)return;let d;try{({default:d}=await n(()=>import(`./mermaid.core-BFVfe-_-.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26])))}catch{if(!o?.aborted)for(let e of c)l(e,`Mermaid could not be loaded`);return}if(!o?.aborted){try{let n=t(),i=getComputedStyle(e).fontSize,a=Number.parseFloat(i);d.initialize({startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,theme:`base`,htmlLabels:!1,fontFamily:n(`--font-sans`),...s&&Number.isFinite(a)?{flowchart:{nodeSpacing:a,rankSpacing:a*2,padding:a/2,subGraphTitleMargin:{top:a/2,bottom:a}},sequence:{diagramMarginY:a/2,messageMargin:a,actorMargin:a}}:{},secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`maxEdges`,`suppressErrorRendering`,`theme`,`themeCSS`,`themeVariables`,`fontFamily`],themeVariables:{darkMode:r===`dark`,background:n(`--bg-base`),primaryColor:n(`--bg-elevated`),primaryTextColor:n(`--text-primary`),primaryBorderColor:n(`--border`),secondaryColor:n(`--bg-surface`),secondaryTextColor:n(`--text-primary`),secondaryBorderColor:n(`--border`),tertiaryColor:n(`--bg-base`),tertiaryTextColor:n(`--text-secondary`),tertiaryBorderColor:n(`--border`),lineColor:n(`--text-muted`),textColor:n(`--text-primary`),fontFamily:n(`--font-sans`),fontSize:i}})}catch(e){if(!o?.aborted)for(let t of c)l(t,u(e));return}for(let e of c){if(o?.aborted||!e.isConnected)return;let t=e.textContent??``,n=`puddle-mermaid-${a++}`;try{let{svg:r}=await d.render(n,t);if(o?.aborted||!e.isConnected)continue;e.innerHTML=r,e.removeAttribute(`data-puddle-mermaid`)}catch(t){document.getElementById(n)?.remove(),!o?.aborted&&e.isConnected&&l(e,u(t))}}}}function l(e,t){if(e.querySelector(`.mermaid-error`))return;let n=document.createElement(`p`);n.className=`mermaid-error`,n.textContent=`Unable to render Mermaid diagram.`,n.title=t,e.prepend(n)}function u(e){return e instanceof Error?e.message:String(e)}export{s as n,r as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-C-1MIKwo.js","assets/index-Bu40e7h3.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/index-trR7_UK8.css","assets/purify.es-D8QhFVkO.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-_wZywoZs.js","assets/chunk-DU6HZSFF-D2MERyrK.js","assets/chunk-75Z2AOVW-aSl9pzR1.js","assets/dist-D9sYb5Oa.js","assets/chunk-CLGD4ZFX-Bs5GeGSA.js","assets/chunk-PWAF6VOD-DbfPo9WU.js","assets/chunk-GMAD6QVW-CMGYeAMx.js","assets/chunk-P2QGCYS3-ClKqCyNC.js","assets/chunk-4HAMMTFA-DqQBOHR1.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-4zM8Wb-z.js","assets/chunk-OSK3NFVY-BBXTrREq.js","assets/line-DAutqfiP.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-L3NEJ4N5--yPwqqSE.js","assets/chunk-TLUHSLCS-DYPEQGHP.js","assets/chunk-2E4U76K2-7Kw4IMp8.js","assets/graphlib-DS17s2tU.js","assets/chunk-LNGE3PJU-DNNNwF8Y.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./index-Bu40e7h3.js";var r=e({MERMAID_SELECTOR:()=>i,renderMermaidDiagrams:()=>s}),i=`[data-puddle-mermaid]`,a=0,o=Promise.resolve();function s(e,t,n,r=!1){let i=o.then(()=>c(e,t,n,r));return o=i.catch(()=>void 0),i}async function c(e,r,o,s=!1){if(o?.aborted)return;let c=[...e.querySelectorAll(i)];if(c.length===0)return;let d;try{({default:d}=await n(()=>import(`./mermaid.core-C-1MIKwo.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26])))}catch{if(!o?.aborted)for(let e of c)l(e,`Mermaid could not be loaded`);return}if(!o?.aborted){try{let n=t(),i=getComputedStyle(e).fontSize,a=Number.parseFloat(i);d.initialize({startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,theme:`base`,htmlLabels:!1,fontFamily:n(`--font-sans`),...s&&Number.isFinite(a)?{flowchart:{nodeSpacing:a,rankSpacing:a*2,padding:a/2,subGraphTitleMargin:{top:a/2,bottom:a}},sequence:{diagramMarginY:a/2,messageMargin:a,actorMargin:a}}:{},secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`maxEdges`,`suppressErrorRendering`,`theme`,`themeCSS`,`themeVariables`,`fontFamily`],themeVariables:{darkMode:r===`dark`,background:n(`--bg-base`),primaryColor:n(`--bg-elevated`),primaryTextColor:n(`--text-primary`),primaryBorderColor:n(`--border`),secondaryColor:n(`--bg-surface`),secondaryTextColor:n(`--text-primary`),secondaryBorderColor:n(`--border`),tertiaryColor:n(`--bg-base`),tertiaryTextColor:n(`--text-secondary`),tertiaryBorderColor:n(`--border`),lineColor:n(`--text-muted`),textColor:n(`--text-primary`),fontFamily:n(`--font-sans`),fontSize:i}})}catch(e){if(!o?.aborted)for(let t of c)l(t,u(e));return}for(let e of c){if(o?.aborted||!e.isConnected)return;let t=e.textContent??``,n=`puddle-mermaid-${a++}`;try{let{svg:r}=await d.render(n,t);if(o?.aborted||!e.isConnected)continue;e.innerHTML=r,e.removeAttribute(`data-puddle-mermaid`)}catch(t){document.getElementById(n)?.remove(),!o?.aborted&&e.isConnected&&l(e,u(t))}}}}function l(e,t){if(e.querySelector(`.mermaid-error`))return;let n=document.createElement(`p`);n.className=`mermaid-error`,n.textContent=`Unable to render Mermaid diagram.`,n.title=t,e.prepend(n)}function u(e){return e instanceof Error?e.message:String(e)}export{s as n,r as t};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,n,r}from"./FindWidget-CZ_Qh10J.js";var i=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},a=/([A-Z])/g,o=e=>e.replace(a,`-$1`).toLowerCase(),s={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},c=/[&><"']/g,l=e=>String(e).replace(c,e=>s[e]),u=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?u(e.body[0]):e:e.type===`font`?u(e.body):e,d=new Set([`mathord`,`textord`,`atom`]),f=e=>d.has(u(e).type),p=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},m={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function h(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function g(e){return e.default===void 0?h(Array.isArray(e.type)?e.type[0]:e.type):e.default}function _(e,t,n,r){var i=n[t];e[t]=i===void 0?g(r):r.processor?r.processor(i):i}var v=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(m)){var n=m[t];n&&_(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new i(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=p(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},y=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return ee[te[this.id]]}sub(){return ee[ne[this.id]]}fracNum(){return ee[re[this.id]]}fracDen(){return ee[ie[this.id]]}cramp(){return ee[ae[this.id]]}text(){return ee[oe[this.id]]}isTight(){return this.size>=2}},b=0,x=1,S=2,C=3,w=4,T=5,E=6,D=7,ee=[new y(b,0,!1),new y(x,0,!0),new y(S,1,!1),new y(C,1,!0),new y(w,2,!1),new y(T,2,!0),new y(E,3,!1),new y(D,3,!0)],te=[w,T,w,T,E,D,E,D],ne=[T,T,T,T,D,D,D,D],re=[S,C,w,T,E,D,E,D],ie=[C,C,T,T,D,D,D,D],ae=[x,x,C,C,T,T,D,D],oe=[b,x,S,C,S,C,S,C],O={DISPLAY:ee[b],TEXT:ee[S],SCRIPT:ee[w],SCRIPTSCRIPT:ee[E]},se=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function ce(e){for(var t=0;t<se.length;t++)for(var n=se[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var le=[];se.forEach(e=>e.blocks.forEach(e=>le.push(...e)));function ue(e){for(var t=0;t<le.length;t+=2)if(e>=le[t]&&e<=le[t+1])return!0;return!1}var de=e=>e+` `+e,fe=80,pe=function(e,t){return`M95,`+(622+e+t)+`
1
+ import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,n,r}from"./FindWidget-BW8xDrPl.js";var i=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},a=/([A-Z])/g,o=e=>e.replace(a,`-$1`).toLowerCase(),s={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},c=/[&><"']/g,l=e=>String(e).replace(c,e=>s[e]),u=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?u(e.body[0]):e:e.type===`font`?u(e.body):e,d=new Set([`mathord`,`textord`,`atom`]),f=e=>d.has(u(e).type),p=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},m={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function h(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function g(e){return e.default===void 0?h(Array.isArray(e.type)?e.type[0]:e.type):e.default}function _(e,t,n,r){var i=n[t];e[t]=i===void 0?g(r):r.processor?r.processor(i):i}var v=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(m)){var n=m[t];n&&_(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new i(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=p(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},y=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return ee[te[this.id]]}sub(){return ee[ne[this.id]]}fracNum(){return ee[re[this.id]]}fracDen(){return ee[ie[this.id]]}cramp(){return ee[ae[this.id]]}text(){return ee[oe[this.id]]}isTight(){return this.size>=2}},b=0,x=1,S=2,C=3,w=4,T=5,E=6,D=7,ee=[new y(b,0,!1),new y(x,0,!0),new y(S,1,!1),new y(C,1,!0),new y(w,2,!1),new y(T,2,!0),new y(E,3,!1),new y(D,3,!0)],te=[w,T,w,T,E,D,E,D],ne=[T,T,T,T,D,D,D,D],re=[S,C,w,T,E,D,E,D],ie=[C,C,T,T,D,D,D,D],ae=[x,x,C,C,T,T,D,D],oe=[b,x,S,C,S,C,S,C],O={DISPLAY:ee[b],TEXT:ee[S],SCRIPT:ee[w],SCRIPTSCRIPT:ee[E]},se=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function ce(e){for(var t=0;t<se.length;t++)for(var n=se[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var le=[];se.forEach(e=>e.blocks.forEach(e=>le.push(...e)));function ue(e){for(var t=0;t<le.length;t+=2)if(e>=le[t]&&e<=le[t+1])return!0;return!1}var de=e=>e+` `+e,fe=80,pe=function(e,t){return`M95,`+(622+e+t)+`
2
2
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
3
3
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
4
4
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n}from"./index-DimSEdqL.js";import{a as r,i,n as a}from"./dist-DzQAeBM9.js";import{At as o,Bt as s,Ft as c,Lt as l,Mt as u,Nt as d,jt as f,zt as p}from"./protocol-support-Cnojvarm.js";import{t as m}from"./createLucideIcon-DyMAgLa3.js";var h=class extends l{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:c}=r,l=n.fetchMeta?.fetchMore?.direction,u=o&&l===`forward`,d=i&&l===`forward`,f=o&&l===`backward`,m=i&&l===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:p(t,n.data),hasPreviousPage:s(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:m,isRefetchError:c&&!u&&!f,isRefetching:a&&!d&&!m}}};function g(e,t){return d(e,h,t)}var ee=m(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),_=50;function v(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function y(e){return e?{placeholderData:e=>e}:{}}function b(e,t,n){let r=e!==void 0;return u({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${v(n)}`),enabled:r,...y(r)})}function x(e,t,n){let r=n?.root;return u({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:o(3e3),refetchOnWindowFocus:!0}:{}})}function S(e,t){let n=c();return f({mutationFn:({path:n,...r})=>i(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${v(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function te(e,t){let n=t?.against??`base`,r=t?.area,a=t?.root,s=e!==void 0&&(t?.enabled??!0);return u({queryKey:a===void 0?[`wt-diff`,e,n,r]:[`wt-diff`,e,n,r,a],queryFn:()=>{let t=r===void 0?``:`&area=${r}`;return i(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${v(a)}`)},enabled:s,refetchInterval:o(1e4),refetchOnWindowFocus:!0,...y(s)})}function ne(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return u({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-repositories${C(n)}`),enabled:r,refetchInterval:o(1e4),refetchOnWindowFocus:!0,...y(r)})}function re(e,t,n){let r=n?.root,a=e!==void 0&&(n?.enabled??!0);return u({queryKey:[`git-original`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${v(r)}`),enabled:a,refetchInterval:o(1e4),refetchOnWindowFocus:!0})}function ie(e,t,n){let r=n?.root;return u({queryKey:[`git-index-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function ae(e,t){let n=c();return f({mutationFn:({action:n,...r})=>i(`POST`,`/api/worktrees/${e}/git-${n}${C(t)}`,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`git-repositories`,e]}),n.invalidateQueries({queryKey:[`wt-git-status`,e]}),n.invalidateQueries({queryKey:[`wt-diff`,e]}),n.invalidateQueries({queryKey:[`wt-log`,e]}),n.invalidateQueries({queryKey:[`wt-show`,e]}),n.invalidateQueries({queryKey:[`git-original`,e]}),n.invalidateQueries({queryKey:[`git-index-file`,e]})}})}function oe(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return u({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-status${C(n)}`),enabled:r,refetchInterval:o(1e4),refetchOnWindowFocus:!0,...y(r)})}function C(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function se(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/create${C(r)}`,{path:t,kind:n})}function ce(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/rename${C(r)}`,{from:t,to:n})}function le(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/copy${C(r)}`,{from:t,to:n})}function ue(e,t,n){return i(`POST`,`/api/worktrees/${e}/transfer${C(n)}`,t)}function de(e,t,n){return i(`POST`,`/api/worktrees/${e}/delete${C(n)}`,{path:t})}function fe(e,t,n){let{query:r,regex:a,caseSensitive:o,wholeWord:s}=t;return u({queryKey:[`wt-search`,e,r,a,o,s,n],queryFn:()=>{let t=new URLSearchParams({q:r});return a&&t.set(`regex`,`1`),o&&t.set(`case`,`1`),s&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),i(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function pe(e,t,n,r){let a=r?.root;return u({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${v(a)}`),enabled:e!==void 0&&(r?.enabled??!0),staleTime:1/0})}function me(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return g({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>i(`GET`,`/api/worktrees/${e}/log?limit=${_}&skip=${t}${v(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*_:void 0,enabled:r,...y(r)})}function w(e,t,n){return u({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/show/${t}${C(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var T=64*1024*1024;function E(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function D(e,t,n,i){let a=[];for(let o of E(n,T)){let n=new FormData;for(let e of o)n.append(`files`,e,e.name);let s=await r(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${v(i)}`,{body:n});a.push(...(await s.json()).files)}return{files:a}}function O(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function k(e,t,n){let i=await r(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${v(n)}`),a=await i.blob(),o=t.split(`/`).filter(Boolean).pop()??`worktree`,s=O(i.headers.get(`content-disposition`),o),c=URL.createObjectURL(a);try{let e=document.createElement(`a`);e.href=c,e.download=s,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(c)}}var A=e(t(),1),j=[],M=new Map,N=new Map,P=new Map;function F(e,t){let n=M.get(e)??j;t.length===0?M.delete(e):M.set(e,t);let r=new Set([...n.map(e=>B(e.source)),...t.map(e=>B(e.source))]);for(let e of r)z(e)}function I(e){F(e,j)}function L(e,t,n){let r=B({session:e,path:t,...n===void 0?{}:{root:n}});return(0,A.useSyncExternalStore)((0,A.useCallback)(e=>he(r,e),[r]),()=>R({session:e,path:t,...n===void 0?{}:{root:n}}))}function R(e){return N.get(B(e))??j}function z(e){let t=[...M.values()].flatMap(t=>t.filter(t=>B(t.source)===e));t.length===0?N.delete(e):N.set(e,t);for(let t of P.get(e)??[])t()}function he(e,t){let n=P.get(e)??new Set;return n.add(t),P.set(e,n),()=>{n.delete(t),n.size===0&&P.delete(e)}}function B(e){return JSON.stringify([e.session,e.root??null,e.path])}function V(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var H=new Map;function ge(e,t,n){let r={save:t,...n?{target:n}:{}};return H.set(e,r),()=>{H.get(e)===r&&H.delete(e)}}function _e(e){if(e===null)return!1;let t=H.get(e);return t?(t.save(),!0):!1}async function ve(e,t){let n=V(e.session,e.path,e.root),r=[...H.entries()].flatMap(([r,i])=>{let a=i.target;if(!a||a.session!==e.session||a.root!==e.root)return[];let o=ye(a.path);return r!==n&&!t.has(o)?[]:[Promise.resolve(i.save())]});return(await Promise.all(r)).every(e=>e!==!1)}function ye(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1).toLowerCase()}var be=`UTC`;function xe(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:be})}var U=60,W=60*U,G=24*W,Se=7*G;function Ce(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<U?`just now`:r<W?`${Math.floor(r/U)} m ago`:r<G?`${Math.floor(r/W)} h ago`:r<Se?`${Math.floor(r/G)} d ago`:xe(n)}function we(e,t){return t?`added`:e}function Te(e){return i(`POST`,`/api/profiles/${e}/untitled`)}function K(e,t){return[`untitled`,e,t]}function Ee(e,t){return u({queryKey:K(e,t),queryFn:()=>i(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function De(e,t,n,r){e.setQueryData(K(t,n),e=>e===void 0?e:{...e,content:r})}function Oe(e,t,n){return i(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function ke(e,t){return i(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var q=null,J=new Map;function Ae(e){q=e}function je(e){q?.(e)}function Me(e,t){J.set(e,t)}function Ne(e){return J.get(e)}function Pe(e){J.delete(e)}var Y=n(),X=(0,A.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function Fe({children:e}){let[t,n]=(0,A.useState)(null),r=(0,A.useCallback)(e=>n(()=>e),[]),i=(0,A.useCallback)((e,n,r,i)=>{if(!t){a(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),o=(0,A.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,Y.jsx)(X.Provider,{value:o,children:e})}function Ie(){let{openFile:e}=(0,A.useContext)(X);return{openFile:e}}function Le(e){let{setHandler:t}=(0,A.useContext)(X),n=(0,A.useRef)(e);n.current=e,(0,A.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var Z=new Map,Q=new Map;function Re(e,t,n){let r=$(e,t,n);Z.set(r,(Z.get(r)??0)+1);for(let e of Q.get(r)??[])e()}function ze(e,t,n){let r=$(e,t,n),i=(0,A.useCallback)(e=>Be(r,e),[r]),a=(0,A.useCallback)(()=>Z.get(r)??0,[r]);return(0,A.useSyncExternalStore)(i,a,a)}function Be(e,t){let n=Q.get(e);return n||(n=new Set,Q.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&Q.delete(e)}}function $(e,t,n){return JSON.stringify([e,n??null,t])}export{v as A,te as B,F as C,de as D,se as E,ae as F,b as G,oe as H,re as I,ee as K,ne as L,D as M,w as N,k as O,pe as P,ie as R,I as S,le as T,me as U,x as V,fe as W,Ce as _,Le as a,ve as b,je as c,Te as d,ke as f,we as g,Ee as h,Ie as i,ue as j,ce as k,Ae as l,De as m,ze as n,Pe as o,Oe as p,Fe as r,Me as s,Re as t,Ne as u,ge as v,L as w,V as x,_e as y,S as z};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n}from"./index-Bu40e7h3.js";import{a as r,i,n as a}from"./dist-CTEXpOxQ.js";import{At as o,Bt as s,Ft as c,Lt as l,Mt as u,Nt as d,jt as f,zt as p}from"./protocol-support-BVADYPW-.js";import{t as m}from"./createLucideIcon-DyMAgLa3.js";var h=class extends l{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:c}=r,l=n.fetchMeta?.fetchMore?.direction,u=o&&l===`forward`,d=i&&l===`forward`,f=o&&l===`backward`,m=i&&l===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:p(t,n.data),hasPreviousPage:s(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:m,isRefetchError:c&&!u&&!f,isRefetching:a&&!d&&!m}}};function g(e,t){return d(e,h,t)}var ee=m(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),_=50;function v(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function y(e){return e?{placeholderData:e=>e}:{}}function b(e,t,n){let r=e!==void 0;return u({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${v(n)}`),enabled:r,...y(r)})}function x(e,t,n){let r=n?.root;return u({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:o(3e3),refetchOnWindowFocus:!0}:{}})}function S(e,t){let n=c();return f({mutationFn:({path:n,...r})=>i(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${v(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function te(e,t){let n=t?.against??`base`,r=t?.area,a=t?.root,s=e!==void 0&&(t?.enabled??!0);return u({queryKey:a===void 0?[`wt-diff`,e,n,r]:[`wt-diff`,e,n,r,a],queryFn:()=>{let t=r===void 0?``:`&area=${r}`;return i(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${v(a)}`)},enabled:s,refetchInterval:o(1e4),refetchOnWindowFocus:!0,...y(s)})}function ne(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return u({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-repositories${C(n)}`),enabled:r,refetchInterval:o(1e4),refetchOnWindowFocus:!0,...y(r)})}function re(e,t,n){let r=n?.root,a=e!==void 0&&(n?.enabled??!0);return u({queryKey:[`git-original`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${v(r)}`),enabled:a,refetchInterval:o(1e4),refetchOnWindowFocus:!0})}function ie(e,t,n){let r=n?.root;return u({queryKey:[`git-index-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function ae(e,t){let n=c();return f({mutationFn:({action:n,...r})=>i(`POST`,`/api/worktrees/${e}/git-${n}${C(t)}`,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`git-repositories`,e]}),n.invalidateQueries({queryKey:[`wt-git-status`,e]}),n.invalidateQueries({queryKey:[`wt-diff`,e]}),n.invalidateQueries({queryKey:[`wt-log`,e]}),n.invalidateQueries({queryKey:[`wt-show`,e]}),n.invalidateQueries({queryKey:[`git-original`,e]}),n.invalidateQueries({queryKey:[`git-index-file`,e]})}})}function oe(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return u({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-status${C(n)}`),enabled:r,refetchInterval:o(1e4),refetchOnWindowFocus:!0,...y(r)})}function C(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function se(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/create${C(r)}`,{path:t,kind:n})}function ce(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/rename${C(r)}`,{from:t,to:n})}function le(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/copy${C(r)}`,{from:t,to:n})}function ue(e,t,n){return i(`POST`,`/api/worktrees/${e}/transfer${C(n)}`,t)}function de(e,t,n){return i(`POST`,`/api/worktrees/${e}/delete${C(n)}`,{path:t})}function fe(e,t,n){let{query:r,regex:a,caseSensitive:o,wholeWord:s}=t;return u({queryKey:[`wt-search`,e,r,a,o,s,n],queryFn:()=>{let t=new URLSearchParams({q:r});return a&&t.set(`regex`,`1`),o&&t.set(`case`,`1`),s&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),i(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function pe(e,t,n,r){let a=r?.root;return u({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${v(a)}`),enabled:e!==void 0&&(r?.enabled??!0),staleTime:1/0})}function me(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return g({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>i(`GET`,`/api/worktrees/${e}/log?limit=${_}&skip=${t}${v(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*_:void 0,enabled:r,...y(r)})}function w(e,t,n){return u({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/show/${t}${C(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var T=64*1024*1024;function E(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function D(e,t,n,i){let a=[];for(let o of E(n,T)){let n=new FormData;for(let e of o)n.append(`files`,e,e.name);let s=await r(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${v(i)}`,{body:n});a.push(...(await s.json()).files)}return{files:a}}function O(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function k(e,t,n){let i=await r(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${v(n)}`),a=await i.blob(),o=t.split(`/`).filter(Boolean).pop()??`worktree`,s=O(i.headers.get(`content-disposition`),o),c=URL.createObjectURL(a);try{let e=document.createElement(`a`);e.href=c,e.download=s,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(c)}}var A=e(t(),1),j=[],M=new Map,N=new Map,P=new Map;function F(e,t){let n=M.get(e)??j;t.length===0?M.delete(e):M.set(e,t);let r=new Set([...n.map(e=>B(e.source)),...t.map(e=>B(e.source))]);for(let e of r)z(e)}function I(e){F(e,j)}function L(e,t,n){let r=B({session:e,path:t,...n===void 0?{}:{root:n}});return(0,A.useSyncExternalStore)((0,A.useCallback)(e=>he(r,e),[r]),()=>R({session:e,path:t,...n===void 0?{}:{root:n}}))}function R(e){return N.get(B(e))??j}function z(e){let t=[...M.values()].flatMap(t=>t.filter(t=>B(t.source)===e));t.length===0?N.delete(e):N.set(e,t);for(let t of P.get(e)??[])t()}function he(e,t){let n=P.get(e)??new Set;return n.add(t),P.set(e,n),()=>{n.delete(t),n.size===0&&P.delete(e)}}function B(e){return JSON.stringify([e.session,e.root??null,e.path])}function V(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var H=new Map;function ge(e,t,n){let r={save:t,...n?{target:n}:{}};return H.set(e,r),()=>{H.get(e)===r&&H.delete(e)}}function _e(e){if(e===null)return!1;let t=H.get(e);return t?(t.save(),!0):!1}async function ve(e,t){let n=V(e.session,e.path,e.root),r=[...H.entries()].flatMap(([r,i])=>{let a=i.target;if(!a||a.session!==e.session||a.root!==e.root)return[];let o=ye(a.path);return r!==n&&!t.has(o)?[]:[Promise.resolve(i.save())]});return(await Promise.all(r)).every(e=>e!==!1)}function ye(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1).toLowerCase()}var be=`UTC`;function xe(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:be})}var U=60,W=60*U,G=24*W,Se=7*G;function Ce(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<U?`just now`:r<W?`${Math.floor(r/U)} m ago`:r<G?`${Math.floor(r/W)} h ago`:r<Se?`${Math.floor(r/G)} d ago`:xe(n)}function we(e,t){return t?`added`:e}function Te(e){return i(`POST`,`/api/profiles/${e}/untitled`)}function K(e,t){return[`untitled`,e,t]}function Ee(e,t){return u({queryKey:K(e,t),queryFn:()=>i(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function De(e,t,n,r){e.setQueryData(K(t,n),e=>e===void 0?e:{...e,content:r})}function Oe(e,t,n){return i(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function ke(e,t){return i(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var q=null,J=new Map;function Ae(e){q=e}function je(e){q?.(e)}function Me(e,t){J.set(e,t)}function Ne(e){return J.get(e)}function Pe(e){J.delete(e)}var Y=n(),X=(0,A.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function Fe({children:e}){let[t,n]=(0,A.useState)(null),r=(0,A.useCallback)(e=>n(()=>e),[]),i=(0,A.useCallback)((e,n,r,i)=>{if(!t){a(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),o=(0,A.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,Y.jsx)(X.Provider,{value:o,children:e})}function Ie(){let{openFile:e}=(0,A.useContext)(X);return{openFile:e}}function Le(e){let{setHandler:t}=(0,A.useContext)(X),n=(0,A.useRef)(e);n.current=e,(0,A.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var Z=new Map,Q=new Map;function Re(e,t,n){let r=$(e,t,n);Z.set(r,(Z.get(r)??0)+1);for(let e of Q.get(r)??[])e()}function ze(e,t,n){let r=$(e,t,n),i=(0,A.useCallback)(e=>Be(r,e),[r]),a=(0,A.useCallback)(()=>Z.get(r)??0,[r]);return(0,A.useSyncExternalStore)(i,a,a)}function Be(e,t){let n=Q.get(e);return n||(n=new Set,Q.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&Q.delete(e)}}function $(e,t,n){return JSON.stringify([e,n??null,t])}export{v as A,te as B,F as C,de as D,se as E,ae as F,b as G,oe as H,re as I,ee as K,ne as L,D as M,w as N,k as O,pe as P,ie as R,I as S,le as T,me as U,x as V,fe as W,Ce as _,Le as a,ve as b,je as c,Te as d,ke as f,we as g,Ee as h,Ie as i,ue as j,ce as k,Ae as l,De as m,ze as n,Pe as o,Oe as p,Fe as r,Me as s,Re as t,Ne as u,ge as v,L as w,V as x,_e as y,S as z};