@intent-hq/web 2.392.1 → 2.392.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{DotCIVLI.js → -xPMI1SM.js} +1 -1
  3. package/web/app/immutable/chunks/{x9IQ_8UO.js → 2ZBNrUZy.js} +1 -1
  4. package/web/app/immutable/chunks/{ByvcSsIj.js → 2bueaerM.js} +1 -1
  5. package/web/app/immutable/chunks/{AlO3r9jV.js → 4Rh5tdzC.js} +1 -1
  6. package/web/app/immutable/chunks/{CLX81MHV.js → 6_Ki4zfU.js} +1 -1
  7. package/web/app/immutable/chunks/{D_YMc8vN.js → 7n-O-xn5.js} +1 -1
  8. package/web/app/immutable/chunks/{CccfsETL.js → 8ItTOum-.js} +2 -2
  9. package/web/app/immutable/chunks/{aoX2v33V.js → 9AeivJQm.js} +4 -4
  10. package/web/app/immutable/chunks/{CngTEvgU.js → A9FjQ4ig.js} +1 -1
  11. package/web/app/immutable/chunks/{DaTwSOqs.js → B0dqY8Yd.js} +1 -1
  12. package/web/app/immutable/chunks/{KPBWxwIA.js → B26epB4C.js} +1 -1
  13. package/web/app/immutable/chunks/B3ZeLze4.js +2 -0
  14. package/web/app/immutable/chunks/{BSpgPPjp.js → B3sgdO-M.js} +1 -1
  15. package/web/app/immutable/chunks/{3rqOYBi3.js → B5OK1c9R.js} +1 -1
  16. package/web/app/immutable/chunks/{OuI4JmWC.js → B5V_Igzh.js} +1 -1
  17. package/web/app/immutable/chunks/{D0DIeAXH.js → B87xP_ZF.js} +1 -1
  18. package/web/app/immutable/chunks/{Bwa2n5jC.js → BAbB1JR3.js} +1 -1
  19. package/web/app/immutable/chunks/{B2frqTj8.js → BC2ymm4x.js} +1 -1
  20. package/web/app/immutable/chunks/{CUmvnJK5.js → BC7-67A3.js} +1 -1
  21. package/web/app/immutable/chunks/{KRACSBb9.js → BFMw_Rsu.js} +1 -1
  22. package/web/app/immutable/chunks/{B97l6Xkk.js → BH56GSiy.js} +1 -1
  23. package/web/app/immutable/chunks/{CcMCIG6E.js → BHYEUr70.js} +2 -2
  24. package/web/app/immutable/chunks/{CorT7tdR.js → BLNxuTdw.js} +1 -1
  25. package/web/app/immutable/chunks/{DQe_5JbW.js → BOnAZ0Bh.js} +1 -1
  26. package/web/app/immutable/chunks/{CiNmS1jZ.js → BQLNg--d.js} +1 -1
  27. package/web/app/immutable/chunks/{CdLJ0-dH.js → BRtw-FGJ.js} +1 -1
  28. package/web/app/immutable/chunks/{BdlwjSpf.js → BSsSTp5c.js} +1 -1
  29. package/web/app/immutable/chunks/{9AKr1UyY.js → BV3fep4W.js} +1 -1
  30. package/web/app/immutable/chunks/{C6Af0QaF.js → BWtzEUuh.js} +1 -1
  31. package/web/app/immutable/chunks/{R3fZBk-k.js → BYanH6N9.js} +1 -1
  32. package/web/app/immutable/chunks/{vJJtTADX.js → BZNRCsEn.js} +1 -1
  33. package/web/app/immutable/chunks/{b7gnFN68.js → BafkB9h2.js} +1 -1
  34. package/web/app/immutable/chunks/BeZe2Rt-.js +4 -0
  35. package/web/app/immutable/chunks/{DFNKkiho.js → Bex9L_jH.js} +4 -4
  36. package/web/app/immutable/chunks/{Dp0kLnIL.js → BezBXtqG.js} +1 -1
  37. package/web/app/immutable/chunks/{DY9w61PC.js → BhD6TCSq.js} +6 -6
  38. package/web/app/immutable/chunks/{Dvzvnzzu.js → Bhk2u-_3.js} +1 -1
  39. package/web/app/immutable/chunks/{CGJ5yTzR.js → BipAYtG2.js} +3 -3
  40. package/web/app/immutable/chunks/{i2Q0D3-m.js → BptF1xOU.js} +1 -1
  41. package/web/app/immutable/chunks/{CUiYYsIq.js → BrCVQoPE.js} +1 -1
  42. package/web/app/immutable/chunks/{CJItvMq2.js → BrLVGrLO.js} +1 -1
  43. package/web/app/immutable/chunks/{50HYkjWD.js → Bsnum5pm.js} +3 -3
  44. package/web/app/immutable/chunks/{FS0kRzLP.js → BtOGFmaT.js} +1 -1
  45. package/web/app/immutable/chunks/{z2uEgbos.js → BtmdpA7S.js} +1 -1
  46. package/web/app/immutable/chunks/{CzK_7_Jd.js → By6WkvE9.js} +1 -1
  47. package/web/app/immutable/chunks/{DmtYsVlu.js → Bz-Q0sJs.js} +2 -2
  48. package/web/app/immutable/chunks/{vq6mxGLA.js → BzZzhsx0.js} +1 -1
  49. package/web/app/immutable/chunks/{DbB491_u.js → C1UoJPr2.js} +1 -1
  50. package/web/app/immutable/chunks/{oM2TfoNE.js → C2KrJl1V.js} +1 -1
  51. package/web/app/immutable/chunks/{DTbyG794.js → C3L7kk5u.js} +1 -1
  52. package/web/app/immutable/chunks/{BJEFEyAm.js → C6O8IM8T.js} +1 -1
  53. package/web/app/immutable/chunks/{BwFe8eI9.js → C8XfkHlI.js} +1 -1
  54. package/web/app/immutable/chunks/{KvfW-q1N.js → CCMvmg57.js} +1 -1
  55. package/web/app/immutable/chunks/CDCAMh6o.js +1 -0
  56. package/web/app/immutable/chunks/{D8MIwtpL.js → CDUwgFl9.js} +1 -1
  57. package/web/app/immutable/chunks/{D_R1vNH8.js → CE7ZckmT.js} +1 -1
  58. package/web/app/immutable/chunks/{gXHlCg5O.js → CKa70XGN.js} +1 -1
  59. package/web/app/immutable/chunks/{rmHQzJ1a.js → CKzjrq__.js} +1 -1
  60. package/web/app/immutable/chunks/{DDDvNwR-.js → CN7DE5jB.js} +1 -1
  61. package/web/app/immutable/chunks/{D-j7vD5Z.js → CNKJ8_Xr.js} +1 -1
  62. package/web/app/immutable/chunks/{CPNOsHfj.js → CO-JfYA5.js} +1 -1
  63. package/web/app/immutable/chunks/{CCyGGl6b.js → CPgSaaZt.js} +1 -1
  64. package/web/app/immutable/chunks/{BVBh582U.js → CQmOm-Tm.js} +1 -1
  65. package/web/app/immutable/chunks/{DvdITStP.js → CQzFriMx.js} +1 -1
  66. package/web/app/immutable/chunks/{BlVpCoL1.js → CTGxPVh7.js} +1 -1
  67. package/web/app/immutable/chunks/{BDRM-DVo.js → CVCwKAMk.js} +1 -1
  68. package/web/app/immutable/chunks/{DNup87JQ.js → CVG625sB.js} +1 -1
  69. package/web/app/immutable/chunks/{H8hIaDaV.js → CcUDp4zq.js} +1 -1
  70. package/web/app/immutable/chunks/{r4dmBxo_.js → Ce20e-vK.js} +1 -1
  71. package/web/app/immutable/chunks/Ce2Qo9vu.js +3 -0
  72. package/web/app/immutable/chunks/{PejVYY2W.js → Cf5NbMeL.js} +3 -3
  73. package/web/app/immutable/chunks/{CY56l_5k.js → CfOrhDjV.js} +1 -1
  74. package/web/app/immutable/chunks/{DTNrtzyx.js → Cim9mWY1.js} +1 -1
  75. package/web/app/immutable/chunks/{DIxibpTv.js → Cks1DUg1.js} +1 -1
  76. package/web/app/immutable/chunks/{CDcxODgf.js → CnDbx_Wj.js} +1 -1
  77. package/web/app/immutable/chunks/{DznISJQO.js → CnDy2OA4.js} +1 -1
  78. package/web/app/immutable/chunks/{Bp6DusVC.js → Cp9hDo50.js} +1 -1
  79. package/web/app/immutable/chunks/{ciQFmiC4.js → Cs3vMbTn.js} +1 -1
  80. package/web/app/immutable/chunks/{0TbppU-W.js → Ct1r6efw.js} +2 -2
  81. package/web/app/immutable/chunks/{CpT48V2z.js → Cy5LTcPz.js} +1 -1
  82. package/web/app/immutable/chunks/{RqSv1iWX.js → CyUokemm.js} +1 -1
  83. package/web/app/immutable/chunks/{gX9ZnDRD.js → D1Tekuc4.js} +1 -1
  84. package/web/app/immutable/chunks/{pQalwNsE.js → D2Jd8tc3.js} +1 -1
  85. package/web/app/immutable/chunks/{Cdw7QKyr.js → D80ng7VB.js} +3 -3
  86. package/web/app/immutable/chunks/{CWS5g6aA.js → D9OezaF9.js} +1 -1
  87. package/web/app/immutable/chunks/{BUPWY1pO.js → DDhuJH-4.js} +1 -1
  88. package/web/app/immutable/chunks/{WWq3hijy.js → DEOVFEjx.js} +1 -1
  89. package/web/app/immutable/chunks/{Bhul7r_Y.js → DEuuzjmM.js} +1 -1
  90. package/web/app/immutable/chunks/{DaTkisKB.js → DEykPUjl.js} +1 -1
  91. package/web/app/immutable/chunks/{DdYVblGk.js → DFh2QzKR.js} +1 -1
  92. package/web/app/immutable/chunks/{BB5TUToP.js → DGMKnMeG.js} +2 -2
  93. package/web/app/immutable/chunks/{DEsM7h8K.js → DIHHBzYi.js} +2 -2
  94. package/web/app/immutable/chunks/{CcBmcC9f.js → DIUdGij-.js} +2 -2
  95. package/web/app/immutable/chunks/{BTE0066U.js → DJDA_1H4.js} +1 -1
  96. package/web/app/immutable/chunks/{B0oQ37UY.js → DQxnu3QZ.js} +1 -1
  97. package/web/app/immutable/chunks/{CEqrck_t.js → DRpk7IAR.js} +1 -1
  98. package/web/app/immutable/chunks/{a3O-Ns1M.js → DUbqvr_K.js} +1 -1
  99. package/web/app/immutable/chunks/{BPFSAjsd.js → DVSwhvvP.js} +7 -7
  100. package/web/app/immutable/chunks/{QKQvZF-2.js → DVqhJMup.js} +2 -2
  101. package/web/app/immutable/chunks/{CeHL-3WK.js → DWOcsYbU.js} +1 -1
  102. package/web/app/immutable/chunks/{DuFY1gwd.js → DWurigib.js} +4 -4
  103. package/web/app/immutable/chunks/{DTco_120.js → D__LL1n8.js} +1 -1
  104. package/web/app/immutable/chunks/{BS9LmSp_.js → DccCxKmZ.js} +1 -1
  105. package/web/app/immutable/chunks/{CSzXeH2S.js → DdpYiyRs.js} +1 -1
  106. package/web/app/immutable/chunks/{7zxUzaYz.js → DeJMgdsa.js} +1 -1
  107. package/web/app/immutable/chunks/{B9NjB9vD.js → DgzWQmDb.js} +1 -1
  108. package/web/app/immutable/chunks/{DIME5LWK.js → DimbKbDZ.js} +2 -2
  109. package/web/app/immutable/chunks/{BvByaKKp.js → DjyYYXwz.js} +1 -1
  110. package/web/app/immutable/chunks/{CRFyRwf-.js → DlbHdfKY.js} +1 -1
  111. package/web/app/immutable/chunks/{C7MFACZg.js → DqQqeuqi.js} +1 -1
  112. package/web/app/immutable/chunks/{BSMi55yC.js → DthJR85Z.js} +1 -1
  113. package/web/app/immutable/chunks/{BUF0WvAS.js → DtqJUfJC.js} +1 -1
  114. package/web/app/immutable/chunks/{DYzxLuOL.js → DvXSJM4q.js} +1 -1
  115. package/web/app/immutable/chunks/{B6wkNYPs.js → DxZIPHU6.js} +1 -1
  116. package/web/app/immutable/chunks/{Ct0fN4Lt.js → DyrDaCZi.js} +1 -1
  117. package/web/app/immutable/chunks/{D6EyZ2rd.js → Dz-57yVz.js} +1 -1
  118. package/web/app/immutable/chunks/{DL__HI6l.js → DzR2lw_C.js} +1 -1
  119. package/web/app/immutable/chunks/{DUcJILSg.js → ERz1iYnn.js} +1 -1
  120. package/web/app/immutable/chunks/{C9iwh4F-.js → Egi6fNpS.js} +1 -1
  121. package/web/app/immutable/chunks/{DdU2snxg.js → FTRClsUK.js} +1 -1
  122. package/web/app/immutable/chunks/{CBQrOO2t.js → L9YD-wcw.js} +1 -1
  123. package/web/app/immutable/chunks/{CQClkuxa.js → O8yKLCWC.js} +1 -1
  124. package/web/app/immutable/chunks/{B9ZgGXDm.js → PAEJNClQ.js} +1 -1
  125. package/web/app/immutable/chunks/{DA3tGWzX.js → PZ5MSUIU.js} +1 -1
  126. package/web/app/immutable/chunks/{DqCgFTqN.js → QnRBGtVu.js} +1 -1
  127. package/web/app/immutable/chunks/{f0WUpIfB.js → RGi81mvu.js} +1 -1
  128. package/web/app/immutable/chunks/{CA5vNvRD.js → VeOG7xIg.js} +3 -3
  129. package/web/app/immutable/chunks/XAL8NtHj.js +1 -0
  130. package/web/app/immutable/chunks/{CPav-V5t.js → YClu3XTz.js} +2 -2
  131. package/web/app/immutable/chunks/{CtzbB_EQ.js → ZspDMNEv.js} +1 -1
  132. package/web/app/immutable/chunks/{Cp4SiU7R.js → _aw8AL2s.js} +1 -1
  133. package/web/app/immutable/chunks/{CRIoGx5T.js → edaGtK2z.js} +1 -1
  134. package/web/app/immutable/chunks/{Dgvdn_ax.js → g2j4hm88.js} +1 -1
  135. package/web/app/immutable/chunks/{ZIePA90q.js → gdhW58MB.js} +3 -3
  136. package/web/app/immutable/chunks/{CPmXQBUf.js → n1INJGMs.js} +1 -1
  137. package/web/app/immutable/chunks/{BvvIG-FE.js → nUY7GyaZ.js} +1 -1
  138. package/web/app/immutable/chunks/{C9DStJW1.js → q9gf_Sso.js} +1 -1
  139. package/web/app/immutable/chunks/{CewZlXwy.js → u-Z99Ptk.js} +1 -1
  140. package/web/app/immutable/chunks/{BE3g5vcj.js → uQRHnH1Z.js} +1 -1
  141. package/web/app/immutable/chunks/{Dhs7RSq9.js → wsIl6ydR.js} +1 -1
  142. package/web/app/immutable/chunks/{C13CRqsS.js → yus24-dF.js} +1 -1
  143. package/web/app/immutable/chunks/zdzlwKoA.js +1 -0
  144. package/web/app/immutable/entry/{app.Dh0FLLBd.js → app.DBKLYfDG.js} +2 -2
  145. package/web/app/immutable/entry/start.DyzI50m5.js +1 -0
  146. package/web/app/immutable/nodes/{0.BlcS-Hyh.js → 0.Dr_KMFP9.js} +1 -1
  147. package/web/app/immutable/nodes/{1.BMTchPFq.js → 1.B4UC5y6C.js} +1 -1
  148. package/web/app/immutable/nodes/{10.CfDNhRgU.js → 10.D-SXaVii.js} +1 -1
  149. package/web/app/immutable/nodes/{11.CxSRkGHD.js → 11.CD0ZMPB_.js} +1 -1
  150. package/web/app/immutable/nodes/{15.DCpm4k7K.js → 15.CWhAy0IL.js} +1 -1
  151. package/web/app/immutable/nodes/{19.C2T81__z.js → 19.Cl4NIDR3.js} +2 -2
  152. package/web/app/immutable/nodes/{2.1iJIAnw5.js → 2.DgYKd6eT.js} +1 -1
  153. package/web/app/immutable/nodes/{20.BHRuLw4-.js → 20.gu-VpWFh.js} +1 -1
  154. package/web/app/immutable/nodes/{3.BDDby9Gq.js → 3.Cz3D2Kq7.js} +1 -1
  155. package/web/app/immutable/nodes/{4.utfN0vdd.js → 4.CjaUjxEb.js} +1 -1
  156. package/web/app/immutable/nodes/{5.Z6w8za6J.js → 5.COJH7IAv.js} +1 -1
  157. package/web/app/immutable/nodes/{6.w_k_ibWb.js → 6.Da5DOHiE.js} +1 -1
  158. package/web/app/immutable/nodes/{7.I-q-I1bs.js → 7.dcDATK47.js} +1 -1
  159. package/web/app/immutable/nodes/{8.BgjULPKU.js → 8.C2qio8n9.js} +1 -1
  160. package/web/app/immutable/nodes/{9.DOkmR0cl.js → 9.CjfzK0IK.js} +2 -2
  161. package/web/app/version.json +1 -1
  162. package/web/index.html +9 -9
  163. package/web/app/immutable/chunks/BuM8LV7z.js +0 -4
  164. package/web/app/immutable/chunks/DejjV5ft.js +0 -1
  165. package/web/app/immutable/chunks/DivmpPFQ.js +0 -1
  166. package/web/app/immutable/chunks/DlnCrS3y.js +0 -2
  167. package/web/app/immutable/chunks/MFTfhUYi.js +0 -1
  168. package/web/app/immutable/chunks/Xr-aTNRN.js +0 -3
  169. package/web/app/immutable/entry/start.IMZH36aM.js +0 -1
@@ -1,4 +1,4 @@
1
- import{g as Jt}from"./CPmXQBUf.js";import{g as Zt}from"./CRFyRwf-.js";import{s as $t}from"./CRIoGx5T.js";import{b as C,a$ as e1,ay as Z,X as Ae,a1 as t1,aP as s1,bh as at,a_ as i1,aZ as r1,b0 as a1,V as n1,U as u1,Y as o1,z as l1,ax as c1,J as h1,aq as st,as as d1,$ as it,aW as rt,r as p1,a2 as f1,N as g1,am as b1,aU as k1,ab as A1,x as m1,aT as C1,p as S1}from"./DFNKkiho.js";import{c as D1}from"./BvByaKKp.js";import{aR as T1}from"./D-j7vD5Z.js";var E1="flowchart-",y1=["laneRole","laneIndex","drawnExtent"];function Wt(s){if(!s||typeof s!="object")return s;const i={...s};for(const a of y1)Reflect.deleteProperty(i,a);return i}C(Wt,"withoutInternalKeys");var Pe,x1=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i1,this.setAccDescription=r1,this.setDiagramTitle=a1,this.getAccTitle=n1,this.getAccDescription=u1,this.getDiagramTitle=o1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,r,l,g,o={},m){if(!i||i.trim().length===0)return;let d;if(m!==void 0){let f;m.includes(`
1
+ import{g as Jt}from"./n1INJGMs.js";import{g as Zt}from"./DlbHdfKY.js";import{s as $t}from"./edaGtK2z.js";import{b as C,a$ as e1,ay as Z,X as Ae,a1 as t1,aP as s1,bh as at,a_ as i1,aZ as r1,b0 as a1,V as n1,U as u1,Y as o1,z as l1,ax as c1,J as h1,aq as st,as as d1,$ as it,aW as rt,r as p1,a2 as f1,N as g1,am as b1,aU as k1,ab as A1,x as m1,aT as C1,p as S1}from"./Bex9L_jH.js";import{c as D1}from"./DjyYYXwz.js";import{aR as T1}from"./CNKJ8_Xr.js";var E1="flowchart-",y1=["laneRole","laneIndex","drawnExtent"];function Wt(s){if(!s||typeof s!="object")return s;const i={...s};for(const a of y1)Reflect.deleteProperty(i,a);return i}C(Wt,"withoutInternalKeys");var Pe,x1=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i1,this.setAccDescription=r1,this.setDiagramTitle=a1,this.getAccTitle=n1,this.getAccDescription=u1,this.getDiagramTitle=o1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,r,l,g,o={},m){if(!i||i.trim().length===0)return;let d;if(m!==void 0){let f;m.includes(`
2
2
  `)?f=m+`
3
3
  `:f=`{
4
4
  `+m+`
@@ -1 +1 @@
1
- var Vt=Object.defineProperty;var yt=e=>{throw TypeError(e)};var jt=(e,i,s)=>i in e?Vt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>jt(e,typeof i!="symbol"?i+"":i,s),bt=(e,i,s)=>i.has(e)||yt("Cannot "+s);var t=(e,i,s)=>(bt(e,i,"read from private field"),s?s.call(e):i.get(e)),g=(e,i,s)=>i.has(e)?yt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(bt(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),o=(e,i,s)=>(bt(e,i,"access private method"),s);var vt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as wt}from"./Fcr7AvC-.js";import{m as xt,A as qt,r as Ht,Q as Nt,aX as Gt,R as Jt}from"./DuFY1gwd.js";import{B as Ft,D as Kt}from"./x9IQ_8UO.js";import{I as F,E as Ct,b as Qt,a as Ut}from"./DICr2Lvd.js";function Xt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=xt.get(s.name);n==null&&(n=s,xt.set(s.name,n)),i.attachLanguages([n]),qt.add(n.name)}}function Zt(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Dt=0;let Wt=0;var H,T,P,Q,L,st,it,C,U,nt,u,D,_,A,O,b,v,z,dt,E,B,X,N,R,Z,Tt,ft,h,K,ut,zt,Et,Y,pt,It,ct,tt,Ot,gt,et,Bt,Pt,At,Yt=(At=class{constructor(e,i,s){g(this,h);J(this,"backend");g(this,H);g(this,T);g(this,P);g(this,Q);g(this,L);g(this,st);g(this,it);g(this,C);g(this,U);g(this,nt,!1);g(this,u,[F]);g(this,D,[]);g(this,_,0);g(this,A,[]);g(this,O,-1);g(this,b,!0);g(this,v,!1);g(this,z,0);g(this,dt,++Wt);g(this,E,-1);g(this,B,-1);g(this,X);g(this,N,0);g(this,R,[]);g(this,Z,!1);g(this,Tt,Zt(async e=>{if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Lt(t(this,L).languageId)){if(await this.backend?.loadLanguages([t(this,L).languageId]),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}o(this,h,K).call(this),o(this,h,It).call(this,n)},500));g(this,ft,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,dt)&&typeof n=="number"&&n===t(this,z)&&(t(this,E)>=0?o(this,h,Bt).call(this,n):o(this,h,Pt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,P,i.theme),a(this,Q,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,C,i.matchBrackets!==!1),a(this,U,i.__debug??!1),o(this,h,ut).call(this),o(this,h,K).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,C)||e<0||e>=t(this,L).lineCount||(o(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,R)[e]===void 0){o(this,h,et).call(this,e);const i=t(this,u)[e]??F,s=o(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,R)[e]??null}setTheme(e){t(this,P)!==e&&(a(this,P,e),o(this,h,K).call(this),this.stopBackgroundTokenize(),a(this,u,[F]),a(this,D,[]),a(this,_,0),a(this,A,[]),t(this,T)!=null&&t(this,L).lineCount>0&&o(this,h,pt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),o(this,h,Et).call(this)}tokenize(e,i,s=!1){if(o(this,h,ut).call(this),o(this,h,K).call(this),t(this,T)==null&&!Lt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:l=1/0}=i??{},d=l===1/0?n:Math.min(r+l,n),c=e.startLine,f=Math.max(r,c),I=i!=null&&l!==1/0&&e.lineDelta>0&&c<d&&e.endLine>=d,m=e.lineDelta===0&&(e.changedLineChanges?.every(([,,p])=>p===0)??!0);t(this,C)&&!m&&(t(this,R).length=Math.min(t(this,R).length,e.startLine));const M=s&&e.lineDelta!==0&&c>=r,S=m||i==null||c>=f,y=e.changedLineRanges??[[c,e.endLine]];a(this,D,[]),a(this,_,0),a(this,A,[]);let V=-1;if(c<f)for(const[p,w]of y)p<f&&(V=Math.max(V,Math.min(w,f-1)));const mt=V>=c&&(m||e.lineDelta<0);m?o(this,h,et).call(this,c):(o(this,h,Ot).call(this,e),(i==null||c>=f)&&o(this,h,et).call(this,f));let j=0,St=y[j][1],ht,Rt=0,k=m?y[j][0]:f,rt=!1;const Mt=new Map,W=mt?new Map:void 0;if(W!=null&&!m){const p=Math.min(V+1,f,d);if(p>c){o(this,h,et).call(this,p);let w=c,ot=t(this,u)[w]??F;for(;w<p;w++){const x=o(this,h,ct).call(this,w,ot);ot=x.state,W.set(w,x.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??F;for(;k<d;){const p=m?t(this,u)[k+1]:M?o(this,h,gt).call(this,k+1):void 0;S&&(t(this,u)[k]=q);const{resolvedTokens:w,state:ot}=o(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,w):W?.set(k,w),S&&(t(this,u)[k+1]=q),rt=k>=St&&(m||M)&&p!=null&&q.equals(p),rt){j++;const x=y[j];if(x==null)break;if(x[0]>=d){ht=x[0],Rt=j;break}let lt=t(this,u)[x[0]];if(M)for(let kt=k+2;kt<=x[0]&&(lt=o(this,h,gt).call(this,kt),lt!=null);kt++)t(this,u)[kt]=lt;lt==null?(St=x[1],k++):(k=x[0],q=lt,St=x[1]),rt=!1;continue}k++}if(S&&(k<d?t(this,u)[k+1]=q:t(this,u)[k]=q),rt&&M&&ht==null){for(let p=k+2;p<=n;p++){const w=o(this,h,gt).call(this,p);if(w==null)break;t(this,u)[p]=w}a(this,D,[]),a(this,_,0),a(this,A,[])}if(W!=null&&W.size>0&&t(this,it).call(this,W),ht!=null)t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,ht)),o(this,h,pt).call(this,ht,y,Rt);else if(!rt&&k<n){const p=I&&c>=f?d:c<f&&!m?c:k;t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,p)),o(this,h,pt).call(this,p,y,j)}return Mt}prebuildStateStack(e){o(this,h,ut).call(this),t(this,Tt).call(this,e)}stopBackgroundTokenize(){a(this,B,-1),!t(this,b)&&(a(this,b,!0),a(this,v,!1),a(this,O,-1),a(this,E,-1),a(this,X,void 0),a(this,N,0),a(this,D,[]),a(this,_,0),a(this,A,[]),o(this,h,Et).call(this))}pauseBackgroundTokenize(){t(this,b)||t(this,v)||(t(this,U)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,z)}),a(this,v,!0))}resumeBackgroundTokenize(){t(this,b)||!t(this,v)||t(this,T)==null||t(this,O)<0||(t(this,U)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,z)}),a(this,v,!1),o(this,h,Y).call(this,t(this,z)))}},H=new WeakMap,T=new WeakMap,P=new WeakMap,Q=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,C=new WeakMap,U=new WeakMap,nt=new WeakMap,u=new WeakMap,D=new WeakMap,_=new WeakMap,A=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,z=new WeakMap,dt=new WeakMap,E=new WeakMap,B=new WeakMap,X=new WeakMap,N=new WeakMap,R=new WeakMap,Z=new WeakMap,Tt=new WeakMap,ft=new WeakMap,h=new WeakSet,K=function(){if(t(this,P)==="")return;this.backend?.getTheme(t(this,P));const{colorMap:e}=t(this,H).setTheme(t(this,P));a(this,Q,e)},ut=function(){t(this,T)==null&&!Lt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},zt=function(){t(this,Z)||(globalThis.addEventListener("message",t(this,ft)),a(this,Z,!0))},Et=function(){t(this,Z)&&(globalThis.removeEventListener("message",t(this,ft)),a(this,Z,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,dt),jobId:e})},pt=function(e,i,s=0){if(Lt(t(this,L).languageId))return;const n=++vt(this,z)._;t(this,U)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,b,!1),a(this,v,!1),a(this,O,e),t(this,E)>=0&&a(this,B,Math.max(t(this,B),t(this,E))),a(this,E,-1),a(this,X,i),a(this,N,s),o(this,h,zt).call(this),o(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,b)){t(this,E)>=0?a(this,E,Math.max(t(this,E),e)):a(this,B,Math.max(t(this,B),e));return}const i=++vt(this,z)._;a(this,b,!1),a(this,v,!1),a(this,O,t(this,u).length-1),a(this,E,e),a(this,B,-1),a(this,X,void 0),a(this,N,0),o(this,h,zt).call(this),o(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=_t(t(this,T),t(this,Q),s,i,Dt,t(this,C));return o(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,C)&&(t(this,R)[e]=i)},Ot=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,D,t(this,u)),a(this,_,0),a(this,u,t(this,u).slice(0,s))):(a(this,_,s),a(this,D,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,A,i)},gt=function(e){let i=e;for(let s=t(this,A).length-1;s>=0;s--){const[n,r,l]=t(this,A)[s];if(l!==0){if(i>r)i-=l;else if(i>n)return t(this,u)[e]}}return t(this,D)[i-t(this,_)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,l=t(this,u)[r]??F;for(;r<s;){t(this,u)[r]=l;const d=t(this,L).getLineText(r);if(d.length<t(this,st)&&d!==""&&d.trim()!==""){const c=_t(t(this,T),t(this,Q),d,l,Dt,t(this,C),!1);o(this,h,tt).call(this,r,c.bracketIgnoredRanges),l=c.ruleStack}else o(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=l,i!=null&&performance.now()-n>i)break}return r>=s},Bt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=o(this,h,et).call(this,t(this,E),1);if(!(t(this,b)||t(this,v)||e!==t(this,z))){if(i){this.stopBackgroundTokenize();return}a(this,O,t(this,u).length-1),o(this,h,Y).call(this,e)}},Pt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,X);let l=t(this,O),d=t(this,u)[l]??F,c=!1,f=t(this,N),I=r?.[f]?.[1];for(;l<n;){t(this,u)[l]=d;const m=I!=null?o(this,h,gt).call(this,l+1):void 0,M=o(this,h,ct).call(this,l,d);if(s.set(l,M.resolvedTokens),d=M.state,t(this,u)[l+1]=d,c=I!=null&&l>=I&&m!=null&&d.equals(m),l++,c){f++;const S=r?.[f];if(S==null)break;if(I=S[1],t(this,u)[S[0]]==null)c=!1;else{l=S[0],d=t(this,u)[l]??d,c=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,b)||t(this,v)||e!==t(this,z))){if(c||l>=n){const m=t(this,B);this.stopBackgroundTokenize(),m>=0&&o(this,h,It).call(this,m);return}a(this,O,l),a(this,N,f),o(this,h,Y).call(this,e)}},At);function _t(e,i,s,n,r,l=!0,d=!0){const c=e.tokenizeLine2(s,n,r);c.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=c.tokens,I=f.length/2,m=[],M=[];if(!d&&!l)return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M};for(let S=0;S<I;S++){const y=f[2*S],V=S+1<I?f[2*S+2]:s.length;if(y===V)continue;const mt=f[2*S+1];if(d){const j=Ct.getForeground(mt);m.push([y,i[j],s.slice(y,V)])}l&&Ct.getTokenType(mt)>0&&M.push([y,V])}return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M}}function Lt(e){return e==="text"||e==="ansi"}var $,G,at,te=(at=class extends Ft{constructor(s,n){super();J(this,"highlighter");J(this,"options");g(this,$,"");g(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let l=[];for(let d=0;d<r.length;d+=2){const c=r[d],f=this.highlighter.codeToTokens(c,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));d+1<r.length?(Ht(n,I),this.pushLineBreak(n,c.length,r[d+1]),a(this,G,f.grammarState)):(l=I,a(this,$,c))}return{unstable:l,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),he=class $t extends Kt{constructor(s,n){super(s,Nt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await wt(async()=>{const{createOnigurumaEngine:l}=await import("./fp9mRO0R.js");return{createOnigurumaEngine:l}},[],import.meta.url)).createOnigurumaEngine(wt(()=>import("./Cey7Y6ql.js"),[],import.meta.url)):(await wt(async()=>{const{createJavaScriptRegexEngine:l}=await import("./LU5PuYrD.js");return{createJavaScriptRegexEngine:l}},[],import.meta.url)).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new $t(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const l=r.textmate??(r.cssVariables!=null?Ut(r.cssVariables):void 0);if(l==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...l,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new Yt(this.raw,s,this)}createStreamTokenizer(s){return new te(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Xt(await Gt(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Jt.has(r)?!1:(n??=this.raw.getLoadedLanguages(),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(l=>l.name===n.name||l.aliases?.includes(n.name)===!0);if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const l of Object.values(n))this.getTheme(l);return{...r,themes:n}}};export{he as ShikiHighlighter};
1
+ var Vt=Object.defineProperty;var yt=e=>{throw TypeError(e)};var jt=(e,i,s)=>i in e?Vt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>jt(e,typeof i!="symbol"?i+"":i,s),bt=(e,i,s)=>i.has(e)||yt("Cannot "+s);var t=(e,i,s)=>(bt(e,i,"read from private field"),s?s.call(e):i.get(e)),g=(e,i,s)=>i.has(e)?yt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(bt(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),o=(e,i,s)=>(bt(e,i,"access private method"),s);var vt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as wt}from"./Fcr7AvC-.js";import{m as xt,A as qt,r as Ht,Q as Nt,aX as Gt,R as Jt}from"./DWurigib.js";import{B as Ft,D as Kt}from"./2ZBNrUZy.js";import{I as F,E as Ct,b as Qt,a as Ut}from"./DICr2Lvd.js";function Xt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=xt.get(s.name);n==null&&(n=s,xt.set(s.name,n)),i.attachLanguages([n]),qt.add(n.name)}}function Zt(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Dt=0;let Wt=0;var H,T,P,Q,L,st,it,C,U,nt,u,D,_,A,O,b,v,z,dt,E,B,X,N,R,Z,Tt,ft,h,K,ut,zt,Et,Y,pt,It,ct,tt,Ot,gt,et,Bt,Pt,At,Yt=(At=class{constructor(e,i,s){g(this,h);J(this,"backend");g(this,H);g(this,T);g(this,P);g(this,Q);g(this,L);g(this,st);g(this,it);g(this,C);g(this,U);g(this,nt,!1);g(this,u,[F]);g(this,D,[]);g(this,_,0);g(this,A,[]);g(this,O,-1);g(this,b,!0);g(this,v,!1);g(this,z,0);g(this,dt,++Wt);g(this,E,-1);g(this,B,-1);g(this,X);g(this,N,0);g(this,R,[]);g(this,Z,!1);g(this,Tt,Zt(async e=>{if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Lt(t(this,L).languageId)){if(await this.backend?.loadLanguages([t(this,L).languageId]),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}o(this,h,K).call(this),o(this,h,It).call(this,n)},500));g(this,ft,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,dt)&&typeof n=="number"&&n===t(this,z)&&(t(this,E)>=0?o(this,h,Bt).call(this,n):o(this,h,Pt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,P,i.theme),a(this,Q,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,C,i.matchBrackets!==!1),a(this,U,i.__debug??!1),o(this,h,ut).call(this),o(this,h,K).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,C)||e<0||e>=t(this,L).lineCount||(o(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,R)[e]===void 0){o(this,h,et).call(this,e);const i=t(this,u)[e]??F,s=o(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,R)[e]??null}setTheme(e){t(this,P)!==e&&(a(this,P,e),o(this,h,K).call(this),this.stopBackgroundTokenize(),a(this,u,[F]),a(this,D,[]),a(this,_,0),a(this,A,[]),t(this,T)!=null&&t(this,L).lineCount>0&&o(this,h,pt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),o(this,h,Et).call(this)}tokenize(e,i,s=!1){if(o(this,h,ut).call(this),o(this,h,K).call(this),t(this,T)==null&&!Lt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:l=1/0}=i??{},d=l===1/0?n:Math.min(r+l,n),c=e.startLine,f=Math.max(r,c),I=i!=null&&l!==1/0&&e.lineDelta>0&&c<d&&e.endLine>=d,m=e.lineDelta===0&&(e.changedLineChanges?.every(([,,p])=>p===0)??!0);t(this,C)&&!m&&(t(this,R).length=Math.min(t(this,R).length,e.startLine));const M=s&&e.lineDelta!==0&&c>=r,S=m||i==null||c>=f,y=e.changedLineRanges??[[c,e.endLine]];a(this,D,[]),a(this,_,0),a(this,A,[]);let V=-1;if(c<f)for(const[p,w]of y)p<f&&(V=Math.max(V,Math.min(w,f-1)));const mt=V>=c&&(m||e.lineDelta<0);m?o(this,h,et).call(this,c):(o(this,h,Ot).call(this,e),(i==null||c>=f)&&o(this,h,et).call(this,f));let j=0,St=y[j][1],ht,Rt=0,k=m?y[j][0]:f,rt=!1;const Mt=new Map,W=mt?new Map:void 0;if(W!=null&&!m){const p=Math.min(V+1,f,d);if(p>c){o(this,h,et).call(this,p);let w=c,ot=t(this,u)[w]??F;for(;w<p;w++){const x=o(this,h,ct).call(this,w,ot);ot=x.state,W.set(w,x.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??F;for(;k<d;){const p=m?t(this,u)[k+1]:M?o(this,h,gt).call(this,k+1):void 0;S&&(t(this,u)[k]=q);const{resolvedTokens:w,state:ot}=o(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,w):W?.set(k,w),S&&(t(this,u)[k+1]=q),rt=k>=St&&(m||M)&&p!=null&&q.equals(p),rt){j++;const x=y[j];if(x==null)break;if(x[0]>=d){ht=x[0],Rt=j;break}let lt=t(this,u)[x[0]];if(M)for(let kt=k+2;kt<=x[0]&&(lt=o(this,h,gt).call(this,kt),lt!=null);kt++)t(this,u)[kt]=lt;lt==null?(St=x[1],k++):(k=x[0],q=lt,St=x[1]),rt=!1;continue}k++}if(S&&(k<d?t(this,u)[k+1]=q:t(this,u)[k]=q),rt&&M&&ht==null){for(let p=k+2;p<=n;p++){const w=o(this,h,gt).call(this,p);if(w==null)break;t(this,u)[p]=w}a(this,D,[]),a(this,_,0),a(this,A,[])}if(W!=null&&W.size>0&&t(this,it).call(this,W),ht!=null)t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,ht)),o(this,h,pt).call(this,ht,y,Rt);else if(!rt&&k<n){const p=I&&c>=f?d:c<f&&!m?c:k;t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,p)),o(this,h,pt).call(this,p,y,j)}return Mt}prebuildStateStack(e){o(this,h,ut).call(this),t(this,Tt).call(this,e)}stopBackgroundTokenize(){a(this,B,-1),!t(this,b)&&(a(this,b,!0),a(this,v,!1),a(this,O,-1),a(this,E,-1),a(this,X,void 0),a(this,N,0),a(this,D,[]),a(this,_,0),a(this,A,[]),o(this,h,Et).call(this))}pauseBackgroundTokenize(){t(this,b)||t(this,v)||(t(this,U)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,z)}),a(this,v,!0))}resumeBackgroundTokenize(){t(this,b)||!t(this,v)||t(this,T)==null||t(this,O)<0||(t(this,U)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,z)}),a(this,v,!1),o(this,h,Y).call(this,t(this,z)))}},H=new WeakMap,T=new WeakMap,P=new WeakMap,Q=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,C=new WeakMap,U=new WeakMap,nt=new WeakMap,u=new WeakMap,D=new WeakMap,_=new WeakMap,A=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,z=new WeakMap,dt=new WeakMap,E=new WeakMap,B=new WeakMap,X=new WeakMap,N=new WeakMap,R=new WeakMap,Z=new WeakMap,Tt=new WeakMap,ft=new WeakMap,h=new WeakSet,K=function(){if(t(this,P)==="")return;this.backend?.getTheme(t(this,P));const{colorMap:e}=t(this,H).setTheme(t(this,P));a(this,Q,e)},ut=function(){t(this,T)==null&&!Lt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},zt=function(){t(this,Z)||(globalThis.addEventListener("message",t(this,ft)),a(this,Z,!0))},Et=function(){t(this,Z)&&(globalThis.removeEventListener("message",t(this,ft)),a(this,Z,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,dt),jobId:e})},pt=function(e,i,s=0){if(Lt(t(this,L).languageId))return;const n=++vt(this,z)._;t(this,U)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,b,!1),a(this,v,!1),a(this,O,e),t(this,E)>=0&&a(this,B,Math.max(t(this,B),t(this,E))),a(this,E,-1),a(this,X,i),a(this,N,s),o(this,h,zt).call(this),o(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,b)){t(this,E)>=0?a(this,E,Math.max(t(this,E),e)):a(this,B,Math.max(t(this,B),e));return}const i=++vt(this,z)._;a(this,b,!1),a(this,v,!1),a(this,O,t(this,u).length-1),a(this,E,e),a(this,B,-1),a(this,X,void 0),a(this,N,0),o(this,h,zt).call(this),o(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=_t(t(this,T),t(this,Q),s,i,Dt,t(this,C));return o(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,C)&&(t(this,R)[e]=i)},Ot=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,D,t(this,u)),a(this,_,0),a(this,u,t(this,u).slice(0,s))):(a(this,_,s),a(this,D,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,A,i)},gt=function(e){let i=e;for(let s=t(this,A).length-1;s>=0;s--){const[n,r,l]=t(this,A)[s];if(l!==0){if(i>r)i-=l;else if(i>n)return t(this,u)[e]}}return t(this,D)[i-t(this,_)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,l=t(this,u)[r]??F;for(;r<s;){t(this,u)[r]=l;const d=t(this,L).getLineText(r);if(d.length<t(this,st)&&d!==""&&d.trim()!==""){const c=_t(t(this,T),t(this,Q),d,l,Dt,t(this,C),!1);o(this,h,tt).call(this,r,c.bracketIgnoredRanges),l=c.ruleStack}else o(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=l,i!=null&&performance.now()-n>i)break}return r>=s},Bt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=o(this,h,et).call(this,t(this,E),1);if(!(t(this,b)||t(this,v)||e!==t(this,z))){if(i){this.stopBackgroundTokenize();return}a(this,O,t(this,u).length-1),o(this,h,Y).call(this,e)}},Pt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,X);let l=t(this,O),d=t(this,u)[l]??F,c=!1,f=t(this,N),I=r?.[f]?.[1];for(;l<n;){t(this,u)[l]=d;const m=I!=null?o(this,h,gt).call(this,l+1):void 0,M=o(this,h,ct).call(this,l,d);if(s.set(l,M.resolvedTokens),d=M.state,t(this,u)[l+1]=d,c=I!=null&&l>=I&&m!=null&&d.equals(m),l++,c){f++;const S=r?.[f];if(S==null)break;if(I=S[1],t(this,u)[S[0]]==null)c=!1;else{l=S[0],d=t(this,u)[l]??d,c=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,b)||t(this,v)||e!==t(this,z))){if(c||l>=n){const m=t(this,B);this.stopBackgroundTokenize(),m>=0&&o(this,h,It).call(this,m);return}a(this,O,l),a(this,N,f),o(this,h,Y).call(this,e)}},At);function _t(e,i,s,n,r,l=!0,d=!0){const c=e.tokenizeLine2(s,n,r);c.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=c.tokens,I=f.length/2,m=[],M=[];if(!d&&!l)return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M};for(let S=0;S<I;S++){const y=f[2*S],V=S+1<I?f[2*S+2]:s.length;if(y===V)continue;const mt=f[2*S+1];if(d){const j=Ct.getForeground(mt);m.push([y,i[j],s.slice(y,V)])}l&&Ct.getTokenType(mt)>0&&M.push([y,V])}return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M}}function Lt(e){return e==="text"||e==="ansi"}var $,G,at,te=(at=class extends Ft{constructor(s,n){super();J(this,"highlighter");J(this,"options");g(this,$,"");g(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let l=[];for(let d=0;d<r.length;d+=2){const c=r[d],f=this.highlighter.codeToTokens(c,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));d+1<r.length?(Ht(n,I),this.pushLineBreak(n,c.length,r[d+1]),a(this,G,f.grammarState)):(l=I,a(this,$,c))}return{unstable:l,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),he=class $t extends Kt{constructor(s,n){super(s,Nt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await wt(async()=>{const{createOnigurumaEngine:l}=await import("./fp9mRO0R.js");return{createOnigurumaEngine:l}},[],import.meta.url)).createOnigurumaEngine(wt(()=>import("./Cey7Y6ql.js"),[],import.meta.url)):(await wt(async()=>{const{createJavaScriptRegexEngine:l}=await import("./LU5PuYrD.js");return{createJavaScriptRegexEngine:l}},[],import.meta.url)).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new $t(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const l=r.textmate??(r.cssVariables!=null?Ut(r.cssVariables):void 0);if(l==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...l,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new Yt(this.raw,s,this)}createStreamTokenizer(s){return new te(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Xt(await Gt(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Jt.has(r)?!1:(n??=this.raw.getLoadedLanguages(),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(l=>l.name===n.name||l.aliases?.includes(n.name)===!0);if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const l of Object.values(n))this.getTheme(l);return{...r,themes:n}}};export{he as ShikiHighlighter};
@@ -1 +1 @@
1
- import{t as pt,bo as S,bw as bt,bq as Pt,b as Ct,bm as vt,bs as h}from"./Fcr7AvC-.js";import{bs as kt,ca as q,aD as n,c9 as i,a7 as L,ay as w,W as _,bn as $t,bS as yt,aA as B,aB as St}from"./3SdAC2_C.js";import{i as E}from"./BhYXv0ZM.js";import{k as wt}from"./Cc0763mU.js";import{c as _t}from"./2z64ELW5.js";import{t as Bt}from"./C-BsEdGZ.js";import{JH as u,eK as It,eL as Wt,Kf as Tt,Ku as Ut,Kk as Rt,vy as Dt,ou as O}from"./D0qhIm1r.js";import{g as Ht}from"./DWGXN6Nr.js";import{bO as At,bQ as Ft,dI as Kt}from"./cD292w1o.js";import{C as f}from"./CZfU7DE3.js";import"./DNup87JQ.js";import"./BRCr02in.js";import"./CWfjuhY2.js";import{bg as Mt}from"./ChHRVjww.js";import"./BAtAwQ72.js";/* empty css */import{T as Nt}from"./BTE0066U.js";import"./Cz3WzTlQ.js";import{M as xt}from"./D179JMBI.js";import{V as qt}from"./CDtaIFAl.js";import{O as Lt}from"./a3O-Ns1M.js";import{bT as Et,bN as Ot,b8 as Vt}from"./D-j7vD5Z.js";import{i as Gt}from"./H2jLkRRS.js";var Jt=St("<!> <!>",1);function Qt(I,p){if(new.target)return pt({component:Qt,...I});kt(p,!0);const W=()=>h(et,"$workspace",l),P=()=>h(Y,"$ftChanges$",l),V=()=>h(Z,"$ftCommits$",l),T=()=>h(z,"$foldUnchanged",l),U=()=>h(j,"$lineWrapping",l),R=()=>h(X,"$diffSideBySide",l),[l,G]=Pt(),J=t=>{qt(t,{embedded:!0,get foldEnabled(){return T()},onToggleFold:()=>u.dispatch(Rt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return R()},onToggleSplit:()=>u.dispatch(Tt())})},Q=t=>{var e=Jt(),r=w(e);{let m=i(()=>vt.layout_diffHeader_goToFile_tooltip());_t(r,()=>xt,(y,ht)=>{ht(y,{get icon(){return Mt},get label(){return n(m)},onclick:jt=>ft()})})}var s=yt(r,2);{var d=m=>{Lt(m,{get filePath(){return n(k)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};E(s,m=>{n(k)&&m(d)})}_(t,e)},j=Et(),z=Ot(),X=Vt();let a=S(p,"tab",7),o=S(p,"workspaceId",7),b=S(p,"isActive",7);const C=Bt(()=>o()),Y=At(C),Z=Ft(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=Ht(),et=Kt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);q(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),H=i(()=>a().data?.gitRootPath),v=i(()=>n(H)||n(nt)),k=i(()=>a().diffPath&&n(v)?Gt(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function A(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function F(t){return!t||n(c)?null:P().find(e=>A(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!A(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of V())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const K=i(()=>a().diffPath?F(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=F(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),M=i(()=>a().data?.branchBaseRef),N=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(M)||n(N))),$=i(()=>{if(n(g)?.commitHash)return n(g);if(n(K))return n(K);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n(k)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}q(()=>{!D||!b()||D.registerActions({display:J,actions:Q})});function dt(t,e){u.dispatch(O(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(O(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},x=L(),mt=w(x);{var lt=t=>{var e=L(),r=w(e);wt(r,()=>a().diffPath,s=>{{let d=i(()=>R()?"split":"unified"),m=i(()=>!n(c)&&n($).stage===f.Unstaged?dt:void 0),y=i(()=>!n(c)&&n($).stage===f.Staged?ut:void 0);Nt(s,{get active(){return b()},get change(){return n($)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return T()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(M)},get branchBaseCommitSha(){return n(N)},get gitRootId(){return n(c)},get gitRootPath(){return n(H)},get onStageHunk(){return n(m)},get onUnstageHunk(){return n(y)}})}}),_(t,e)};E(mt,t=>{a().diffPath&&t(lt)})}_(I,x);var gt=$t(ct);return G(),gt}export{Qt as default};
1
+ import{t as pt,bo as S,bw as bt,bq as Pt,b as Ct,bm as vt,bs as h}from"./Fcr7AvC-.js";import{bs as kt,ca as q,aD as n,c9 as i,a7 as L,ay as w,W as _,bn as $t,bS as yt,aA as B,aB as St}from"./3SdAC2_C.js";import{i as E}from"./BhYXv0ZM.js";import{k as wt}from"./Cc0763mU.js";import{c as _t}from"./2z64ELW5.js";import{t as Bt}from"./C-BsEdGZ.js";import{JH as u,eK as It,eL as Wt,Kf as Tt,Ku as Ut,Kk as Rt,vy as Dt,ou as O}from"./D0qhIm1r.js";import{g as Ht}from"./DWGXN6Nr.js";import{bO as At,bQ as Ft,dI as Kt}from"./cD292w1o.js";import{C as f}from"./CZfU7DE3.js";import"./CVG625sB.js";import"./BRCr02in.js";import"./CWfjuhY2.js";import{bg as Mt}from"./ChHRVjww.js";import"./BAtAwQ72.js";/* empty css */import{T as Nt}from"./DJDA_1H4.js";import"./Cz3WzTlQ.js";import{M as xt}from"./D179JMBI.js";import{V as qt}from"./CDtaIFAl.js";import{O as Lt}from"./DUbqvr_K.js";import{bT as Et,bN as Ot,b8 as Vt}from"./CNKJ8_Xr.js";import{i as Gt}from"./H2jLkRRS.js";var Jt=St("<!> <!>",1);function Qt(I,p){if(new.target)return pt({component:Qt,...I});kt(p,!0);const W=()=>h(et,"$workspace",l),P=()=>h(Y,"$ftChanges$",l),V=()=>h(Z,"$ftCommits$",l),T=()=>h(z,"$foldUnchanged",l),U=()=>h(j,"$lineWrapping",l),R=()=>h(X,"$diffSideBySide",l),[l,G]=Pt(),J=t=>{qt(t,{embedded:!0,get foldEnabled(){return T()},onToggleFold:()=>u.dispatch(Rt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return R()},onToggleSplit:()=>u.dispatch(Tt())})},Q=t=>{var e=Jt(),r=w(e);{let m=i(()=>vt.layout_diffHeader_goToFile_tooltip());_t(r,()=>xt,(y,ht)=>{ht(y,{get icon(){return Mt},get label(){return n(m)},onclick:jt=>ft()})})}var s=yt(r,2);{var d=m=>{Lt(m,{get filePath(){return n(k)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};E(s,m=>{n(k)&&m(d)})}_(t,e)},j=Et(),z=Ot(),X=Vt();let a=S(p,"tab",7),o=S(p,"workspaceId",7),b=S(p,"isActive",7);const C=Bt(()=>o()),Y=At(C),Z=Ft(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=Ht(),et=Kt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);q(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),H=i(()=>a().data?.gitRootPath),v=i(()=>n(H)||n(nt)),k=i(()=>a().diffPath&&n(v)?Gt(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function A(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function F(t){return!t||n(c)?null:P().find(e=>A(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!A(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of V())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const K=i(()=>a().diffPath?F(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=F(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),M=i(()=>a().data?.branchBaseRef),N=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(M)||n(N))),$=i(()=>{if(n(g)?.commitHash)return n(g);if(n(K))return n(K);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n(k)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}q(()=>{!D||!b()||D.registerActions({display:J,actions:Q})});function dt(t,e){u.dispatch(O(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(O(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},x=L(),mt=w(x);{var lt=t=>{var e=L(),r=w(e);wt(r,()=>a().diffPath,s=>{{let d=i(()=>R()?"split":"unified"),m=i(()=>!n(c)&&n($).stage===f.Unstaged?dt:void 0),y=i(()=>!n(c)&&n($).stage===f.Staged?ut:void 0);Nt(s,{get active(){return b()},get change(){return n($)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return T()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(M)},get branchBaseCommitSha(){return n(N)},get gitRootId(){return n(c)},get gitRootPath(){return n(H)},get onStageHunk(){return n(m)},get onUnstageHunk(){return n(y)}})}}),_(t,e)};E(mt,t=>{a().diffPath&&t(lt)})}_(I,x);var gt=$t(ct);return G(),gt}export{Qt as default};
@@ -0,0 +1 @@
1
+ import{bm as r}from"./Fcr7AvC-.js";import{JH as s,n_ as p,Cc as N,yJ as f,q$ as F,nZ as T,s2 as m,hu as U,LU as B,o as H,mZ as V,hq as k,F as W}from"./D0qhIm1r.js";import{w as Y}from"./BwweojP5.js";import{cx as z,cf as $,cS as G,co as h,cc as M,cJ as R,d0 as C,c$ as K,dI as I,cZ as Z,c_ as J,d2 as X}from"./cD292w1o.js";const Q={auggie:"auggie",claudeCode:"claude-code",codex:"codex",mock:"mock",opencode:"opencode",pi:"pi",cortex:"cortex",droid:"droid",grok:"grok",unsloth:"unsloth",antigravity:"antigravity",cursor:"cursor",dsh:"dsh"},ee=new Map(Object.entries(Q).map(([e,t])=>[t,e]));function te(e,t){const o=ee.get(t);return o===void 0?void 0:e?.providers[o]}function De(e,t){const o=te(e,t);return o?.available===!0&&O(t,o.authenticated)}const je=new Set(["claude-code"]);function O(e,t){return t!==!1}const y=new WeakMap,qe=s.createSelector((e,t)=>e.agentAvailability.providerStatusMap[t]?.viaNpx===!0),Ne=s.createSelector((e,t)=>{const o=e.agentAvailability.providerStatusMap[t];return o?.available===!0&&o.authenticated!==!0}),w=s.createSelector(e=>{if(!z.select(e))return e.agentAvailability.providerStatusMap;const t=e.providerCatalog?.providers;if(!t)return{};let o=y.get(t);return o||(o=Object.fromEntries(p(t).map(n=>[n.id,{available:!0}])),y.set(t,o)),o}),Fe=s.createSelector(e=>e.agentAvailability.providerLoadingMap),Te=s.createSelector(e=>e.agentAvailability.providerCheckEpochMap),re=s.createSelector(e=>e.agentAvailability.hasCheckedOnce),Ue=s.createSelector(e=>Object.values(e.agentAvailability.providerLoadingMap).some(t=>t)),Be=s.createSelector(e=>e.agentAvailability.npxStatus),He=s.createSelector(e=>e.agentAvailability.hiddenProviders),Ve=s.createSelector(e=>e.agentAvailability.discoveryError),We=s.createSelector(e=>e.agentAvailability.discoveryRevision),Ye=s.createSelector(e=>e.agentAvailability.refreshModelsPending),ze=s.createSelector(e=>e.agentAvailability.refreshModelsRevision),$e=s.createSelector(e=>e.sidebarNav?.onboardingActive&&e.userPreferences.providerSetupHydratedBackendId===e.connections.windowBackendId&&!e.userPreferences.hasCompletedProviderSetup&&$.select(e)==="owner"?G.select(e):null),Ge=s.createSelector((e,t)=>p(e.providerSettings.requests).filter(o=>o.sessionId===t)),Ke=s.createSelector((e,t)=>e.providerSettings.sessions.includes(t)),Ze=s.createSelector((e,t)=>e.providerSettings.writeRevisions?.[t]??0),Je=s.createSelector(e=>e.providerSettings.paths),Xe=s.createSelector(e=>e.providerSettings.pathsRevision),g=s.createSelector(e=>h.select(e)?M.select(e)?.defaultProviderId??"":e.model.defaultProviderId);s.createSelector((e,t)=>g.select(e)===t);const oe=s.createSelector(e=>h.select(e)?Object.fromEntries((M.select(e)?.enabledProviderIds??[]).map(t=>[t,!0])):e.providerSettings.enabledProviders),A=s.createSelector((e,t)=>{if(h.select(e))return M.select(e)?.enabledProviderIds?.includes(t)===!0;const o=e.providerSettings.nonDisableableProviderIds??[];return N(e.providerSettings.enabledProviders,t,{canBeDisabled:!o.includes(t)})}),L=s.createSelector(e=>{if(h.select(e))return M.select(e)?.enabledProviderIds??[];const t=e.providerSettings.enabledProviders,o=e.providerCatalog?p(e.providerCatalog.providers):[],n=new Set(o.filter(c=>A.select(e,c.id)).map(c=>c.id)),i=g.select(e),a=f(i);a&&t[a]!==!1&&n.add(a);for(const[c,l]of Object.entries(t))l&&n.add(c);return[...n]});function ne(e,t){const o=C.select(e,t);return h.select(e)?o?.visible!==!0:!!(o?.requiresEnvVar||o?.requiresFeatureCode)}const S=s.createSelector(e=>{const t=w.select(e);return L.select(e).filter(o=>!ne(e,o)&&t[o]?.available===!0)}),Qe=s.createSelector((e,t)=>{const o=w.select(e),n=R.select(e,t);return S.select(e).filter(i=>R.select(e,i)!==n&&A.select(e,i)&&O(i,o[i]?.authenticated))}),et=s.createSelector(e=>re.select(e)?S.select(e):L.select(e)),tt=s.createSelector(e=>{const t=f(g.select(e));return S.select(e).includes(t)}),rt=s.createSelector(e=>e.providerSettings.fastMode),ot=s.createSelector(e=>{const t=e.providerSettings.fastMode,o={...t?.confirmed};for(const[n,i]of Object.entries(t?.pending??{}))o[n]=i.enabled;return o}),nt=s.createSelector(e=>Object.values(u(e).defaults).some(t=>t.remoteLaunch!==void 0)),st=s.createSelector(e=>e.providerSettings.fastMode?.supported?["claude-code","codex"].filter(t=>C.select(e,t)?.supportsFastMode===!0):[]),u=e=>e.providerSettings?.profiles??F,at=s.createSelector(e=>K.select(e).filter(t=>t.supportsProfiles===!0).map(t=>t.id)),it=s.createSelector((e,t)=>p(u(e).items).filter(o=>o.baseProviderId===t)),ct=s.createSelector(e=>[...new Set(p(u(e).items).map(t=>t.baseProviderId))]),lt=s.createSelector(e=>u(e).defaults),dt=s.createSelector((e,t)=>u(e).defaults[t]),ut=s.createSelector((e,t)=>T(u(e).items,t)),_t=s.createSelector(e=>u(e).revision),pt=s.createSelector(e=>u(e).loadStatus),ft=s.createSelector(e=>u(e).status),ht=s.createSelector(e=>u(e).activation),vt=s.createSelector(e=>Object.fromEntries(p(u(e).mutations).map(t=>[t.id,t]))),se={},mt=s.createSelector(e=>u(e).identity??se),ae={},Mt=s.createSelector(e=>u(e).setups??ae),bt=s.createSelector(e=>(e.providerSettings?.sessions.length??0)>0);function E(e){const t=e.trim();if(!t.startsWith("tc"))return!1;const o=t.slice(2);if(o.length<50||o.length%4===1||!/^[A-Za-z0-9_-]+$/.test(o))return!1;const n=atob(o.slice(0,4).replace(/-/g,"+").replace(/_/g,"/")).charCodeAt(0);return n>=161&&n<=187||n===191}function gt(e){if(!e||typeof e!="object")return null;const t=e;for(const o of[t.collaborationName,t.prettyHostname,t.hostname])if(typeof o=="string"&&v(o))return v(o);return null}function St(e){return[...v(e)].length<=100&&!/\p{Cc}/u.test(e)}function v(e){return e.replace(/^\p{White_Space}+|\p{White_Space}+$/gu,"")}function ie(e){const t=e.label.trim(),o=e.host&&e.port!=null?`${e.host}:${e.port}`:"";return(t&&t!==o?t:"")||e.hostname?.trim()||t||o}function ce(e){return r.layout_daemonStatus_localConnection_label()}function Pt(e,t){return e.isLocal?ce():ie(e)}function le(e){const t=v(e.hostname??"");return t||(E(e.label)?r.connection_unknownHost_label():e.label)}function kt(e){const t=e.label.trim();return!t||E(t)?null:t!==le(e)?t:null}function Rt(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.defaultRemoteLaunch||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function yt(e,t,o){if(m(e)){const n=t.find(i=>i.providerRef===e);return n?.remoteCompatible!==!1?null:n.remoteIncompatibility??{reason:"unknown",keys:[]}}return null}const de=1440*60*1e3;function x(e,t){if(!e?.capabilities)return"missing";const o=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(o)&&t-o>de?"stale":"fresh"}function Ct(e,t,o){if(!e||x(e,o)!=="fresh")return;const n=f(t),i=e.capabilities?.providers.find(a=>a.id===n);return i&&i.models.length>0?i.models:void 0}function It(e,t,o){const n=f(t),i=new Set;for(const a of e){if(a.state==="revoked"||x(a,o)!=="fresh")continue;const c=a.capabilities?.providers.find(l=>l.id===n);if(!(!c||!_e(c)))for(const l of c.models)i.add(l)}return[...i]}const ue=new Set(["cli-missing","prerequisite-missing"]);function _e(e){return e.visible!==!1&&!ue.has(e.status)}const pe=new Set(["signed-out","auth-failed"]);function fe(e){return pe.has(e)}function he(e,t){if(m(t))return!1;const o=f(t),n=e?.capabilities?.providers.find(i=>i.id===o);return!!n&&fe(n.status)}function D(e,t){return(t.defaultRemoteLaunch?t.defaultRemoteLaunch[e]==="send":!t.defaultRemoteIncompatibility?.[e])&&t.defaultHasOverrides?.[e]!==!1}function ve(e,t,o){return o.defaultRemoteLaunch?.[t]==="refused"?!1:!e.cloud&&!he(e,t)}function Ot(e){const{machine:t,providerRef:o}=e;return m(o)||ve(t,o,e)||D(o,e)?null:e.catalogProfiles.find(n=>n.baseProviderId===o&&n.remoteCompatible===!0)??null}function wt(e,t,o){const n=f(t);return e?.capabilities?.providers.find(i=>i.id===n)?.modelLabels?.[o]}const me="https://e2b.dev/dashboard",Me="https://app.northflank.com",be="https://www.agent37.com/dashboard/cloud",ge="https://vercel.com/dashboard";function At(e="e2b"){return e==="vercel"?ge:e==="northflank"?Me:e==="agent37"?be:me}function Se(e){switch(e){case"northflank":return{keyRejected:r.cloudMachines_northflank_state_tokenRejected_label(),unreachable:r.cloudMachines_northflank_state_unreachable_label(),ownerOnly:r.cloudMachines_northflank_error_ownerOnly(),saved:r.cloudMachines_northflank_saved_toast(),listTitle:r.cloudMachines_northflank_services_title(),dashboardOpen:r.cloudMachines_northflank_dashboardOpen_label(),deleteTitle:r.cloudMachines_northflank_delete_confirmTitle,deleteDescription:r.cloudMachines_northflank_delete_confirm_description(),creating:r.cloudMachines_northflank_start_creating(),startFailed:r.cloudMachines_northflank_startFailure_title(),startUnknown:r.cloudMachines_northflank_startFailure_unknown_cause()};case"agent37":return{keyRejected:r.cloudMachines_state_keyRejected_label(),unreachable:r.cloudMachines_agent37_state_unreachable_label(),ownerOnly:r.cloudMachines_agent37_error_ownerOnly(),saved:r.cloudMachines_agent37_saved_toast(),listTitle:r.cloudMachines_agent37_instances_title(),dashboardOpen:r.cloudMachines_agent37_dashboardOpen_label(),deleteTitle:r.cloudMachines_agent37_delete_confirmTitle,deleteDescription:r.cloudMachines_agent37_delete_confirm_description(),creating:r.cloudMachines_agent37_start_creating(),startFailed:r.cloudMachines_agent37_startFailure_title(),startUnknown:r.cloudMachines_agent37_startFailure_unknown_cause()};case"vercel":return{keyRejected:r.cloudMachines_vercel_state_tokenRejected_label(),unreachable:r.cloudMachines_vercel_state_unreachable_label(),ownerOnly:r.cloudMachines_vercel_error_ownerOnly(),saved:r.cloudMachines_vercel_saved_toast(),listTitle:r.cloudMachines_vercel_sandboxes_title(),dashboardOpen:r.cloudMachines_vercel_dashboardOpen_label(),deleteTitle:r.cloudMachines_delete_confirmTitle,deleteDescription:r.cloudMachines_vercel_delete_confirm_description(),creating:r.cloudMachines_vercel_start_creating(),startFailed:r.cloudMachines_vercel_startFailure_title(),startUnknown:r.cloudMachines_vercel_startFailure_unknown_cause()};default:return{keyRejected:r.cloudMachines_state_keyRejected_label(),unreachable:r.cloudMachines_state_unreachable_label(),ownerOnly:r.cloudMachines_error_ownerOnly(),saved:r.cloudMachines_saved_toast(),listTitle:r.cloudMachines_sandboxes_title(),dashboardOpen:r.cloudMachines_dashboardOpen_label(),deleteTitle:r.cloudMachines_delete_confirmTitle,deleteDescription:r.cloudMachines_delete_confirm_description(),creating:r.cloudMachines_start_creating(),startFailed:r.cloudMachines_startFailure_title(),startUnknown:r.cloudMachines_startFailure_unknown_cause()}}}function Lt(e){return e==="vm"?r.cloudMachines_agent37_form_type_vm():r.cloudMachines_agent37_form_type_default()}function Et(e){return e==="eu"?r.cloudMachines_agent37_region_eu():e==="ap-south"?r.cloudMachines_agent37_region_apSouth():r.cloudMachines_agent37_region_us()}const Pe=/^E2B\s*·\s*/u;function xt(e,t){const o=t?`${t} · `:null;return(o&&e.name.startsWith(o)?e.name.slice(o.length):e.name.replace(Pe,"")).trim()||e.name}function Dt(e){const t=U(e);return t?r.cloudMachines_size_label({vcpu:String(t.vcpu),memory:String(t.memoryGiB)}):e}function jt(e,t,o){const n=e.cloud;if(!n)return 0;const i=n.state==="running"&&t>0?Math.max(0,(o-t)/1e3):0;return Math.floor(n.runningSeconds+i)}function qt(e){const t=Math.floor(e/60);if(t<1)return r.cloudMachines_uptime_underMinute();if(t<60)return r.cloudMachines_uptime_minutes({minutes:String(t)});const o=Math.floor(t/60),n=t%60;return n===0?r.cloudMachines_uptime_hours({hours:String(o)}):r.cloudMachines_uptime_hoursMinutes({hours:String(o),minutes:String(n)})}const ke=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2});function Nt(e){const t=V(e,3600);return t===null?null:r.cloudMachines_size_hourly({amount:ke.format(t)})}function j(e){try{return new URL(e).host||e}catch{return e}}function Ft(e){const t=e.find(o=>o.cloud?.state==="running")?.cloud?.relayUrl;return t?r.cloudMachines_relay_host({host:j(t)}):null}function Tt(e){const t=a=>e.filter(c=>c.cloud?.state===a).length,o=t("running"),n=t("paused"),i=[o>0?r.cloudMachines_sandboxes_running_count({count:String(o)}):null,n>0?r.cloudMachines_sandboxes_paused_count({count:String(n)}):null].filter(a=>a!==null);return i.length>0?i.join(" · "):null}function Ut(e,t){const o=new Map;for(const a of e){const c=a.cloud?.workspaceId,l=c?t(c):null,_=c&&l?c:"";let d=o.get(_);d||(d={key:_,name:l??r.cloudMachines_sandboxes_otherWorkspace(),sandboxes:[]},o.set(_,d)),d.sandboxes.push(a)}const n=a=>+(a.cloud?.state==="paused"),i=a=>Number(a.sandboxes.every(c=>n(c)));for(const a of o.values())a.sandboxes.sort((c,l)=>n(c)-n(l)||(l.cloud?.startedAt??"").localeCompare(c.cloud?.startedAt??"")||c.id.localeCompare(l.id));return[...o.values()].sort((a,c)=>i(a)-i(c)||+(a.key==="")-+(c.key==="")||a.name.localeCompare(c.name,void 0,{sensitivity:"base"})||a.key.localeCompare(c.key))}function Re(e){switch(e.code){case"cloud-profile-required":return{title:r.cloudMachines_northflank_error_profileRequired_title(),description:r.cloudMachines_northflank_error_profileRequired_description()};case"cloud-quota":return{title:r.cloudMachines_northflank_error_quota_title(),description:e.limit==="plan"?r.cloudMachines_northflank_error_quotaPlan_description():e.limit==="rate"?r.cloudMachines_northflank_error_quotaRate_description():r.cloudMachines_northflank_error_quotaConcurrency_description()};case"cloud-machine-unavailable":{const t=o=>({title:r.cloudMachines_northflank_error_unavailable_title(),description:o});switch(e.reason){case"not-configured":return t(r.cloudMachines_northflank_error_notConfigured_description());case"key-rejected":return{title:r.cloudMachines_northflank_error_tokenRejected_title(),description:r.cloudMachines_northflank_error_tokenRejected_description()};case"project-missing":return t(r.cloudMachines_northflank_error_projectMissing_description());case"permission-denied":return{title:r.cloudMachines_northflank_error_permissionDenied_title(),description:r.cloudMachines_northflank_error_permissionDenied_description()};case"template-missing":return t(r.cloudMachines_northflank_error_imageMissing_description());case"sandbox-lost":return{title:r.cloudMachines_northflank_error_serviceLost_title(),description:r.cloudMachines_northflank_error_serviceLost_description()};case"bootstrap-failed":return t(r.cloudMachines_northflank_error_bootstrapFailed_description());default:return t(r.cloudMachines_northflank_error_apiError_description())}}}}function ye(e){switch(e.code){case"cloud-profile-required":return{title:r.cloudMachines_agent37_error_profileRequired_title(),description:r.cloudMachines_agent37_error_profileRequired_description()};case"cloud-quota":return{title:r.cloudMachines_agent37_error_quota_title(),description:e.limit==="plan"?r.cloudMachines_agent37_error_quotaPlan_description():e.limit==="rate"?r.cloudMachines_agent37_error_quotaRate_description():r.cloudMachines_agent37_error_quotaConcurrency_description()};case"cloud-machine-unavailable":{const t=o=>({title:r.cloudMachines_agent37_error_unavailable_title(),description:o});switch(e.reason){case"not-configured":return t(r.cloudMachines_agent37_error_notConfigured_description());case"key-rejected":return{title:r.cloudMachines_agent37_error_keyRejected_title(),description:r.cloudMachines_agent37_error_keyRejected_description()};case"permission-denied":return{title:r.cloudMachines_agent37_error_permissionDenied_title(),description:r.cloudMachines_agent37_error_permissionDenied_description()};case"no-capacity":return{title:r.cloudMachines_agent37_error_noCapacity_title(),description:r.cloudMachines_agent37_error_noCapacity_description()};case"template-missing":return t(r.cloudMachines_agent37_error_templateMissing_description());case"sandbox-lost":return{title:r.cloudMachines_agent37_error_instanceLost_title(),description:r.cloudMachines_agent37_error_instanceLost_description()};case"bootstrap-failed":return t(r.cloudMachines_agent37_error_bootstrapFailed_description());default:return t(r.cloudMachines_agent37_error_apiError_description())}}}}function Ce(e){switch(e.code){case"cloud-profile-required":return{title:r.cloudMachines_vercel_error_profileRequired_title(),description:r.cloudMachines_vercel_error_profileRequired_description()};case"cloud-quota":return{title:r.cloudMachines_vercel_error_quota_title(),description:e.limit==="plan"?r.cloudMachines_vercel_error_quotaPlan_description():e.limit==="rate"?r.cloudMachines_vercel_error_quotaRate_description():r.cloudMachines_vercel_error_quotaConcurrency_description()};case"cloud-machine-unavailable":{const t=o=>({title:r.cloudMachines_vercel_error_unavailable_title(),description:o});switch(e.reason){case"not-configured":return t(r.cloudMachines_vercel_error_notConfigured_description());case"key-rejected":return{title:r.cloudMachines_vercel_error_keyRejected_title(),description:r.cloudMachines_vercel_error_keyRejected_description()};case"project-missing":return t(r.cloudMachines_vercel_error_projectMissing_description());case"permission-denied":return{title:r.cloudMachines_vercel_error_permissionDenied_title(),description:r.cloudMachines_vercel_error_permissionDenied_description()};case"template-missing":return t(r.cloudMachines_vercel_error_imageMissing_description());case"sandbox-lost":return{title:r.cloudMachines_vercel_error_sandboxLost_title(),description:r.cloudMachines_vercel_error_sandboxLost_description()};case"bootstrap-failed":return t(r.cloudMachines_vercel_error_bootstrapFailed_description());default:return t(r.cloudMachines_vercel_error_apiError_description())}}}}function Bt(e,t){if(e.code==="cloud-machine-unavailable"&&e.reason==="relay-unreachable")return{title:r.cloudMachines_error_relayUnreachable_title(),description:e.relayUrl?r.cloudMachines_error_relayUnreachable_description({host:j(e.relayUrl)}):r.cloudMachines_error_relayUnreachable_noHost_description()};const o=e.provider??t;if(o==="northflank")return Re(e);if(o==="agent37")return ye(e);if(o==="vercel")return Ce(e);switch(e.code){case"cloud-profile-required":return{title:r.cloudMachines_error_profileRequired_title(),description:r.cloudMachines_error_profileRequired_description()};case"cloud-quota":return{title:r.cloudMachines_error_quota_title(),description:e.limit==="plan"?r.cloudMachines_error_quotaPlan_description():e.limit==="rate"?r.cloudMachines_error_quotaRate_description():r.cloudMachines_error_quotaConcurrency_description()};case"cloud-machine-unavailable":switch(e.reason){case"not-configured":return{title:r.cloudMachines_error_unavailable_title(),description:r.cloudMachines_error_notConfigured_description()};case"key-rejected":return{title:r.cloudMachines_error_keyRejected_title(),description:r.cloudMachines_error_keyRejected_description()};case"template-missing":return{title:r.cloudMachines_error_unavailable_title(),description:r.cloudMachines_error_templateMissing_description()};case"sandbox-lost":return{title:r.cloudMachines_error_sandboxLost_title(),description:r.cloudMachines_error_sandboxLost_description()};case"bootstrap-failed":return{title:r.cloudMachines_error_unavailable_title(),description:r.cloudMachines_error_bootstrapFailed_description()};default:return{title:r.cloudMachines_error_unavailable_title(),description:r.cloudMachines_error_apiError_description()}}}}function Ht(e,t,o){const n=e.trim();if(!n)return r.cloudMachines_form_name_required();if(B(n)>H||/[\u0000-\u001f\u007f]/u.test(n))return r.cloudMachines_form_name_invalid();const i=n.toLowerCase();return t.some(a=>a.id!==o&&a.name.trim().toLowerCase()===i)?r.cloudMachines_form_name_taken():null}const Ie=s.createSelector(e=>Y.select(e)&&e.remoteMachines?.supported===!0&&e.cloudMachines?.supported===!0),Vt=s.createSelector(e=>{const t=e.cloudMachines?.providerKinds??["e2b"];return e.cloudMachines?.entries===!0?t:t.filter(o=>o==="e2b")}),Wt=s.createSelector(e=>e.cloudMachines?.diskSettings??{}),Yt=s.createSelector(e=>e.cloudMachines?.entries===!0);function q(e){return Object.values(e.cloudMachines?.providers??{}).sort((t,o)=>t.configuredAt.localeCompare(o.configuredAt)||t.name.localeCompare(o.name))}const zt=s.createSelector(q),$t=s.createSelector(e=>Object.values(e.cloudMachines?.machines??{}).sort((t,o)=>(t.cloud?.startedAt??"").localeCompare(o.cloud?.startedAt??""))),Gt=s.createSelector(e=>Object.values(e.cloudMachines?.machines??{}).filter(t=>t.cloud?.state==="paused").length);function Oe(e,t){const o=t.cloud;return!o?.agentId||!o.workspaceId||!I.select(e,o.workspaceId)?null:{workspaceId:o.workspaceId,agentId:o.agentId}}const Kt=s.createSelector((e,t)=>{const o={},n={};for(const i of t){const a=i.cloud?.workspaceId;if(a&&!(a in o)){const c=I.select(e,a);o[a]=c?.title||c?.name||null}n[i.id]=Oe(e,i)}return{workspaceNames:o,agentLinks:n}}),Zt=s.createSelector(e=>e.cloudMachines?.readAt??{}),Jt=s.createSelector(e=>e.cloudMachines?.pending??{}),Xt=s.createSelector(e=>e.cloudMachines?.failures??{}),Qt=s.createSelector(e=>e.cloudMachines?.validated??null);function er(e){if(!Ie.select(e))return null;const t=q(e);if(t.length===0)return null;const o=e.cloudMachines?.entries===!0;return t.map(n=>({cloudMachineId:n.id,label:n.provider==="e2b"?o&&(t.length>1||n.name.trim().toLowerCase()!=="e2b")?r.cloudMachines_startOn_entry_label({name:n.name}):r.cloudMachines_startOn_label():n.name.trim().toLowerCase()===k(n.provider).toLowerCase()?k(n.provider):n.provider==="northflank"?r.cloudMachines_startOn_northflank_label({name:n.name}):n.provider==="agent37"?r.cloudMachines_startOn_agent37_label({name:n.name}):r.cloudMachines_startOn_vercel_label({name:n.name}),unavailableReason:n.state==="key-rejected"?Se(n.provider).keyRejected:null,needsProfile:!we(e,n)}))}function we(e,t){const o=oe.select(e),n=e.providerSettings?.profiles?.defaults??{},i={defaultRemoteLaunch:J.select(e),defaultRemoteIncompatibility:Z.select(e)},a=d=>o[d]!==!1&&(t.agentProviders.length===0||t.agentProviders.includes(d)),c=new Set([...t.agentProviders,...Object.keys(i.defaultRemoteLaunch??{})]);for(const d of c)if(a(d)&&(n[d]?.env.length??0)>0&&D(d,i))return!0;const l=e.providerSettings?.profiles?.items,_=l?p(l):[];return X.select(e).some(d=>{if(d.remoteCompatible!==!0||!a(d.baseProviderId))return!1;const P=_.find(b=>b.providerRef===d.providerRef);return!P||P.env.some(b=>b.kind==="set")})}function tr(e,t,o=e.cloudMachines?.providers[W]??null){if(!t)return null;const n=o,i=f(t);if(n&&n.agentProviders.length>0&&!n.agentProviders.includes(i))return r.cloudMachines_startOn_providerMissing();const a=e.providerSettings?.profiles;if(m(t)){const l=a?p(a.items).find(_=>_.providerRef===t):void 0;return l?l.remoteCompatible===!1?r.cloudMachines_startOn_needsProfile():l.env.some(_=>_.kind==="set")?null:r.cloudMachines_startOn_needsProfile():null}const c=a?.defaults?.[i];return c?c.remoteCompatible===!1?r.cloudMachines_startOn_needsProfile():c.env.some(l=>l.kind==="set")?null:r.cloudMachines_startOn_needsProfile():a?.loadStatus==="success"?r.cloudMachines_startOn_needsProfile():null}export{st as $,E as A,jt as B,x as C,wt as D,Ct as E,v as F,It as G,Ot as H,yt as I,Rt as J,xt as K,g as L,S as M,je as N,ct as O,Q as P,Wt as Q,zt as R,Yt as S,Xt as T,Ie as U,Jt as V,Vt as W,Zt as X,$t as Y,Qt as Z,oe as _,Et as a,re as a0,tt as a1,Ue as a2,A as a3,et as a4,Be as a5,$e as a6,Gt as a7,at as a8,Ne as a9,w as aA,Ze as aB,Qe as aC,nt as aD,Kt as aE,er as aF,St as aG,Te as aa,dt as ab,lt as ac,Ve as ad,We as ae,rt as af,ot as ag,He as ah,Fe as ai,Ye as aj,ze as ak,Je as al,Xe as am,ut as an,ht as ao,mt as ap,vt as aq,Mt as ar,ft as as,it as at,pt as au,_t as av,qe as aw,bt as ax,Ke as ay,Ge as az,Lt as b,At as c,Ht as d,Ft as e,Bt as f,tr as g,Se as h,Tt as i,Dt as j,gt as k,ve as l,D as m,ie as n,kt as o,le as p,ce as q,Pt as r,qt as s,te as t,Ut as u,Nt as v,_e as w,O as x,De as y,he as z};
@@ -1,4 +1,4 @@
1
- import{g as ie}from"./CRFyRwf-.js";import{s as re}from"./CRIoGx5T.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./DFNKkiho.js";import{c as Ee}from"./BvByaKKp.js";import{aR as _e}from"./D-j7vD5Z.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
1
+ import{g as ie}from"./DlbHdfKY.js";import{s as re}from"./edaGtK2z.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./Bex9L_jH.js";import{c as Ee}from"./DjyYYXwz.js";import{aR as _e}from"./CNKJ8_Xr.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Nt=B[n[n.length-2]][n[n.length-1]],n.push(Nt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{t as je,bo as v,bm as c,bw as Ze,b as Xe,br as lr,bs as bt,bq as Gr}from"./Fcr7AvC-.js";import{bs as Je,ay as H,be as ht,b$ as ct,b_ as D,bO as J,W as C,bS as h,aD as e,a7 as ut,bl as ke,bn as Ye,c9 as f,aA as w,aB as re,ca as Ue,c0 as It,bH as d,a5 as ie,bA as se,bV as W,br as Rt,bk as qr,bj as Hr,bf as zo,bo as Kr,c5 as pt,aw as or,bz as Wo,cd as Jt}from"./3SdAC2_C.js";import{i as be}from"./BhYXv0ZM.js";import{c as Y}from"./2z64ELW5.js";import{g as Pr,i as Go,e as Ct,I as qo}from"./CA6H1-bp.js";import{f as xt,s as Be,g as Ho}from"./BRCr02in.js";import{b as kt}from"./Dn334wJv.js";import{b as Er}from"./iNacp7Sr.js";import{k as Ko}from"./Cc0763mU.js";import{c as Dt}from"./ChTqQfQN.js";import{a as jo}from"./CC7to1B5.js";import{f as Oe}from"./Beq_QLuz.js";import{F as Zo}from"./BAtAwQ72.js";import{m as vt}from"./DkQdSPDN.js";import{t as Xo}from"./CWfjuhY2.js";import{cp as jr,F as ye,aZ as Jo,ar as Yo,cK as Qo,aM as en,a_ as nr,a0 as dr,a2 as ur,b1 as Zr,bb as tn,a8 as rn,aw as on,aC as Xr,cT as nn,ci as Jr,bS as Yr,cn as an}from"./ChHRVjww.js";import"./DRMe5Ypb.js";import{rV as sn,JH as Se,g0 as ln,bE as dn,Ac as un,zu as cn,LI as Fr,dV as fn,bY as gn,LH as vn,v1 as wn,LF as Sr,gI as pn,un as bn,LG as mn,Ll as Lr,LE as Rr}from"./D0qhIm1r.js";import"./CpK0xLH4.js";import{R as hn,g as Yt,h as mt,f as _n,e as Ke,l as Qr,d as eo,K as yn,i as xn,k as Cn,j as In,M as to,E as kn}from"./D7KhILhs.js";import{a as ro,B as $t}from"./B5aYN90J.js";import{bK as Pn}from"./DlnCrS3y.js";import{a5 as En,w as Fn,ah as Sn}from"./ByvcSsIj.js";import{m as Ln,z as Rn}from"./CH7HNVC2.js";import{I as Nt}from"./C3KgmGxd.js";import{d as $n}from"./CQ409-Pj.js";import{H as Tn,I as Un}from"./Bqd7fdCF.js";import{a as An,e as Bn,h as On,g as Nn,k as Mn,p as Dn,b as oo}from"./D4WPlvMg.js";import{e as Vn}from"./DJZIHUd7.js";import{i as ar}from"./CL3a4Hm1.js";import{i as zn,a as Wn}from"./u_H5ILVa.js";import{B as Gn}from"./jphlY6bT.js";import"./Cz3WzTlQ.js";import{l as ze}from"./C7b3vXLD.js";import{M as no}from"./D179JMBI.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{b as qn}from"./Ch9YoFhc.js";import"./O5ZlQHf9.js";import{t as Hn,b as Kn}from"./CXXVPWBH.js";import{T as jn}from"./B2-ooCTr.js";import{c as Zn,d as Xn}from"./Dbqo6rfT.js";import{o as $r,s as wt,n as Bt}from"./CIyUrgF0.js";import{g as Jn}from"./DWGXN6Nr.js";import{f as Yn}from"./OuI4JmWC.js";import{ay as Qn,$ as ea}from"./50HYkjWD.js";import{a_ as ta}from"./cD292w1o.js";import{i as ra}from"./DKwAaLwd.js";import{o as oa}from"./DdYVblGk.js";function na(o,t){return o.loadURL(t)}function aa(o){return{previousUrlProp:o||null}}function Tr(o,t){o.previousUrlProp=t}function ia(o,t,n){const g=n||t;return o.previousUrlProp===g?null:(o.previousUrlProp=g,g)}function sa(o,t,n){return t?o.previousUrlProp===null?(o.previousUrlProp=t,{shouldLoad:!1,targetUrl:null}):t===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:n.webviewReady?(o.previousUrlProp=t,n.isValidBrowserUrl(t)?{shouldLoad:!0,targetUrl:t}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const ao=Dt("TabBoundsReporter"),la=150;function Qt(o,t,n){!(t>0)||!(n>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:t,height:n}).catch(g=>{ao.debug("Failed to report tab bounds",{tabId:o,error:g})})}function Ur(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(t=>{ao.debug("Failed to clear tab bounds",{tabId:o,error:t})})}function io(o,t){let n=t,g;const m=typeof ResizeObserver>"u"?void 0:new ResizeObserver(P=>{if(!n)return;const b=P[P.length-1]?.contentRect;if(!b)return;const F=n;clearTimeout(g),g=setTimeout(()=>{Qt(F,b.width,b.height)},la)});if(m?.observe(o),n){const P=o.getBoundingClientRect();Qt(n,P.width,P.height)}return{update(P){if(P!==n&&(clearTimeout(g),n&&Ur(n),n=P,n)){const b=o.getBoundingClientRect();Qt(n,b.width,b.height)}},destroy(){clearTimeout(g),m?.disconnect(),n&&Ur(n)}}}function so(o){let t=o.trim();if(!t)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(t)||(t=(t.includes("localhost")||t.includes("127.0.0.1")||t.includes("0.0.0.0")?"http://":"https://")+t);try{return new URL(t),t}catch{return null}}function dt(o,t=typeof window<"u"?window.location.origin:""){return o==="about:blank"||lo(o,t)}function lo(o,t=typeof window<"u"?window.location.origin:""){if(!o)return!1;try{const n=new URL(o);return ro.NAVIGATION_ALLOWED.includes(n.protocol)&&n.origin!==t}catch{return!1}}const Mt=[{id:"iphone-se",name:"iPhone SE",category:"phone",width:375,height:667},{id:"iphone-15",name:"iPhone 15",category:"phone",width:393,height:852},{id:"pixel-8",name:"Pixel 8",category:"phone",width:412,height:915},{id:"ipad-mini",name:"iPad Mini",category:"tablet",width:768,height:1024},{id:"ipad-pro-11",name:"iPad Pro 11″",category:"tablet",width:834,height:1194},{id:"desktop-1280x800",name:"1280 × 800",category:"desktop",width:1280,height:800},{id:"desktop-1440x900",name:"1440 × 900",category:"desktop",width:1440,height:900}];function da(o){return{...o,width:o.height,height:o.width}}var ua=re('<span class="min-w-0 flex-1 truncate"> </span> <span class="type-caption ml-3 text-muted-foreground"> </span>',1),er=re("<!> <!> <!>",1),ca=re('<span class="min-w-0 flex-1"> </span> <span class="type-caption text-muted-foreground"> </span>',1),tr=re("<!> <!>",1);function cr(o,t){if(new.target)return je({component:cr,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=v(t,"onCustom",7);const P=["phone","tablet","desktop"],b=f(()=>n().mode==="fit"?"fit":n().mode==="preset"?n().presetId:"custom");function F(u){if(u==="fit")return g()({mode:"fit"});const k=Mt.find(O=>O.id===u);k&&g()({mode:"preset",presetId:k.id,width:k.width,height:k.height})}var A={get viewport(){return n()},set viewport(u){n(u),w()},get onViewportChange(){return g()},set onViewportChange(u){g(u),w()},get onCustom(){return m()},set onCustom(u){m(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)},S=er(),s=H(S);Y(s,()=>hn,(u,k)=>{k(u,{get value(){return e(b)},onValueChange:F,children:(O,x)=>{var I=er(),R=H(I);Y(R,()=>Yt,(G,K)=>{K(G,{value:"fit",children:(oe,te)=>{ht();var X=ct();D(le=>J(X,le),[()=>c.browser_viewport_fitPanel_label()]),C(oe,X)},$$slots:{default:!0}})});var T=h(R,2);Pr(T,17,()=>P,Go,(G,K)=>{var oe=er(),te=H(oe);Y(te,()=>mt,(B,ae)=>{ae(B,{})});var X=h(te,2);Y(X,()=>_n,(B,ae)=>{ae(B,{children:(a,l)=>{ht();var j=ct();D(ue=>J(j,ue),[()=>e(K)==="phone"?c.browser_viewport_phoneGroup_label():e(K)==="tablet"?c.browser_viewport_tabletGroup_label():c.browser_viewport_desktopGroup_label()]),C(a,j)},$$slots:{default:!0}})});var le=h(X,2);Pr(le,17,()=>Mt.filter(B=>B.category===e(K)),B=>B.id,(B,ae)=>{var a=ut(),l=H(a);Y(l,()=>Yt,(j,ue)=>{ue(j,{get value(){return e(ae).id},children:(Ie,he)=>{var M=ua(),_=H(M),Z=ke(_,!0),V=h(_,2),z=ke(V,!0);D(y=>{J(Z,e(ae).name),J(z,y)},[()=>c.browser_viewport_dimensions_label({width:ze(e(ae).width),height:ze(e(ae).height)})]),C(Ie,M)},$$slots:{default:!0}})}),C(B,a)}),C(G,oe)});var ee=h(T,2);{var ge=G=>{var K=tr(),oe=H(K);Y(oe,()=>mt,(X,le)=>{le(X,{})});var te=h(oe,2);Y(te,()=>Yt,(X,le)=>{le(X,{value:"custom",get onSelect(){return m()},children:(B,ae)=>{var a=ca(),l=H(a),j=ke(l,!0),ue=h(l,2),Ie=ke(ue,!0);D((he,M)=>{J(j,he),J(Ie,M)},[()=>c.browser_viewport_custom_label(),()=>c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})]),C(B,a)},$$slots:{default:!0}})}),C(G,K)};be(ee,G=>{n().mode==="custom"&&G(ge)})}C(O,I)},$$slots:{default:!0}})});var L=h(s,2);{var Q=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);Y(x,()=>Ke,(I,R)=>{R(I,{get onSelect(){return m()},children:(T,ee)=>{ht();var ge=ct();D(G=>J(ge,G),[()=>c.browser_viewport_custom_label()]),C(T,ge)},$$slots:{default:!0}})}),C(u,k)};be(L,u=>{n().mode!=="custom"&&u(Q)})}var U=h(L,2);{var $=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);{let I=f(()=>c.browser_viewport_rotate_label());Y(x,()=>no,(R,T)=>{T(R,{get icon(){return jr},get label(){return e(I)},onSelect:()=>g()(da(n()))})})}C(u,k)};be(U,u=>{n().mode!=="fit"&&u($)})}return C(o,S),Ye(A)}var fa=re('<div class="grid grid-cols-2 gap-3"><label class="space-y-1 type-caption"><span> </span> <!></label> <label class="space-y-1 type-caption"><span> </span> <!></label></div>');function fr(o,t){if(new.target)return je({component:fr,...o});Je(t,!0);let n=v(t,"open",15,!1),g=v(t,"viewport",7),m=v(t,"onViewportChange",7),P=v(t,"returnFocus",7);const b=320,F=3840;let A=W(1280),S=W(800),s=W(null);function L(u){return typeof u=="number"&&Number.isInteger(u)&&u>=b&&u<=F}const Q=f(()=>L(e(A))&&L(e(S)));Ue(()=>{if(n())return()=>{It().then(()=>{P()?.isConnected&&P().focus()})}}),Ue(()=>{n()||(d(A,g().mode==="fit"?1280:g().width,!0),d(S,g().mode==="fit"?800:g().height,!0))});function U(){!e(Q)||e(A)===null||e(S)===null||(m()({mode:"custom",width:e(A),height:e(S)}),n(!1))}var $={get open(){return n()},set open(u=!1){n(u),w()},get viewport(){return g()},set viewport(u){g(u),w()},get onViewportChange(){return m()},set onViewportChange(u){m(u),w()},get returnFocus(){return P()},set returnFocus(u){P(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)};{let u=f(()=>c.browser_viewport_custom_label()),k=f(()=>c.browser_viewport_sizeRange_description({min:ze(b),max:ze(F)})),O=f(()=>c.browser_viewport_apply_label());qn(o,{get title(){return e(u)},get description(){return e(k)},get submitLabel(){return e(O)},get canSubmit(){return e(Q)},onSubmit:U,get initialFocus(){return e(s)},get open(){return n()},set open(x){n(x)},children:(x,I)=>{var R=fa(),T=ie(R),ee=ie(T),ge=ke(ee,!0),G=h(ee,2);{let le=f(()=>!L(e(A)));Nt(G,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(A)},set value(B){d(A,B,!0)},get ref(){return e(s)},set ref(B){d(s,B,!0)}})}se(T);var K=h(T,2),oe=ie(K),te=ke(oe,!0),X=h(oe,2);{let le=f(()=>!L(e(S)));Nt(X,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(S)},set value(B){d(S,B,!0)}})}se(K),se(R),D((le,B)=>{J(ge,le),J(te,B)},[()=>c.browser_viewport_width_label(),()=>c.browser_viewport_height_label()]),C(x,R)},$$slots:{default:!0}})}return Ye($)}var Ot=re("<!> <!>",1),ot=re("<!> ",1),ga=re('<!> <span class="min-w-0 flex-1 truncate"> </span>',1),va=re("<!> <!> <!> <!> <!>",1),wa=re('<!> <span class="min-w-0 flex-1"> </span> <kbd class="type-caption ml-5 text-muted-foreground" aria-hidden="true">⌘⌥I</kbd>',1),pa=re("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function uo(o,t){if(new.target)return je({component:uo,...o});Je(t,!0);let n=v(t,"errorCount",7,0),g=v(t,"disabled",7,!1),m=v(t,"collapsed",7,!1),P=v(t,"canGoBack",7,!1),b=v(t,"canGoForward",7,!1),F=v(t,"canSelectElement",7,!1),A=v(t,"selectingElement",7,!1),S=v(t,"viewport",23,()=>({mode:"fit"})),s=v(t,"onGoBack",7),L=v(t,"onGoForward",7),Q=v(t,"onToggleElementPicker",7),U=v(t,"onViewportChange",7),$=v(t,"onOpenExternal",7),u=v(t,"onFullScreen",7),k=v(t,"onCopyUrl",7),O=v(t,"onScreenshot",7),x=v(t,"onOpenConsole",7),I=v(t,"onOpenSource",7),R=v(t,"onOpenInspector",7),T=v(t,"onReloadWithoutCache",7);const ee=f(()=>n()>0?c.browser_overflow_triggerWithErrors_ariaLabel({count:ze(n())}):c.browser_overflow_trigger_ariaLabel()),ge=f(()=>S().mode==="preset"?Mt.find(l=>l.id===S().presetId):void 0),G=f(()=>S().mode==="fit"?c.browser_viewport_fitPanel_label():e(ge)?.name??c.browser_viewport_dimensions_label({width:ze(S().width),height:ze(S().height)}));let K=W(!1),oe=W(null),te=W(!1);async function X(){d(te,!1),await It(),d(K,!0)}var le={get errorCount(){return n()},set errorCount(l=0){n(l),w()},get disabled(){return g()},set disabled(l=!1){g(l),w()},get collapsed(){return m()},set collapsed(l=!1){m(l),w()},get canGoBack(){return P()},set canGoBack(l=!1){P(l),w()},get canGoForward(){return b()},set canGoForward(l=!1){b(l),w()},get canSelectElement(){return F()},set canSelectElement(l=!1){F(l),w()},get selectingElement(){return A()},set selectingElement(l=!1){A(l),w()},get viewport(){return S()},set viewport(l={mode:"fit"}){S(l),w()},get onGoBack(){return s()},set onGoBack(l){s(l),w()},get onGoForward(){return L()},set onGoForward(l){L(l),w()},get onToggleElementPicker(){return Q()},set onToggleElementPicker(l){Q(l),w()},get onViewportChange(){return U()},set onViewportChange(l){U(l),w()},get onOpenExternal(){return $()},set onOpenExternal(l){$(l),w()},get onFullScreen(){return u()},set onFullScreen(l){u(l),w()},get onCopyUrl(){return k()},set onCopyUrl(l){k(l),w()},get onScreenshot(){return O()},set onScreenshot(l){O(l),w()},get onOpenConsole(){return x()},set onOpenConsole(l){x(l),w()},get onOpenSource(){return I()},set onOpenSource(l){I(l),w()},get onOpenInspector(){return R()},set onOpenInspector(l){R(l),w()},get onReloadWithoutCache(){return T()},set onReloadWithoutCache(l){T(l),w()},$set:Ze,$on:(l,j)=>Xe(t,l,j)},B=Ot(),ae=H(B);Y(ae,()=>to,(l,j)=>{j(l,{get open(){return e(te)},set open(ue){d(te,ue,!0)},children:(ue,Ie)=>{var he=Ot(),M=H(he);{const Z=(V,z)=>{let y=()=>(z?.()).props;{let q=f(()=>c.browser_overflow_trigger_tooltip());Oe(V,lr(y,{variant:"ghost-light",size:"icon-xs",class:"relative",get disabled(){return g()},get tooltip(){return e(q)},tooltipSide:"bottom",get"aria-label"(){return e(ee)},"data-testid":"browser-overflow-trigger",get ref(){return e(oe)},set ref(E){d(oe,E,!0)},children:(E,Pe)=>{var fe=Ot(),Qe=H(fe);yn(Qe,{class:"size-3.5"});var nt=h(Qe,2);{var We=Fe=>{Gn(Fe,{variant:"destructive",class:"absolute -right-1.5 -top-1.5 h-4 min-w-4 px-1 text-xs leading-none","data-testid":"browser-console-error-badge",children:(Ge,at)=>{ht();var it=ct();D(Me=>J(it,Me),[()=>n()>9?"9+":ze(n())]),C(Ge,it)},$$slots:{default:!0}})};be(nt,Fe=>{n()>0&&Fe(We)})}C(E,fe)},$$slots:{default:!0}}))}};Y(M,()=>Qr,(V,z)=>{z(V,{child:Z,$$slots:{child:!0}})})}var _=h(M,2);Y(_,()=>eo,(Z,V)=>{V(Z,{align:"end",class:"w-56",onCloseAutoFocus:z=>e(K)&&z.preventDefault(),children:(z,y)=>{var q=pa(),E=H(q);{var Pe=ve=>{var we=va(),Ee=H(we);{let ce=f(()=>!P());Y(Ee,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return s()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return dr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goBack_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var Re=h(Ee,2);{let ce=f(()=>!b());Y(Re,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return L()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return ur},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goForward_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var pe=h(Re,2);{let ce=f(()=>!F());Y(pe,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},onSelect:()=>void Q()?.(),children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>A()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var me=h(pe,2);Y(me,()=>xn,(ce,xe)=>{xe(ce,{children:(De,Ne)=>{var st=Ot(),Ce=H(st);{let et=f(()=>!U());Y(Ce,()=>Cn,(Ve,ft)=>{ft(Ve,{get disabled(){return e(et)},children:(St,gt)=>{var Pt=ga(),Et=H(Pt);ye(Et,{get icon(){return Zr},size:"xs",class:"w-4 text-muted-foreground"});var Ft=h(Et,2),Ut=ke(Ft,!0);D(Lt=>J(Ut,Lt),[()=>c.browser_viewport_trigger_ariaLabel({mode:e(G)})]),C(St,Pt)},$$slots:{default:!0}})})}var He=h(Ce,2);Y(He,()=>In,(et,Ve)=>{Ve(et,{class:"w-64",children:(ft,St)=>{cr(ft,{get viewport(){return S()},onViewportChange:gt=>U()?.(gt),onCustom:X})},$$slots:{default:!0}})}),C(De,st)},$$slots:{default:!0}})});var Ae=h(me,2);Y(Ae,()=>mt,(ce,xe)=>{xe(ce,{})}),C(ve,we)};be(E,ve=>{m()&&ve(Pe)})}var fe=h(E,2);{var Qe=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>u()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return tn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_fullScreen_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)},nt=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>void $()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return rn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_openExternal_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)};be(fe,ve=>{u()?ve(Qe):$()&&ve(nt,1)})}var We=h(fe,2);Y(We,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void k()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Jo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_copyUrl_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Fe=h(We,2);Y(Fe,()=>mt,(ve,we)=>{we(ve,{})});var Ge=h(Fe,2);Y(Ge,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void O()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Yo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_screenshot_label()]),C(Ee,pe)},$$slots:{default:!0}})});var at=h(Ge,2);Y(at,()=>mt,(ve,we)=>{we(ve,{})});var it=h(at,2);Y(it,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void x()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Qo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_console_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Me=h(it,2);Y(Me,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void I()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return en},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_source_label()]),C(Ee,pe)},$$slots:{default:!0}})});var qe=h(Me,2);Y(qe,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void R()(),children:(Ee,Re)=>{var pe=wa(),me=H(pe);ye(me,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me,2),ce=ke(Ae,!0);ht(2),D(xe=>J(ce,xe),[()=>c.browser_overflow_inspector_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Le=h(qe,2);Y(Le,()=>mt,(ve,we)=>{we(ve,{})});var _t=h(Le,2);Y(_t,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void T()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return jr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_reloadWithoutCache_label()]),C(Ee,pe)},$$slots:{default:!0}})}),C(z,q)},$$slots:{default:!0}})}),C(ue,he)},$$slots:{default:!0}})});var a=h(ae,2);return fr(a,{get viewport(){return S()},onViewportChange:l=>U()?.(l),get returnFocus(){return e(oe)},get open(){return e(K)},set open(l){d(K,l,!0)}}),C(o,B),Ye(le)}var ba=re('<span class="truncate"> </span> <!>',1),Ar=re("<!> <!>",1);function co(o,t){if(new.target)return je({component:co,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=W(!1),P=W(!1),b=W(null);const F=f(()=>n().mode==="preset"?Mt.find(k=>k.id===n().presetId):void 0),A=f(()=>n().mode==="fit"?"":c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})),S=f(()=>n().mode==="fit"?c.browser_viewport_fit_short_label():n().mode==="preset"&&e(F)?e(F).name:e(A)),s=f(()=>n().mode==="fit"?c.browser_viewport_fitPanel_label():e(S));async function L(){d(m,!1),await It(),d(P,!0)}var Q={get viewport(){return n()},set viewport(k){n(k),w()},get onViewportChange(){return g()},set onViewportChange(k){g(k),w()},$set:Ze,$on:(k,O)=>Xe(t,k,O)},U=Ar(),$=H(U);Y($,()=>to,(k,O)=>{O(k,{get open(){return e(m)},set open(x){d(m,x,!0)},children:(x,I)=>{var R=Ar(),T=H(R);{const ge=(G,K)=>{let oe=()=>(K?.()).props;{let te=f(()=>c.browser_viewport_trigger_ariaLabel({mode:e(s)}));Oe(G,lr(oe,{variant:"ghost-light",size:"xs",class:"h-6 max-w-36 gap-1 rounded-full bg-muted px-2 text-xs hover:bg-muted/80",get"aria-label"(){return e(te)},"data-testid":"browser-viewport-trigger",get ref(){return e(b)},set ref(X){d(b,X,!0)},children:(X,le)=>{var B=ba(),ae=H(B),a=ke(ae,!0),l=h(ae,2);ye(l,{get icon(){return on},size:"xs",class:"shrink-0"}),D(()=>J(a,e(S))),C(X,B)},$$slots:{default:!0}}))}};Y(T,()=>Qr,(G,K)=>{K(G,{child:ge,$$slots:{child:!0}})})}var ee=h(T,2);Y(ee,()=>eo,(ge,G)=>{G(ge,{align:"end",class:"w-64",onCloseAutoFocus:K=>e(P)&&K.preventDefault(),children:(K,oe)=>{cr(K,{get viewport(){return n()},get onViewportChange(){return g()},onCustom:L})},$$slots:{default:!0}})}),C(x,R)},$$slots:{default:!0}})});var u=h($,2);return fr(u,{get viewport(){return n()},get onViewportChange(){return g()},get returnFocus(){return e(b)},get open(){return e(P)},set open(k){d(P,k,!0)}}),C(o,U),Ye(Q)}var ma=re('<span data-browser-viewport-readout=""> </span> <!>',1),ha=re('<div data-browser-device-frame-container=""><div><div><!> <!></div> <!></div></div>');function fo(o,t){if(new.target)return je({component:fo,...o});Je(t,!0);const n=320,g=3840,m=150,P=24;let b=v(t,"viewport",7),F=v(t,"onViewportChange",7),A=v(t,"chromeOutside",7,!1),S=v(t,"children",7),s=W(Rt(b().mode==="fit"?n:b().width)),L=W(Rt(b().mode==="fit"?n:b().height)),Q,U=W(0),$=W(0),u=W(!1),k=null,O=0,x=0,I=0,R=0,T;const ee=f(()=>b().mode==="fit"),ge=f(()=>c.browser_viewport_dimensions_label({width:ze(e(s)),height:ze(e(L))})),G=f(()=>A()?Math.max(0,e($)-P):e($)),K=f(()=>!e(ee)&&e(U)>0&&e(G)>0?Math.min(1,e(U)/e(s),e(G)/e(L)):1),oe=f(()=>e(s)*e(K)),te=f(()=>e(L)*e(K));Ue(()=>{e(u)||b().mode==="fit"||(d(s,b().width,!0),d(L,b().height,!0))});function X(y){return Math.min(g,Math.max(n,Math.round(y)))}function le(){F()({mode:"custom",width:e(s),height:e(L)})}function B(){clearTimeout(T),T=setTimeout(le,m)}function ae(y){e(ee)||y.button!==0||(y.preventDefault(),d(u,!0),k=y.pointerId,O=y.clientX,x=y.clientY,I=e(s),R=e(L),y.currentTarget instanceof HTMLElement&&y.currentTarget.setPointerCapture?.(y.pointerId))}function a(y){!e(u)||y.pointerId!==k||(d(s,X(I+y.clientX-O),!0),d(L,X(R+y.clientY-x),!0),B())}function l(y){if(!e(u)||y.pointerId!==k)return;clearTimeout(T),d(u,!1),k=null;const q=y.currentTarget;q instanceof HTMLElement&&q.hasPointerCapture?.(y.pointerId)&&q.releasePointerCapture&&q.releasePointerCapture(y.pointerId),le()}qr(()=>{const y=(E,Pe)=>{d(U,E,!0),d($,Pe,!0)};y(Q.clientWidth,Q.clientHeight);const q=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([E])=>{y(E?.contentRect.width??Q.clientWidth,E?.contentRect.height??Q.clientHeight)});return q?.observe(Q),()=>q?.disconnect()}),Hr(()=>clearTimeout(T));var j={get viewport(){return b()},set viewport(y){b(y),w()},get onViewportChange(){return F()},set onViewportChange(y){F(y),w()},get chromeOutside(){return A()},set chromeOutside(y=!1){A(y),w()},get children(){return S()},set children(y){S(y),w()},$set:Ze,$on:(y,q)=>Xe(t,y,q)},ue=ha();{const y=E=>{var Pe=ma(),fe=H(Pe),Qe=ke(fe,!0),nt=h(fe,2);{let We=f(()=>A()?"top-full":"bottom-0"),Fe=f(()=>c.browser_viewport_resizeHandle_ariaLabel());Oe(nt,{type:"button",variant:"ghost",size:"icon-xs",iconOnly:!0,get class(){return`absolute right-0 z-20 size-5 cursor-nwse-resize touch-none border-0 bg-transparent p-0 after:absolute after:bottom-1 after:right-1 after:size-2 after:border-b-2 after:border-r-2 after:border-muted-foreground ${e(We)??""}`},get"aria-label"(){return e(Fe)},"data-testid":"browser-device-resize-handle",onpointerdown:ae,onpointermove:a,onpointerup:l,onpointercancel:l})}D(()=>{xt(fe,1,`pointer-events-none absolute left-1/2 z-10 -translate-x-1/2 rounded bg-background/90 px-1.5 py-0.5 text-xs text-muted-foreground shadow-sm backdrop-blur ${A()?"top-full mt-0.5":"bottom-1"}`),J(Qe,e(ge))}),C(E,Pe)};var Ie=ie(ue),he=ie(Ie);let q;var M=ie(he);Xo(M,()=>S()??zo);var _=h(M,2);{var Z=E=>{y(E)};be(_,E=>{!e(ee)&&!A()&&E(Z)})}se(he);var V=h(he,2);{var z=E=>{y(E)};be(V,E=>{!e(ee)&&A()&&E(z)})}se(Ie),se(ue),kt(ue,E=>Q=E,()=>Q),D(()=>{xt(Ie,1,`relative ${e(ee)?"h-full w-full":""} ${A()&&!e(ee)?"mb-6":""}`),xt(he,1,`relative overflow-hidden bg-background ${e(ee)?"h-full w-full":e(u)?"ring-2 ring-primary/30":""}`),Be(he,"data-browser-device-frame",e(ee)?void 0:""),Be(he,"data-width",e(ee)?void 0:e(s)),Be(he,"data-height",e(ee)?void 0:e(L)),q=Ho(he,"",q,{width:e(ee)?void 0:`${e(oe)}px`,height:e(ee)?void 0:`${e(te)}px`})})}return D(()=>xt(ue,1,`flex h-full w-full items-center justify-center overflow-hidden ${e(ee)?"bg-background":"bg-muted/40"}`)),C(o,ue),Ye(j)}const rr=Dt("BrowserViewSlot"),Br=()=>new Promise(o=>requestAnimationFrame(()=>o())),Or=async()=>{await Br(),await Br()};function Nr(o,t){return o===t?!0:!o||!t?!1:o.x===t.x&&o.y===t.y&&o.width===t.width&&o.height===t.height}function Mr(o){const t=o.getBoundingClientRect();return t.width<=0||t.height<=0?null:{x:t.left,y:t.top,width:t.width,height:t.height}}function _a(o){return o.isConnected?typeof o.checkVisibility=="function"?o.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):!0:!1}function ya(o,t){let n=Dr(o,t),g=`${t.workspaceId}\0${t.tabId}`;return{update(m){const P=`${m.workspaceId}\0${m.tabId}`;if(P===g){n.update(m);return}n.destroy(),g=P,n=Dr(o,m)},destroy(){n.destroy()}}}function Dr(o,t){let n=t;const g=An(o,{tabId:n.tabId,workspaceId:n.workspaceId,url:n.url,...n.pinned===void 0?{}:{pinned:n.pinned}});n.onWebview?.(g.webview);let m=null,P=Promise.resolve(),b="live",F=0,A=null,S=null,s=!1;const L=()=>{A?.remove(),A=null},Q=x=>{m=x;const I=n.tabId;return P=On(I,x.rect,x.visible).catch(R=>rr.debug("Could not place the browser page",{tabId:I,error:R})),P},U=()=>{if(S=null,s)return;const x=Mr(o),I=n.visible&&x!==null&&_a(o)&&b!=="frozen"&&g.ready;g.ready&&(!m||m.visible!==I||x&&!Nr(m.rect,x))&&(Nr(m?.rect??null,x)||Kn(),Q({rect:x??m?.rect??null,visible:I})),S=requestAnimationFrame(U)};S=requestAnimationFrame(U);const $=async x=>{if(b="freezing",g.ready&&m?.visible)try{const I=await g.webview.capturePage?.();if(x!==F||s)return;const R=I?.toDataURL()??"";if(R){const T=document.createElement("img");if(T.alt="",T.setAttribute("aria-hidden","true"),T.dataset.browserViewSnapshot="",T.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",T.src=R,await T.decode().catch(()=>{}),x!==F||s||(L(),o.append(T),A=T,await Or(),x!==F||s))return}}catch(I){rr.debug("Could not snapshot the browser page",{tabId:n.tabId,error:I})}x!==F||s||(b="frozen")},u=async x=>{if(b="thawing",g.ready&&n.visible){const I=Mr(o);I&&await Q({rect:I,visible:!0}),await Or()}x!==F||s||(L(),b="live")},k=Hn({element:o,onCoveredChange(x){const I=++F;x?$(I):u(I)}});return{update(x){n=x},destroy:()=>{const x=n.tabId;s=!0,S!==null&&cancelAnimationFrame(S),S=null,k(),L(),g.dispose(),n.onWebview?.(null),P.then(()=>Bn(x).catch(I=>rr.debug("Could not take the browser page off screen",{tabId:x,error:I})))}}}var xa=re('<div class="relative h-full w-full overflow-hidden"></div>');function go(o,t){if(new.target)return je({component:go,...o});Je(t,!0);let n=v(t,"tabId",7),g=v(t,"workspaceId",7),m=v(t,"url",7),P=v(t,"pinned",7),b=v(t,"visible",7),F=v(t,"webview",15,null);var A={get tabId(){return n()},set tabId(s){n(s),w()},get workspaceId(){return g()},set workspaceId(s){g(s),w()},get url(){return m()},set url(s){m(s),w()},get pinned(){return P()},set pinned(s){P(s),w()},get visible(){return b()},set visible(s){b(s),w()},get webview(){return F()},set webview(s=null){F(s),w()},$set:Ze,$on:(s,L)=>Xe(t,s,L)},S=xa();return Ct(S,(s,L)=>ya?.(s,L),()=>({tabId:n(),workspaceId:g(),url:m(),...P()===void 0?{}:{pinned:P()},visible:b(),onWebview:s=>F(s)})),Ct(S,(s,L)=>io?.(s,L),n),D(()=>Be(S,"data-browser-view-slot",n())),C(o,S),Ye(A)}function vo(o,t){if(new.target)return je({component:vo,...o});Je(t,!0);let n=v(t,"active",7),g=v(t,"disabled",7),m=v(t,"onToggle",7);var P={get active(){return n()},set active(b){n(b),w()},get disabled(){return g()},set disabled(b){g(b),w()},get onToggle(){return m()},set onToggle(b){m(b),w()},$set:Ze,$on:(b,F)=>Xe(t,b,F)};{let b=f(()=>n()?"bg-muted text-foreground":""),F=f(()=>n()?c.browser_embedded_cancelElementSelection_tooltip():c.browser_embedded_selectElement_tooltip()),A=f(()=>n()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel());Oe(o,{variant:"ghost-light",size:"icon-xs",get class(){return e(b)},get onclick(){return m()},get disabled(){return g()},get tooltip(){return e(F)},tooltipSide:"bottom",get"aria-label"(){return e(A)},get"aria-pressed"(){return n()},"data-testid":"browser-select-element",children:(S,s)=>{ye(S,{get icon(){return nr},size:"xs"})},$$slots:{default:!0}})}return Ye(P)}var Ca=re('<span class="sr-only"> </span>'),Ia=re('<p class="min-h-0 overflow-y-auto text-sm text-foreground [overflow-wrap:anywhere]"> </p> <!>',1),ka=re("<!> <!>",1),Pa=re('<span class="inline-flex shrink-0"><!> <!></span>');function gr(o,t){const n=Kr();if(new.target)return je({component:gr,...o});Je(t,!0);let g=v(t,"label",7),m=v(t,"description",7),P=v(t,"ariaLabel",23,g),b=v(t,"tone",7,"info"),F=v(t,"actionLabel",7),A=v(t,"onAction",7),S=v(t,"actionFocusTarget",7),s=v(t,"descriptionId",7),L=W(!1),Q=!1;async function U(){Q=!0,d(L,!1),await It(),S()?.focus(),A()?.()}var $={get label(){return g()},set label(I){g(I),w()},get description(){return m()},set description(I){m(I),w()},get ariaLabel(){return P()},set ariaLabel(I=g){P(I),w()},get tone(){return b()},set tone(I="info"){b(I),w()},get actionLabel(){return F()},set actionLabel(I){F(I),w()},get onAction(){return A()},set onAction(I){A(I),w()},get actionFocusTarget(){return S()},set actionFocusTarget(I){S(I),w()},get descriptionId(){return s()},set descriptionId(I){s(I),w()},$set:Ze,$on:(I,R)=>Xe(t,I,R)},u=Pa(),k=ie(u);{var O=I=>{var R=Ca(),T=ke(R,!0);D(()=>{Be(R,"id",n),Be(R,"role",b()==="error"?"alert":"status"),J(T,m())}),C(I,R)};be(k,I=>{s()||I(O)})}var x=h(k,2);return Y(x,()=>Xn,(I,R)=>{R(I,{get open(){return e(L)},set open(T){d(L,T,!0)},children:(T,ee)=>{var ge=ka(),G=H(ge);{const oe=(te,X)=>{let le=()=>(X?.()).props;{let B=f(()=>b()==="error"?"text-danger":b()==="warning"?"text-warning-ink":"text-muted-foreground"),ae=f(()=>s()??n);Oe(te,lr(le,{variant:"ghost-light",size:"icon-compact",wrapContent:!1,get class(){return e(B)},get"aria-label"(){return P()},get"aria-describedby"(){return e(ae)},get tooltip(){return m()},get tooltipDisabled(){return e(L)},tooltipSide:"bottom",tooltipDelayDuration:300,children:(a,l)=>{{let j=f(()=>b()==="error"?Xr:b()==="warning"?nn:Zr);ye(a,{get icon(){return e(j)},size:"xs",class:"shrink-0"})}},$$slots:{default:!0}}))}};Y(G,()=>jn,(te,X)=>{X(te,{child:oe,$$slots:{child:!0}})})}var K=h(G,2);Y(K,()=>Zn,(oe,te)=>{te(oe,{align:"end",class:"flex max-h-[var(--bits-popover-content-available-height,calc(100dvh-1rem))] w-72 max-w-[calc(100vw-1rem)] flex-col gap-3 p-3",get"aria-label"(){return P()},onCloseAutoFocus:X=>{Q&&S()&&(X.preventDefault(),S().focus()),Q=!1},children:(X,le)=>{var B=Ia(),ae=H(B),a=ke(ae,!0),l=h(ae,2);{var j=ue=>{Oe(ue,{variant:"secondary",size:"sm",class:"self-start",onclick:()=>void U(),children:(Ie,he)=>{ht();var M=ct();D(()=>J(M,F())),C(Ie,M)},$$slots:{default:!0}})};be(l,ue=>{F()&&A()&&ue(j)})}D(()=>J(a,m())),C(X,B)},$$slots:{default:!0}})}),C(T,ge)},$$slots:{default:!0}})}),se(u),D(()=>Be(u,"data-browser-status",b())),C(o,u),Ye($)}function Ea(o,t,n){const g=n.width>0?t.width/n.width:1,m=n.height>0?t.height/n.height:1,P=Math.max(0,Math.floor(o.x*g)),b=Math.max(0,Math.floor(o.y*m)),F=Math.min(t.width,Math.ceil((o.x+o.width)*g)),A=Math.min(t.height,Math.ceil((o.y+o.height)*m));return{x:P,y:b,width:Math.max(0,F-P),height:Math.max(0,A-b)}}const Fa=$r({selector:wt().min(1),domPath:wt().min(1),tagName:wt().min(1),id:wt(),className:wt(),textSnippet:wt().max(120),rect:$r({x:Bt().finite(),y:Bt().finite(),width:Bt().finite().nonnegative(),height:Bt().finite().nonnegative()}).strict(),pageUrl:wt().min(1),sourceRef:wt().min(1).optional()}).strict(),Vr="__INTENT_ELEMENT_PICKED__:";function Sa(o){if(o==="__INTENT_ELEMENT_PICK_CANCELLED__")return{type:"cancelled"};if(!o.startsWith(Vr))return null;let t;try{t=JSON.parse(o.slice(Vr.length))}catch{t=null}const n=Fa.safeParse(t);return n.success?{type:"picked",element:n.data}:{type:"malformed",issues:n.error.issues}}const La=String.raw`
1
+ import{t as je,bo as v,bm as c,bw as Ze,b as Xe,br as lr,bs as bt,bq as Gr}from"./Fcr7AvC-.js";import{bs as Je,ay as H,be as ht,b$ as ct,b_ as D,bO as J,W as C,bS as h,aD as e,a7 as ut,bl as ke,bn as Ye,c9 as f,aA as w,aB as re,ca as Ue,c0 as It,bH as d,a5 as ie,bA as se,bV as W,br as Rt,bk as qr,bj as Hr,bf as zo,bo as Kr,c5 as pt,aw as or,bz as Wo,cd as Jt}from"./3SdAC2_C.js";import{i as be}from"./BhYXv0ZM.js";import{c as Y}from"./2z64ELW5.js";import{g as Pr,i as Go,e as Ct,I as qo}from"./CA6H1-bp.js";import{f as xt,s as Be,g as Ho}from"./BRCr02in.js";import{b as kt}from"./Dn334wJv.js";import{b as Er}from"./iNacp7Sr.js";import{k as Ko}from"./Cc0763mU.js";import{c as Dt}from"./ChTqQfQN.js";import{a as jo}from"./CC7to1B5.js";import{f as Oe}from"./Beq_QLuz.js";import{F as Zo}from"./BAtAwQ72.js";import{m as vt}from"./DkQdSPDN.js";import{t as Xo}from"./CWfjuhY2.js";import{cp as jr,F as ye,aZ as Jo,ar as Yo,cK as Qo,aM as en,a_ as nr,a0 as dr,a2 as ur,b1 as Zr,bb as tn,a8 as rn,aw as on,aC as Xr,cT as nn,ci as Jr,bS as Yr,cn as an}from"./ChHRVjww.js";import"./DRMe5Ypb.js";import{rV as sn,JH as Se,g0 as ln,bE as dn,Ac as un,zu as cn,LI as Fr,dV as fn,bY as gn,LH as vn,v1 as wn,LF as Sr,gI as pn,un as bn,LG as mn,Ll as Lr,LE as Rr}from"./D0qhIm1r.js";import"./CpK0xLH4.js";import{R as hn,g as Yt,h as mt,f as _n,e as Ke,l as Qr,d as eo,K as yn,i as xn,k as Cn,j as In,M as to,E as kn}from"./D7KhILhs.js";import{a as ro,B as $t}from"./B5aYN90J.js";import{bK as Pn}from"./B3ZeLze4.js";import{a5 as En,w as Fn,ah as Sn}from"./2bueaerM.js";import{m as Ln,z as Rn}from"./CH7HNVC2.js";import{I as Nt}from"./C3KgmGxd.js";import{d as $n}from"./CQ409-Pj.js";import{H as Tn,I as Un}from"./Bqd7fdCF.js";import{a as An,e as Bn,h as On,g as Nn,k as Mn,p as Dn,b as oo}from"./D4WPlvMg.js";import{e as Vn}from"./DJZIHUd7.js";import{i as ar}from"./CL3a4Hm1.js";import{i as zn,a as Wn}from"./u_H5ILVa.js";import{B as Gn}from"./jphlY6bT.js";import"./Cz3WzTlQ.js";import{l as ze}from"./C7b3vXLD.js";import{M as no}from"./D179JMBI.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{b as qn}from"./Ch9YoFhc.js";import"./O5ZlQHf9.js";import{t as Hn,b as Kn}from"./CXXVPWBH.js";import{T as jn}from"./B2-ooCTr.js";import{c as Zn,d as Xn}from"./Dbqo6rfT.js";import{o as $r,s as wt,n as Bt}from"./CIyUrgF0.js";import{g as Jn}from"./DWGXN6Nr.js";import{f as Yn}from"./B5V_Igzh.js";import{ay as Qn,$ as ea}from"./Bsnum5pm.js";import{a_ as ta}from"./cD292w1o.js";import{i as ra}from"./DKwAaLwd.js";import{o as oa}from"./DFh2QzKR.js";function na(o,t){return o.loadURL(t)}function aa(o){return{previousUrlProp:o||null}}function Tr(o,t){o.previousUrlProp=t}function ia(o,t,n){const g=n||t;return o.previousUrlProp===g?null:(o.previousUrlProp=g,g)}function sa(o,t,n){return t?o.previousUrlProp===null?(o.previousUrlProp=t,{shouldLoad:!1,targetUrl:null}):t===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:n.webviewReady?(o.previousUrlProp=t,n.isValidBrowserUrl(t)?{shouldLoad:!0,targetUrl:t}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const ao=Dt("TabBoundsReporter"),la=150;function Qt(o,t,n){!(t>0)||!(n>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:t,height:n}).catch(g=>{ao.debug("Failed to report tab bounds",{tabId:o,error:g})})}function Ur(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(t=>{ao.debug("Failed to clear tab bounds",{tabId:o,error:t})})}function io(o,t){let n=t,g;const m=typeof ResizeObserver>"u"?void 0:new ResizeObserver(P=>{if(!n)return;const b=P[P.length-1]?.contentRect;if(!b)return;const F=n;clearTimeout(g),g=setTimeout(()=>{Qt(F,b.width,b.height)},la)});if(m?.observe(o),n){const P=o.getBoundingClientRect();Qt(n,P.width,P.height)}return{update(P){if(P!==n&&(clearTimeout(g),n&&Ur(n),n=P,n)){const b=o.getBoundingClientRect();Qt(n,b.width,b.height)}},destroy(){clearTimeout(g),m?.disconnect(),n&&Ur(n)}}}function so(o){let t=o.trim();if(!t)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(t)||(t=(t.includes("localhost")||t.includes("127.0.0.1")||t.includes("0.0.0.0")?"http://":"https://")+t);try{return new URL(t),t}catch{return null}}function dt(o,t=typeof window<"u"?window.location.origin:""){return o==="about:blank"||lo(o,t)}function lo(o,t=typeof window<"u"?window.location.origin:""){if(!o)return!1;try{const n=new URL(o);return ro.NAVIGATION_ALLOWED.includes(n.protocol)&&n.origin!==t}catch{return!1}}const Mt=[{id:"iphone-se",name:"iPhone SE",category:"phone",width:375,height:667},{id:"iphone-15",name:"iPhone 15",category:"phone",width:393,height:852},{id:"pixel-8",name:"Pixel 8",category:"phone",width:412,height:915},{id:"ipad-mini",name:"iPad Mini",category:"tablet",width:768,height:1024},{id:"ipad-pro-11",name:"iPad Pro 11″",category:"tablet",width:834,height:1194},{id:"desktop-1280x800",name:"1280 × 800",category:"desktop",width:1280,height:800},{id:"desktop-1440x900",name:"1440 × 900",category:"desktop",width:1440,height:900}];function da(o){return{...o,width:o.height,height:o.width}}var ua=re('<span class="min-w-0 flex-1 truncate"> </span> <span class="type-caption ml-3 text-muted-foreground"> </span>',1),er=re("<!> <!> <!>",1),ca=re('<span class="min-w-0 flex-1"> </span> <span class="type-caption text-muted-foreground"> </span>',1),tr=re("<!> <!>",1);function cr(o,t){if(new.target)return je({component:cr,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=v(t,"onCustom",7);const P=["phone","tablet","desktop"],b=f(()=>n().mode==="fit"?"fit":n().mode==="preset"?n().presetId:"custom");function F(u){if(u==="fit")return g()({mode:"fit"});const k=Mt.find(O=>O.id===u);k&&g()({mode:"preset",presetId:k.id,width:k.width,height:k.height})}var A={get viewport(){return n()},set viewport(u){n(u),w()},get onViewportChange(){return g()},set onViewportChange(u){g(u),w()},get onCustom(){return m()},set onCustom(u){m(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)},S=er(),s=H(S);Y(s,()=>hn,(u,k)=>{k(u,{get value(){return e(b)},onValueChange:F,children:(O,x)=>{var I=er(),R=H(I);Y(R,()=>Yt,(G,K)=>{K(G,{value:"fit",children:(oe,te)=>{ht();var X=ct();D(le=>J(X,le),[()=>c.browser_viewport_fitPanel_label()]),C(oe,X)},$$slots:{default:!0}})});var T=h(R,2);Pr(T,17,()=>P,Go,(G,K)=>{var oe=er(),te=H(oe);Y(te,()=>mt,(B,ae)=>{ae(B,{})});var X=h(te,2);Y(X,()=>_n,(B,ae)=>{ae(B,{children:(a,l)=>{ht();var j=ct();D(ue=>J(j,ue),[()=>e(K)==="phone"?c.browser_viewport_phoneGroup_label():e(K)==="tablet"?c.browser_viewport_tabletGroup_label():c.browser_viewport_desktopGroup_label()]),C(a,j)},$$slots:{default:!0}})});var le=h(X,2);Pr(le,17,()=>Mt.filter(B=>B.category===e(K)),B=>B.id,(B,ae)=>{var a=ut(),l=H(a);Y(l,()=>Yt,(j,ue)=>{ue(j,{get value(){return e(ae).id},children:(Ie,he)=>{var M=ua(),_=H(M),Z=ke(_,!0),V=h(_,2),z=ke(V,!0);D(y=>{J(Z,e(ae).name),J(z,y)},[()=>c.browser_viewport_dimensions_label({width:ze(e(ae).width),height:ze(e(ae).height)})]),C(Ie,M)},$$slots:{default:!0}})}),C(B,a)}),C(G,oe)});var ee=h(T,2);{var ge=G=>{var K=tr(),oe=H(K);Y(oe,()=>mt,(X,le)=>{le(X,{})});var te=h(oe,2);Y(te,()=>Yt,(X,le)=>{le(X,{value:"custom",get onSelect(){return m()},children:(B,ae)=>{var a=ca(),l=H(a),j=ke(l,!0),ue=h(l,2),Ie=ke(ue,!0);D((he,M)=>{J(j,he),J(Ie,M)},[()=>c.browser_viewport_custom_label(),()=>c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})]),C(B,a)},$$slots:{default:!0}})}),C(G,K)};be(ee,G=>{n().mode==="custom"&&G(ge)})}C(O,I)},$$slots:{default:!0}})});var L=h(s,2);{var Q=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);Y(x,()=>Ke,(I,R)=>{R(I,{get onSelect(){return m()},children:(T,ee)=>{ht();var ge=ct();D(G=>J(ge,G),[()=>c.browser_viewport_custom_label()]),C(T,ge)},$$slots:{default:!0}})}),C(u,k)};be(L,u=>{n().mode!=="custom"&&u(Q)})}var U=h(L,2);{var $=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);{let I=f(()=>c.browser_viewport_rotate_label());Y(x,()=>no,(R,T)=>{T(R,{get icon(){return jr},get label(){return e(I)},onSelect:()=>g()(da(n()))})})}C(u,k)};be(U,u=>{n().mode!=="fit"&&u($)})}return C(o,S),Ye(A)}var fa=re('<div class="grid grid-cols-2 gap-3"><label class="space-y-1 type-caption"><span> </span> <!></label> <label class="space-y-1 type-caption"><span> </span> <!></label></div>');function fr(o,t){if(new.target)return je({component:fr,...o});Je(t,!0);let n=v(t,"open",15,!1),g=v(t,"viewport",7),m=v(t,"onViewportChange",7),P=v(t,"returnFocus",7);const b=320,F=3840;let A=W(1280),S=W(800),s=W(null);function L(u){return typeof u=="number"&&Number.isInteger(u)&&u>=b&&u<=F}const Q=f(()=>L(e(A))&&L(e(S)));Ue(()=>{if(n())return()=>{It().then(()=>{P()?.isConnected&&P().focus()})}}),Ue(()=>{n()||(d(A,g().mode==="fit"?1280:g().width,!0),d(S,g().mode==="fit"?800:g().height,!0))});function U(){!e(Q)||e(A)===null||e(S)===null||(m()({mode:"custom",width:e(A),height:e(S)}),n(!1))}var $={get open(){return n()},set open(u=!1){n(u),w()},get viewport(){return g()},set viewport(u){g(u),w()},get onViewportChange(){return m()},set onViewportChange(u){m(u),w()},get returnFocus(){return P()},set returnFocus(u){P(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)};{let u=f(()=>c.browser_viewport_custom_label()),k=f(()=>c.browser_viewport_sizeRange_description({min:ze(b),max:ze(F)})),O=f(()=>c.browser_viewport_apply_label());qn(o,{get title(){return e(u)},get description(){return e(k)},get submitLabel(){return e(O)},get canSubmit(){return e(Q)},onSubmit:U,get initialFocus(){return e(s)},get open(){return n()},set open(x){n(x)},children:(x,I)=>{var R=fa(),T=ie(R),ee=ie(T),ge=ke(ee,!0),G=h(ee,2);{let le=f(()=>!L(e(A)));Nt(G,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(A)},set value(B){d(A,B,!0)},get ref(){return e(s)},set ref(B){d(s,B,!0)}})}se(T);var K=h(T,2),oe=ie(K),te=ke(oe,!0),X=h(oe,2);{let le=f(()=>!L(e(S)));Nt(X,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(S)},set value(B){d(S,B,!0)}})}se(K),se(R),D((le,B)=>{J(ge,le),J(te,B)},[()=>c.browser_viewport_width_label(),()=>c.browser_viewport_height_label()]),C(x,R)},$$slots:{default:!0}})}return Ye($)}var Ot=re("<!> <!>",1),ot=re("<!> ",1),ga=re('<!> <span class="min-w-0 flex-1 truncate"> </span>',1),va=re("<!> <!> <!> <!> <!>",1),wa=re('<!> <span class="min-w-0 flex-1"> </span> <kbd class="type-caption ml-5 text-muted-foreground" aria-hidden="true">⌘⌥I</kbd>',1),pa=re("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function uo(o,t){if(new.target)return je({component:uo,...o});Je(t,!0);let n=v(t,"errorCount",7,0),g=v(t,"disabled",7,!1),m=v(t,"collapsed",7,!1),P=v(t,"canGoBack",7,!1),b=v(t,"canGoForward",7,!1),F=v(t,"canSelectElement",7,!1),A=v(t,"selectingElement",7,!1),S=v(t,"viewport",23,()=>({mode:"fit"})),s=v(t,"onGoBack",7),L=v(t,"onGoForward",7),Q=v(t,"onToggleElementPicker",7),U=v(t,"onViewportChange",7),$=v(t,"onOpenExternal",7),u=v(t,"onFullScreen",7),k=v(t,"onCopyUrl",7),O=v(t,"onScreenshot",7),x=v(t,"onOpenConsole",7),I=v(t,"onOpenSource",7),R=v(t,"onOpenInspector",7),T=v(t,"onReloadWithoutCache",7);const ee=f(()=>n()>0?c.browser_overflow_triggerWithErrors_ariaLabel({count:ze(n())}):c.browser_overflow_trigger_ariaLabel()),ge=f(()=>S().mode==="preset"?Mt.find(l=>l.id===S().presetId):void 0),G=f(()=>S().mode==="fit"?c.browser_viewport_fitPanel_label():e(ge)?.name??c.browser_viewport_dimensions_label({width:ze(S().width),height:ze(S().height)}));let K=W(!1),oe=W(null),te=W(!1);async function X(){d(te,!1),await It(),d(K,!0)}var le={get errorCount(){return n()},set errorCount(l=0){n(l),w()},get disabled(){return g()},set disabled(l=!1){g(l),w()},get collapsed(){return m()},set collapsed(l=!1){m(l),w()},get canGoBack(){return P()},set canGoBack(l=!1){P(l),w()},get canGoForward(){return b()},set canGoForward(l=!1){b(l),w()},get canSelectElement(){return F()},set canSelectElement(l=!1){F(l),w()},get selectingElement(){return A()},set selectingElement(l=!1){A(l),w()},get viewport(){return S()},set viewport(l={mode:"fit"}){S(l),w()},get onGoBack(){return s()},set onGoBack(l){s(l),w()},get onGoForward(){return L()},set onGoForward(l){L(l),w()},get onToggleElementPicker(){return Q()},set onToggleElementPicker(l){Q(l),w()},get onViewportChange(){return U()},set onViewportChange(l){U(l),w()},get onOpenExternal(){return $()},set onOpenExternal(l){$(l),w()},get onFullScreen(){return u()},set onFullScreen(l){u(l),w()},get onCopyUrl(){return k()},set onCopyUrl(l){k(l),w()},get onScreenshot(){return O()},set onScreenshot(l){O(l),w()},get onOpenConsole(){return x()},set onOpenConsole(l){x(l),w()},get onOpenSource(){return I()},set onOpenSource(l){I(l),w()},get onOpenInspector(){return R()},set onOpenInspector(l){R(l),w()},get onReloadWithoutCache(){return T()},set onReloadWithoutCache(l){T(l),w()},$set:Ze,$on:(l,j)=>Xe(t,l,j)},B=Ot(),ae=H(B);Y(ae,()=>to,(l,j)=>{j(l,{get open(){return e(te)},set open(ue){d(te,ue,!0)},children:(ue,Ie)=>{var he=Ot(),M=H(he);{const Z=(V,z)=>{let y=()=>(z?.()).props;{let q=f(()=>c.browser_overflow_trigger_tooltip());Oe(V,lr(y,{variant:"ghost-light",size:"icon-xs",class:"relative",get disabled(){return g()},get tooltip(){return e(q)},tooltipSide:"bottom",get"aria-label"(){return e(ee)},"data-testid":"browser-overflow-trigger",get ref(){return e(oe)},set ref(E){d(oe,E,!0)},children:(E,Pe)=>{var fe=Ot(),Qe=H(fe);yn(Qe,{class:"size-3.5"});var nt=h(Qe,2);{var We=Fe=>{Gn(Fe,{variant:"destructive",class:"absolute -right-1.5 -top-1.5 h-4 min-w-4 px-1 text-xs leading-none","data-testid":"browser-console-error-badge",children:(Ge,at)=>{ht();var it=ct();D(Me=>J(it,Me),[()=>n()>9?"9+":ze(n())]),C(Ge,it)},$$slots:{default:!0}})};be(nt,Fe=>{n()>0&&Fe(We)})}C(E,fe)},$$slots:{default:!0}}))}};Y(M,()=>Qr,(V,z)=>{z(V,{child:Z,$$slots:{child:!0}})})}var _=h(M,2);Y(_,()=>eo,(Z,V)=>{V(Z,{align:"end",class:"w-56",onCloseAutoFocus:z=>e(K)&&z.preventDefault(),children:(z,y)=>{var q=pa(),E=H(q);{var Pe=ve=>{var we=va(),Ee=H(we);{let ce=f(()=>!P());Y(Ee,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return s()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return dr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goBack_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var Re=h(Ee,2);{let ce=f(()=>!b());Y(Re,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return L()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return ur},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goForward_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var pe=h(Re,2);{let ce=f(()=>!F());Y(pe,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},onSelect:()=>void Q()?.(),children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>A()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var me=h(pe,2);Y(me,()=>xn,(ce,xe)=>{xe(ce,{children:(De,Ne)=>{var st=Ot(),Ce=H(st);{let et=f(()=>!U());Y(Ce,()=>Cn,(Ve,ft)=>{ft(Ve,{get disabled(){return e(et)},children:(St,gt)=>{var Pt=ga(),Et=H(Pt);ye(Et,{get icon(){return Zr},size:"xs",class:"w-4 text-muted-foreground"});var Ft=h(Et,2),Ut=ke(Ft,!0);D(Lt=>J(Ut,Lt),[()=>c.browser_viewport_trigger_ariaLabel({mode:e(G)})]),C(St,Pt)},$$slots:{default:!0}})})}var He=h(Ce,2);Y(He,()=>In,(et,Ve)=>{Ve(et,{class:"w-64",children:(ft,St)=>{cr(ft,{get viewport(){return S()},onViewportChange:gt=>U()?.(gt),onCustom:X})},$$slots:{default:!0}})}),C(De,st)},$$slots:{default:!0}})});var Ae=h(me,2);Y(Ae,()=>mt,(ce,xe)=>{xe(ce,{})}),C(ve,we)};be(E,ve=>{m()&&ve(Pe)})}var fe=h(E,2);{var Qe=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>u()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return tn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_fullScreen_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)},nt=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>void $()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return rn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_openExternal_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)};be(fe,ve=>{u()?ve(Qe):$()&&ve(nt,1)})}var We=h(fe,2);Y(We,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void k()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Jo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_copyUrl_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Fe=h(We,2);Y(Fe,()=>mt,(ve,we)=>{we(ve,{})});var Ge=h(Fe,2);Y(Ge,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void O()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Yo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_screenshot_label()]),C(Ee,pe)},$$slots:{default:!0}})});var at=h(Ge,2);Y(at,()=>mt,(ve,we)=>{we(ve,{})});var it=h(at,2);Y(it,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void x()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Qo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_console_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Me=h(it,2);Y(Me,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void I()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return en},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_source_label()]),C(Ee,pe)},$$slots:{default:!0}})});var qe=h(Me,2);Y(qe,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void R()(),children:(Ee,Re)=>{var pe=wa(),me=H(pe);ye(me,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me,2),ce=ke(Ae,!0);ht(2),D(xe=>J(ce,xe),[()=>c.browser_overflow_inspector_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Le=h(qe,2);Y(Le,()=>mt,(ve,we)=>{we(ve,{})});var _t=h(Le,2);Y(_t,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void T()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return jr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_reloadWithoutCache_label()]),C(Ee,pe)},$$slots:{default:!0}})}),C(z,q)},$$slots:{default:!0}})}),C(ue,he)},$$slots:{default:!0}})});var a=h(ae,2);return fr(a,{get viewport(){return S()},onViewportChange:l=>U()?.(l),get returnFocus(){return e(oe)},get open(){return e(K)},set open(l){d(K,l,!0)}}),C(o,B),Ye(le)}var ba=re('<span class="truncate"> </span> <!>',1),Ar=re("<!> <!>",1);function co(o,t){if(new.target)return je({component:co,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=W(!1),P=W(!1),b=W(null);const F=f(()=>n().mode==="preset"?Mt.find(k=>k.id===n().presetId):void 0),A=f(()=>n().mode==="fit"?"":c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})),S=f(()=>n().mode==="fit"?c.browser_viewport_fit_short_label():n().mode==="preset"&&e(F)?e(F).name:e(A)),s=f(()=>n().mode==="fit"?c.browser_viewport_fitPanel_label():e(S));async function L(){d(m,!1),await It(),d(P,!0)}var Q={get viewport(){return n()},set viewport(k){n(k),w()},get onViewportChange(){return g()},set onViewportChange(k){g(k),w()},$set:Ze,$on:(k,O)=>Xe(t,k,O)},U=Ar(),$=H(U);Y($,()=>to,(k,O)=>{O(k,{get open(){return e(m)},set open(x){d(m,x,!0)},children:(x,I)=>{var R=Ar(),T=H(R);{const ge=(G,K)=>{let oe=()=>(K?.()).props;{let te=f(()=>c.browser_viewport_trigger_ariaLabel({mode:e(s)}));Oe(G,lr(oe,{variant:"ghost-light",size:"xs",class:"h-6 max-w-36 gap-1 rounded-full bg-muted px-2 text-xs hover:bg-muted/80",get"aria-label"(){return e(te)},"data-testid":"browser-viewport-trigger",get ref(){return e(b)},set ref(X){d(b,X,!0)},children:(X,le)=>{var B=ba(),ae=H(B),a=ke(ae,!0),l=h(ae,2);ye(l,{get icon(){return on},size:"xs",class:"shrink-0"}),D(()=>J(a,e(S))),C(X,B)},$$slots:{default:!0}}))}};Y(T,()=>Qr,(G,K)=>{K(G,{child:ge,$$slots:{child:!0}})})}var ee=h(T,2);Y(ee,()=>eo,(ge,G)=>{G(ge,{align:"end",class:"w-64",onCloseAutoFocus:K=>e(P)&&K.preventDefault(),children:(K,oe)=>{cr(K,{get viewport(){return n()},get onViewportChange(){return g()},onCustom:L})},$$slots:{default:!0}})}),C(x,R)},$$slots:{default:!0}})});var u=h($,2);return fr(u,{get viewport(){return n()},get onViewportChange(){return g()},get returnFocus(){return e(b)},get open(){return e(P)},set open(k){d(P,k,!0)}}),C(o,U),Ye(Q)}var ma=re('<span data-browser-viewport-readout=""> </span> <!>',1),ha=re('<div data-browser-device-frame-container=""><div><div><!> <!></div> <!></div></div>');function fo(o,t){if(new.target)return je({component:fo,...o});Je(t,!0);const n=320,g=3840,m=150,P=24;let b=v(t,"viewport",7),F=v(t,"onViewportChange",7),A=v(t,"chromeOutside",7,!1),S=v(t,"children",7),s=W(Rt(b().mode==="fit"?n:b().width)),L=W(Rt(b().mode==="fit"?n:b().height)),Q,U=W(0),$=W(0),u=W(!1),k=null,O=0,x=0,I=0,R=0,T;const ee=f(()=>b().mode==="fit"),ge=f(()=>c.browser_viewport_dimensions_label({width:ze(e(s)),height:ze(e(L))})),G=f(()=>A()?Math.max(0,e($)-P):e($)),K=f(()=>!e(ee)&&e(U)>0&&e(G)>0?Math.min(1,e(U)/e(s),e(G)/e(L)):1),oe=f(()=>e(s)*e(K)),te=f(()=>e(L)*e(K));Ue(()=>{e(u)||b().mode==="fit"||(d(s,b().width,!0),d(L,b().height,!0))});function X(y){return Math.min(g,Math.max(n,Math.round(y)))}function le(){F()({mode:"custom",width:e(s),height:e(L)})}function B(){clearTimeout(T),T=setTimeout(le,m)}function ae(y){e(ee)||y.button!==0||(y.preventDefault(),d(u,!0),k=y.pointerId,O=y.clientX,x=y.clientY,I=e(s),R=e(L),y.currentTarget instanceof HTMLElement&&y.currentTarget.setPointerCapture?.(y.pointerId))}function a(y){!e(u)||y.pointerId!==k||(d(s,X(I+y.clientX-O),!0),d(L,X(R+y.clientY-x),!0),B())}function l(y){if(!e(u)||y.pointerId!==k)return;clearTimeout(T),d(u,!1),k=null;const q=y.currentTarget;q instanceof HTMLElement&&q.hasPointerCapture?.(y.pointerId)&&q.releasePointerCapture&&q.releasePointerCapture(y.pointerId),le()}qr(()=>{const y=(E,Pe)=>{d(U,E,!0),d($,Pe,!0)};y(Q.clientWidth,Q.clientHeight);const q=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([E])=>{y(E?.contentRect.width??Q.clientWidth,E?.contentRect.height??Q.clientHeight)});return q?.observe(Q),()=>q?.disconnect()}),Hr(()=>clearTimeout(T));var j={get viewport(){return b()},set viewport(y){b(y),w()},get onViewportChange(){return F()},set onViewportChange(y){F(y),w()},get chromeOutside(){return A()},set chromeOutside(y=!1){A(y),w()},get children(){return S()},set children(y){S(y),w()},$set:Ze,$on:(y,q)=>Xe(t,y,q)},ue=ha();{const y=E=>{var Pe=ma(),fe=H(Pe),Qe=ke(fe,!0),nt=h(fe,2);{let We=f(()=>A()?"top-full":"bottom-0"),Fe=f(()=>c.browser_viewport_resizeHandle_ariaLabel());Oe(nt,{type:"button",variant:"ghost",size:"icon-xs",iconOnly:!0,get class(){return`absolute right-0 z-20 size-5 cursor-nwse-resize touch-none border-0 bg-transparent p-0 after:absolute after:bottom-1 after:right-1 after:size-2 after:border-b-2 after:border-r-2 after:border-muted-foreground ${e(We)??""}`},get"aria-label"(){return e(Fe)},"data-testid":"browser-device-resize-handle",onpointerdown:ae,onpointermove:a,onpointerup:l,onpointercancel:l})}D(()=>{xt(fe,1,`pointer-events-none absolute left-1/2 z-10 -translate-x-1/2 rounded bg-background/90 px-1.5 py-0.5 text-xs text-muted-foreground shadow-sm backdrop-blur ${A()?"top-full mt-0.5":"bottom-1"}`),J(Qe,e(ge))}),C(E,Pe)};var Ie=ie(ue),he=ie(Ie);let q;var M=ie(he);Xo(M,()=>S()??zo);var _=h(M,2);{var Z=E=>{y(E)};be(_,E=>{!e(ee)&&!A()&&E(Z)})}se(he);var V=h(he,2);{var z=E=>{y(E)};be(V,E=>{!e(ee)&&A()&&E(z)})}se(Ie),se(ue),kt(ue,E=>Q=E,()=>Q),D(()=>{xt(Ie,1,`relative ${e(ee)?"h-full w-full":""} ${A()&&!e(ee)?"mb-6":""}`),xt(he,1,`relative overflow-hidden bg-background ${e(ee)?"h-full w-full":e(u)?"ring-2 ring-primary/30":""}`),Be(he,"data-browser-device-frame",e(ee)?void 0:""),Be(he,"data-width",e(ee)?void 0:e(s)),Be(he,"data-height",e(ee)?void 0:e(L)),q=Ho(he,"",q,{width:e(ee)?void 0:`${e(oe)}px`,height:e(ee)?void 0:`${e(te)}px`})})}return D(()=>xt(ue,1,`flex h-full w-full items-center justify-center overflow-hidden ${e(ee)?"bg-background":"bg-muted/40"}`)),C(o,ue),Ye(j)}const rr=Dt("BrowserViewSlot"),Br=()=>new Promise(o=>requestAnimationFrame(()=>o())),Or=async()=>{await Br(),await Br()};function Nr(o,t){return o===t?!0:!o||!t?!1:o.x===t.x&&o.y===t.y&&o.width===t.width&&o.height===t.height}function Mr(o){const t=o.getBoundingClientRect();return t.width<=0||t.height<=0?null:{x:t.left,y:t.top,width:t.width,height:t.height}}function _a(o){return o.isConnected?typeof o.checkVisibility=="function"?o.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):!0:!1}function ya(o,t){let n=Dr(o,t),g=`${t.workspaceId}\0${t.tabId}`;return{update(m){const P=`${m.workspaceId}\0${m.tabId}`;if(P===g){n.update(m);return}n.destroy(),g=P,n=Dr(o,m)},destroy(){n.destroy()}}}function Dr(o,t){let n=t;const g=An(o,{tabId:n.tabId,workspaceId:n.workspaceId,url:n.url,...n.pinned===void 0?{}:{pinned:n.pinned}});n.onWebview?.(g.webview);let m=null,P=Promise.resolve(),b="live",F=0,A=null,S=null,s=!1;const L=()=>{A?.remove(),A=null},Q=x=>{m=x;const I=n.tabId;return P=On(I,x.rect,x.visible).catch(R=>rr.debug("Could not place the browser page",{tabId:I,error:R})),P},U=()=>{if(S=null,s)return;const x=Mr(o),I=n.visible&&x!==null&&_a(o)&&b!=="frozen"&&g.ready;g.ready&&(!m||m.visible!==I||x&&!Nr(m.rect,x))&&(Nr(m?.rect??null,x)||Kn(),Q({rect:x??m?.rect??null,visible:I})),S=requestAnimationFrame(U)};S=requestAnimationFrame(U);const $=async x=>{if(b="freezing",g.ready&&m?.visible)try{const I=await g.webview.capturePage?.();if(x!==F||s)return;const R=I?.toDataURL()??"";if(R){const T=document.createElement("img");if(T.alt="",T.setAttribute("aria-hidden","true"),T.dataset.browserViewSnapshot="",T.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",T.src=R,await T.decode().catch(()=>{}),x!==F||s||(L(),o.append(T),A=T,await Or(),x!==F||s))return}}catch(I){rr.debug("Could not snapshot the browser page",{tabId:n.tabId,error:I})}x!==F||s||(b="frozen")},u=async x=>{if(b="thawing",g.ready&&n.visible){const I=Mr(o);I&&await Q({rect:I,visible:!0}),await Or()}x!==F||s||(L(),b="live")},k=Hn({element:o,onCoveredChange(x){const I=++F;x?$(I):u(I)}});return{update(x){n=x},destroy:()=>{const x=n.tabId;s=!0,S!==null&&cancelAnimationFrame(S),S=null,k(),L(),g.dispose(),n.onWebview?.(null),P.then(()=>Bn(x).catch(I=>rr.debug("Could not take the browser page off screen",{tabId:x,error:I})))}}}var xa=re('<div class="relative h-full w-full overflow-hidden"></div>');function go(o,t){if(new.target)return je({component:go,...o});Je(t,!0);let n=v(t,"tabId",7),g=v(t,"workspaceId",7),m=v(t,"url",7),P=v(t,"pinned",7),b=v(t,"visible",7),F=v(t,"webview",15,null);var A={get tabId(){return n()},set tabId(s){n(s),w()},get workspaceId(){return g()},set workspaceId(s){g(s),w()},get url(){return m()},set url(s){m(s),w()},get pinned(){return P()},set pinned(s){P(s),w()},get visible(){return b()},set visible(s){b(s),w()},get webview(){return F()},set webview(s=null){F(s),w()},$set:Ze,$on:(s,L)=>Xe(t,s,L)},S=xa();return Ct(S,(s,L)=>ya?.(s,L),()=>({tabId:n(),workspaceId:g(),url:m(),...P()===void 0?{}:{pinned:P()},visible:b(),onWebview:s=>F(s)})),Ct(S,(s,L)=>io?.(s,L),n),D(()=>Be(S,"data-browser-view-slot",n())),C(o,S),Ye(A)}function vo(o,t){if(new.target)return je({component:vo,...o});Je(t,!0);let n=v(t,"active",7),g=v(t,"disabled",7),m=v(t,"onToggle",7);var P={get active(){return n()},set active(b){n(b),w()},get disabled(){return g()},set disabled(b){g(b),w()},get onToggle(){return m()},set onToggle(b){m(b),w()},$set:Ze,$on:(b,F)=>Xe(t,b,F)};{let b=f(()=>n()?"bg-muted text-foreground":""),F=f(()=>n()?c.browser_embedded_cancelElementSelection_tooltip():c.browser_embedded_selectElement_tooltip()),A=f(()=>n()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel());Oe(o,{variant:"ghost-light",size:"icon-xs",get class(){return e(b)},get onclick(){return m()},get disabled(){return g()},get tooltip(){return e(F)},tooltipSide:"bottom",get"aria-label"(){return e(A)},get"aria-pressed"(){return n()},"data-testid":"browser-select-element",children:(S,s)=>{ye(S,{get icon(){return nr},size:"xs"})},$$slots:{default:!0}})}return Ye(P)}var Ca=re('<span class="sr-only"> </span>'),Ia=re('<p class="min-h-0 overflow-y-auto text-sm text-foreground [overflow-wrap:anywhere]"> </p> <!>',1),ka=re("<!> <!>",1),Pa=re('<span class="inline-flex shrink-0"><!> <!></span>');function gr(o,t){const n=Kr();if(new.target)return je({component:gr,...o});Je(t,!0);let g=v(t,"label",7),m=v(t,"description",7),P=v(t,"ariaLabel",23,g),b=v(t,"tone",7,"info"),F=v(t,"actionLabel",7),A=v(t,"onAction",7),S=v(t,"actionFocusTarget",7),s=v(t,"descriptionId",7),L=W(!1),Q=!1;async function U(){Q=!0,d(L,!1),await It(),S()?.focus(),A()?.()}var $={get label(){return g()},set label(I){g(I),w()},get description(){return m()},set description(I){m(I),w()},get ariaLabel(){return P()},set ariaLabel(I=g){P(I),w()},get tone(){return b()},set tone(I="info"){b(I),w()},get actionLabel(){return F()},set actionLabel(I){F(I),w()},get onAction(){return A()},set onAction(I){A(I),w()},get actionFocusTarget(){return S()},set actionFocusTarget(I){S(I),w()},get descriptionId(){return s()},set descriptionId(I){s(I),w()},$set:Ze,$on:(I,R)=>Xe(t,I,R)},u=Pa(),k=ie(u);{var O=I=>{var R=Ca(),T=ke(R,!0);D(()=>{Be(R,"id",n),Be(R,"role",b()==="error"?"alert":"status"),J(T,m())}),C(I,R)};be(k,I=>{s()||I(O)})}var x=h(k,2);return Y(x,()=>Xn,(I,R)=>{R(I,{get open(){return e(L)},set open(T){d(L,T,!0)},children:(T,ee)=>{var ge=ka(),G=H(ge);{const oe=(te,X)=>{let le=()=>(X?.()).props;{let B=f(()=>b()==="error"?"text-danger":b()==="warning"?"text-warning-ink":"text-muted-foreground"),ae=f(()=>s()??n);Oe(te,lr(le,{variant:"ghost-light",size:"icon-compact",wrapContent:!1,get class(){return e(B)},get"aria-label"(){return P()},get"aria-describedby"(){return e(ae)},get tooltip(){return m()},get tooltipDisabled(){return e(L)},tooltipSide:"bottom",tooltipDelayDuration:300,children:(a,l)=>{{let j=f(()=>b()==="error"?Xr:b()==="warning"?nn:Zr);ye(a,{get icon(){return e(j)},size:"xs",class:"shrink-0"})}},$$slots:{default:!0}}))}};Y(G,()=>jn,(te,X)=>{X(te,{child:oe,$$slots:{child:!0}})})}var K=h(G,2);Y(K,()=>Zn,(oe,te)=>{te(oe,{align:"end",class:"flex max-h-[var(--bits-popover-content-available-height,calc(100dvh-1rem))] w-72 max-w-[calc(100vw-1rem)] flex-col gap-3 p-3",get"aria-label"(){return P()},onCloseAutoFocus:X=>{Q&&S()&&(X.preventDefault(),S().focus()),Q=!1},children:(X,le)=>{var B=Ia(),ae=H(B),a=ke(ae,!0),l=h(ae,2);{var j=ue=>{Oe(ue,{variant:"secondary",size:"sm",class:"self-start",onclick:()=>void U(),children:(Ie,he)=>{ht();var M=ct();D(()=>J(M,F())),C(Ie,M)},$$slots:{default:!0}})};be(l,ue=>{F()&&A()&&ue(j)})}D(()=>J(a,m())),C(X,B)},$$slots:{default:!0}})}),C(T,ge)},$$slots:{default:!0}})}),se(u),D(()=>Be(u,"data-browser-status",b())),C(o,u),Ye($)}function Ea(o,t,n){const g=n.width>0?t.width/n.width:1,m=n.height>0?t.height/n.height:1,P=Math.max(0,Math.floor(o.x*g)),b=Math.max(0,Math.floor(o.y*m)),F=Math.min(t.width,Math.ceil((o.x+o.width)*g)),A=Math.min(t.height,Math.ceil((o.y+o.height)*m));return{x:P,y:b,width:Math.max(0,F-P),height:Math.max(0,A-b)}}const Fa=$r({selector:wt().min(1),domPath:wt().min(1),tagName:wt().min(1),id:wt(),className:wt(),textSnippet:wt().max(120),rect:$r({x:Bt().finite(),y:Bt().finite(),width:Bt().finite().nonnegative(),height:Bt().finite().nonnegative()}).strict(),pageUrl:wt().min(1),sourceRef:wt().min(1).optional()}).strict(),Vr="__INTENT_ELEMENT_PICKED__:";function Sa(o){if(o==="__INTENT_ELEMENT_PICK_CANCELLED__")return{type:"cancelled"};if(!o.startsWith(Vr))return null;let t;try{t=JSON.parse(o.slice(Vr.length))}catch{t=null}const n=Fa.safeParse(t);return n.success?{type:"picked",element:n.data}:{type:"malformed",issues:n.error.issues}}const La=String.raw`
2
2
  (function() {
3
3
  var PICKED_PREFIX = '__INTENT_ELEMENT_PICKED__:';
4
4
  var CANCELLED = '__INTENT_ELEMENT_PICK_CANCELLED__';
@@ -1 +1 @@
1
- import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./Fcr7AvC-.js";import{bs as D,cd as L,ca as O,a7 as E,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./BhYXv0ZM.js";import{C as U}from"./BVBh582U.js";import{dI as V}from"./cD292w1o.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=L(n());O(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=E(),y=F(p);{var I=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},P=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(I):e(P,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
1
+ import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./Fcr7AvC-.js";import{bs as D,cd as L,ca as O,a7 as E,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./BhYXv0ZM.js";import{C as U}from"./CQmOm-Tm.js";import{dI as V}from"./cD292w1o.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=L(n());O(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=E(),y=F(p);{var I=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},P=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(I):e(P,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
@@ -1,4 +1,4 @@
1
- import{U as be,aZ as we,Y as _e,b0 as De,V as Se,a_ as Ce,b as l,X as dt,aW as vt,B as Me,L as U,ay as st,z as Ee,P as Ie,r as $e,bh as Ye}from"./DFNKkiho.js";import{g as It}from"./BdWqymET.js";import{t as Ae,d as Fe,m as Le,l as Oe,h as We,g as Zt,p as Qt,u as Pe,q as Ve,i as ze,v as Re,x as Ne,w as He,n as Be,e as Kt,j as Jt,k as te,s as ee,a as re}from"./DYzxLuOL.js";function qe(t){return t}var Tt=1,Yt=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function Xe(t){return"translate(0,"+t+")"}function je(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===Yt?"x":"y",W=t===Tt||t===Ft?Ge:Xe;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:je)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===Yt?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Yt?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,Y=o.day,A=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=Y||(G||c?1:at.getDate()),lt=G||at.getFullYear(),X=0;G&&!c||(X=c>0?c-1:at.getMonth());var K,Z=A||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,X,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,X,yt,Z,ot,J,it)):(K=new Date(lt,X,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,Y=2,A=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||A,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var X,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((X===null||typeof X>"u")&&(X=lt()),Z=$[K]&&$[K][X]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>Y&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
1
+ import{U as be,aZ as we,Y as _e,b0 as De,V as Se,a_ as Ce,b as l,X as dt,aW as vt,B as Me,L as U,ay as st,z as Ee,P as Ie,r as $e,bh as Ye}from"./Bex9L_jH.js";import{g as It}from"./BdWqymET.js";import{t as Ae,d as Fe,m as Le,l as Oe,h as We,g as Zt,p as Qt,u as Pe,q as Ve,i as ze,v as Re,x as Ne,w as He,n as Be,e as Kt,j as Jt,k as te,s as ee,a as re}from"./DvXSJM4q.js";function qe(t){return t}var Tt=1,Yt=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function Xe(t){return"translate(0,"+t+")"}function je(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===Yt?"x":"y",W=t===Tt||t===Ft?Ge:Xe;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:je)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===Yt?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Yt?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,Y=o.day,A=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=Y||(G||c?1:at.getDate()),lt=G||at.getFullYear(),X=0;G&&!c||(X=c>0?c-1:at.getMonth());var K,Z=A||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,X,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,X,yt,Z,ot,J,it)):(K=new Date(lt,X,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,Y=2,A=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||A,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var X,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((X===null||typeof X>"u")&&(X=lt()),Z=$[K]&&$[K][X]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>Y&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
2
2
  `+F.showPosition()+`
3
3
  Expecting `+pt.join(", ")+", got '"+(this.terminals_[X]||X)+"'":$t="Parse error on line "+(G+1)+": Unexpected "+(X==A?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError($t,{text:F.match,token:this.terminals_[X]||X,line:F.yylineno,loc:nt,expected:pt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+X);switch(Z[0]){case 1:m.push(X),C.push(F.yytext),n.push(F.yylloc),m.push(Z[1]),X=null,c=F.yyleng,o=F.yytext,G=F.yylineno,nt=F.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],J.$=C[C.length-tt],J._$={first_line:n[n.length-(tt||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(tt||1)].first_column,last_column:n[n.length-1].last_column},at&&(J._$.range=[n[n.length-(tt||1)].range[0],n[n.length-1].range[1]]),ot=this.performAction.apply(J,[o,c,G,q.yy,Z[1],C,n].concat(R)),typeof ot<"u")return ot;tt&&(m=m.slice(0,-1*tt*2),C=C.slice(0,-1*tt),n=n.slice(0,-1*tt)),m.push(this.productions_[Z[1]][0]),C.push(J.$),n.push(J._$),Ut=$[m[m.length-2]][m[m.length-1]],m.push(Ut);break;case 3:return!0}}return!0},"parse")},T=(function(){var p={EOF:1,parseError:l(function(d,m){if(this.yy.parser)this.yy.parser.parseError(d,m);else throw new Error(d)},"parseError"),setInput:l(function(a,d){return this.yy=d||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:l(function(a){var d=a.length,m=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(a){this.unput(this.match.slice(a))},"less"),pastInput:l(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+`