@intent-hq/web 2.376.0 → 2.376.1

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 (147) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{reP1x2hx.js → -bihBnD_.js} +1 -1
  3. package/web/app/immutable/chunks/{CxfmOiQr.js → 2tp4E25F.js} +1 -1
  4. package/web/app/immutable/chunks/{qu0QpfUw.js → 6GF_gyTS.js} +1 -1
  5. package/web/app/immutable/chunks/{Wg-KBN6b.js → 6HwVA3Xi.js} +13 -13
  6. package/web/app/immutable/chunks/{B7o1DJo9.js → 6NqQpMgA.js} +1 -1
  7. package/web/app/immutable/chunks/{CtawaW2N.js → 8UE1B61A.js} +1 -1
  8. package/web/app/immutable/chunks/{BgttkbLb.js → B5n1Er-h.js} +1 -1
  9. package/web/app/immutable/chunks/{D7VeTrYO.js → B6ZbCtHN.js} +1 -1
  10. package/web/app/immutable/chunks/{D283eGmG.js → B77YOXDU.js} +1 -1
  11. package/web/app/immutable/chunks/{DTzE7g9m.js → B85xL2lt.js} +1 -1
  12. package/web/app/immutable/chunks/{BgxLwwHQ.js → BEbBWmo4.js} +1 -1
  13. package/web/app/immutable/chunks/{zaxjdjiF.js → BEv4fIdD.js} +1 -1
  14. package/web/app/immutable/chunks/{-SrZYziV.js → BFT4wQs3.js} +1 -1
  15. package/web/app/immutable/chunks/{6529TVsv.js → BGql-rAX.js} +1 -1
  16. package/web/app/immutable/chunks/{DyFc4NAd.js → BHsQzwHt.js} +1 -1
  17. package/web/app/immutable/chunks/{BQ5vM4FB.js → BOZ6hjJI.js} +2 -2
  18. package/web/app/immutable/chunks/{BrRuqfTp.js → BPqKxoH8.js} +1 -1
  19. package/web/app/immutable/chunks/{C2VSMRVU.js → BSyKFBWd.js} +1 -1
  20. package/web/app/immutable/chunks/{LqBZITyo.js → BWIYTJ4a.js} +3 -3
  21. package/web/app/immutable/chunks/{D4XPYll-.js → BWyPNph7.js} +2 -2
  22. package/web/app/immutable/chunks/{PqstdoKv.js → BaO0hXxI.js} +1 -1
  23. package/web/app/immutable/chunks/{DtO0wAdA.js → BcliNPZw.js} +2 -2
  24. package/web/app/immutable/chunks/{DBI3WymG.js → BdBn1UvT.js} +1 -1
  25. package/web/app/immutable/chunks/{CjCvg4fu.js → BdNdGDSe.js} +1 -1
  26. package/web/app/immutable/chunks/{Bcx8Sxo7.js → BdaN2XXm.js} +1 -1
  27. package/web/app/immutable/chunks/{BvhuCBEE.js → Bdn-RKqv.js} +2 -2
  28. package/web/app/immutable/chunks/{CRWeEeIp.js → BePTHsT0.js} +1 -1
  29. package/web/app/immutable/chunks/{DMdq0QC2.js → BjRLyMd2.js} +1 -1
  30. package/web/app/immutable/chunks/{BoT5B49_.js → BkcFLgQ7.js} +1 -1
  31. package/web/app/immutable/chunks/{DxrRvklK.js → BkmrZjpE.js} +1 -1
  32. package/web/app/immutable/chunks/{5IrgxRfr.js → BntFPxwt.js} +1 -1
  33. package/web/app/immutable/chunks/{BLSHNn4a.js → BoLBqPln.js} +1 -1
  34. package/web/app/immutable/chunks/{DkY0xIi7.js → BpimY2Bn.js} +2 -2
  35. package/web/app/immutable/chunks/{XmeiGQiO.js → Bs1CY0TU.js} +1 -1
  36. package/web/app/immutable/chunks/{B-lpv6Gv.js → Bt2C0fwl.js} +2 -2
  37. package/web/app/immutable/chunks/{BmNAS5xc.js → BuXc_maR.js} +1 -1
  38. package/web/app/immutable/chunks/{CqlSBroo.js → BzwPeFzF.js} +1 -1
  39. package/web/app/immutable/chunks/{Y4Eu_VSz.js → C22LcJ65.js} +3 -3
  40. package/web/app/immutable/chunks/{D_fLfdMn.js → C3beNZjc.js} +1 -1
  41. package/web/app/immutable/chunks/{BxlVsP3O.js → C4cfJuJM.js} +1 -1
  42. package/web/app/immutable/chunks/{BGMy2Ryn.js → C9x6kmJK.js} +1 -1
  43. package/web/app/immutable/chunks/{Cfy5Crpr.js → CCWqLSpV.js} +1 -1
  44. package/web/app/immutable/chunks/{BXB-ioXM.js → CGx1Vpie.js} +1 -1
  45. package/web/app/immutable/chunks/{BaEFcPEE.js → CJBG3N9y.js} +3 -3
  46. package/web/app/immutable/chunks/{Bwl-WDiM.js → CJfYXtXQ.js} +1 -1
  47. package/web/app/immutable/chunks/{Bu8LYT1B.js → CKGNYRrS.js} +2 -2
  48. package/web/app/immutable/chunks/{D1FftGj7.js → CKKDDlBT.js} +1 -1
  49. package/web/app/immutable/chunks/{CJh_F--P.js → CLG1DPRT.js} +1 -1
  50. package/web/app/immutable/chunks/{jsYE2rXv.js → CMn7jvlN.js} +1 -1
  51. package/web/app/immutable/chunks/{NzPgPyYa.js → COK2QQN9.js} +1 -1
  52. package/web/app/immutable/chunks/{C4MiITEz.js → COZ3dQ_A.js} +1 -1
  53. package/web/app/immutable/chunks/{7IpY0EgW.js → CQx3pm4t.js} +1 -1
  54. package/web/app/immutable/chunks/{tw85acZN.js → CW7lfTzm.js} +1 -1
  55. package/web/app/immutable/chunks/{TSQNyjhg.js → CX4bqTrJ.js} +1 -1
  56. package/web/app/immutable/chunks/{p0fS0rJD.js → CXfim-2t.js} +1 -1
  57. package/web/app/immutable/chunks/{Dy7nbUgl.js → CXgy6Mbb.js} +1 -1
  58. package/web/app/immutable/chunks/{CwQIGTQ1.js → CZw2t1gL.js} +1 -1
  59. package/web/app/immutable/chunks/{CHHUtp07.js → C_0xgdqY.js} +1 -1
  60. package/web/app/immutable/chunks/{Csv5_672.js → Cihg5T05.js} +1 -1
  61. package/web/app/immutable/chunks/{kPyUfani.js → CihneiLA.js} +1 -1
  62. package/web/app/immutable/chunks/{QSHJFaU7.js → CpIVKWwx.js} +4 -4
  63. package/web/app/immutable/chunks/{C71BdIUW.js → CqM0ozU7.js} +1 -1
  64. package/web/app/immutable/chunks/{D3GrssRa.js → CrNPV-Vp.js} +1 -1
  65. package/web/app/immutable/chunks/{DXf8KXiZ.js → CrgJwS7n.js} +1 -1
  66. package/web/app/immutable/chunks/{CX9_bRjk.js → Cs85XoQa.js} +1 -1
  67. package/web/app/immutable/chunks/{Bs1drFy2.js → CtECFAby.js} +1 -1
  68. package/web/app/immutable/chunks/{DwhE2_yv.js → Cvp_IOBl.js} +1 -1
  69. package/web/app/immutable/chunks/{DjLLAN4K.js → Cw3skelK.js} +1 -1
  70. package/web/app/immutable/chunks/{DTpQzThG.js → CwBMToxu.js} +1 -1
  71. package/web/app/immutable/chunks/{C54d-qnB.js → D1DNtybi.js} +1 -1
  72. package/web/app/immutable/chunks/{DgaQFJ1C.js → D2eaIIb4.js} +1 -1
  73. package/web/app/immutable/chunks/{DopSRBlm.js → D4gtBVLN.js} +1 -1
  74. package/web/app/immutable/chunks/{B9nat7hx.js → D4lP_X71.js} +1 -1
  75. package/web/app/immutable/chunks/{DjpjFygj.js → D5bd-ecJ.js} +1 -1
  76. package/web/app/immutable/chunks/{CDeldaOF.js → D5raGlU7.js} +2 -2
  77. package/web/app/immutable/chunks/{Ba4cYgvZ.js → D6W9Whdp.js} +3 -3
  78. package/web/app/immutable/chunks/{CSp6HTdW.js → D7u67tV0.js} +2 -2
  79. package/web/app/immutable/chunks/{BvKzoZLa.js → D8XqXEXt.js} +1 -1
  80. package/web/app/immutable/chunks/{B4ot6F6B.js → DCibR4Jk.js} +1 -1
  81. package/web/app/immutable/chunks/{DgV330Oe.js → DDFAsI-l.js} +1 -1
  82. package/web/app/immutable/chunks/{BLYYB2Pl.js → DIDOx8hd.js} +1 -1
  83. package/web/app/immutable/chunks/{Cbu0O7F_.js → DKHSbBis.js} +1 -1
  84. package/web/app/immutable/chunks/{BOLzaoLg.js → DOEOrBL9.js} +1 -1
  85. package/web/app/immutable/chunks/{hCk1hXVJ.js → DOMMuuHJ.js} +1 -1
  86. package/web/app/immutable/chunks/{zK-Wn6qa.js → DQGdnFBd.js} +1 -1
  87. package/web/app/immutable/chunks/{CHzHsjlJ.js → DY-U3TFa.js} +1 -1
  88. package/web/app/immutable/chunks/{9IHp8VDb.js → DZEGFjPx.js} +1 -1
  89. package/web/app/immutable/chunks/{Blp2y8Zh.js → DdJ4cD_u.js} +1 -1
  90. package/web/app/immutable/chunks/{wqzy1XTy.js → DeDQhZv5.js} +1 -1
  91. package/web/app/immutable/chunks/{CeWlRIsm.js → Deoe5X7L.js} +1 -1
  92. package/web/app/immutable/chunks/{5II1c2xL.js → DhW_HWBK.js} +1 -1
  93. package/web/app/immutable/chunks/{BoEPe-FL.js → DiP5BH15.js} +1 -1
  94. package/web/app/immutable/chunks/{bzfuMuVY.js → DmnStjtN.js} +1 -1
  95. package/web/app/immutable/chunks/{BVunuTwn.js → Dn7Cyi1s.js} +1 -1
  96. package/web/app/immutable/chunks/{i_Orzl3O.js → Domj4ONg.js} +2 -2
  97. package/web/app/immutable/chunks/{DnUdAfCR.js → DtEw_Okh.js} +1 -1
  98. package/web/app/immutable/chunks/{D-7b6BAb.js → DzsC5hAQ.js} +1 -1
  99. package/web/app/immutable/chunks/{BYeDxl_R.js → EmfdzzTF.js} +1 -1
  100. package/web/app/immutable/chunks/{C09ifoAC.js → IB26d-_M.js} +4 -4
  101. package/web/app/immutable/chunks/{Dec_LXa-.js → K0CA4l_-.js} +3 -3
  102. package/web/app/immutable/chunks/{DLMaiw5B.js → KS10KUQ4.js} +1 -1
  103. package/web/app/immutable/chunks/{0vLUv3ld.js → KaHKnBKn.js} +1 -1
  104. package/web/app/immutable/chunks/{CB9DABC0.js → L0PmMCK6.js} +1 -1
  105. package/web/app/immutable/chunks/{PD1TeEVF.js → NEcXJ8Qo.js} +1 -1
  106. package/web/app/immutable/chunks/{G4lPpFfF.js → P27dN3C7.js} +1 -1
  107. package/web/app/immutable/chunks/{Ro7n3ECj.js → RyWl3sPF.js} +1 -1
  108. package/web/app/immutable/chunks/{DfXFG9So.js → UaQjBP_O.js} +1 -1
  109. package/web/app/immutable/chunks/{DM81x_EL.js → Ydj2ePK_.js} +1 -1
  110. package/web/app/immutable/chunks/{z1Wv0MVw.js → YopO0YfH.js} +5 -5
  111. package/web/app/immutable/chunks/{7FS8g33K.js → ZWIGjqdM.js} +3 -3
  112. package/web/app/immutable/chunks/{DQlLBrpj.js → bcfKuKQn.js} +1 -1
  113. package/web/app/immutable/chunks/{i0zaZVKI.js → ebxZ5PPm.js} +1 -1
  114. package/web/app/immutable/chunks/{C3FNiYoh.js → iNDSBgu7.js} +1 -1
  115. package/web/app/immutable/chunks/{1_Sb4Kkv.js → kZL4nf_J.js} +4 -4
  116. package/web/app/immutable/chunks/{NUgfgzzR.js → my69Ox9w.js} +1 -1
  117. package/web/app/immutable/chunks/{BH4muXHE.js → pIjvEfMB.js} +3 -3
  118. package/web/app/immutable/chunks/{BtgBrLqZ.js → qg2KHuAY.js} +1 -1
  119. package/web/app/immutable/chunks/{CPCza4LC.js → qyBT4DY2.js} +1 -1
  120. package/web/app/immutable/chunks/{BkLeC-gf.js → rCkv5VsR.js} +1 -1
  121. package/web/app/immutable/chunks/{Aa4mTk2-.js → rHK6sLv4.js} +1 -1
  122. package/web/app/immutable/chunks/{j9buSIht.js → sEj9k2KM.js} +1 -1
  123. package/web/app/immutable/chunks/{CkmjUBxn.js → sZBOVpM6.js} +1 -1
  124. package/web/app/immutable/chunks/{CJpjySL_.js → tGL9OSFf.js} +1 -1
  125. package/web/app/immutable/chunks/{9Fwj-RCt.js → ucKP4cAm.js} +3 -3
  126. package/web/app/immutable/chunks/{COhzmnEo.js → x8bssjcx.js} +1 -1
  127. package/web/app/immutable/chunks/{Dwb4ijU4.js → xFC1lhKl.js} +1 -1
  128. package/web/app/immutable/chunks/{DXQ7EI2S.js → xIoxAtek.js} +1 -1
  129. package/web/app/immutable/entry/{app.CVv4zmJ_.js → app.YY31OTuo.js} +2 -2
  130. package/web/app/immutable/entry/start.DBl7cnaM.js +1 -0
  131. package/web/app/immutable/nodes/{0.Cb_UZQTB.js → 0.I2U7Nyeq.js} +1 -1
  132. package/web/app/immutable/nodes/{1.B0kBQ96l.js → 1.CgZVKAf9.js} +1 -1
  133. package/web/app/immutable/nodes/{10.CGIePvim.js → 10.CsryZO2H.js} +4 -4
  134. package/web/app/immutable/nodes/{11.DcWpM7Yi.js → 11.BTowiakT.js} +1 -1
  135. package/web/app/immutable/nodes/{15.DDtIC3Hq.js → 15.CzU59iiE.js} +1 -1
  136. package/web/app/immutable/nodes/{19.B1-CCqHR.js → 19.vtvcgUzO.js} +2 -2
  137. package/web/app/immutable/nodes/{2.CAFqSYBH.js → 2.xEZtPl1l.js} +4 -4
  138. package/web/app/immutable/nodes/{3.CNcHr_kX.js → 3.hyVEcKKo.js} +1 -1
  139. package/web/app/immutable/nodes/{4.BzoidTar.js → 4.CdWgO8Xv.js} +1 -1
  140. package/web/app/immutable/nodes/{5.vAApKfTG.js → 5.BhLUauX8.js} +1 -1
  141. package/web/app/immutable/nodes/{6.D2VrWob4.js → 6.B3Vi01S1.js} +1 -1
  142. package/web/app/immutable/nodes/{7.cIi2v_en.js → 7.DW7p588B.js} +1 -1
  143. package/web/app/immutable/nodes/{8.DVH30a1F.js → 8.Bt8gdMyu.js} +1 -1
  144. package/web/app/immutable/nodes/{9.AUZxhWIX.js → 9.BSZ1-MKZ.js} +4 -4
  145. package/web/app/version.json +1 -1
  146. package/web/index.html +9 -9
  147. package/web/app/immutable/entry/start.CiYvv3YQ.js +0 -1
@@ -1 +1 @@
1
- var De=Object.defineProperty;var Ce=(i,s,e)=>s in i?De(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var E=(i,s,e)=>Ce(i,typeof s!="symbol"?s+"":s,e);import{K as Le,P as ce,a6 as le,as as z,aC as ve}from"./QSHJFaU7.js";import{b_ as we,c_ as ue,cq as de,cp as be}from"./DwhE2_yv.js";import{Jr as p,C2 as Fe,bI as ke,i as Pe,Lw as me,ip as Ee,bU as Ge,D_ as H,Cr as xe,fk as Ve,Ax as Ue,e2 as fe,fg as _e,e1 as he,B0 as Be,La as $e,wu as Xe}from"./BPo1GPk4.js";import{aP as Se,dW as ge,A as K,P as Re,aK as Q}from"./DkYquFOp.js";import{h as We}from"./BpT_ybtH.js";import{c as q}from"./ChTqQfQN.js";import{a as qe}from"./BdWqymET.js";import{m as j}from"./D7vAVIvz.js";import"./3SdAC2_C.js";import{bm as n}from"./1KDVFF23.js";import"./D8B7qxXm.js";import"./Dmy603At.js";import"./jUAybD8G.js";import{R as pe}from"./B5aYN90J.js";import{L as Ye}from"./CSiaiLHL.js";function ze(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Te="confirmUnslothModelSwitch";function He(i){if(!i||typeof i!="object")return!1;const{agentId:s,agentName:e,workspaceId:t,workspaceTitle:r}=i;return typeof s=="string"&&typeof e=="string"&&typeof t=="string"&&(r===null||typeof r=="string")}function Ke(i){for(let s=i,e=0;s&&e<4;e++){const t=s.data;if(t&&typeof t=="object"){const{code:r,currentModel:a,requestedModel:l,agents:o}=t;if(r==="unsloth-model-switch-confirmation-required"&&typeof a=="string"&&typeof l=="string"&&Array.isArray(o)&&o.every(He))return{currentModel:a,requestedModel:l,agents:o}}s=s.cause}}function bt(i){if(!i||!(Te in i))return i;const{[Te]:s,...e}=i;return Object.keys(e).length>0?e:void 0}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new qe("PerformanceOptimizer"),w=class w{constructor(){E(this,"metricsBuffer");E(this,"metricsIndex",0);E(this,"metricsCount",0);E(this,"MAX_METRICS",500);E(this,"TARGET_RESPONSE_TIME",100);E(this,"memoCache",new Map);E(this,"MEMO_TTL",6e4);E(this,"MAX_CACHE_SIZE",100);E(this,"cacheHits",0);E(this,"cacheMisses",0);E(this,"pendingRequests",new Map);E(this,"requestQueue",[]);E(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let o=0;o<s.length;o+=r){const _=s.slice(o,o+r).map((c,R)=>{const g=Math.floor(R/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(c);d(k)},g)})}),u=await Promise.all(_);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const _=this.getMemoized(a);if(_!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),_;this.cacheMisses++}if(t.coalesce){const _=this.pendingRequests.get(s);if(_)return V.debug("Request coalesced",{operation:s}),_}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const o=await l;t.memoize&&this.memoize(a,o);const f=Z.now()-r;return this.recordMetric(s,f,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),f>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(f),target:this.TARGET_RESPONSE_TIME}),o}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const c=this.metricsBuffer[(e+u)%this.MAX_METRICS];c&&s.push(c)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,c)=>u.duration-c.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const o=a/s.length,f=Math.floor(t.length*.95),_=Math.floor(t.length*.99);return{avgResponseTime:Math.round(o),p95ResponseTime:Math.round(t[f]?.duration||0),p99ResponseTime:Math.round(t[_]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};E(w,"instance");let te=w;const Qe=te.getInstance(),Ae={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},J={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},je={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function Ze(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Je(i,s){return Ze(i).every(t=>t in s)}function Oe(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function ee(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function et(i,s){return s&&J[i]&&Je(J[i],s)?Oe(J[i],s):je[i]||n.errors_userFriendly_fallback_error()}function tt(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?Ae[e]:Ae.GENERAL}const st={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function it(i){return st[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var N=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(N||{});class W extends Error{constructor(e,t,r={},a){super(e);E(this,"code");E(this,"context");E(this,"recoverySuggestions");E(this,"userMessage");E(this,"isRecoverable");E(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return et(e,this.context)}getDefaultRecoverySuggestions(e){return it(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return tt(this.code)}formatMessage(e){return Oe(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const rt={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function re(i){const s=i.toLowerCase();for(const e of rt.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const at="Agent already has an in-flight prompt. Message was not delivered.",v=q("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=pe.DEFAULT_ATTEMPTS,retryDelay:a=pe.BASE_DELAY,exponentialBackoff:l=!0,notify:o=!1,notifyOnRetry:f=!1,context:_={},onError:u,onRetry:c,shouldRetry:R=this.defaultShouldRetry}=t;let g=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const C=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),C}catch(C){if(g=C,v.error(`[${e}] Attempt ${d} failed`,{error:g.message,attempt:d,maxAttempts:r+1,context:_}),u?.(g,d),d<=r&&R(g)){const h=l?a*Math.pow(2,d-1):a;f&&j.warning(n.agent_errorBoundary_retrying_message({seconds:h/1e3})),c?.(d),v.info(`[${e}] Retrying in ${h}ms`),await this.sleep(h)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${g?.message}`,G=ee(g?.message||n.agent_errorBoundary_generic_error()),D=g?.message?.toLowerCase()||"",$=D.includes("no available models")||D.includes("all models exhausted")||D.includes("all models unavailable");throw o&&!$&&j.error(G),new W(G,N.OPERATION_FAILED,{originalError:g?.message,detailedMessage:k,attempts:d,context:_})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&j.error(ee(a.message)),new W(ee(a.message),N.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return re(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof W?[N.NETWORK_ERROR,N.STREAM_TIMEOUT,N.STREAM_CONNECTION_FAILED,N.PROVIDER_CONNECTION_FAILED,N.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new W(`${t} timed out after ${e}ms`,N.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,o=[],f=[];for(let _=0;_<s.length;_+=r){const u=s.slice(_,_+r);(await Promise.allSettled(u.map(R=>e(R)))).forEach((R,g)=>{if(R.status==="fulfilled")o.push(R.value);else{const d=R.reason;if(f.push({item:u[g],error:d}),v.error(`[${l}] Batch item failed`,{item:u[g],error:d.message}),!a)throw d}})}return f.length>0&&v.warn(`[${l}] Completed with ${f.length} errors`),{results:o,errors:f}}};E(b,"instance");let se=b;const nt=se.getInstance(),ie=q("browser/index"),F=new Map,B=new Map;let U;function ot(i,s,e){for(const t of s)try{t(e)}catch(r){ie.error("Error in agent subscriber callback",{agentId:i,error:r})}}function ct(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Se.select(e,t);B.get(t)!==a&&(B.set(t,a),ot(t,r,a))}})}function lt(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ft(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),ct();const a=p.state,l=Se.select(a,i);return r&&B.set(i,l),l?ie.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):ie.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const o=F.get(i);o&&(o.delete(s),o.size===0&&(F.delete(i),B.delete(i))),lt()}}const y=q("ErrorRecovery"),ye={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||re(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class ut{constructor(){E(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class dt extends ut{constructor(){super(...arguments);E(this,"activeRecoveries",new Map);E(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=ye.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let o,f=t.initialBackoffMs,_=0;for(let u=1;u<=t.maxRetries;u++){if(_=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const c=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:c,attempts:u,totalTime:Date.now()-a}}catch(c){o=c,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:o.message});const R=o.message.toLowerCase();if(R.includes("interrupted")||R.includes("cancelled")||R.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:o.message});break}if(R.includes("no available models")||R.includes("all models exhausted")||R.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:o.message});break}if(re(o.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:o.message});break}if(!t.shouldRetry(o,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:o.message});break}if(u<t.maxRetries){const g=Math.random()*.2*f,d=Math.min(f+g,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:o.message}),await this.delay(d,l.signal),f=Math.min(f*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(o,_),this.emit("recovery:failure",{operationId:r,attempts:_,duration:Date.now()-a,error:o?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:o,attempts:_,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const o=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",o);const f=r;r=()=>{t.removeEventListener("abort",o),f()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const mt=new dt,O=new Ye({category:"WorkspaceMetrics"}),Et=100;class ft{constructor(){E(this,"metrics",new Map);E(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>Et;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const _t=new ft,M=q("AgentSend");function A(i){p.dispatch(i)}function Ie(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function ht(i){const s=Ie(i)&&i.success===!0&&"data"in i?i.data:i;return!Ie(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(at)}async function kt(i,s,e,t={}){const r=ge.select(p.state,e.id);if(!r)return;const a=Le(i,e.id),l=t.submission,o=!!l&&we.select(p.state,l.scope)?.supported===!0,f=(c,R,g=!1)=>{l&&A(Xe(l.scope,l.id,c,Date.now(),R,g))};let _=!1;const u=()=>(!l||_||be.select(p.state,l))&&r===ge.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return Qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let c=await p.dispatch(Fe(e.id,i));if(u()){if(!c)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));c={...c,isStreaming:c.isStreaming??!1};{if(c&&(c.status==="pending"||!c.id)&&!c.backendSessionId&&c.activationState!==K.ACTIVE&&c.activationState!==K.ACTIVATING){const h=e.id.startsWith("optimistic-"),Y=e.worktreePath||e.repositoryPath||e.path;if(!h&&Y){M.info("Activating pending session in sendMessage",{agentId:i,status:c.status,activationState:c.activationState,hasBackendSessionId:!!c.backendSessionId});const x=await p.dispatch(ke(e.id,i));if(!u())return;x&&(c=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else c&&c.status==="pending"&&c.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:c.backendSessionId,activationState:c.activationState}),c={...c,status:Pe.Active,activationState:K.ACTIVE},A(me({...c,workspaceId:e.id})));if(!c)throw new Error(`Failed to get or create session for agent ${i}`);A(me({...c,workspaceId:e.id}));const g=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)g.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)g.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??ce(),k=t.messageMetadata?.[Re],G={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[Re]:k}:{}},D={id:Ee(ue()),appMessageId:d,role:"user",contentBlocks:g,timestamp:new Date().toISOString(),metadata:{...G,...t.messageMetadata??{}}};o||(l&&(f("rejected"),_=!0),A(Ge(c.id,D))),A(H(c.id,!0));let $=!1,C;try{o||await p.dispatch(xe(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=Ee(`msg_${ue()}`),Y=ce(),x=async()=>nt.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:c.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(m=>({type:m.type,mimeType:m.mimeType,dataLength:m.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(m=>({type:m.type,fileName:m.fileName,mimeType:m.mimeType,attachmentId:m.attachmentId,size:m.size}))||[]});const Me=t.model??t.modelId??c.model??void 0;A(Ve(i));const Ne=le(i,e.id),ne=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await We("agent.sendMessage",{agentId:i,...o&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Me,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:Y,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(m=>{if(u())throw Ke(m)&&(C=m),m});if(u()){if(ht(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:c.id}),f("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const m=T.error,I=typeof m=="string"?m:m?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:c.id,queuedMessageId:T.queuedMessage?.id}),(!o||!l||!de.select(p.state,l))&&A(H(c.id,!1)),o||A(Ue(c.id,D.id)),o){const I=T.queuedMessage,P=T.turnId,L=typeof P=="string"?P:I?.turnId;if(I&&typeof L=="string"){const S=fe(s,t),X=Q.select(p.state,i,e.id).find(oe=>oe.id===I.id||oe.turnId===L);A(_e(i,I.id,S,L,he(X??I,S),!X&&!!l&&de.select(p.state,l),ne))}f("accepted",I,!0),z(i,e.id);return}const m=T.queuedMessage;if(m){const I=T.turnId,P=typeof I=="string"?I:m.turnId;let L=m;if(u()&&le(i,e.id)===Ne){const S=Q.select(p.state,i,e.id),X=ze(S,m);A(Be(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:m.id}),await z(i,e.id).catch(()=>{}),L=Q.select(p.state,i,e.id).find(S=>S.id===m.id||S.turnId===P));if(u()&&typeof P=="string"){const S=fe(s,t);A(_e(i,m.id,S,P,he(L??m,S),!L,ne))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:m.id})}return}}o&&(f("accepted"),z(i,e.id),ve(i,e.id)),_t.incrementMessageSent(e.id)}},"send message",{retries:o?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),ae=o?await x().then(()=>({success:!0,error:void 0})):await mt.executeWithRecovery(x,ye.streaming,`send-message-${i}`);if(!ae.success)throw ae.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(H(c.id,!1)),!o&&t.messageMetadata&&A($e(c.id,D.id,{metadata:G})),o&&f($||C?"rejected":"uncertain"),C??h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Te as U,Ft as a,ee as c,ze as r,kt as s,Ke as u,bt as w};
1
+ var De=Object.defineProperty;var Ce=(i,s,e)=>s in i?De(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var E=(i,s,e)=>Ce(i,typeof s!="symbol"?s+"":s,e);import{K as Le,P as ce,a6 as le,as as z,aC as ve}from"./CpIVKWwx.js";import{b_ as we,c_ as ue,cq as de,cp as be}from"./Cvp_IOBl.js";import{Jr as p,C2 as Fe,bI as ke,i as Pe,Lw as me,ip as Ee,bU as Ge,D_ as H,Cr as xe,fk as Ve,Ax as Ue,e2 as fe,fg as _e,e1 as he,B0 as Be,La as $e,wu as Xe}from"./BPo1GPk4.js";import{aP as Se,dW as ge,A as K,P as Re,aK as Q}from"./DkYquFOp.js";import{h as We}from"./BpT_ybtH.js";import{c as q}from"./ChTqQfQN.js";import{a as qe}from"./BdWqymET.js";import{m as j}from"./D7vAVIvz.js";import"./3SdAC2_C.js";import{bm as n}from"./1KDVFF23.js";import"./D8B7qxXm.js";import"./Dmy603At.js";import"./jUAybD8G.js";import{R as pe}from"./B5aYN90J.js";import{L as Ye}from"./CSiaiLHL.js";function ze(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Te="confirmUnslothModelSwitch";function He(i){if(!i||typeof i!="object")return!1;const{agentId:s,agentName:e,workspaceId:t,workspaceTitle:r}=i;return typeof s=="string"&&typeof e=="string"&&typeof t=="string"&&(r===null||typeof r=="string")}function Ke(i){for(let s=i,e=0;s&&e<4;e++){const t=s.data;if(t&&typeof t=="object"){const{code:r,currentModel:a,requestedModel:l,agents:o}=t;if(r==="unsloth-model-switch-confirmation-required"&&typeof a=="string"&&typeof l=="string"&&Array.isArray(o)&&o.every(He))return{currentModel:a,requestedModel:l,agents:o}}s=s.cause}}function bt(i){if(!i||!(Te in i))return i;const{[Te]:s,...e}=i;return Object.keys(e).length>0?e:void 0}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new qe("PerformanceOptimizer"),w=class w{constructor(){E(this,"metricsBuffer");E(this,"metricsIndex",0);E(this,"metricsCount",0);E(this,"MAX_METRICS",500);E(this,"TARGET_RESPONSE_TIME",100);E(this,"memoCache",new Map);E(this,"MEMO_TTL",6e4);E(this,"MAX_CACHE_SIZE",100);E(this,"cacheHits",0);E(this,"cacheMisses",0);E(this,"pendingRequests",new Map);E(this,"requestQueue",[]);E(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let o=0;o<s.length;o+=r){const _=s.slice(o,o+r).map((c,R)=>{const g=Math.floor(R/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(c);d(k)},g)})}),u=await Promise.all(_);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const _=this.getMemoized(a);if(_!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),_;this.cacheMisses++}if(t.coalesce){const _=this.pendingRequests.get(s);if(_)return V.debug("Request coalesced",{operation:s}),_}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const o=await l;t.memoize&&this.memoize(a,o);const f=Z.now()-r;return this.recordMetric(s,f,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),f>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(f),target:this.TARGET_RESPONSE_TIME}),o}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const c=this.metricsBuffer[(e+u)%this.MAX_METRICS];c&&s.push(c)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,c)=>u.duration-c.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const o=a/s.length,f=Math.floor(t.length*.95),_=Math.floor(t.length*.99);return{avgResponseTime:Math.round(o),p95ResponseTime:Math.round(t[f]?.duration||0),p99ResponseTime:Math.round(t[_]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};E(w,"instance");let te=w;const Qe=te.getInstance(),Ae={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},J={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},je={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function Ze(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Je(i,s){return Ze(i).every(t=>t in s)}function Oe(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function ee(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function et(i,s){return s&&J[i]&&Je(J[i],s)?Oe(J[i],s):je[i]||n.errors_userFriendly_fallback_error()}function tt(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?Ae[e]:Ae.GENERAL}const st={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function it(i){return st[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var N=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(N||{});class W extends Error{constructor(e,t,r={},a){super(e);E(this,"code");E(this,"context");E(this,"recoverySuggestions");E(this,"userMessage");E(this,"isRecoverable");E(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return et(e,this.context)}getDefaultRecoverySuggestions(e){return it(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return tt(this.code)}formatMessage(e){return Oe(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const rt={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function re(i){const s=i.toLowerCase();for(const e of rt.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const at="Agent already has an in-flight prompt. Message was not delivered.",v=q("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=pe.DEFAULT_ATTEMPTS,retryDelay:a=pe.BASE_DELAY,exponentialBackoff:l=!0,notify:o=!1,notifyOnRetry:f=!1,context:_={},onError:u,onRetry:c,shouldRetry:R=this.defaultShouldRetry}=t;let g=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const C=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),C}catch(C){if(g=C,v.error(`[${e}] Attempt ${d} failed`,{error:g.message,attempt:d,maxAttempts:r+1,context:_}),u?.(g,d),d<=r&&R(g)){const h=l?a*Math.pow(2,d-1):a;f&&j.warning(n.agent_errorBoundary_retrying_message({seconds:h/1e3})),c?.(d),v.info(`[${e}] Retrying in ${h}ms`),await this.sleep(h)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${g?.message}`,G=ee(g?.message||n.agent_errorBoundary_generic_error()),D=g?.message?.toLowerCase()||"",$=D.includes("no available models")||D.includes("all models exhausted")||D.includes("all models unavailable");throw o&&!$&&j.error(G),new W(G,N.OPERATION_FAILED,{originalError:g?.message,detailedMessage:k,attempts:d,context:_})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&j.error(ee(a.message)),new W(ee(a.message),N.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return re(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof W?[N.NETWORK_ERROR,N.STREAM_TIMEOUT,N.STREAM_CONNECTION_FAILED,N.PROVIDER_CONNECTION_FAILED,N.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new W(`${t} timed out after ${e}ms`,N.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,o=[],f=[];for(let _=0;_<s.length;_+=r){const u=s.slice(_,_+r);(await Promise.allSettled(u.map(R=>e(R)))).forEach((R,g)=>{if(R.status==="fulfilled")o.push(R.value);else{const d=R.reason;if(f.push({item:u[g],error:d}),v.error(`[${l}] Batch item failed`,{item:u[g],error:d.message}),!a)throw d}})}return f.length>0&&v.warn(`[${l}] Completed with ${f.length} errors`),{results:o,errors:f}}};E(b,"instance");let se=b;const nt=se.getInstance(),ie=q("browser/index"),F=new Map,B=new Map;let U;function ot(i,s,e){for(const t of s)try{t(e)}catch(r){ie.error("Error in agent subscriber callback",{agentId:i,error:r})}}function ct(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Se.select(e,t);B.get(t)!==a&&(B.set(t,a),ot(t,r,a))}})}function lt(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ft(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),ct();const a=p.state,l=Se.select(a,i);return r&&B.set(i,l),l?ie.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):ie.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const o=F.get(i);o&&(o.delete(s),o.size===0&&(F.delete(i),B.delete(i))),lt()}}const y=q("ErrorRecovery"),ye={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||re(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class ut{constructor(){E(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class dt extends ut{constructor(){super(...arguments);E(this,"activeRecoveries",new Map);E(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=ye.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let o,f=t.initialBackoffMs,_=0;for(let u=1;u<=t.maxRetries;u++){if(_=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const c=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:c,attempts:u,totalTime:Date.now()-a}}catch(c){o=c,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:o.message});const R=o.message.toLowerCase();if(R.includes("interrupted")||R.includes("cancelled")||R.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:o.message});break}if(R.includes("no available models")||R.includes("all models exhausted")||R.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:o.message});break}if(re(o.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:o.message});break}if(!t.shouldRetry(o,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:o.message});break}if(u<t.maxRetries){const g=Math.random()*.2*f,d=Math.min(f+g,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:o.message}),await this.delay(d,l.signal),f=Math.min(f*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(o,_),this.emit("recovery:failure",{operationId:r,attempts:_,duration:Date.now()-a,error:o?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:o,attempts:_,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const o=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",o);const f=r;r=()=>{t.removeEventListener("abort",o),f()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const mt=new dt,O=new Ye({category:"WorkspaceMetrics"}),Et=100;class ft{constructor(){E(this,"metrics",new Map);E(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>Et;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const _t=new ft,M=q("AgentSend");function A(i){p.dispatch(i)}function Ie(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function ht(i){const s=Ie(i)&&i.success===!0&&"data"in i?i.data:i;return!Ie(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(at)}async function kt(i,s,e,t={}){const r=ge.select(p.state,e.id);if(!r)return;const a=Le(i,e.id),l=t.submission,o=!!l&&we.select(p.state,l.scope)?.supported===!0,f=(c,R,g=!1)=>{l&&A(Xe(l.scope,l.id,c,Date.now(),R,g))};let _=!1;const u=()=>(!l||_||be.select(p.state,l))&&r===ge.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return Qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let c=await p.dispatch(Fe(e.id,i));if(u()){if(!c)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));c={...c,isStreaming:c.isStreaming??!1};{if(c&&(c.status==="pending"||!c.id)&&!c.backendSessionId&&c.activationState!==K.ACTIVE&&c.activationState!==K.ACTIVATING){const h=e.id.startsWith("optimistic-"),Y=e.worktreePath||e.repositoryPath||e.path;if(!h&&Y){M.info("Activating pending session in sendMessage",{agentId:i,status:c.status,activationState:c.activationState,hasBackendSessionId:!!c.backendSessionId});const x=await p.dispatch(ke(e.id,i));if(!u())return;x&&(c=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else c&&c.status==="pending"&&c.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:c.backendSessionId,activationState:c.activationState}),c={...c,status:Pe.Active,activationState:K.ACTIVE},A(me({...c,workspaceId:e.id})));if(!c)throw new Error(`Failed to get or create session for agent ${i}`);A(me({...c,workspaceId:e.id}));const g=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)g.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)g.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??ce(),k=t.messageMetadata?.[Re],G={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[Re]:k}:{}},D={id:Ee(ue()),appMessageId:d,role:"user",contentBlocks:g,timestamp:new Date().toISOString(),metadata:{...G,...t.messageMetadata??{}}};o||(l&&(f("rejected"),_=!0),A(Ge(c.id,D))),A(H(c.id,!0));let $=!1,C;try{o||await p.dispatch(xe(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=Ee(`msg_${ue()}`),Y=ce(),x=async()=>nt.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:c.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(m=>({type:m.type,mimeType:m.mimeType,dataLength:m.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(m=>({type:m.type,fileName:m.fileName,mimeType:m.mimeType,attachmentId:m.attachmentId,size:m.size}))||[]});const Me=t.model??t.modelId??c.model??void 0;A(Ve(i));const Ne=le(i,e.id),ne=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await We("agent.sendMessage",{agentId:i,...o&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Me,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:Y,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(m=>{if(u())throw Ke(m)&&(C=m),m});if(u()){if(ht(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:c.id}),f("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const m=T.error,I=typeof m=="string"?m:m?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:c.id,queuedMessageId:T.queuedMessage?.id}),(!o||!l||!de.select(p.state,l))&&A(H(c.id,!1)),o||A(Ue(c.id,D.id)),o){const I=T.queuedMessage,P=T.turnId,L=typeof P=="string"?P:I?.turnId;if(I&&typeof L=="string"){const S=fe(s,t),X=Q.select(p.state,i,e.id).find(oe=>oe.id===I.id||oe.turnId===L);A(_e(i,I.id,S,L,he(X??I,S),!X&&!!l&&de.select(p.state,l),ne))}f("accepted",I,!0),z(i,e.id);return}const m=T.queuedMessage;if(m){const I=T.turnId,P=typeof I=="string"?I:m.turnId;let L=m;if(u()&&le(i,e.id)===Ne){const S=Q.select(p.state,i,e.id),X=ze(S,m);A(Be(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:m.id}),await z(i,e.id).catch(()=>{}),L=Q.select(p.state,i,e.id).find(S=>S.id===m.id||S.turnId===P));if(u()&&typeof P=="string"){const S=fe(s,t);A(_e(i,m.id,S,P,he(L??m,S),!L,ne))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:m.id})}return}}o&&(f("accepted"),z(i,e.id),ve(i,e.id)),_t.incrementMessageSent(e.id)}},"send message",{retries:o?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),ae=o?await x().then(()=>({success:!0,error:void 0})):await mt.executeWithRecovery(x,ye.streaming,`send-message-${i}`);if(!ae.success)throw ae.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(H(c.id,!1)),!o&&t.messageMetadata&&A($e(c.id,D.id,{metadata:G})),o&&f($||C?"rejected":"uncertain"),C??h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Te as U,Ft as a,ee as c,ze as r,kt as s,Ke as u,bt as w};
@@ -1,4 +1,4 @@
1
- import{p as I}from"./CjCvg4fu.js";import{aZ as _,U as E,Y as F,b0 as D,V as P,a_ as z,b as c,aX as G,r as B,q as w,W as C,O as W,ay as b,a6 as V,B as H}from"./1_Sb4Kkv.js";import{p as U}from"./DcZr-m_l.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:m},x=structuredClone(A),X=W.radar,j=c(()=>w({...X,...C().radar}),"getConfig"),M=c(()=>x.axes,"getAxes"),Y=c(()=>x.curves,"getCurves"),Z=c(()=>x.options,"getOptions"),q=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),K=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:N(t.entries)}))},"setCurves"),N=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule},x.options.ticks>y&&(b.warn(`Radar diagram ticks (${x.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),x.options.ticks=y)},"setOptions"),Q=c(()=>{B(),x=structuredClone(A)},"clear"),$={getAxes:M,getCurves:Y,getOptions:Z,setAxes:q,setCurves:K,setOptions:J,getConfig:j,clear:Q,setAccTitle:z,getAccTitle:P,setDiagramTitle:D,getDiagramTitle:F,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await U("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=G(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(S,"closedRoundCurve");function k(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
1
+ import{p as I}from"./BdNdGDSe.js";import{aZ as _,U as E,Y as F,b0 as D,V as P,a_ as z,b as c,aX as G,r as B,q as w,W as C,O as W,ay as b,a6 as V,B as H}from"./kZL4nf_J.js";import{p as U}from"./DcZr-m_l.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:m},x=structuredClone(A),X=W.radar,j=c(()=>w({...X,...C().radar}),"getConfig"),M=c(()=>x.axes,"getAxes"),Y=c(()=>x.curves,"getCurves"),Z=c(()=>x.options,"getOptions"),q=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),K=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:N(t.entries)}))},"setCurves"),N=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule},x.options.ticks>y&&(b.warn(`Radar diagram ticks (${x.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),x.options.ticks=y)},"setOptions"),Q=c(()=>{B(),x=structuredClone(A)},"clear"),$={getAxes:M,getCurves:Y,getOptions:Z,setAxes:q,setCurves:K,setOptions:J,getConfig:j,clear:Q,setAccTitle:z,getAccTitle:P,setDiagramTitle:D,getDiagramTitle:F,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await U("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=G(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(S,"closedRoundCurve");function k(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
2
  .radarCurve-${r} {
3
3
  color: ${s};
4
4
  fill: ${s};
@@ -1,4 +1,4 @@
1
- import{g as Ut}from"./BXB-ioXM.js";import{s as Kt}from"./DMdq0QC2.js";import{b as f,C as Tt,a_ as Zt,V as jt,aZ as Wt,U as qt,b0 as Ht,Y as Qt,X as tt,ay as F,z as Xt,r as Jt,$ as $t,am as te,aU as ee,ab as se,aG as ie,aT as re,p as ae,_ as ne,a1 as oe,aP as ce,aW as le,bh as he}from"./1_Sb4Kkv.js";var Ct=(function(){var s=f(function(G,n,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=n);return l},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],C=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],N=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],W=[43,51,53,54,55,74,75],q=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},s(a,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(W,[2,77]),s(W,[2,78]),s(W,[2,79]),s(W,[2,80]),s(W,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},{12:q,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:q,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Nt,[2,82]),s(Nt,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:q,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:q,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:q,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,l){if(l.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=l,d}},"parseError"),parse:f(function(n){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
1
+ import{g as Ut}from"./CGx1Vpie.js";import{s as Kt}from"./BjRLyMd2.js";import{b as f,C as Tt,a_ as Zt,V as jt,aZ as Wt,U as qt,b0 as Ht,Y as Qt,X as tt,ay as F,z as Xt,r as Jt,$ as $t,am as te,aU as ee,ab as se,aG as ie,aT as re,p as ae,_ as ne,a1 as oe,aP as ce,aW as le,bh as he}from"./kZL4nf_J.js";var Ct=(function(){var s=f(function(G,n,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=n);return l},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],C=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],N=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],W=[43,51,53,54,55,74,75],q=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},s(a,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(W,[2,77]),s(W,[2,78]),s(W,[2,79]),s(W,[2,80]),s(W,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},{12:q,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:q,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Nt,[2,82]),s(Nt,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:q,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:q,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:q,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,l){if(l.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=l,d}},"parseError"),parse:f(function(n){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
2
2
  `+m.showPosition()+`
3
3
  Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(lt+1)+": Unexpected "+(E==Lt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:mt,expected:ut})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(T[0]){case 1:d.push(E),_.push(m.yytext),t.push(m.yylloc),d.push(T[1]),E=null,Dt=m.yyleng,e=m.yytext,lt=m.yylineno,mt=m.yylloc;break;case 2:if(R=this.productions_[T[1]][1],U.$=_[_.length-R],U._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},Pt&&(U._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(U,[e,Dt,lt,Y.yy,T[1],_,t].concat(Yt)),typeof Et<"u")return Et;R&&(d=d.slice(0,-1*R*2),_=_.slice(0,-1*R),t=t.slice(0,-1*R)),d.push(this.productions_[T[1]][0]),_.push(U.$),t.push(U._$),Vt=$[d[d.length-2]][d[d.length-1]],d.push(Vt);break;case 3:return!0}}return!0},"parse")},Gt=(function(){var G={EOF:1,parseError:f(function(l,d){if(this.yy.parser)this.yy.parser.parseError(l,d);else throw new Error(l)},"parseError"),setInput:f(function(n,l){return this.yy=l||this.yy||{},this._input=n,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:f(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var l=n.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:f(function(n){var l=n.length,d=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var i=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),d.length-1&&(this.yylineno-=d.length-1);var _=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:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(n){this.unput(this.match.slice(n))},"less"),pastInput:f(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var n=this.pastInput(),l=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DiEy7mCR.js","/app/immutable/chunks/J9vGyyn3.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/1KDVFF23.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/nodes/0.Cb_UZQTB.js","/app/immutable/chunks/Dmy603At.js","/app/immutable/chunks/Zg9SWWIQ.js","/app/immutable/chunks/Dhj-Oo-y.js","/app/immutable/chunks/BIv0yV05.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/BPo1GPk4.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/PtMxuYy8.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/MujvTDgv.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/C7Ibt0hX.js","/app/immutable/chunks/CSp6HTdW.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/assets/0.D54btMV6.css","/app/immutable/nodes/1.B0kBQ96l.js","/app/immutable/chunks/z1Wv0MVw.js","/app/immutable/chunks/BrRuqfTp.js","/app/immutable/chunks/BZytk_HL.js","/app/immutable/chunks/DpSAF6fh.js","/app/immutable/chunks/D8B7qxXm.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CYCawVEx.js","/app/immutable/chunks/DPbnmxjX.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/BpT_ybtH.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/nodes/2.CAFqSYBH.js","/app/immutable/chunks/BWBQA0E0.js","/app/immutable/chunks/DkYquFOp.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CntPxeXh.js","/app/immutable/chunks/D283eGmG.js","/app/immutable/chunks/BgxLwwHQ.js","/app/immutable/chunks/DxrRvklK.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DQmW4_9G.js","/app/immutable/chunks/Wg-KBN6b.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/Q-Hp56ht.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DwhE2_yv.js","/app/immutable/chunks/CHHUtp07.js","/app/immutable/chunks/D7vAVIvz.js","/app/immutable/chunks/jUAybD8G.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/CjK2zm52.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/CMgAi196.js","/app/immutable/chunks/BblwdMxR.js","/app/immutable/chunks/BIwMjRQQ.js","/app/immutable/chunks/DM4cCUDd.js","/app/immutable/chunks/LqBZITyo.js","/app/immutable/chunks/2WaF6vs_.js","/app/immutable/chunks/DM81x_EL.js","/app/immutable/chunks/D4WPlvMg.js","/app/immutable/chunks/BtT-JO5g.js","/app/immutable/chunks/DKIi_opT.js","/app/immutable/chunks/BH4muXHE.js","/app/immutable/chunks/CQcEqK4G.js","/app/immutable/chunks/C7hm9bSX.js","/app/immutable/chunks/CmdE1AJL.js","/app/immutable/chunks/nHwpsxWy.js","/app/immutable/chunks/BuFlry2f.js","/app/immutable/chunks/QSHJFaU7.js","/app/immutable/chunks/DXf8KXiZ.js","/app/immutable/chunks/B4wiFjXK.js","/app/immutable/chunks/reP1x2hx.js","/app/immutable/chunks/B6Zf-ZTX.js","/app/immutable/chunks/B-lpv6Gv.js","/app/immutable/chunks/Bco7_wmI.js","/app/immutable/chunks/C_BHeuK7.js","/app/immutable/chunks/Ch-pFfsN.js","/app/immutable/chunks/IdqO6uHC.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/CBLFNmYJ.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/YqTahsxp.js","/app/immutable/chunks/CuAAvi1f.js","/app/immutable/chunks/BA7mfVzm.js","/app/immutable/chunks/CPEu2Vil.js","/app/immutable/chunks/CkrblKaH.js","/app/immutable/chunks/Bu13V5mO.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/COhzmnEo.js","/app/immutable/chunks/CSiaiLHL.js","/app/immutable/chunks/C0nXBDlv.js","/app/immutable/chunks/CEgHOs22.js","/app/immutable/chunks/H2jLkRRS.js","/app/immutable/chunks/DJk5np0g.js","/app/immutable/chunks/BO4HougN.js","/app/immutable/chunks/DS5B84mn.js","/app/immutable/chunks/DbSttgXv.js","/app/immutable/chunks/a0CN3en2.js","/app/immutable/chunks/CN0Csvus.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/BzW_moTi.js","/app/immutable/chunks/0vLUv3ld.js","/app/immutable/chunks/xJBWkpxc.js","/app/immutable/chunks/1wMLd-77.js","/app/immutable/chunks/BjLb7AHW.js","/app/immutable/chunks/dIyiVmNx.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/CQQvsDes.js","/app/immutable/assets/SettingsPage.CKvEnOAL.css","/app/immutable/chunks/471Fgn_p.js","/app/immutable/chunks/Dzl5aoA8.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DPLDRqMC.js","/app/immutable/chunks/BMfUzLG6.js","/app/immutable/chunks/zzl2tBQf.js","/app/immutable/chunks/8PIbpdJu.js","/app/immutable/chunks/DkY0xIi7.js","/app/immutable/chunks/DHbv9I-C.js","/app/immutable/chunks/CtguhKZB.js","/app/immutable/chunks/DYGC3eZn.js","/app/immutable/chunks/C3iIVLbv.js","/app/immutable/chunks/BPx3dFHu.js","/app/immutable/assets/checkbox.D429NJZk.css","/app/immutable/chunks/7n3mxV6t.js","/app/immutable/chunks/CJJ2D2db.js","/app/immutable/chunks/aqQCGQpk.js","/app/immutable/assets/select-viewport.CV-KWLNP.css","/app/immutable/chunks/DHSWOw-U.js","/app/immutable/assets/directory-picker-service.Eai7L_H2.css","/app/immutable/chunks/p0fS0rJD.js","/app/immutable/assets/DictationStopButton.DWUPhcKi.css","/app/immutable/chunks/DtYDlbcb.js","/app/immutable/chunks/Mw2Z7eLx.js","/app/immutable/chunks/q9cUG1dc.js","/app/immutable/chunks/CSepGuJ-.js","/app/immutable/chunks/Dfq_rEeO.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CBmGf0Ke.js","/app/immutable/chunks/DT8FaJbg.js","/app/immutable/chunks/THm8CnE2.js","/app/immutable/chunks/DTpQzThG.js","/app/immutable/chunks/CL6yJ0UM.js","/app/immutable/chunks/9Fwj-RCt.js","/app/immutable/chunks/CfCk_l9B.js","/app/immutable/chunks/Br9RT7xb.js","/app/immutable/chunks/Div7CQPf.js","/app/immutable/chunks/CqsFOLCu.js","/app/immutable/chunks/7FS8g33K.js","/app/immutable/chunks/CRWeEeIp.js","/app/immutable/chunks/D_xvUCUD.js","/app/immutable/chunks/KImhPY_I.js","/app/immutable/chunks/D4XPYll-.js","/app/immutable/chunks/Bek4Es60.js","/app/immutable/chunks/BcEldzTj.js","/app/immutable/assets/AgentAvatar.CZKKHyEm.css","/app/immutable/assets/avatar-state.BzFIexJN.css","/app/immutable/chunks/BYBN65Dm.js","/app/immutable/assets/TipTapEditor.BmeA7Qtk.css","/app/immutable/chunks/CWFWI1JB.js","/app/immutable/chunks/DiLFzwi3.js","/app/immutable/assets/AttachmentPreview.D_hsaikk.css","/app/immutable/chunks/zaxjdjiF.js","/app/immutable/chunks/-Hb5Lymn.js","/app/immutable/chunks/DqFGUV9A.js","/app/immutable/chunks/DjBxG6q0.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/C-BsEdGZ.js","/app/immutable/chunks/Qzhec1TY.js","/app/immutable/chunks/A0p6PvBn.js","/app/immutable/chunks/C09ifoAC.js","/app/immutable/chunks/D-N7efrx.js","/app/immutable/chunks/DVok8lSR.js","/app/immutable/chunks/BlXvVwTG.js","/app/immutable/chunks/fFnyP4ej.js","/app/immutable/assets/CompactWorkspaceInitializer.i4vCnRqW.css","/app/immutable/chunks/B8tcC_lC.js","/app/immutable/chunks/Y4Eu_VSz.js","/app/immutable/assets/workspace-key-menu.DrT-Fxqq.css","/app/immutable/chunks/BalE-G27.js","/app/immutable/chunks/DqPe5uyz.js","/app/immutable/chunks/Ow3KARwj.js","/app/immutable/chunks/Dv6PZjTW.js","/app/immutable/chunks/Ba4cYgvZ.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/assets/MarkdownViewer.D2MexjjT.css","/app/immutable/chunks/goTpbPhD.js","/app/immutable/chunks/CGcJ5lqH.js","/app/immutable/chunks/Ca9qLvAG.js","/app/immutable/chunks/CXXVPWBH.js","/app/immutable/chunks/CdpTO1ew.js","/app/immutable/chunks/i_Orzl3O.js","/app/immutable/chunks/CALsJq65.js","/app/immutable/chunks/gY6D1J3N.js","/app/immutable/chunks/CCEqDzPP.js","/app/immutable/chunks/wfSdTH77.js","/app/immutable/assets/Terminal.Ddek5eNE.css","/app/immutable/chunks/Bo5PTszQ.js","/app/immutable/assets/AgentAvatarStack.DOhClFuX.css","/app/immutable/chunks/BbIcudMY.js","/app/immutable/assets/2.DIadQLJA.css","/app/immutable/nodes/3.CNcHr_kX.js","/app/immutable/nodes/4.BzoidTar.js","/app/immutable/nodes/5.vAApKfTG.js","/app/immutable/nodes/6.D2VrWob4.js","/app/immutable/chunks/BP7XtCsE.js","/app/immutable/chunks/0rEEjvhW.js","/app/immutable/chunks/CTDEoCzv.js","/app/immutable/assets/PanelContentRenderer.C1wFV-kd.css","/app/immutable/chunks/6FXzbKIf.js","/app/immutable/chunks/Aa4mTk2-.js","/app/immutable/chunks/jsYE2rXv.js","/app/immutable/chunks/BaEFcPEE.js","/app/immutable/chunks/D-62MVd3.js","/app/immutable/chunks/Ug7t_gUQ.js","/app/immutable/chunks/DpMsJtM0.js","/app/immutable/chunks/C82gBCX8.js","/app/immutable/assets/DockScreenshotEditorWindow.DNkBhnHK.css","/app/immutable/assets/dock-tokens.C3wiNkmL.css","/app/immutable/chunks/G4lPpFfF.js","/app/immutable/chunks/Dk0afiu6.js","/app/immutable/chunks/CkmjUBxn.js","/app/immutable/chunks/CDeldaOF.js","/app/immutable/chunks/CUUAtNdA.js","/app/immutable/assets/TaskStatusIcon.sfU2TZ7a.css","/app/immutable/assets/AgentCard.Cna0hri3.css","/app/immutable/chunks/D-7b6BAb.js","/app/immutable/chunks/DEB8jcix.js","/app/immutable/chunks/lwn02icp.js","/app/immutable/assets/TrackedChangeDiffViewer.CveSjyPc.css","/app/immutable/chunks/DzTe1W0Z.js","/app/immutable/chunks/CcNhqKh5.js","/app/immutable/assets/syntax-highlighting.CrQGLq0X.css","/app/immutable/assets/CodeBlock.BezhEtUo.css","/app/immutable/chunks/1_Sb4Kkv.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/CT6GHk2v.js","/app/immutable/chunks/DtO0wAdA.js","/app/immutable/chunks/DgAgTFcK.js","/app/immutable/chunks/Bu8LYT1B.js","/app/immutable/chunks/CQww8mRz.js","/app/immutable/chunks/CqlSBroo.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css","/app/immutable/assets/chat-search.Cjb73igJ.css","/app/immutable/chunks/tw85acZN.js","/app/immutable/chunks/Blp2y8Zh.js","/app/immutable/chunks/9IHp8VDb.js","/app/immutable/chunks/CToFQRbb.js","/app/immutable/assets/conversation-turns.P_pkAsRX.css","/app/immutable/chunks/CClsvy7n.js","/app/immutable/chunks/DpgIqMGp.js","/app/immutable/chunks/CEqmtghP.js","/app/immutable/chunks/DPF9_zKV.js","/app/immutable/chunks/TSQNyjhg.js","/app/immutable/chunks/Cfy5Crpr.js","/app/immutable/assets/WorkspaceSetupCard.DNLkSKZg.css","/app/immutable/chunks/Bv5YjDej.js","/app/immutable/chunks/DL6gGkHp.js","/app/immutable/assets/DockRecordingEditor.BX1NXczK.css","/app/immutable/assets/ChatPanel.B73KM22O.css","/app/immutable/assets/HomeWorkspaceDetail.Dp5EWw2P.css","/app/immutable/chunks/BQ5vM4FB.js","/app/immutable/chunks/DWGXN6Nr.js","/app/immutable/assets/ResizablePanel.Bi3i2_fe.css","/app/immutable/assets/6.DBgC2kSL.css","/app/immutable/nodes/7.cIi2v_en.js","/app/immutable/assets/7.D6ebrVTb.css","/app/immutable/nodes/8.DVH30a1F.js","/app/immutable/chunks/bzfuMuVY.js","/app/immutable/nodes/9.AUZxhWIX.js","/app/immutable/chunks/BoEPe-FL.js","/app/immutable/chunks/D3yXvqwY.js","/app/immutable/chunks/-xCKOX3D.js","/app/immutable/chunks/UHs-xfbd.js","/app/immutable/chunks/Dh_eorhd.js","/app/immutable/assets/9.CfWCtgHG.css","/app/immutable/nodes/10.CGIePvim.js","/app/immutable/chunks/BMScw2DS.js","/app/immutable/assets/CodeEditor.Bq04Rj-N.css","/app/immutable/chunks/BLYYB2Pl.js","/app/immutable/assets/confirm-script-deletion.CqNa5NIC.css","/app/immutable/chunks/Bu4YAtNq.js","/app/immutable/assets/scroll-area.bHHIbcsu.css","/app/immutable/chunks/BjYingUt.js","/app/immutable/assets/LineChangesBadge.CJ0J_Z0k.css","/app/immutable/chunks/wEnqV1Ol.js","/app/immutable/chunks/ByJyX5qZ.js","/app/immutable/chunks/BvKzoZLa.js","/app/immutable/assets/10.xCAPscJx.css","/app/immutable/nodes/11.DcWpM7Yi.js","/app/immutable/assets/11.BO7QC36g.css","/app/immutable/nodes/12.S6PrlAwz.js","/app/immutable/nodes/13.Bs_o-uwb.js","/app/immutable/assets/13.CF5xLHXq.css","/app/immutable/nodes/14.CIZDoMeA.js","/app/immutable/chunks/CdgNuFkc.js","/app/immutable/assets/14.BuZANxI8.css","/app/immutable/nodes/15.DDtIC3Hq.js","/app/immutable/assets/15.CWppUCpM.css","/app/immutable/nodes/16.BgJmXimX.js","/app/immutable/assets/16.DBFWhlfB.css","/app/immutable/nodes/17.BWRlIYI7.js","/app/immutable/nodes/18.BV2orlA1.js","/app/immutable/nodes/19.B1-CCqHR.js","/app/immutable/assets/19.Cznk2DRv.css","/app/immutable/nodes/20.DLg8hCzP.js","/app/immutable/assets/20.BdP13STv.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DiEy7mCR.js","/app/immutable/chunks/J9vGyyn3.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/1KDVFF23.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/nodes/0.I2U7Nyeq.js","/app/immutable/chunks/Dmy603At.js","/app/immutable/chunks/Zg9SWWIQ.js","/app/immutable/chunks/Dhj-Oo-y.js","/app/immutable/chunks/BIv0yV05.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/BPo1GPk4.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/PtMxuYy8.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/MujvTDgv.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/C7Ibt0hX.js","/app/immutable/chunks/D7u67tV0.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/assets/0.D54btMV6.css","/app/immutable/nodes/1.CgZVKAf9.js","/app/immutable/chunks/YopO0YfH.js","/app/immutable/chunks/BPqKxoH8.js","/app/immutable/chunks/BZytk_HL.js","/app/immutable/chunks/DpSAF6fh.js","/app/immutable/chunks/D8B7qxXm.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CYCawVEx.js","/app/immutable/chunks/DPbnmxjX.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/BpT_ybtH.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/nodes/2.xEZtPl1l.js","/app/immutable/chunks/BWBQA0E0.js","/app/immutable/chunks/DkYquFOp.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CntPxeXh.js","/app/immutable/chunks/B77YOXDU.js","/app/immutable/chunks/BEbBWmo4.js","/app/immutable/chunks/BkmrZjpE.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DQmW4_9G.js","/app/immutable/chunks/6HwVA3Xi.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/Q-Hp56ht.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/Cvp_IOBl.js","/app/immutable/chunks/C_0xgdqY.js","/app/immutable/chunks/D7vAVIvz.js","/app/immutable/chunks/jUAybD8G.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/CjK2zm52.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/CMgAi196.js","/app/immutable/chunks/BblwdMxR.js","/app/immutable/chunks/BIwMjRQQ.js","/app/immutable/chunks/DM4cCUDd.js","/app/immutable/chunks/BWIYTJ4a.js","/app/immutable/chunks/2WaF6vs_.js","/app/immutable/chunks/Ydj2ePK_.js","/app/immutable/chunks/D4WPlvMg.js","/app/immutable/chunks/BtT-JO5g.js","/app/immutable/chunks/DKIi_opT.js","/app/immutable/chunks/pIjvEfMB.js","/app/immutable/chunks/CQcEqK4G.js","/app/immutable/chunks/C7hm9bSX.js","/app/immutable/chunks/CmdE1AJL.js","/app/immutable/chunks/nHwpsxWy.js","/app/immutable/chunks/BuFlry2f.js","/app/immutable/chunks/CpIVKWwx.js","/app/immutable/chunks/CrgJwS7n.js","/app/immutable/chunks/B4wiFjXK.js","/app/immutable/chunks/-bihBnD_.js","/app/immutable/chunks/B6Zf-ZTX.js","/app/immutable/chunks/Bt2C0fwl.js","/app/immutable/chunks/Bco7_wmI.js","/app/immutable/chunks/C_BHeuK7.js","/app/immutable/chunks/Ch-pFfsN.js","/app/immutable/chunks/IdqO6uHC.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/CBLFNmYJ.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/YqTahsxp.js","/app/immutable/chunks/CuAAvi1f.js","/app/immutable/chunks/BA7mfVzm.js","/app/immutable/chunks/CPEu2Vil.js","/app/immutable/chunks/CkrblKaH.js","/app/immutable/chunks/Bu13V5mO.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/x8bssjcx.js","/app/immutable/chunks/CSiaiLHL.js","/app/immutable/chunks/C0nXBDlv.js","/app/immutable/chunks/CEgHOs22.js","/app/immutable/chunks/H2jLkRRS.js","/app/immutable/chunks/DJk5np0g.js","/app/immutable/chunks/BO4HougN.js","/app/immutable/chunks/DS5B84mn.js","/app/immutable/chunks/DbSttgXv.js","/app/immutable/chunks/a0CN3en2.js","/app/immutable/chunks/CN0Csvus.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/BzW_moTi.js","/app/immutable/chunks/KaHKnBKn.js","/app/immutable/chunks/xJBWkpxc.js","/app/immutable/chunks/1wMLd-77.js","/app/immutable/chunks/BjLb7AHW.js","/app/immutable/chunks/dIyiVmNx.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/CQQvsDes.js","/app/immutable/assets/SettingsPage.CKvEnOAL.css","/app/immutable/chunks/471Fgn_p.js","/app/immutable/chunks/Dzl5aoA8.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DPLDRqMC.js","/app/immutable/chunks/BMfUzLG6.js","/app/immutable/chunks/zzl2tBQf.js","/app/immutable/chunks/8PIbpdJu.js","/app/immutable/chunks/BpimY2Bn.js","/app/immutable/chunks/DHbv9I-C.js","/app/immutable/chunks/CtguhKZB.js","/app/immutable/chunks/DYGC3eZn.js","/app/immutable/chunks/C3iIVLbv.js","/app/immutable/chunks/BPx3dFHu.js","/app/immutable/assets/checkbox.D429NJZk.css","/app/immutable/chunks/7n3mxV6t.js","/app/immutable/chunks/CJJ2D2db.js","/app/immutable/chunks/aqQCGQpk.js","/app/immutable/assets/select-viewport.CV-KWLNP.css","/app/immutable/chunks/DHSWOw-U.js","/app/immutable/assets/directory-picker-service.Eai7L_H2.css","/app/immutable/chunks/CXfim-2t.js","/app/immutable/assets/DictationStopButton.DWUPhcKi.css","/app/immutable/chunks/DtYDlbcb.js","/app/immutable/chunks/Mw2Z7eLx.js","/app/immutable/chunks/q9cUG1dc.js","/app/immutable/chunks/CSepGuJ-.js","/app/immutable/chunks/Dfq_rEeO.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CBmGf0Ke.js","/app/immutable/chunks/DT8FaJbg.js","/app/immutable/chunks/THm8CnE2.js","/app/immutable/chunks/CwBMToxu.js","/app/immutable/chunks/CL6yJ0UM.js","/app/immutable/chunks/ucKP4cAm.js","/app/immutable/chunks/CfCk_l9B.js","/app/immutable/chunks/Br9RT7xb.js","/app/immutable/chunks/Div7CQPf.js","/app/immutable/chunks/CqsFOLCu.js","/app/immutable/chunks/ZWIGjqdM.js","/app/immutable/chunks/BePTHsT0.js","/app/immutable/chunks/D_xvUCUD.js","/app/immutable/chunks/KImhPY_I.js","/app/immutable/chunks/BWyPNph7.js","/app/immutable/chunks/Bek4Es60.js","/app/immutable/chunks/BcEldzTj.js","/app/immutable/assets/AgentAvatar.CZKKHyEm.css","/app/immutable/assets/avatar-state.BzFIexJN.css","/app/immutable/chunks/BYBN65Dm.js","/app/immutable/assets/TipTapEditor.BmeA7Qtk.css","/app/immutable/chunks/CWFWI1JB.js","/app/immutable/chunks/DiLFzwi3.js","/app/immutable/assets/AttachmentPreview.D_hsaikk.css","/app/immutable/chunks/BEv4fIdD.js","/app/immutable/chunks/-Hb5Lymn.js","/app/immutable/chunks/DqFGUV9A.js","/app/immutable/chunks/DjBxG6q0.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/C-BsEdGZ.js","/app/immutable/chunks/Qzhec1TY.js","/app/immutable/chunks/A0p6PvBn.js","/app/immutable/chunks/IB26d-_M.js","/app/immutable/chunks/D-N7efrx.js","/app/immutable/chunks/DVok8lSR.js","/app/immutable/chunks/BlXvVwTG.js","/app/immutable/chunks/fFnyP4ej.js","/app/immutable/assets/CompactWorkspaceInitializer.i4vCnRqW.css","/app/immutable/chunks/B8tcC_lC.js","/app/immutable/chunks/C22LcJ65.js","/app/immutable/assets/workspace-key-menu.DrT-Fxqq.css","/app/immutable/chunks/BalE-G27.js","/app/immutable/chunks/DqPe5uyz.js","/app/immutable/chunks/Ow3KARwj.js","/app/immutable/chunks/Dv6PZjTW.js","/app/immutable/chunks/D6W9Whdp.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/assets/MarkdownViewer.D2MexjjT.css","/app/immutable/chunks/goTpbPhD.js","/app/immutable/chunks/CGcJ5lqH.js","/app/immutable/chunks/Ca9qLvAG.js","/app/immutable/chunks/CXXVPWBH.js","/app/immutable/chunks/CdpTO1ew.js","/app/immutable/chunks/Domj4ONg.js","/app/immutable/chunks/CALsJq65.js","/app/immutable/chunks/gY6D1J3N.js","/app/immutable/chunks/CCEqDzPP.js","/app/immutable/chunks/wfSdTH77.js","/app/immutable/assets/Terminal.Ddek5eNE.css","/app/immutable/chunks/Bo5PTszQ.js","/app/immutable/assets/AgentAvatarStack.DOhClFuX.css","/app/immutable/chunks/BbIcudMY.js","/app/immutable/assets/2.DIadQLJA.css","/app/immutable/nodes/3.hyVEcKKo.js","/app/immutable/nodes/4.CdWgO8Xv.js","/app/immutable/nodes/5.BhLUauX8.js","/app/immutable/nodes/6.B3Vi01S1.js","/app/immutable/chunks/BP7XtCsE.js","/app/immutable/chunks/0rEEjvhW.js","/app/immutable/chunks/CTDEoCzv.js","/app/immutable/assets/PanelContentRenderer.C1wFV-kd.css","/app/immutable/chunks/6FXzbKIf.js","/app/immutable/chunks/rHK6sLv4.js","/app/immutable/chunks/CMn7jvlN.js","/app/immutable/chunks/CJBG3N9y.js","/app/immutable/chunks/D-62MVd3.js","/app/immutable/chunks/Ug7t_gUQ.js","/app/immutable/chunks/DpMsJtM0.js","/app/immutable/chunks/C82gBCX8.js","/app/immutable/assets/DockScreenshotEditorWindow.DNkBhnHK.css","/app/immutable/assets/dock-tokens.C3wiNkmL.css","/app/immutable/chunks/P27dN3C7.js","/app/immutable/chunks/Dk0afiu6.js","/app/immutable/chunks/sZBOVpM6.js","/app/immutable/chunks/D5raGlU7.js","/app/immutable/chunks/CUUAtNdA.js","/app/immutable/assets/TaskStatusIcon.sfU2TZ7a.css","/app/immutable/assets/AgentCard.Cna0hri3.css","/app/immutable/chunks/DzsC5hAQ.js","/app/immutable/chunks/DEB8jcix.js","/app/immutable/chunks/lwn02icp.js","/app/immutable/assets/TrackedChangeDiffViewer.CveSjyPc.css","/app/immutable/chunks/DzTe1W0Z.js","/app/immutable/chunks/CcNhqKh5.js","/app/immutable/assets/syntax-highlighting.CrQGLq0X.css","/app/immutable/assets/CodeBlock.BezhEtUo.css","/app/immutable/chunks/kZL4nf_J.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/CT6GHk2v.js","/app/immutable/chunks/BcliNPZw.js","/app/immutable/chunks/DgAgTFcK.js","/app/immutable/chunks/CKGNYRrS.js","/app/immutable/chunks/CQww8mRz.js","/app/immutable/chunks/BzwPeFzF.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css","/app/immutable/assets/chat-search.Cjb73igJ.css","/app/immutable/chunks/CW7lfTzm.js","/app/immutable/chunks/DdJ4cD_u.js","/app/immutable/chunks/DZEGFjPx.js","/app/immutable/chunks/CToFQRbb.js","/app/immutable/assets/conversation-turns.P_pkAsRX.css","/app/immutable/chunks/CClsvy7n.js","/app/immutable/chunks/DpgIqMGp.js","/app/immutable/chunks/CEqmtghP.js","/app/immutable/chunks/DPF9_zKV.js","/app/immutable/chunks/CX4bqTrJ.js","/app/immutable/chunks/CCWqLSpV.js","/app/immutable/assets/WorkspaceSetupCard.DNLkSKZg.css","/app/immutable/chunks/Bv5YjDej.js","/app/immutable/chunks/DL6gGkHp.js","/app/immutable/assets/DockRecordingEditor.BX1NXczK.css","/app/immutable/assets/ChatPanel.B73KM22O.css","/app/immutable/assets/HomeWorkspaceDetail.Dp5EWw2P.css","/app/immutable/chunks/BOZ6hjJI.js","/app/immutable/chunks/DWGXN6Nr.js","/app/immutable/assets/ResizablePanel.Bi3i2_fe.css","/app/immutable/assets/6.DBgC2kSL.css","/app/immutable/nodes/7.DW7p588B.js","/app/immutable/assets/7.D6ebrVTb.css","/app/immutable/nodes/8.Bt8gdMyu.js","/app/immutable/chunks/DmnStjtN.js","/app/immutable/nodes/9.BSZ1-MKZ.js","/app/immutable/chunks/DiP5BH15.js","/app/immutable/chunks/D3yXvqwY.js","/app/immutable/chunks/-xCKOX3D.js","/app/immutable/chunks/UHs-xfbd.js","/app/immutable/chunks/Dh_eorhd.js","/app/immutable/assets/9.CfWCtgHG.css","/app/immutable/nodes/10.CsryZO2H.js","/app/immutable/chunks/BMScw2DS.js","/app/immutable/assets/CodeEditor.Bq04Rj-N.css","/app/immutable/chunks/DIDOx8hd.js","/app/immutable/assets/confirm-script-deletion.CqNa5NIC.css","/app/immutable/chunks/Bu4YAtNq.js","/app/immutable/assets/scroll-area.bHHIbcsu.css","/app/immutable/chunks/BjYingUt.js","/app/immutable/assets/LineChangesBadge.CJ0J_Z0k.css","/app/immutable/chunks/wEnqV1Ol.js","/app/immutable/chunks/ByJyX5qZ.js","/app/immutable/chunks/D8XqXEXt.js","/app/immutable/assets/10.xCAPscJx.css","/app/immutable/nodes/11.BTowiakT.js","/app/immutable/assets/11.BO7QC36g.css","/app/immutable/nodes/12.S6PrlAwz.js","/app/immutable/nodes/13.Bs_o-uwb.js","/app/immutable/assets/13.CF5xLHXq.css","/app/immutable/nodes/14.CIZDoMeA.js","/app/immutable/chunks/CdgNuFkc.js","/app/immutable/assets/14.BuZANxI8.css","/app/immutable/nodes/15.CzU59iiE.js","/app/immutable/assets/15.CWppUCpM.css","/app/immutable/nodes/16.BgJmXimX.js","/app/immutable/assets/16.DBFWhlfB.css","/app/immutable/nodes/17.BWRlIYI7.js","/app/immutable/nodes/18.BV2orlA1.js","/app/immutable/nodes/19.vtvcgUzO.js","/app/immutable/assets/19.Cznk2DRv.css","/app/immutable/nodes/20.DLg8hCzP.js","/app/immutable/assets/20.BdP13STv.css"])))=>i.map(i=>d[i]);
2
2
  import{_ as o,bm as X,t as lt,bo as f,bw as dt,b as pt,c as ft}from"../chunks/1KDVFF23.js";import{l as x}from"../chunks/BdWqymET.js";import{s as gt}from"../chunks/D-N7efrx.js";import{bs as Et,cb as vt,ca as Tt,bk as bt,aD as m,bH as F,c0 as ht,ay as T,bS as It,W as c,bn as At,bV as U,aA as g,a7 as I,c9 as y,a5 as Ot,bA as Rt,aB as q,b$ as Pt,b_ as Dt,bO as Lt}from"../chunks/3SdAC2_C.js";import{i as k}from"../chunks/Zg9SWWIQ.js";import{c as V}from"../chunks/DpSAF6fh.js";import{b as S}from"../chunks/Dn334wJv.js";const yt=async()=>{window.location.pathname.startsWith("/sandbox")||await o(()=>import("../chunks/DiEy7mCR.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},Vt=/^[a-zA-Z_$]{1,3}\.call is not a function$/;function St(t){return t instanceof Error&&t.name==="TypeError"&&Vt.test(t.message)&&typeof t.stack=="string"&&t.stack.includes("bits-ui")}const K=500,wt=8,xt=/[a-z][a-z0-9+.-]*:\/\/\S+/gi,kt=/[)\]}>'".,;:]+$/,Nt=/[^/]+\.[cm]?[jt]s(?::\d+){0,2}$/;function Ct(t){const e=kt.exec(t)?.[0]??"",a=t.slice(0,t.length-e.length),n=a.indexOf("://"),i=a.slice(0,n),s=a.slice(n+3).split("#")[0].split("?")[0],_=s.indexOf("/"),l=_===-1?s:s.slice(0,_),d=l.slice(l.lastIndexOf("@")+1),p=_===-1?"":s.slice(_);if(p===""||p==="/")return`${i}://${d}${e}`;const O=Nt.exec(p)?.[0];return`${i}://${d}/${O??"<redacted>"}${e}`}function w(t){const e=t.replace(xt,Ct);return e.length>K?`${e.slice(0,K)}…`:e}function jt(t){return typeof t!="string"||t.length===0?null:t.split(`
3
3
  `).slice(0,wt).map(w).join(`
4
- `)}function Mt(t,e){if(t instanceof Error)return{name:w(String(t.name)),message:w(String(t.message)),stack:jt(t.stack),routeId:e};if(t&&typeof t=="object"){const a="message"in t?t.message:void 0;return{name:"object",message:typeof a=="string"?w(a):"[non-Error object]",stack:null,routeId:e}}return{name:typeof t,message:w(String(t)),stack:null,routeId:e}}let Z=!1,A=0;const Ft=2,Ut=({error:t,event:e})=>{if(t&&typeof t=="object"&&"message"in t){const a=String(t.message);if(a.includes("no diff result available"))return{message:""};if(a.includes("isInHiddenArea"))return{message:""};if(a.includes("TextModel got disposed"))return{message:""}}if(t&&typeof t=="object"&&"message"in t){const a=String(t.message);if(a.includes("Not found: /index.html")||a.includes("Not found"))return Z?(A++,A>=Ft&&(x.warn('Multiple consecutive "Not found" errors detected, router may be corrupted',{url:e.url.toString(),routeId:e.route.id,consecutiveErrors:A}),A=0,typeof window<"u"&&setTimeout(()=>{x.info("Triggering full page reload to recover from router corruption"),window.location.reload()},100)),x.error("Client navigation error:",{error:t,url:e.url.toString(),routeId:e.route.id}),{message:X.hooks_client_pageNotFound_message()}):(Z=!0,A=0,{message:""});A=0}return gt(t)?{message:""}:St(t)?{message:""}:(x.error("Client error:",Mt(t,e.route.id)),{message:X.hooks_client_unexpected_error()})},Yt={};var zt=q('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Bt=q("<!> <!>",1);function J(t,e){if(new.target)return lt({component:J,...t});Et(e,!0);let a=f(e,"stores",7),n=f(e,"page",7),i=f(e,"constructors",7),s=f(e,"components",23,()=>[]),_=f(e,"form",7),l=f(e,"data_0",7,null),d=f(e,"data_1",7,null),p=f(e,"data_2",7,null);vt(()=>a().page.set(n())),Tt(()=>{a(),n(),i(),s(),_(),l(),d(),p(),a().page.notify()});let O=U(!1),z=U(!1),B=U(null);bt(()=>{const r=a().page.subscribe(()=>{m(O)&&(F(z,!0),ht().then(()=>{F(B,document.title||"untitled page",!0)}))});return F(O,!0),r});const Y=y(()=>i()[2]);var tt={get stores(){return a()},set stores(r){a(r),g()},get page(){return n()},set page(r){n(r),g()},get constructors(){return i()},set constructors(r){i(r),g()},get components(){return s()},set components(r=[]){s(r),g()},get form(){return _()},set form(r){_(r),g()},get data_0(){return l()},set data_0(r=null){l(r),g()},get data_1(){return d()},set data_1(r=null){d(r),g()},get data_2(){return p()},set data_2(r=null){p(r),g()},$set:dt,$on:(r,u)=>pt(e,r,u)},G=Bt(),W=T(G);{var et=r=>{const u=y(()=>i()[0]);var E=I(),R=T(E);V(R,()=>m(u),(v,b)=>{S(b(v,{get data(){return l()},get form(){return _()},get params(){return n().params},children:(P,Wt)=>{var $=I(),st=T($);{var nt=h=>{const N=y(()=>i()[1]);var D=I(),C=T(D);V(C,()=>m(N),(j,M)=>{S(M(j,{get data(){return d()},get form(){return _()},get params(){return n().params},children:(L,$t)=>{var H=I(),_t=T(H);V(_t,()=>m(Y),(ut,mt)=>{S(mt(ut,{get data(){return p()},get form(){return _()},get params(){return n().params}}),ct=>s()[2]=ct,()=>s()?.[2])}),c(L,H)},$$slots:{default:!0}}),L=>s()[1]=L,()=>s()?.[1])}),c(h,D)},it=h=>{const N=y(()=>i()[1]);var D=I(),C=T(D);V(C,()=>m(N),(j,M)=>{S(M(j,{get data(){return d()},get form(){return _()},get params(){return n().params}}),L=>s()[1]=L,()=>s()?.[1])}),c(h,D)};k(st,h=>{i()[2]?h(nt):h(it,-1)})}c(P,$)},$$slots:{default:!0}}),P=>s()[0]=P,()=>s()?.[0])}),c(r,E)},rt=r=>{const u=y(()=>i()[0]);var E=I(),R=T(E);V(R,()=>m(u),(v,b)=>{S(b(v,{get data(){return l()},get form(){return _()},get params(){return n().params}}),P=>s()[0]=P,()=>s()?.[0])}),c(r,E)};k(W,r=>{i()[1]?r(et):r(rt,-1)})}var ot=It(W,2);{var at=r=>{var u=zt(),E=Ot(u);{var R=v=>{var b=Pt();Dt(()=>Lt(b,m(B))),c(v,b)};k(E,v=>{m(z)&&v(R)})}Rt(u),c(r,u)};k(ot,r=>{m(O)&&r(at)})}return c(t,G),At(tt)}const te=ft(J),ee=[()=>o(()=>import("../nodes/0.Cb_UZQTB.js"),__vite__mapDeps([6,4,5,7,8,9,10,11,3,12,13,14,15,16,2,17,18,19,20,21,22,23]),import.meta.url),()=>o(()=>import("../nodes/1.B0kBQ96l.js"),__vite__mapDeps([24,4,5,8,25,26,27,28,7,29,3,30,31,32,33,34,11,1,2,35,9]),import.meta.url),()=>o(()=>import("../nodes/2.CAFqSYBH.js"),__vite__mapDeps([36,4,5,7,37,8,9,29,3,30,27,28,31,33,38,2,12,13,14,15,16,11,39,34,1,35,20,40,25,41,21,22,42,43,44,45,46,47,48,49,50,51,52,53,54,32,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,19,101,102,103,10,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,18,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,26,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211]),import.meta.url),()=>o(()=>import("../nodes/3.CNcHr_kX.js"),__vite__mapDeps([212,4,5,8,57,31,7,29,3,30,25,26,27,28,32,33,34,11,1,2,35,9,43,44,42,45,38,12,13,14,15,16,39,20,40,46,21,22,41]),import.meta.url),()=>o(()=>import("../nodes/4.BzoidTar.js"),__vite__mapDeps([213,4,5,7,10,11,3,47,12,13,14,15,16,2,38,27,28,8,29,30,31,39,34,1,35,20,40,48,44,49,50,51,46,52,53,54,32,33,9,55,56,57,58,59,60,61,21,22,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,41,45,91,92,93,94,95,96,97,98,99,100,19,101,102,103,43,25,42,104,105,106,107,108,109]),import.meta.url),()=>o(()=>import("../nodes/5.vAApKfTG.js"),__vite__mapDeps([214,4,5,7,202,203,12,13,14,15,3,16,2,11,27,28,8,29,30,31,204,150,130,129,32,33,34,1,35,9,128,125,112,57,86,126,56,121,122,89,90,87,59,88,131,55,44,201,108,109,10,47,38,39,20,40,48,49,50,51,46,52,53,54,58,60,61,21,22,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,41,45,91,92,93,94,95,96,97,98,99,100,19,101,102,103,43,25,42,104,105,106,107]),import.meta.url),()=>o(()=>import("../nodes/6.D2VrWob4.js"),__vite__mapDeps([215,4,5,58,216,8,28,29,3,7,30,203,12,13,14,15,16,2,11,32,33,31,34,1,35,9,217,129,130,27,218,40,38,39,20,70,65,84,219,114,82,63,46,64,112,57,86,87,59,88,124,125,126,56,121,122,89,90,97,111,113,115,116,117,118,119,120,123,54,55,60,127,44,53,61,48,21,22,62,51,128,131,132,133,134,135,136,137,43,25,42,45,41,138,139,188,163,164,165,166,78,52,50,49,79,153,154,145,155,156,157,110,158,159,18,146,147,160,161,162,167,168,169,148,170,150,171,189,180,91,220,221,222,197,223,224,225,73,226,74,227,228,229,140,77,141,230,96,231,232,233,234,195,235,80,95,187,236,237,238,239,206,240,103,241,242,243,244,245,210,191,246,247,248,249,178,194,196,250,26,251,183,252,253,254,72,75,76,68,69,255,256,149,257,208,209,258,259,93,260,261,262,263,264,265,184,102,185,266,267,268,269,192,92,172,270,271,193,272,37,204,273,274,179,275]),import.meta.url),()=>o(()=>import("../nodes/7.cIi2v_en.js"),__vite__mapDeps([276,4,5,8,31,7,29,3,30,33,38,2,12,13,14,15,16,11,27,28,39,34,1,35,20,40,44,26,25,50,51,48,49,46,223,9,57,224,54,32,55,56,58,59,60,160,61,159,18,128,125,112,86,126,121,122,89,90,87,88,129,130,131,97,53,21,22,62,63,64,65,146,147,134,127,116,117,225,73,226,124,74,227,148,228,229,52,153,154,136,115,137,145,155,156,157,110,70,111,113,114,118,119,120,123,132,133,135,43,42,45,41,138,139,158,161,162,163,164,165,166,167,168,169,170,150,171,140,77,141,78,79,230,96,231,232,233,234,195,235,80,95,187,236,237,197,238,239,206,240,103,241,242,243,244,245,210,191,246,247,248,249,178,194,196,250,82,188,189,180,91,251,183,252,253,254,256,98,99,277]),import.meta.url),()=>o(()=>import("../nodes/8.DVH30a1F.js"),__vite__mapDeps([278,4,5,58,114,279,21,14,22,41,13,12,15,3,7,16,2,11,54,8,29,30,32,33,31,34,1,35,28,9,40,55,56,27,57,59,60,130,220]),import.meta.url),()=>o(()=>import("../nodes/9.AUZxhWIX.js"),__vite__mapDeps([280,4,5,8,9,31,7,29,3,30,28,33,32,34,11,1,2,35,86,135,112,57,136,115,137,27,131,121,122,56,89,90,113,58,114,87,59,88,116,117,118,119,111,120,123,124,125,126,97,54,40,55,12,13,14,15,16,60,127,44,53,38,39,20,61,48,21,22,62,63,46,64,65,51,128,129,130,132,133,134,43,25,42,45,41,70,138,139,173,144,145,150,146,147,148,26,67,157,281,282,79,160,161,227,234,195,83,71,50,49,251,265,184,183,102,164,165,149,169,81,279,154,155,156,261,262,100,92,106,283,91,284,268,285,69,286,229]),import.meta.url),()=>o(()=>import("../nodes/10.CGIePvim.js"),__vite__mapDeps([287,4,5,216,8,28,29,3,7,30,203,12,13,14,15,16,2,11,32,33,31,34,1,35,9,217,129,130,27,218,40,38,39,20,70,65,84,219,26,25,63,46,64,181,57,44,182,66,52,53,54,55,56,58,59,60,61,48,21,22,62,51,50,49,67,68,69,96,97,132,114,115,112,86,133,154,131,121,122,89,90,136,137,145,155,156,157,128,125,126,87,88,153,110,111,113,116,117,118,119,120,123,124,127,134,135,43,42,45,41,138,139,158,159,18,146,147,160,161,162,163,164,165,166,167,168,169,148,170,150,171,183,184,140,77,141,178,185,37,186,95,260,99,197,190,82,204,93,81,272,80,102,231,273,264,232,230,233,234,195,235,227,187,236,265,266,249,274,176,205,175,105,106,107,108,109,177,206,207,288,201,289,290,282,94,291,152,281,149,100,292,293,101,294,295,296,257,297,199,298,172,262,193,299]),import.meta.url),()=>o(()=>import("../nodes/11.DcWpM7Yi.js"),__vite__mapDeps([300,4,5,8,42,25,31,7,29,3,30,28,12,13,14,15,16,2,11,27,33,190,117,32,34,1,35,9,120,57,112,86,54,40,55,56,58,59,60,110,97,258,193,155,125,292,293,101,38,39,20,288,201,108,109,107,61,48,44,45,161,289,118,103,296,102,301]),import.meta.url),()=>o(()=>import("../nodes/12.S6PrlAwz.js"),__vite__mapDeps([302,4,5,58,114,27,28,8,7,29,3,30,31]),import.meta.url),()=>o(()=>import("../nodes/13.Bs_o-uwb.js"),__vite__mapDeps([303,4,5,8,9,32,7,29,3,30,33,31,34,11,1,2,35,28,27,130,220,304]),import.meta.url),()=>o(()=>import("../nodes/14.CIZDoMeA.js"),__vite__mapDeps([305,4,5,8,29,3,7,30,34,11,1,2,35,130,220,33,31,32,28,9,306,13,174,197,112,57,86,40,116,117,132,58,114,115,133,135,136,137,27,131,121,122,56,89,90,307]),import.meta.url),()=>o(()=>import("../nodes/15.DDtIC3Hq.js"),__vite__mapDeps([308,4,5,8,62,12,13,14,15,3,7,16,2,11,63,46,64,38,27,28,29,30,31,39,34,1,35,20,40,65,51,130,220,33,47,48,44,49,50,52,53,54,32,9,55,56,57,58,59,60,61,21,22,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,41,45,91,92,93,94,95,96,97,98,99,100,19,101,102,103,43,25,42,10,104,105,106,107,108,109,245,195,159,18,128,125,112,126,121,122,129,131,146,147,134,127,116,117,210,118,191,246,142,113,114,115,119,123,124,164,165,178,163,166,188,153,154,136,137,145,155,156,157,110,111,120,132,133,135,138,139,158,160,161,162,167,168,169,148,170,150,171,189,285,255,225,223,224,226,227,228,229,140,141,230,231,232,233,234,235,187,236,237,197,238,239,206,240,241,242,243,244,247,248,249,194,196,250,26,180,251,183,252,253,254,256,149,257,208,209,258,259,306,309]),import.meta.url),()=>o(()=>import("../nodes/16.BgJmXimX.js"),__vite__mapDeps([310,4,5,29,3,7,30,34,11,1,2,35,130,220,33,8,31,57,73,225,28,16,197,32,9,76,77,40,61,48,44,311,229]),import.meta.url),()=>o(()=>import("../nodes/17.BWRlIYI7.js"),__vite__mapDeps([312,4,5,8,9,29,3,7,30,34,11,1,2,35,130,220,33,267,31,97,226,15,16,32,28,86,87,59,88,124,125,112,57,126,56,121,122,89,90,27,61,48,44,49,74,73,225,227,148,228,229,123,40,268,197,75,269]),import.meta.url),()=>o(()=>import("../nodes/18.BV2orlA1.js"),__vite__mapDeps([313,4,5,29,3,7,30,34,11,1,2,35,130,220,33]),import.meta.url),()=>o(()=>import("../nodes/19.B1-CCqHR.js"),__vite__mapDeps([314,4,5,8,61,11,3,48,44,27,28,7,29,30,31,32,33,34,1,2,35,9,12,13,14,15,16,57,187,80,38,39,20,40,62,63,46,64,65,51,180,91,55,85,113,58,114,115,112,86,87,59,88,116,117,118,119,161,128,125,126,56,121,122,89,90,129,130,131,134,143,144,135,136,137,145,146,147,148,71,133,100,43,25,42,45,21,22,41,315]),import.meta.url),()=>o(()=>import("../nodes/20.DLg8hCzP.js"),__vite__mapDeps([316,4,5,58,29,3,7,30,34,11,1,2,35,130,220,33,8,216,28,203,12,13,14,15,16,32,31,9,217,129,27,218,40,38,39,20,70,65,84,219,273,249,167,64,22,104,317]),import.meta.url)],re=[],oe={"/(app)":[6,[2],[3]],"/(app)/agent/[id]":[7,[2],[3]],"/(app)/desktop-control-agent":[8,[2],[3]],"/desktop-overlay":[13],"/dev-console":[14],"/dock-annotation":[16],"/dock-capture-editor":[17],"/dock":[15],"/frame":[18],"/hud":[19,[4]],"/(app)/settings":[9,[2],[3]],"/tab-window/[id]":[20,[5]],"/(app)/workspace/creating":[12,[2],[3]],"/(app)/workspace/[id]":[10,[2],[3]],"/(app)/workspace/[id]/files":[11,[2],[3]]},Q={handleError:Ut||(({error:t})=>{console.error(t)}),init:yt,reroute:(()=>{}),transport:{}},Gt=Object.fromEntries(Object.entries(Q.transport).map(([t,e])=>[t,e.decode])),ae=Object.fromEntries(Object.entries(Q.transport).map(([t,e])=>[t,e.encode])),se=!1,ne=(t,e)=>Gt[t](e),ie=()=>o(()=>import("../chunks/wbPk3Yxo.js"),[],import.meta.url).then(t=>t.default);export{ne as decode,Gt as decoders,oe as dictionary,ae as encoders,ie as get_error_template,se as hash,Q as hooks,Yt as matchers,ee as nodes,te as root,re as server_loads};
4
+ `)}function Mt(t,e){if(t instanceof Error)return{name:w(String(t.name)),message:w(String(t.message)),stack:jt(t.stack),routeId:e};if(t&&typeof t=="object"){const a="message"in t?t.message:void 0;return{name:"object",message:typeof a=="string"?w(a):"[non-Error object]",stack:null,routeId:e}}return{name:typeof t,message:w(String(t)),stack:null,routeId:e}}let Z=!1,A=0;const Ft=2,Ut=({error:t,event:e})=>{if(t&&typeof t=="object"&&"message"in t){const a=String(t.message);if(a.includes("no diff result available"))return{message:""};if(a.includes("isInHiddenArea"))return{message:""};if(a.includes("TextModel got disposed"))return{message:""}}if(t&&typeof t=="object"&&"message"in t){const a=String(t.message);if(a.includes("Not found: /index.html")||a.includes("Not found"))return Z?(A++,A>=Ft&&(x.warn('Multiple consecutive "Not found" errors detected, router may be corrupted',{url:e.url.toString(),routeId:e.route.id,consecutiveErrors:A}),A=0,typeof window<"u"&&setTimeout(()=>{x.info("Triggering full page reload to recover from router corruption"),window.location.reload()},100)),x.error("Client navigation error:",{error:t,url:e.url.toString(),routeId:e.route.id}),{message:X.hooks_client_pageNotFound_message()}):(Z=!0,A=0,{message:""});A=0}return gt(t)?{message:""}:St(t)?{message:""}:(x.error("Client error:",Mt(t,e.route.id)),{message:X.hooks_client_unexpected_error()})},Yt={};var zt=q('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Bt=q("<!> <!>",1);function J(t,e){if(new.target)return lt({component:J,...t});Et(e,!0);let a=f(e,"stores",7),n=f(e,"page",7),i=f(e,"constructors",7),s=f(e,"components",23,()=>[]),_=f(e,"form",7),l=f(e,"data_0",7,null),d=f(e,"data_1",7,null),p=f(e,"data_2",7,null);vt(()=>a().page.set(n())),Tt(()=>{a(),n(),i(),s(),_(),l(),d(),p(),a().page.notify()});let O=U(!1),z=U(!1),B=U(null);bt(()=>{const r=a().page.subscribe(()=>{m(O)&&(F(z,!0),ht().then(()=>{F(B,document.title||"untitled page",!0)}))});return F(O,!0),r});const Y=y(()=>i()[2]);var tt={get stores(){return a()},set stores(r){a(r),g()},get page(){return n()},set page(r){n(r),g()},get constructors(){return i()},set constructors(r){i(r),g()},get components(){return s()},set components(r=[]){s(r),g()},get form(){return _()},set form(r){_(r),g()},get data_0(){return l()},set data_0(r=null){l(r),g()},get data_1(){return d()},set data_1(r=null){d(r),g()},get data_2(){return p()},set data_2(r=null){p(r),g()},$set:dt,$on:(r,u)=>pt(e,r,u)},G=Bt(),W=T(G);{var et=r=>{const u=y(()=>i()[0]);var E=I(),R=T(E);V(R,()=>m(u),(v,b)=>{S(b(v,{get data(){return l()},get form(){return _()},get params(){return n().params},children:(P,Wt)=>{var $=I(),st=T($);{var nt=h=>{const N=y(()=>i()[1]);var D=I(),C=T(D);V(C,()=>m(N),(j,M)=>{S(M(j,{get data(){return d()},get form(){return _()},get params(){return n().params},children:(L,$t)=>{var H=I(),_t=T(H);V(_t,()=>m(Y),(ut,mt)=>{S(mt(ut,{get data(){return p()},get form(){return _()},get params(){return n().params}}),ct=>s()[2]=ct,()=>s()?.[2])}),c(L,H)},$$slots:{default:!0}}),L=>s()[1]=L,()=>s()?.[1])}),c(h,D)},it=h=>{const N=y(()=>i()[1]);var D=I(),C=T(D);V(C,()=>m(N),(j,M)=>{S(M(j,{get data(){return d()},get form(){return _()},get params(){return n().params}}),L=>s()[1]=L,()=>s()?.[1])}),c(h,D)};k(st,h=>{i()[2]?h(nt):h(it,-1)})}c(P,$)},$$slots:{default:!0}}),P=>s()[0]=P,()=>s()?.[0])}),c(r,E)},rt=r=>{const u=y(()=>i()[0]);var E=I(),R=T(E);V(R,()=>m(u),(v,b)=>{S(b(v,{get data(){return l()},get form(){return _()},get params(){return n().params}}),P=>s()[0]=P,()=>s()?.[0])}),c(r,E)};k(W,r=>{i()[1]?r(et):r(rt,-1)})}var ot=It(W,2);{var at=r=>{var u=zt(),E=Ot(u);{var R=v=>{var b=Pt();Dt(()=>Lt(b,m(B))),c(v,b)};k(E,v=>{m(z)&&v(R)})}Rt(u),c(r,u)};k(ot,r=>{m(O)&&r(at)})}return c(t,G),At(tt)}const te=ft(J),ee=[()=>o(()=>import("../nodes/0.I2U7Nyeq.js"),__vite__mapDeps([6,4,5,7,8,9,10,11,3,12,13,14,15,16,2,17,18,19,20,21,22,23]),import.meta.url),()=>o(()=>import("../nodes/1.CgZVKAf9.js"),__vite__mapDeps([24,4,5,8,25,26,27,28,7,29,3,30,31,32,33,34,11,1,2,35,9]),import.meta.url),()=>o(()=>import("../nodes/2.xEZtPl1l.js"),__vite__mapDeps([36,4,5,7,37,8,9,29,3,30,27,28,31,33,38,2,12,13,14,15,16,11,39,34,1,35,20,40,25,41,21,22,42,43,44,45,46,47,48,49,50,51,52,53,54,32,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,19,101,102,103,10,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,18,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,26,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211]),import.meta.url),()=>o(()=>import("../nodes/3.hyVEcKKo.js"),__vite__mapDeps([212,4,5,8,57,31,7,29,3,30,25,26,27,28,32,33,34,11,1,2,35,9,43,44,42,45,38,12,13,14,15,16,39,20,40,46,21,22,41]),import.meta.url),()=>o(()=>import("../nodes/4.CdWgO8Xv.js"),__vite__mapDeps([213,4,5,7,10,11,3,47,12,13,14,15,16,2,38,27,28,8,29,30,31,39,34,1,35,20,40,48,44,49,50,51,46,52,53,54,32,33,9,55,56,57,58,59,60,61,21,22,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,41,45,91,92,93,94,95,96,97,98,99,100,19,101,102,103,43,25,42,104,105,106,107,108,109]),import.meta.url),()=>o(()=>import("../nodes/5.BhLUauX8.js"),__vite__mapDeps([214,4,5,7,202,203,12,13,14,15,3,16,2,11,27,28,8,29,30,31,204,150,130,129,32,33,34,1,35,9,128,125,112,57,86,126,56,121,122,89,90,87,59,88,131,55,44,201,108,109,10,47,38,39,20,40,48,49,50,51,46,52,53,54,58,60,61,21,22,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,41,45,91,92,93,94,95,96,97,98,99,100,19,101,102,103,43,25,42,104,105,106,107]),import.meta.url),()=>o(()=>import("../nodes/6.B3Vi01S1.js"),__vite__mapDeps([215,4,5,58,216,8,28,29,3,7,30,203,12,13,14,15,16,2,11,32,33,31,34,1,35,9,217,129,130,27,218,40,38,39,20,70,65,84,219,114,82,63,46,64,112,57,86,87,59,88,124,125,126,56,121,122,89,90,97,111,113,115,116,117,118,119,120,123,54,55,60,127,44,53,61,48,21,22,62,51,128,131,132,133,134,135,136,137,43,25,42,45,41,138,139,188,163,164,165,166,78,52,50,49,79,153,154,145,155,156,157,110,158,159,18,146,147,160,161,162,167,168,169,148,170,150,171,189,180,91,220,221,222,197,223,224,225,73,226,74,227,228,229,140,77,141,230,96,231,232,233,234,195,235,80,95,187,236,237,238,239,206,240,103,241,242,243,244,245,210,191,246,247,248,249,178,194,196,250,26,251,183,252,253,254,72,75,76,68,69,255,256,149,257,208,209,258,259,93,260,261,262,263,264,265,184,102,185,266,267,268,269,192,92,172,270,271,193,272,37,204,273,274,179,275]),import.meta.url),()=>o(()=>import("../nodes/7.DW7p588B.js"),__vite__mapDeps([276,4,5,8,31,7,29,3,30,33,38,2,12,13,14,15,16,11,27,28,39,34,1,35,20,40,44,26,25,50,51,48,49,46,223,9,57,224,54,32,55,56,58,59,60,160,61,159,18,128,125,112,86,126,121,122,89,90,87,88,129,130,131,97,53,21,22,62,63,64,65,146,147,134,127,116,117,225,73,226,124,74,227,148,228,229,52,153,154,136,115,137,145,155,156,157,110,70,111,113,114,118,119,120,123,132,133,135,43,42,45,41,138,139,158,161,162,163,164,165,166,167,168,169,170,150,171,140,77,141,78,79,230,96,231,232,233,234,195,235,80,95,187,236,237,197,238,239,206,240,103,241,242,243,244,245,210,191,246,247,248,249,178,194,196,250,82,188,189,180,91,251,183,252,253,254,256,98,99,277]),import.meta.url),()=>o(()=>import("../nodes/8.Bt8gdMyu.js"),__vite__mapDeps([278,4,5,58,114,279,21,14,22,41,13,12,15,3,7,16,2,11,54,8,29,30,32,33,31,34,1,35,28,9,40,55,56,27,57,59,60,130,220]),import.meta.url),()=>o(()=>import("../nodes/9.BSZ1-MKZ.js"),__vite__mapDeps([280,4,5,8,9,31,7,29,3,30,28,33,32,34,11,1,2,35,86,135,112,57,136,115,137,27,131,121,122,56,89,90,113,58,114,87,59,88,116,117,118,119,111,120,123,124,125,126,97,54,40,55,12,13,14,15,16,60,127,44,53,38,39,20,61,48,21,22,62,63,46,64,65,51,128,129,130,132,133,134,43,25,42,45,41,70,138,139,173,144,145,150,146,147,148,26,67,157,281,282,79,160,161,227,234,195,83,71,50,49,251,265,184,183,102,164,165,149,169,81,279,154,155,156,261,262,100,92,106,283,91,284,268,285,69,286,229]),import.meta.url),()=>o(()=>import("../nodes/10.CsryZO2H.js"),__vite__mapDeps([287,4,5,216,8,28,29,3,7,30,203,12,13,14,15,16,2,11,32,33,31,34,1,35,9,217,129,130,27,218,40,38,39,20,70,65,84,219,26,25,63,46,64,181,57,44,182,66,52,53,54,55,56,58,59,60,61,48,21,22,62,51,50,49,67,68,69,96,97,132,114,115,112,86,133,154,131,121,122,89,90,136,137,145,155,156,157,128,125,126,87,88,153,110,111,113,116,117,118,119,120,123,124,127,134,135,43,42,45,41,138,139,158,159,18,146,147,160,161,162,163,164,165,166,167,168,169,148,170,150,171,183,184,140,77,141,178,185,37,186,95,260,99,197,190,82,204,93,81,272,80,102,231,273,264,232,230,233,234,195,235,227,187,236,265,266,249,274,176,205,175,105,106,107,108,109,177,206,207,288,201,289,290,282,94,291,152,281,149,100,292,293,101,294,295,296,257,297,199,298,172,262,193,299]),import.meta.url),()=>o(()=>import("../nodes/11.BTowiakT.js"),__vite__mapDeps([300,4,5,8,42,25,31,7,29,3,30,28,12,13,14,15,16,2,11,27,33,190,117,32,34,1,35,9,120,57,112,86,54,40,55,56,58,59,60,110,97,258,193,155,125,292,293,101,38,39,20,288,201,108,109,107,61,48,44,45,161,289,118,103,296,102,301]),import.meta.url),()=>o(()=>import("../nodes/12.S6PrlAwz.js"),__vite__mapDeps([302,4,5,58,114,27,28,8,7,29,3,30,31]),import.meta.url),()=>o(()=>import("../nodes/13.Bs_o-uwb.js"),__vite__mapDeps([303,4,5,8,9,32,7,29,3,30,33,31,34,11,1,2,35,28,27,130,220,304]),import.meta.url),()=>o(()=>import("../nodes/14.CIZDoMeA.js"),__vite__mapDeps([305,4,5,8,29,3,7,30,34,11,1,2,35,130,220,33,31,32,28,9,306,13,174,197,112,57,86,40,116,117,132,58,114,115,133,135,136,137,27,131,121,122,56,89,90,307]),import.meta.url),()=>o(()=>import("../nodes/15.CzU59iiE.js"),__vite__mapDeps([308,4,5,8,62,12,13,14,15,3,7,16,2,11,63,46,64,38,27,28,29,30,31,39,34,1,35,20,40,65,51,130,220,33,47,48,44,49,50,52,53,54,32,9,55,56,57,58,59,60,61,21,22,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,41,45,91,92,93,94,95,96,97,98,99,100,19,101,102,103,43,25,42,10,104,105,106,107,108,109,245,195,159,18,128,125,112,126,121,122,129,131,146,147,134,127,116,117,210,118,191,246,142,113,114,115,119,123,124,164,165,178,163,166,188,153,154,136,137,145,155,156,157,110,111,120,132,133,135,138,139,158,160,161,162,167,168,169,148,170,150,171,189,285,255,225,223,224,226,227,228,229,140,141,230,231,232,233,234,235,187,236,237,197,238,239,206,240,241,242,243,244,247,248,249,194,196,250,26,180,251,183,252,253,254,256,149,257,208,209,258,259,306,309]),import.meta.url),()=>o(()=>import("../nodes/16.BgJmXimX.js"),__vite__mapDeps([310,4,5,29,3,7,30,34,11,1,2,35,130,220,33,8,31,57,73,225,28,16,197,32,9,76,77,40,61,48,44,311,229]),import.meta.url),()=>o(()=>import("../nodes/17.BWRlIYI7.js"),__vite__mapDeps([312,4,5,8,9,29,3,7,30,34,11,1,2,35,130,220,33,267,31,97,226,15,16,32,28,86,87,59,88,124,125,112,57,126,56,121,122,89,90,27,61,48,44,49,74,73,225,227,148,228,229,123,40,268,197,75,269]),import.meta.url),()=>o(()=>import("../nodes/18.BV2orlA1.js"),__vite__mapDeps([313,4,5,29,3,7,30,34,11,1,2,35,130,220,33]),import.meta.url),()=>o(()=>import("../nodes/19.vtvcgUzO.js"),__vite__mapDeps([314,4,5,8,61,11,3,48,44,27,28,7,29,30,31,32,33,34,1,2,35,9,12,13,14,15,16,57,187,80,38,39,20,40,62,63,46,64,65,51,180,91,55,85,113,58,114,115,112,86,87,59,88,116,117,118,119,161,128,125,126,56,121,122,89,90,129,130,131,134,143,144,135,136,137,145,146,147,148,71,133,100,43,25,42,45,21,22,41,315]),import.meta.url),()=>o(()=>import("../nodes/20.DLg8hCzP.js"),__vite__mapDeps([316,4,5,58,29,3,7,30,34,11,1,2,35,130,220,33,8,216,28,203,12,13,14,15,16,32,31,9,217,129,27,218,40,38,39,20,70,65,84,219,273,249,167,64,22,104,317]),import.meta.url)],re=[],oe={"/(app)":[6,[2],[3]],"/(app)/agent/[id]":[7,[2],[3]],"/(app)/desktop-control-agent":[8,[2],[3]],"/desktop-overlay":[13],"/dev-console":[14],"/dock-annotation":[16],"/dock-capture-editor":[17],"/dock":[15],"/frame":[18],"/hud":[19,[4]],"/(app)/settings":[9,[2],[3]],"/tab-window/[id]":[20,[5]],"/(app)/workspace/creating":[12,[2],[3]],"/(app)/workspace/[id]":[10,[2],[3]],"/(app)/workspace/[id]/files":[11,[2],[3]]},Q={handleError:Ut||(({error:t})=>{console.error(t)}),init:yt,reroute:(()=>{}),transport:{}},Gt=Object.fromEntries(Object.entries(Q.transport).map(([t,e])=>[t,e.decode])),ae=Object.fromEntries(Object.entries(Q.transport).map(([t,e])=>[t,e.encode])),se=!1,ne=(t,e)=>Gt[t](e),ie=()=>o(()=>import("../chunks/wbPk3Yxo.js"),[],import.meta.url).then(t=>t.default);export{ne as decode,Gt as decoders,oe as dictionary,ae as encoders,ie as get_error_template,se as hash,Q as hooks,Yt as matchers,ee as nodes,te as root,re as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,s as r}from"../chunks/YopO0YfH.js";export{o as load_css,r as start};
@@ -1 +1 @@
1
- import{t as L,bo as O,bw as I,bs as ee,bq as te,b as N,br as ne,bp as oe}from"../chunks/1KDVFF23.js";import{bs as P,bj as re,bk as se,a7 as b,ay as h,bf as T,W as E,bn as W,aA as R}from"../chunks/3SdAC2_C.js";import{s as $}from"../chunks/Dmy603At.js";import{i as ie}from"../chunks/Zg9SWWIQ.js";import{k as ae}from"../chunks/Dhj-Oo-y.js";import{w as ce}from"../chunks/BIv0yV05.js";import{Jr as ue}from"../chunks/BPo1GPk4.js";import{z as de,I as B}from"../chunks/Bqd7fdCF.js";import{initAppStore as le}from"../chunks/MujvTDgv.js";import{J as fe,H as me}from"../chunks/C7Ibt0hX.js";import{i as pe}from"../chunks/CSp6HTdW.js";const we=!1,ve=!1,ge=!0,Ce=Object.freeze(Object.defineProperty({__proto__:null,csr:ge,prerender:ve,ssr:we},Symbol.toStringTag,{value:"Module"}));function be(e,t,r){const f=le(e);let p=t.startSagas(e),s=!1;const l=()=>{if(!s){s=!0;try{for(const m of p)m()}finally{f.dispose(),r?.rootStoreStop===l&&(r.rootStoreStop=void 0,r.rootStoreReplaceSagas=void 0)}}};return l}const j=3,Y=4,he=100;let A=null;function S(e){const t=Date.now();A!==null&&A.direction===e&&t-A.at<he||(A={direction:e,at:t},e==="back"?history.back():history.forward())}function Ee(){return document.querySelector("webview:hover")!==null}function Ae(e){e!=="back"&&e!=="forward"||Ee()||S(e)}function q(e){return e.target instanceof Element&&e.target.closest("webview")!==null}function C(e){q(e)||(e.button===j?(e.preventDefault(),S("back")):e.button===Y&&(e.preventDefault(),S("forward")))}function F(e){q(e)||(e.button===j||e.button===Y)&&e.preventDefault()}function ye(e=window){return e.addEventListener("mouseup",C,{capture:!0}),e.addEventListener("mousedown",F,{capture:!0}),()=>{e.removeEventListener("mouseup",C,{capture:!0}),e.removeEventListener("mousedown",F,{capture:!0})}}function _e(e){const t=new Set,r="data-window-animation-paused",f=()=>e.hasAttribute("data-window-blurred");function p(i){const n=new Set;for(const o of i){if(!(o instanceof CSSAnimation)||o.playState!=="running"&&o.playState!=="paused"||o.effect?.getTiming().iterations!==1/0)continue;const d=o.effect?.target;d instanceof Element&&n.add(d)}for(const o of n)t.has(o)||(t.add(o),o.setAttribute(r,""))}function s(){for(const i of t)i.removeAttribute(r);t.clear()}function l(i){for(const n of i)!t.has(n)||e.contains(n)&&n.getAnimations({subtree:!0}).some(d=>d instanceof CSSAnimation&&d.effect?.target===n&&d.effect?.getTiming().iterations===1/0)||(t.delete(n),n.removeAttribute(r))}const m=new MutationObserver(i=>{if(!f())return;const n=new Set,o=new Set;for(const a of i){if(a.type==="childList")for(const c of a.addedNodes)c instanceof Element&&n.add(c);else if(a.target instanceof Element&&a.attributeName!==r&&a.attributeName!=="data-window-blurred")n.add(a.target);else continue;if(a.target instanceof Element)for(const c of t)(a.target.contains(c)||!e.contains(c))&&o.add(c)}l(o);const d=[];for(const a of n){if(!e.contains(a))continue;let c=a.parentElement;for(;c&&!n.has(c);)c=c.parentElement;c||d.push(...a.getAnimations({subtree:!0}))}p(d)});function v(){m.disconnect(),f()?(m.observe(e,{childList:!0,attributes:!0,subtree:!0}),p(e.getAnimations({subtree:!0}))):s()}function u(i){!f()||!(i.target instanceof Element)||(l([i.target]),p(i.target.getAnimations({subtree:!0})))}function w(i){!f()||!(i.target instanceof Element)||l([i.target])}const g=new MutationObserver(v);return g.observe(e,{attributes:!0,attributeFilter:["data-window-blurred"]}),e.addEventListener("animationstart",u,!0),e.addEventListener("animationcancel",w,!0),v(),{destroy(){g.disconnect(),m.disconnect(),e.removeEventListener("animationstart",u,!0),e.removeEventListener("animationcancel",w,!0),s()}}}function z(e,t){if(new.target)return L({component:z,...e});P(t,!0);const r=()=>ee(m,"$resolvedLocale$",f),[f,p]=te();let s=O(t,"children",7);const l=be(ue,{startSagas:()=>[]},void 0);re(l);const m=fe(),v=me();se(()=>{const n=!pe()&&window.location.pathname!=="/dock";let o=document.hasFocus(),d=!1;const a=()=>{document.documentElement.toggleAttribute("data-window-blurred",n&&d&&!o)},c=_=>{o=_,a()},M=()=>c(!1),k=()=>c(!0),K=v.subscribe(_=>{d=_,a()}),D=window.electronAPI,H=de();let y;a(),n&&(H?y=D?.on?.("window:focus",c):(window.addEventListener("blur",M),window.addEventListener("focus",k)));const Q=_e(document.documentElement),X=ce(document.getElementById("splash"));document.getElementById("app-drag-region")?.remove();const Z=ye(window),U=window.electronAPI?.on?.(B.APP.HISTORY_NAVIGATE,Ae);return()=>{K(),Q.destroy(),y?D.offById("window:focus",y):n&&!H&&(window.removeEventListener("blur",M),window.removeEventListener("focus",k)),document.documentElement.removeAttribute("data-window-blurred"),X(),Z(),U&&window.electronAPI.offById(B.APP.HISTORY_NAVIGATE,U)}});var u={get children(){return s()},set children(n){s(n),R()},$set:I,$on:(n,o)=>N(t,n,o)},w=b(),g=h(w);ae(g,r,n=>{var o=b(),d=h(o);$(d,()=>s()??T),E(n,o)}),E(e,w);var i=W(u);return p(),i}const x="/dev-console";function Se(e){return e===x||e.startsWith(x+"/")}const G="/desktop-overlay";function Le(e){return e===G||e.startsWith(`${G}/`)}const V="/frame";function Oe(e){return e===V||e===`${V}/`}function J(e,t){if(new.target)return L({component:J,...e});P(t,!0);let r=O(t,"children",7);const f=typeof window<"u"&&(Se(window.location.pathname)||Le(window.location.pathname)||Oe(window.location.pathname));var p={get children(){return r()},set children(u){r(u),R()},$set:I,$on:(u,w)=>N(t,u,w)},s=b(),l=h(s);{var m=u=>{var w=b(),g=h(w);$(g,()=>r()??T),E(u,w)},v=u=>{z(u,{get children(){return r()}})};ie(l,u=>{f?u(m):u(v,-1)})}return E(e,s),W(p)}var Ie=new Set(["$$slots","$$events","$$legacy","children"]);function Ne(e,t){if(new.target)return L({component:Ne,...e});P(t,!0);let r=O(t,"children",7),f=oe(t,Ie);var p={get children(){return r()},set children(s){r(s),R()},$set:I,$on:(s,l)=>N(t,s,l)};return J(e,ne(()=>f,{children:(s,l)=>{var m=b(),v=h(m);$(v,()=>r()??T),E(s,m)},$$slots:{default:!0}})),W(p)}export{Ne as component,Ce as universal};
1
+ import{t as L,bo as O,bw as I,bs as ee,bq as te,b as N,br as ne,bp as oe}from"../chunks/1KDVFF23.js";import{bs as P,bj as re,bk as se,a7 as b,ay as h,bf as T,W as E,bn as W,aA as R}from"../chunks/3SdAC2_C.js";import{s as $}from"../chunks/Dmy603At.js";import{i as ie}from"../chunks/Zg9SWWIQ.js";import{k as ae}from"../chunks/Dhj-Oo-y.js";import{w as ce}from"../chunks/BIv0yV05.js";import{Jr as ue}from"../chunks/BPo1GPk4.js";import{z as de,I as B}from"../chunks/Bqd7fdCF.js";import{initAppStore as le}from"../chunks/MujvTDgv.js";import{J as fe,H as me}from"../chunks/C7Ibt0hX.js";import{i as pe}from"../chunks/D7u67tV0.js";const we=!1,ve=!1,ge=!0,Ce=Object.freeze(Object.defineProperty({__proto__:null,csr:ge,prerender:ve,ssr:we},Symbol.toStringTag,{value:"Module"}));function be(e,t,r){const f=le(e);let p=t.startSagas(e),s=!1;const l=()=>{if(!s){s=!0;try{for(const m of p)m()}finally{f.dispose(),r?.rootStoreStop===l&&(r.rootStoreStop=void 0,r.rootStoreReplaceSagas=void 0)}}};return l}const j=3,Y=4,he=100;let A=null;function S(e){const t=Date.now();A!==null&&A.direction===e&&t-A.at<he||(A={direction:e,at:t},e==="back"?history.back():history.forward())}function Ee(){return document.querySelector("webview:hover")!==null}function Ae(e){e!=="back"&&e!=="forward"||Ee()||S(e)}function q(e){return e.target instanceof Element&&e.target.closest("webview")!==null}function C(e){q(e)||(e.button===j?(e.preventDefault(),S("back")):e.button===Y&&(e.preventDefault(),S("forward")))}function F(e){q(e)||(e.button===j||e.button===Y)&&e.preventDefault()}function ye(e=window){return e.addEventListener("mouseup",C,{capture:!0}),e.addEventListener("mousedown",F,{capture:!0}),()=>{e.removeEventListener("mouseup",C,{capture:!0}),e.removeEventListener("mousedown",F,{capture:!0})}}function _e(e){const t=new Set,r="data-window-animation-paused",f=()=>e.hasAttribute("data-window-blurred");function p(i){const n=new Set;for(const o of i){if(!(o instanceof CSSAnimation)||o.playState!=="running"&&o.playState!=="paused"||o.effect?.getTiming().iterations!==1/0)continue;const d=o.effect?.target;d instanceof Element&&n.add(d)}for(const o of n)t.has(o)||(t.add(o),o.setAttribute(r,""))}function s(){for(const i of t)i.removeAttribute(r);t.clear()}function l(i){for(const n of i)!t.has(n)||e.contains(n)&&n.getAnimations({subtree:!0}).some(d=>d instanceof CSSAnimation&&d.effect?.target===n&&d.effect?.getTiming().iterations===1/0)||(t.delete(n),n.removeAttribute(r))}const m=new MutationObserver(i=>{if(!f())return;const n=new Set,o=new Set;for(const a of i){if(a.type==="childList")for(const c of a.addedNodes)c instanceof Element&&n.add(c);else if(a.target instanceof Element&&a.attributeName!==r&&a.attributeName!=="data-window-blurred")n.add(a.target);else continue;if(a.target instanceof Element)for(const c of t)(a.target.contains(c)||!e.contains(c))&&o.add(c)}l(o);const d=[];for(const a of n){if(!e.contains(a))continue;let c=a.parentElement;for(;c&&!n.has(c);)c=c.parentElement;c||d.push(...a.getAnimations({subtree:!0}))}p(d)});function v(){m.disconnect(),f()?(m.observe(e,{childList:!0,attributes:!0,subtree:!0}),p(e.getAnimations({subtree:!0}))):s()}function u(i){!f()||!(i.target instanceof Element)||(l([i.target]),p(i.target.getAnimations({subtree:!0})))}function w(i){!f()||!(i.target instanceof Element)||l([i.target])}const g=new MutationObserver(v);return g.observe(e,{attributes:!0,attributeFilter:["data-window-blurred"]}),e.addEventListener("animationstart",u,!0),e.addEventListener("animationcancel",w,!0),v(),{destroy(){g.disconnect(),m.disconnect(),e.removeEventListener("animationstart",u,!0),e.removeEventListener("animationcancel",w,!0),s()}}}function z(e,t){if(new.target)return L({component:z,...e});P(t,!0);const r=()=>ee(m,"$resolvedLocale$",f),[f,p]=te();let s=O(t,"children",7);const l=be(ue,{startSagas:()=>[]},void 0);re(l);const m=fe(),v=me();se(()=>{const n=!pe()&&window.location.pathname!=="/dock";let o=document.hasFocus(),d=!1;const a=()=>{document.documentElement.toggleAttribute("data-window-blurred",n&&d&&!o)},c=_=>{o=_,a()},M=()=>c(!1),k=()=>c(!0),K=v.subscribe(_=>{d=_,a()}),D=window.electronAPI,H=de();let y;a(),n&&(H?y=D?.on?.("window:focus",c):(window.addEventListener("blur",M),window.addEventListener("focus",k)));const Q=_e(document.documentElement),X=ce(document.getElementById("splash"));document.getElementById("app-drag-region")?.remove();const Z=ye(window),U=window.electronAPI?.on?.(B.APP.HISTORY_NAVIGATE,Ae);return()=>{K(),Q.destroy(),y?D.offById("window:focus",y):n&&!H&&(window.removeEventListener("blur",M),window.removeEventListener("focus",k)),document.documentElement.removeAttribute("data-window-blurred"),X(),Z(),U&&window.electronAPI.offById(B.APP.HISTORY_NAVIGATE,U)}});var u={get children(){return s()},set children(n){s(n),R()},$set:I,$on:(n,o)=>N(t,n,o)},w=b(),g=h(w);ae(g,r,n=>{var o=b(),d=h(o);$(d,()=>s()??T),E(n,o)}),E(e,w);var i=W(u);return p(),i}const x="/dev-console";function Se(e){return e===x||e.startsWith(x+"/")}const G="/desktop-overlay";function Le(e){return e===G||e.startsWith(`${G}/`)}const V="/frame";function Oe(e){return e===V||e===`${V}/`}function J(e,t){if(new.target)return L({component:J,...e});P(t,!0);let r=O(t,"children",7);const f=typeof window<"u"&&(Se(window.location.pathname)||Le(window.location.pathname)||Oe(window.location.pathname));var p={get children(){return r()},set children(u){r(u),R()},$set:I,$on:(u,w)=>N(t,u,w)},s=b(),l=h(s);{var m=u=>{var w=b(),g=h(w);$(g,()=>r()??T),E(u,w)},v=u=>{z(u,{get children(){return r()}})};ie(l,u=>{f?u(m):u(v,-1)})}return E(e,s),W(p)}var Ie=new Set(["$$slots","$$events","$$legacy","children"]);function Ne(e,t){if(new.target)return L({component:Ne,...e});P(t,!0);let r=O(t,"children",7),f=oe(t,Ie);var p={get children(){return r()},set children(s){r(s),R()},$set:I,$on:(s,l)=>N(t,s,l)};return J(e,ne(()=>f,{children:(s,l)=>{var m=b(),v=h(m);$(v,()=>r()??T),E(s,m)},$$slots:{default:!0}})),W(p)}export{Ne as component,Ce as universal};
@@ -1 +1 @@
1
- import{t as W,bw as A,b as D,bm as u,br as R,bp as U}from"../chunks/1KDVFF23.js";import{bs as E,ca as V,aD as e,a7 as X,ay as Y,W as _,bn as N,c9 as y,a5 as a,bA as s,bS as f,bl as $,be as Z,b$ as ee,b_ as k,bO as m,aB as O}from"../chunks/3SdAC2_C.js";import{i as T}from"../chunks/Zg9SWWIQ.js";import{g as re}from"../chunks/z1Wv0MVw.js";import{p as b}from"../chunks/BrRuqfTp.js";import{F as te,cT as ae}from"../chunks/BZytk_HL.js";import{f as se}from"../chunks/DPbnmxjX.js";import"../chunks/BpT_ybtH.js";var oe=O('<p class="text-sm text-subtle"> </p>'),ie=O('<div class="min-h-screen flex items-center justify-center p-6 bg-background"><div class="w-full max-w-md" role="alert" aria-live="assertive"><div class="bg-card border border-border rounded-xl shadow-lg p-8 space-y-6 text-center"><div class="flex justify-center"><div class="w-14 h-14 rounded-full bg-warning/10 flex items-center justify-center opacity-50"><!></div></div> <div class="space-y-3"><h2 class="text-2xl font-semibold text-foreground"> </h2> <!> <p class="text-base text-subtle leading-relaxed break-words"> </p></div> <div class="flex items-center justify-center gap-3 flex-wrap"><!></div></div></div></div>');function q(i,o){if(new.target)return W({component:q,...i});E(o,!0);let c=y(()=>b.error),r=y(()=>b.status),v=y(()=>e(r)===404&&b.url.pathname!=="/");V(()=>{e(v)?(console.warn("[+error.svelte:root] 404, redirecting to /",{url:b.url.href,status:e(r)}),re("/",{replaceState:!0})):console.error("[+error.svelte:root]",{status:e(r),error:e(c)})});var g={$set:A,$on:(l,n)=>D(o,l,n)},j=X(),G=Y(j);{var H=l=>{var n=ie(),F=a(n),S=a(F),x=a(S),z=a(x),I=a(z);te(I,{get icon(){return ae},size:"lg",class:"text-warning"}),s(z),s(x);var w=f(x,2),B=a(w),J=$(B,!0),C=f(B,2);{var K=t=>{var d=oe(),p=$(d,!0);k(h=>m(p,h),[()=>u.error_page_status_label({status:e(r)})]),_(t,d)};T(C,t=>{e(r)&&e(r)!==500&&t(K)})}var L=f(C,2),M=$(L,!0);s(w);var P=f(w,2),Q=a(P);se(Q,{variant:"outline",size:"default",onclick:()=>window.location.reload(),children:(t,d)=>{Z();var p=ee();k(h=>m(p,h),[()=>u.error_page_reload_button()]),_(t,p)},$$slots:{default:!0}}),s(P),s(S),s(F),s(n),k((t,d)=>{m(J,t),m(M,d)},[()=>u.error_page_title(),()=>e(c)?.message||u.error_page_unexpected_fallback()]),_(l,n)};T(G,l=>{e(v)||l(H)})}return _(i,j),N(g)}var le=new Set(["$$slots","$$events","$$legacy"]);function ne(i,o){if(new.target)return W({component:ne,...i});E(o,!0);let c=U(o,le);var r={$set:A,$on:(v,g)=>D(o,v,g)};return q(i,R(()=>c)),N(r)}export{ne as component};
1
+ import{t as W,bw as A,b as D,bm as u,br as R,bp as U}from"../chunks/1KDVFF23.js";import{bs as E,ca as V,aD as e,a7 as X,ay as Y,W as _,bn as N,c9 as y,a5 as a,bA as s,bS as f,bl as $,be as Z,b$ as ee,b_ as k,bO as m,aB as O}from"../chunks/3SdAC2_C.js";import{i as T}from"../chunks/Zg9SWWIQ.js";import{g as re}from"../chunks/YopO0YfH.js";import{p as b}from"../chunks/BPqKxoH8.js";import{F as te,cT as ae}from"../chunks/BZytk_HL.js";import{f as se}from"../chunks/DPbnmxjX.js";import"../chunks/BpT_ybtH.js";var oe=O('<p class="text-sm text-subtle"> </p>'),ie=O('<div class="min-h-screen flex items-center justify-center p-6 bg-background"><div class="w-full max-w-md" role="alert" aria-live="assertive"><div class="bg-card border border-border rounded-xl shadow-lg p-8 space-y-6 text-center"><div class="flex justify-center"><div class="w-14 h-14 rounded-full bg-warning/10 flex items-center justify-center opacity-50"><!></div></div> <div class="space-y-3"><h2 class="text-2xl font-semibold text-foreground"> </h2> <!> <p class="text-base text-subtle leading-relaxed break-words"> </p></div> <div class="flex items-center justify-center gap-3 flex-wrap"><!></div></div></div></div>');function q(i,o){if(new.target)return W({component:q,...i});E(o,!0);let c=y(()=>b.error),r=y(()=>b.status),v=y(()=>e(r)===404&&b.url.pathname!=="/");V(()=>{e(v)?(console.warn("[+error.svelte:root] 404, redirecting to /",{url:b.url.href,status:e(r)}),re("/",{replaceState:!0})):console.error("[+error.svelte:root]",{status:e(r),error:e(c)})});var g={$set:A,$on:(l,n)=>D(o,l,n)},j=X(),G=Y(j);{var H=l=>{var n=ie(),F=a(n),S=a(F),x=a(S),z=a(x),I=a(z);te(I,{get icon(){return ae},size:"lg",class:"text-warning"}),s(z),s(x);var w=f(x,2),B=a(w),J=$(B,!0),C=f(B,2);{var K=t=>{var d=oe(),p=$(d,!0);k(h=>m(p,h),[()=>u.error_page_status_label({status:e(r)})]),_(t,d)};T(C,t=>{e(r)&&e(r)!==500&&t(K)})}var L=f(C,2),M=$(L,!0);s(w);var P=f(w,2),Q=a(P);se(Q,{variant:"outline",size:"default",onclick:()=>window.location.reload(),children:(t,d)=>{Z();var p=ee();k(h=>m(p,h),[()=>u.error_page_reload_button()]),_(t,p)},$$slots:{default:!0}}),s(P),s(S),s(F),s(n),k((t,d)=>{m(J,t),m(M,d)},[()=>u.error_page_title(),()=>e(c)?.message||u.error_page_unexpected_fallback()]),_(l,n)};T(G,l=>{e(v)||l(H)})}return _(i,j),N(g)}var le=new Set(["$$slots","$$events","$$legacy"]);function ne(i,o){if(new.target)return W({component:ne,...i});E(o,!0);let c=U(o,le);var r={$set:A,$on:(v,g)=>D(o,v,g)};return q(i,R(()=>c)),N(r)}export{ne as component};