@kabmo-labs/kabmo 0.53.0 → 0.53.2

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 (152) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +384 -384
  3. package/dist/client/static/js/{Body-sdq2yhmp.js → Body-vaa10tcd.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-afz6vr3m.js → CsvGrid-wabx4e6w.js} +1 -1
  5. package/dist/client/static/js/{DocxView-xwjgt7qq.js → DocxView-22b3mhh5.js} +1 -1
  6. package/dist/client/static/js/{DrawioView-7m4e8zcm.js → DrawioView-e02qhkp2.js} +1 -1
  7. package/dist/client/static/js/{HtmlPreview-tad0dezn.js → HtmlPreview-q7hwcf4s.js} +1 -1
  8. package/dist/client/static/js/{ImageView-7bpm4xhb.js → ImageView-fxb60ge7.js} +1 -1
  9. package/dist/client/static/js/{LayoutWrapper-ehxhj6t3.js → LayoutWrapper-cey5agsf.js} +2 -2
  10. package/dist/client/static/js/MergeDiffView-1z9mwf73.js +1 -0
  11. package/dist/client/static/js/{Modal-5qt3v5gn.js → Modal-e4yq7p5f.js} +9 -9
  12. package/dist/client/static/js/{PdfView-hbgnnana.js → PdfView-pf3angsq.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-rv9jmr2e.js → SessionsView-mcvhpx0b.js} +1 -1
  14. package/dist/client/static/js/{SheetView-55e0a8as.js → SheetView-5ha5vvsr.js} +1 -1
  15. package/dist/client/static/js/{SvgPreview-10fa6mj1.js → SvgPreview-45wqjw0b.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-9w4p3dhe.js → abnfDiagram-O67JEVCF-gnf6krbs.js} +1 -1
  17. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-5x6sb253.js → architectureDiagram-NJMV4G6O-00fd0wsg.js} +2 -2
  18. package/dist/client/static/js/{astro-m3fcq2sa.js → astro-asmathwv.js} +1 -1
  19. package/dist/client/static/js/{blockDiagram-BEXU5L5S-2c6y4pkn.js → blockDiagram-BEXU5L5S-9c2sm96a.js} +2 -2
  20. package/dist/client/static/js/c-20y64hcp.js +1 -0
  21. package/dist/client/static/js/{c4Diagram-YGBWAQC7-45rtm401.js → c4Diagram-YGBWAQC7-pemygn0s.js} +2 -2
  22. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-rksw3aw9.js → classDiagram-v2-NBCMYWYE-h7r3sx3s.js} +2 -2
  23. package/dist/client/static/js/{cose-bilkent-JH36ORCC-4hxtttt5.js → cose-bilkent-JH36ORCC-krx9crwv.js} +1 -1
  24. package/dist/client/static/js/cpp-ty6n0dg9.js +1 -0
  25. package/dist/client/static/js/css-ncvxaxt0.js +1 -0
  26. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-5dhexpf2.js → cynefinDiagram-VND7K2PF-5rp2btew.js} +1 -1
  27. package/dist/client/static/js/{dagre-6A5THRUB-1k3w4qm9.js → dagre-6A5THRUB-q57cnz52.js} +2 -2
  28. package/dist/client/static/js/{diagram-22UHCM2B-fw76k272.js → diagram-22UHCM2B-0bptn06k.js} +2 -2
  29. package/dist/client/static/js/{diagram-3UASUU5V-qnb2gn31.js → diagram-3UASUU5V-60snxawz.js} +1 -1
  30. package/dist/client/static/js/{diagram-ATOU4E4O-cavnxzpf.js → diagram-ATOU4E4O-bb0kewfp.js} +2 -2
  31. package/dist/client/static/js/{diagram-CDSNMT55-6dxaj054.js → diagram-CDSNMT55-3cdkns0z.js} +2 -2
  32. package/dist/client/static/js/{diagram-MLGK6HIB-f16fv9ay.js → diagram-MLGK6HIB-03mbhzeq.js} +1 -1
  33. package/dist/client/static/js/{diagram-MPIPVDR6-zsryj72g.js → diagram-MPIPVDR6-bcvzqqf4.js} +1 -1
  34. package/dist/client/static/js/{dockerfile-frznktsa.js → dockerfile-7kqkk4tz.js} +1 -1
  35. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-1zz5h7sw.js → ebnfDiagram-ZINNZB2B-sg6kwnbx.js} +1 -1
  36. package/dist/client/static/js/{elk-276RUBZZ-25pehy1p.js → elk-276RUBZZ-5b8v0sdv.js} +1 -1
  37. package/dist/client/static/js/{erDiagram-OPXOYQCR-ezpjhgzw.js → erDiagram-OPXOYQCR-xbs156j5.js} +2 -2
  38. package/dist/client/static/js/flowDiagram-KWPJA3E3-sasgvf55.js +1 -0
  39. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-n11hq4ag.js → ganttDiagram-FUAMR5RP-4p7pfk6c.js} +1 -1
  40. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-3znkxh7y.js → gitGraphDiagram-X574FWY7-3xqwr9pf.js} +1 -1
  41. package/dist/client/static/js/{index-10cxm9ty.js → index-0btbxkxf.js} +2 -2
  42. package/dist/client/static/js/{index-5pbf6dcz.js → index-1d8ff4t7.js} +3 -3
  43. package/dist/client/static/js/{index-9n1cg95f.js → index-1regq9wd.js} +1 -1
  44. package/dist/client/static/js/{index-4nvcwtvr.js → index-25zpywv7.js} +1 -1
  45. package/dist/client/static/js/{index-qj6b15r4.js → index-26a4afcr.js} +2 -2
  46. package/dist/client/static/js/{index-scmtzcv1.js → index-396g4zz4.js} +2 -2
  47. package/dist/client/static/js/{index-m1hd7ska.js → index-3amzzsdk.js} +25 -25
  48. package/dist/client/static/js/{index-vjmy9r20.js → index-3bmn5cc5.js} +1 -1
  49. package/dist/client/static/js/{index-qrpx4sk1.js → index-3x88t8g9.js} +2 -2
  50. package/dist/client/static/js/{index-e0h6xkpv.js → index-45vcpqp9.js} +1 -1
  51. package/dist/client/static/js/{index-7ag37ghj.js → index-4kchzh9y.js} +8 -8
  52. package/dist/client/static/js/{index-5hqjscys.js → index-5qtnmn76.js} +2 -2
  53. package/dist/client/static/js/{index-wvw70pgd.js → index-668fc1df.js} +2 -2
  54. package/dist/client/static/js/{index-b039ef9w.js → index-ayx3q8t9.js} +2 -2
  55. package/dist/client/static/js/{index-dzp9rwy0.js → index-c8ta3k4g.js} +161 -161
  56. package/dist/client/static/js/{index-ey0ckd66.js → index-cj8v7b50.js} +2 -2
  57. package/dist/client/static/js/{index-dkz8d77n.js → index-cy6ceab8.js} +1 -1
  58. package/dist/client/static/js/index-cysdvwqw.js +1 -0
  59. package/dist/client/static/js/{index-y79ebmam.js → index-e2esj214.js} +1 -1
  60. package/dist/client/static/js/{index-32gh2645.js → index-gzz6snng.js} +1 -1
  61. package/dist/client/static/js/{index-kyarw08m.js → index-hp3s5r3g.js} +2 -2
  62. package/dist/client/static/js/{index-5z7f6bq4.js → index-hwq7zgqd.js} +1 -1
  63. package/dist/client/static/js/{index-1qjxg7mh.js → index-j9t5xc3y.js} +1 -1
  64. package/dist/client/static/js/{index-58kgkwxt.js → index-jf8zcg99.js} +4 -4
  65. package/dist/client/static/js/{index-2k6wyyds.js → index-jg6ecfc7.js} +4 -4
  66. package/dist/client/static/js/{index-er7pj5k6.js → index-m6eh5g1q.js} +1 -1
  67. package/dist/client/static/js/{index-4faphth3.js → index-mgs5nscx.js} +1 -1
  68. package/dist/client/static/js/{index-me7ag6sy.js → index-mtjbp5ga.js} +1 -1
  69. package/dist/client/static/js/{index-dzsjyzht.js → index-ng3e6k6x.js} +2 -2
  70. package/dist/client/static/js/{index-z9msykm1.js → index-nmhwjwmt.js} +1 -1
  71. package/dist/client/static/js/{index-s78f7j47.js → index-nnhs52db.js} +1 -1
  72. package/dist/client/static/js/{index-8972fxm9.js → index-p75b7phb.js} +1 -1
  73. package/dist/client/static/js/{index-5j0wejvq.js → index-pak6t03c.js} +2 -2
  74. package/dist/client/static/js/{index-zkkttvtx.js → index-pdkt3r4r.js} +2 -2
  75. package/dist/client/static/js/{index-gmea6fjd.js → index-qj9tcz44.js} +5 -5
  76. package/dist/client/static/js/{index-ej1va073.js → index-rsyqf691.js} +2 -2
  77. package/dist/client/static/js/{index-tnhnysj1.js → index-rtpg4t84.js} +1 -1
  78. package/dist/client/static/js/{index-1e7fek0v.js → index-ryww3xxj.js} +1 -1
  79. package/dist/client/static/js/index-trrmbq0h.js +2 -0
  80. package/dist/client/static/js/{index-02skcm4d.js → index-vwxt5ss9.js} +1 -1
  81. package/dist/client/static/js/{index-acpn178r.js → index-x0y2c61e.js} +1 -1
  82. package/dist/client/static/js/{index-899yw6fh.js → index-x3g8fwkc.js} +2 -2
  83. package/dist/client/static/js/{index-j97qmbbv.js → index-xqkcx4az.js} +1 -1
  84. package/dist/client/static/js/{index-hqc2cazc.js → index-yf5a6t3p.js} +4 -4
  85. package/dist/client/static/js/{index-ht164kw9.js → index-z7gd7nvb.js} +1 -1
  86. package/dist/client/static/js/{index-1w92sjkm.js → index-zc3snsr9.js} +2 -2
  87. package/dist/client/static/js/{infoDiagram-VRGFBTTK-kmv3jtrd.js → infoDiagram-VRGFBTTK-c362sv3t.js} +1 -1
  88. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-5kp6geeh.js → ishikawaDiagram-OU5B5YK6-yc8ts8wj.js} +1 -1
  89. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-6w5f1ddc.js → journeyDiagram-ZHPQQLJL-178c75fy.js} +2 -2
  90. package/dist/client/static/js/json-xha2drny.js +1 -0
  91. package/dist/client/static/js/{julia-nwh5w343.js → julia-d18zhpyp.js} +1 -1
  92. package/dist/client/static/js/{kanban-definition-PNTS6WVX-6esn6xqn.js → kanban-definition-PNTS6WVX-w6g3n001.js} +2 -2
  93. package/dist/client/static/js/lua-njwwdj4s.js +1 -0
  94. package/dist/client/static/js/{mermaid.core-z83pf8ch.js → mermaid.core-vcdgn378.js} +7 -7
  95. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-0h1nhw66.js → mindmap-definition-NLK3R4M7-t9e8arca.js} +1 -1
  96. package/dist/client/static/js/one-dark-pro-17hh3q12.js +1 -0
  97. package/dist/client/static/js/one-light-cntgvscy.js +1 -0
  98. package/dist/client/static/js/{pegDiagram-GJSIUBJH-xdcpr8my.js → pegDiagram-GJSIUBJH-nehn0x9n.js} +1 -1
  99. package/dist/client/static/js/{perl-wb4wtc9x.js → perl-sns2qvmf.js} +1 -1
  100. package/dist/client/static/js/{php-9g594k9f.js → php-3q6v9eey.js} +1 -1
  101. package/dist/client/static/js/{pieDiagram-5QR66LMP-0210zd5b.js → pieDiagram-5QR66LMP-p1t3ctd4.js} +1 -1
  102. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-j0rtvvcm.js → quadrantDiagram-O4NWA36T-614rtbfe.js} +1 -1
  103. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-mzxat5g5.js → railroadDiagram-XR7U4H2S-2vpr6pw8.js} +1 -1
  104. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-zq5b9ts2.js → requirementDiagram-PLB6GJNP-b91s5q3p.js} +2 -2
  105. package/dist/client/static/js/{ruby-c4hxsegh.js → ruby-f9k99tfq.js} +1 -1
  106. package/dist/client/static/js/{rust-vmn352hx.js → rust-jj206pb7.js} +1 -1
  107. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-06s3r7bv.js → sankeyDiagram-IPEJSGJF-4101kt9r.js} +2 -2
  108. package/dist/client/static/js/{sass-6yxywx7t.js → sass-2syegq28.js} +1 -1
  109. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-7s4gz4t5.js → sequenceDiagram-PO4LG4MO-yq0cxg8c.js} +3 -3
  110. package/dist/client/static/js/{sizeCapture-INFHLROL-yensh9k2.js → sizeCapture-INFHLROL-jkvq39vz.js} +1 -1
  111. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-1q8p06fk.js → stateDiagram-v2-GCMORJYK-y0h7w5rw.js} +1 -1
  112. package/dist/client/static/js/{swimlanes-2SLR337P-2mfxddzf.js → swimlanes-2SLR337P-1y073wzx.js} +1 -1
  113. package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-k2xf0gby.js → swimlanesDiagram-TC7HE7FX-8ahz3c68.js} +1 -1
  114. package/dist/client/static/js/{timeline-definition-EJHVYXUP-xrk07evk.js → timeline-definition-EJHVYXUP-yjb0g0ys.js} +2 -2
  115. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ca9h5skn.js → usecaseDiagram-POWQR4AR-8xjkxrkv.js} +1 -1
  116. package/dist/client/static/js/{vennDiagram-UO4OBE2U-c0y47znt.js → vennDiagram-UO4OBE2U-18wjbwtg.js} +1 -1
  117. package/dist/client/static/js/{vue-rcdqpz7q.js → vue-e8e3q3hj.js} +1 -1
  118. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-mfk1ck3n.js → wardleyDiagram-VNRHLVJA-xqrfsrwp.js} +1 -1
  119. package/dist/client/static/js/xml-8516fzfp.js +1 -0
  120. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-6f8xt89k.js → xychartDiagram-PMCCYNJV-azygghkz.js} +2 -2
  121. package/package.json +2 -2
  122. package/src/client/components/workspace/git-panel/index.test.ts +56 -7
  123. package/src/client/components/workspace/git-panel/index.tsx +9 -4
  124. package/src/client/components/workspace/repo-picker/index.test.tsx +29 -2
  125. package/src/client/hooks/chat/timeline/new-chat-open.ts +5 -3
  126. package/src/client/hooks/chat/timeline/new-chat.test.ts +18 -2
  127. package/src/client/hooks/chat/timeline/new-chat.ts +13 -12
  128. package/src/client/hooks/chat/timeline/scope.test.ts +100 -0
  129. package/src/client/hooks/chat/timeline/scope.ts +9 -9
  130. package/src/client/hooks/workspace/commit-box.ts +6 -1
  131. package/src/client/lib/tts/gapless.ts +205 -0
  132. package/src/client/lib/tts/player.test.ts +83 -64
  133. package/src/client/lib/tts/player.ts +48 -98
  134. package/src/server/lib/fs/fs-write-git.test.ts +15 -47
  135. package/src/server/lib/fs/git-ignore.test.ts +101 -0
  136. package/src/server/lib/fs/git-ignore.ts +38 -1
  137. package/src/server/lib/fs/git-repos.ts +32 -11
  138. package/src/server/lib/fs/listing.test.ts +19 -0
  139. package/src/shared/lib/workspace/active-project.test.ts +45 -0
  140. package/src/shared/lib/workspace/active-project.ts +21 -0
  141. package/dist/client/static/js/MergeDiffView-28xkyts9.js +0 -1
  142. package/dist/client/static/js/c-ypdp030b.js +0 -1
  143. package/dist/client/static/js/cpp-cxwev3gs.js +0 -1
  144. package/dist/client/static/js/css-6mxcqf8c.js +0 -1
  145. package/dist/client/static/js/flowDiagram-KWPJA3E3-zh6hmn6g.js +0 -1
  146. package/dist/client/static/js/index-qva2vqbh.js +0 -2
  147. package/dist/client/static/js/index-xvh25zer.js +0 -1
  148. package/dist/client/static/js/json-mb8k0b1n.js +0 -1
  149. package/dist/client/static/js/lua-nxnqww9z.js +0 -1
  150. package/dist/client/static/js/one-dark-pro-wsgaqq27.js +0 -1
  151. package/dist/client/static/js/one-light-w8zdrvyc.js +0 -1
  152. package/dist/client/static/js/xml-vtrdnrn6.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t,Zt}from"./index-m1hd7ska.js";var N=5,R=0.00001,X=2,Y=0.6,w=0.000001;function P(n){let o=[];for(let r=0;r<n.length-1;r++)o.push({a:n[r],b:n[r+1]});return o}t(P,"buildSegmentList");function T(n,o,r,a){let c=o.x-n.x,s=o.y-n.y,u=a.x-r.x,f=a.y-r.y,d=c*f-s*u;if(d===0)return null;let e=r.x-n.x,i=r.y-n.y,h=(e*f-i*u)/d,p=(e*s-i*c)/d;if(h<=w||h>=1-w||p<=w||p>=1-w)return null;return{point:{x:n.x+h*c,y:n.y+h*s},tA:h,tB:p}}t(T,"segmentIntersection");function v(n){return Math.abs(n.b.x-n.a.x)>=Math.abs(n.b.y-n.a.y)}t(v,"isHorizontalSeg");function B(n,o,r){if(n.curve!=="rounded")return!1;let a=n.points,c=a[o],s=a[o+1];if(!c||!s)return!1;let u=Math.hypot(s.x-c.x,s.y-c.y),f=r*u,d=o>0?L(a[o-1],c,s,N):null;if(d&&f<d.cutLen)return!0;let e=o+2<a.length?L(c,s,a[o+2],N):null;return e!==null&&u-f<e.cutLen}t(B,"crossingSitsInRoundedCorner");function C(n){let o=[];for(let r=0;r<n.length;r++){let a=n[r],c=P(a.points);for(let s=r+1;s<n.length;s++){let u=n[s],f=P(u.points);for(let[d,e]of c.entries())for(let[i,h]of f.entries()){let p=T(e.a,e.b,h.a,h.b);if(!p)continue;if(B(a,d,p.tA)||B(u,i,p.tB))continue;let g=v(e),S=v(h);if(g!==S?g:!1)o.push({jumpEdgeId:a.id,otherEdgeId:u.id,segIndex:d,t:p.tA,point:p.point});else o.push({jumpEdgeId:u.id,otherEdgeId:a.id,segIndex:i,t:p.tB,point:p.point})}}}return o}t(C,"findEdgeIntersections");function M(n){let o=Math.round(n*1000)/1000;return Number.isInteger(o)?`${o}`:`${o}`}t(M,"fmt");function A(n){return`${M(n.x)},${M(n.y)}`}t(A,"pointToString");function D(n){let o=n.b.x-n.a.x,r=n.b.y-n.a.y;if(Math.abs(o)>=Math.abs(r))return o>=0?1:0;return r>=0?1:0}t(D,"getArcSweepFlag");function _(n,o){if(n.length<2)return n.map((s)=>({...s}));let r=n.map((s)=>({...s})),a=o.arrowTypeStart&&Zt[o.arrowTypeStart];if(a){let s=n[0],u=n[1],f=Math.atan2(u.y-s.y,u.x-s.x);r[0].x=s.x+a*Math.cos(f),r[0].y=s.y+a*Math.sin(f)}let c=o.arrowTypeEnd&&Zt[o.arrowTypeEnd];if(c){let s=n.length,u=n[s-2],f=n[s-1],d=Math.atan2(f.y-u.y,f.x-u.x);r[s-1].x=f.x-c*Math.cos(d),r[s-1].y=f.y-c*Math.sin(d)}return r}t(_,"applyMarkerOffsets");function k(n,o,r,a,c){let s=n.point.x,u=n.point.y,f={x:s-o*n.r,y:u-r*n.r},d={x:s+o*n.r,y:u+r*n.r},e=[`L${A(f)}`];if(c==="arc")e.push(`A${M(n.r)},${M(n.r)} 0 0 ${a} ${A(d)}`);else e.push(`M${A(d)}`);return e}t(k,"emitJump");function L(n,o,r,a){let c=o.x-n.x,s=o.y-n.y,u=r.x-o.x,f=r.y-o.y,d=Math.hypot(c,s),e=Math.hypot(u,f);if(d<R||e<R)return null;let i=c/d,h=s/d,p=u/e,g=f/e,S=i*p+h*g,b=Math.max(-1,Math.min(1,S)),x=Math.acos(b);if(x<R||Math.abs(Math.PI-x)<R)return null;let y=Math.min(a/Math.sin(x/2),d/2,e/2);return{startX:o.x-i*y,startY:o.y-h*y,endX:o.x+p*y,endY:o.y+g*y,ctrlX:o.x,ctrlY:o.y,cutLen:y}}t(L,"computeRoundedCorner");function H(n,o,r){let a=n.points;if(a.length<2)return"";let c=_(a,n),s=n.curve==="rounded",u=P(c),f=new Map;for(let e of o){let i=u[e.segIndex];if(!i)continue;let h=Math.hypot(i.b.x-i.a.x,i.b.y-i.a.y),p=f.get(e.segIndex)??[];p.push({t:e.t,point:e.point,d:e.t*h,r:r.jumpRadius}),f.set(e.segIndex,p)}let d=[`M${A(c[0])}`];for(let e=0;e<u.length;e++){let i=u[e],h=Math.hypot(i.b.x-i.a.x,i.b.y-i.a.y),p=h===0?0:(i.b.x-i.a.x)/h,g=h===0?0:(i.b.y-i.a.y)/h,S=D(i),b=0;if(s&&e>0){let l=L(c[e-1],c[e],c[e+1]??c[e],N);if(l)b=l.cutLen}let x=h,y=null;if(s&&e<u.length-1){if(y=L(c[e],c[e+1],c[e+2]??c[e+1],N),y)x=h-y.cutLen}let I=r.jumpRadius*Y,m=[...f.get(e)??[]].sort((l,E)=>l.t-E.t).filter((l)=>{let E=Math.min(l.d-b,x-l.d)-X;return l.r=Math.min(l.r,E),l.r>=I});for(let l=0;l<m.length-1;l++){let E=m[l+1].d-m[l].d;if(m[l].r+m[l+1].r>E){let O=E/2;m[l].r=Math.min(m[l].r,O),m[l+1].r=Math.min(m[l+1].r,O)}}for(let l of m){if(l.r<I)continue;d.push(...k(l,p,g,S,r.jumpStyle))}if(s&&y)d.push(`L${M(y.startX)},${M(y.startY)}`),d.push(`Q${M(y.ctrlX)},${M(y.ctrlY)} ${M(y.endX)},${M(y.endY)}`);else d.push(`L${A(i.b)}`)}return d.join(" ")}t(H,"rewriteEdgePath");function J(n){return/^[\d\s+,.LMelm-]*$/.test(n)}t(J,"isStraightPath");function U(n){if(!n)return!0;return n==="linear"||n==="rounded"||n==="step"||n==="stepBefore"||n==="stepAfter"}t(U,"curveSupportsLineHops");function j(n){if(!n)return null;try{let o=typeof atob==="function"?atob(n):Buffer.from(n,"base64").toString(),r=JSON.parse(o);if(!Array.isArray(r))return null;let a=[];for(let c of r)if(c&&typeof c.x==="number"&&typeof c.y==="number")a.push({x:c.x,y:c.y});return a.length>=2?a:null}catch{return null}}t(j,"decodeDataPoints");function Zl(n,o,r){if(!r.enabled)return;let a=n.node();if(!a)return;let c=new Map;for(let e of o)c.set(e.id,e);let s=new Map;for(let e of a.querySelectorAll("path[data-id]")){let i=e.getAttribute("data-id");if(i!==null&&!s.has(i))s.set(i,e)}let u=[];for(let e of o){let i=s.get(e.id);if(!i)continue;let p=j(i.getAttribute("data-points"))??e.points;u.push({...e,points:p})}let f=C(u);if(f.length===0)return;let d=new Map;for(let e of f){let i=d.get(e.jumpEdgeId)??[];i.push(e),d.set(e.jumpEdgeId,i)}for(let e of u){let i=d.get(e.id);if(!i||i.length===0)continue;let p=c.get(e.id)?.curve;if(p!==void 0&&!U(p))continue;let g=s.get(e.id);if(!g)continue;if(p===void 0){let m=g.getAttribute("d")??"";if(!J(m))continue}let S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),x=b?Number.parseFloat(b[1]):null,y=b?Number.parseFloat(b[2]):null,I=H(e,i,r);if(g.setAttribute("d",I),x!==null&&y!==null&&typeof g.getTotalLength==="function"){let m=g.getTotalLength(),l=Math.max(0,m-x-y),E=`0 ${x} ${l} ${y}`,O=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",O)}}}t(Zl,"applyLineJumpsToSvg");
1
+ import{t,Zt}from"./index-3amzzsdk.js";var N=5,R=0.00001,X=2,Y=0.6,w=0.000001;function P(n){let o=[];for(let r=0;r<n.length-1;r++)o.push({a:n[r],b:n[r+1]});return o}t(P,"buildSegmentList");function T(n,o,r,a){let c=o.x-n.x,s=o.y-n.y,u=a.x-r.x,f=a.y-r.y,d=c*f-s*u;if(d===0)return null;let e=r.x-n.x,i=r.y-n.y,h=(e*f-i*u)/d,p=(e*s-i*c)/d;if(h<=w||h>=1-w||p<=w||p>=1-w)return null;return{point:{x:n.x+h*c,y:n.y+h*s},tA:h,tB:p}}t(T,"segmentIntersection");function v(n){return Math.abs(n.b.x-n.a.x)>=Math.abs(n.b.y-n.a.y)}t(v,"isHorizontalSeg");function B(n,o,r){if(n.curve!=="rounded")return!1;let a=n.points,c=a[o],s=a[o+1];if(!c||!s)return!1;let u=Math.hypot(s.x-c.x,s.y-c.y),f=r*u,d=o>0?L(a[o-1],c,s,N):null;if(d&&f<d.cutLen)return!0;let e=o+2<a.length?L(c,s,a[o+2],N):null;return e!==null&&u-f<e.cutLen}t(B,"crossingSitsInRoundedCorner");function C(n){let o=[];for(let r=0;r<n.length;r++){let a=n[r],c=P(a.points);for(let s=r+1;s<n.length;s++){let u=n[s],f=P(u.points);for(let[d,e]of c.entries())for(let[i,h]of f.entries()){let p=T(e.a,e.b,h.a,h.b);if(!p)continue;if(B(a,d,p.tA)||B(u,i,p.tB))continue;let g=v(e),S=v(h);if(g!==S?g:!1)o.push({jumpEdgeId:a.id,otherEdgeId:u.id,segIndex:d,t:p.tA,point:p.point});else o.push({jumpEdgeId:u.id,otherEdgeId:a.id,segIndex:i,t:p.tB,point:p.point})}}}return o}t(C,"findEdgeIntersections");function M(n){let o=Math.round(n*1000)/1000;return Number.isInteger(o)?`${o}`:`${o}`}t(M,"fmt");function A(n){return`${M(n.x)},${M(n.y)}`}t(A,"pointToString");function D(n){let o=n.b.x-n.a.x,r=n.b.y-n.a.y;if(Math.abs(o)>=Math.abs(r))return o>=0?1:0;return r>=0?1:0}t(D,"getArcSweepFlag");function _(n,o){if(n.length<2)return n.map((s)=>({...s}));let r=n.map((s)=>({...s})),a=o.arrowTypeStart&&Zt[o.arrowTypeStart];if(a){let s=n[0],u=n[1],f=Math.atan2(u.y-s.y,u.x-s.x);r[0].x=s.x+a*Math.cos(f),r[0].y=s.y+a*Math.sin(f)}let c=o.arrowTypeEnd&&Zt[o.arrowTypeEnd];if(c){let s=n.length,u=n[s-2],f=n[s-1],d=Math.atan2(f.y-u.y,f.x-u.x);r[s-1].x=f.x-c*Math.cos(d),r[s-1].y=f.y-c*Math.sin(d)}return r}t(_,"applyMarkerOffsets");function k(n,o,r,a,c){let s=n.point.x,u=n.point.y,f={x:s-o*n.r,y:u-r*n.r},d={x:s+o*n.r,y:u+r*n.r},e=[`L${A(f)}`];if(c==="arc")e.push(`A${M(n.r)},${M(n.r)} 0 0 ${a} ${A(d)}`);else e.push(`M${A(d)}`);return e}t(k,"emitJump");function L(n,o,r,a){let c=o.x-n.x,s=o.y-n.y,u=r.x-o.x,f=r.y-o.y,d=Math.hypot(c,s),e=Math.hypot(u,f);if(d<R||e<R)return null;let i=c/d,h=s/d,p=u/e,g=f/e,S=i*p+h*g,b=Math.max(-1,Math.min(1,S)),x=Math.acos(b);if(x<R||Math.abs(Math.PI-x)<R)return null;let y=Math.min(a/Math.sin(x/2),d/2,e/2);return{startX:o.x-i*y,startY:o.y-h*y,endX:o.x+p*y,endY:o.y+g*y,ctrlX:o.x,ctrlY:o.y,cutLen:y}}t(L,"computeRoundedCorner");function H(n,o,r){let a=n.points;if(a.length<2)return"";let c=_(a,n),s=n.curve==="rounded",u=P(c),f=new Map;for(let e of o){let i=u[e.segIndex];if(!i)continue;let h=Math.hypot(i.b.x-i.a.x,i.b.y-i.a.y),p=f.get(e.segIndex)??[];p.push({t:e.t,point:e.point,d:e.t*h,r:r.jumpRadius}),f.set(e.segIndex,p)}let d=[`M${A(c[0])}`];for(let e=0;e<u.length;e++){let i=u[e],h=Math.hypot(i.b.x-i.a.x,i.b.y-i.a.y),p=h===0?0:(i.b.x-i.a.x)/h,g=h===0?0:(i.b.y-i.a.y)/h,S=D(i),b=0;if(s&&e>0){let l=L(c[e-1],c[e],c[e+1]??c[e],N);if(l)b=l.cutLen}let x=h,y=null;if(s&&e<u.length-1){if(y=L(c[e],c[e+1],c[e+2]??c[e+1],N),y)x=h-y.cutLen}let I=r.jumpRadius*Y,m=[...f.get(e)??[]].sort((l,E)=>l.t-E.t).filter((l)=>{let E=Math.min(l.d-b,x-l.d)-X;return l.r=Math.min(l.r,E),l.r>=I});for(let l=0;l<m.length-1;l++){let E=m[l+1].d-m[l].d;if(m[l].r+m[l+1].r>E){let O=E/2;m[l].r=Math.min(m[l].r,O),m[l+1].r=Math.min(m[l+1].r,O)}}for(let l of m){if(l.r<I)continue;d.push(...k(l,p,g,S,r.jumpStyle))}if(s&&y)d.push(`L${M(y.startX)},${M(y.startY)}`),d.push(`Q${M(y.ctrlX)},${M(y.ctrlY)} ${M(y.endX)},${M(y.endY)}`);else d.push(`L${A(i.b)}`)}return d.join(" ")}t(H,"rewriteEdgePath");function J(n){return/^[\d\s+,.LMelm-]*$/.test(n)}t(J,"isStraightPath");function U(n){if(!n)return!0;return n==="linear"||n==="rounded"||n==="step"||n==="stepBefore"||n==="stepAfter"}t(U,"curveSupportsLineHops");function j(n){if(!n)return null;try{let o=typeof atob==="function"?atob(n):Buffer.from(n,"base64").toString(),r=JSON.parse(o);if(!Array.isArray(r))return null;let a=[];for(let c of r)if(c&&typeof c.x==="number"&&typeof c.y==="number")a.push({x:c.x,y:c.y});return a.length>=2?a:null}catch{return null}}t(j,"decodeDataPoints");function Zl(n,o,r){if(!r.enabled)return;let a=n.node();if(!a)return;let c=new Map;for(let e of o)c.set(e.id,e);let s=new Map;for(let e of a.querySelectorAll("path[data-id]")){let i=e.getAttribute("data-id");if(i!==null&&!s.has(i))s.set(i,e)}let u=[];for(let e of o){let i=s.get(e.id);if(!i)continue;let p=j(i.getAttribute("data-points"))??e.points;u.push({...e,points:p})}let f=C(u);if(f.length===0)return;let d=new Map;for(let e of f){let i=d.get(e.jumpEdgeId)??[];i.push(e),d.set(e.jumpEdgeId,i)}for(let e of u){let i=d.get(e.id);if(!i||i.length===0)continue;let p=c.get(e.id)?.curve;if(p!==void 0&&!U(p))continue;let g=s.get(e.id);if(!g)continue;if(p===void 0){let m=g.getAttribute("d")??"";if(!J(m))continue}let S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),x=b?Number.parseFloat(b[1]):null,y=b?Number.parseFloat(b[2]):null,I=H(e,i,r);if(g.setAttribute("d",I),x!==null&&y!==null&&typeof g.getTotalLength==="function"){let m=g.getTotalLength(),l=Math.max(0,m-x-y),E=`0 ${x} ${l} ${y}`,O=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",O)}}}t(Zl,"applyLineJumpsToSvg");
2
2
  export{Zl};
@@ -1,2 +1,2 @@
1
- import{d,n,o,i,a,e,p,Q,dn,Ia,Ue,F,S,er,h,He,we,T,Jh,Km,Nd,Zh,Rc}from"./index-dzp9rwy0.js";import{rd}from"./index-4faphth3.js";import"./index-10cxm9ty.js";var Oe={idle:"Kosong",loading:"Memuat",ready:"Siap"},ee="p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors";function ae({url:t,input:r,loading:s,error:l,canGoBack:c,canGoForward:u,viewportMode:f,zoomLevel:m,onInputChange:g,onSubmit:y,onBack:U,onForward:L,onReload:w,onOpenExternal:E,onIncludeInChat:b,onChangeViewport:z,onZoomIn:N,onZoomOut:C,onResetZoom:x,onSetZoom:k,annotate:R,focusKey:A}){let O=i(void 0),D=i(null),G=i(null);o(()=>{if(O.current===t)return;O.current=t;let v=G.current;if(G.current=null,!t)return;if(v!==null&&v!==r)return;g(t)},[t,r,g]);let M=i(A);o(()=>{if(A===void 0||M.current===A)return;if(M.current=A,t)return;D.current?.focus()},[A,t]);let B=(v)=>{G.current=v,g(v)},I=!t?"idle":s?"loading":"ready",P=I==="ready"?"bg-success animate-pulse":I==="loading"?"bg-ink/40 animate-pulse":"bg-ink/25",Z=e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 flex-shrink-0",children:[e("button",{type:"button",onClick:U,disabled:!c,"aria-label":"Back",title:"Back",className:ee,children:e(dn,{size:12})}),e("button",{type:"button",onClick:L,disabled:!u,"aria-label":"Maju",title:"Maju",className:ee,children:e(Ia,{size:12})}),e("button",{type:"button",onClick:w,disabled:!t,"aria-label":"Reload",title:"Reload",className:ee,children:e(S,{size:12,className:s?"animate-spin":void 0})})]});return e(rd,{twoRows:!0,url:t,statusDotClass:P,statusLabel:Oe[I],viewportMode:f,zoomLevel:m,onChangeViewport:z,onZoomIn:N,onZoomOut:C,onResetZoom:x,onSetZoom:k,annotate:R,onIncludeInChat:b,onOpenExternal:E,openExternalLabel:"Buka di tab baru",openExternalTitle:"Buka di tab baru (untuk situs yang menolak iframe)",children:e("div",{className:"flex items-center flex-1 min-w-0 space-x-1.5",children:[Z,e("form",{className:`flex-1 min-w-0 flex items-center bg-canvas border rounded-md px-2 py-1 space-x-1 focus-within:border-ink/40 ${l?"border-error":"border-ink/15"}`,onSubmit:(v)=>{v.preventDefault(),y(r)},children:[e(Ue,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{ref:D,type:"text",value:r,onChange:(v)=>B(v.currentTarget.value),placeholder:"Type an address (e.g. localhost:5173) and press Enter…","aria-label":"Browser address","aria-invalid":l!==void 0&&l!==null,title:l??void 0,spellcheck:!1,autoComplete:"off",className:`w-full min-w-0 bg-transparent outline-none font-mono text-[11px] placeholder:text-ink/35 ${l?"text-error":"text-ink/90"}`})]})]})})}var ie={"desktop-16-9":"w-full max-w-[1280px] aspect-video max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",laptop:"w-[1024px] max-w-full h-[768px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",tablet:"w-[768px] max-w-full h-[1024px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",mobile:"w-[375px] max-w-full h-[667px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto","mobile-lg":"w-[414px] max-w-full h-[896px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto",responsive:"w-full h-full border-0"};function le(t){let r=t.trim();if(!r)return"";try{let s=new URL(r),l=s.pathname==="/"?"":s.pathname;return`${s.hostname}${l}`.slice(0,64)}catch{return r.slice(0,64)}}var X=12,ce=60,ze=8192,de=0;function W(){return de+=1,`tab-${Date.now().toString(36)}-${de}`}function Y(t,r=""){return r?{id:t,history:[r],index:0,frameKey:0}:{id:t,history:[],index:-1,frameKey:0}}function K(t){if(!t||t.index<0)return"";return t.history[t.index]??""}function te(t){return Boolean(t)&&t.index>0}function ne(t){return Boolean(t)&&t.index>=0&&t.index<t.history.length-1}function ue(t,r){if(K(t)===r)return re(t);let s=[...t.history.slice(0,t.index+1),r],l=Math.max(0,s.length-ce),c=l>0?s.slice(l):s;return{...t,history:c,index:c.length-1,frameKey:t.frameKey+1}}function oe(t,r){let s=t.index+r;if(s<0||s>=t.history.length)return t;return{...t,index:s}}function re(t){return{...t,frameKey:t.frameKey+1}}function pe(t,r,s){let l=t.findIndex((f)=>f.id===s);if(l===-1)return{tabs:t,activeId:r};let c=t.filter((f)=>f.id!==s);if(r!==s)return{tabs:c,activeId:r};let u=c[Math.min(l,c.length-1)]??null;return{tabs:c,activeId:u?u.id:null}}function me(t,r){return t.find((s)=>s.id===r)??t[t.length-1]??null}function Fe(t){if(!Array.isArray(t))return[];let r=[];for(let s of t){if(typeof s!=="string")continue;let l=s.trim();if(!l||l.length>ze)continue;if(r.push(l),r.length>=ce)break}return r}function se(t){if(!Array.isArray(t))return[];let r=[],s=new Set;for(let l of t){if(typeof l!=="object"||l===null)continue;let c=l,u=typeof c.id==="string"?c.id.trim():"";if(!u||s.has(u))continue;let f=Fe(c.history),m=typeof c.index==="number"&&Number.isFinite(c.index)?Math.trunc(c.index):-1,g=f.length===0?-1:Math.min(f.length-1,Math.max(0,m===-1?0:m)),y=typeof c.frameKey==="number"&&Number.isFinite(c.frameKey)?Math.trunc(c.frameKey):0;if(s.add(u),r.push({id:u,history:f,index:g,frameKey:Math.max(0,y)}),r.length>=X)break}return r}function fe(t){return le(K(t))||"Tab baru"}var Ke="clipboard-read; clipboard-write; fullscreen";function he({tabs:t,activeTabId:r,loadingTabId:s,viewportMode:l,zoomLevel:c,onLoad:u,active:f=!0,overlay:m,onFrame:g}){let y=i(new Map),U=t.map((w)=>`${w.id}:${w.frameKey}`).join("|");if(o(()=>{g?.(r?y.current.get(r)??null:null)},[r,g,U]),!f)return null;let L=t.filter((w)=>K(w)!=="");if(L.length===0)return e("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center select-none",children:[e("div",{className:"w-12 h-12 rounded-xl bg-ink/5 border border-ink/10 flex items-center justify-center text-ink/40 mb-3",children:e(Ue,{size:22})}),e("h3",{className:"text-sm font-semibold text-ink mb-1",children:"Browser Anda"}),e("p",{className:"text-xs text-ink/60 max-w-sm",children:"Type an address above and press Enter. The page loads inside this panel."}),e("p",{className:"text-[11px] text-ink/45 max-w-sm mt-2",children:"Sebagian situs (Google, GitHub) menolak ditampilkan dalam iframe — pakai tombol buka di tab baru."})]});return e("div",{className:"flex-1 min-h-0 relative flex items-center justify-center p-2 overflow-auto bg-canvas/60",children:L.map((w)=>{let E=K(w),b=w.id===r,z=w.id===s;return e("div",{"data-user-browser-tab":w.id,className:b?"relative flex-1 min-h-0 flex items-center justify-center":"hidden",children:[z?e("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:e("div",{className:"flex items-center space-x-2 px-3 py-1.5 rounded-md bg-paper border border-ink/15",children:[e(p,{size:13,className:"animate-spin text-ink/50"}),e("span",{className:"text-[11px] font-mono text-ink/60",children:"Memuat…"})]})}):null,e("div",{className:`relative flex flex-col bg-white ${ie[l]} transition-all duration-200`,style:{zoom:c!==100?`${c}%`:void 0,transformOrigin:"top center"},children:[e("iframe",{ref:(N)=>{if(N)y.current.set(w.id,N);else y.current.delete(w.id)},src:E,title:`Browser pengguna ${w.id}`,onLoad:()=>u(w.id),referrerPolicy:"no-referrer",allow:Ke,className:"w-full h-full bg-white border-0",style:b&&m?{pointerEvents:"none"}:void 0},`${w.id}:${w.frameKey}`),b?m:null]})]},w.id)})})}var be="cursor-pointer transition-colors";function ge({tabs:t,activeTabId:r,canOpenTab:s,onSelect:l,onClose:c,onNewTab:u}){let f=i(null);return o(()=>{f.current?.scrollIntoView({block:"nearest",inline:"nearest"})},[r,t.length]),e("div",{"data-toolbar-band":"strip",className:"h-8 px-1.5 border-b border-ink/10 bg-paper flex items-center gap-1 flex-shrink-0 select-none",children:[e("div",{className:"flex-1 min-w-0 flex items-center gap-1 overflow-x-auto",children:t.map((m)=>{let g=m.id===r,y=fe(m),U=K(m);return e("div",{ref:g?f:void 0,className:`group flex items-center rounded border flex-shrink-0 ${g?"bg-ink text-canvas border-ink":"bg-paper text-ink/70 border-ink/15 hover:border-ink/35 hover:text-ink"}`,children:[e("button",{type:"button",onClick:()=>l(m.id),"aria-pressed":g,"aria-label":`Tab ${y}`,title:U?`${y}
1
+ import{d,n,o,i,a,e,p,Q,dn,Ia,Ue,F,S,er,h,He,we,T,Jh,Km,Nd,Zh,Rc}from"./index-c8ta3k4g.js";import{rd}from"./index-mgs5nscx.js";import"./index-0btbxkxf.js";var Oe={idle:"Kosong",loading:"Memuat",ready:"Siap"},ee="p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors";function ae({url:t,input:r,loading:s,error:l,canGoBack:c,canGoForward:u,viewportMode:f,zoomLevel:m,onInputChange:g,onSubmit:y,onBack:U,onForward:L,onReload:w,onOpenExternal:E,onIncludeInChat:b,onChangeViewport:z,onZoomIn:N,onZoomOut:C,onResetZoom:x,onSetZoom:k,annotate:R,focusKey:A}){let O=i(void 0),D=i(null),G=i(null);o(()=>{if(O.current===t)return;O.current=t;let v=G.current;if(G.current=null,!t)return;if(v!==null&&v!==r)return;g(t)},[t,r,g]);let M=i(A);o(()=>{if(A===void 0||M.current===A)return;if(M.current=A,t)return;D.current?.focus()},[A,t]);let B=(v)=>{G.current=v,g(v)},I=!t?"idle":s?"loading":"ready",P=I==="ready"?"bg-success animate-pulse":I==="loading"?"bg-ink/40 animate-pulse":"bg-ink/25",Z=e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 flex-shrink-0",children:[e("button",{type:"button",onClick:U,disabled:!c,"aria-label":"Back",title:"Back",className:ee,children:e(dn,{size:12})}),e("button",{type:"button",onClick:L,disabled:!u,"aria-label":"Maju",title:"Maju",className:ee,children:e(Ia,{size:12})}),e("button",{type:"button",onClick:w,disabled:!t,"aria-label":"Reload",title:"Reload",className:ee,children:e(S,{size:12,className:s?"animate-spin":void 0})})]});return e(rd,{twoRows:!0,url:t,statusDotClass:P,statusLabel:Oe[I],viewportMode:f,zoomLevel:m,onChangeViewport:z,onZoomIn:N,onZoomOut:C,onResetZoom:x,onSetZoom:k,annotate:R,onIncludeInChat:b,onOpenExternal:E,openExternalLabel:"Buka di tab baru",openExternalTitle:"Buka di tab baru (untuk situs yang menolak iframe)",children:e("div",{className:"flex items-center flex-1 min-w-0 space-x-1.5",children:[Z,e("form",{className:`flex-1 min-w-0 flex items-center bg-canvas border rounded-md px-2 py-1 space-x-1 focus-within:border-ink/40 ${l?"border-error":"border-ink/15"}`,onSubmit:(v)=>{v.preventDefault(),y(r)},children:[e(Ue,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{ref:D,type:"text",value:r,onChange:(v)=>B(v.currentTarget.value),placeholder:"Type an address (e.g. localhost:5173) and press Enter…","aria-label":"Browser address","aria-invalid":l!==void 0&&l!==null,title:l??void 0,spellcheck:!1,autoComplete:"off",className:`w-full min-w-0 bg-transparent outline-none font-mono text-[11px] placeholder:text-ink/35 ${l?"text-error":"text-ink/90"}`})]})]})})}var ie={"desktop-16-9":"w-full max-w-[1280px] aspect-video max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",laptop:"w-[1024px] max-w-full h-[768px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",tablet:"w-[768px] max-w-full h-[1024px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",mobile:"w-[375px] max-w-full h-[667px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto","mobile-lg":"w-[414px] max-w-full h-[896px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto",responsive:"w-full h-full border-0"};function le(t){let r=t.trim();if(!r)return"";try{let s=new URL(r),l=s.pathname==="/"?"":s.pathname;return`${s.hostname}${l}`.slice(0,64)}catch{return r.slice(0,64)}}var X=12,ce=60,ze=8192,de=0;function W(){return de+=1,`tab-${Date.now().toString(36)}-${de}`}function Y(t,r=""){return r?{id:t,history:[r],index:0,frameKey:0}:{id:t,history:[],index:-1,frameKey:0}}function K(t){if(!t||t.index<0)return"";return t.history[t.index]??""}function te(t){return Boolean(t)&&t.index>0}function ne(t){return Boolean(t)&&t.index>=0&&t.index<t.history.length-1}function ue(t,r){if(K(t)===r)return re(t);let s=[...t.history.slice(0,t.index+1),r],l=Math.max(0,s.length-ce),c=l>0?s.slice(l):s;return{...t,history:c,index:c.length-1,frameKey:t.frameKey+1}}function oe(t,r){let s=t.index+r;if(s<0||s>=t.history.length)return t;return{...t,index:s}}function re(t){return{...t,frameKey:t.frameKey+1}}function pe(t,r,s){let l=t.findIndex((f)=>f.id===s);if(l===-1)return{tabs:t,activeId:r};let c=t.filter((f)=>f.id!==s);if(r!==s)return{tabs:c,activeId:r};let u=c[Math.min(l,c.length-1)]??null;return{tabs:c,activeId:u?u.id:null}}function me(t,r){return t.find((s)=>s.id===r)??t[t.length-1]??null}function Fe(t){if(!Array.isArray(t))return[];let r=[];for(let s of t){if(typeof s!=="string")continue;let l=s.trim();if(!l||l.length>ze)continue;if(r.push(l),r.length>=ce)break}return r}function se(t){if(!Array.isArray(t))return[];let r=[],s=new Set;for(let l of t){if(typeof l!=="object"||l===null)continue;let c=l,u=typeof c.id==="string"?c.id.trim():"";if(!u||s.has(u))continue;let f=Fe(c.history),m=typeof c.index==="number"&&Number.isFinite(c.index)?Math.trunc(c.index):-1,g=f.length===0?-1:Math.min(f.length-1,Math.max(0,m===-1?0:m)),y=typeof c.frameKey==="number"&&Number.isFinite(c.frameKey)?Math.trunc(c.frameKey):0;if(s.add(u),r.push({id:u,history:f,index:g,frameKey:Math.max(0,y)}),r.length>=X)break}return r}function fe(t){return le(K(t))||"Tab baru"}var Ke="clipboard-read; clipboard-write; fullscreen";function he({tabs:t,activeTabId:r,loadingTabId:s,viewportMode:l,zoomLevel:c,onLoad:u,active:f=!0,overlay:m,onFrame:g}){let y=i(new Map),U=t.map((w)=>`${w.id}:${w.frameKey}`).join("|");if(o(()=>{g?.(r?y.current.get(r)??null:null)},[r,g,U]),!f)return null;let L=t.filter((w)=>K(w)!=="");if(L.length===0)return e("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center select-none",children:[e("div",{className:"w-12 h-12 rounded-xl bg-ink/5 border border-ink/10 flex items-center justify-center text-ink/40 mb-3",children:e(Ue,{size:22})}),e("h3",{className:"text-sm font-semibold text-ink mb-1",children:"Browser Anda"}),e("p",{className:"text-xs text-ink/60 max-w-sm",children:"Type an address above and press Enter. The page loads inside this panel."}),e("p",{className:"text-[11px] text-ink/45 max-w-sm mt-2",children:"Sebagian situs (Google, GitHub) menolak ditampilkan dalam iframe — pakai tombol buka di tab baru."})]});return e("div",{className:"flex-1 min-h-0 relative flex items-center justify-center p-2 overflow-auto bg-canvas/60",children:L.map((w)=>{let E=K(w),b=w.id===r,z=w.id===s;return e("div",{"data-user-browser-tab":w.id,className:b?"relative flex-1 min-h-0 flex items-center justify-center":"hidden",children:[z?e("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:e("div",{className:"flex items-center space-x-2 px-3 py-1.5 rounded-md bg-paper border border-ink/15",children:[e(p,{size:13,className:"animate-spin text-ink/50"}),e("span",{className:"text-[11px] font-mono text-ink/60",children:"Memuat…"})]})}):null,e("div",{className:`relative flex flex-col bg-white ${ie[l]} transition-all duration-200`,style:{zoom:c!==100?`${c}%`:void 0,transformOrigin:"top center"},children:[e("iframe",{ref:(N)=>{if(N)y.current.set(w.id,N);else y.current.delete(w.id)},src:E,title:`Browser pengguna ${w.id}`,onLoad:()=>u(w.id),referrerPolicy:"no-referrer",allow:Ke,className:"w-full h-full bg-white border-0",style:b&&m?{pointerEvents:"none"}:void 0},`${w.id}:${w.frameKey}`),b?m:null]})]},w.id)})})}var be="cursor-pointer transition-colors";function ge({tabs:t,activeTabId:r,canOpenTab:s,onSelect:l,onClose:c,onNewTab:u}){let f=i(null);return o(()=>{f.current?.scrollIntoView({block:"nearest",inline:"nearest"})},[r,t.length]),e("div",{"data-toolbar-band":"strip",className:"h-8 px-1.5 border-b border-ink/10 bg-paper flex items-center gap-1 flex-shrink-0 select-none",children:[e("div",{className:"flex-1 min-w-0 flex items-center gap-1 overflow-x-auto",children:t.map((m)=>{let g=m.id===r,y=fe(m),U=K(m);return e("div",{ref:g?f:void 0,className:`group flex items-center rounded border flex-shrink-0 ${g?"bg-ink text-canvas border-ink":"bg-paper text-ink/70 border-ink/15 hover:border-ink/35 hover:text-ink"}`,children:[e("button",{type:"button",onClick:()=>l(m.id),"aria-pressed":g,"aria-label":`Tab ${y}`,title:U?`${y}
2
2
  ${U}`:y,className:`pl-2 pr-1 py-0.5 text-[11px] font-mono max-w-[150px] truncate ${be}`,children:y}),e("button",{type:"button",onClick:()=>c(m.id),"aria-label":`Tutup tab ${y}`,title:`Tutup tab ${y}`,className:`mr-0.5 p-1 rounded hover:bg-error hover:text-paper ${be} ${g?"text-on-ink-muted":"text-ink/40 opacity-0 group-hover:opacity-100 focus-visible:opacity-100"}`,children:e(h,{size:11})})]},m.id)})}),e("button",{type:"button",onClick:u,disabled:!s,"aria-label":"Tab baru",title:s?"Tab baru":`Maksimal ${X} tab`,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink disabled:opacity-30 disabled:hover:bg-transparent disabled:cursor-not-allowed cursor-pointer transition-colors flex-shrink-0",children:e(F,{size:13})})]})}var xe="w-full min-w-0 bg-canvas border border-ink/15 rounded px-2 py-1 text-[11px] font-mono text-ink placeholder:text-ink/35 focus:outline-none focus:border-ink/40";function De(t){if(!t||t.ok)return null;if(t.reason==="cross-origin")return"This page is cross-origin, so its elements cannot be read. Name the part and add a note instead.";if(t.reason==="no-frame")return"The page has not loaded, so its elements cannot be read yet.";return"There is no element at this point (empty space). Name the part instead."}function ve({shape:t,index:r,readability:s,onLabel:l,onNote:c}){let u=De(s),f=t.element;return e("div",{className:"flex items-start gap-1.5 min-w-0",children:[e("span",{className:"text-[11px] font-mono text-ink/45 pt-1 flex-shrink-0",children:[Nd[t.tool]," #",r]}),e("div",{className:"flex-1 min-w-0 space-y-1",children:[e("div",{className:"flex items-center gap-1 flex-wrap",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/40",children:"bagian"}),Zh.map((m)=>{let g=t.label===m;return e("button",{type:"button",onClick:()=>l(g?"":m),"aria-pressed":g,className:`px-1.5 py-0.5 rounded-full border text-[10px] font-mono transition-colors cursor-pointer ${g?"bg-ink text-canvas border-ink":"bg-canvas text-ink/65 border-ink/15 hover:border-ink/40"}`,children:m},m)}),e("input",{value:t.label,onInput:(m)=>l(m.currentTarget.value),placeholder:"or type your own…","aria-label":"Name of the marked part",spellcheck:!1,className:`${xe} flex-1 min-w-[110px]`})]}),e("textarea",{value:t.note,onInput:(m)=>c(m.currentTarget.value),placeholder:"What is wrong with this part? (e.g. the Pay button looks disabled)",rows:2,"aria-label":"Annotation note",className:`${xe} resize-y`}),f?e("p",{className:"text-[10px] font-mono text-ink/45 truncate",title:f.path,children:["elemen: ",f.path,f.state?` · ${f.state}`:""]}):null,u?e("p",{className:"text-[10px] text-ink/40",children:u}):null]})]})}var Ge=["box","pin","arrow"],Ve="px-2 py-1 rounded text-[11px] font-mono border transition-colors cursor-pointer",j="flex items-center gap-1 px-2 py-1 rounded text-[11px] border border-ink/15 hover:border-ink/40 text-ink/80 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed";function ye({tool:t,shapes:r,selectedId:s,readability:l,onTool:c,onLabel:u,onNote:f,onRemove:m,onReset:g,onCancel:y,onSend:U}){let L=r.find((E)=>E.id===s)??null,w=r.length>0;return e("div",{className:"flex-shrink-0 border-b border-ink/10 bg-paper px-2.5 py-1.5 space-y-1.5 select-none",children:[e("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/50 mr-1",children:"Anotasi"}),Ge.map((E)=>e("button",{type:"button",onClick:()=>c(E),"aria-pressed":t===E,className:`${Ve} ${t===E?"bg-ink text-canvas border-ink":"bg-canvas text-ink/70 border-ink/15 hover:border-ink/40"}`,children:Nd[E]},E)),e("span",{className:"text-[11px] font-mono text-ink/45 ml-1",children:r.length>0?`${r.length} mark${r.length===1?"":"s"}`:"drag on the page to mark a part"}),e("div",{className:"flex-1"}),e("button",{type:"button",onClick:g,disabled:!w,className:j,title:"Clear all marks",children:[e(Q,{size:12})," Bersihkan"]}),e("button",{type:"button",onClick:U,disabled:!w,className:j,title:"Kirim anotasi ke draft chat",children:[e(er,{size:12})," Kirim ke chat"]}),e("button",{type:"button",onClick:y,className:j,title:"Tutup mode anotasi",children:e(h,{size:12})})]}),L?e("div",{className:"flex items-start gap-1.5",children:[e("div",{className:"flex-1 min-w-0",children:e(ve,{shape:L,index:r.indexOf(L)+1,readability:l,onLabel:(E)=>u(L.id,E),onNote:(E)=>f(L.id,E)})}),e("button",{type:"button",onClick:()=>m(L.id),className:j,title:"Remove this mark",children:e(Q,{size:12})})]}):e("p",{className:"text-[11px] text-ink/45",children:"This page cannot be screenshotted, so what gets sent is the area, the part name and your note."})]})}var Te=0;function ke(){return Te+=1,`annot-${Date.now().toString(36)}-${Te}`}function Ae(t){let[r,s]=n(!1),[l,c]=n("box"),[u,f]=n([]),[m,g]=n(null);o(()=>{f([]),g(null)},[t]);let y=a(()=>{s((N)=>!N),g(null)},[]),U=a(()=>{g(null),s(!1)},[]),L=a((N)=>{f((C)=>[...C,N]),g(N.id)},[]),w=a((N,C)=>{f((x)=>x.map((k)=>k.id===N?{...k,note:C}:k))},[]),E=a((N,C)=>{f((x)=>x.map((k)=>k.id===N?{...k,label:C}:k))},[]),b=a((N)=>{f((C)=>C.filter((x)=>x.id!==N)),g((C)=>C===N?null:C)},[]),z=a(()=>{f([]),g(null)},[]);return{active:r,tool:l,shapes:u,selectedId:m,setTool:c,toggle:y,close:U,add:L,setNote:w,setLabel:E,select:g,remove:b,reset:z}}var Xe=4,V="var(--theme-error)";function Be({shapes:t,tool:r,selectedId:s,onMeasure:l,onAdd:c,onSelect:u}){let f=i(null),m=i(null),[g,y]=n(null),[U,L]=n({width:0,height:0});o(()=>{let x=f.current;if(!x)return;let k=()=>{let A=x.getBoundingClientRect();if(A.width<=0||A.height<=0)return;L((O)=>O.width===A.width&&O.height===A.height?O:{width:A.width,height:A.height}),l({width:A.width,height:A.height})};if(k(),typeof ResizeObserver!=="function")return;let R=new ResizeObserver(k);return R.observe(x),()=>R.disconnect()},[l]);let w=(x)=>{let k=f.current;if(!k)return null;let R=k.getBoundingClientRect(),A={x:x.clientX-R.left,y:x.clientY-R.top};return{normalized:Jh(R,A),px:A.x,py:A.y}},E=(x)=>{if(x.button!==0)return;let k=w(x);if(!k)return;x.preventDefault(),u(null),x.currentTarget.setPointerCapture?.(x.pointerId);let R={id:ke(),tool:r,start:k.normalized,end:k.normalized,label:"",note:""};m.current=R,y(R)},b=(x)=>{let k=m.current;if(!k)return;let R=w(x);if(!R)return;let A={...k,end:R.normalized};m.current=A,y(A)},z=(x)=>{let k=m.current;if(!k)return;let R=w(x),A=R?{...k,end:R.normalized}:k;if(m.current=null,y(null),x.currentTarget.releasePointerCapture?.(x.pointerId),A.tool!=="pin"){let O=f.current?.getBoundingClientRect();if((O?Math.hypot((A.end.x-A.start.x)*O.width,(A.end.y-A.start.y)*O.height):0)<Xe)return}c(A)},N=()=>{m.current=null,y(null)},C=g?[...t,g]:t;return e("div",{ref:f,className:"absolute inset-0 cursor-crosshair touch-none",onPointerDown:E,onPointerMove:b,onPointerUp:z,onPointerCancel:N,children:e("svg",{className:"absolute inset-0 w-full h-full",viewBox:`0 0 ${Math.max(1,U.width)} ${Math.max(1,U.height)}`,preserveAspectRatio:"none","aria-label":"Page annotation area",children:C.map((x,k)=>e(We,{shape:x,index:k+1,box:U,selected:x.id===s,onSelect:()=>u(x.id)},x.id))})})}function We({shape:t,index:r,box:s,selected:l,onSelect:c}){let u={x:t.start.x*s.width,y:t.start.y*s.height},f={x:t.end.x*s.width,y:t.end.y*s.height},m=Km(t),g=l?3:2,y=String(r);return e("g",{onPointerDown:(L)=>{L.stopPropagation(),L.preventDefault(),c()},className:"cursor-pointer",children:[t.tool==="box"&&e("rect",{x:m.x*s.width,y:m.y*s.height,width:Math.max(1,m.width*s.width),height:Math.max(1,m.height*s.height),fill:V,fillOpacity:l?0.16:0.1,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke",rx:3}),t.tool==="arrow"&&e(d,{children:[e("line",{x1:u.x,y1:u.y,x2:f.x,y2:f.y,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke"}),e("circle",{cx:f.x,cy:f.y,r:4,fill:V})]}),t.tool==="pin"&&e("circle",{cx:u.x,cy:u.y,r:7,fill:V,fillOpacity:l?0.5:0.3,stroke:V,strokeWidth:g}),e("circle",{cx:u.x,cy:u.y,r:9,fill:V}),e("text",{x:u.x,y:u.y,textAnchor:"middle",dominantBaseline:"central",fontSize:11,fontWeight:700,fill:"var(--theme-paper)",children:y})]})}function Ee(t){let r=t.trim();if(!r)return r;let s=/^[a-z][a-z0-9+.-]*:/i.test(r)?r:`https://${r}`,l=new URL(s);if(l.protocol!=="http:"&&l.protocol!=="https:")throw Error("Only http and https URLs are allowed");return l.toString()}var Ne="userBrowser.tabs",Se="userBrowser.activeTabId",Ze="userBrowser.inputUrl",Ye="userBrowser.history",je="userBrowser.historyIndex";function Me(){let[t,r]=T(Ne,[]),[s,l]=T(Se,null),[c,u]=T(Ze,""),[f,m]=n(null),[g,y]=n(void 0),{sessionId:U,ready:L}=He(),w=i(null),E=(M,B)=>we(U,M)??B,b=me(t,s),z=K(b);o(()=>{if(!L||w.current===U)return;w.current=U;let M=E(Ne,[]),B=se(M);if(B.length>0){if(JSON.stringify(B)!==JSON.stringify(M))r(B);let Z=E(Se,null);if(!B.some((v)=>v.id===Z))l(B[B.length-1].id);return}let[I]=se([{id:W(),history:E(Ye,[]),index:E(je,-1),frameKey:0}]),P=I&&I.history.length>0?I:Y(W());r([P]),l(P.id)},[L,U,r,l]);let N=a((M,B)=>{r((I)=>I.map((P)=>P.id===M?B(P):P))},[r]),C=a((M)=>{let B=M.trim();if(!B)return;let I;try{I=Ee(B)}catch(P){y(P instanceof Error?P.message:"Alamat tidak valid");return}if(y(void 0),u(I),!b){let P=Y(W(),I);r([P]),l(P.id),m(P.id);return}m(b.id),N(b.id,(P)=>ue(P,I))},[b,l,u,r,N]),x=a(()=>{if(!b||!te(b))return;m(b.id),N(b.id,(M)=>oe(M,-1))},[b,N]),k=a(()=>{if(!b||!ne(b))return;m(b.id),N(b.id,(M)=>oe(M,1))},[b,N]),R=a(()=>{if(!b||!z)return;m(b.id),N(b.id,re)},[b,z,N]),A=a((M)=>{m((B)=>B===M?null:B)},[]),O=a(()=>{if(t.length>=X)return;let M=Y(W());r((B)=>[...B,M]),l(M.id),u(""),y(void 0)},[l,u,r,t.length]),D=a((M)=>{let B=t.find((I)=>I.id===M);if(!B)return;l(M),u(K(B)),y(void 0)},[l,u,t]),G=a((M)=>{let B=pe(t,s,M);if(B.tabs.length===0){let I=Y(W());r([I]),l(I.id),u("");return}if(r(B.tabs),B.activeId!==s){l(B.activeId);let I=B.tabs.find((P)=>P.id===B.activeId);u(K(I)),y(void 0)}},[s,l,u,r,t]);return{tabs:t,activeTab:b,activeTabId:b?.id??null,url:z,input:c,setInput:u,frameKey:b?.frameKey??0,loading:f!==null&&f===b?.id,error:g,canGoBack:te(b),canGoForward:ne(b),canOpenTab:t.length<X,submit:C,goBack:x,goForward:k,reload:R,markLoaded:A,openTab:O,selectTab:D,closeTab:G}}function qe(t){if(!t)return"no-frame";try{return t.contentDocument?"readable":"cross-origin"}catch{return"cross-origin"}}function q(t){let r=t.replace(/\s+/g," ").trim();return r.length>60?`${r.slice(0,59)}…`:r}function Je(t){let r=t.tagName.toLowerCase();if(t.id)return`${r}#${t.id}`;for(let l of["data-testid","data-test","aria-label"]){let c=t.getAttribute(l);if(c)return`${r}[${l}="${q(c)}"]`}let s=t.getAttribute("role");if(s)return`${r}[role="${s}"]`;return r}function Qe(t){let r=[],s=t;while(s&&r.length<4){if(s.tagName.toLowerCase()==="html")break;r.unshift(Je(s)),s=s.parentElement}return r.join(" > ")}function et(t){let r=[];if(t.disabled)r.push("nonaktif");if(t instanceof HTMLSelectElement||t.tagName.toLowerCase()==="select"){let s=t,c=s.selectedOptions?.[0]?.textContent?.trim()||s.value;if(c)r.push(`nilai "${q(c)}"`);let u=s.options?.length??0;if(u>0)r.push(`${u} opsi`)}else if(t.tagName.toLowerCase()==="input"){let s=t;if(s.type)r.push(`tipe ${s.type}`);if(s.type!=="password"&&s.placeholder)r.push(`placeholder "${q(s.placeholder)}"`)}return r.length>0?r.join(", "):void 0}function tt(t){let r={path:Qe(t),tag:t.tagName.toLowerCase()},s=t.getAttribute("role");if(s)r.role=s;let l=q(t.innerText??t.textContent??"");if(l)r.text=l;let c=et(t);if(c)r.state=c;return r}function Le(t,r){let s=qe(t);if(s!=="readable")return{ok:!1,reason:s};let{contentWindow:l,contentDocument:c}=t;if(!l||!c)return{ok:!1,reason:"cross-origin"};try{let u=Math.min(Math.max(r.x,0),1)*l.innerWidth,f=Math.min(Math.max(r.y,0),1)*l.innerHeight,m=c.elementFromPoint(u,f);if(!m||m===c.documentElement||m===c.body)return{ok:!1,reason:"no-element"};return{ok:!0,element:tt(m)}}catch{return{ok:!1,reason:"cross-origin"}}}function on({className:t="",active:r=!0}){let[s,l]=T("userBrowser.viewportMode","responsive"),[c,u]=T("userBrowser.zoomLevel",100),[f,m]=n(null),[g,y]=n(null),[U,L]=n(null),{tabs:w,activeTabId:E,url:b,input:z,setInput:N,loading:C,error:x,canGoBack:k,canGoForward:R,canOpenTab:A,submit:O,goBack:D,goForward:G,reload:M,markLoaded:B,openTab:I,selectTab:P,closeTab:Z}=Me(),v=Ae(`${E??""}:${w.find((_)=>_.id===E)?.frameKey??0}`),Ie=a(()=>{if(!b)return;window.open(b,"_blank","noopener,noreferrer")},[b]),Re=a(()=>{if(!b)return;Rc({url:b})},[b]),Pe=a((_)=>{m((H)=>H&&H.width===_.width&&H.height===_.height?H:_)},[]),Ce=a((_)=>{let H=Le(g,_.start);L(H),v.add(H.ok?{..._,element:H.element}:_)},[v,g]),_e=a(()=>{if(!b||v.shapes.length===0)return;let _=c/100;Rc({url:b,annotations:v.shapes,panel:{width:(f?.width??0)/_,height:(f?.height??0)/_,viewportMode:s,zoom:c}}),v.close()},[b,v,f,s,c]),J=v.active&&Boolean(b),$e=C?E??null:null;return e("div",{"data-user-browser-panel":"",className:`flex flex-col h-full w-full bg-paper text-ink overflow-hidden ${t}`,children:[e(ge,{tabs:w,activeTabId:E,canOpenTab:A,onSelect:P,onClose:Z,onNewTab:I}),e(ae,{url:b,input:z,loading:C,error:x,canGoBack:k,canGoForward:R,viewportMode:s,zoomLevel:c,onInputChange:N,onSubmit:O,onBack:D,onForward:G,onReload:M,onOpenExternal:Ie,onIncludeInChat:Re,onChangeViewport:l,onZoomIn:()=>u((_)=>Math.min(200,_+10)),onZoomOut:()=>u((_)=>Math.max(50,_-10)),onResetZoom:()=>u(100),onSetZoom:u,focusKey:E??void 0,annotate:{active:J,count:v.shapes.length,onToggle:v.toggle}}),J&&e(ye,{tool:v.tool,shapes:v.shapes,selectedId:v.selectedId,readability:U,onTool:v.setTool,onLabel:v.setLabel,onNote:v.setNote,onRemove:v.remove,onReset:v.reset,onCancel:v.close,onSend:_e}),e(he,{tabs:w,activeTabId:E,loadingTabId:$e,viewportMode:s,zoomLevel:c,onLoad:B,onFrame:y,active:r,overlay:J?e(Be,{shapes:v.shapes,tool:v.tool,selectedId:v.selectedId,onMeasure:Pe,onAdd:Ce,onSelect:v.select}):null})]})}export{on as UserBrowserPanel};
@@ -0,0 +1,2 @@
1
+ import{n,N,se,bs,aA}from"./index-c8ta3k4g.js";var r={left:aA.left,right:aA.right},a="omp:mobile-panel-nav-changed";function s(e,t){return bs(N(r[e],t))}function ug(e,t){if(typeof window>"u")return;window.dispatchEvent(new CustomEvent(a,{detail:{side:e,style:bs(t)}}))}function rp(e){let[t,i]=n(()=>s(e));return se(a,(l)=>{let o=l.detail;if(o?.side!==e)return;i(bs(o.style))}),t}
2
+ export{ug,rp};
@@ -1,2 +1,2 @@
1
- import{d,n,o,i,u,a,e,s,p,I,ra,as,f,ae,en,de,S,U,Fo,Nm,X,Bt,eA,Mm,Sd}from"./index-dzp9rwy0.js";var q={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]},wm=s(q);function O({row:t,active:r,name:l,loading:h,onSelect:c,onCopyPath:g,onReveal:N}){return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_3.5rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:r&&e(f,{size:12,className:"text-ink","aria-label":"Selected repository"})}),e("button",{type:"button",onClick:c,disabled:r||!t.isRepo,title:!t.isRepo?t.error??"Not a git repository":r?"Already showing this repository":`Show ${t.path}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(de,{size:11,className:r?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${r?"font-semibold text-ink":"text-ink/90"}`,children:l})]})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[e("button",{type:"button",onClick:g,disabled:h,title:`Copy the absolute path of ${t.path}`,"aria-label":`Copy path of ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-default",children:e(ae,{size:11})}),e("button",{type:"button",onClick:N,title:`Reveal ${t.path} in the file manager`,"aria-label":`Reveal ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(en,{size:11})})]}),e("div",{className:"col-start-2 col-span-2 flex flex-wrap items-center gap-x-2 gap-y-0.5 min-w-0 mt-0.5",children:[t.isRepo?e(d,{children:[e("span",{className:`text-[10px] font-mono truncate ${t.detached?"text-warning":"text-ink/50"}`,title:t.detached?`Detached HEAD at ${t.branch}`:`On branch ${t.branch}`,children:t.branch}),e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e(Q,{row:t})]}):e("span",{className:"text-[10px] text-ink/40 truncate",children:t.error??"Not a git repository"}),t.isRepo&&t.subject&&e(d,{children:[e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e("span",{className:"text-[10px] text-ink/40 truncate min-w-0",title:t.subject,children:t.subject})]})]})]})}function Q({row:t}){let r=[];if(t.operation)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:t.operation==="stash-pop"?`A stash pop stopped on ${t.conflicts} conflict(s)`:`A ${Fo[t.operation]} is in progress, stopped on ${t.conflicts} conflict(s)`,children:[e(I,{size:9}),Fo[t.operation]]},"operation"));else if(t.conflicts>0)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.conflicts} conflicted path(s)`,children:[e(I,{size:9}),t.conflicts]},"conflicts"));if(t.changed>0||t.untracked>0)r.push(e("span",{className:"flex-shrink-0 rounded border border-info/30 px-1 text-[10px] font-mono tabular-nums text-info",title:`${t.changed} changed, ${t.untracked} untracked`,children:[t.changed>0?`${t.changed}±`:"",t.changed>0&&t.untracked>0?" ":"",t.untracked>0?`${t.untracked}?`:""]},"dirty"));if(t.gone)r.push(e("span",{className:"flex-shrink-0 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"},"gone"));else if(t.upstream&&(t.ahead>0||t.behind>0))r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 text-[10px] font-mono tabular-nums text-ink/60",title:`${t.ahead} ahead of, ${t.behind} behind ${t.upstream}`,children:[t.ahead>0&&e("span",{className:"flex items-center",children:[e(as,{size:9}),t.ahead]}),t.behind>0&&e("span",{className:"flex items-center",children:[e(ra,{size:9}),t.behind]})]},"track"));if(r.length===0)return e("span",{className:"text-[10px] font-mono text-ink/30",title:"Nothing to report: clean and in sync",children:"clean, in sync"});return e(d,{children:r})}function H(t){let{open:r,rootPath:l,scanning:h}=t,[c,g]=n([]),[N,k]=n(!1),[C,A]=n(!1),[z,y]=n(null),[D,E]=n(0),j=t.repos.join("\x00"),G=i(!0),b=i(null);o(()=>(G.current=!0,()=>{G.current=!1,b.current?.abort(),b.current=null}),[]);let M=a(async()=>{b.current?.abort();let v=new AbortController;b.current=v,A(!0),k(!0);try{let R=new URLSearchParams({repoDetails:"1"});if(l)R.set("root",l);let w=await fetch(`/api/fs/git?${R.toString()}`,{signal:v.signal}),F=await w.json();if(!G.current||b.current!==v)return;if(!w.ok||!Array.isArray(F.details)){y(F.error||`Failed to read repositories (HTTP ${w.status})`);return}g(F.details),y(null)}catch(R){if(!G.current||b.current!==v)return;if(R instanceof Error&&R.name==="AbortError")return;y(R instanceof Error?R.message:"Failed to read repositories")}finally{if(G.current&&b.current===v)b.current=null,A(!1),k(!1)}},[l]);o(()=>{if(!r){g([]),y(null),k(!1);return}M()},[r,M,j,h,D]);let L=a(()=>E((v)=>v+1),[]);return{details:c,loading:N,reading:C,error:z,refresh:L}}function B(t){let r=new Map;for(let l of t){if(!l||l==="."){if(!r.has(""))r.set("",{key:"",label:null,paths:[]});r.get("").paths.push(".");continue}let h=l.indexOf("/"),c=h===-1?"":l.slice(0,h),g=r.get(c);if(!g)g={key:c,label:c===""?null:c,paths:[]},r.set(c,g);g.paths.push(l)}for(let l of r.values())l.paths.sort((h,c)=>h==="."?-1:c==="."?1:h.localeCompare(c));return[...r.values()].sort((l,h)=>{if(l.key==="")return-1;if(h.key==="")return 1;return l.key.localeCompare(h.key)})}function _(t,r){if(t===".")return"workspace root";if(r==="")return t;return t.slice(r.length+1)}function W({isOpen:t,rootPath:r,activeRepo:l,repos:h,scanning:c,onSelectRepo:g,onRefreshRepos:N,onClose:k}){let[C,A]=n(""),[z,y]=n(null),{details:D,loading:E,reading:j,error:G,refresh:b}=H({open:t,rootPath:r,repos:h,scanning:c});o(()=>{if(!t)A(""),y(null)},[t]);let M=u(()=>{let x=C.trim().toLowerCase();if(!x)return D;return D.filter((m)=>m.path.toLowerCase().includes(x))},[D,C]),L=u(()=>B(M.map((x)=>x.path)),[M]),v=u(()=>{let x=new Map;for(let m of D)x.set(m.path,m);return x},[D]),R=a(()=>{N(),b()},[N,b]),w=a(async(x)=>{let m=r?Sd(r,x==="."?"":x):x,P=await Bt(m);y(P?{text:`Copied ${m}`,kind:"success"}:{text:"Clipboard unavailable",kind:"error"})},[r]),F=a(async(x)=>{let m=new FormData;if(m.append("actionType","open_explorer"),m.append("path","."),m.append("repo",x),r)m.append("root",r);try{let P=await fetch("/api/fs/action",{method:"POST",body:m}),T=await P.json();if(!P.ok||T.error)y({text:T.error||"Could not open the file manager",kind:"error"})}catch{y({text:"Could not open the file manager",kind:"error"})}},[r]);if(!t)return null;return e(X,{onClose:k,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e(wm,{size:14,className:"text-ink/60 flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Repositories"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:[h.length," in this workspace"]})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(U,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:C,onChange:(x)=>A(x.currentTarget.value),placeholder:"Filter repositories…","aria-label":"Filter repositories",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:R,disabled:j||c,title:"Re-discover repositories and re-read their state","aria-label":"Refresh repositories",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(S,{size:12,className:j||c?"animate-spin":""})})]}),c&&e("div",{className:"px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono text-ink/50 flex items-center gap-1.5",children:[e(p,{size:10,className:"animate-spin"}),"Still discovering repositories in this workspace…"]}),z&&e("div",{className:`px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono truncate ${z.kind==="error"?"text-error":"text-ink/60"}`,title:z.text,role:"status",children:z.text}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:E&&D.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(p,{size:14,className:"animate-spin text-info"}),"Reading repositories…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):M.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:C.trim()?"No matching repositories.":"No repositories in this workspace."}):L.map((x)=>e("div",{children:[e("div",{className:"px-4 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold bg-canvas/40 border-b border-ink/5 sticky top-0",children:x.label??eA(".",r)}),x.paths.map((m)=>{let P=v.get(m);if(!P)return null;return e(O,{row:P,active:m===l,name:_(m,x.key),loading:j,onSelect:()=>{g(m),k()},onCopyPath:()=>void w(m),onReveal:()=>void F(m)},m)})]},x.key))})]})}function Tr({rootPath:t,activeRepo:r,onSelectRepo:l,repos:h,scanning:c,onRefreshRepos:g}){let[N,k]=n(!1),C=u(()=>({root:t??null,repo:r,rows:Mm(t,h),scanning:c,ready:!0,setRepo:l,refresh:g}),[t,r,h,c,l,g]),A=a(()=>k(!0),[]);return e("div",{className:"relative min-w-0",children:[e(Nm,{scope:C,onManage:A}),e(W,{isOpen:N,rootPath:t,activeRepo:r,repos:h,scanning:c,onSelectRepo:l,onRefreshRepos:g,onClose:()=>k(!1)})]})}
1
+ import{d,n,o,i,u,a,e,s,p,I,ra,rs,f,ae,en,de,S,U,Lo,Nm,X,Bt,eA,Mm,Sd}from"./index-c8ta3k4g.js";var q={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]},wm=s(q);function O({row:t,active:r,name:l,loading:h,onSelect:c,onCopyPath:g,onReveal:N}){return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_3.5rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:r&&e(f,{size:12,className:"text-ink","aria-label":"Selected repository"})}),e("button",{type:"button",onClick:c,disabled:r||!t.isRepo,title:!t.isRepo?t.error??"Not a git repository":r?"Already showing this repository":`Show ${t.path}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(de,{size:11,className:r?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${r?"font-semibold text-ink":"text-ink/90"}`,children:l})]})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[e("button",{type:"button",onClick:g,disabled:h,title:`Copy the absolute path of ${t.path}`,"aria-label":`Copy path of ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-default",children:e(ae,{size:11})}),e("button",{type:"button",onClick:N,title:`Reveal ${t.path} in the file manager`,"aria-label":`Reveal ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(en,{size:11})})]}),e("div",{className:"col-start-2 col-span-2 flex flex-wrap items-center gap-x-2 gap-y-0.5 min-w-0 mt-0.5",children:[t.isRepo?e(d,{children:[e("span",{className:`text-[10px] font-mono truncate ${t.detached?"text-warning":"text-ink/50"}`,title:t.detached?`Detached HEAD at ${t.branch}`:`On branch ${t.branch}`,children:t.branch}),e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e(Q,{row:t})]}):e("span",{className:"text-[10px] text-ink/40 truncate",children:t.error??"Not a git repository"}),t.isRepo&&t.subject&&e(d,{children:[e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e("span",{className:"text-[10px] text-ink/40 truncate min-w-0",title:t.subject,children:t.subject})]})]})]})}function Q({row:t}){let r=[];if(t.operation)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:t.operation==="stash-pop"?`A stash pop stopped on ${t.conflicts} conflict(s)`:`A ${Lo[t.operation]} is in progress, stopped on ${t.conflicts} conflict(s)`,children:[e(I,{size:9}),Lo[t.operation]]},"operation"));else if(t.conflicts>0)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.conflicts} conflicted path(s)`,children:[e(I,{size:9}),t.conflicts]},"conflicts"));if(t.changed>0||t.untracked>0)r.push(e("span",{className:"flex-shrink-0 rounded border border-info/30 px-1 text-[10px] font-mono tabular-nums text-info",title:`${t.changed} changed, ${t.untracked} untracked`,children:[t.changed>0?`${t.changed}±`:"",t.changed>0&&t.untracked>0?" ":"",t.untracked>0?`${t.untracked}?`:""]},"dirty"));if(t.gone)r.push(e("span",{className:"flex-shrink-0 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"},"gone"));else if(t.upstream&&(t.ahead>0||t.behind>0))r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 text-[10px] font-mono tabular-nums text-ink/60",title:`${t.ahead} ahead of, ${t.behind} behind ${t.upstream}`,children:[t.ahead>0&&e("span",{className:"flex items-center",children:[e(rs,{size:9}),t.ahead]}),t.behind>0&&e("span",{className:"flex items-center",children:[e(ra,{size:9}),t.behind]})]},"track"));if(r.length===0)return e("span",{className:"text-[10px] font-mono text-ink/30",title:"Nothing to report: clean and in sync",children:"clean, in sync"});return e(d,{children:r})}function H(t){let{open:r,rootPath:l,scanning:h}=t,[c,g]=n([]),[N,k]=n(!1),[C,A]=n(!1),[z,y]=n(null),[D,E]=n(0),j=t.repos.join("\x00"),G=i(!0),b=i(null);o(()=>(G.current=!0,()=>{G.current=!1,b.current?.abort(),b.current=null}),[]);let M=a(async()=>{b.current?.abort();let v=new AbortController;b.current=v,A(!0),k(!0);try{let R=new URLSearchParams({repoDetails:"1"});if(l)R.set("root",l);let w=await fetch(`/api/fs/git?${R.toString()}`,{signal:v.signal}),F=await w.json();if(!G.current||b.current!==v)return;if(!w.ok||!Array.isArray(F.details)){y(F.error||`Failed to read repositories (HTTP ${w.status})`);return}g(F.details),y(null)}catch(R){if(!G.current||b.current!==v)return;if(R instanceof Error&&R.name==="AbortError")return;y(R instanceof Error?R.message:"Failed to read repositories")}finally{if(G.current&&b.current===v)b.current=null,A(!1),k(!1)}},[l]);o(()=>{if(!r){g([]),y(null),k(!1);return}M()},[r,M,j,h,D]);let L=a(()=>E((v)=>v+1),[]);return{details:c,loading:N,reading:C,error:z,refresh:L}}function B(t){let r=new Map;for(let l of t){if(!l||l==="."){if(!r.has(""))r.set("",{key:"",label:null,paths:[]});r.get("").paths.push(".");continue}let h=l.indexOf("/"),c=h===-1?"":l.slice(0,h),g=r.get(c);if(!g)g={key:c,label:c===""?null:c,paths:[]},r.set(c,g);g.paths.push(l)}for(let l of r.values())l.paths.sort((h,c)=>h==="."?-1:c==="."?1:h.localeCompare(c));return[...r.values()].sort((l,h)=>{if(l.key==="")return-1;if(h.key==="")return 1;return l.key.localeCompare(h.key)})}function _(t,r){if(t===".")return"workspace root";if(r==="")return t;return t.slice(r.length+1)}function W({isOpen:t,rootPath:r,activeRepo:l,repos:h,scanning:c,onSelectRepo:g,onRefreshRepos:N,onClose:k}){let[C,A]=n(""),[z,y]=n(null),{details:D,loading:E,reading:j,error:G,refresh:b}=H({open:t,rootPath:r,repos:h,scanning:c});o(()=>{if(!t)A(""),y(null)},[t]);let M=u(()=>{let x=C.trim().toLowerCase();if(!x)return D;return D.filter((m)=>m.path.toLowerCase().includes(x))},[D,C]),L=u(()=>B(M.map((x)=>x.path)),[M]),v=u(()=>{let x=new Map;for(let m of D)x.set(m.path,m);return x},[D]),R=a(()=>{N(),b()},[N,b]),w=a(async(x)=>{let m=r?Sd(r,x==="."?"":x):x,P=await Bt(m);y(P?{text:`Copied ${m}`,kind:"success"}:{text:"Clipboard unavailable",kind:"error"})},[r]),F=a(async(x)=>{let m=new FormData;if(m.append("actionType","open_explorer"),m.append("path","."),m.append("repo",x),r)m.append("root",r);try{let P=await fetch("/api/fs/action",{method:"POST",body:m}),T=await P.json();if(!P.ok||T.error)y({text:T.error||"Could not open the file manager",kind:"error"})}catch{y({text:"Could not open the file manager",kind:"error"})}},[r]);if(!t)return null;return e(X,{onClose:k,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e(wm,{size:14,className:"text-ink/60 flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Repositories"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:[h.length," in this workspace"]})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(U,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:C,onChange:(x)=>A(x.currentTarget.value),placeholder:"Filter repositories…","aria-label":"Filter repositories",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:R,disabled:j||c,title:"Re-discover repositories and re-read their state","aria-label":"Refresh repositories",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(S,{size:12,className:j||c?"animate-spin":""})})]}),c&&e("div",{className:"px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono text-ink/50 flex items-center gap-1.5",children:[e(p,{size:10,className:"animate-spin"}),"Still discovering repositories in this workspace…"]}),z&&e("div",{className:`px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono truncate ${z.kind==="error"?"text-error":"text-ink/60"}`,title:z.text,role:"status",children:z.text}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:E&&D.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(p,{size:14,className:"animate-spin text-info"}),"Reading repositories…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):M.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:C.trim()?"No matching repositories.":"No repositories in this workspace."}):L.map((x)=>e("div",{children:[e("div",{className:"px-4 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold bg-canvas/40 border-b border-ink/5 sticky top-0",children:x.label??eA(".",r)}),x.paths.map((m)=>{let P=v.get(m);if(!P)return null;return e(O,{row:P,active:m===l,name:_(m,x.key),loading:j,onSelect:()=>{g(m),k()},onCopyPath:()=>void w(m),onReveal:()=>void F(m)},m)})]},x.key))})]})}function Tr({rootPath:t,activeRepo:r,onSelectRepo:l,repos:h,scanning:c,onRefreshRepos:g}){let[N,k]=n(!1),C=u(()=>({root:t??null,repo:r,rows:Mm(t,h),scanning:c,ready:!0,setRepo:l,refresh:g}),[t,r,h,c,l,g]),A=a(()=>k(!0),[]);return e("div",{className:"relative min-w-0",children:[e(Nm,{scope:C,onManage:A}),e(W,{isOpen:N,rootPath:t,activeRepo:r,repos:h,scanning:c,onSelectRepo:l,onRefreshRepos:g,onClose:()=>k(!1)})]})}
2
2
  export{wm,Tr};
@@ -1,4 +1,4 @@
1
- import{t,l,Yt,C,te,ne,M,m,Ae}from"./index-m1hd7ska.js";var A="",O="",D="",E=[],b=new Map,S=t((e)=>te(e,m()),"sanitizeText"),R=t((e)=>{switch(e.type){case"terminal":return{...e,value:S(e.value)};case"nonterminal":return{...e,name:S(e.name)};case"sequence":return{...e,elements:e.elements.map(R)};case"choice":return{...e,alternatives:e.alternatives.map(R)};case"optional":return{...e,element:R(e.element)};case"repetition":return{...e,element:R(e.element),separator:e.separator?R(e.separator):void 0};case"special":return{...e,text:S(e.text)}}},"sanitizeAstNode"),H=t(()=>{A="",O="",D="",E.length=0,b.clear(),M(),l.debug("[Railroad] Database cleared")},"clear"),Y=t((e)=>{A=S(e),l.debug("[Railroad] Title set:",e)},"setTitle"),P=t(()=>A,"getTitle"),q=t((e)=>{let n={...e,name:S(e.name),definition:R(e.definition),comment:e.comment?S(e.comment):void 0};if(l.debug("[Railroad] Adding rule:",n.name),b.has(n.name))l.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`);E.push(n),b.set(n.name,n)},"addRule"),G=t(()=>E,"getRules"),U=t((e)=>b.get(e),"getRule"),j=t((e)=>{O=S(e).replace(/^\s+/g,""),l.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),K=t(()=>O,"getAccTitle"),J=t((e)=>{D=S(e).replace(/\n\s+/g,`
1
+ import{t,l,Yt,C,te,ne,M,m,Ae}from"./index-3amzzsdk.js";var A="",O="",D="",E=[],b=new Map,S=t((e)=>te(e,m()),"sanitizeText"),R=t((e)=>{switch(e.type){case"terminal":return{...e,value:S(e.value)};case"nonterminal":return{...e,name:S(e.name)};case"sequence":return{...e,elements:e.elements.map(R)};case"choice":return{...e,alternatives:e.alternatives.map(R)};case"optional":return{...e,element:R(e.element)};case"repetition":return{...e,element:R(e.element),separator:e.separator?R(e.separator):void 0};case"special":return{...e,text:S(e.text)}}},"sanitizeAstNode"),H=t(()=>{A="",O="",D="",E.length=0,b.clear(),M(),l.debug("[Railroad] Database cleared")},"clear"),Y=t((e)=>{A=S(e),l.debug("[Railroad] Title set:",e)},"setTitle"),P=t(()=>A,"getTitle"),q=t((e)=>{let n={...e,name:S(e.name),definition:R(e.definition),comment:e.comment?S(e.comment):void 0};if(l.debug("[Railroad] Adding rule:",n.name),b.has(n.name))l.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`);E.push(n),b.set(n.name,n)},"addRule"),G=t(()=>E,"getRules"),U=t((e)=>b.get(e),"getRule"),j=t((e)=>{O=S(e).replace(/^\s+/g,""),l.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),K=t(()=>O,"getAccTitle"),J=t((e)=>{D=S(e).replace(/\n\s+/g,`
2
2
  `),l.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),Q=t(()=>D,"getAccDescription"),Z=Y,V=P,je={clear:H,setTitle:Y,getTitle:P,addRule:q,getRules:G,getRule:U,setAccTitle:j,getAccTitle:K,setAccDescription:J,getAccDescription:Q,setDiagramTitle:Z,getDiagramTitle:V},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ee=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,re=/^[\w "',.-]+$/,ie=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=t((e)=>{if(!e)return!1;return Object.keys(e).every((n)=>n==="railroad"||ie.has(n))},"isRailroadStyleOptions"),ae=t((e)=>{if(!e)return{};if("railroad"in e&&e.railroad)return e.railroad;return L(e)?e:{}},"extractRailroadOverrides"),oe=t((e)=>{if(!e||L(e))return{};let{railroad:n,svgId:o,theme:i,look:r,...a}=e;return a},"extractThemeOverrides"),u=t((e,n)=>{if(typeof e!=="string")return n;let o=e.trim();return ee.test(o)?o:n},"sanitizeColorValue"),I=t((e,n)=>{if(typeof e!=="string")return n;let o=e.trim();return re.test(o)?o:n},"sanitizeFontFamilyValue"),y=t((e,n)=>{let o=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(o)&&o>=0?o:n},"sanitizeNumberValue"),le=t((e)=>{let n=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>0?n:void 0},"parseThemeFontSize"),se=t((e)=>{let n=I(e.fontFamily,T.fontFamily),o=le(e.fontSize)??T.fontSize;return{...T,fontFamily:n,fontSize:o,terminalFill:u(e.secondBkg??e.secondaryColor,T.terminalFill),terminalStroke:u(e.secondaryBorderColor??e.lineColor,T.terminalStroke),terminalTextColor:u(e.secondaryTextColor??e.textColor,T.terminalTextColor),nonTerminalFill:u(e.mainBkg??e.background,T.nonTerminalFill),nonTerminalStroke:u(e.primaryBorderColor??e.lineColor,T.nonTerminalStroke),nonTerminalTextColor:u(e.primaryTextColor??e.textColor,T.nonTerminalTextColor),lineColor:u(e.lineColor,T.lineColor),markerFill:u(e.lineColor,T.markerFill),commentFill:u(e.labelBackground??e.tertiaryColor,T.commentFill),commentStroke:u(e.tertiaryBorderColor??e.lineColor,T.commentStroke),commentTextColor:u(e.tertiaryTextColor??e.textColor,T.commentTextColor),specialFill:u(e.tertiaryColor??e.secondaryColor,T.specialFill),specialStroke:u(e.tertiaryBorderColor??e.secondaryBorderColor,T.specialStroke),ruleNameColor:u(e.titleColor??e.textColor,T.ruleNameColor)}},"buildThemeDefaults"),W=t((e)=>{let n=C(),o={...Yt(),...n.themeVariables??{},...oe(e)},i=se(o),r={...n.railroad??{},...ae(e)};return{compactMode:r.compactMode??i.compactMode,padding:y(r.padding,i.padding),verticalSeparation:y(r.verticalSeparation,i.verticalSeparation),horizontalSeparation:y(r.horizontalSeparation,i.horizontalSeparation),arcRadius:y(r.arcRadius,i.arcRadius),fontSize:y(r.fontSize,i.fontSize),fontFamily:I(r.fontFamily,i.fontFamily),terminalFill:u(r.terminalFill,i.terminalFill),terminalStroke:u(r.terminalStroke,i.terminalStroke),terminalTextColor:u(r.terminalTextColor,i.terminalTextColor),nonTerminalFill:u(r.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:u(r.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:u(r.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:u(r.lineColor,i.lineColor),strokeWidth:y(r.strokeWidth,i.strokeWidth),markerFill:u(r.markerFill,i.markerFill),commentFill:u(r.commentFill,i.commentFill),commentStroke:u(r.commentStroke,i.commentStroke),commentTextColor:u(r.commentTextColor,i.commentTextColor),specialFill:u(r.specialFill,i.specialFill),specialStroke:u(r.specialStroke,i.specialStroke),ruleNameColor:u(r.ruleNameColor,i.ruleNameColor),showMarkers:r.showMarkers??i.showMarkers,markerRadius:y(r.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),Va=t((e)=>{let{fontFamily:n,fontSize:o,terminalFill:i,terminalStroke:r,terminalTextColor:a,nonTerminalFill:g,nonTerminalStroke:c,nonTerminalTextColor:s,lineColor:f,strokeWidth:p,markerFill:h,commentFill:k,commentStroke:d,commentTextColor:x,specialFill:z,specialStroke:F,ruleNameColor:v}=W(e);return`
3
3
  .railroad-diagram {
4
4
  font-family: ${n};
@@ -1,2 +1,2 @@
1
- import{Sn}from"./index-8pqx5n2p.js";var X={};Sn(X,{default:()=>ba});var J={};Sn(J,{default:()=>xo});var hr=typeof global=="object"&&global&&global.Object===Object&&global,H=hr;var cr=typeof self=="object"&&self&&self.Object===Object&&self,gr=H||cr||Function("return this")(),Wt=gr;var yr=Wt.Symbol,Rn=yr;var yt=Object.prototype,{hasOwnProperty:br,toString:vr}=yt,G=Rn?Rn.toStringTag:void 0;function Or(t){var e=br.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(f){}var a=vr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var _t=Or;var Ar=Object.prototype,Tr=Ar.toString;function wr(t){return Tr.call(t)}var bt=wr;var Pr="[object Null]",Cr="[object Undefined]",vt=Rn?Rn.toStringTag:void 0;function Er(t){if(t==null)return t===void 0?Cr:Pr;return vt&&vt in Object(t)?_t(t):bt(t)}var mr=Er;function Ir(t){return t!=null&&typeof t=="object"}var sn=Ir;var Lr="[object Symbol]";function jr(t){return typeof t=="symbol"||sn(t)&&mr(t)==Lr}var Kr=jr;function Mr(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var vo=Mr;var Nr=Array.isArray,Ce=Nr;var Dr=1/0,Ot=Rn?Rn.prototype:void 0,At=Ot?Ot.toString:void 0;function wt(t){if(typeof t=="string")return t;if(Ce(t))return vo(t,wt)+"";if(Kr(t))return At?At.call(t):"";var e=t+"";return e=="0"&&1/t==-Dr?"-0":e}var St=wt;function Rr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Tt=Rr;function Fr(t){return t}var _r=Fr;var Br="[object AsyncFunction]",Gr="[object Function]",Ur="[object GeneratorFunction]",zr="[object Proxy]";function Wr(t){if(!Tt(t))return!1;var e=mr(t);return e==Gr||e==Ur||e==Br||e==zr}var ko=Wr;var Hr=Wt["__core-js_shared__"],q=Hr;var Pt=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function qr(t){return!!Pt&&Pt in t}var Ct=qr;var $r=Function.prototype,kr=$r.toString;function Xr(t){if(t!=null){try{return kr.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var y=Xr;var Zr=/[\\^$.*+?()[\]{}|]/g,Jr=/^\[object .+?Constructor\]$/,Qr=Function.prototype,to=Object.prototype,eo=Qr.toString,ro=to.hasOwnProperty,oo=RegExp("^"+eo.call(ro).replace(Zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ao(t){if(!Tt(t)||Ct(t))return!1;var e=ko(t)?oo:Jr;return e.test(y(t))}var Et=ao;function fo(t,e){return t==null?void 0:t[e]}var It=fo;function io(t,e){var r=It(t,e);return Et(r)?r:void 0}var x=io;var no=x(Wt,"WeakMap"),k=no;function so(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Lt=so;function po(){}var jt=po;var uo=800,mo=16,lo=Date.now;function ho(t){var e=0,r=0;return function(){var o=lo(),a=mo-(o-r);if(r=o,a>0){if(++e>=uo)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Mt=ho;function co(t){return function(){return t}}var Sr=co;var go=function(){try{var t=x(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Xl=go;var yo=!Xl?_r:function(t,e){return Xl(t,"toString",{configurable:!0,enumerable:!1,value:Sr(e),writable:!0})},Nt=yo;var _o=Mt(Nt),Tp=_o;function bo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var Dp=bo;function Oo(t,e,r,o){var a=t.length,f=r+(o?1:-1);while(o?f--:++f<a)if(e(t[f],f,t))return f;return-1}var Np=Oo;function Ao(t){return t!==t}var Dt=Ao;function To(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Rt=To;function So(t,e,r){return e===e?Rt(t,e,r):Np(t,Dt,r)}var Ft=So;function Po(t,e){var r=t==null?0:t.length;return!!r&&Ft(t,e,0)>-1}var Bt=Po;var Io=9007199254740991,Lo=/^(?:0|[1-9]\d*)$/;function jo(t,e){var r=typeof t;return e=e==null?Io:e,!!e&&(r=="number"||r!="symbol"&&Lo.test(t))&&(t>-1&&t%1==0&&t<e)}var Ui=jo;function Mo(t,e){return t===e||t!==t&&e!==e}var ha=Mo;var Gt=Math.max;function No(t,e,r){return e=Gt(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,f=Gt(o.length-e,0),i=Array(f);while(++a<f)i[a]=o[e+a];a=-1;var n=Array(e+1);while(++a<e)n[a]=o[a];return n[e]=r(i),Lt(t,this,n)}}var Qp=No;function Do(t,e){return Tp(Qp(t,e,_r),t+"")}var Gi=Do;var Ro=9007199254740991;function Fo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ro}var j=Fo;function Bo(t){return t!=null&&j(t.length)&&!ko(t)}var Ln=Bo;var Go=Object.prototype;function Uo(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Go;return t===r}var ji=Uo;function zo(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var Ut=zo;var Wo="[object Arguments]";function Ko(t){return sn(t)&&mr(t)==Wo}var ut=Ko;var zt=Object.prototype,{hasOwnProperty:Ho,propertyIsEnumerable:qo}=zt,$o=ut(function(){return arguments}())?ut:function(t){return sn(t)&&Ho.call(t,"callee")&&!qo.call(t,"callee")},Ja=$o;function Yo(){return!1}var Ht=Yo;var kt=typeof X=="object"&&X&&!X.nodeType&&X,qt=kt&&typeof Y=="object"&&Y&&!Y.nodeType&&Y,Xo=qt&&qt.exports===kt,$t=Xo?Wt.Buffer:void 0,Zo=$t?$t.isBuffer:void 0,Jo=Zo||Ht,ba=Jo;var Qo="[object Arguments]",Vo="[object Array]",ta="[object Boolean]",ea="[object Date]",ra="[object Error]",oa="[object Function]",aa="[object Map]",fa="[object Number]",ia="[object Object]",na="[object RegExp]",sa="[object Set]",pa="[object String]",ua="[object WeakMap]",ma="[object ArrayBuffer]",la="[object DataView]",da="[object Float32Array]",xa="[object Float64Array]",ca="[object Int8Array]",ga="[object Int16Array]",ya="[object Int32Array]",_a="[object Uint8Array]",va="[object Uint8ClampedArray]",Oa="[object Uint16Array]",Aa="[object Uint32Array]",u={};u[da]=u[xa]=u[ca]=u[ga]=u[ya]=u[_a]=u[va]=u[Oa]=u[Aa]=!0;u[Qo]=u[Vo]=u[ma]=u[ta]=u[la]=u[ea]=u[ra]=u[oa]=u[aa]=u[fa]=u[ia]=u[na]=u[sa]=u[pa]=u[ua]=!1;function Ta(t){return sn(t)&&j(t.length)&&!!u[mr(t)]}var Yt=Ta;function wa(t){return function(e){return t(e)}}var Hi=wa;var Xt=typeof J=="object"&&J&&!J.nodeType&&J,U=Xt&&typeof Z=="object"&&Z&&!Z.nodeType&&Z,Sa=U&&U.exports===Xt,mt=Sa&&H.process,Pa=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return mt&&mt.binding&&mt.binding("util")}catch(e){}}(),xo=Pa;var Zt=xo&&xo.isTypedArray,Ca=Zt?Hi(Zt):Yt,qi=Ca;var Ea=Object.prototype,Ia=Ea.hasOwnProperty;function La(t,e){var r=Ce(t),o=!r&&Ja(t),a=!r&&!o&&ba(t),f=!r&&!o&&!a&&qi(t),i=r||o||a||f,n=i?Ut(t.length,String):[],s=n.length;for(var p in t)if((e||Ia.call(t,p))&&!(i&&(p=="length"||a&&(p=="offset"||p=="parent")||f&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Ui(p,s))))n.push(p);return n}var Rp=La;function ja(t,e){return function(r){return t(e(r))}}var Lp=ja;var Ma=Lp(Object.keys,Object),Jt=Ma;var Na=Object.prototype,Da=Na.hasOwnProperty;function Ra(t){if(!ji(t))return Jt(t);var e=[];for(var r in Object(t))if(Da.call(t,r)&&r!="constructor")e.push(r);return e}var ec=Ra;function Fa(t){return Ln(t)?Rp(t):ec(t)}var Kt=Fa;var Ba=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ga=/^\w*$/;function Ua(t,e){if(Ce(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||Kr(t))return!0;return Ga.test(t)||!Ba.test(t)||e!=null&&t in Object(e)}var M=Ua;var za=x(Object,"create"),_=za;function Wa(){this.__data__=_?_(null):{},this.size=0}var Qt=Wa;function Ka(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var te=Ka;var Ha="__lodash_hash_undefined__",qa=Object.prototype,$a=qa.hasOwnProperty;function ka(t){var e=this.__data__;if(_){var r=e[t];return r===Ha?void 0:r}return $a.call(e,t)?e[t]:void 0}var ee=ka;var Ya=Object.prototype,Xa=Ya.hasOwnProperty;function Za(t){var e=this.__data__;return _?e[t]!==void 0:Xa.call(e,t)}var re=Za;var Qa="__lodash_hash_undefined__";function Va(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_&&e===void 0?Qa:e,this}var oe=Va;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=Qt;N.prototype.delete=te;N.prototype.get=ee;N.prototype.has=re;N.prototype.set=oe;var lt=N;function tf(){this.__data__=[],this.size=0}var ae=tf;function ef(t,e){var r=t.length;while(r--)if(ha(t[r][0],e))return r;return-1}var O=ef;var rf=Array.prototype,of=rf.splice;function af(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else of.call(e,r,1);return--this.size,!0}var fe=af;function ff(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var ie=ff;function nf(t){return O(this.__data__,t)>-1}var ne=nf;function sf(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var se=sf;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=ae;D.prototype.delete=fe;D.prototype.get=ie;D.prototype.has=ne;D.prototype.set=se;var A=D;var pf=x(Wt,"Map"),T=pf;function uf(){this.size=0,this.__data__={hash:new lt,map:new(T||A),string:new lt}}var pe=uf;function mf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ue=mf;function lf(t,e){var r=t.__data__;return ue(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=lf;function df(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var me=df;function xf(t){return w(this,t).get(t)}var le=xf;function hf(t){return w(this,t).has(t)}var de=hf;function cf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var xe=cf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=pe;R.prototype.delete=me;R.prototype.get=le;R.prototype.has=de;R.prototype.set=xe;var E=R;var gf="Expected a function";function dt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(gf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],f=r.cache;if(f.has(a))return f.get(a);var i=t.apply(this,o);return r.cache=f.set(a,i)||f,i};return r.cache=new(dt.Cache||E),r}dt.Cache=E;var he=dt;var yf=500;function _f(t){var e=he(t,function(o){if(r.size===yf)r.clear();return o}),r=e.cache;return e}var ce=_f;var bf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vf=/\\(\\)?/g,Of=ce(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(bf,function(r,o,a,f){e.push(a?f.replace(vf,"$1"):o||r)}),e}),ge=Of;function Af(t){return t==null?"":St(t)}var Fp=Af;function Tf(t,e){if(Ce(t))return t;return M(t,e)?[t]:ge(Fp(t))}var Wi=Tf;var wf=1/0;function Sf(t){if(typeof t=="string"||Kr(t))return t;var e=t+"";return e=="0"&&1/t==-wf?"-0":e}var wo=Sf;function Pf(t,e){e=Wi(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[wo(e[r++])];return r&&r==o?t:void 0}var Ki=Pf;function Cf(t,e,r){var o=t==null?void 0:Ki(t,e);return o===void 0?r:o}var ye=Cf;function Ef(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var tc=Ef;var _e=Rn?Rn.isConcatSpreadable:void 0;function If(t){return Ce(t)||Ja(t)||!!(_e&&t&&t[_e])}var be=If;function ve(t,e,r,o,a){var f=-1,i=t.length;r||(r=be),a||(a=[]);while(++f<i){var n=t[f];if(e>0&&r(n))if(e>1)ve(n,e-1,r,o,a);else tc(a,n);else if(!o)a[a.length]=n}return a}var nc=ve;function Lf(t,e,r,o){var a=-1,f=t==null?0:t.length;if(o&&f)r=t[++a];while(++a<f)r=e(r,t[a],a,t);return r}var Oe=Lf;function jf(){this.__data__=new A,this.size=0}var Ae=jf;function Mf(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Te=Mf;function Nf(t){return this.__data__.get(t)}var we=Nf;function Df(t){return this.__data__.has(t)}var Se=Df;var Rf=200;function Ff(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<Rf-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Pe=Ff;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=Ae;F.prototype.delete=Te;F.prototype.get=we;F.prototype.has=Se;F.prototype.set=Pe;var Co=F;function Bf(t,e){var r=-1,o=t==null?0:t.length,a=0,f=[];while(++r<o){var i=t[r];if(e(i,r,t))f[a++]=i}return f}var Q=Bf;function Gf(){return[]}var Mp=Gf;var Uf=Object.prototype,zf=Uf.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols,Wf=!Ee?Mp:function(t){if(t==null)return[];return t=Object(t),Q(Ee(t),function(e){return zf.call(t,e)})},rc=Wf;function Kf(t,e,r){var o=e(t);return Ce(t)?o:tc(o,r(t))}var Pp=Kf;function Hf(t){return Pp(t,Kt,rc)}var sd=Hf;var qf=x(Wt,"DataView"),V=qf;var $f=x(Wt,"Promise"),tt=$f;var kf=x(Wt,"Set"),S=kf;var Ie="[object Map]",Yf="[object Object]",Le="[object Promise]",je="[object Set]",Me="[object WeakMap]",Ne="[object DataView]",Xf=y(V),Zf=y(T),Jf=y(tt),Qf=y(S),Vf=y(k),I=mr;if(V&&I(new V(new ArrayBuffer(1)))!=Ne||T&&I(new T)!=Ie||tt&&I(tt.resolve())!=Le||S&&I(new S)!=je||k&&I(new k)!=Me)I=function(t){var e=mr(t),r=e==Yf?t.constructor:void 0,o=r?y(r):"";if(o)switch(o){case Xf:return Ne;case Zf:return Ie;case Jf:return Le;case Qf:return je;case Vf:return Me}return e};var Vr=I;var ti=Wt.Uint8Array,ac=ti;var ei="__lodash_hash_undefined__";function ri(t){return this.__data__.set(t,ei),this}var De=ri;function oi(t){return this.__data__.has(t)}var Re=oi;function et(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}et.prototype.add=et.prototype.push=De;et.prototype.has=Re;var rt=et;function ai(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var Fe=ai;function fi(t,e){return t.has(e)}var ot=fi;var ii=1,ni=2;function si(t,e,r,o,a,f){var i=r&ii,n=t.length,s=e.length;if(n!=s&&!(i&&s>n))return!1;var p=f.get(t),d=f.get(e);if(p&&d)return p==e&&d==t;var l=-1,m=!0,g=r&ni?new rt:void 0;f.set(t,e),f.set(e,t);while(++l<n){var h=t[l],c=e[l];if(o)var b=i?o(c,h,l,e,t,f):o(h,c,l,t,e,f);if(b!==void 0){if(b)continue;m=!1;break}if(g){if(!Fe(e,function(P,C){if(!ot(g,C)&&(h===P||a(h,P,r,o,f)))return g.push(C)})){m=!1;break}}else if(!(h===c||a(h,c,r,o,f))){m=!1;break}}return f.delete(t),f.delete(e),m}var at=si;function pi(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var Be=pi;function ui(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=ui;var mi=1,li=2,di="[object Boolean]",xi="[object Date]",hi="[object Error]",ci="[object Map]",gi="[object Number]",yi="[object RegExp]",_i="[object Set]",bi="[object String]",vi="[object Symbol]",Oi="[object ArrayBuffer]",Ai="[object DataView]",Ge=Rn?Rn.prototype:void 0,xt=Ge?Ge.valueOf:void 0;function Ti(t,e,r,o,a,f,i){switch(r){case Ai:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Oi:if(t.byteLength!=e.byteLength||!f(new ac(t),new ac(e)))return!1;return!0;case di:case xi:case gi:return ha(+t,+e);case hi:return t.name==e.name&&t.message==e.message;case yi:case bi:return t==e+"";case ci:var n=Be;case _i:var s=o&mi;if(n||(n=B),t.size!=e.size&&!s)return!1;var p=i.get(t);if(p)return p==e;o|=li,i.set(t,e);var d=at(n(t),n(e),o,a,f,i);return i.delete(t),d;case vi:if(xt)return xt.call(t)==xt.call(e)}return!1}var Ue=Ti;var wi=1,Si=Object.prototype,Pi=Si.hasOwnProperty;function Ci(t,e,r,o,a,f){var i=r&wi,n=sd(t),s=n.length,p=sd(e),d=p.length;if(s!=d&&!i)return!1;var l=s;while(l--){var m=n[l];if(!(i?m in e:Pi.call(e,m)))return!1}var g=f.get(t),h=f.get(e);if(g&&h)return g==e&&h==t;var c=!0;f.set(t,e),f.set(e,t);var b=i;while(++l<s){m=n[l];var P=t[m],C=e[m];if(o)var gt=i?o(C,P,m,e,t,f):o(P,C,m,t,e,f);if(!(gt===void 0?P===C||a(P,C,r,o,f):gt)){c=!1;break}b||(b=m=="constructor")}if(c&&!b){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))c=!1}return f.delete(t),f.delete(e),c}var ze=Ci;var Ei=1,We="[object Arguments]",Ke="[object Array]",ft="[object Object]",Ii=Object.prototype,He=Ii.hasOwnProperty;function Li(t,e,r,o,a,f){var i=Ce(t),n=Ce(e),s=i?Ke:Vr(t),p=n?Ke:Vr(e);s=s==We?ft:s,p=p==We?ft:p;var d=s==ft,l=p==ft,m=s==p;if(m&&ba(t)){if(!ba(e))return!1;i=!0,d=!1}if(m&&!d)return f||(f=new Co),i||qi(t)?at(t,e,r,o,a,f):Ue(t,e,s,r,o,a,f);if(!(r&Ei)){var g=d&&He.call(t,"__wrapped__"),h=l&&He.call(e,"__wrapped__");if(g||h){var c=g?t.value():t,b=h?e.value():e;return f||(f=new Co),a(c,b,r,o,f)}}if(!m)return!1;return f||(f=new Co),ze(t,e,r,o,a,f)}var qe=Li;function $e(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!sn(t)&&!sn(e))return t!==t&&e!==e;return qe(t,e,r,o,$e,a)}var it=$e;var Mi=1,Ni=2;function Di(t,e,r,o){var a=r.length,f=a,i=!o;if(t==null)return!f;t=Object(t);while(a--){var n=r[a];if(i&&n[2]?n[1]!==t[n[0]]:!(n[0]in t))return!1}while(++a<f){n=r[a];var s=n[0],p=t[s],d=n[1];if(i&&n[2]){if(p===void 0&&!(s in t))return!1}else{var l=new Co;if(o)var m=o(p,d,s,t,e,l);if(!(m===void 0?it(d,p,Mi|Ni,o,l):m))return!1}}return!0}var ke=Di;function Ri(t){return t===t&&!Tt(t)}var nt=Ri;function Fi(t){var e=Kt(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,nt(a)]}return e}var Ye=Fi;function Bi(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var st=Bi;function zi(t){var e=Ye(t);if(e.length==1&&e[0][2])return st(e[0][0],e[0][1]);return function(r){return r===t||ke(r,t,e)}}var Xe=zi;function $i(t,e){return t!=null&&e in Object(t)}var Ze=$i;function ki(t,e,r){e=Wi(e,t);var o=-1,a=e.length,f=!1;while(++o<a){var i=wo(e[o]);if(!(f=t!=null&&r(t,i)))break;t=t[i]}if(f||++o!=a)return f;return a=t==null?0:t.length,!!a&&j(a)&&Ui(i,a)&&(Ce(t)||Ja(t))}var Op=ki;function Yi(t,e){return t!=null&&Op(t,e,Ze)}var $p=Yi;var Xi=1,Zi=2;function Ji(t,e){if(M(t)&&nt(e))return st(wo(t),e);return function(r){var o=ye(r,t);return o===void 0&&o===e?$p(r,t):it(e,o,Xi|Zi)}}var Qe=Ji;function Qi(t){return function(e){return e==null?void 0:e[t]}}var zp=Qi;function tn(t){return function(e){return Ki(e,t)}}var Ve=tn;function en(t){return M(t)?zp(wo(t)):Ve(t)}var er=en;function rn(t){if(typeof t=="function")return t;if(t==null)return _r;if(typeof t=="object")return Ce(t)?Qe(t[0],t[1]):Xe(t);return er(t)}var tr=rn;function on(t){return function(e,r,o){var a=-1,f=Object(e),i=o(e),n=i.length;while(n--){var s=i[t?n:++a];if(r(f[s],s,f)===!1)break}return e}}var rr=on;var an=rr(),oc=an;function fn(t,e){return t&&oc(t,e,Kt)}var ic=fn;function nn(t,e){return function(r,o){if(r==null)return r;if(!Ln(r))return t(r,o);var a=r.length,f=e?a:-1,i=Object(r);while(e?f--:++f<a)if(o(i[f],f,i)===!1)break;return r}}var or=nn;var pn=or(ic),Vi=pn;function un(t){return sn(t)&&Ln(t)}var Up=un;function mn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var ar=mn;function ln(t){return typeof t=="function"?t:_r}var sc=ln;function dn(t,e){var r=Ce(t)?Dp:Vi;return r(t,sc(e))}var v=dn;function xn(t,e){var r=[];return Vi(t,function(o,a,f){if(e(o,a,f))r.push(o)}),r}var ir=xn;function hn(t,e){var r=Ce(t)?Q:ir;return r(t,tr(e,3))}var fr=hn;function cn(t,e){return vo(e,function(r){return t[r]})}var nr=cn;function gn(t){return t==null?[]:nr(t,Kt(t))}var Yr=gn;var yn="[object Map]",_n="[object Set]",bn=Object.prototype,vn=bn.hasOwnProperty;function On(t){if(t==null)return!0;if(Ln(t)&&(Ce(t)||typeof t=="string"||typeof t.splice=="function"||ba(t)||qi(t)||Ja(t)))return!t.length;var e=Vr(t);if(e==yn||e==_n)return!t.size;if(ji(t))return!ec(t).length;for(var r in t)if(vn.call(t,r))return!1;return!0}var pt=On;function An(t){return t===void 0}var Vt=An;function Tn(t,e,r,o,a){return a(t,function(f,i,n){r=o?(o=!1,f):e(r,f,i,n)}),r}var sr=Tn;function wn(t,e,r){var o=Ce(t)?Oe:sr,a=arguments.length<3;return o(t,tr(e,4),r,a,Vi)}var Eo=wn;var Pn=1/0,Cn=!(S&&1/B(new S([,-0]))[1]==Pn)?jt:function(t){return new S(t)},pr=Cn;var En=200;function In(t,e,r){var o=-1,a=Bt,f=t.length,i=!0,n=[],s=n;if(r)i=!1,a=ar;else if(f>=En){var p=e?null:pr(t);if(p)return B(p);i=!1,a=ot,s=new rt}else s=e?[]:n;t:while(++o<f){var d=t[o],l=e?e(d):d;if(d=r||d!==0?d:0,i&&l===l){var m=s.length;while(m--)if(s[m]===l)continue t;if(e)s.push(l);n.push(d)}else if(!a(s,l,r)){if(s!==n)s.push(l);n.push(d)}}return n}var ur=In;var jn=Gi(function(t){return ur(nc(t,1,Up,!0))}),ht=jn;var Nn="\x00",L="\x00",lr="\x01";class Je{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Sr(void 0),this._defaultEdgeLabelFn=Sr(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!ko(t))t=Sr(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Kt(this._nodes)}sources(){var t=this;return fr(this.nodes(),function(e){return pt(t._in[e])})}sinks(){var t=this;return fr(this.nodes(),function(e){return pt(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return v(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];v(Kt(this._in[t]),e),delete this._in[t],delete this._preds[t],v(Kt(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(Vt(e))e=L;else{e+="";for(var r=e;!Vt(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(Vt(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return Kt(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return Kt(e)}successors(t){var e=this._sucs[t];if(e)return Kt(e)}neighbors(t){var e=this.predecessors(t);if(e)return ht(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;v(this._nodes,function(f,i){if(t(i))e.setNode(i,f)}),v(this._edgeObjs,function(f){if(e.hasNode(f.v)&&e.hasNode(f.w))e.setEdge(f,r.edge(f))});var o={};function a(f){var i=r.parent(f);if(i===void 0||e.hasNode(i))return o[f]=i,i;else if(i in o)return o[i];else return a(i)}if(this._isCompound)v(e.nodes(),function(f){e.setParent(f,a(f))});return e}setDefaultEdgeLabel(t){if(!ko(t))t=Sr(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Yr(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Eo(t,function(a,f){if(o.length>1)r.setEdge(a,f,e);else r.setEdge(a,f);return f}),this}setEdge(){var t,e,r,o,a=!1,f=arguments[0];if(typeof f==="object"&&f!==null&&"v"in f){if(t=f.v,e=f.w,r=f.name,arguments.length===2)o=arguments[1],a=!0}else if(t=f,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!Vt(r))r=""+r;var i=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i)){if(a)this._edgeLabels[i]=o;return this}if(!Vt(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[i]=a?o:this._defaultEdgeLabelFn(t,e,r);var n=Dn(this._isDirected,t,e,r);return t=n.v,e=n.w,Object.freeze(n),this._edgeObjs[i]=n,dr(this._preds[e],t),dr(this._sucs[t],e),this._in[e][i]=n,this._out[t][i]=n,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?ct(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?ct(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?ct(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],xr(this._preds[e],t),xr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=Yr(r);if(!e)return o;return fr(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=Yr(r);if(!e)return o;return fr(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}Je.prototype._nodeCount=0;Je.prototype._edgeCount=0;function dr(t,e){if(t[e])t[e]++;else t[e]=1}function xr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}return a+lr+f+lr+(Vt(o)?Nn:o)}function Dn(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}var n={v:a,w:f};if(o)n.name=o;return n}function ct(t,e){return z(t,e.v,e.w,e.name)}
2
- export{Wt,Rn,mr,sn,Kr,vo,Ce,Tt,_r,ko,Sr,Xl,Tp,Dp,Np,Ui,ha,Qp,Gi,Ln,ji,Ja,ba,Hi,xo,qi,Rp,Lp,ec,Kt,Fp,Wi,wo,Ki,tc,nc,Co,Mp,rc,Pp,sd,Vr,ac,Op,$p,zp,tr,oc,ic,Vi,Up,sc,v,fr,Yr,Vt,Eo,Je};
1
+ import{Sn}from"./index-8pqx5n2p.js";var X={};Sn(X,{default:()=>ba});var J={};Sn(J,{default:()=>ko});var hr=typeof global=="object"&&global&&global.Object===Object&&global,H=hr;var cr=typeof self=="object"&&self&&self.Object===Object&&self,gr=H||cr||Function("return this")(),Wt=gr;var yr=Wt.Symbol,Rn=yr;var yt=Object.prototype,{hasOwnProperty:br,toString:vr}=yt,G=Rn?Rn.toStringTag:void 0;function Or(t){var e=br.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(f){}var a=vr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var _t=Or;var Ar=Object.prototype,Tr=Ar.toString;function wr(t){return Tr.call(t)}var bt=wr;var Pr="[object Null]",Cr="[object Undefined]",vt=Rn?Rn.toStringTag:void 0;function Er(t){if(t==null)return t===void 0?Cr:Pr;return vt&&vt in Object(t)?_t(t):bt(t)}var mr=Er;function Ir(t){return t!=null&&typeof t=="object"}var sn=Ir;var Lr="[object Symbol]";function jr(t){return typeof t=="symbol"||sn(t)&&mr(t)==Lr}var Kr=jr;function Mr(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var yo=Mr;var Nr=Array.isArray,Ce=Nr;var Dr=1/0,Ot=Rn?Rn.prototype:void 0,At=Ot?Ot.toString:void 0;function wt(t){if(typeof t=="string")return t;if(Ce(t))return yo(t,wt)+"";if(Kr(t))return At?At.call(t):"";var e=t+"";return e=="0"&&1/t==-Dr?"-0":e}var St=wt;function Rr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Tt=Rr;function Fr(t){return t}var _r=Fr;var Br="[object AsyncFunction]",Gr="[object Function]",Ur="[object GeneratorFunction]",zr="[object Proxy]";function Wr(t){if(!Tt(t))return!1;var e=mr(t);return e==Gr||e==Ur||e==Br||e==zr}var vo=Wr;var Hr=Wt["__core-js_shared__"],q=Hr;var Pt=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function qr(t){return!!Pt&&Pt in t}var Ct=qr;var $r=Function.prototype,kr=$r.toString;function Xr(t){if(t!=null){try{return kr.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var y=Xr;var Zr=/[\\^$.*+?()[\]{}|]/g,Jr=/^\[object .+?Constructor\]$/,Qr=Function.prototype,to=Object.prototype,eo=Qr.toString,ro=to.hasOwnProperty,oo=RegExp("^"+eo.call(ro).replace(Zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ao(t){if(!Tt(t)||Ct(t))return!1;var e=vo(t)?oo:Jr;return e.test(y(t))}var Et=ao;function fo(t,e){return t==null?void 0:t[e]}var It=fo;function io(t,e){var r=It(t,e);return Et(r)?r:void 0}var x=io;var no=x(Wt,"WeakMap"),k=no;function so(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Lt=so;function po(){}var jt=po;var uo=800,mo=16,lo=Date.now;function ho(t){var e=0,r=0;return function(){var o=lo(),a=mo-(o-r);if(r=o,a>0){if(++e>=uo)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Mt=ho;function co(t){return function(){return t}}var Sr=co;var go=function(){try{var t=x(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Xl=go;var _o=!Xl?_r:function(t,e){return Xl(t,"toString",{configurable:!0,enumerable:!1,value:Sr(e),writable:!0})},Nt=_o;var bo=Mt(Nt),Tp=bo;function Oo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var Dp=Oo;function Ao(t,e,r,o){var a=t.length,f=r+(o?1:-1);while(o?f--:++f<a)if(e(t[f],f,t))return f;return-1}var Np=Ao;function To(t){return t!==t}var Dt=To;function So(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Rt=So;function Po(t,e,r){return e===e?Rt(t,e,r):Np(t,Dt,r)}var Ft=Po;function Eo(t,e){var r=t==null?0:t.length;return!!r&&Ft(t,e,0)>-1}var Bt=Eo;var Io=9007199254740991,Lo=/^(?:0|[1-9]\d*)$/;function jo(t,e){var r=typeof t;return e=e==null?Io:e,!!e&&(r=="number"||r!="symbol"&&Lo.test(t))&&(t>-1&&t%1==0&&t<e)}var zi=jo;function Mo(t,e){return t===e||t!==t&&e!==e}var ha=Mo;var Gt=Math.max;function No(t,e,r){return e=Gt(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,f=Gt(o.length-e,0),i=Array(f);while(++a<f)i[a]=o[e+a];a=-1;var n=Array(e+1);while(++a<e)n[a]=o[a];return n[e]=r(i),Lt(t,this,n)}}var Qp=No;function Do(t,e){return Tp(Qp(t,e,_r),t+"")}var Ui=Do;var Ro=9007199254740991;function Fo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ro}var j=Fo;function Bo(t){return t!=null&&j(t.length)&&!vo(t)}var Ln=Bo;var Go=Object.prototype;function Uo(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Go;return t===r}var Gi=Uo;function zo(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var Ut=zo;var Wo="[object Arguments]";function Ko(t){return sn(t)&&mr(t)==Wo}var ut=Ko;var zt=Object.prototype,{hasOwnProperty:Ho,propertyIsEnumerable:qo}=zt,$o=ut(function(){return arguments}())?ut:function(t){return sn(t)&&Ho.call(t,"callee")&&!qo.call(t,"callee")},Ja=$o;function Yo(){return!1}var Ht=Yo;var kt=typeof X=="object"&&X&&!X.nodeType&&X,qt=kt&&typeof Y=="object"&&Y&&!Y.nodeType&&Y,Xo=qt&&qt.exports===kt,$t=Xo?Wt.Buffer:void 0,Zo=$t?$t.isBuffer:void 0,Jo=Zo||Ht,ba=Jo;var Qo="[object Arguments]",Vo="[object Array]",ta="[object Boolean]",ea="[object Date]",ra="[object Error]",oa="[object Function]",aa="[object Map]",fa="[object Number]",ia="[object Object]",na="[object RegExp]",sa="[object Set]",pa="[object String]",ua="[object WeakMap]",ma="[object ArrayBuffer]",la="[object DataView]",da="[object Float32Array]",xa="[object Float64Array]",ca="[object Int8Array]",ga="[object Int16Array]",ya="[object Int32Array]",_a="[object Uint8Array]",va="[object Uint8ClampedArray]",Oa="[object Uint16Array]",Aa="[object Uint32Array]",u={};u[da]=u[xa]=u[ca]=u[ga]=u[ya]=u[_a]=u[va]=u[Oa]=u[Aa]=!0;u[Qo]=u[Vo]=u[ma]=u[ta]=u[la]=u[ea]=u[ra]=u[oa]=u[aa]=u[fa]=u[ia]=u[na]=u[sa]=u[pa]=u[ua]=!1;function Ta(t){return sn(t)&&j(t.length)&&!!u[mr(t)]}var Yt=Ta;function wa(t){return function(e){return t(e)}}var ji=wa;var Xt=typeof J=="object"&&J&&!J.nodeType&&J,U=Xt&&typeof Z=="object"&&Z&&!Z.nodeType&&Z,Sa=U&&U.exports===Xt,mt=Sa&&H.process,Pa=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return mt&&mt.binding&&mt.binding("util")}catch(e){}}(),ko=Pa;var Zt=ko&&ko.isTypedArray,Ca=Zt?ji(Zt):Yt,Hi=Ca;var Ea=Object.prototype,Ia=Ea.hasOwnProperty;function La(t,e){var r=Ce(t),o=!r&&Ja(t),a=!r&&!o&&ba(t),f=!r&&!o&&!a&&Hi(t),i=r||o||a||f,n=i?Ut(t.length,String):[],s=n.length;for(var p in t)if((e||Ia.call(t,p))&&!(i&&(p=="length"||a&&(p=="offset"||p=="parent")||f&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||zi(p,s))))n.push(p);return n}var Rp=La;function ja(t,e){return function(r){return t(e(r))}}var Lp=ja;var Ma=Lp(Object.keys,Object),Jt=Ma;var Na=Object.prototype,Da=Na.hasOwnProperty;function Ra(t){if(!Gi(t))return Jt(t);var e=[];for(var r in Object(t))if(Da.call(t,r)&&r!="constructor")e.push(r);return e}var ec=Ra;function Fa(t){return Ln(t)?Rp(t):ec(t)}var Kt=Fa;var Ba=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ga=/^\w*$/;function Ua(t,e){if(Ce(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||Kr(t))return!0;return Ga.test(t)||!Ba.test(t)||e!=null&&t in Object(e)}var M=Ua;var za=x(Object,"create"),_=za;function Wa(){this.__data__=_?_(null):{},this.size=0}var Qt=Wa;function Ka(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var te=Ka;var Ha="__lodash_hash_undefined__",qa=Object.prototype,$a=qa.hasOwnProperty;function ka(t){var e=this.__data__;if(_){var r=e[t];return r===Ha?void 0:r}return $a.call(e,t)?e[t]:void 0}var ee=ka;var Ya=Object.prototype,Xa=Ya.hasOwnProperty;function Za(t){var e=this.__data__;return _?e[t]!==void 0:Xa.call(e,t)}var re=Za;var Qa="__lodash_hash_undefined__";function Va(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_&&e===void 0?Qa:e,this}var oe=Va;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=Qt;N.prototype.delete=te;N.prototype.get=ee;N.prototype.has=re;N.prototype.set=oe;var lt=N;function tf(){this.__data__=[],this.size=0}var ae=tf;function ef(t,e){var r=t.length;while(r--)if(ha(t[r][0],e))return r;return-1}var O=ef;var rf=Array.prototype,of=rf.splice;function af(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else of.call(e,r,1);return--this.size,!0}var fe=af;function ff(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var ie=ff;function nf(t){return O(this.__data__,t)>-1}var ne=nf;function sf(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var se=sf;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=ae;D.prototype.delete=fe;D.prototype.get=ie;D.prototype.has=ne;D.prototype.set=se;var A=D;var pf=x(Wt,"Map"),T=pf;function uf(){this.size=0,this.__data__={hash:new lt,map:new(T||A),string:new lt}}var pe=uf;function mf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ue=mf;function lf(t,e){var r=t.__data__;return ue(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=lf;function df(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var me=df;function xf(t){return w(this,t).get(t)}var le=xf;function hf(t){return w(this,t).has(t)}var de=hf;function cf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var xe=cf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=pe;R.prototype.delete=me;R.prototype.get=le;R.prototype.has=de;R.prototype.set=xe;var E=R;var gf="Expected a function";function dt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(gf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],f=r.cache;if(f.has(a))return f.get(a);var i=t.apply(this,o);return r.cache=f.set(a,i)||f,i};return r.cache=new(dt.Cache||E),r}dt.Cache=E;var he=dt;var yf=500;function _f(t){var e=he(t,function(o){if(r.size===yf)r.clear();return o}),r=e.cache;return e}var ce=_f;var bf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vf=/\\(\\)?/g,Of=ce(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(bf,function(r,o,a,f){e.push(a?f.replace(vf,"$1"):o||r)}),e}),ge=Of;function Af(t){return t==null?"":St(t)}var Fp=Af;function Tf(t,e){if(Ce(t))return t;return M(t,e)?[t]:ge(Fp(t))}var qi=Tf;var wf=1/0;function Sf(t){if(typeof t=="string"||Kr(t))return t;var e=t+"";return e=="0"&&1/t==-wf?"-0":e}var xo=Sf;function Pf(t,e){e=qi(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[xo(e[r++])];return r&&r==o?t:void 0}var Wi=Pf;function Cf(t,e,r){var o=t==null?void 0:Wi(t,e);return o===void 0?r:o}var ye=Cf;function Ef(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var tc=Ef;var _e=Rn?Rn.isConcatSpreadable:void 0;function If(t){return Ce(t)||Ja(t)||!!(_e&&t&&t[_e])}var be=If;function ve(t,e,r,o,a){var f=-1,i=t.length;r||(r=be),a||(a=[]);while(++f<i){var n=t[f];if(e>0&&r(n))if(e>1)ve(n,e-1,r,o,a);else tc(a,n);else if(!o)a[a.length]=n}return a}var nc=ve;function Lf(t,e,r,o){var a=-1,f=t==null?0:t.length;if(o&&f)r=t[++a];while(++a<f)r=e(r,t[a],a,t);return r}var Oe=Lf;function jf(){this.__data__=new A,this.size=0}var Ae=jf;function Mf(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Te=Mf;function Nf(t){return this.__data__.get(t)}var we=Nf;function Df(t){return this.__data__.has(t)}var Se=Df;var Rf=200;function Ff(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<Rf-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Pe=Ff;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=Ae;F.prototype.delete=Te;F.prototype.get=we;F.prototype.has=Se;F.prototype.set=Pe;var wo=F;function Bf(t,e){var r=-1,o=t==null?0:t.length,a=0,f=[];while(++r<o){var i=t[r];if(e(i,r,t))f[a++]=i}return f}var Q=Bf;function Gf(){return[]}var Mp=Gf;var Uf=Object.prototype,zf=Uf.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols,Wf=!Ee?Mp:function(t){if(t==null)return[];return t=Object(t),Q(Ee(t),function(e){return zf.call(t,e)})},rc=Wf;function Kf(t,e,r){var o=e(t);return Ce(t)?o:tc(o,r(t))}var Pp=Kf;function Hf(t){return Pp(t,Kt,rc)}var sd=Hf;var qf=x(Wt,"DataView"),V=qf;var $f=x(Wt,"Promise"),tt=$f;var kf=x(Wt,"Set"),S=kf;var Ie="[object Map]",Yf="[object Object]",Le="[object Promise]",je="[object Set]",Me="[object WeakMap]",Ne="[object DataView]",Xf=y(V),Zf=y(T),Jf=y(tt),Qf=y(S),Vf=y(k),I=mr;if(V&&I(new V(new ArrayBuffer(1)))!=Ne||T&&I(new T)!=Ie||tt&&I(tt.resolve())!=Le||S&&I(new S)!=je||k&&I(new k)!=Me)I=function(t){var e=mr(t),r=e==Yf?t.constructor:void 0,o=r?y(r):"";if(o)switch(o){case Xf:return Ne;case Zf:return Ie;case Jf:return Le;case Qf:return je;case Vf:return Me}return e};var Vr=I;var ti=Wt.Uint8Array,ac=ti;var ei="__lodash_hash_undefined__";function ri(t){return this.__data__.set(t,ei),this}var De=ri;function oi(t){return this.__data__.has(t)}var Re=oi;function et(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}et.prototype.add=et.prototype.push=De;et.prototype.has=Re;var rt=et;function ai(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var Fe=ai;function fi(t,e){return t.has(e)}var ot=fi;var ii=1,ni=2;function si(t,e,r,o,a,f){var i=r&ii,n=t.length,s=e.length;if(n!=s&&!(i&&s>n))return!1;var p=f.get(t),d=f.get(e);if(p&&d)return p==e&&d==t;var l=-1,m=!0,g=r&ni?new rt:void 0;f.set(t,e),f.set(e,t);while(++l<n){var h=t[l],c=e[l];if(o)var b=i?o(c,h,l,e,t,f):o(h,c,l,t,e,f);if(b!==void 0){if(b)continue;m=!1;break}if(g){if(!Fe(e,function(P,C){if(!ot(g,C)&&(h===P||a(h,P,r,o,f)))return g.push(C)})){m=!1;break}}else if(!(h===c||a(h,c,r,o,f))){m=!1;break}}return f.delete(t),f.delete(e),m}var at=si;function pi(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var Be=pi;function ui(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=ui;var mi=1,li=2,di="[object Boolean]",xi="[object Date]",hi="[object Error]",ci="[object Map]",gi="[object Number]",yi="[object RegExp]",_i="[object Set]",bi="[object String]",vi="[object Symbol]",Oi="[object ArrayBuffer]",Ai="[object DataView]",Ge=Rn?Rn.prototype:void 0,xt=Ge?Ge.valueOf:void 0;function Ti(t,e,r,o,a,f,i){switch(r){case Ai:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Oi:if(t.byteLength!=e.byteLength||!f(new ac(t),new ac(e)))return!1;return!0;case di:case xi:case gi:return ha(+t,+e);case hi:return t.name==e.name&&t.message==e.message;case yi:case bi:return t==e+"";case ci:var n=Be;case _i:var s=o&mi;if(n||(n=B),t.size!=e.size&&!s)return!1;var p=i.get(t);if(p)return p==e;o|=li,i.set(t,e);var d=at(n(t),n(e),o,a,f,i);return i.delete(t),d;case vi:if(xt)return xt.call(t)==xt.call(e)}return!1}var Ue=Ti;var wi=1,Si=Object.prototype,Pi=Si.hasOwnProperty;function Ci(t,e,r,o,a,f){var i=r&wi,n=sd(t),s=n.length,p=sd(e),d=p.length;if(s!=d&&!i)return!1;var l=s;while(l--){var m=n[l];if(!(i?m in e:Pi.call(e,m)))return!1}var g=f.get(t),h=f.get(e);if(g&&h)return g==e&&h==t;var c=!0;f.set(t,e),f.set(e,t);var b=i;while(++l<s){m=n[l];var P=t[m],C=e[m];if(o)var gt=i?o(C,P,m,e,t,f):o(P,C,m,t,e,f);if(!(gt===void 0?P===C||a(P,C,r,o,f):gt)){c=!1;break}b||(b=m=="constructor")}if(c&&!b){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))c=!1}return f.delete(t),f.delete(e),c}var ze=Ci;var Ei=1,We="[object Arguments]",Ke="[object Array]",ft="[object Object]",Ii=Object.prototype,He=Ii.hasOwnProperty;function Li(t,e,r,o,a,f){var i=Ce(t),n=Ce(e),s=i?Ke:Vr(t),p=n?Ke:Vr(e);s=s==We?ft:s,p=p==We?ft:p;var d=s==ft,l=p==ft,m=s==p;if(m&&ba(t)){if(!ba(e))return!1;i=!0,d=!1}if(m&&!d)return f||(f=new wo),i||Hi(t)?at(t,e,r,o,a,f):Ue(t,e,s,r,o,a,f);if(!(r&Ei)){var g=d&&He.call(t,"__wrapped__"),h=l&&He.call(e,"__wrapped__");if(g||h){var c=g?t.value():t,b=h?e.value():e;return f||(f=new wo),a(c,b,r,o,f)}}if(!m)return!1;return f||(f=new wo),ze(t,e,r,o,a,f)}var qe=Li;function $e(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!sn(t)&&!sn(e))return t!==t&&e!==e;return qe(t,e,r,o,$e,a)}var it=$e;var Mi=1,Ni=2;function Di(t,e,r,o){var a=r.length,f=a,i=!o;if(t==null)return!f;t=Object(t);while(a--){var n=r[a];if(i&&n[2]?n[1]!==t[n[0]]:!(n[0]in t))return!1}while(++a<f){n=r[a];var s=n[0],p=t[s],d=n[1];if(i&&n[2]){if(p===void 0&&!(s in t))return!1}else{var l=new wo;if(o)var m=o(p,d,s,t,e,l);if(!(m===void 0?it(d,p,Mi|Ni,o,l):m))return!1}}return!0}var ke=Di;function Ri(t){return t===t&&!Tt(t)}var nt=Ri;function Fi(t){var e=Kt(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,nt(a)]}return e}var Ye=Fi;function Bi(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var st=Bi;function $i(t){var e=Ye(t);if(e.length==1&&e[0][2])return st(e[0][0],e[0][1]);return function(r){return r===t||ke(r,t,e)}}var Xe=$i;function ki(t,e){return t!=null&&e in Object(t)}var Ze=ki;function Yi(t,e,r){e=qi(e,t);var o=-1,a=e.length,f=!1;while(++o<a){var i=xo(e[o]);if(!(f=t!=null&&r(t,i)))break;t=t[i]}if(f||++o!=a)return f;return a=t==null?0:t.length,!!a&&j(a)&&zi(i,a)&&(Ce(t)||Ja(t))}var Op=Yi;function Xi(t,e){return t!=null&&Op(t,e,Ze)}var $p=Xi;var Zi=1,Ji=2;function Qi(t,e){if(M(t)&&nt(e))return st(xo(t),e);return function(r){var o=ye(r,t);return o===void 0&&o===e?$p(r,t):it(e,o,Zi|Ji)}}var Qe=Qi;function Vi(t){return function(e){return e==null?void 0:e[t]}}var zp=Vi;function tn(t){return function(e){return Wi(e,t)}}var Ve=tn;function en(t){return M(t)?zp(xo(t)):Ve(t)}var er=en;function rn(t){if(typeof t=="function")return t;if(t==null)return _r;if(typeof t=="object")return Ce(t)?Qe(t[0],t[1]):Xe(t);return er(t)}var tr=rn;function on(t){return function(e,r,o){var a=-1,f=Object(e),i=o(e),n=i.length;while(n--){var s=i[t?n:++a];if(r(f[s],s,f)===!1)break}return e}}var rr=on;var an=rr(),oc=an;function fn(t,e){return t&&oc(t,e,Kt)}var ic=fn;function nn(t,e){return function(r,o){if(r==null)return r;if(!Ln(r))return t(r,o);var a=r.length,f=e?a:-1,i=Object(r);while(e?f--:++f<a)if(o(i[f],f,i)===!1)break;return r}}var or=nn;var pn=or(ic),Ki=pn;function un(t){return sn(t)&&Ln(t)}var Up=un;function mn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var ar=mn;function ln(t){return typeof t=="function"?t:_r}var sc=ln;function dn(t,e){var r=Ce(t)?Dp:Ki;return r(t,sc(e))}var v=dn;function xn(t,e){var r=[];return Ki(t,function(o,a,f){if(e(o,a,f))r.push(o)}),r}var ir=xn;function hn(t,e){var r=Ce(t)?Q:ir;return r(t,tr(e,3))}var fr=hn;function cn(t,e){return yo(e,function(r){return t[r]})}var nr=cn;function gn(t){return t==null?[]:nr(t,Kt(t))}var Yr=gn;var yn="[object Map]",_n="[object Set]",bn=Object.prototype,vn=bn.hasOwnProperty;function On(t){if(t==null)return!0;if(Ln(t)&&(Ce(t)||typeof t=="string"||typeof t.splice=="function"||ba(t)||Hi(t)||Ja(t)))return!t.length;var e=Vr(t);if(e==yn||e==_n)return!t.size;if(Gi(t))return!ec(t).length;for(var r in t)if(vn.call(t,r))return!1;return!0}var pt=On;function An(t){return t===void 0}var Vt=An;function Tn(t,e,r,o,a){return a(t,function(f,i,n){r=o?(o=!1,f):e(r,f,i,n)}),r}var sr=Tn;function wn(t,e,r){var o=Ce(t)?Oe:sr,a=arguments.length<3;return o(t,tr(e,4),r,a,Ki)}var Co=wn;var Pn=1/0,Cn=!(S&&1/B(new S([,-0]))[1]==Pn)?jt:function(t){return new S(t)},pr=Cn;var En=200;function In(t,e,r){var o=-1,a=Bt,f=t.length,i=!0,n=[],s=n;if(r)i=!1,a=ar;else if(f>=En){var p=e?null:pr(t);if(p)return B(p);i=!1,a=ot,s=new rt}else s=e?[]:n;t:while(++o<f){var d=t[o],l=e?e(d):d;if(d=r||d!==0?d:0,i&&l===l){var m=s.length;while(m--)if(s[m]===l)continue t;if(e)s.push(l);n.push(d)}else if(!a(s,l,r)){if(s!==n)s.push(l);n.push(d)}}return n}var ur=In;var jn=Ui(function(t){return ur(nc(t,1,Up,!0))}),ht=jn;var Nn="\x00",L="\x00",lr="\x01";class Je{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Sr(void 0),this._defaultEdgeLabelFn=Sr(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!vo(t))t=Sr(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Kt(this._nodes)}sources(){var t=this;return fr(this.nodes(),function(e){return pt(t._in[e])})}sinks(){var t=this;return fr(this.nodes(),function(e){return pt(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return v(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];v(Kt(this._in[t]),e),delete this._in[t],delete this._preds[t],v(Kt(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(Vt(e))e=L;else{e+="";for(var r=e;!Vt(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(Vt(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return Kt(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return Kt(e)}successors(t){var e=this._sucs[t];if(e)return Kt(e)}neighbors(t){var e=this.predecessors(t);if(e)return ht(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;v(this._nodes,function(f,i){if(t(i))e.setNode(i,f)}),v(this._edgeObjs,function(f){if(e.hasNode(f.v)&&e.hasNode(f.w))e.setEdge(f,r.edge(f))});var o={};function a(f){var i=r.parent(f);if(i===void 0||e.hasNode(i))return o[f]=i,i;else if(i in o)return o[i];else return a(i)}if(this._isCompound)v(e.nodes(),function(f){e.setParent(f,a(f))});return e}setDefaultEdgeLabel(t){if(!vo(t))t=Sr(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Yr(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Co(t,function(a,f){if(o.length>1)r.setEdge(a,f,e);else r.setEdge(a,f);return f}),this}setEdge(){var t,e,r,o,a=!1,f=arguments[0];if(typeof f==="object"&&f!==null&&"v"in f){if(t=f.v,e=f.w,r=f.name,arguments.length===2)o=arguments[1],a=!0}else if(t=f,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!Vt(r))r=""+r;var i=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i)){if(a)this._edgeLabels[i]=o;return this}if(!Vt(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[i]=a?o:this._defaultEdgeLabelFn(t,e,r);var n=Dn(this._isDirected,t,e,r);return t=n.v,e=n.w,Object.freeze(n),this._edgeObjs[i]=n,dr(this._preds[e],t),dr(this._sucs[t],e),this._in[e][i]=n,this._out[t][i]=n,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?ct(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?ct(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?ct(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],xr(this._preds[e],t),xr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=Yr(r);if(!e)return o;return fr(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=Yr(r);if(!e)return o;return fr(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}Je.prototype._nodeCount=0;Je.prototype._edgeCount=0;function dr(t,e){if(t[e])t[e]++;else t[e]=1}function xr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}return a+lr+f+lr+(Vt(o)?Nn:o)}function Dn(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}var n={v:a,w:f};if(o)n.name=o;return n}function ct(t,e){return z(t,e.v,e.w,e.name)}
2
+ export{Wt,Rn,mr,sn,Kr,yo,Ce,Tt,_r,vo,Sr,Xl,Tp,Dp,Np,zi,ha,Qp,Ui,Ln,Gi,Ja,ba,ji,ko,Hi,Rp,Lp,ec,Kt,Fp,qi,xo,Wi,tc,nc,wo,Mp,rc,Pp,sd,Vr,ac,Op,$p,zp,tr,oc,ic,Ki,Up,sc,v,fr,Yr,Vt,Co,Je};
@@ -1 +1 @@
1
- import{d,n,o,u,ue,e,B,p,dn,Pe,U,bh,Te,vl,xt,so,nt,J}from"./index-dzp9rwy0.js";function F(a){if(!Number.isFinite(a)||a<=0)return"";return new Date(a).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function P({files:a,selected:h,onSelect:b}){let[i,l]=n(""),r=u(()=>{let t=i.trim().toLowerCase();if(!t)return a;return a.filter((c)=>c.title.toLowerCase().includes(t))},[a,i]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2 py-1.5",children:[e(U,{size:12,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"search",value:i,onChange:(t)=>l(t.target.value),placeholder:"Filter plans…","aria-label":"Filter plans",className:"min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder:text-ink/35"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:r.length===0?e("p",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:a.length===0?"No plan yet":"No plan matches the filter"}):e("ul",{className:"py-1",children:r.map((t)=>{let c=t.path===h,m=F(t.modifiedAt);return e("li",{children:e("button",{type:"button",onClick:()=>b(t.path),"aria-current":c?"true":void 0,title:`${t.path}${m?` · ${m}`:""}`,className:`flex w-full items-start gap-1.5 px-2.5 py-1.5 text-left transition-colors ${c?"bg-ink/10 font-semibold text-ink":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e(Pe,{size:12,className:`mt-0.5 flex-shrink-0 ${c?"text-ink":"text-ink/40"}`}),e("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[11.5px]",children:t.title}),m&&e("span",{className:"block truncate font-mono text-[10px] text-ink/40",children:m})]})]})},t.path)})})})]})}function y({file:a,content:h,isLoading:b,error:i,truncated:l,onBack:r}){return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[e("button",{type:"button",onClick:r,title:"Back to the plan list","aria-label":"Back to the plan list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(dn,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:a?.path??"",children:a?.path??"Plan"}),b&&e(p,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:i?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:i})]}):!h?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:b?"Reading the plan…":"This plan is empty."}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:h,className:"max-w-none"}),l&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This plan is longer than the reader's budget and was cut off."})]})})]})}function X({className:a="",active:h=!0,tabsMode:b=!1}){let[i]=ue(),l=i.get("sessionId"),[r,t]=vl("plan.selectedFile",null),[c,m]=n(!1),k=r&&r.sessionId===l?r.path:null,s=Te(l?bh(l):null,{enabled:h}),x=s.data?.files??[],v=s.data?.current??null,f=u(()=>{if(k&&x.some((g)=>g.path===k))return k;return v},[k,x,v]),w=u(()=>x.find((g)=>g.path===f)??null,[x,f]);o(()=>{if(!l||!f||f===k)return;t({sessionId:l,path:f})},[l,f,k,t]),o(()=>{m(!1)},[l]);let S=(g)=>{if(l)t({sessionId:l,path:g});m(!0)};if(!l)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${a}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let N=x.length>0;return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${a}`,children:[e(xt,{left:e(d,{children:[e(Pe,{size:12,className:"flex-shrink-0 text-ink/50"}),e(so,{id:"plan",tabsMode:b,children:e("span",{className:"truncate text-[11px] font-medium text-ink/70",children:"Plan mode"})}),N&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] text-ink/60",children:x.length})]}),right:e(nt,{label:"Re-read the plan",onClick:s.refresh,busy:s.isLoading||s.refreshing,disabled:s.isLoading})}),s.stale&&!s.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-error",children:"The plan could not be read."}),e("button",{type:"button",onClick:s.refresh,className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!s.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Reading the plan…"})]}):!N?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Pe,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:"No plan yet. Turn on Plan mode in the composer, and the plan this session writes will appear here."})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${c?"hidden @[520px]:flex":"flex"} flex-col`,children:e(P,{files:x,selected:f,onSelect:S})}),e("div",{className:`min-w-0 min-h-0 flex-1 ${c?"flex":"hidden @[520px]:flex"} flex-col`,children:e(y,{file:w,content:s.data.content,isLoading:s.isLoading,error:s.stale?"The plan could not be read.":null,truncated:s.data.truncated,onBack:()=>m(!1)})})]})]})}export{X as PlanPanel};
1
+ import{d,n,o,u,ue,e,B,p,dn,Pe,U,bh,Te,yl,xt,so,nt,J}from"./index-c8ta3k4g.js";function F(a){if(!Number.isFinite(a)||a<=0)return"";return new Date(a).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function P({files:a,selected:h,onSelect:b}){let[i,l]=n(""),r=u(()=>{let t=i.trim().toLowerCase();if(!t)return a;return a.filter((c)=>c.title.toLowerCase().includes(t))},[a,i]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2 py-1.5",children:[e(U,{size:12,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"search",value:i,onChange:(t)=>l(t.target.value),placeholder:"Filter plans…","aria-label":"Filter plans",className:"min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder:text-ink/35"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:r.length===0?e("p",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:a.length===0?"No plan yet":"No plan matches the filter"}):e("ul",{className:"py-1",children:r.map((t)=>{let c=t.path===h,m=F(t.modifiedAt);return e("li",{children:e("button",{type:"button",onClick:()=>b(t.path),"aria-current":c?"true":void 0,title:`${t.path}${m?` · ${m}`:""}`,className:`flex w-full items-start gap-1.5 px-2.5 py-1.5 text-left transition-colors ${c?"bg-ink/10 font-semibold text-ink":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e(Pe,{size:12,className:`mt-0.5 flex-shrink-0 ${c?"text-ink":"text-ink/40"}`}),e("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[11.5px]",children:t.title}),m&&e("span",{className:"block truncate font-mono text-[10px] text-ink/40",children:m})]})]})},t.path)})})})]})}function y({file:a,content:h,isLoading:b,error:i,truncated:l,onBack:r}){return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[e("button",{type:"button",onClick:r,title:"Back to the plan list","aria-label":"Back to the plan list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(dn,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:a?.path??"",children:a?.path??"Plan"}),b&&e(p,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:i?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:i})]}):!h?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:b?"Reading the plan…":"This plan is empty."}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:h,className:"max-w-none"}),l&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This plan is longer than the reader's budget and was cut off."})]})})]})}function X({className:a="",active:h=!0,tabsMode:b=!1}){let[i]=ue(),l=i.get("sessionId"),[r,t]=yl("plan.selectedFile",null),[c,m]=n(!1),k=r&&r.sessionId===l?r.path:null,s=Te(l?bh(l):null,{enabled:h}),x=s.data?.files??[],v=s.data?.current??null,f=u(()=>{if(k&&x.some((g)=>g.path===k))return k;return v},[k,x,v]),w=u(()=>x.find((g)=>g.path===f)??null,[x,f]);o(()=>{if(!l||!f||f===k)return;t({sessionId:l,path:f})},[l,f,k,t]),o(()=>{m(!1)},[l]);let S=(g)=>{if(l)t({sessionId:l,path:g});m(!0)};if(!l)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${a}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let N=x.length>0;return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${a}`,children:[e(xt,{left:e(d,{children:[e(Pe,{size:12,className:"flex-shrink-0 text-ink/50"}),e(so,{id:"plan",tabsMode:b,children:e("span",{className:"truncate text-[11px] font-medium text-ink/70",children:"Plan mode"})}),N&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] text-ink/60",children:x.length})]}),right:e(nt,{label:"Re-read the plan",onClick:s.refresh,busy:s.isLoading||s.refreshing,disabled:s.isLoading})}),s.stale&&!s.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-error",children:"The plan could not be read."}),e("button",{type:"button",onClick:s.refresh,className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!s.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Reading the plan…"})]}):!N?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Pe,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:"No plan yet. Turn on Plan mode in the composer, and the plan this session writes will appear here."})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${c?"hidden @[520px]:flex":"flex"} flex-col`,children:e(P,{files:x,selected:f,onSelect:S})}),e("div",{className:`min-w-0 min-h-0 flex-1 ${c?"flex":"hidden @[520px]:flex"} flex-col`,children:e(y,{file:w,content:s.data.content,isLoading:s.isLoading,error:s.stale?"The plan could not be read.":null,truncated:s.data.truncated,onBack:()=>m(!1)})})]})]})}export{X as PlanPanel};
@@ -1,10 +1,10 @@
1
- import{n,o,i,u,a,ze,e,ao,I,S,T,tt,cr,wl,Ii,_i,Th,Qh,Rh,Po,Lh,Fh,gt,Dd,zh,Uh,Lt,Pa,zd,Pl,Wd,tg}from"./index-dzp9rwy0.js";import{ke,Dn,jl,Br,x,P,on,Nn,D,ye,_}from"./index-7ag37ghj.js";function We(t){let r=t.split("/").pop()??"",s=r.lastIndexOf(".");return s>0&&s<r.length-1?r.slice(s).toLowerCase():""}function wA(t){let r=Lt("fileOpener"),s=Lt("sourceCodeRenderer"),l=Pa(),c=t.extension??We(t.path),d=r.find((h)=>h.registration.matches({path:t.path,extension:c}));if(d)return{kind:"opener",pluginId:d.pluginId,Component:d.registration.component,props:{...l,path:t.path,extension:c}};let f=s.find((h)=>h.registration.extensions.includes(c));if(f)return{kind:"source",pluginId:f.pluginId,Component:f.registration.component,props:{...l,path:t.path,content:t.content,language:t.language}};return null}function CA(t){let r=Lt("diffRenderer"),s=Pa(),l=We(t.path),c=r.find((d)=>{let f=d.registration.extensions;return f===void 0||f.includes(l)});if(!c)return null;return{pluginId:c.pluginId,Component:c.registration.component,props:{...s,path:t.path,diff:t.diff}}}function EA({view:t}){if(t.kind==="opener"){let s=t.Component;return e(tt,{pluginId:t.pluginId,children:e(s,{...t.props})})}let r=t.Component;return e(tt,{pluginId:t.pluginId,children:e(r,{...t.props})})}var Tt={docx:!0},Ct={xls:!0,xlsx:!0,xlsm:!0},Dt={csv:!0,tsv:!0},It={md:!0,markdown:!0,mdx:!0},Ot={html:!0,htm:!0},Pt={drawio:!0,dio:!0},Fs={image:!0,pdf:!0,docx:!0,spreadsheet:!0,code:void 0,markdown:void 0,html:void 0,svg:void 0,csv:void 0,drawio:void 0},ku={markdown:!0,html:!0,svg:!0,csv:!0,drawio:!0,code:void 0,image:void 0,pdf:void 0,docx:void 0,spreadsheet:void 0},Nt={markdown:!0,svg:!0,csv:!0,drawio:!0,html:void 0,code:void 0,image:void 0,pdf:void 0,docx:void 0,spreadsheet:void 0};function xu(t){return Nt[t]===!0}var ei={code:"Text",markdown:"Markdown",html:"HTML",svg:"SVG",csv:"CSV",image:"Image",pdf:"PDF",docx:"Document",spreadsheet:"Spreadsheet",drawio:"Diagram"};function Ms(t){let r=Ii(t);if(!r)return"code";if(r==="svg")return"svg";if(Pt[r])return"drawio";if(It[r])return"markdown";if(Ot[r])return"html";if(_i(t))return"image";if(r==="pdf")return"pdf";if(Tt[r])return"docx";if(Ct[r])return"spreadsheet";if(Dt[r])return"csv";return"code"}var Wt={id:"",url:null,loadBytes:null,mimeType:null};async function Le(t){let r=await t.json().catch(()=>null);return typeof r?.error==="string"&&r.error?r.error:`Could not read the file (HTTP ${t.status}).`}function Ae(t){let r=Th(t.path);if(t.rawUrl){let c=t.rawUrl;return{id:c,url:c,mimeType:r,loadBytes:async()=>{let d=await fetch(c);if(!d.ok)throw Error(await Le(d));return d.arrayBuffer()}}}let s=tg(t.handleId);if(s){let{bytes:c}=s;return{id:t.handleId,url:null,mimeType:s.mimeType??r,loadBytes:async()=>c.slice().buffer}}let l=Pl(t.handleId);if(l)return{id:t.handleId,url:null,mimeType:r,loadBytes:async()=>(await l.getFile()).arrayBuffer()};return Wt}function Be(t,r){let s=t?Ms(t.path??""):"code",l=Fs[s]===!0,c=Boolean(t?.path)&&!t?.handleId,d=c&&t?.content===void 0&&_i(t?.path)?t.path:null,f=d!==null,h=t&&!f&&l&&c&&t.content===void 0?wl({path:t.path,root:t.root,repo:t.repo}):null,p=Ae({path:t?.path,handleId:t?.handleId,rawUrl:d?`${wl({path:d,root:t?.root,repo:t?.repo})}&v=${r}`:h});return{viewerKind:s,isBinaryViewer:l,isImage:f,imageUrl:f?p.url:null,byteSource:p}}function Ke(t){let r=t.indexOf(`
1
+ import{n,o,i,u,a,ze,e,ao,I,S,T,tt,cr,xl,Bi,Ii,Th,Qh,Rh,Mo,Lh,Fh,gt,Dd,zh,Uh,Lt,Pa,zd,Pl,Wd,tg}from"./index-c8ta3k4g.js";import{ke,Dn,jl,Br,x,P,on,Nn,D,ye,_}from"./index-4kchzh9y.js";function We(t){let r=t.split("/").pop()??"",s=r.lastIndexOf(".");return s>0&&s<r.length-1?r.slice(s).toLowerCase():""}function wA(t){let r=Lt("fileOpener"),s=Lt("sourceCodeRenderer"),l=Pa(),c=t.extension??We(t.path),d=r.find((h)=>h.registration.matches({path:t.path,extension:c}));if(d)return{kind:"opener",pluginId:d.pluginId,Component:d.registration.component,props:{...l,path:t.path,extension:c}};let f=s.find((h)=>h.registration.extensions.includes(c));if(f)return{kind:"source",pluginId:f.pluginId,Component:f.registration.component,props:{...l,path:t.path,content:t.content,language:t.language}};return null}function CA(t){let r=Lt("diffRenderer"),s=Pa(),l=We(t.path),c=r.find((d)=>{let f=d.registration.extensions;return f===void 0||f.includes(l)});if(!c)return null;return{pluginId:c.pluginId,Component:c.registration.component,props:{...s,path:t.path,diff:t.diff}}}function EA({view:t}){if(t.kind==="opener"){let s=t.Component;return e(tt,{pluginId:t.pluginId,children:e(s,{...t.props})})}let r=t.Component;return e(tt,{pluginId:t.pluginId,children:e(r,{...t.props})})}var Tt={docx:!0},Ct={xls:!0,xlsx:!0,xlsm:!0},Dt={csv:!0,tsv:!0},It={md:!0,markdown:!0,mdx:!0},Ot={html:!0,htm:!0},Pt={drawio:!0,dio:!0},Ls={image:!0,pdf:!0,docx:!0,spreadsheet:!0,code:void 0,markdown:void 0,html:void 0,svg:void 0,csv:void 0,drawio:void 0},ku={markdown:!0,html:!0,svg:!0,csv:!0,drawio:!0,code:void 0,image:void 0,pdf:void 0,docx:void 0,spreadsheet:void 0},Nt={markdown:!0,svg:!0,csv:!0,drawio:!0,html:void 0,code:void 0,image:void 0,pdf:void 0,docx:void 0,spreadsheet:void 0};function xu(t){return Nt[t]===!0}var Xo={code:"Text",markdown:"Markdown",html:"HTML",svg:"SVG",csv:"CSV",image:"Image",pdf:"PDF",docx:"Document",spreadsheet:"Spreadsheet",drawio:"Diagram"};function Fs(t){let r=Bi(t);if(!r)return"code";if(r==="svg")return"svg";if(Pt[r])return"drawio";if(It[r])return"markdown";if(Ot[r])return"html";if(Ii(t))return"image";if(r==="pdf")return"pdf";if(Tt[r])return"docx";if(Ct[r])return"spreadsheet";if(Dt[r])return"csv";return"code"}var Wt={id:"",url:null,loadBytes:null,mimeType:null};async function Le(t){let r=await t.json().catch(()=>null);return typeof r?.error==="string"&&r.error?r.error:`Could not read the file (HTTP ${t.status}).`}function Ae(t){let r=Th(t.path);if(t.rawUrl){let c=t.rawUrl;return{id:c,url:c,mimeType:r,loadBytes:async()=>{let d=await fetch(c);if(!d.ok)throw Error(await Le(d));return d.arrayBuffer()}}}let s=tg(t.handleId);if(s){let{bytes:c}=s;return{id:t.handleId,url:null,mimeType:s.mimeType??r,loadBytes:async()=>c.slice().buffer}}let l=Pl(t.handleId);if(l)return{id:t.handleId,url:null,mimeType:r,loadBytes:async()=>(await l.getFile()).arrayBuffer()};return Wt}function Be(t,r){let s=t?Fs(t.path??""):"code",l=Ls[s]===!0,c=Boolean(t?.path)&&!t?.handleId,d=c&&t?.content===void 0&&Ii(t?.path)?t.path:null,f=d!==null,h=t&&!f&&l&&c&&t.content===void 0?xl({path:t.path,root:t.root,repo:t.repo}):null,p=Ae({path:t?.path,handleId:t?.handleId,rawUrl:d?`${xl({path:d,root:t?.root,repo:t?.repo})}&v=${r}`:h});return{viewerKind:s,isBinaryViewer:l,isImage:f,imageUrl:f?p.url:null,byteSource:p}}function Ke(t){let r=t.indexOf(`
2
2
  `);return r>0&&t[r-1]==="\r"?"crlf":"lf"}function me(t){return t.includes("\r")?t.replace(/\r\n?/g,`
3
3
  `):t}function Ue(t,r){let s=me(t);return r==="crlf"?s.replace(/\n/g,`\r
4
4
  `):s}function qe(t){return String(t.id??t.path??t.name)}function Ve({target:t,key:r,isBinaryViewer:s,revision:l,loadedRef:c,contentsRef:d,baselinesRef:f,pendingRef:h,readingRef:p,remember:g}){let[v,k]=n(!1),[w,m]=n(!1),[R,y]=n(null),[E,F]=n(null);return o(()=>{if(m(!1),!t)return;let b=qe(t);if(c.current.has(b))return;if(c.current.add(b),s){y(null),F(null),k(!1);return}if(t.content!==void 0){g(b,t.content,null,null),y(null),F(null);return}if(!t.path){y("No file path supplied for this attachment."),F(null);return}let W=d.current[b]===void 0,U=!1;if(W)k(!0);y(null),F(null);let N=new URLSearchParams({path:t.path});if(t.root)N.set("root",t.root);if(t.repo&&t.repo!==".")N.set("repo",t.repo);return p.current+=1,m(!0),fetch(`/api/fs/read?${N.toString()}`).then(async(B)=>{let O=await B.json().catch(()=>null);if(!B.ok||!O||typeof O.content!=="string"){let C=Error(O?.error||`HTTP ${B.status}`);if(O?.kind)C.kind=O.kind;else if(B.status===415)C.kind="binary";throw C}return{text:O.content,mtimeMs:typeof O.mtimeMs==="number"?O.mtimeMs:null,hash:typeof O.hash==="string"?O.hash:null}}).then(({text:B,mtimeMs:O,hash:C})=>{if(U)return;let A=d.current[b];if(A!==void 0&&A!==f.current[b])return;let X=h.current;if(X&&qe(X.file)===b)return;g(b,B,O,C)}).catch((B)=>{if(U)return;if(!W)return;g(b,"",null,null);let O=B instanceof Error?B.message:"Failed to read file",C=B?.kind;F(C?O:null),y(O)}).finally(()=>{if(p.current-=1,!U)k(!1),m(!1)}),()=>{U=!0}},[r,t,g,l,s,c,d,f,h,p]),{isLoading:v,isReading:w&&!v,loadError:R,unsupported:E}}async function _e(t,r){let s=await fetch(t);if(!s.ok)throw Error(`HTTP ${s.status}`);zd(await s.blob(),r)}async function $e(t){let r=await fetch(t);if(!r.ok)throw Error(`HTTP ${r.status}`);let s=await r.blob();if(typeof ClipboardItem>"u"||!navigator.clipboard?.write)throw Error("Image clipboard unavailable");await navigator.clipboard.write([new ClipboardItem({[s.type]:s})])}function He({target:t,content:r,downloadContent:s,imageUrl:l,downloadMimeType:c,byteSource:d,byteViewer:f=!1}){let[h,p]=n(!1),g=a(()=>{p(!0),window.setTimeout(()=>p(!1),1500)},[]),v=a(()=>{if(!t)return;if(l){$e(l).then(g).catch(()=>{});return}if(f)return;if(!navigator.clipboard)return;navigator.clipboard.writeText(r).then(g).catch(()=>{})},[t,r,l,f,g]),k=a(()=>{if(!t)return;if(l){_e(l,t.name).catch(()=>{});return}if(f){let w=d?.loadBytes;if(!w)return;let m=d?.mimeType;w().then((R)=>zd(m?new Blob([R],{type:m}):new Blob([R]),t.name)).catch(()=>{});return}zd(new Blob([s],{type:c}),t.name)},[t,s,c,l,f,d]);return{copied:h,copy:v,download:k}}async function je(t){let r=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(t));return Array.from(new Uint8Array(r),(s)=>s.toString(16).padStart(2,"0")).join("")}async function Xe(t,r,s,l){if(t.handleId){let d=s==="crlf"?r.replace(/\n/g,`\r
5
5
  `):r,f=await Wd(t.handleId,d,{interactive:l.interactive});if(f==="written")return{status:"written",written:{mtimeMs:null,hash:await je(d)}};if(f==="needs-permission")return{status:"needs-permission"};return{status:"failed"}}if(!t.path)return{status:"failed"};let c=new FormData;if(c.append("actionType","save"),c.append("path",t.path),c.append("content",r),c.append("eol",s),t.root)c.append("root",t.root);if(t.repo&&t.repo!==".")c.append("repo",t.repo);if(typeof l.baseMtimeMs==="number")c.append("baseMtime",String(l.baseMtimeMs));try{let d=await fetch("/api/fs/action",{method:"POST",body:c}),f=await d.json().catch(()=>null);if(d.status===409)return{status:"conflict",diskMtimeMs:typeof f?.mtimeMs==="number"?f.mtimeMs:null};if(d.ok&&f?.success)return{status:"written",written:{mtimeMs:typeof f.mtimeMs==="number"?f.mtimeMs:null,hash:typeof f.hash==="string"?f.hash:null}};return{status:"failed"}}catch{return{status:"failed"}}}function le(t,r){let s={},l=!1;for(let[c,d]of Object.entries(t))if(r.has(c))s[c]=d;else l=!0;return l?s:t}function xe(t){return String(t.id??t.path??t.name)}function Ge({target:t,isBinaryViewer:r,loadError:s,missing:l,contentsRef:c,lineEndingsRef:d,mtimesRef:f,pendingRef:h,flushOnUnmount:p,onSaveStart:g,onSaved:v,onSaveFailed:k,onNeedsPermission:w,onConflict:m}){let[R,y]=n(!1),E=i(l);E.current=l;let F=t?xe(t):"",b=a(async(C,A,X={})=>{if(!C.path&&!C.handleId)return;if(C.handleId&&!Pl(C.handleId))return;if(E.current&&!X.allowMissing)return;g();let q=xe(C),z=X.allowMissing?null:f.current[q]??null,j=await Xe(C,A,d.current[q]??"lf",{interactive:X.interactive===!0,baseMtimeMs:z});if(j.status==="written")v(q,A,j.written);else if(j.status==="needs-permission")w();else if(j.status==="conflict")m(q,j.diskMtimeMs);else k()},[d,f,m,w,k,g,v]),W=i(b);W.current=b;let U=a((C)=>{if(!t||r)return;if(!t.path)return;if(E.current)return;if(h.current)window.clearTimeout(h.current.timer);let A=window.setTimeout(()=>{h.current=null,W.current(t,C)},800);h.current={timer:A,file:t,content:C}},[t,r,h]),N=a(()=>{if(!t||r)return;if(s)return;if(t.handleId&&!Pl(t.handleId))return;let C=c.current[xe(t)];if(C===void 0)return;if(h.current)window.clearTimeout(h.current.timer),h.current=null;if(E.current){y(!0);return}W.current(t,C,{interactive:!0})},[t,c,r,s,h]),B=a(()=>{if(y(!1),!t||r||s)return;let C=c.current[xe(t)];if(C===void 0)return;W.current(t,C,{allowMissing:!0,interactive:!0})},[t,c,r,s]),O=a(()=>y(!1),[]);return o(()=>{if(!p)return;return()=>{let C=h.current;if(!C)return;if(window.clearTimeout(C.timer),h.current=null,E.current)return;W.current(C.file,C.content)}},[p,h]),o(()=>{if(!l)y(!1)},[l,F]),{onChange:U,saveNow:N,saveMissingConfirm:R,confirmSaveMissing:B,cancelSaveMissing:O}}function Qe({key:t,saveNow:r,mtimesRef:s,setMtimes:l,contentsRef:c,setContents:d,setBaselines:f,loadedRef:h,bumpRevision:p}){let[g,v]=n({}),k=a((F)=>{v((b)=>{if(b[F]===void 0)return b;let W={...b};return delete W[F],W})},[]),w=a((F,b)=>{v((W)=>({...W,[F]:{diskMtimeMs:b}}))},[]),m=a((F,b)=>{s.current={...s.current,[F]:b},l(s.current)},[s,l]),R=a((F)=>{if(!t)return;m(t,F),k(t)},[t,m,k]),y=a(()=>{if(!t)return;k(t),f((F)=>{let b={...F};return delete b[t],b}),d((F)=>{let b={...F};return delete b[t],b}),h.current.delete(t),p()},[t,k,f,d,h,p]),E=a(()=>{if(!t)return;let F=c.current[t],b=g[t]?.diskMtimeMs??null;if(k(t),F===void 0)return;if(b!==null)m(t,b);r()},[t,g,k,m,c,r]);return{conflict:g[t]??null,report:w,reload:y,keepMine:E,adopt:R,clear:k}}var At=3000;async function Bt(t,r,s){let l=new URLSearchParams({path:t});if(r)l.set("root",r);if(s&&s!==".")l.set("repo",s);try{let c=await fetch(`/api/fs/digest?${l.toString()}`),d=await c.json().catch(()=>null);if(!c.ok||!d||typeof d.exists!=="boolean")return"unknown";if(d.exists===!1)return"gone";if(typeof d.hash!=="string"||typeof d.mtimeMs!=="number")return"unknown";return{hash:d.hash,mtimeMs:d.mtimeMs}}catch{return"unknown"}}function Ye({path:t,root:r=null,repo:s=null,baseHash:l,revision:c,onUnchanged:d,onChanged:f}){let h=i(d);h.current=d;let p=i(f);p.current=f,o(()=>{if(!t||l===null)return;let g=!1,v=!1,k=null,w=async()=>{if(g||v||document.hidden)return;v=!0;try{let E=await Bt(t,r,s);if(g||E==="unknown"||E==="gone")return;if(E.hash===l){h.current(E.mtimeMs);return}if(k===E.hash)return;k=E.hash,p.current(E)}finally{v=!1}},m=window.setInterval(()=>void w(),At);w();let R=()=>void w(),y=()=>{if(!document.hidden)w()};return window.addEventListener("focus",R),document.addEventListener("visibilitychange",y),()=>{g=!0,window.clearInterval(m),window.removeEventListener("focus",R),document.removeEventListener("visibilitychange",y)}},[t,r,s,l,c])}function G(t){return String(t.id??t.path??t.name)}function zl(t){if(!t.path)return!1;if(t.content!==void 0)return!1;if(t.handleId||t.deviceFile)return!1;return!t.isDiff}function De(t){return`${t.root??""}\x00${t.repo??"."}\x00${t.path??""}`}async function Kt(t){let r=new URLSearchParams({path:t.path??""});if(t.root)r.set("root",t.root);if(t.repo&&t.repo!==".")r.set("repo",t.repo);try{let s=await fetch(`/api/fs/exists?${r.toString()}`),l=await s.json().catch(()=>null);if(!s.ok||!l||typeof l.exists!=="boolean")return!0;return l.exists}catch{return!0}}function wu(t,r){let[s,l]=n(()=>new Set),[c,d]=n(0),f=t.map((g)=>`${g.id}\x01${De(g)}`).join(`
6
6
  `),h=i(t);h.current=t;let p=i(new Set);return o(()=>{let g=!1;return(async()=>{let v=new Map;for(let y of h.current)if(zl(y))v.set(De(y),y);let k=await Promise.all([...v.entries()].map(async([y,E])=>({key:y,exists:await Kt(E)})));if(g)return;let w=new Set;for(let{key:y,exists:E}of k)if(!E)w.add(y);let m=new Set;for(let y of h.current)if(zl(y)&&w.has(De(y)))m.add(y.id);let R=p.current;if(R.size===m.size&&[...m].every((y)=>R.has(y)))return;p.current=m,l(m)})(),()=>{g=!0}},[f,r,c]),o(()=>{let g=()=>d((v)=>v+1);return window.addEventListener("focus",g),document.addEventListener("visibilitychange",g),()=>{window.removeEventListener("focus",g),document.removeEventListener("visibilitychange",g)}},[]),s}function Je({key:t,target:r,baseHash:s,revision:l,hashesRef:c,mtimesRef:d,contentsRef:f,baselinesRef:h,pendingRef:p,readingRef:g,loadedRef:v,bumpRevision:k,adoptDiskMtime:w,clearConflict:m,reloadDiscardingEdits:R,discardPendingWrite:y}){let[E,F]=n(null),b=i(null);o(()=>{F(null),b.current=null},[t]);let W=a((O)=>{if(!t)return;if(d.current[t]!==O)w(O);F(null),b.current=null},[t,d,w]),U=a((O)=>{if(!t)return;if(c.current[t]===O.hash){F(null);return}if(b.current===O.hash)return;if(E?.hash===O.hash)return;let C=f.current[t],A=p.current;if(C!==void 0&&C!==h.current[t]||A!==null&&G(A.file)===t){F(O);return}if(g.current>0)return;v.current.delete(t),k()},[t,c,f,h,p,g,v,k,E]);Ye({path:r&&zl({...r,id:t})?r.path??null:null,root:r?.root??null,repo:r?.repo??null,baseHash:s,revision:l,onUnchanged:W,onChanged:U});let N=a(()=>{if(!r)return;let O=G(r),C=f.current[O];if(C!==void 0&&C!==h.current[O]){y(O),R();return}m(O),v.current.delete(O),k()},[r,f,h,y,R,m,v,k]),B=a(()=>{if(!E)return;b.current=E.hash,w(E.mtimeMs),F(null)},[E,w]);return{diskChange:E,reloadFromDisk:N,keepMineAgainstDisk:B}}function Ze({target:t,loadedRef:r,bumpRevision:s,setContents:l,setBaselines:c,setLineEndings:d,setMtimes:f,setHashes:h}){let p=a((w,m,R,y)=>{let E=Ke(m),F=me(m);l((b)=>({...b,[w]:F})),c((b)=>({...b,[w]:F})),d((b)=>({...b,[w]:E})),f((b)=>({...b,[w]:R})),h((b)=>({...b,[w]:y}))},[l,c,d,f,h]),g=a(()=>{r.current.clear(),s()},[r,s]),v=a((w)=>{let m=new Set(w.map(String));for(let R of Array.from(r.current))if(!m.has(R))r.current.delete(R);l((R)=>le(R,m)),c((R)=>le(R,m)),d((R)=>le(R,m)),f((R)=>le(R,m)),h((R)=>le(R,m))},[r,l,d,f,h]),k=a((w)=>{if(!t)return;d((m)=>({...m,[G(t)]:w}))},[t,d]);return{remember:p,reset:g,retain:v,setEol:k}}function et({target:t,key:r,textDirty:s,contents:l,baselines:c,retain:d}){let[f,h]=n(()=>new Set),p=s||f.has(r),g=u(()=>{let w=new Set(f);for(let[m,R]of Object.entries(l)){let y=c[m];if(y!==void 0&&R!==y)w.add(m)}return w},[l,c,f]),v=a((w)=>{if(!t)return;let m=G(t);h((R)=>{if(R.has(m)===w)return R;let y=new Set(R);if(w)y.add(m);else y.delete(m);return y})},[t]),k=a((w)=>{d(w);let m=new Set(w.map(String));h((R)=>{let y=!1,E=new Set;for(let F of R)if(m.has(F))E.add(F);else y=!0;return y?E:R})},[d]);return{isDirty:p,dirtyKeys:g,setBinaryDirty:v,retain:k}}function Cu(t,r={}){let{flushOnUnmount:s=!1,reportSaveError:l=!1,downloadMimeType:c="text/plain",onFileSaved:d,missing:f=!1}=r,[h,p]=n({}),[g,v]=n({}),[k,w]=n({}),[m,R]=n({}),[y,E]=n({}),[F,b]=n("idle"),[W,U]=n(0),N=t?G(t):"",B=t?h[N]??(t.content!==void 0?me(t.content):""):"",O=B!==(g[N]??B),{viewerKind:C,isBinaryViewer:A,isImage:X,imageUrl:q,byteSource:z}=Be(t,W),j=i(new Set),Q=i(null),ie=i(0),K=i(h);K.current=h;let de=i(g);de.current=g;let J=i(k);J.current=k;let Z=i(m);Z.current=m;let ve=i(y);ve.current=y;let{remember:Me,reset:oe,retain:ne,setEol:Fe}=Ze({target:t,loadedRef:j,bumpRevision:()=>U((H)=>H+1),setContents:p,setBaselines:v,setLineEndings:w,setMtimes:R,setHashes:E}),{isDirty:Ee,dirtyKeys:fe,setBinaryDirty:he,retain:Te}=et({target:t,key:N,textDirty:O,contents:h,baselines:g,retain:ne}),{isLoading:M,isReading:L,loadError:V,unsupported:ee}=Ve({target:t,key:N,isBinaryViewer:A,revision:W,loadedRef:j,contentsRef:K,baselinesRef:de,pendingRef:Q,readingRef:ie,remember:Me}),te=Ge({target:t,isBinaryViewer:A,loadError:V,missing:f,contentsRef:K,lineEndingsRef:J,mtimesRef:Z,pendingRef:Q,flushOnUnmount:s,onSaveStart:()=>b("saving"),onSaved:(H,Y,se)=>{if(b("saved"),v((pe)=>({...pe,[H]:Y})),se.mtimeMs!==null)R((pe)=>({...pe,[H]:se.mtimeMs}));if(se.hash!==null)E((pe)=>({...pe,[H]:se.hash}));d?.()},onSaveFailed:()=>b(l?"error":"idle"),onNeedsPermission:()=>b("needs-permission"),onConflict:(H,Y)=>{b("idle"),re.report(H,Y)}}),Ce=i(te);Ce.current=te;let re=Qe({key:N,saveNow:()=>Ce.current.saveNow(),mtimesRef:Z,setMtimes:R,contentsRef:K,setContents:p,setBaselines:v,loadedRef:j,bumpRevision:()=>U((H)=>H+1)}),Ne=a((H)=>{let Y=Q.current;if(!Y||G(Y.file)!==H)return;window.clearTimeout(Y.timer),Q.current=null},[]),{diskChange:St,reloadFromDisk:wt,keepMineAgainstDisk:Rt}=Je({key:N,target:t,baseHash:y[N]??null,revision:W,hashesRef:ve,mtimesRef:Z,contentsRef:K,baselinesRef:de,pendingRef:Q,readingRef:ie,loadedRef:j,bumpRevision:()=>U((H)=>H+1),adoptDiskMtime:re.adopt,clearConflict:re.clear,reloadDiscardingEdits:re.reload,discardPendingWrite:Ne});o(()=>{if(F!=="saved")return;let H=window.setTimeout(()=>b("idle"),1500);return()=>window.clearTimeout(H)},[F]),o(()=>{b("idle")},[N]);let Mt=a((H)=>{if(!t||A)return;let Y=G(t);p((se)=>({...se,[Y]:H})),Ce.current.onChange(H)},[t,A]),{copied:kt,copy:Ft,download:Et}=He({target:t,content:B,downloadContent:t?Ue(B,k[N]??"lf"):B,imageUrl:q,downloadMimeType:c,byteSource:z,byteViewer:A});return{content:B,onChange:Mt,isLoading:M,isReading:L,loaded:t?A||t.content!==void 0||h[N]!==void 0:!1,loadError:V,unsupported:ee,saveStatus:F,copied:kt,isDirty:Ee,setBinaryDirty:he,eol:k[N]??"lf",setEol:Fe,baseMtimeMs:m[N]??null,dirtyKeys:fe,language:t?gt(t.name):"javascript",isImage:X,imageUrl:q,viewerKind:C,byteSource:z,isBinaryViewer:A,revision:W,handleMissing:Boolean(t?.handleId)&&!t?.deviceFile&&Pl(t?.handleId)===null,deviceBacked:Boolean(t?.deviceFile),deviceMissing:Boolean(t?.deviceFile)&&tg(t?.handleId)===null,saveNow:te.saveNow,copy:Ft,download:Et,reset:oe,retain:Te,saveMissingConfirm:te.saveMissingConfirm,confirmSaveMissing:te.confirmSaveMissing,cancelSaveMissing:te.cancelSaveMissing,conflict:re.conflict,resolveConflictByReload:()=>{if(N)Ne(N);re.reload()},resolveConflictByKeepingMine:re.keepMine,reloadFromDisk:wt,diskChange:St,keepMineAgainstDisk:Rt}}var Ut=20;function nt(){let[t,r]=T("editor.findHistory",[]),s=a((l)=>{let c=l.trim();if(!c)return;r((d)=>[c,...d.filter((f)=>f!==c)].slice(0,Ut))},[r]);return{entries:t,remember:s}}function rt(){let[t,r]=n(null),s=a((c)=>{let d=c();if(!d||d.start===d.end)return r(null),!1;return r(d),!0},[]),l=a(()=>r(null),[]);return{range:t,arm:s,disarm:l}}var it=typeof String.prototype.normalize=="function"?(t)=>t.normalize("NFKD"):(t)=>t;class ce{constructor(t,r,s=0,l=t.length,c,d){this.test=d,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(s,l),this.bufferStart=s,this.normalize=c?(f)=>c(it(f)):it,this.query=this.normalize(r)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Dn(this.buffer,this.bufferPos)}next(){while(this.matches.length)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let r=jl(t),s=this.bufferStart+this.bufferPos;this.bufferPos+=Br(t);let l=this.normalize(r);if(l.length)for(let c=0,d=s,f=!0;;c++){let h=l.charCodeAt(c),p=this.match(h,d,f,this.bufferPos+this.bufferStart,c==l.length-1);if(p)return this.value=p,this;if(c==l.length-1)break;if(f&&c<r.length&&r.charCodeAt(c)==h)d++;else f=!1}}}match(t,r,s,l,c){let d=null;for(let f=0;f<this.matches.length;){let h=this.matches[f],p=!1;if(this.query.charCodeAt(h.index)==t)if(h.index==this.query.length-1)d={from:h.from,to:l,precise:c&&h.precise};else h.index++,p=!0;if(p)f++;else this.matches.splice(f,1)}if(this.query.charCodeAt(0)==t)if(this.query.length==1)d={from:r,to:l,precise:s&&c};else this.matches.push({from:r,index:1,precise:s});if(d&&this.test&&!this.test(d.from,d.to,this.buffer,this.bufferStart))d=null;return d}}if(typeof Symbol<"u")ce.prototype[Symbol.iterator]=function(){return this};var st={from:-1,to:-1,match:/.*/.exec(""),precise:!0},lt="gm"+(/x/.unicode==null?"":"u");class Se{constructor(t,r,s,l=0,c=t.length){if(this.text=t,this.to=c,this.curLine="",this.done=!1,this.value=st,/\\[sWDnr]|\n|\r|\[\^/.test(r))return new Oe(t,r,s,l,c);this.re=new RegExp(r,lt+((s===null||s===void 0?void 0:s.ignoreCase)?"i":"")),this.test=s===null||s===void 0?void 0:s.test,this.iter=t.iter();let d=t.lineAt(l);this.curLineStart=d.from,this.matchPos=be(t,l),this.getLine(this.curLineStart)}getLine(t){if(this.iter.next(t),this.iter.lineBreak)this.curLine="";else{if(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to)this.curLine=this.curLine.slice(0,this.to-this.curLineStart);this.iter.next()}}nextLine(){if(this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to)this.curLine="";else this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let r=this.matchPos<=this.to&&this.re.exec(this.curLine);if(r){let s=this.curLineStart+r.index,l=s+r[0].length;if(this.matchPos=be(this.text,l+(s==l?1:0)),s==this.curLineStart+this.curLine.length)this.nextLine();if((s<l||s>this.value.to)&&(!this.test||this.test(s,l,r)))return this.value={from:s,to:l,precise:!0,match:r},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),t=0;else return this.done=!0,this}}}var Ie=new WeakMap;class ae{constructor(t,r){this.from=t,this.text=r}get to(){return this.from+this.text.length}static get(t,r,s){let l=Ie.get(t);if(!l||l.from>=s||l.to<=r){let f=new ae(r,t.sliceString(r,s));return Ie.set(t,f),f}if(l.from==r&&l.to==s)return l;let{text:c,from:d}=l;if(d>r)c=t.sliceString(r,d)+c,d=r;if(l.to<s)c+=t.sliceString(l.to,s);return Ie.set(t,new ae(d,c)),new ae(r,c.slice(r-d,s-d))}}class Oe{constructor(t,r,s,l,c){this.text=t,this.to=c,this.done=!1,this.value=st,this.matchPos=be(t,l),this.re=new RegExp(r,lt+((s===null||s===void 0?void 0:s.ignoreCase)?"i":"")),this.test=s===null||s===void 0?void 0:s.test,this.flat=ae.get(t,l,this.chunkEnd(l+5000))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,r=this.re.exec(this.flat.text);if(r&&!r[0]&&r.index==t)this.re.lastIndex=t+1,r=this.re.exec(this.flat.text);if(r){let s=this.flat.from+r.index,l=s+r[0].length;if((this.flat.to>=this.to||r.index+r[0].length<=this.flat.text.length-10)&&(!this.test||this.test(s,l,r)))return this.value={from:s,to:l,precise:!0,match:r},this.matchPos=be(this.text,l+(s==l?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ae.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}if(typeof Symbol<"u")Se.prototype[Symbol.iterator]=Oe.prototype[Symbol.iterator]=function(){return this};function be(t,r){if(r>=t.length)return r;let s=t.lineAt(r),l;while(r<s.to&&(l=s.text.charCodeAt(r-s.from))>=56320&&l<57344)r++;return r}var qt={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},at=P.define({combine(t){return Nn(t,qt,{highlightWordAroundCursor:(r,s)=>r||s,minSelectionLength:Math.min,maxMatches:Math.min})}});function BA(t){let r=[jt,Ht];if(t)r.push(at.of(t));return r}var Vt=D.mark({class:"cm-selectionMatch"}),_t=D.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function ot(t,r,s,l){return(s==0||t(r.sliceDoc(s-1,s))!=on.Word)&&(l==r.doc.length||t(r.sliceDoc(l,l+1))!=on.Word)}function $t(t,r,s,l){return t(r.sliceDoc(s,s+1))==on.Word&&t(r.sliceDoc(l-1,l))==on.Word}var Ht=ye.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){if(t.selectionSet||t.docChanged||t.viewportChanged)this.decorations=this.getDeco(t.view)}getDeco(t){let r=t.state.facet(at),{state:s}=t,l=s.selection;if(l.ranges.length>1)return D.none;let c=l.main,d,f=null;if(c.empty){if(!r.highlightWordAroundCursor)return D.none;let p=s.wordAt(c.head);if(!p)return D.none;f=s.charCategorizer(c.head),d=s.sliceDoc(p.from,p.to)}else{let p=c.to-c.from;if(p<r.minSelectionLength||p>200)return D.none;if(r.wholeWords){if(d=s.sliceDoc(c.from,c.to),f=s.charCategorizer(c.head),!(ot(f,s,c.from,c.to)&&$t(f,s,c.from,c.to)))return D.none}else if(d=s.sliceDoc(c.from,c.to),!d)return D.none}let h=[];for(let p of t.visibleRanges){let g=new ce(s.doc,d,p.from,p.to);while(!g.next().done){let{from:v,to:k}=g.value;if(!f||ot(f,s,v,k)){if(c.empty&&v<=c.from&&k>=c.to)h.push(_t.range(v,k));else if(v>=c.to||k<=c.from)h.push(Vt.range(v,k));if(h.length>r.maxMatches)return D.none}}}return D.set(h)}},{decorations:(t)=>t.decorations}),jt=_.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),zt=({state:t,dispatch:r})=>{let{selection:s}=t,l=x.create(s.ranges.map((c)=>t.wordAt(c.head)||x.cursor(c.head)),s.mainIndex);if(l.eq(s))return!1;return r(t.update({selection:l})),!0};function Xt(t,r){let{main:s,ranges:l}=t.selection,c=t.wordAt(s.head),d=c&&c.from==s.from&&c.to==s.to;for(let f=!1,h=new ce(t.doc,r,l[l.length-1].to);;)if(h.next(),h.done){if(f)return null;h=new ce(t.doc,r,0,Math.max(0,l[l.length-1].from-1)),f=!0}else{if(f&&l.some((p)=>p.from==h.value.from))continue;if(d){let p=t.wordAt(h.value.from);if(!p||p.from!=h.value.from||p.to!=h.value.to)continue}return h.value}}var IA=({state:t,dispatch:r})=>{let{ranges:s}=t.selection;if(s.some((d)=>d.from===d.to))return zt({state:t,dispatch:r});let l=t.sliceDoc(s[0].from,s[0].to);if(t.selection.ranges.some((d)=>t.sliceDoc(d.from,d.to)!=l))return!1;let c=Xt(t,l);if(!c)return!1;return r(t.update({selection:t.selection.addRange(x.range(c.from,c.to),!1),effects:_.scrollIntoView(c.to)})),!0};var _A=({state:t,dispatch:r})=>{let s=t.selection;if(s.ranges.length>1||s.main.empty)return!1;let{from:l,to:c}=s.main,d=[],f=0;for(let h=new ce(t.doc,t.sliceDoc(l,c));!h.next().done;){if(d.length>1000)return!1;if(h.value.from==l)f=d.length;d.push(x.range(h.value.from,h.value.to))}return r(t.update({selection:x.create(d,f),userEvent:"select.search.matches"})),!0};var ct=5000,Pe={matchCase:!1,wholeWord:!1,isRegex:!1,inSelection:!1},ut="gm"+("unicode"in RegExp.prototype?"u":"");function Re(t,r){if(!t)return null;let s=r.isRegex?t:t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=r.wholeWord?`\\b(?:${s})\\b`:s;try{return new RegExp(l,r.matchCase?ut:`${ut}i`)}catch{return null}}var dt=null,we=null;function Gt(t){if(dt===t&&we)return we;return we=ke.of(t.split(`
7
7
  `)),dt=t,we}function ge(t,r,s,l){if(!r)return{matches:[],truncated:!1,invalid:!1};let c=Re(r,s);if(!c)return{matches:[],truncated:!1,invalid:!0};let d=[],f;try{f=new Se(Gt(t),c.source,{ignoreCase:!s.matchCase})}catch{return{matches:[],truncated:!1,invalid:!0}}let h=s.inSelection&&l?l:null;while(d.length<ct&&!f.next().done){let{from:p,to:g}=f.value;if(p===g)continue;if(h&&(p<h.start||g>h.end))continue;d.push({start:p,end:g})}return{matches:d,truncated:d.length>=ct,invalid:!1}}function ue(t,r){if(t.length===0)return-1;for(let s=0;s<t.length;s++)if(t[s].end>r)return s;return 0}function ft(t,r,s){if(r<=0)return-1;if(t<0)return s===1?0:r-1;return(t+s+r)%r}function Qt(t){return{full:t[0],numbered:[void 0,...t.slice(1)],named:t.groups}}var Yt=/\$(\$|&|\d{1,2}|<[^>]*>)/g;function ht(t,r){if(!t.includes("$"))return t;return t.replace(Yt,(s,l)=>{if(l==="$")return"$";if(l==="&")return r.full;if(l.startsWith("<"))return r.named?.[l.slice(1,-1)]??"";if(l.length===2){let c=r.numbered[Number(l)];if(c!==void 0)return c;let d=r.numbered[Number(l[0])];return d===void 0?"":d+l[1]}return r.numbered[Number(l)]??""})}function Jt(t,r,s,l,c){let d=Re(s,c);if(!d)return null;d.lastIndex=r.start;let f=d.exec(t);if(!f||f.index!==r.start)return null;let h=c.isRegex?ht(l,Qt(f)):l;return{found:f[0],inserted:h,start:f.index,end:f.index+f[0].length}}function pt(t,r,s,l,c){let d=Jt(t,r,s,l,c);if(!d)return null;return{text:t.slice(0,d.start)+d.inserted+t.slice(d.end),caret:d.start+d.inserted.length}}function mt(t,r,s,l){let c=Re(r,l);if(!c)return null;if(!l.isRegex)return t.replace(c,()=>s);return t.replace(c,(...d)=>{if(String(d[0]).length===0)return"";let f=d[d.length-1],h=typeof f==="object"&&f!==null,p=d.slice(1,d.length-(h?3:2));return ht(s,{full:String(d[0]),numbered:[void 0,...p],named:h?f:void 0})})}function Zt(t,r){if(!r||r.start===r.end)return null;let s=t.slice(r.start,r.end);if(!s||s.includes(`
8
- `)||s.length>200)return null;return s}function Eu({text:t,documentKey:r,readSelection:s,select:l,reveal:c,applyDocument:d,toggleWordWrap:f}){let[h,p]=T("editor.findQuery",""),[g,v]=T("editor.findReplace",""),[k,w]=T("editor.findOptions",Pe),m=u(()=>({...Pe,...k}),[k]),R=rt(),y=nt(),[E,F]=n(!1),[b,W]=n(!1),[U,N]=n(-1),[B,O]=n(0),[C,A]=n(0),X=i(!1);X.current=E;let q=u(()=>ge(t,h,m,m.inSelection?R.range:null),[t,h,m,R.range]),z=i(0),j=i(!0),Q=i(c);Q.current=c;let ie=i(l);ie.current=l;let K=a((M)=>{z.current=M,j.current=!0},[]);o(()=>{K(0),A((M)=>M+1)},[r,K]),o(()=>{let M=q.matches;if(j.current){j.current=!1;let L=ue(M,z.current);if(N(L),L>=0)ie.current(M[L].start,M[L].end,!1),Q.current(M[L].start);return}N((L)=>{if(M.length===0)return-1;if(L<0)return ue(M,z.current);return Math.min(L,M.length-1)})},[q,C]);let de=a((M)=>{p(M),K(z.current)},[p,K]),J=a(()=>{if(O((V)=>V+1),X.current)return;let M=s(),L=Zt(t,M);if(L)p(L);K(M?M.start:0),F(!0),A((V)=>V+1)},[t,s,K,p]),Z=a(()=>{W(!0),J()},[J]),ve=a(()=>W((M)=>!M),[]),Me=a(()=>{y.remember(h),F(!1),W(!1);let M=q.matches[U];if(M)l(M.start,M.end,!0)},[q.matches,U,l]),oe=a((M)=>{let L=q.matches;if(L.length===0)return;let V=ft(U,L.length,M);N(V),z.current=L[V].end,l(L[V].start,L[V].end,!1),c(L[V].start)},[q.matches,U,l,c]),ne=a((M)=>{let L={...m,[M]:!m[M]};if(M==="inSelection"&&!R.arm(s)){w({...m,inSelection:!1});return}if(M==="inSelection"&&!L.inSelection)R.disarm();w(L),K(z.current)},[m,w,K,s,R]),Fe=a((M)=>{p(M),y.remember(M),K(z.current),A((L)=>L+1)},[y,K]),Ee=a((M)=>{let L=cr(t,Math.max(0,M.line-1)),{matches:V}=ge(t,M.query,M.options),ee=ue(V,L);if(p(M.query),w(M.options),K(ee>=0?V[ee].start:L),A((te)=>te+1),ee>=0)ie.current(V[ee].start,V[ee].end,!0),Q.current(V[ee].start)},[t,p,w,K]),fe=a(()=>{let M=q.matches[U];if(!M)return;let L=pt(t,M,h,g,m);if(!L)return;d(L.text,L.caret,L.caret),K(L.caret)},[q.matches,U,t,h,g,m,d,K]),he=a(()=>{let M=mt(t,h,g,m);if(M===null||M===t)return;let L=Math.min(z.current,M.length);d(M,L,L),K(L)},[t,h,g,m,d,K]),Te=a((M)=>{switch(M){case"find":J();return;case"replace":Z();return;case"nextMatch":oe(1);return;case"previousMatch":oe(-1);return;case"replaceOne":fe();return;case"replaceAll":he();return;case"toggleCaseSensitive":ne("matchCase");return;case"toggleWholeWord":ne("wholeWord");return;case"toggleRegex":ne("isRegex");return;case"toggleWordWrap":f?.();return;default:return}},[J,Z,oe,fe,he,ne,f]);return{open:E,replaceOpen:b,query:h,replacement:g,options:m,matches:q.matches,truncated:q.truncated,invalid:q.invalid,currentIndex:U,setQuery:de,setReplacement:v,openFind:J,openReplace:Z,toggleReplace:ve,focusRequest:B,close:Me,runCommand:Te,revealMatch:Ee,toggleOption:ne,selectionRange:m.inSelection?R.range:null,history:y.entries,useHistoryEntry:Fe,step:oe,replaceCurrent:fe,replaceAll:he}}function Bu(t,r,s){let l=ze(Uh,zh),[c,d]=n(null);return o(()=>{if(!l||!t||l.path!==t||!s)return;d({request:l,path:t}),Dd(null)},[l,t,s]),u(()=>{if(!c||c.path!==t)return null;let{matches:f}=ge(r,c.request.query,c.request.options),h=cr(r,Math.max(0,c.request.line-1));return{request:c.request,matches:f,currentIndex:ue(f,h)}},[c,t,r])}function vt(t){let r=i({});o(()=>{if(!t)return;Qh(r.current,en(t))}),o(()=>{let s=r.current;return()=>Rh(s)},[])}function en(t){let{file:r}=t;if(!r)return{path:null,name:null,content:"",language:"text",state:"idle",note:null,preview:!1};let s={path:r.path,name:r.name,content:t.content,language:t.language,preview:t.preview&&t.viewerKind==="markdown"};if(r.isDiff)return{...s,content:"",state:"diff",note:null,preview:!1};if(t.loadError)return{...s,state:"error",note:t.loadError,preview:!1};if(t.isBinaryViewer)return{...s,content:"",state:"not-a-document",note:`${ei[t.viewerKind]} files have no text outline.`,preview:!1};if(t.isLoading||!t.loaded)return{...s,state:"loading",note:null,preview:!1};return{...s,state:"ready",note:null}}function xt(t,r,s){let l=ze(Fh,Lh);return u(()=>{if(!l||!t||l.path!==t||!s)return null;let c=cr(r,Math.max(0,l.line-1)),d=r.indexOf(`
9
- `,c),f=(d===-1?r.length:d)-c,h=Math.min(f,Math.max(0,(l.column??1)-1)),p=l.length===void 0?h:Math.min(f,h+l.length);return{path:t,offset:c,selectionStart:c+h,selectionEnd:c+p,request:l}},[l,t,s,r])}function yt({path:t,content:r,ready:s,surfaceRef:l,isPreview:c,exitPreview:d}){let f=xt(t,r,s),h=i(null),p=i(null);o(()=>{if(p.current!==null){let v=l.current;if(c||!v)return;let k=p.current;p.current=null,bt(v,k);return}if(!f||h.current===f.request)return;if(c){h.current=f.request,p.current={start:f.selectionStart,end:f.selectionEnd,offset:f.offset},d();return}let g=l.current;if(!g)return;h.current=f.request,bt(g,{start:f.selectionStart,end:f.selectionEnd,offset:f.offset})})}function bt(t,r){t.select(r.start,r.end,!0),t.revealOffset(r.offset),Po(null)}function Iu({file:t,editor:r,surfaceRef:s,isPreview:l,exitPreview:c,publish:d=!0}){vt(d?{file:t,content:r.content,language:r.language,loaded:r.loaded,isLoading:r.isLoading,loadError:r.loadError,viewerKind:r.viewerKind,isBinaryViewer:r.isBinaryViewer,preview:l}:null),yt({path:t?.path??null,content:r.content,ready:r.loaded&&!r.loadError,surfaceRef:s,isPreview:l,exitPreview:c})}function _u({fileName:t,onReload:r,onKeepMine:s}){return e("div",{className:"flex items-start gap-2 px-3 py-2 border-b border-info/30 bg-info/10 text-[11px] text-ink flex-shrink-0",role:"status","data-external-change-strip":"",children:[e(S,{size:13,className:"text-info flex-shrink-0 mt-0.5"}),e("div",{className:"min-w-0 flex-1",children:[e("div",{className:"font-medium",children:[e("span",{className:"font-mono",children:t})," changed on disk."]}),e("div",{className:"text-ink/60 mt-0.5",children:"Reload takes the disk copy and discards your edits. Keep mine writes yours over it."})]}),e("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e("button",{type:"button",onClick:r,className:"px-2 py-1 rounded border border-ink/20 hover:bg-ink/5 transition-colors cursor-pointer",title:"Take the file from disk",children:"Reload"}),e("button",{type:"button",onClick:s,className:"px-2 py-1 rounded border border-info/50 text-info hover:bg-info/10 transition-colors cursor-pointer",title:"Keep my buffer; the next save writes it",children:"Keep mine"})]})]})}function tn(t){if(t===null)return null;let r=new Date(t);if(Number.isNaN(r.getTime()))return null;return r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Su({diskMtimeMs:t,fileName:r,onReload:s,onKeepMine:l}){let c=tn(t);return e("div",{className:"flex items-start gap-2 px-3 py-2 border-b border-warning/30 bg-warning/10 text-[11px] text-ink flex-shrink-0",role:"alert","data-conflict-strip":"",children:[e(I,{size:13,className:"text-warning flex-shrink-0 mt-0.5"}),e("div",{className:"min-w-0 flex-1",children:[e("div",{className:"font-medium",children:[e("span",{className:"font-mono",children:r})," changed on disk",c?e("span",{className:"text-ink/60",children:[" at ",c]}):null,"."]}),e("div",{className:"text-ink/60 mt-0.5",children:"Your save was refused so nothing was overwritten."})]}),e("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e("button",{type:"button",onClick:s,className:"px-2 py-1 rounded border border-ink/20 hover:bg-ink/5 transition-colors cursor-pointer",title:"Discard my changes and take the file from disk",children:"Reload"}),e("button",{type:"button",onClick:l,className:"px-2 py-1 rounded border border-warning/50 text-warning hover:bg-warning/10 transition-colors cursor-pointer",title:"Write my buffer over the file on disk",children:"Keep mine"})]})]})}function Tu({fileName:t,filePath:r,onClose:s,onConfirm:l}){return o(()=>{let c=(d)=>{if(d.key!=="Escape")return;d.preventDefault(),s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),e("div",{className:"fixed inset-0 z-50 flex items-center justify-center modal-scrim animate-in fade-in duration-200 modal-safe",onClick:s,role:"dialog","aria-modal":"true","aria-label":"Save deleted file",children:e("div",{className:"glass-overlay bg-paper border border-ink/20 rounded-xl shadow-xl w-[min(94vw,440px)] overflow-hidden",onClick:(c)=>c.stopPropagation(),children:[e("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-ink/10",children:[e(ao,{size:16,className:"text-error shrink-0"}),e("h2",{className:"text-[13px] font-semibold text-ink",children:"This file was deleted"})]}),e("div",{className:"px-4 py-4 space-y-3",children:[e("div",{className:"rounded-lg border border-ink/10 bg-canvas/50 px-3 py-2",children:[e("div",{className:"text-[12px] font-mono text-error line-through truncate",children:t}),e("div",{className:"text-[11px] font-mono text-ink/50 break-all mt-0.5",children:r})]}),e("p",{className:"text-[11.5px] leading-relaxed text-ink/60",children:"It was removed from disk while this tab was open. Saving recreates it with the buffer's current contents — anything written to that path since the deletion is lost."})]}),e("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:s,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",autoFocus:!0,onClick:l,className:"px-3 py-1.5 rounded bg-error text-canvas hover:bg-error/90 transition-colors cursor-pointer text-xs font-medium",children:"Save anyway"})]})]})})}function Du(t){let[r,s]=T("editor.reviewMode",{});return{active:r[t]===!0,toggle:()=>s((l)=>({...l,[t]:l[t]!==!0}))}}function Nu(t,r=0){let s=Boolean(t.url)&&!t.url?.startsWith("blob:"),[l,c]=n({url:s?null:t.url,loading:s||!t.url,error:null}),d=i(t);return d.current=t,o(()=>{let f=d.current;if(f.url){let v=f.url;if(v.startsWith("blob:")){c({url:v,loading:!1,error:null});return}let k=!1;return c({url:null,loading:!0,error:null}),fetch(v,{headers:{Range:"bytes=0-0"}}).then(async(w)=>{if(k)return;if(w.ok){c({url:v,loading:!1,error:null});return}c({url:null,loading:!1,error:await Le(w)})}).catch(()=>{if(!k)c({url:v,loading:!1,error:null})}),()=>{k=!0}}let h=f.loadBytes;if(!h){c({url:null,loading:!1,error:"This file cannot be read from here."});return}let p=!1,g=null;return c({url:null,loading:!0,error:null}),h().then((v)=>{if(p)return;g=URL.createObjectURL(f.mimeType?new Blob([v],{type:f.mimeType}):new Blob([v])),c({url:g,loading:!1,error:null})}).catch((v)=>{if(p)return;c({url:null,loading:!1,error:v instanceof Error?v.message:"Could not read this file."})}),()=>{if(p=!0,g)URL.revokeObjectURL(g)}},[t.id,r]),l}
10
- export{wA,CA,EA,Fs,ku,xu,ei,Ms,zl,wu,Cu,BA,IA,_A,Eu,Bu,Iu,_u,Su,Tu,Du,Nu};
8
+ `)||s.length>200)return null;return s}function Eu({text:t,documentKey:r,readSelection:s,select:l,reveal:c,applyDocument:d,toggleWordWrap:f}){let[h,p]=T("editor.findQuery",""),[g,v]=T("editor.findReplace",""),[k,w]=T("editor.findOptions",Pe),m=u(()=>({...Pe,...k}),[k]),R=rt(),y=nt(),[E,F]=n(!1),[b,W]=n(!1),[U,N]=n(-1),[B,O]=n(0),[C,A]=n(0),X=i(!1);X.current=E;let q=u(()=>ge(t,h,m,m.inSelection?R.range:null),[t,h,m,R.range]),z=i(0),j=i(!0),Q=i(c);Q.current=c;let ie=i(l);ie.current=l;let K=a((M)=>{z.current=M,j.current=!0},[]);o(()=>{K(0),A((M)=>M+1)},[r,K]),o(()=>{let M=q.matches;if(j.current){j.current=!1;let L=ue(M,z.current);if(N(L),L>=0)ie.current(M[L].start,M[L].end,!1),Q.current(M[L].start);return}N((L)=>{if(M.length===0)return-1;if(L<0)return ue(M,z.current);return Math.min(L,M.length-1)})},[q,C]);let de=a((M)=>{p(M),K(z.current)},[p,K]),J=a(()=>{if(O((V)=>V+1),X.current)return;let M=s(),L=Zt(t,M);if(L)p(L);K(M?M.start:0),F(!0),A((V)=>V+1)},[t,s,K,p]),Z=a(()=>{W(!0),J()},[J]),ve=a(()=>W((M)=>!M),[]),Me=a(()=>{y.remember(h),F(!1),W(!1);let M=q.matches[U];if(M)l(M.start,M.end,!0)},[q.matches,U,l]),oe=a((M)=>{let L=q.matches;if(L.length===0)return;let V=ft(U,L.length,M);N(V),z.current=L[V].end,l(L[V].start,L[V].end,!1),c(L[V].start)},[q.matches,U,l,c]),ne=a((M)=>{let L={...m,[M]:!m[M]};if(M==="inSelection"&&!R.arm(s)){w({...m,inSelection:!1});return}if(M==="inSelection"&&!L.inSelection)R.disarm();w(L),K(z.current)},[m,w,K,s,R]),Fe=a((M)=>{p(M),y.remember(M),K(z.current),A((L)=>L+1)},[y,K]),Ee=a((M)=>{let L=cr(t,Math.max(0,M.line-1)),{matches:V}=ge(t,M.query,M.options),ee=ue(V,L);if(p(M.query),w(M.options),K(ee>=0?V[ee].start:L),A((te)=>te+1),ee>=0)ie.current(V[ee].start,V[ee].end,!0),Q.current(V[ee].start)},[t,p,w,K]),fe=a(()=>{let M=q.matches[U];if(!M)return;let L=pt(t,M,h,g,m);if(!L)return;d(L.text,L.caret,L.caret),K(L.caret)},[q.matches,U,t,h,g,m,d,K]),he=a(()=>{let M=mt(t,h,g,m);if(M===null||M===t)return;let L=Math.min(z.current,M.length);d(M,L,L),K(L)},[t,h,g,m,d,K]),Te=a((M)=>{switch(M){case"find":J();return;case"replace":Z();return;case"nextMatch":oe(1);return;case"previousMatch":oe(-1);return;case"replaceOne":fe();return;case"replaceAll":he();return;case"toggleCaseSensitive":ne("matchCase");return;case"toggleWholeWord":ne("wholeWord");return;case"toggleRegex":ne("isRegex");return;case"toggleWordWrap":f?.();return;default:return}},[J,Z,oe,fe,he,ne,f]);return{open:E,replaceOpen:b,query:h,replacement:g,options:m,matches:q.matches,truncated:q.truncated,invalid:q.invalid,currentIndex:U,setQuery:de,setReplacement:v,openFind:J,openReplace:Z,toggleReplace:ve,focusRequest:B,close:Me,runCommand:Te,revealMatch:Ee,toggleOption:ne,selectionRange:m.inSelection?R.range:null,history:y.entries,useHistoryEntry:Fe,step:oe,replaceCurrent:fe,replaceAll:he}}function Bu(t,r,s){let l=ze(Uh,zh),[c,d]=n(null);return o(()=>{if(!l||!t||l.path!==t||!s)return;d({request:l,path:t}),Dd(null)},[l,t,s]),u(()=>{if(!c||c.path!==t)return null;let{matches:f}=ge(r,c.request.query,c.request.options),h=cr(r,Math.max(0,c.request.line-1));return{request:c.request,matches:f,currentIndex:ue(f,h)}},[c,t,r])}function vt(t){let r=i({});o(()=>{if(!t)return;Qh(r.current,en(t))}),o(()=>{let s=r.current;return()=>Rh(s)},[])}function en(t){let{file:r}=t;if(!r)return{path:null,name:null,content:"",language:"text",state:"idle",note:null,preview:!1};let s={path:r.path,name:r.name,content:t.content,language:t.language,preview:t.preview&&t.viewerKind==="markdown"};if(r.isDiff)return{...s,content:"",state:"diff",note:null,preview:!1};if(t.loadError)return{...s,state:"error",note:t.loadError,preview:!1};if(t.isBinaryViewer)return{...s,content:"",state:"not-a-document",note:`${Xo[t.viewerKind]} files have no text outline.`,preview:!1};if(t.isLoading||!t.loaded)return{...s,state:"loading",note:null,preview:!1};return{...s,state:"ready",note:null}}function xt(t,r,s){let l=ze(Fh,Lh);return u(()=>{if(!l||!t||l.path!==t||!s)return null;let c=cr(r,Math.max(0,l.line-1)),d=r.indexOf(`
9
+ `,c),f=(d===-1?r.length:d)-c,h=Math.min(f,Math.max(0,(l.column??1)-1)),p=l.length===void 0?h:Math.min(f,h+l.length);return{path:t,offset:c,selectionStart:c+h,selectionEnd:c+p,request:l}},[l,t,s,r])}function yt({path:t,content:r,ready:s,surfaceRef:l,isPreview:c,exitPreview:d}){let f=xt(t,r,s),h=i(null),p=i(null);o(()=>{if(p.current!==null){let v=l.current;if(c||!v)return;let k=p.current;p.current=null,bt(v,k);return}if(!f||h.current===f.request)return;if(c){h.current=f.request,p.current={start:f.selectionStart,end:f.selectionEnd,offset:f.offset},d();return}let g=l.current;if(!g)return;h.current=f.request,bt(g,{start:f.selectionStart,end:f.selectionEnd,offset:f.offset})})}function bt(t,r){t.select(r.start,r.end,!0),t.revealOffset(r.offset),Mo(null)}function Iu({file:t,editor:r,surfaceRef:s,isPreview:l,exitPreview:c,publish:d=!0}){vt(d?{file:t,content:r.content,language:r.language,loaded:r.loaded,isLoading:r.isLoading,loadError:r.loadError,viewerKind:r.viewerKind,isBinaryViewer:r.isBinaryViewer,preview:l}:null),yt({path:t?.path??null,content:r.content,ready:r.loaded&&!r.loadError,surfaceRef:s,isPreview:l,exitPreview:c})}function _u({fileName:t,onReload:r,onKeepMine:s}){return e("div",{className:"flex items-start gap-2 px-3 py-2 border-b border-info/30 bg-info/10 text-[11px] text-ink flex-shrink-0",role:"status","data-external-change-strip":"",children:[e(S,{size:13,className:"text-info flex-shrink-0 mt-0.5"}),e("div",{className:"min-w-0 flex-1",children:[e("div",{className:"font-medium",children:[e("span",{className:"font-mono",children:t})," changed on disk."]}),e("div",{className:"text-ink/60 mt-0.5",children:"Reload takes the disk copy and discards your edits. Keep mine writes yours over it."})]}),e("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e("button",{type:"button",onClick:r,className:"px-2 py-1 rounded border border-ink/20 hover:bg-ink/5 transition-colors cursor-pointer",title:"Take the file from disk",children:"Reload"}),e("button",{type:"button",onClick:s,className:"px-2 py-1 rounded border border-info/50 text-info hover:bg-info/10 transition-colors cursor-pointer",title:"Keep my buffer; the next save writes it",children:"Keep mine"})]})]})}function tn(t){if(t===null)return null;let r=new Date(t);if(Number.isNaN(r.getTime()))return null;return r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Su({diskMtimeMs:t,fileName:r,onReload:s,onKeepMine:l}){let c=tn(t);return e("div",{className:"flex items-start gap-2 px-3 py-2 border-b border-warning/30 bg-warning/10 text-[11px] text-ink flex-shrink-0",role:"alert","data-conflict-strip":"",children:[e(I,{size:13,className:"text-warning flex-shrink-0 mt-0.5"}),e("div",{className:"min-w-0 flex-1",children:[e("div",{className:"font-medium",children:[e("span",{className:"font-mono",children:r})," changed on disk",c?e("span",{className:"text-ink/60",children:[" at ",c]}):null,"."]}),e("div",{className:"text-ink/60 mt-0.5",children:"Your save was refused so nothing was overwritten."})]}),e("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e("button",{type:"button",onClick:s,className:"px-2 py-1 rounded border border-ink/20 hover:bg-ink/5 transition-colors cursor-pointer",title:"Discard my changes and take the file from disk",children:"Reload"}),e("button",{type:"button",onClick:l,className:"px-2 py-1 rounded border border-warning/50 text-warning hover:bg-warning/10 transition-colors cursor-pointer",title:"Write my buffer over the file on disk",children:"Keep mine"})]})]})}function Tu({fileName:t,filePath:r,onClose:s,onConfirm:l}){return o(()=>{let c=(d)=>{if(d.key!=="Escape")return;d.preventDefault(),s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),e("div",{className:"fixed inset-0 z-50 flex items-center justify-center modal-scrim animate-in fade-in duration-200 modal-safe",onClick:s,role:"dialog","aria-modal":"true","aria-label":"Save deleted file",children:e("div",{className:"glass-overlay bg-paper border border-ink/20 rounded-xl shadow-xl w-[min(94vw,440px)] overflow-hidden",onClick:(c)=>c.stopPropagation(),children:[e("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-ink/10",children:[e(ao,{size:16,className:"text-error shrink-0"}),e("h2",{className:"text-[13px] font-semibold text-ink",children:"This file was deleted"})]}),e("div",{className:"px-4 py-4 space-y-3",children:[e("div",{className:"rounded-lg border border-ink/10 bg-canvas/50 px-3 py-2",children:[e("div",{className:"text-[12px] font-mono text-error line-through truncate",children:t}),e("div",{className:"text-[11px] font-mono text-ink/50 break-all mt-0.5",children:r})]}),e("p",{className:"text-[11.5px] leading-relaxed text-ink/60",children:"It was removed from disk while this tab was open. Saving recreates it with the buffer's current contents — anything written to that path since the deletion is lost."})]}),e("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:s,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",autoFocus:!0,onClick:l,className:"px-3 py-1.5 rounded bg-error text-canvas hover:bg-error/90 transition-colors cursor-pointer text-xs font-medium",children:"Save anyway"})]})]})})}function Du(t){let[r,s]=T("editor.reviewMode",{});return{active:r[t]===!0,toggle:()=>s((l)=>({...l,[t]:l[t]!==!0}))}}function Nu(t,r=0){let s=Boolean(t.url)&&!t.url?.startsWith("blob:"),[l,c]=n({url:s?null:t.url,loading:s||!t.url,error:null}),d=i(t);return d.current=t,o(()=>{let f=d.current;if(f.url){let v=f.url;if(v.startsWith("blob:")){c({url:v,loading:!1,error:null});return}let k=!1;return c({url:null,loading:!0,error:null}),fetch(v,{headers:{Range:"bytes=0-0"}}).then(async(w)=>{if(k)return;if(w.ok){c({url:v,loading:!1,error:null});return}c({url:null,loading:!1,error:await Le(w)})}).catch(()=>{if(!k)c({url:v,loading:!1,error:null})}),()=>{k=!0}}let h=f.loadBytes;if(!h){c({url:null,loading:!1,error:"This file cannot be read from here."});return}let p=!1,g=null;return c({url:null,loading:!0,error:null}),h().then((v)=>{if(p)return;g=URL.createObjectURL(f.mimeType?new Blob([v],{type:f.mimeType}):new Blob([v])),c({url:g,loading:!1,error:null})}).catch((v)=>{if(p)return;c({url:null,loading:!1,error:v instanceof Error?v.message:"Could not read this file."})}),()=>{if(p=!0,g)URL.revokeObjectURL(g)}},[t.id,r]),l}
10
+ export{wA,CA,EA,Ls,ku,xu,Xo,Fs,zl,wu,Cu,BA,IA,_A,Eu,Bu,Iu,_u,Su,Tu,Du,Nu};
@@ -1,2 +1,2 @@
1
- import{t}from"./index-m1hd7ska.js";function xe(c,e){if(c.accDescr)e.setAccDescription?.(c.accDescr);if(c.accTitle)e.setAccTitle?.(c.accTitle);if(c.title)e.setDiagramTitle?.(c.title)}t(xe,"populateCommonDb");
1
+ import{t}from"./index-3amzzsdk.js";function xe(c,e){if(c.accDescr)e.setAccDescription?.(c.accDescr);if(c.accTitle)e.setAccTitle?.(c.accTitle);if(c.title)e.setDiagramTitle?.(c.title)}t(xe,"populateCommonDb");
2
2
  export{xe};
@@ -1,2 +1,2 @@
1
- import{n,o,s,N}from"./index-dzp9rwy0.js";import{Wr,ql,fg,gg,HA,Xu}from"./index-me7ag6sy.js";var ap="omp:editor-theme-changed";function a(){if(typeof window>"u")return ql;return N("editorTheme")??ql}var p={theme:null,vars:{},themes:gg(null)};function Fi(){let[e,t]=n(a);if(o(()=>{let i=(d)=>{let E=d.detail;t(E||a())};return window.addEventListener(ap,i),()=>window.removeEventListener(ap,i)},[]),o(()=>{Xu(e)},[e]),e===Wr)return p;let r=fg(e);return{theme:r,vars:HA(r),themes:gg(e)}}var m={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]},ht=s(m);var op="omp:editor-indent-changed",ip=[2,4,8],Qu={width:2,insertSpaces:!0};function sp(){if(typeof window>"u")return Qu;let e=N("editorIndentWidth"),t=N("editorInsertSpaces");return{width:typeof e==="number"&&ip.includes(e)?e:Qu.width,insertSpaces:typeof t==="boolean"?t:Qu.insertSpaces}}function Ru(e){return e.insertSpaces?" ".repeat(e.width):"\t"}function Lu(){let[e,t]=n(sp);return o(()=>{let r=(i)=>{let d=i.detail;t(d??sp())};return window.addEventListener(op,r),()=>window.removeEventListener(op,r)},[]),e}var lp="omp:editor-typing-changed",Ul={autoCloseBrackets:!0,autocomplete:!0};function Fu(){if(typeof window>"u")return Ul;let e=N("editorAutoCloseBrackets"),t=N("editorAutocomplete");return{autoCloseBrackets:typeof e==="boolean"?e:Ul.autoCloseBrackets,autocomplete:typeof t==="boolean"?t:Ul.autocomplete}}function Mu(){let[e,t]=n(Fu);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Fu())};return window.addEventListener(lp,r),()=>window.removeEventListener(lp,r)},[]),e}var Os="omp:editor-blame-changed",Gl={enabled:!0,inline:!1};function Mi(){if(typeof window>"u")return Gl;let e=N("editorBlame"),t=N("editorBlameInline");return{enabled:typeof e==="boolean"?e:Gl.enabled,inline:typeof t==="boolean"?t:Gl.inline}}function cp(){let[e,t]=n(Mi);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Mi())};return window.addEventListener(Os,r),()=>window.removeEventListener(Os,r)},[]),e}
2
- export{ht,ap,Fi,op,ip,Qu,sp,Ru,Lu,lp,Ul,Fu,Mu,Os,Gl,Mi,cp};
1
+ import{n,o,s,N}from"./index-c8ta3k4g.js";import{Wr,ql,fg,gg,HA,Xu}from"./index-mtjbp5ga.js";var ap="omp:editor-theme-changed";function a(){if(typeof window>"u")return ql;return N("editorTheme")??ql}var p={theme:null,vars:{},themes:gg(null)};function Li(){let[e,t]=n(a);if(o(()=>{let i=(d)=>{let E=d.detail;t(E||a())};return window.addEventListener(ap,i),()=>window.removeEventListener(ap,i)},[]),o(()=>{Xu(e)},[e]),e===Wr)return p;let r=fg(e);return{theme:r,vars:HA(r),themes:gg(e)}}var m={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]},ht=s(m);var op="omp:editor-indent-changed",ip=[2,4,8],Qu={width:2,insertSpaces:!0};function sp(){if(typeof window>"u")return Qu;let e=N("editorIndentWidth"),t=N("editorInsertSpaces");return{width:typeof e==="number"&&ip.includes(e)?e:Qu.width,insertSpaces:typeof t==="boolean"?t:Qu.insertSpaces}}function Ru(e){return e.insertSpaces?" ".repeat(e.width):"\t"}function Lu(){let[e,t]=n(sp);return o(()=>{let r=(i)=>{let d=i.detail;t(d??sp())};return window.addEventListener(op,r),()=>window.removeEventListener(op,r)},[]),e}var lp="omp:editor-typing-changed",Ul={autoCloseBrackets:!0,autocomplete:!0};function Fu(){if(typeof window>"u")return Ul;let e=N("editorAutoCloseBrackets"),t=N("editorAutocomplete");return{autoCloseBrackets:typeof e==="boolean"?e:Ul.autoCloseBrackets,autocomplete:typeof t==="boolean"?t:Ul.autocomplete}}function Mu(){let[e,t]=n(Fu);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Fu())};return window.addEventListener(lp,r),()=>window.removeEventListener(lp,r)},[]),e}var Ps="omp:editor-blame-changed",Gl={enabled:!0,inline:!1};function Fi(){if(typeof window>"u")return Gl;let e=N("editorBlame"),t=N("editorBlameInline");return{enabled:typeof e==="boolean"?e:Gl.enabled,inline:typeof t==="boolean"?t:Gl.inline}}function cp(){let[e,t]=n(Fi);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Fi())};return window.addEventListener(Ps,r),()=>window.removeEventListener(Ps,r)},[]),e}
2
+ export{ht,ap,Li,op,ip,Qu,sp,Ru,Lu,lp,Ul,Fu,Mu,Ps,Gl,Fi,cp};
@@ -1,2 +1,2 @@
1
- import{t,l,ne,Ae}from"./index-m1hd7ska.js";import{$e}from"./index-cwwg7k5f.js";var n={parse:t(async(r)=>{let e=await $e("info",r);l.debug(e)},"parse")},i={version:"12.0.0"},s=t(()=>i.version,"getVersion"),p={getVersion:s},g=t((r,e,o)=>{l.debug(`rendering info diagram
1
+ import{t,l,ne,Ae}from"./index-3amzzsdk.js";import{$e}from"./index-cwwg7k5f.js";var n={parse:t(async(r)=>{let e=await $e("info",r);l.debug(e)},"parse")},i={version:"12.0.0"},s=t(()=>i.version,"getVersion"),p={getVersion:s},g=t((r,e,o)=>{l.debug(`rendering info diagram
2
2
  `+r);let a=Ae(e);ne(a,100,400,!0),a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),m={draw:g},y={parser:n,db:p,renderer:m};export{y as diagram};