progon-agent 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +12 -5
  2. package/dist/supervisor/cli.js +41 -41
  3. package/extension-bundle.json +3 -3
  4. package/extension-dist/background/background.js +119 -108
  5. package/extension-dist/card/card.css +1 -0
  6. package/extension-dist/card/card.html +23 -0
  7. package/extension-dist/card/card.js +27 -0
  8. package/extension-dist/chunks/shared-9kMbf8PO.js +1 -0
  9. package/extension-dist/chunks/shared-BEB011Tg.js +1 -0
  10. package/extension-dist/chunks/shared-BWYPh-Al.js +1 -0
  11. package/extension-dist/chunks/shared-Bi_ASAsl.js +377 -0
  12. package/extension-dist/chunks/shared-BjgSKbjc.js +1 -0
  13. package/extension-dist/chunks/shared-Bts1WtwM.js +1 -0
  14. package/extension-dist/chunks/shared-BvwA-cm2.css +1 -0
  15. package/extension-dist/chunks/shared-Bwk7ZjOr.js +21 -0
  16. package/extension-dist/chunks/shared-CInXPYm9.js +1 -0
  17. package/extension-dist/chunks/shared-COCbj3mN.js +1 -0
  18. package/extension-dist/chunks/shared-CX8XGwZc.js +1 -0
  19. package/extension-dist/chunks/shared-CZrS2BT6.js +111 -0
  20. package/extension-dist/chunks/shared-C_dmgeUK.js +120 -0
  21. package/extension-dist/chunks/shared-CeuPJn47.js +227 -0
  22. package/extension-dist/chunks/shared-CiEEQWpw.js +1 -0
  23. package/extension-dist/chunks/shared-Cxo909tK.js +1 -0
  24. package/extension-dist/chunks/shared-DyRhAmgo.js +51 -0
  25. package/extension-dist/chunks/shared-Xq2emDMe.js +98 -0
  26. package/extension-dist/chunks/shared-_jlBqdBD.css +1 -0
  27. package/extension-dist/chunks/shared-hePW80VL.js +1 -0
  28. package/extension-dist/content/canvas-interceptor.js +1 -1
  29. package/extension-dist/content/canvas-mapbox-bridge-main.js +1 -1
  30. package/extension-dist/content/canvas-mapbox-fiber-discovery.js +1 -1
  31. package/extension-dist/content/content.css +2 -1
  32. package/extension-dist/content/content.js +887 -362
  33. package/extension-dist/content/early-nonce-inject.js +1 -1
  34. package/extension-dist/content/main-world-nav.js +1 -1
  35. package/extension-dist/manifest.json +59 -3
  36. package/extension-dist/offscreen/offscreen.html +4 -1
  37. package/extension-dist/offscreen/offscreen.js +1 -1
  38. package/extension-dist/page-layer/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
  39. package/extension-dist/page-layer/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
  40. package/extension-dist/page-layer/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  41. package/extension-dist/page-layer/fonts/inter-latin-wght-normal.woff2 +0 -0
  42. package/extension-dist/popup/popup.css +1 -1
  43. package/extension-dist/popup/popup.html +13 -424
  44. package/extension-dist/popup/popup.js +39 -43
  45. package/extension-dist/sidepanel/sidepanel.css +1 -1
  46. package/extension-dist/sidepanel/sidepanel.html +13 -2
  47. package/extension-dist/sidepanel/sidepanel.js +1 -238
  48. package/extension-dist/workspace/workspace.css +1 -0
  49. package/extension-dist/workspace/workspace.html +25 -0
  50. package/extension-dist/workspace/workspace.js +330 -0
  51. package/package.json +2 -2
  52. package/extension-dist/hub/hub.css +0 -1
  53. package/extension-dist/hub/hub.html +0 -13
  54. package/extension-dist/hub/hub.js +0 -264
@@ -0,0 +1,377 @@
1
+ import{r as e}from"./shared-hePW80VL.js";import{$a as t,$n as n,$r as r,Aa as i,Ai as a,D as o,Da as s,E as c,Fa as l,Ga as u,Gi as d,Gn as f,Gr as p,Ha as m,Hr as h,Ia as g,Ii as _,Ja as v,Jn as y,Jr as b,Ka as x,Ki as S,Kr as C,M as w,Ma as T,N as E,Na as ee,O as D,Oa as O,Oi as te,P as k,Pa as A,Pr as j,Qa as ne,Qn as re,Qr as M,Rr as N,Sr as ie,Ui as ae,Un as oe,Ur as se,Va as ce,Xa as le,Xn as ue,Xr as de,Ya as fe,Yn as pe,Yr as me,Za as he,Zr as ge,_a as _e,ai as ve,bi as ye,bo as be,ci as xe,co as Se,ea as Ce,ei as we,eo as Te,fo as Ee,ga as De,go as Oe,ha as ke,hr as Ae,ii as je,io as Me,j as Ne,ja as Pe,ji as Fe,k as Ie,ka as Le,ki as Re,li as ze,lo as Be,ma as Ve,mo as He,ni as Ue,no as We,oi as Ge,oo as Ke,po as qe,qa as Je,qi as Ye,qn as Xe,qr as Ze,ri as Qe,ro as $e,si as P,so as et,t as tt,to as nt,uo as rt,xi as it}from"./shared-CeuPJn47.js";import{$n as at,$t as ot,C as st,Dt as ct,E as lt,Et as ut,Ft as dt,Gn as ft,J as pt,Jn as mt,K as ht,Kn as F,Lt as gt,Mt as _t,Ot as vt,Pt as yt,Qn as bt,S as xt,Un as St,Wn as Ct,Yn as wt,Zt as Tt,ar as Et,cn as Dt,cr as Ot,dn as kt,fn as At,fr as jt,hn as Mt,hr as Nt,ir as Pt,ln as Ft,lr as It,mn as Lt,mr as Rt,nr as I,on as zt,or as L,pn as Bt,pr as Vt,qn as Ht,rn as Ut,tr as Wt,ur as Gt,wt as Kt,xt as qt,yt as Jt}from"./shared-Xq2emDMe.js";import{$ as Yt,A as Xt,B as Zt,C as Qt,D as $t,E as en,G as tn,H as nn,I as rn,J as an,K as on,M as sn,N as cn,O as ln,Q as un,S as dn,T as fn,U as pn,V as mn,X as hn,Y as gn,Z as _n,_ as vn,b as yn,et as bn,g as xn,j as Sn,k as Cn,nt as wn,q as Tn,tt as En,w as Dn,x as On,y as kn,z as An}from"./shared-CZrS2BT6.js";import{C as jn,D as Mn,E as Nn,O as Pn,S as Fn,T as In,a as Ln,c as Rn,d as zn,f as Bn,i as Vn,l as Hn,m as Un,n as Wn,o as Gn,p as Kn,r as qn,s as Jn,t as Yn,u as Xn,w as Zn,x as Qn}from"./shared-DyRhAmgo.js";import{n as $n,t as er}from"./shared-CX8XGwZc.js";var tr={NORMAL_CLOSURE:1e3,SERVER_RESTART:1001,AUTH_FAILED:4001,PROTOCOL_VIOLATION:4002,BACKPRESSURE:4003,CHANNEL_NOT_FOUND:4004,RATE_LIMIT:4005,HEARTBEAT_TIMEOUT:4006},nr={queued:{tone:`active`,blockState:`active`},launching:{tone:`active`,blockState:`active`},link_pending:{tone:`active`,blockState:`active`},crawling:{tone:`active`,blockState:`active`},running_batch:{tone:`active`,blockState:`active`},completed:{tone:`success`,blockState:`terminal`},failed:{tone:`error`,blockState:`terminal`},cancelled:{tone:`neutral`,blockState:`terminal`}};function rr(e){return nr[e]}function ir(e){return rr(e.stage).blockState}function ar(e){return{cancel:ir(e)!==`terminal`,kill:e.status===`launching`||e.status===`in_progress`}}function or(e){return e.mine?e.lifecycle===`active`?e.online?null:`offline`:`notEnrolled`:`notOwner`}function sr(e){return e.activeRun!==null||e.activeJob!=null}async function cr(e,t,{pageSize:n,route:r}){let i=[],a=0,o=null;for(;o===null||a<o;){t.throwIfAborted();let s=await e({limit:n,offset:a},t);if(s.offset!==a||s.total<0||!Number.isInteger(s.total))throw Error(`${r} returned invalid pagination metadata`);if(s.items.length===0&&a<s.total)throw Error(`${r} returned an empty page before total was satisfied`);i.push(...s.items),a+=s.items.length,o=s.total}return i}async function lr(e,t){return cr(e,t,{pageSize:100,route:`GET /agents`})}var ur=`://`,dr=`https://`;function fr(e){let t=e.trim();if(t===``)return{ok:!1,reason:`empty`};if(t.includes(`*`))return{ok:!1,reason:`host_invalid`};let n=pr(t);return n===null?{ok:!1,reason:`not_parsable`}:mr(n)}function pr(e){try{return new URL(e.includes(ur)?e:`${dr}${e}`)}catch{return null}}function mr(e){if(!m(e.protocol))return{ok:!1,reason:`scheme_not_navigable`};if(e.username!==``||e.password!==``)return{ok:!1,reason:`carries_credentials`};if(e.pathname!==`/`||e.search!==``||e.hash!==``)return{ok:!1,reason:`not_bare_origin`};let t=u(e.hostname),n=ce(t)&&t.includes(`:`)?`[${t}]`:t,r=e.port===``?``:`:${e.port}`;return{ok:!0,baseUrl:`${e.protocol}//${n}${r}`}}
2
+ /**
3
+ * @license lucide-react v0.574.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ var hr=P(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),gr=P(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),_r=P(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),vr=P(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),yr=P(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),br=P(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),xr=P(`ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]),Sr=P(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Cr=P(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),wr=P(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Tr=P(`chart-pie`,[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]]),Er=P(`circle-minus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),Dr=P(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Or=P(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),kr=P(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Ar=P(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),jr=P(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),Mr=P(`fast-forward`,[[`path`,{d:`M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z`,key:`b19h5q`}],[`path`,{d:`M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z`,key:`h7h5ge`}]]),Nr=P(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),Pr=P(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),Fr=P(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),Ir=P(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Lr=P(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Rr=P(`hand`,[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]),zr=P(`hourglass`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]),Br=P(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),Vr=P(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Hr=P(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Ur=P(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Wr=P(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Gr=P(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Kr=P(`lock-keyhole-open`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{width:`18`,height:`12`,x:`3`,y:`10`,rx:`2`,key:`l0tzu3`}],[`path`,{d:`M7 10V7a5 5 0 0 1 9.33-2.5`,key:`car5b7`}]]),qr=P(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),Jr=P(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),Yr=P(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),Xr=P(`monitor-play`,[[`path`,{d:`M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z`,key:`vbtd3f`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,key:`x3v2xh`}]]),Zr=P(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Qr=P(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),$r=P(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),ei=P(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ti=P(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),ni=P(`radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),ri=P(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ii=P(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),ai=P(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),oi=P(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),si=P(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ci=P(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),li=P(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),ui=P(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),di=P(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),fi=P(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),pi=P(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),mi=P(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),hi=P(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),gi=P(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),_i=P(`wand`,[[`path`,{d:`M15 4V2`,key:`z1p9b7`}],[`path`,{d:`M15 16v-2`,key:`px0unx`}],[`path`,{d:`M8 9h2`,key:`1g203m`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M17.8 11.8 19 13`,key:`yihg8r`}],[`path`,{d:`M15 9h.01`,key:`x1ddxp`}],[`path`,{d:`M17.8 6.2 19 5`,key:`fd4us0`}],[`path`,{d:`m3 21 9-9`,key:`1jfql5`}],[`path`,{d:`M12.2 6.2 11 5`,key:`i3da3b`}]]),vi=P(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),R=/* @__PURE__ */ e(Ye(),1),yi=/* @__PURE__ */ new Set([`https:`,`http:`,`mailto:`]),bi=`\0LINK_HREF`,xi=`target="_blank" rel="noopener noreferrer"`
9
+ /**
10
+ * @license lucide-react v0.574.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ /**
16
+ * @license lucide-react v0.574.0 - ISC
17
+ *
18
+ * This source code is licensed under the ISC license.
19
+ * See the LICENSE file in the root directory of this source tree.
20
+ */
21
+ /**
22
+ * @license lucide-react v0.574.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */
27
+ /**
28
+ * @license lucide-react v0.574.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */
33
+ /**
34
+ * @license lucide-react v0.574.0 - ISC
35
+ *
36
+ * This source code is licensed under the ISC license.
37
+ * See the LICENSE file in the root directory of this source tree.
38
+ */
39
+ /**
40
+ * @license lucide-react v0.574.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */
45
+ /**
46
+ * @license lucide-react v0.574.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */
51
+ /**
52
+ * @license lucide-react v0.574.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */
57
+ /**
58
+ * @license lucide-react v0.574.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */
63
+ /**
64
+ * @license lucide-react v0.574.0 - ISC
65
+ *
66
+ * This source code is licensed under the ISC license.
67
+ * See the LICENSE file in the root directory of this source tree.
68
+ */
69
+ /**
70
+ * @license lucide-react v0.574.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */
75
+ /**
76
+ * @license lucide-react v0.574.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */
81
+ /**
82
+ * @license lucide-react v0.574.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */
87
+ /**
88
+ * @license lucide-react v0.574.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */
93
+ /**
94
+ * @license lucide-react v0.574.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */
99
+ /**
100
+ * @license lucide-react v0.574.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */
105
+ /**
106
+ * @license lucide-react v0.574.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */
111
+ /**
112
+ * @license lucide-react v0.574.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */
117
+ /**
118
+ * @license lucide-react v0.574.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */
123
+ /**
124
+ * @license lucide-react v0.574.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */
129
+ /**
130
+ * @license lucide-react v0.574.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */
135
+ /**
136
+ * @license lucide-react v0.574.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */
141
+ /**
142
+ * @license lucide-react v0.574.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */
147
+ /**
148
+ * @license lucide-react v0.574.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */
153
+ /**
154
+ * @license lucide-react v0.574.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */
159
+ /**
160
+ * @license lucide-react v0.574.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */
165
+ /**
166
+ * @license lucide-react v0.574.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */
171
+ /**
172
+ * @license lucide-react v0.574.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */
177
+ /**
178
+ * @license lucide-react v0.574.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */
183
+ /**
184
+ * @license lucide-react v0.574.0 - ISC
185
+ *
186
+ * This source code is licensed under the ISC license.
187
+ * See the LICENSE file in the root directory of this source tree.
188
+ */
189
+ /**
190
+ * @license lucide-react v0.574.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */
195
+ /**
196
+ * @license lucide-react v0.574.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */
201
+ /**
202
+ * @license lucide-react v0.574.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */
207
+ /**
208
+ * @license lucide-react v0.574.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */
213
+ /**
214
+ * @license lucide-react v0.574.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */
219
+ /**
220
+ * @license lucide-react v0.574.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */
225
+ /**
226
+ * @license lucide-react v0.574.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */
231
+ /**
232
+ * @license lucide-react v0.574.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */
237
+ /**
238
+ * @license lucide-react v0.574.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */
243
+ /**
244
+ * @license lucide-react v0.574.0 - ISC
245
+ *
246
+ * This source code is licensed under the ISC license.
247
+ * See the LICENSE file in the root directory of this source tree.
248
+ */
249
+ /**
250
+ * @license lucide-react v0.574.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */
255
+ /**
256
+ * @license lucide-react v0.574.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */
261
+ /**
262
+ * @license lucide-react v0.574.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */
267
+ /**
268
+ * @license lucide-react v0.574.0 - ISC
269
+ *
270
+ * This source code is licensed under the ISC license.
271
+ * See the LICENSE file in the root directory of this source tree.
272
+ */
273
+ /**
274
+ * @license lucide-react v0.574.0 - ISC
275
+ *
276
+ * This source code is licensed under the ISC license.
277
+ * See the LICENSE file in the root directory of this source tree.
278
+ */
279
+ /**
280
+ * @license lucide-react v0.574.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */
285
+ /**
286
+ * @license lucide-react v0.574.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */
291
+ /**
292
+ * @license lucide-react v0.574.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */
297
+ /**
298
+ * @license lucide-react v0.574.0 - ISC
299
+ *
300
+ * This source code is licensed under the ISC license.
301
+ * See the LICENSE file in the root directory of this source tree.
302
+ */
303
+ /**
304
+ * @license lucide-react v0.574.0 - ISC
305
+ *
306
+ * This source code is licensed under the ISC license.
307
+ * See the LICENSE file in the root directory of this source tree.
308
+ */
309
+ /**
310
+ * @license lucide-react v0.574.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */
315
+ /**
316
+ * @license lucide-react v0.574.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */
321
+ /**
322
+ * @license lucide-react v0.574.0 - ISC
323
+ *
324
+ * This source code is licensed under the ISC license.
325
+ * See the LICENSE file in the root directory of this source tree.
326
+ */
327
+ /**
328
+ * @license lucide-react v0.574.0 - ISC
329
+ *
330
+ * This source code is licensed under the ISC license.
331
+ * See the LICENSE file in the root directory of this source tree.
332
+ */
333
+ /**
334
+ * @license lucide-react v0.574.0 - ISC
335
+ *
336
+ * This source code is licensed under the ISC license.
337
+ * See the LICENSE file in the root directory of this source tree.
338
+ */
339
+ /**
340
+ * @license lucide-react v0.574.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */
345
+ /**
346
+ * @license lucide-react v0.574.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */
351
+ ;function Si(e){let t=/(!?)\[([^[\]<]+)\]\(/g,n=[],r=[],i=0,a=t.exec(e);for(;a!==null;){let o=a.index+a[0].length,s=wi(e,o);if(s!==-1){t.lastIndex=s+1;let c=e.slice(o,s).trim();a[1]!==`!`&&Ti(c)&&(n.push(Ei(c)),r.push(e.slice(i,a.index)),r.push(`<a href="${bi}${n.length-1}\x00" ${xi}>${a[2]}</a>`),i=s+1)}a=t.exec(e)}return r.push(e.slice(i)),{html:r.join(``),hrefs:n}}function Ci(e,t){return e.replace(/\x00LINK_HREF(\d+)\x00/g,(e,n)=>{let r=t[Number.parseInt(n,10)];return r===void 0?e:r})}function wi(e,t){let n=1;for(let r=t;r<e.length;r++){let t=e[r];if(t===`<`)return-1;if(t===`(`)n++;else if(t===`)`&&(n--,n===0))return r}return-1}function Ti(e){if(e.includes(`\0`))return!1;let t;try{t=new URL(e)}catch{return!1}return yi.has(t.protocol)}function Ei(e){return e.replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}var Di=200,Oi=/* @__PURE__ */ new Map,ki=/^[A-Za-z0-9][A-Za-z0-9+#._-]{0,19}$/,Ai=/\n[ \t]*$/;function ji(e){let t=e.indexOf(`
352
+ `);if(t===-1)return{code:e.trim(),language:null};let n=e.slice(0,t).trim();return{code:e.slice(t+1).replace(Ai,``),language:ki.test(n)?n.toLowerCase():null}}var Mi="```",Ni=`&#96;&#96;&#96;`;function Pi(e,t){return`${e.slice(t+3)}\n`}function Fi(e){let t=ji(e);return t.code.trim()!==``||t.language!==null||e.trim()===``?t:null}function Ii(e,t){let n=e.lastIndexOf(`
353
+ `,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}function Li(e){let t=e.indexOf(Mi);for(;t!==-1;){if(Ii(e,t)){let n=Fi(Pi(e,t));if(n!==null)return{index:t,block:n}}t=e.indexOf(Mi,t+3)}return null}var Ri=`\0CODE_BLOCK`,zi=/(\x00CODE_BLOCK\d+\x00)/,Bi=`\0INLINE_CODE`;function Vi(e,t){let n=e.split(zi);if(n.length===1)return null;let r=[],i=``,a=()=>{let e=i.trim();e!==``&&r.push({kind:`prose`,text:e}),i=``};return n.forEach((e,n)=>{if(n%2==0){i+=e;return}if(Number.parseInt(e.slice(11,-1),10)>=t){i+=e;return}a(),r.push({kind:`placeholder`,text:e})}),a(),r.some(e=>e.kind===`placeholder`)?r:null}var Hi=/^:?-+:?$/;function Ui(e){var t,n;let r=e.trim();if(!r.includes(`|`))return null;let i=r.split(/(?<!\\)\|/);return((t=i[0])==null?void 0:t.trim())===``&&i.shift(),((n=i[i.length-1])==null?void 0:n.trim())===``&&i.pop(),i.length===0?null:i.map(e=>e.trim().replace(/\\\|/g,`|`))}function Wi(e){return e.every(e=>Hi.test(e))}function Gi(e,t){let n=`<thead><tr>${e.map(e=>`<th>${e}</th>`).join(``)}</tr></thead>`,r=t.map(e=>`<tr>${e.map(e=>`<td>${e}</td>`).join(``)}</tr>`).join(``);return`<div class="qa-ai-chat-table-scroll" tabindex="0"><table>${n}${r===``?``:`<tbody>${r}</tbody>`}</table></div>`}function Ki(e,t){let n=(t==null?void 0:t.cache)??!0;if(n){let t=Oi.get(e);if(t!==void 0)return t}let r=e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),i=[];r=r.replace(/```([\s\S]*?)```/g,(e,t)=>{let n=Fi(t);return n===null?`${Ni}${t}${Ni}`:(i.push(n),`${Ri}${i.length-1}\x00`)});let a=Li(r);a!==null&&(i.push(a.block),r=`${r.slice(0,a.index)}${Ri}${i.length-1}\x00`);let o=r.split(`
354
+ `),s=[],c=[],l=0,u=()=>{c.length!==0&&(s.push(`<p>${c.join(`<br>`)}</p>`),c.length=0)};for(;l<o.length;){let e=o[l];if(e.trim()===``){u(),l++;continue}let t=Ui(e),n=o[l+1],r=n===void 0?null:Ui(n);if(t&&r&&r.length===t.length&&Wi(r)){u(),l+=2;let e=[];for(;l<o.length;){let t=Ui(o[l]);if(!t)break;e.push(t),l++}s.push(Gi(t,e));continue}let a=e.match(/^(#{1,3})\s+(.+)$/);if(a){let e=a[1].length;u(),s.push(`<h${e}>${a[2]}</h${e}>`),l++;continue}if(e.match(/^[-*]\s+(.+)$/)){u();let e=[];for(;l<o.length;){let t=o[l].match(/^[-*]\s+(.+)$/);if(!t)break;e.push(`<li>${t[1]}</li>`),l++}s.push(`<ul>${e.join(``)}</ul>`);continue}if(e.match(/^(\d+)\.\s+(.+)$/)){u();let e=[];for(;l<o.length;){let t=o[l].match(/^(\d+)\.\s+(.+)$/);if(!t)break;e.push(`<li>${t[2]}</li>`),l++}s.push(`<ol>${e.join(``)}</ol>`);continue}if(e.includes(Ri)){let t=Vi(e,i.length);if(t!==null){for(let e of t){if(e.kind===`prose`){c.push(e.text);continue}u(),s.push(e.text)}l++;continue}}c.push(e),l++}u(),r=s.join(``);let d=[];r=r.replace(/`([^`]+)`/g,(e,t)=>(d.push(t),`<code>${Bi}${d.length-1}\x00</code>`));let f=Si(r);if(r=f.html,r=r.replace(/\x00INLINE_CODE(\d+)\x00/g,(e,t)=>{let n=d[Number.parseInt(t,10)];return n===void 0?e:n}),r=r.replace(/\*\*([^*]+)\*\*/g,`<strong>$1</strong>`),r=r.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g,`<em>$1</em>`),r=Ci(r,f.hrefs),r=r.replace(/\x00CODE_BLOCK(\d+)\x00/g,(e,t)=>{let n=i[parseInt(t,10)];return n===void 0?e:`<pre><code${n.language===null?``:` class="language-${n.language}"`}>${n.code}</code></pre>`}),n){if(Oi.size>=Di){let e=Oi.keys().next().value;e!==void 0&&Oi.delete(e)}Oi.set(e,r)}return r}var qi=`wfl:`;function Ji(e){return e.startsWith(qi)}function Yi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Xi(e){return typeof e==`string`&&e.length>0}function Zi(e){if(!Yi(e))return null;let t=e.key;if(!Xi(t))return null;let n=e.label;if(!Yi(n)||typeof n.ru!=`string`||n.ru.trim().length===0||typeof n.en!=`string`||n.en.trim().length===0)return null;let r={ru:n.ru,en:n.en};switch(e.kind){case`text`:{let n=e.text;return typeof n!=`string`||n.length===0?null:{key:t,label:r,kind:`text`,text:n}}case`token`:{let n=e.token;return typeof n!=`string`||n.length===0?null:{key:t,label:r,kind:`token`,token:n}}case`list`:{let n=e.items;if(!Array.isArray(n)||n.length===0)return null;let i=[];for(let e of n){if(typeof e!=`string`||e.length===0)return null;i.push(e)}return{key:t,label:r,kind:`list`,items:i}}case`workflow`:{let n=e.workflowId,i=e.topic;if(typeof n!=`string`||n.length===0||!Yi(i)||i.kind!==`preset`)return null;let a=i.presetId;return typeof a!=`string`||a.length===0?null:{key:t,label:r,kind:`workflow`,workflowId:n,topic:{...i,kind:`preset`,presetId:a}}}default:return null}}function Qi(e){if(!Yi(e))return null;let t=e.facts;if(!Array.isArray(t))return null;let n=[];for(let e of t){let t=Zi(e);if(t===null)return null;n.push(t)}return{facts:n}}function $i(e){if(typeof e!=`object`||!e)return null;let t=e;return typeof t.ru==`string`&&t.ru.trim().length>0&&typeof t.en==`string`&&t.en.trim().length>0?{ru:t.ru,en:t.en}:null}function ea(e,t){return e.includes(t)?e.filter(e=>e!==t):e}function ta(e,t){return e.includes(t)?e:[...e,t]}function na(e,t){return{answeredToolCallIds:ta(e.answeredToolCallIds,t),answeredByPageOnly:ea(e.answeredByPageOnly,t),reofferedToolCallIds:ea(e.reofferedToolCallIds,t)}}var ra={pendingConfirmations:[],confirmationAnchors:{},confirmationStepAnchorId:null,answeredToolCallIds:[],answeredByPageOnly:[],reofferedToolCallIds:[],confirmationAnswerInFlight:!1};function ia(e,t,n){return t.answeredToolCallIds===void 0||!t.answeredToolCallIds.includes(n)?!1:!e.reofferedToolCallIds.includes(n)||t.reofferedBeforeRead!==void 0&&t.reofferedBeforeRead.includes(n)}function aa(e){return e.isStreaming||e.confirmationAnswerInFlight||e.permissionModeLane!==null}function oa(e,t){return Ji(t)?e.confirmationAnswerInFlight||e.permissionModeLane!==null:aa(e)}function sa(e,t){let{toolCallId:n}=t,r=e.answeredByPageOnly.includes(n);if(e.answeredToolCallIds.includes(n)&&!r||e.pendingConfirmations.some(e=>e.toolCallId===n))return{kind:`redelivered`};let i=ca(e);return{kind:`offered`,confirmation:{pendingConfirmations:[...e.pendingConfirmations,la(t,i)],confirmationAnchors:{...e.confirmationAnchors,[n]:i},confirmationStepAnchorId:i,...r?{answeredToolCallIds:ea(e.answeredToolCallIds,n),answeredByPageOnly:ea(e.answeredByPageOnly,n),reofferedToolCallIds:ta(e.reofferedToolCallIds,n),pendingRefetch:!0}:{answeredToolCallIds:e.answeredToolCallIds,answeredByPageOnly:e.answeredByPageOnly,reofferedToolCallIds:e.reofferedToolCallIds}}}}function ca(e){return e.streamingMessageId===null?e.confirmationStepAnchorId:e.streamingMessageId}function la(e,t){let n=$i(e.title);return{toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,description:e.description,display:Qi(e.display),...n!==null&&{title:n},...e.operationTitles!==void 0&&{operationTitles:e.operationTitles},status:`open`,anchorMessageId:t}}function ua(e){let t=e.pendingConfirmations;return t.some(e=>e.status===`open`)?{pendingConfirmations:t.map(e=>e.status===`open`?{...e,status:`rejecting`}:e)}:{pendingConfirmations:t}}function da(e,t){let n=e.pendingConfirmations.find(e=>e.toolCallId===t);return n===void 0||n.status!==`open`?e:{...e,pendingConfirmations:e.pendingConfirmations.map(e=>e.toolCallId===t?{...e,status:`resolving`}:e),confirmationAnswerInFlight:!0}}function fa(e){return e.role===`assistant`&&e.content===``&&e.pendingActionStatus!==void 0}function pa(e,t){let{messageId:n,status:r,anchorMessageId:i}=t;if(e.some(e=>e.id===n))return e.map(e=>e.id===n?{...e,pendingActionStatus:r}:e);let a={id:n,role:`assistant`,content:``,pendingActionStatus:r},o=i===null?-1:e.findIndex(e=>e.id===i);if(o===-1)return[...e,a];let s=o+1;for(;s<e.length;){let t=e[s];if(t===void 0||!fa(t))break;s+=1}return[...e.slice(0,s),a,...e.slice(s)]}function ma(e,t){let{messageId:n,toolCallId:r,status:i}=t,a=e.confirmationAnchors[r],o=pa(e.messages,{messageId:n,status:i,anchorMessageId:a===void 0?null:a}),s=e.pendingConfirmations;return{messages:o,pendingConfirmations:s.some(e=>e.toolCallId===r)?s.filter(e=>e.toolCallId!==r):s,confirmationAnchors:Object.fromEntries(Object.entries(e.confirmationAnchors).filter(([e])=>e!==r)),...na(e,r)}}function ha(e){let t=e.pendingConfirmations,n=t.some(e=>e.status===`resolving`&&Ji(e.toolCallId))&&e.confirmationAnswerInFlight;return t.every(e=>e.status===`open`||e.status===`resolving`&&Ji(e.toolCallId))?{pendingConfirmations:t,pendingRefetch:e.pendingRefetch,confirmationAnswerInFlight:n}:{pendingConfirmations:t.flatMap(e=>e.status===`resolving`&&Ji(e.toolCallId)?[e]:e.status===`resolving`?[]:e.status===`rejecting`?[{...e,status:`open`}]:[e]),pendingRefetch:t.some(e=>e.status===`resolving`&&!Ji(e.toolCallId))?!0:e.pendingRefetch,confirmationAnswerInFlight:n}}function ga(e,t){let n=e.pendingConfirmations;return{pendingConfirmations:n.some(e=>e.toolCallId===t&&e.status===`resolving`)?n.map(e=>e.toolCallId===t&&e.status===`resolving`?{...e,status:`open`}:e):n,confirmationAnswerInFlight:!1}}function _a(e){return e.pendingConfirmations===void 0?ra.pendingConfirmations:e.pendingConfirmations}function va(e,t){let n=_a(t);return!n.some(t=>e.answeredToolCallIds.includes(t.toolCallId))&&e.pendingConfirmations.every(r=>ia(e,t,r.toolCallId)?!0:r.status===`open`&&n.some(e=>e.toolCallId===r.toolCallId))}function ya(e,t){let n=e.answeredToolCallIds,r=t.answeredToolCallIds,i={answeredToolCallIds:n,answeredByPageOnly:e.answeredByPageOnly,reofferedToolCallIds:e.reofferedToolCallIds};if(r===void 0)return i;let a=r.filter(r=>!n.includes(r)&&ia(e,t,r));return a.length===0?i:{answeredToolCallIds:[...n,...a],answeredByPageOnly:[...e.answeredByPageOnly,...a],reofferedToolCallIds:e.reofferedToolCallIds.filter(e=>!a.includes(e))}}function ba(e,t){return{pendingConfirmations:_a(t),confirmationAnchors:ra.confirmationAnchors,confirmationStepAnchorId:ra.confirmationStepAnchorId,...ya(e,t),confirmationAnswerInFlight:e.confirmationAnswerInFlight}}function xa(e){return e.kind===`question`&&e.payload.origin===`assistant`}function Sa(e){return(e.blocks??[]).flatMap(e=>{if(!xa(e))return[];let t=e.payload;return t.id!==e.id||!Array.isArray(t.questions)||![`pending`,`answered`,`cancelled`,`superseded`].includes(String(t.status))?[]:[e.payload]})}function Ca(e){let t=/* @__PURE__ */ new Map;for(let n of e)for(let e of Sa(n)){if(e.status!==`answered`)continue;let n=t.get(e.continuationTurnId);(n===void 0||e.continuationAttempt>n)&&t.set(e.continuationTurnId,e.continuationAttempt)}let n=!1,r=e.map(e=>{if(e.role!==`assistant`)return e;let r=t.get(e.id);return r===void 0||e.continuationAttempt===r||e.continuationAttempt!==void 0&&e.continuationAttempt>r?e:(n=!0,{...e,continuationAttempt:r})});return n?r:e}function wa(e,t){var n;let r=(n=e.find(e=>e.id===t))==null?void 0:n.continuationAttempt;for(let n of e)for(let e of Sa(n))e.status===`answered`&&e.continuationTurnId===t&&(r===void 0||e.continuationAttempt>r)&&(r=e.continuationAttempt);return r}function Ta(e,t){return{id:e.id,role:`assistant`,content:``,continuationAttempt:t,...e.effort!==void 0&&{effort:e.effort},...e.blocks!==void 0&&{blocks:e.blocks}}}function Ea(e,t){let n=e.find(e=>e.id===t.messageId),r=wa(e,t.messageId);return r!==void 0&&t.continuationAttempt<r?{kind:`lower-attempt`}:n!==void 0&&r===t.continuationAttempt&&t.replaceExisting!==!0?{kind:`same-attempt-replay`}:n===void 0?{kind:`accepted`,messages:[...e,{id:t.messageId,role:`assistant`,content:``,continuationAttempt:t.continuationAttempt,...t.effort!==void 0&&{effort:t.effort}}]}:{kind:`accepted`,messages:e.map(e=>e.id===t.messageId?Ta(e,t.continuationAttempt):e)}}function Da(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!n||n.blocks===void 0)continue;let r=n.blocks.filter(e=>e.state===`active`);for(let e of Sa({blocks:r}))if(e.status===`pending`)return e}return null}function Oa(e){return e.role===`assistant`||e.role===`agent`&&e.agentOrigin===`agent_question`}function ka(e,t){let n=[...e];for(let e of t){let t=n.findIndex(t=>t.id===e.id);t<0?n.push(e):e.revision>n[t].revision&&(n[t]=e)}return n}function Aa(e,t){let n=new Map(t.messages.map(e=>[e.id,e]));return Ca(e.map(e=>{if(!Oa(e))return e;let r=n.get(e.id),i=ka(ka((r==null?void 0:r.blocks)??[],t.pendingMessageBlocks[e.id]??[]),e.blocks??[]);return i.length===0&&e.blocks===void 0?e:{...e,blocks:i}}))}function ja(e){let t={...e.pendingMessageBlocks},n=Ca(e.messages.map(e=>{let n=t[e.id];return!n||!Oa(e)?e:(delete t[e.id],{...e,blocks:ka(e.blocks??[],n)})})),r=Da(n)??Da(Object.entries(t).map(([e,t])=>({id:e,role:`assistant`,blocks:t})));return{...e,messages:n,pendingMessageBlocks:t,pendingQuestionBatch:r}}function Ma(e,t){if(e.conversationId!==t.conversationId)return e;let{block:n,messageId:r}=t;if(!Number.isSafeInteger(n.revision)||n.revision<1)return e;let i=e.messages.find(e=>e.id===r);if(i&&!Oa(i))return e;let a=((i==null?void 0:i.blocks)??e.pendingMessageBlocks[r]??[]).find(e=>e.id===n.id);if(a&&a.revision>=n.revision)return e;if(xa(n)){let i=Sa({blocks:[n]})[0];if(!i||i.assistantMessageId!==r||i.conversationId!==t.conversationId)return e;if(i.status===`pending`&&e.pendingQuestionBatch&&e.pendingQuestionBatch.id!==i.id)return e.pendingRefetch?e:{...e,pendingRefetch:!0}}let o=ka(e.pendingMessageBlocks[r]??[],[n]);return ja({...e,pendingMessageBlocks:{...e.pendingMessageBlocks,[r]:o},pendingRefetch:!i||e.pendingRefetch})}var Na={drawnFromMessageId:null,olderCursor:null,filesBefore:[],revision:0};function Pa(e){let{drawnFromMessageId:t}=e.historyWindow;if(t===null)return 0;let n=e.messages.findIndex(e=>e.id===t);if(n<0)throw Error(`Chat history window: drawnFromMessageId ${t} is not among the held messages`);return n}function Fa(e){let t=Pa(e);return t===0?e.messages:e.messages.slice(t)}function Ia(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>Ia(e,t[n]));if(Array.isArray(t))return!1;let n=e,r=t,i=La(n),a=La(r);return i.length===a.length&&i.every(e=>Ia(n[e],r[e]))}function La(e){return Object.keys(e).filter(t=>e[t]!==void 0)}function Ra(e,t){return e===void 0||t===void 0?e===t:e.length===t.length&&e.every((e,n)=>{let r=t[n];return r!==void 0&&e.id===r.id&&e.revision===r.revision&&e.state===r.state})}function za(e,t){if(e===t)return!0;if(!Ra(e.blocks,t.blocks))return!1;let n={...e},r={...t},i=La(n).filter(e=>e!==`blocks`);return i.length===La(r).filter(e=>e!==`blocks`).length&&i.every(e=>Ia(n[e],r[e]))}function Ba(e,t){let n=new Map(e.map(e=>[e.id,e])),r=!1,i=t.map(e=>{let t=n.get(e.id);return t===void 0||t===e||!za(t,e)?e:(r=!0,t)});return r?i:t}var Va=/* @__PURE__ */ new Set;function Ha(e,t){let n=e.historyWindow.revision+1,{windowFirstMessageId:r}=t;if(r===null)return{messages:[...t.messages],historyWindow:{drawnFromMessageId:null,olderCursor:t.olderCursor,filesBefore:t.filesBefore,revision:n},unvouchedMessageIds:Va};let i=t.messages.findIndex(e=>e.id===r);if(i<0)throw Error(`Chat history page: windowFirstMessageId ${r} is not among its messages`);let a=t.messages.slice(0,i),o=t.messages.slice(i),s=Fa(e),c=s.findIndex(e=>e.id===r);if(c<=0)return Ua(a,o,t,r,n);let l=new Map(a.map(e=>[e.id,e])),u=s.slice(0,c).map(e=>{let t=l.get(e.id);return t===void 0?e:t}),d=new Set(u.filter(e=>!l.has(e.id)&&Wa(e)).map(e=>e.id)),f=new Set(u.map(e=>e.id)),p=u[0];if(p===void 0)throw Error(`unreachable: heldAt > 0`);return{messages:[...a.filter(e=>!f.has(e.id)),...u,...o],historyWindow:{drawnFromMessageId:p.id,olderCursor:e.historyWindow.olderCursor,filesBefore:t.filesBefore,revision:n},unvouchedMessageIds:d}}function Ua(e,t,n,r,i){return{messages:[...e,...t],historyWindow:{drawnFromMessageId:r,olderCursor:n.olderCursor,filesBefore:n.filesBefore,revision:i},unvouchedMessageIds:Va}}function Wa(e){return e.blocks!==void 0&&e.blocks.some(e=>e.state===`active`)}function Ga(e,t){return t.size===0?e:e.map(e=>!t.has(e.id)||e.blocks===void 0?e:{...e,blocks:e.blocks.map(e=>e.state===`active`?{...e,state:`superseded`}:e)})}function Ka(e){return{drawnFromMessageId:null,olderCursor:null,filesBefore:[],revision:e.historyWindow.revision+1}}function qa(e){let t=Object.entries(e),n=t.filter(([,e])=>e.some(e=>e.state===`active`));return n.length===t.length?e:Object.fromEntries(n)}function Ja(e,t){if(t.conversationId!==e.conversationId||t.windowRevision!==e.historyWindow.revision||t.cursor!==e.historyWindow.olderCursor)return{kind:`stale`};let n=new Set(Fa(e).map(e=>e.id)),r=t.messages.map(e=>e.id).filter(e=>n.has(e));return r.length>0?{kind:`overlap`,overlappingIds:r}:{kind:`apply`}}function Ya(e,t){let n=Pa(e),r=e.messages.slice(0,n),i=e.messages.slice(n),a=new Map(r.map(e=>[e.id,e])),o=new Set(t.messages.map(e=>e.id)),s=t.messages.map(e=>{let t=a.get(e.id);if(t===void 0)return e;let n=t.blocks??[],r=ka(n,e.blocks??[]);return Ra(r,n)?t:{...t,blocks:r}}),c=Ca([...r.filter(e=>!o.has(e.id)),...s,...i]),l=t.messages[0];return{messages:Ba(e.messages,c),historyWindow:{...e.historyWindow,drawnFromMessageId:l===void 0?e.historyWindow.drawnFromMessageId:l.id,olderCursor:t.olderCursor}}}function Xa(e,t){return t.type!==`message-appended`&&t.type!==`block-upsert`||e.conversationId!==t.conversationId?!1:t.type===`message-appended`||!Za(e,t.messageId)}function Za(e,t){return e.messages.some(e=>e.id===t)}function Qa(e,t){if(!Xa(e,t))return e;if(Za(e,t.messageId))return e.pendingRefetch?e:{...e,pendingRefetch:!0};let n=e.appendedRowsOwed.includes(t.messageId)?e.appendedRowsOwed:[...e.appendedRowsOwed,t.messageId];return e.pendingRefetch&&n===e.appendedRowsOwed?e:{...e,pendingRefetch:!0,appendedRowsOwed:n}}function $a(e,t){if(e.appendedRowsOwed.length===0)return null;let n=new Set(e.messages.map(e=>e.id)),r=new Set(e.appendedRowsOwed),i=t.messages.filter(e=>r.has(e.id)&&!n.has(e.id));if(i.length===0)return null;let a=new Map(t.messages.map((e,t)=>[e.id,t])),o=i.reduce((t,n)=>eo(t,n,a,e.streamingMessageId),e.messages),s=/* @__PURE__ */ new Set([...e.pendingConfirmations.map(e=>e.toolCallId),...e.answeredToolCallIds]),c=(t.pendingConfirmations??[]).filter(e=>Ji(e.toolCallId)&&!s.has(e.toolCallId)),l=new Set(i.map(e=>e.id));return{...e,messages:o,pendingConfirmations:c.length===0?e.pendingConfirmations:[...e.pendingConfirmations,...c],appendedRowsOwed:e.appendedRowsOwed.filter(e=>!l.has(e)),pendingRefetch:!0}}function eo(e,t,n,r){let i=n.get(t.id);if(i===void 0)return[...e,t];let a=e.findIndex(e=>{let t=n.get(e.id);return t!==void 0&&t>i}),o=r!==null&&!n.has(r)?e.findIndex(e=>e.id===r):-1,s=a>=0?a:o;return s<0?[...e,t]:[...e.slice(0,s),t,...e.slice(s)]}var to=/\S/,no={content:e=>to.test(e.content),thinkingText:e=>e.effort!==void 0&&ct(e.effort)&&e.thinkingText!==void 0&&e.thinkingText.length>0,toolCalls:e=>e.toolCalls!==void 0&&e.toolCalls.length>0,toolResults:(e,t)=>e.toolResults!==void 0&&e.toolResults.some(e=>t.isRenderableToolResult(e.result)),blocks:e=>e.blocks!==void 0&&e.blocks.length>0,pendingActionStatus:e=>e.pendingActionStatus!==void 0,attachments:e=>e.attachments!==void 0&&e.attachments.length>0};function ro(e,t){return Object.values(no).some(n=>n(e,t))}var io={conversationPermissionMode:null,permissionModeLane:null,completedPermissionModeLaneIds:/* @__PURE__ */ new Set};function ao(e){return e.isStreaming||e.permissionModeLane!==null}function oo(e,t){return e===null||t.permissionModeVersion>e.permissionModeVersion}function so(e,t){return t.conversationId!==e.conversationId||!oo(e.conversationPermissionMode,t)?e:{...e,conversationPermissionMode:{permissionMode:t.permissionMode,permissionModeVersion:t.permissionModeVersion}}}function co(e,t){return e===null?void 0:e.calls.find(e=>e.toolCallId===t)}function lo(e,t){let n=e.completedPermissionModeLaneIds;return n.has(t)?n:new Set(n).add(t)}function uo(e,t){let{decisionLaneId:n,toolCallId:r}=t;if(e.completedPermissionModeLaneIds.has(n))return e;let i=e.permissionModeLane,a=i!==null&&i.decisionLaneId!==n,o=i===null||a?{decisionLaneId:n,calls:[]}:i,s=a&&i!==null?lo(e,i.decisionLaneId):e.completedPermissionModeLaneIds;if(e.answeredToolCallIds.includes(r)||o.calls.some(e=>e.toolCallId===r))return o===i?e:{...e,permissionModeLane:o,completedPermissionModeLaneIds:s};let c=ca(e);return{...e,permissionModeLane:{decisionLaneId:o.decisionLaneId,calls:[...o.calls,{toolCallId:r,offer:t,outcome:null,handedBack:!1}]},completedPermissionModeLaneIds:s,confirmationAnchors:{...e.confirmationAnchors,[r]:c},confirmationStepAnchorId:c}}function fo(e,t){let n=e.permissionModeLane,r=co(n,t);return n===null||r===void 0||r.handedBack?e:{...e,permissionModeLane:{...n,calls:n.calls.map(e=>e.toolCallId===t?{...e,handedBack:!0}:e)}}}function po(e,t,n){let r=e.permissionModeLane,i=co(r,t);return r===null||i===void 0||i.outcome===n?e:{...e,permissionModeLane:{...r,calls:r.calls.map(e=>e.toolCallId===t?{...e,outcome:n}:e)}}}function mo(e,t){let n=e.permissionModeLane;return n===null||n.decisionLaneId!==t?e:{...e,permissionModeLane:null,completedPermissionModeLaneIds:lo(e,t)}}function ho(e){let t=e.permissionModeLane;if(t===null)return e;let n=new Set(e.pendingConfirmations.map(e=>e.toolCallId)),r=t.calls.filter(t=>t.outcome===null&&!t.handedBack&&!n.has(t.toolCallId)&&!e.answeredToolCallIds.includes(t.toolCallId)).map(t=>{let n=e.confirmationAnchors[t.toolCallId];return la(t.offer,n===void 0?null:n)});return{...e,pendingConfirmations:r.length===0?e.pendingConfirmations:[...e.pendingConfirmations,...r],permissionModeLane:null,completedPermissionModeLaneIds:lo(e,t.decisionLaneId)}}function go(e,t){var n;let r=e.conversationPermissionMode;if(t.permissionMode!==void 0&&t.permissionModeVersion!==void 0){if(t.permissionMode===null||t.permissionModeVersion===null)r=null;else{let e={permissionMode:t.permissionMode,permissionModeVersion:t.permissionModeVersion};oo(r,e)&&(r=e)}}let i=e.permissionModeLane,a=i!==null&&((n=t.decisionLaneCompletedIds)==null?void 0:n.includes(i.decisionLaneId))===!0;return{conversationPermissionMode:r,permissionModeLane:a?null:i,completedPermissionModeLaneIds:a&&i!==null?lo(e,i.decisionLaneId):e.completedPermissionModeLaneIds}}function _o(e){return!e.pendingSend&&!e.isStreaming}var vo=[`agent_question`,`workflow_lead`],yo={messages:[],isStreaming:!1,thinkingText:``,...ra,...io,pendingQuestionBatch:null,pendingMessageBlocks:{},error:null,conversationId:null,streamingMessageId:null,thinkingStartedAt:null,pendingSend:!1,pendingRefetch:!1,appendedRowsOwed:[],ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,historyWindow:Na},bo={thinkingText:``,thinkingStartedAt:null};function xo(e,t){if(e.streamingMessageId===null)return e;let n=e.streamingMessageId;return{...e,messages:e.messages.map(e=>e.id===n?t(e):e)}}function So(e){return typeof e==`object`&&!!e&&`mode`in e&&e.mode===`preview_confirm`&&`changeSetId`in e&&typeof e.changeSetId==`string`&&`projectId`in e&&typeof e.projectId==`string`}function Co(e,t){return e.kind===`run_wait`&&typeof e.payload==`object`&&e.payload!==null&&`toolCallId`in e.payload&&e.payload.toolCallId===t}function wo(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if((i==null?void 0:i.id)===t&&n(i))return!0}return!1}function To(e,t){let n=e[t];return typeof n==`string`?n:void 0}function Eo(e,t){let n=e[t];return typeof n==`number`&&Number.isInteger(n)&&n>=0?n:void 0}function Do(e){return e.pendingRefetch?e:{...e,pendingRefetch:!0}}function Oo(e,t){switch(t.type){case`conversation-permission-mode`:return so(e,t);case`action-required`:{if(t.decidedBy!==`permission_mode`)return null;let n=e.ignoredHydratedReplayMessageId,r=n===null?e:{...e,confirmationStepAnchorId:n},i=uo(r,t);return i===r?e:{...i,...bo,isStreaming:!1,streamingMessageId:null,pendingSend:!1}}case`decision-complete`:return e.permissionModeLane!==null&&e.permissionModeLane.decisionLaneId===t.decisionLaneId?mo(e,t.decisionLaneId):null;default:return null}}function ko(e,t,n){let r=Oo(e,t);if(r!==null)return r;if(e.ignoredContinuationGeneration&&t.type!==`message-start`&&t.type!==`block-upsert`&&t.type!==`message-appended`&&(e.ignoredHydratedReplayMessageId===null||t.type!==`action-required`&&t.type!==`action-resolved`))return t.type===`done`?{...e,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null}:e;switch(t.type){case`text-delta`:return xo(e,e=>({...e,content:e.content+t.text}));case`reasoning-delta`:return{...e,thinkingText:e.thinkingText+t.text,thinkingStartedAt:e.thinkingStartedAt??Date.now()};case`reasoning-done`:{let t=e.thinkingStartedAt?Math.round((Date.now()-e.thinkingStartedAt)/1e3):0;return{...xo(e,n=>({...n,thinkingText:e.thinkingText,thinkingDuration:t})),thinkingText:``,thinkingStartedAt:null}}case`conversation-started`:return{...e,conversationId:t.conversationId};case`message-start`:{if(t.continuationAttempt!==void 0){let n=t.continuationAttempt,r=[...e.messages].reverse().find(e=>e.role===`user`),i=Ea(e.messages,{messageId:t.messageId,continuationAttempt:n,replaceExisting:t.replaceExisting,effort:r==null?void 0:r.effort});return i.kind===`lower-attempt`?{...e,ignoredContinuationGeneration:!0,ignoredHydratedReplayMessageId:null}:i.kind===`same-attempt-replay`?e:{...e,...bo,isStreaming:!0,streamingMessageId:t.messageId,error:null,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:i.messages}}let n=e.messages.findIndex(e=>e.id===t.messageId);if(n>=0&&!e.isStreaming){let r=e.messages[n];if(r.content.length>0)return{...e,ignoredContinuationGeneration:!0,ignoredHydratedReplayMessageId:t.messageId};if(r.role===`assistant`)return{...e,...bo,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:e.messages.map((e,t)=>t===n?{id:e.id,role:`assistant`,content:``,...e.effort!==void 0&&{effort:e.effort},...e.blocks!==void 0&&{blocks:e.blocks}}:e)}}if(e.streamingMessageId&&e.messages.some(t=>t.id===e.streamingMessageId))return{...e,...bo,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:e.messages.map(n=>n.id===e.streamingMessageId?{...n,id:t.messageId}:n)};let r=(()=>{let t=[...e.messages].reverse().find(e=>e.role===`user`);return t==null?void 0:t.effort})();return{...e,...bo,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:[...e.messages,{id:t.messageId,role:`assistant`,content:``,...r!==void 0&&{effort:r}}]}}case`tool-call-complete`:{let n=Eo(t,`contentOffset`);return xo(e,e=>({...e,toolCalls:[...e.toolCalls??[],{toolCallId:t.toolCallId,toolName:t.toolName,...t.title!==void 0&&{title:t.title},...t.effect!==void 0&&{effect:t.effect},...t.operationTitles!==void 0&&{operationTitles:t.operationTitles},args:t.args,...n===void 0?{}:{contentOffset:n}}]}))}case`tool-result`:{let n=xo(e,e=>({...e,toolResults:[...e.toolResults??[],{toolCallId:t.toolCallId,result:t.result}]}));return!So(t.result)||e.streamingMessageId===null?n:{...n,confirmationAnchors:{...n.confirmationAnchors,[t.toolCallId]:e.streamingMessageId}}}case`action-required`:{let n=fo(e,t.toolCallId),r=n.ignoredHydratedReplayMessageId,i=sa(r===null?n:{...n,confirmationStepAnchorId:r},t);return i.kind===`redelivered`?n:{...n,...bo,...i.confirmation,isStreaming:!1,streamingMessageId:null,pendingSend:!1,confirmationAnswerInFlight:n.confirmationAnswerInFlight}}case`action-resolved`:{let n=po(e,t.toolCallId,t.status);if(t.status===`applied`||t.status===`partially_applied`||(n.pendingMessageBlocks[t.messageId]??[]).some(e=>Co(e,t.toolCallId))||wo(n.messages,t.messageId,e=>{var n,r;return((n=e.toolResults)==null?void 0:n.some(e=>e.toolCallId===t.toolCallId&&So(e.result)))===!0||((r=e.blocks)==null?void 0:r.some(e=>Co(e,t.toolCallId)))===!0})){let e={...n.confirmationAnchors};return delete e[t.toolCallId],{...n,confirmationAnchors:e,...na(n,t.toolCallId)}}return{...n,...ma(n,t)}}case`block-upsert`:return Ma(e,t);case`message-appended`:return Qa(e,t);case`done`:return{...e,...bo,isStreaming:!1,streamingMessageId:null,pendingSend:!1,...ha(e)};case`error`:{let r=To(t,`errorCode`),i=To(t,`providerErrorCode`);return{...e,...bo,error:{code:t.code,message:t.message,...r===void 0?{}:{errorCode:r},...i===void 0?{}:{providerErrorCode:i}},isStreaming:!1,streamingMessageId:null,pendingSend:!1,...ha(e),messages:e.messages.filter(t=>!(t.id===e.streamingMessageId&&t.role===`assistant`&&!ro(t,n)))}}default:return e}}function Ao(e){return function(t,n){switch(n.type){case`EVENT`:{let r=ko(t,n.payload,e);return n.payload.type===`message-start`&&r!==t?ja(r):r}case`USER_MESSAGE`:{let{id:e,content:r,effort:i,attachments:a}=n.payload;return{...t,error:null,pendingSend:!0,...ua(t),messages:[...t.messages,{id:e,role:`user`,content:r,...i!==void 0&&{effort:i},...a.length>0&&{attachments:a}}]}}case`ASSISTANT_PLACEHOLDER`:{let{id:e,effort:r}=n.payload,i=t.messages[t.messages.length-1],a=r===void 0?(i==null?void 0:i.role)===`user`?i.effort:void 0:r;return{...t,error:null,...bo,messages:[...t.messages,{id:e,role:`assistant`,content:``,...a!==void 0&&{effort:a}}],isStreaming:!0,streamingMessageId:e}}case`CONFIRM_ACTION`:case`REJECT_ACTION`:return da(t,n.toolCallId);case`LEAD_DECISION_REFUSED`:return{...t,...ga(t,n.toolCallId)};case`DECISION_LANE_COMPLETE`:return t.confirmationAnswerInFlight?{...t,confirmationAnswerInFlight:!1}:t;case`CONVERSATION_PERMISSION_MODE`:return so(t,n.payload);case`PERMISSION_MODE_LANE_EXPIRED`:return ho(t);case`HYDRATE_HISTORY`:{if(n.payload.conversationId!==t.conversationId)return t;if(!_o(t)||n.payload.readDuringTurn===!0)return $a(t,n.payload)??Do(t);if(!va(t,n.payload))return Do(t);let{historyWindow:e}=n.payload,r=e===void 0?{messages:n.payload.messages,historyWindow:Ka(t),unvouchedMessageIds:/* @__PURE__ */ new Set}:Ha(t,{messages:n.payload.messages,...e}),i=Ba(t.messages,Ga(Aa(r.messages,t),r.unvouchedMessageIds)),a=new Set(i.map(e=>e.id)),o=Object.fromEntries(Object.entries(t.pendingMessageBlocks).filter(([e])=>!a.has(e))),s=e===void 0?o:qa(o),c=Da(i)??Da(Object.entries(s).map(([e,t])=>({id:e,role:`assistant`,blocks:t})));return{...yo,conversationId:t.conversationId,...ba(t,n.payload),...go(t,n.payload),messages:i,pendingQuestionBatch:c,pendingMessageBlocks:s,appendedRowsOwed:t.appendedRowsOwed.filter(e=>!a.has(e)),historyWindow:r.historyWindow}}case`PREPEND_OLDER_HISTORY`:return Ja(t,n.payload).kind===`apply`?{...t,...Ya(t,n.payload)}:t;case`BIND_CONVERSATION`:return t.conversationId===n.payload.conversationId?t:{...yo,conversationId:n.payload.conversationId};case`ADOPT_CONVERSATION`:return t.conversationId===null?{...t,conversationId:n.payload.conversationId}:t;case`RESET`:{let e=n.payload===void 0?null:n.payload.conversationId;return{...yo,conversationId:e}}default:return t}}}function jo(e){return e.selectedOptionIds===void 0?e.customText===void 0?{questionId:e.questionId,skip:!0}:{questionId:e.questionId,customText:e.customText}:{questionId:e.questionId,selectedOptionIds:[...e.selectedOptionIds].sort()}}function Mo(e,t,n){return JSON.stringify({kind:`answer`,batchId:e,revision:t,answers:[...n].sort((e,t)=>e.questionId.localeCompare(t.questionId)).map(jo)})}function No(e,t){return JSON.stringify({kind:`cancel`,batchId:e,revision:t})}async function Po(e,t){if(!e)throw Error(`Question retry identity requires a conversation`);let n=JSON.stringify([`chat-question-command-v1`,e,t]),r=new Uint8Array(await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(n)));r[6]=r[6]&15|128,r[8]=r[8]&63|128;let i=Array.from(r.slice(0,16),e=>e.toString(16).padStart(2,`0`)).join(``);return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}function Fo(){return{watched:{},hidden:!1}}function Io(e){let t=e.type;throw Error(`jobStatusWatch: unhandled action type ${String(t)}`)}function Lo(e,t){return Math.min(e.baseIntervalMs*e.backoffFactor**t,e.maxIntervalMs)}function Ro(e,t){return!e.terminal&&e.nextDueAt<=t}function zo(e,t,n){return{...e,watched:{...e.watched,[t]:n}}}function Bo(e,t){return e.hidden?[]:Object.entries(e.watched).filter(([,e])=>Ro(e,t)).map(([e])=>e)}function Vo(e){if(e.hidden)return null;let t=null;for(let n of Object.values(e.watched))n.terminal||(t===null||n.nextDueAt<t)&&(t=n.nextDueAt);return t}function Ho(e){return function(t,n){switch(n.type){case`WATCH`:{let{agentJobId:r,seed:i,now:a}=n,o=t.watched[r];return o===void 0?{...t,watched:{...t.watched,[r]:{view:i,attempt:0,nextDueAt:a,terminal:i!==null&&e.isTerminal(i),error:null}}}:i===null||o.view!==null?t:zo(t,r,{...o,view:i,terminal:e.isTerminal(i)})}case`UNWATCH`:{let{agentJobId:e}=n;if(t.watched[e]===void 0)return t;let r={};for(let[n,i]of Object.entries(t.watched))n!==e&&(r[n]=i);return{...t,watched:r}}case`READ_OK`:{let{agentJobId:r,view:i,now:a}=n,o=t.watched[r];if(o===void 0)return t;if(e.isTerminal(i))return zo(t,r,{view:i,attempt:0,nextDueAt:a,terminal:!0,error:null});let s=o.view,c=s===null||e.activityStamp(s)!==e.activityStamp(i)?0:o.attempt+1;return zo(t,r,{view:i,attempt:c,nextDueAt:a+Lo(e,c),terminal:!1,error:null})}case`READ_FAIL`:{let{agentJobId:r,error:i,now:a}=n,o=t.watched[r];if(o===void 0)return t;if(o.terminal)return zo(t,r,{...o,error:i});let s=o.attempt+1;return zo(t,r,{...o,attempt:s,nextDueAt:a+Lo(e,s),error:i})}case`TICK`:{let{now:r}=n;if(t.hidden)return t;let i=Object.entries(t.watched).filter(([,e])=>Ro(e,r));if(i.length===0)return t;let a={...t.watched};for(let[t,n]of i)a[t]={...n,nextDueAt:r+Lo(e,n.attempt)};return{...t,watched:a}}case`VISIBILITY`:{let{hidden:e,now:r}=n;if(e===t.hidden)return t;if(e)return{...t,hidden:!0};let i={};for(let[e,n]of Object.entries(t.watched))i[e]=n.terminal?n:{...n,nextDueAt:r};return{watched:i,hidden:!1}}default:return Io(n)}}}var Uo=class extends Error{constructor(e,t){super(`Chat command ${t} failed: ${e}`),this.name=`ChatTransportError`,this.code=e,this.requestId=t}};function Wo(e){return e instanceof Uo}var Go=3e4,Ko=class extends Error{constructor(e){super(`Chat capability load exceeded ${e}ms`),this.name=`CapabilityLoadTimeoutError`,this.timeoutMs=e}};function qo(e){return e instanceof Ko}function Jo(e,t,n){let r=null,i=new Promise((e,i)=>{r=t.setTimeout(()=>i(new Ko(n)),n)});return Promise.race([e,i]).finally(()=>{r!==null&&t.clearTimeout(r)})}function Yo(e){return e.status===`ready`}function Xo(e){return e.connectionStatus===`lost`||e.connectionStatus===`failed`?!1:e.isStreaming||Yo(e.capabilityLoad)}function Zo(){return globalThis.crypto.randomUUID()}function Qo(e){return e instanceof Error?e.message:String(e)}var $o=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},z=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms={status:`idle`};function hs(e,t){return e.status===`idle`||e.conversationId!==t?{status:`idle`}:e.status===`writing`?{status:`writing`}:{status:`failed`,attempted:e.attempted}}function gs(e){let{conversationId:t,permissionModeWrite:n}=e,r=hs(n,t),i=r.status===`writing`&&n.status===`writing`?n.target:null;if(t!==null){let n=e.conversationPermissionMode;return n===null?{kind:`unknown`,read:`loading`}:{kind:`known`,scope:`conversation`,conversationId:t,value:i===null?n.permissionMode:i,version:n.permissionModeVersion,write:r}}let a=e.lastPermissionMode;return a===null?{kind:`unknown`,read:e.lastPermissionModeReadFailed?`failed`:`loading`}:{kind:`known`,scope:`last-choice`,conversationId:null,value:i===null?a:i,version:null,write:r}}var _s=class{constructor(e){es.add(this),ts.set(this,void 0),ns.set(this,0),rs.set(this,0),is.set(this,null),as.set(this,0),os.set(this,null),$o(this,ts,e,`f`)}view(){return z(this,ts,`f`).store.getSnapshot().permissionMode}async settledNewConversationMode(e){if(z(this,os,`f`)===null)return e;for(;z(this,os,`f`)!==null;)await z(this,os,`f`);let t=this.view();return t.kind===`known`&&t.scope===`last-choice`?t.value:null}refresh(){let{store:e}=z(this,ts,`f`);if(z(this,ts,`f`).isDisposed()||e.state.conversationId!==null)return;let t=z(this,is,`f`);(t===null||t.epoch!==z(this,ns,`f`))&&z(this,es,`m`,ss).call(this)}rereadStale(){let{store:e}=z(this,ts,`f`);z(this,ts,`f`).isDisposed()||e.state.conversationId!==null||(e.update({lastPermissionMode:null}),z(this,es,`m`,ss).call(this))}set(e){if(z(this,ts,`f`).isDisposed())return;let t=this.view();if(t.kind===`unknown`||t.write.status===`writing`)return;if(t.value===e){t.write.status===`failed`&&this.dismissFailure();return}$o(this,as,z(this,as,`f`)+1,`f`);let n=z(this,as,`f`),{conversationId:r}=t;z(this,ts,`f`).store.update({permissionModeWrite:{status:`writing`,seq:n,conversationId:r,target:e}}),r===null?z(this,es,`m`,ls).call(this,n,e):z(this,es,`m`,cs).call(this,n,r,e)}retry(){let e=z(this,ts,`f`).store.state.permissionModeWrite;e.status===`failed`&&e.conversationId===z(this,ts,`f`).store.state.conversationId&&(z(this,ts,`f`).store.update({permissionModeWrite:ms}),this.set(e.attempted))}dismissFailure(){z(this,ts,`f`).store.state.permissionModeWrite.status===`failed`&&z(this,ts,`f`).store.update({permissionModeWrite:ms})}};ts=/* @__PURE__ */ new WeakMap,ns=/* @__PURE__ */ new WeakMap,rs=/* @__PURE__ */ new WeakMap,is=/* @__PURE__ */ new WeakMap,as=/* @__PURE__ */ new WeakMap,os=/* @__PURE__ */ new WeakMap,es=/* @__PURE__ */ new WeakSet,ss=function(){let{store:e,deps:t}=z(this,ts,`f`);$o(this,ns,z(this,ns,`f`)+1,`f`);let n=z(this,ns,`f`);e.state.lastPermissionModeReadFailed&&e.update({lastPermissionModeReadFailed:!1});let r=()=>!z(this,ts,`f`).isDisposed()&&n===z(this,ns,`f`),i={epoch:n,done:t.permissionModes.readLastChoice().then(e=>{r()&&z(this,es,`m`,fs).call(this,e)},n=>{t.logger.warn(`ChatSession: last permission mode read failed`,{error:Qo(n)}),r()&&e.update({lastPermissionMode:null,lastPermissionModeReadFailed:!0})}).finally(()=>{z(this,is,`f`)===i&&$o(this,is,null,`f`)})};$o(this,is,i,`f`)},cs=function(e,t,n){let{deps:r}=z(this,ts,`f`),i=z(this,es,`m`,us).call(this);r.permissionModes.setConversationMode(t,n).then(n=>{z(this,ts,`f`).isDisposed()||(z(this,ts,`f`).dispatch({type:`CONVERSATION_PERMISSION_MODE`,payload:{conversationId:t,...n}}),z(this,es,`m`,ds).call(this,i,n.permissionMode),z(this,es,`m`,ps).call(this,e,ms))},i=>{z(this,ts,`f`).isDisposed()||(r.logger.warn(`ChatSession: conversation permission mode write failed`,{conversationId:t,error:Qo(i)}),z(this,es,`m`,ps).call(this,e,{status:`failed`,conversationId:t,attempted:n}))})},ls=function(e,t){let{deps:n}=z(this,ts,`f`),r=z(this,es,`m`,us).call(this),i=n.permissionModes.writeLastChoice(t).then(t=>{z(this,ts,`f`).isDisposed()||(z(this,es,`m`,ds).call(this,r,t),z(this,es,`m`,ps).call(this,e,ms))},r=>{z(this,ts,`f`).isDisposed()||(n.logger.warn(`ChatSession: last permission mode write failed`,{error:Qo(r)}),z(this,es,`m`,ps).call(this,e,{status:`failed`,conversationId:null,attempted:t}),z(this,ts,`f`).store.state.conversationId===null&&z(this,es,`m`,ss).call(this))}).finally(()=>{z(this,os,`f`)===i&&$o(this,os,null,`f`)});$o(this,os,i,`f`)},us=function(){return $o(this,rs,z(this,rs,`f`)+1,`f`),z(this,rs,`f`)},ds=function(e,t){$o(this,ns,z(this,ns,`f`)+1,`f`),e===z(this,rs,`f`)&&z(this,es,`m`,fs).call(this,t)},fs=function(e){let{state:t}=z(this,ts,`f`).store;(t.lastPermissionMode!==e||t.lastPermissionModeReadFailed)&&z(this,ts,`f`).store.update({lastPermissionMode:e,lastPermissionModeReadFailed:!1})},ps=function(e,t){let n=z(this,ts,`f`).store.state.permissionModeWrite;n.status===`writing`&&n.seq===e&&z(this,ts,`f`).store.update({permissionModeWrite:t})};function vs(e,t){return e===t}function ys(e,t){return t!==null&&t===e}function bs(e,t){return e!==t&&e!==null}function xs(e,t,n){return e||t?!1:n!==void 0&&n.role===`user`&&n.content.trim()!==``}var Ss=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Cs=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is=class{constructor(e,t,n,r){ws.add(this),Ts.set(this,void 0),Es.set(this,void 0),Ds.set(this,void 0),Os.set(this,void 0),ks.set(this,0),As.set(this,null),js.set(this,0),Ms.set(this,0),Ns.set(this,0),Ps.set(this,null),Ss(this,Ts,e,`f`),Ss(this,Es,t,`f`),Ss(this,Ds,n,`f`),Ss(this,Os,r,`f`)}get generation(){return Cs(this,ks,`f`)}get catchUpInFlight(){return Cs(this,js,`f`)>0}noteRowAnnounced(){Ss(this,Ps,Cs(this,Ms,`f`),`f`)}get rowsOwed(){return Cs(this,Ps,`f`)!==null&&Cs(this,Ps,`f`)>=Cs(this,Ns,`f`)}select(e,t){let{store:n,stallGuard:r,deps:i}=Cs(this,Ts,`f`),a=n.state.conversationId;if(e!==null&&e===a)return;let o=n.state.projectId;if(e!==null&&o===null){i.logger.error(`ChatSession: selection of a conversation with no project`,{conversationId:e});return}r.disarm(),Ss(this,ks,Cs(this,ks,`f`)+1,`f`),Ss(this,js,0,`f`),Ss(this,Ps,null,`f`),Cs(this,Es,`f`).call(this);let s={historyLoad:{status:`idle`},restoredQuestionBatchIds:[],browserRunFailures:{},commandFailures:[],permissionModeWrite:ms,olderHistoryRead:`idle`};if(e===null){Ss(this,As,null,`f`),Cs(this,Ts,`f`).dispatch({type:`RESET`,payload:{conversationId:null}}),n.update({conversationId:null,...s}),i.transport.close(),Cs(this,Os,`f`).call(this);return}Ss(this,As,t===`stream-created`?e:null,`f`),Cs(this,Ts,`f`).dispatch(t===`stream-created`?{type:`ADOPT_CONVERSATION`,payload:{conversationId:e}}:{type:`BIND_CONVERSATION`,payload:{conversationId:e}}),n.update({conversationId:e,...s}),o!==null&&i.transport.open({conversationId:e,projectId:o,...i.open}).catch(t=>{i.logger.error(`ChatSession: transport.open failed`,{conversationId:e,error:Qo(t)})}),t===`load-history`&&!ys(e,Cs(this,As,`f`))&&this.readHistory(e,`selection`)}async readHistory(e,t){let{store:n,deps:r}=Cs(this,Ts,`f`),i=Cs(this,ks,`f`);Ss(this,Ms,Cs(this,Ms,`f`)+1,`f`);let a=Cs(this,Ms,`f`),o=()=>!Cs(this,Ts,`f`).isDisposed()&&i===Cs(this,ks,`f`)&&vs(e,n.state.conversationId);t===`selection`?n.update({historyLoad:{status:`loading`,conversationId:e}}):Ss(this,js,Cs(this,js,`f`)+1,`f`);let s=n.state.chat.reofferedToolCallIds,c=!_o(n.state.chat),l;try{l=await r.conversations.loadLatest(e,{decisionLaneId:Cs(this,Ds,`f`).currentLaneId(),outstandingCallIds:n.state.chat.pendingConfirmations.map(e=>e.toolCallId)})}catch(i){return o()?(r.logger.error(`ChatSession: history read failed`,{conversationId:e,mode:t,error:Qo(i)}),Cs(this,ws,`m`,Fs).call(this,a,e,t,null)?`superseded`:t===`catch-up`?`failed`:(this.select(null,`load-history`),n.update({historyLoad:{status:`failed`,conversationId:e,notFound:!1}}),`failed`)):`left`}finally{t===`catch-up`&&i===Cs(this,ks,`f`)&&Ss(this,js,Cs(this,js,`f`)-1,`f`)}if(!o())return`left`;if(l.kind===`not-found`)return this.conversationGone(e),`failed`;let{page:u}=l;if(Cs(this,ws,`m`,Fs).call(this,a,e,t,u))return`superseded`;Ss(this,Ns,a,`f`),t===`selection`&&n.update({historyLoad:{status:`idle`},restoredQuestionBatchIds:u.messages.flatMap(Sa).map(e=>e.id)});let{windowFirstMessageId:d,olderCursor:f,filesBefore:p,...m}=u;return Cs(this,Ts,`f`).dispatch({type:`HYDRATE_HISTORY`,payload:{...m,historyWindow:{windowFirstMessageId:d,olderCursor:f,filesBefore:p},conversationId:e,reofferedBeforeRead:s,readDuringTurn:c}}),Cs(this,Ds,`f`).onHistory(u),`applied`}conversationGone(e){let{store:t,deps:n}=Cs(this,Ts,`f`);n.logger.warn(`ChatSession: conversation no longer exists \u2014 forgotten`,{conversationId:e});let r=t.state.projectId;r!==null&&n.memory.forget(r).catch(e=>{n.logger.error(`ChatSession: memory.forget failed`,{projectId:r,error:Qo(e)})}),this.select(null,`load-history`),t.update({historyLoad:{status:`failed`,conversationId:e,notFound:!0}})}};Ts=/* @__PURE__ */ new WeakMap,Es=/* @__PURE__ */ new WeakMap,Ds=/* @__PURE__ */ new WeakMap,Os=/* @__PURE__ */ new WeakMap,ks=/* @__PURE__ */ new WeakMap,As=/* @__PURE__ */ new WeakMap,js=/* @__PURE__ */ new WeakMap,Ms=/* @__PURE__ */ new WeakMap,Ns=/* @__PURE__ */ new WeakMap,Ps=/* @__PURE__ */ new WeakMap,ws=/* @__PURE__ */ new WeakSet,Fs=function(e,t,n,r){return e>=Cs(this,Ns,`f`)?!1:(Cs(this,Ts,`f`).deps.logger.debug(`ChatSession: history page superseded by a newer read`,{conversationId:t,mode:n,read:e,newestLandedRead:Cs(this,Ns,`f`)}),n===`selection`&&Cs(this,Ts,`f`).store.update({historyLoad:{status:`idle`},...r===null?{}:{restoredQuestionBatchIds:r.messages.flatMap(Sa).map(e=>e.id)}}),!0)};var Ls=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Rs=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},zs,Bs,Vs=class{constructor(e,t){zs.set(this,void 0),Bs.set(this,void 0),Ls(this,zs,e,`f`),Ls(this,Bs,t,`f`)}load(){let{store:e,deps:t}=Rs(this,zs,`f`),{conversationId:n,chat:r,olderHistoryRead:i}=e.state;if(Rs(this,zs,`f`).isDisposed()||n===null||i===`loading`)return;let a=r.historyWindow.olderCursor;if(a===null)return;let o=Rs(this,Bs,`f`).generation,s=r.historyWindow.revision,c=()=>!Rs(this,zs,`f`).isDisposed()&&o===Rs(this,Bs,`f`).generation&&e.state.conversationId===n;e.update({olderHistoryRead:`loading`}),t.conversations.loadOlder(n,a).then(r=>{if(!c())return;if(r.kind===`not-found`){Rs(this,Bs,`f`).conversationGone(n);return}let i={conversationId:n,windowRevision:s,cursor:a,messages:r.page.messages,olderCursor:r.page.olderCursor},o=Ja(e.state.chat,i);if(o.kind===`overlap`){t.logger.error(`ChatSession: older history page overlaps the drawn rows \u2014 dropped`,{conversationId:n,overlappingIds:o.overlappingIds}),e.update({olderHistoryRead:`failed`});return}o.kind===`stale`?t.logger.debug(`ChatSession: older history page predates the window \u2014 dropped`,{conversationId:n,windowRevision:s,currentRevision:e.state.chat.historyWindow.revision}):Rs(this,zs,`f`).dispatch({type:`PREPEND_OLDER_HISTORY`,payload:i}),e.update({olderHistoryRead:`idle`})},r=>{c()&&(t.logger.error(`ChatSession: older history read failed`,{conversationId:n,error:Qo(r)}),e.update({olderHistoryRead:`failed`}))})}};zs=/* @__PURE__ */ new WeakMap,Bs=/* @__PURE__ */ new WeakMap;function Hs(e,t){return e.runnerType===`extension`&&e.panelId===t}var Us={streamStalled:`client.stream_stalled`,connectionLostDuringStream:`client.connection_lost_during_stream`,turnHeldUnsent:`client.turn_held_unsent`,permissionModeChanged:`client.permission_mode_changed`,browserApiActionFailed:`client.browser_api_action_failed`,atlasHostActionFailed:`client.atlas_host_action_failed`,aiRunHostActionFailed:`client.ai_run_host_action_failed`,workflowHostActionFailed:`client.workflow_host_action_failed`};function Ws(e){return e}function Gs(e,t){return Ws({type:`error`,code:`internal`,message:t,fatal:!1,category:e===Us.streamStalled?`transient`:`persistent`,errorCode:e})}function Ks(){return Gs(Us.streamStalled,`stream made no progress`)}function qs(e){return Ws({type:`error`,code:e.errorCode,message:e.errorMessage===null?`chat-send rejected: ${e.errorCode}`:e.errorMessage,fatal:!1,category:`persistent`,errorCode:e.errorCode})}function Js(){return{type:`done`,totalCreditsUsed:0}}var Ys=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Xs=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Zs,Qs,$s,ec,tc,nc,rc;function ic(e,t){let{conversationId:n,toolCallId:r}=t;switch(t.kind){case`api-request-in-browser`:case`api-step-in-browser`:{var i;let a=(i=e.executeApiHostAction)==null?void 0:i.bind(e);return a===void 0?null:async()=>{let e=await a(t);return e===null?null:{name:`chat-host-action-complete`,conversationId:n,toolCallId:r,historyId:e}}}case`atlas-crawl-in-tab`:{var a;let i=(a=e.executeAtlasHostAction)==null?void 0:a.bind(e);return i===void 0?null:async()=>{let e=await i(t);return e===null?null:{name:`chat-atlas-host-action-complete`,conversationId:n,toolCallId:r,atlasRunId:e}}}case`ai-run-in-browser`:{var o;let i=(o=e.executeAiRunHostAction)==null?void 0:o.bind(e);return i===void 0?null:async()=>{let e=await i(t);return e===null?null:{name:`chat-ai-host-action-complete`,conversationId:n,toolCallId:r,aiRunId:e}}}case`workflow-host-in-browser`:{var s;let n=(s=e.executeWorkflowHostAction)==null?void 0:s.bind(e);return n===void 0?null:async()=>(await n(t),null)}}}function ac(e){switch(e.kind){case`api-request-in-browser`:case`api-step-in-browser`:return Us.browserApiActionFailed;case`atlas-crawl-in-tab`:return Us.atlasHostActionFailed;case`ai-run-in-browser`:return Us.aiRunHostActionFailed;case`workflow-host-in-browser`:return Us.workflowHostActionFailed}}var oc=class{constructor(e,t){Zs.add(this),Qs.set(this,void 0),$s.set(this,void 0),ec.set(this,/* @__PURE__ */ new Set),Ys(this,Qs,e,`f`),Ys(this,$s,t,`f`)}reset(){Xs(this,ec,`f`).clear()}handle(e){let{deps:t,store:n}=Xs(this,Qs,`f`),r=e.hostAction;if(r.toolCallId!==e.toolCallId||n.state.conversationId!==r.conversationId){t.logger.error(`ChatSession: deferred host action identity mismatch`,{toolCallId:e.toolCallId,conversationId:r.conversationId});return}if(!Hs(t.open,r.executorPanelId)){t.logger.debug(`ChatSession: deferred host action for another panel \u2014 not executed here`,{toolCallId:r.toolCallId,kind:r.kind});return}let i=t.browser===null?null:ic(t.browser,r);if(i===null){t.logger.error(`ChatSession: deferred action on a host without a browser port`,{toolCallId:r.toolCallId,kind:r.kind});return}let a=`${r.conversationId}:${r.toolCallId}`;Xs(this,ec,`f`).has(a)||(Xs(this,ec,`f`).add(a),Xs(this,Zs,`m`,nc).call(this,r,i).finally(()=>Xs(this,ec,`f`).delete(a)))}};Qs=/* @__PURE__ */ new WeakMap,$s=/* @__PURE__ */ new WeakMap,ec=/* @__PURE__ */ new WeakMap,Zs=/* @__PURE__ */ new WeakSet,tc=function(e){return!Xs(this,Qs,`f`).isDisposed()&&Xs(this,Qs,`f`).store.state.conversationId===e.conversationId},nc=async function(e,t){let n;try{n=await t()}catch(t){Xs(this,Qs,`f`).deps.logger.error(`ChatSession: deferred host action failed`,{toolCallId:e.toolCallId,kind:e.kind,errorType:t instanceof Error?t.name:typeof t}),Xs(this,Zs,`m`,tc).call(this,e)&&Xs(this,Qs,`f`).feedLocalEvent(Gs(ac(e),`deferred host action did not finish`));return}n!==null&&Xs(this,Zs,`m`,tc).call(this,e)&&await Xs(this,Zs,`m`,rc).call(this,e,n)},rc=async function(e,t){let{deps:n}=Xs(this,Qs,`f`),r;try{r=await n.transport.send({...t,requestId:Xs(this,Qs,`f`).newId()})}catch(t){n.logger.warn(`ChatSession: host action completion was not delivered`,{toolCallId:e.toolCallId,kind:e.kind,error:Qo(t)});return}r.status!==`accepted`&&(n.logger.warn(`ChatSession: host action completion was rejected`,{toolCallId:e.toolCallId,kind:e.kind,errorCode:r.errorCode}),Xs(this,Zs,`m`,tc).call(this,e)&&Xs(this,$s,`f`).refetchHistory())};var sc={phase:`idle`},cc=`chat.busy`,lc=1;function uc(e,t){if(t.type===`ABORTED`)return sc;if(t.type===`CAPTURE_REQUESTED`)return{phase:`awaiting_turn_end`,req:t.req};switch(e.phase){case`idle`:return e;case`awaiting_turn_end`:return t.type===`TURN_SETTLED`?{phase:`capturing`,req:e.req}:e;case`capturing`:return t.type===`CAPTURE_DONE`&&t.captureRequestId===e.req.captureRequestId?{phase:`delivering`,req:e.req}:e;case`delivering`:return t.type===`DELIVERY_SETTLED`||t.type===`DELIVERY_REJECTED`?sc:e;default:return e}}function dc(e,t){return e===cc&&t<lc}function fc(e){switch(e.phase){case`idle`:return`idle`;case`awaiting_turn_end`:case`capturing`:return`scanning`;case`delivering`:return`delivering`;default:return e}}var pc=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},B=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc=class{constructor(e){mc.add(this),hc.set(this,void 0),gc.set(this,sc),_c.set(this,null),vc.set(this,0),yc.set(this,!1),bc.set(this,!1),xc.set(this,null),pc(this,hc,e,`f`)}get phase(){return B(this,gc,`f`)}get failureReason(){let e=B(this,_c,`f`);return B(this,gc,`f`).phase!==`delivering`||e===null?null:e.status===`failed`?e.reason:null}request(e){B(this,mc,`m`,Sc).call(this),B(this,mc,`m`,wc).call(this,{type:`CAPTURE_REQUESTED`,req:e})}onEvent(e){let t=B(this,gc,`f`);if(t.phase===`delivering`&&B(this,bc,`f`)){(e.type===`done`||e.type===`error`)&&(pc(this,bc,!1,`f`),B(this,mc,`m`,wc).call(this,{type:`DELIVERY_SETTLED`}));return}if(e.type===`done`){if(t.phase===`awaiting_turn_end`){B(this,mc,`m`,wc).call(this,{type:`TURN_SETTLED`}),B(this,mc,`m`,Ec).call(this,t.req);return}t.phase===`delivering`&&B(this,yc,`f`)&&(pc(this,yc,!1,`f`),B(this,mc,`m`,Dc).call(this,t.req))}}abort(){B(this,mc,`m`,Sc).call(this),B(this,mc,`m`,wc).call(this,{type:`ABORTED`})}};hc=/* @__PURE__ */ new WeakMap,gc=/* @__PURE__ */ new WeakMap,_c=/* @__PURE__ */ new WeakMap,vc=/* @__PURE__ */ new WeakMap,yc=/* @__PURE__ */ new WeakMap,bc=/* @__PURE__ */ new WeakMap,xc=/* @__PURE__ */ new WeakMap,mc=/* @__PURE__ */ new WeakSet,Sc=function(){var e;(e=B(this,xc,`f`))==null||e.abort(),pc(this,xc,null,`f`),pc(this,_c,null,`f`),pc(this,vc,0,`f`),pc(this,yc,!1,`f`),pc(this,bc,!1,`f`)},Cc=function(){return B(this,gc,`f`).phase},wc=function(e){let t=uc(B(this,gc,`f`),e);t!==B(this,gc,`f`)&&(pc(this,gc,t,`f`),B(this,hc,`f`).onChange())},Tc=function(e){let t=B(this,gc,`f`);return t.phase!==`idle`&&t.req.captureRequestId===e.captureRequestId},Ec=function(e){B(this,hc,`f`).browser.capturePage({toolCallId:e.toolCallId,captureRequestId:e.captureRequestId}).then(t=>{if(B(this,gc,`f`).phase===`capturing`&&B(this,mc,`m`,Tc).call(this,e)){if(B(this,mc,`m`,wc).call(this,{type:`CAPTURE_DONE`,captureRequestId:t.captureRequestId}),B(this,mc,`m`,Cc).call(this)!==`delivering`){B(this,hc,`f`).logger.error(`page analysis: capture answered for another request`,{expected:e.captureRequestId,received:t.captureRequestId}),this.abort();return}t.status===`failed`&&B(this,hc,`f`).logger.warn(`page analysis: capture failed \u2014 delivered as a failure report`,{captureRequestId:e.captureRequestId,reason:t.reason}),pc(this,_c,t,`f`),pc(this,vc,0,`f`),B(this,hc,`f`).onChange(),B(this,mc,`m`,Dc).call(this,e)}},t=>{B(this,mc,`m`,Tc).call(this,e)&&(B(this,hc,`f`).logger.error(`page analysis: capture rejected`,{captureRequestId:e.captureRequestId,error:t instanceof Error?t.message:String(t)}),this.abort())})},Dc=function(e){let t=B(this,_c,`f`);if(t===null||t.captureRequestId!==e.captureRequestId){B(this,hc,`f`).logger.error(`page analysis: delivering without the matching snapshot`,{captureRequestId:e.captureRequestId}),this.abort();return}let n=new AbortController;pc(this,xc,n,`f`),B(this,hc,`f`).deliver(t,n.signal).then(t=>{if(B(this,gc,`f`).phase===`delivering`&&B(this,mc,`m`,Tc).call(this,e))switch(t.kind){case`accepted`:pc(this,bc,!0,`f`);return;case`rejected`:if(dc(t.ack.errorCode,B(this,vc,`f`))){pc(this,vc,B(this,vc,`f`)+1,`f`),pc(this,yc,!0,`f`);return}B(this,hc,`f`).logger.warn(`page analysis: delivery rejected \u2014 dropped`,{captureRequestId:e.captureRequestId,errorCode:t.ack.errorCode}),B(this,mc,`m`,Sc).call(this),B(this,mc,`m`,wc).call(this,{type:`DELIVERY_REJECTED`}),B(this,hc,`f`).onDeliveryDropped(t.ack);return;case`transport-failed`:this.abort();return;case`abandoned`:return;default:return t}})};function kc(e){if(typeof e!=`object`||!e||!(`defaultSelectionId`in e))return null;let t=e.defaultSelectionId;return t===null||typeof t==`string`?{defaultSelectionId:t}:null}var Ac=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},V=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},jc,H,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc;function $c(e,t){return e===null||t===null?e===t:e.confirmAll===t.confirmAll?e.current===null||t.current===null?e.current===t.current:e.current.toolCallId===t.current.toolCallId&&e.current.verdict===t.current.verdict:!1}function el(e){let t=e.errorCode;return typeof t==`string`?t:e.code}function tl(e){let t=e.toolCallId;return typeof t==`string`?t:null}function nl(e){if(typeof e!=`object`||!e)return null;let t=e;return t.accepted===!0&&typeof t.decisionLaneId==`string`?t.decisionLaneId:null}var rl=class{constructor(e,t,n,r){jc.add(this),H.set(this,void 0),Mc.set(this,void 0),Nc.set(this,void 0),Pc.set(this,void 0),Fc.set(this,null),Ic.set(this,[]),Lc.set(this,/* @__PURE__ */ new Set),Ac(this,H,e,`f`),Ac(this,Mc,t,`f`),Ac(this,Nc,n,`f`),Ac(this,Pc,r,`f`)}get hasPendingDecision(){return V(this,Fc,`f`)!==null}get pendingDecisionLaneId(){var e;return((e=V(this,Fc,`f`))==null?void 0:e.decisionLaneId)??null}consumeHistoryCompletion(e){let t=V(this,Fc,`f`);t!==null&&t.decisionLaneId!==null&&e!=null&&e.includes(t.decisionLaneId)&&V(this,jc,`m`,Rc).call(this)}stop(){V(this,H,`f`).isDisposed()||(Ac(this,Ic,[],`f`),V(this,Lc,`f`).clear(),V(this,jc,`m`,Yc).call(this),V(this,Pc,`f`).abortPageAnalysis(),V(this,Nc,`f`).stopAwaitingTurns(),V(this,H,`f`).store.state.conversationId!==null&&(V(this,H,`f`).stallGuard.noteCommand(`chat-stop`),V(this,jc,`m`,Jc).call(this,{name:`chat-stop`,requestId:V(this,H,`f`).newId()},`chat-stop`,null)))}answerConfirmation(e,t,n){V(this,jc,`m`,zc).call(this,e,t,!1,!1,t===`confirm`?n:null)}answerChangeSet(e,t){V(this,jc,`m`,zc).call(this,e,t,!0,!1,null)}rejectRunWait(e){V(this,jc,`m`,zc).call(this,e,`reject`,!0,!1,null)}confirmAll(e,t=[]){if(V(this,H,`f`).isDisposed()||V(this,Fc,`f`)!==null||V(this,Ic,`f`).length>0)return;let n=new Set(V(this,H,`f`).store.state.chat.pendingConfirmations.filter(e=>e.status===`open`).map(e=>e.toolCallId));Ac(this,Lc,new Set(t),`f`),Ac(this,Ic,[...new Set(e)].filter(e=>n.has(e)||V(this,Lc,`f`).has(e)),`f`),this.maybeSendBulkConfirmation()}maybeSendBulkConfirmation(){V(this,jc,`m`,Hc).call(this),V(this,jc,`m`,Yc).call(this)}consumeDecisionOutcome(e){let t=V(this,jc,`m`,Uc).call(this,e);return V(this,jc,`m`,Yc).call(this),t}abandonPendingDecision(){let e=V(this,Fc,`f`);e!==null&&(Ac(this,Fc,null,`f`),Ac(this,Ic,[],`f`),V(this,Lc,`f`).clear(),V(this,H,`f`).deps.logger.warn(`ChatSession: tool decision abandoned \u2014 its lane ended locally`,{command:e.command,toolCallId:e.toolCallId,resolved:e.resolved}),e.resolved||V(this,Pc,`f`).refetchHistory(),V(this,jc,`m`,Yc).call(this))}forgetPendingDecision(){Ac(this,Fc,null,`f`),Ac(this,Ic,[],`f`),V(this,Lc,`f`).clear(),V(this,jc,`m`,Yc).call(this)}answerQuestion(e){return V(this,jc,`m`,Zc).call(this,{name:`chat-question-answer`,requestId:V(this,H,`f`).newId(),batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey,answers:e.answers,modelSelectionId:V(this,H,`f`).store.state.modelSelectionId})}cancelQuestion(e){return V(this,jc,`m`,Zc).call(this,{name:`chat-question-cancel`,requestId:V(this,H,`f`).newId(),batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey})}};H=/* @__PURE__ */ new WeakMap,Mc=/* @__PURE__ */ new WeakMap,Nc=/* @__PURE__ */ new WeakMap,Pc=/* @__PURE__ */ new WeakMap,Fc=/* @__PURE__ */ new WeakMap,Ic=/* @__PURE__ */ new WeakMap,Lc=/* @__PURE__ */ new WeakMap,jc=/* @__PURE__ */ new WeakSet,Rc=function(){Ac(this,Fc,null,`f`),V(this,H,`f`).dispatch({type:`DECISION_LANE_COMPLETE`}),V(this,jc,`m`,Yc).call(this)},zc=function(e,t,n,r,i){if(V(this,H,`f`).isDisposed()||V(this,Fc,`f`)!==null)return;let a=V(this,H,`f`).store.state.chat;if(oa(a,e)||!n&&!a.pendingConfirmations.some(t=>t.toolCallId===e&&t.status===`open`))return;let o=t===`confirm`?`chat-tool-confirm`:`chat-tool-reject`;Ac(this,Fc,{command:o,verdict:t,toolCallId:e,requestId:V(this,H,`f`).newId(),edits:i,decisionLaneId:null,bulk:r,expiredResend:!1,resolved:!1},`f`),V(this,jc,`m`,Yc).call(this),n||V(this,H,`f`).dispatch({type:t===`confirm`?`CONFIRM_ACTION`:`REJECT_ACTION`,toolCallId:e}),V(this,jc,`m`,Bc).call(this,V(this,H,`f`).store.state.modelSelectionId)},Bc=function(e){let t=V(this,Fc,`f`);if(t===null)return;Ji(t.toolCallId)||V(this,H,`f`).stallGuard.noteCommand(t.command);let n={requestId:t.requestId,toolCallId:t.toolCallId,modelSelectionId:e};V(this,jc,`m`,Jc).call(this,t.command===`chat-tool-confirm`?{name:`chat-tool-confirm`,...n,edits:t.edits}:{name:`chat-tool-reject`,...n},t.command,t.toolCallId)},Vc=function(e,t,n,r,i){let a=V(this,Fc,`f`);return n.errorCode!==`selection_expired`||a===null||a.command!==e||a.toolCallId!==t||a.expiredResend?!1:(V(this,Pc,`f`).recoverSelection(n.result,{command:e,toolCallId:t}).then(o=>{if(r()&&V(this,Fc,`f`)===a){if(o===null){i({command:e,toolCallId:t,reason:`rejected`,errorCode:n.errorCode});return}Ac(this,Fc,{...a,requestId:V(this,H,`f`).newId(),expiredResend:!0},`f`),V(this,jc,`m`,Bc).call(this,o)}}),!0)},Hc=function(){if(V(this,Fc,`f`)!==null||V(this,Ic,`f`).length===0)return;let e=V(this,H,`f`).store.state.chat;Ac(this,Ic,V(this,Ic,`f`).filter(t=>V(this,Lc,`f`).has(t)||e.pendingConfirmations.some(e=>e.toolCallId===t&&e.status===`open`)),`f`);let t=V(this,Ic,`f`).find(t=>!oa(e,t));t!==void 0&&(Ac(this,Ic,V(this,Ic,`f`).filter(e=>e!==t),`f`),V(this,jc,`m`,zc).call(this,t,`confirm`,V(this,Lc,`f`).has(t),!0,null))},Uc=function(e){if(e.type===`error`){let t=tl(e);if(t!==null)return V(this,jc,`m`,Gc).call(this,e,t)}let t=V(this,Fc,`f`);if(t===null)return!1;if(e.type===`decision-complete`&&e.toolCallId===t.toolCallId&&e.decisionLaneId===t.decisionLaneId)return V(this,jc,`m`,Rc).call(this),!1;if(Ji(t.toolCallId))return V(this,jc,`m`,Wc).call(this,e);if((e.type===`error`||e.type===`done`)&&t.decisionLaneId===null)return V(this,H,`f`).deps.logger.debug(`ChatSession: pre-ack frame of a tool decision \u2014 ack decides`,{command:t.command,toolCallId:t.toolCallId,type:e.type}),!0;if(e.type===`error`&&t.resolved)return Ac(this,Ic,[],`f`),V(this,Lc,`f`).clear(),!1;if(e.type===`error`&&!t.resolved){Ac(this,Fc,null,`f`);let n=el(e);return V(this,H,`f`).deps.logger.warn(`ChatSession: tool decision failed before it resolved`,{command:t.command,toolCallId:t.toolCallId,errorCode:n}),V(this,jc,`m`,Kc).call(this,{command:t.command,toolCallId:t.toolCallId,reason:`rejected`,errorCode:n}),!0}return e.type===`action-resolved`&&e.toolCallId===t.toolCallId&&(t.resolved=!0),e.type===`action-required`&&t.resolved||e.type===`done`&&(t.resolved||(Ac(this,Ic,[],`f`),V(this,Lc,`f`).clear(),V(this,Pc,`f`).refetchHistory())),!1},Wc=function(e){let t=V(this,Fc,`f`);return t===null||e.type===`action-resolved`&&e.toolCallId===t.toolCallId&&(t.resolved=!0),!1},Gc=function(e,t){let n=V(this,Fc,`f`),r=el(e);return n===null||n.toolCallId!==t?(V(this,H,`f`).deps.logger.debug(`ChatSession: refusal of a card this client is not answering \u2014 dropped`,{toolCallId:t,errorCode:r,pendingToolCallId:n===null?null:n.toolCallId}),!0):(Ac(this,Fc,null,`f`),V(this,H,`f`).deps.logger.warn(`ChatSession: card decision refused`,{command:n.command,toolCallId:n.toolCallId,errorCode:r}),V(this,jc,`m`,Kc).call(this,{command:n.command,toolCallId:n.toolCallId,reason:`rejected`,errorCode:r}),!0)},Kc=function(e){if(Ac(this,Ic,[],`f`),V(this,Lc,`f`).clear(),V(this,jc,`m`,Yc).call(this),V(this,jc,`m`,Xc).call(this,e.command,e.toolCallId,e),e.toolCallId!==null&&Ji(e.toolCallId)){V(this,H,`f`).dispatch({type:`LEAD_DECISION_REFUSED`,toolCallId:e.toolCallId});return}V(this,H,`f`).store.state.chat.isStreaming||V(this,H,`f`).feedLocalEvent(Js())},qc=function(e,t){return Wo(e)?e.code:(V(this,H,`f`).deps.logger.error(`ChatSession: transport.send broke its rejection contract`,{command:t,error:Qo(e)}),`connection_closed`)},Jc=function(e,t,n){let r=V(this,Mc,`f`).generation,i=()=>!V(this,H,`f`).isDisposed()&&r===V(this,Mc,`f`).generation,a=e=>{let r=V(this,Fc,`f`);if(r!==null&&r.command===t&&r.toolCallId===n){Ac(this,Fc,null,`f`),V(this,jc,`m`,Kc).call(this,e);return}V(this,jc,`m`,Xc).call(this,t,n,e)};V(this,H,`f`).deps.transport.send(e).then(e=>{if(i()){if(e.status===`accepted`){let r=V(this,Fc,`f`);if(r!==null&&r.command===t&&r.toolCallId===n){let i=nl(e.result);if(i===null){a({command:t,toolCallId:n,reason:`rejected`,errorCode:`invalid_decision_ack`});return}r.decisionLaneId=i}V(this,jc,`m`,Xc).call(this,t,n,null);return}(t!==`chat-tool-confirm`&&t!==`chat-tool-reject`||n===null||!V(this,jc,`m`,Vc).call(this,t,n,e,i,a))&&a({command:t,toolCallId:n,reason:`rejected`,errorCode:e.errorCode})}},e=>{i()&&a({command:t,toolCallId:n,reason:V(this,jc,`m`,qc).call(this,e,t),errorCode:null})})},Yc=function(){let e=V(this,Fc,`f`),t=V(this,Ic,`f`).length>0||e!==null&&e.bulk,n=e===null&&!t?null:{current:e===null?null:{toolCallId:e.toolCallId,verdict:e.verdict},confirmAll:t};$c(V(this,H,`f`).store.state.decisionProgress,n)||V(this,H,`f`).store.update({decisionProgress:n})},Xc=function(e,t,n){let{store:r}=V(this,H,`f`),i=r.state.commandFailures,a=i.filter(n=>n.command!==e||n.toolCallId!==t);(n!==null||a.length!==i.length)&&r.update({commandFailures:n===null?a:[...a,n]})},Zc=async function(e){let{deps:t}=V(this,H,`f`),n=V(this,Mc,`f`).generation,r=null,i=new Promise(e=>{r=t.clock.setTimeout(()=>e({kind:`failed`,reason:`deadline`}),t.policy.questionActionDeadlineMs)}),a=V(this,jc,`m`,Qc).call(this,e,n,!1),o=await Promise.race([a,i]);return r!==null&&t.clock.clearTimeout(r),!V(this,H,`f`).isDisposed()&&n===V(this,Mc,`f`).generation&&V(this,Pc,`f`).refetchHistory(),o},Qc=async function e(t,n,r){let{deps:i}=V(this,H,`f`),a;try{a=await i.transport.send(t)}catch(e){return{kind:`failed`,reason:V(this,jc,`m`,qc).call(this,e,t.name)}}if(a.status===`accepted`)return{kind:`accepted`};let o=()=>!V(this,H,`f`).isDisposed()&&n===V(this,Mc,`f`).generation;if(a.errorCode===`selection_expired`&&t.name===`chat-question-answer`&&!r&&o()){let r=await V(this,Pc,`f`).recoverSelection(a.result,{command:t.name,batchId:t.batchId});if(r!==null&&o())return V(this,jc,`m`,e).call(this,{...t,requestId:V(this,H,`f`).newId(),modelSelectionId:r},n,!0)}return{kind:`rejected`,errorCode:a.errorCode}};function il(e){let{logger:t}=e;return async(n,r)=>{let i=await e.reloadCapabilities();if(i.status===`disposed`)return null;if(i.status===`failed`)return t.warn(`ChatSession: selection expired and the capability re-read failed`,{...r}),null;let a=e.resolveSelection(i.value);if(a!==null)return t.warn(`ChatSession: selection expired \u2014 the picked model resent under a fresh id`,{...r}),e.setModelSelection(a),a;let o=kc(n);return o===null?(t.error(`ChatSession: selection_expired ack without a readable default`,{...r}),null):o.defaultSelectionId===null?null:(t.warn(`ChatSession: selection expired \u2014 the picked model is gone, server default used`,{...r}),e.setModelSelection(o.defaultSelectionId),o.defaultSelectionId)}}var al=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},ol=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},sl,cl,ll,ul,dl,fl;function pl(e){return{chat:yo,projectId:null,conversationId:null,connectionStatus:e,capabilityLoad:{status:`loading`},modelSelectionId:null,modelSelectionRejected:null,unsentTurns:[],historyLoad:{status:`idle`},restoredQuestionBatchIds:[],browserRunFailures:{},commandFailures:[],decisionProgress:null,turnAckPending:!1,turnCreatePending:!1,lastPermissionMode:null,lastPermissionModeReadFailed:!1,permissionModeWrite:ms,olderHistoryRead:`idle`}}var ml=class{constructor(e,t){sl.add(this),cl.set(this,void 0),ll.set(this,null),ul.set(this,/* @__PURE__ */ new Set),dl.set(this,void 0),al(this,cl,e,`f`),al(this,dl,t,`f`)}get state(){return ol(this,cl,`f`)}update(e){al(this,cl,{...ol(this,cl,`f`),...e},`f`),this.invalidate()}invalidate(){al(this,ll,null,`f`);for(let e of ol(this,ul,`f`))e()}subscribe(e){return ol(this,ul,`f`).add(e),()=>{ol(this,ul,`f`).delete(e)}}clearListeners(){ol(this,ul,`f`).clear()}getSnapshot(){return ol(this,ll,`f`)===null&&al(this,ll,ol(this,sl,`m`,fl).call(this),`f`),ol(this,ll,`f`)}};cl=/* @__PURE__ */ new WeakMap,ll=/* @__PURE__ */ new WeakMap,ul=/* @__PURE__ */ new WeakMap,dl=/* @__PURE__ */ new WeakMap,sl=/* @__PURE__ */ new WeakSet,fl=function(){let e=ol(this,cl,`f`),t=hl(e.chat.messages);return{chat:e.chat,projectId:e.projectId,conversationId:e.conversationId,connectionStatus:e.connectionStatus,capabilityLoad:e.capabilityLoad,canSendChatTurn:Yo(e.capabilityLoad),isComposerInteractive:Xo({capabilityLoad:e.capabilityLoad,connectionStatus:e.connectionStatus,isStreaming:e.chat.isStreaming}),modelSelectionId:e.modelSelectionId,modelSelectionRejected:e.modelSelectionRejected,unsentTurns:e.unsentTurns,holdsUnacceptedTurns:e.unsentTurns.length>0||e.turnAckPending||e.turnCreatePending,canRecoverDanglingTurn:e.historyLoad.status!==`loading`&&!e.turnAckPending&&!e.chat.pendingSend&&xs(e.chat.isStreaming,e.chat.error!==null,t),historyLoad:e.historyLoad,olderHistory:{status:e.chat.historyWindow.olderCursor===null?`none`:e.olderHistoryRead},restoredQuestionBatchIds:e.restoredQuestionBatchIds,pageAnalysis:ol(this,dl,`f`).call(this),browserRunFailures:e.browserRunFailures,commandFailures:e.commandFailures,decisionProgress:e.decisionProgress,permissionMode:gs({conversationId:e.conversationId,conversationPermissionMode:e.chat.conversationPermissionMode,lastPermissionMode:e.lastPermissionMode,lastPermissionModeReadFailed:e.lastPermissionModeReadFailed,permissionModeWrite:e.permissionModeWrite})}};function hl(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role!==`agent`)return n}}var gl=/* @__PURE__ */ new Set([`text-delta`,`text-done`,`reasoning-delta`,`reasoning-done`,`tool-call-start`,`tool-call-input-progress`,`tool-call-complete`,`tool-result`,`tool-running`,`object-partial`,`object-complete`,`step-start`,`step-finish`,`stage`,`progress`,`usage`]);function _l(e){let{clock:t,timeoutMs:n,onStall:r}=e,i=`idle`,a=null;function o(){a!==null&&(t.clearTimeout(a),a=null)}function s(){o(),i=`armed`,a=t.setTimeout(()=>{a=null,i=`idle`,r()},n)}function c(){i=`idle`,o()}return{get phase(){return i},observe(e){if(e.type===`message-start`){s();return}if(e.type===`done`||e.type===`error`){c();return}if(e.type===`action-required`){i!==`idle`&&(i=`paused`,o());return}gl.has(e.type)&&i!==`idle`&&s()},noteCommand(){i!==`idle`&&s()},disarm:c,arm:s,pause(){i=`paused`,o()}}}var vl=`chat_attachments.`;function yl(e,t){return e.startsWith(vl)?{errorCode:e,params:Yi(t)?t:null}:null}function bl(e){return e.map(e=>e.id)}function xl(e,t){return e.length===t.length&&e.every((e,n)=>{var r;return e.id===((r=t[n])==null?void 0:r.id)})}var Sl={stallTimeoutMs:6e4,capabilityLoadDeadlineMs:2e4,questionActionDeadlineMs:35e3,sendReceiptWindowMs:6e5},Cl=`chat`,wl=class extends Error{constructor(e){super(e),this.name=`ChatPermissionModeStaleError`}};function Tl(e){let{clock:t,receiptWindowMs:n,onDeadline:r}=e,i=null;function a(){i!==null&&(t.clearTimeout(i),i=null)}function o(e){a();let o=null;for(let t of e)t.release===`on-reconnect`&&(o===null||t.firstSentAt<o)&&(o=t.firstSentAt);if(o===null)return;let s=Math.max(0,o+n-t.now());i=t.setTimeout(()=>{i=null,r()},s)}return{arm:o,disarm:a}}function El(e,t){return e===null||t===null?e===t:e.kind===t.kind&&e.id===t.id}function Dl(e,t){return e.text===t.text&&xl(e.attachments,t.attachments)&&e.launchEffort.effort===t.launchEffort.effort&&e.launchEffort.maxAgents===t.launchEffort.maxAgents&&Be(e.place,t.place)&&El(e.activeObject,t.activeObject)}function Ol(e,t){let n=e[e.length-1];return n!==void 0&&Dl(n,t)?e:[...e,t]}function kl(e,t){return[...e,t]}function Al(e,t){return e.filter(e=>e.id!==t)}function jl(e){for(let t of e)if(t.release===`on-reconnect`)return t;return null}function Ml(e,t,n){let r=e=>e.release===`on-reconnect`&&t-e.firstSentAt>=n;return e.some(r)?e.map(e=>r(e)?{id:e.id,text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!0,refusal:null}:e):e}var Nl=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},U=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},W,G,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du=`cmd.handler_error`,fu=class extends Error{constructor(){super(`no permission mode shown on the new-conversation screen`),this.name=`NoPermissionModeError`}},pu=class{constructor(e,t,n){W.add(this),G.set(this,void 0),Pl.set(this,void 0),Fl.set(this,void 0),Il.set(this,/* @__PURE__ */ new Set),Ll.set(this,/* @__PURE__ */ new Set),Rl.set(this,!1),zl.set(this,!1),Bl.set(this,0),Vl.set(this,void 0),Hl.set(this,0),Ul.set(this,null),Nl(this,G,e,`f`),Nl(this,Pl,t,`f`),Nl(this,Fl,n,`f`),Nl(this,Vl,Tl({clock:e.deps.clock,receiptWindowMs:e.deps.policy.sendReceiptWindowMs,onDeadline:()=>this.flushUndelivered()}),`f`)}dispose(){U(this,Vl,`f`).disarm()}get isCreatingConversation(){return U(this,Rl,`f`)}get hasTurnAwaitingAck(){return U(this,Il,`f`).size>0}get lastTurnUnboundAttachments(){let e=U(this,Ul,`f`);return e===null||e.selectionGeneration!==U(this,Pl,`f`).generation?[]:e.attachments}resetForProject(){Nl(this,Ul,null,`f`),Nl(this,Bl,U(this,Bl,`f`)+1,`f`),U(this,W,`m`,lu).call(this,!1),Nl(this,zl,!1,`f`),U(this,Il,`f`).clear(),U(this,Ll,`f`).clear(),U(this,W,`m`,uu).call(this),U(this,Vl,`f`).disarm()}submit(e){let{store:t,deps:n}=U(this,G,`f`);if(U(this,G,`f`).isDisposed()||e.text.trim()===``)return{kind:`ignored`};let r=t.state;if(r.projectId===null)return n.logger.warn(`ChatSession: send refused \u2014 no project`),{kind:`refused`,reason:`no-project`,held:!1};if(!Yo(r.capabilityLoad))return n.logger.warn(`ChatSession: send refused \u2014 model capability set is not readable`,{capabilityStatus:r.capabilityLoad.status}),e.holdOnRefusal&&!e.resend&&U(this,W,`m`,Kl).call(this,e),{kind:`refused`,reason:`capabilities-not-ready`,held:e.holdOnRefusal&&!e.resend};let i=r.conversationId;if(i===null&&U(this,Rl,`f`))return{kind:`ignored`};let a=null;if(i===null&&(a=U(this,Fl,`f`).newConversationPermissionMode(),a===null))return n.logger.warn(`ChatSession: send refused \u2014 no permission mode to create the chat in`),U(this,Fl,`f`).refreshLastPermissionMode(),e.holdOnRefusal&&!e.resend&&U(this,W,`m`,Kl).call(this,e),{kind:`refused`,reason:`permission-mode-unknown`,held:e.holdOnRefusal&&!e.resend};Nl(this,Hl,U(this,Hl,`f`)+1,`f`);let o=U(this,Hl,`f`);return Nl(this,Ul,null,`f`),U(this,W,`m`,Xl).call(this,e),a===null?(U(this,W,`m`,$l).call(this,e,o),U(this,W,`m`,tu).call(this,e,o)):U(this,W,`m`,Ql).call(this,e,o,r.projectId,a),{kind:`sent`}}stopAwaitingTurns(){let e=U(this,Rl,`f`)&&!U(this,zl,`f`);if(U(this,Il,`f`).size===0&&!e)return!1;e&&Nl(this,zl,!0,`f`);for(let e of U(this,Il,`f`))U(this,Ll,`f`).add(e);return U(this,Il,`f`).clear(),U(this,W,`m`,uu).call(this),U(this,G,`f`).feedLocalEvent(Js()),!0}flushUndelivered(){U(this,G,`f`).isDisposed()||(U(this,W,`m`,Wl).call(this),U(this,Vl,`f`).arm(U(this,G,`f`).store.state.unsentTurns))}async deliverPageSnapshot(e,t){let{deps:n,store:r}=U(this,G,`f`);if(r.state.conversationId===null)return n.logger.error(`ChatSession: page snapshot with no conversation bound`),{kind:`transport-failed`};let i=U(this,Pl,`f`).generation,a=U(this,Bl,`f`),o=U(this,G,`f`).newId(),s=await U(this,W,`m`,Gl).call(this,e,o,r.state.modelSelectionId);if(s.kind!==`rejected`||s.ack.errorCode!==`selection_expired`)return s;let c=await U(this,Fl,`f`).recoverSelection(s.ack.result,{command:`chat-send`,requestId:o,pageSnapshot:!0});if(U(this,G,`f`).isDisposed())return{kind:`abandoned`};let l=i!==U(this,Pl,`f`).generation||a!==U(this,Bl,`f`);return t.aborted||l?(n.logger.warn(`ChatSession: page snapshot resend abandoned \u2014 delivery no longer current`,{requestId:o,reason:l?`chat-moved`:`aborted`}),{kind:`abandoned`}):c===null?s:U(this,W,`m`,Gl).call(this,e,U(this,G,`f`).newId(),c)}};G=/* @__PURE__ */ new WeakMap,Pl=/* @__PURE__ */ new WeakMap,Fl=/* @__PURE__ */ new WeakMap,Il=/* @__PURE__ */ new WeakMap,Ll=/* @__PURE__ */ new WeakMap,Rl=/* @__PURE__ */ new WeakMap,zl=/* @__PURE__ */ new WeakMap,Bl=/* @__PURE__ */ new WeakMap,Vl=/* @__PURE__ */ new WeakMap,Hl=/* @__PURE__ */ new WeakMap,Ul=/* @__PURE__ */ new WeakMap,W=/* @__PURE__ */ new WeakSet,Wl=function(){let{store:e,deps:t}=U(this,G,`f`),n=Ml(e.state.unsentTurns,t.clock.now(),t.policy.sendReceiptWindowMs);n!==e.state.unsentTurns&&(t.logger.warn(`ChatSession: undelivered turn outlived the server receipt \u2014 needs a Send`),e.update({unsentTurns:n}));let r=e.state;if(r.connectionStatus!==`connected`&&r.connectionStatus!==`restored`||r.conversationId===null||r.chat.isStreaming||r.chat.pendingSend||U(this,Il,`f`).size>0)return;let i=jl(r.unsentTurns);i!==null&&(e.update({unsentTurns:Al(r.unsentTurns,i.id)}),U(this,G,`f`).dispatch({type:`ASSISTANT_PLACEHOLDER`,payload:{id:U(this,G,`f`).newId(),effort:i.launchEffort.effort}}),U(this,W,`m`,nu).call(this,{requestId:i.requestId,text:i.text,attachments:i.attachments,launchEffort:i.launchEffort,place:i.place,activeObject:i.activeObject,modelSelectionId:i.modelSelectionId,expiredResend:!1,firstSentAt:i.firstSentAt,turnSeq:null}))},Gl=async function(e,t,n){let{deps:r}=U(this,G,`f`);try{let i=await r.transport.send({name:`chat-send`,requestId:t,message:``,mode:Cl,launchEffort:{effort:ut,maxAgents:null},place:et,modelSelectionId:n,policyVersion:null,pageSnapshot:e,attachmentIds:[],activeObject:null});return i.status===`accepted`?{kind:`accepted`}:{kind:`rejected`,ack:i}}catch(e){return r.logger.warn(`ChatSession: page snapshot delivery failed`,{error:Qo(e)}),{kind:`transport-failed`}}},Kl=function(e){let{store:t}=U(this,G,`f`);t.update({unsentTurns:Ol(t.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!1,refusal:null})})},ql=function(e,t,n,r=Us.turnHeldUnsent){let{store:i}=U(this,G,`f`);i.update({unsentTurns:kl(i.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!0,refusal:n})}),U(this,G,`f`).feedLocalEvent(Gs(r,t))},Jl=function(e,t,n,r){let{store:i,deps:a}=U(this,G,`f`);a.logger.warn(`ChatSession: stopped turn the server never ran \u2014 held unsent`,{reason:n,attachmentCount:e.attachments.length}),U(this,W,`m`,eu).call(this,t),i.update({unsentTurns:kl(i.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!0,refusal:r})})},Yl=function(e,t){t.status!==`accepted`&&U(this,W,`m`,Jl).call(this,e,e.turnSeq,`stopped, then chat-send rejected: ${t.errorCode}`,yl(t.errorCode,t.result))},Xl=function(e){e.resend||U(this,G,`f`).dispatch({type:`USER_MESSAGE`,payload:{id:U(this,G,`f`).newId(),content:e.text,effort:e.launchEffort.effort,attachments:e.attachments}}),U(this,G,`f`).dispatch({type:`ASSISTANT_PLACEHOLDER`,payload:{id:U(this,G,`f`).newId(),effort:e.launchEffort.effort}})},Zl=async function(e,t,n){let r=await U(this,Fl,`f`).settledNewConversationPermissionMode(t);if(!n())return{kind:`left`};if(r===null)throw new fu;return{kind:`created`,created:await U(this,G,`f`).deps.conversations.create(e,r)}},Ql=function(e,t,n,r){let{deps:i}=U(this,G,`f`),a=U(this,Bl,`f`),o=U(this,Pl,`f`).generation,s=()=>!U(this,G,`f`).isDisposed()&&a===U(this,Bl,`f`)&&o===U(this,Pl,`f`).generation;U(this,W,`m`,lu).call(this,!0),Nl(this,zl,!1,`f`);let c=()=>{if(a!==U(this,Bl,`f`))return!1;let e=U(this,zl,`f`);return U(this,W,`m`,lu).call(this,!1),Nl(this,zl,!1,`f`),e};U(this,W,`m`,Zl).call(this,n,r,s).then(r=>{let a=c();if(r.kind===`left`){i.logger.warn(`ChatSession: chat left before the conversation create \u2014 turn dropped`,{projectId:n});return}let{created:o}=r,l=o.id;if(!s()){i.logger.warn(`ChatSession: chat left during conversation create \u2014 turn dropped`,{conversationId:l});return}if(i.memory.remember(n,l).catch(e=>{i.logger.error(`ChatSession: memory.remember failed`,{projectId:n,error:Qo(e)})}),U(this,Pl,`f`).select(l,`stream-created`),U(this,G,`f`).dispatch({type:`CONVERSATION_PERMISSION_MODE`,payload:{conversationId:l,permissionMode:o.permissionMode,permissionModeVersion:o.permissionModeVersion}}),a){U(this,W,`m`,Jl).call(this,e,null,`stopped during conversation create \u2014 never sent`,null);return}U(this,W,`m`,$l).call(this,e,t),U(this,W,`m`,tu).call(this,e,t)},t=>{let r=c();if(s()){if(r){i.logger.warn(`ChatSession: conversation create failed for a stopped turn`,{projectId:n,error:Qo(t)}),U(this,W,`m`,Jl).call(this,e,null,`stopped during a failed conversation create \u2014 never sent`,null);return}if(t instanceof fu){i.logger.warn(`ChatSession: conversation not created \u2014 no permission mode shown`,{projectId:n}),U(this,W,`m`,ql).call(this,e,`conversation create skipped: no permission mode shown`,null),U(this,Fl,`f`).refreshLastPermissionMode();return}if(t instanceof wl){i.logger.warn(`ChatSession: conversation not created \u2014 permission mode was stale`,{projectId:n}),U(this,W,`m`,ql).call(this,e,`conversation create refused: permission mode stale`,null,Us.permissionModeChanged),U(this,Fl,`f`).rereadStaleLastPermissionMode();return}i.logger.error(`ChatSession: conversation create failed \u2014 turn held`,{projectId:n,error:Qo(t)}),U(this,W,`m`,ql).call(this,e,`conversation create failed`,null)}})},$l=function(e,t){Nl(this,Ul,{turnSeq:t,attachments:e.attachments,selectionGeneration:U(this,Pl,`f`).generation},`f`)},eu=function(e){var t;e!==null&&((t=U(this,Ul,`f`))==null?void 0:t.turnSeq)===e&&Nl(this,Ul,null,`f`)},tu=function(e,t){U(this,W,`m`,nu).call(this,{requestId:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,modelSelectionId:U(this,G,`f`).store.state.modelSelectionId,expiredResend:!1,firstSentAt:U(this,G,`f`).deps.clock.now(),turnSeq:t})},nu=async function(e){let{deps:t}=U(this,G,`f`),n=U(this,Pl,`f`).generation,r=U(this,Bl,`f`);U(this,Il,`f`).add(e.requestId),U(this,W,`m`,uu).call(this);let i;try{i={kind:`ack`,ack:await t.transport.send({name:`chat-send`,requestId:e.requestId,message:e.text,mode:Cl,launchEffort:e.launchEffort,place:e.place,modelSelectionId:e.modelSelectionId,policyVersion:null,pageSnapshot:null,attachmentIds:bl(e.attachments),activeObject:e.activeObject})}}catch(n){Wo(n)?i={kind:`failed`,code:n.code}:(t.logger.error(`ChatSession: transport.send broke its rejection contract`,{requestId:e.requestId,error:Qo(n)}),i={kind:`failed`,code:`connection_closed`})}if(r!==U(this,Bl,`f`)||U(this,G,`f`).isDisposed())return;let a=U(this,Il,`f`).delete(e.requestId);try{U(this,W,`m`,ru).call(this,e,i,a,n)}finally{U(this,W,`m`,uu).call(this)}},ru=function(e,t,n,r){let{deps:i}=U(this,G,`f`);if(t.kind===`ack`&&t.ack.status===`accepted`&&U(this,W,`m`,eu).call(this,e.turnSeq),U(this,Ll,`f`).delete(e.requestId)){t.kind===`ack`&&r===U(this,Pl,`f`).generation&&U(this,W,`m`,Yl).call(this,e,t.ack);return}if(!n)return;if(r!==U(this,Pl,`f`).generation){i.logger.debug(`ChatSession: ack for a conversation no longer selected \u2014 ignored`,{requestId:e.requestId});return}if(t.kind===`failed`){U(this,W,`m`,iu).call(this,e,t.code);return}let{ack:a}=t;if(a.status===`accepted`){a.duplicate&&(i.logger.warn(`ChatSession: chat-send acked as duplicate \u2014 turn ended locally`,{requestId:e.requestId}),U(this,G,`f`).feedLocalEvent(Js()),U(this,Fl,`f`).refetchHistory());return}U(this,W,`m`,au).call(this,e,a)},iu=function(e,t){let{store:n,deps:r}=U(this,G,`f`);if(r.logger.warn(`ChatSession: chat-send undelivered \u2014 held for resend`,{requestId:e.requestId,code:t}),U(this,W,`m`,eu).call(this,e.turnSeq),n.update({unsentTurns:kl(n.state.unsentTurns,{id:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`on-reconnect`,requestId:e.requestId,modelSelectionId:e.modelSelectionId,firstSentAt:e.firstSentAt})}),U(this,G,`f`).feedLocalEvent(Gs(Us.turnHeldUnsent,`chat-send ${t}`)),t===`ack_timeout`){this.flushUndelivered();return}U(this,Vl,`f`).arm(n.state.unsentTurns)},au=function(e,t){if(t.errorCode===`selection_expired`&&!e.expiredResend){U(this,W,`m`,ou).call(this,e,t);return}U(this,W,`m`,cu).call(this,e,t)},ou=async function(e,t){let n=U(this,Pl,`f`).generation,r=U(this,Bl,`f`);U(this,Il,`f`).add(e.requestId),U(this,W,`m`,uu).call(this);let i=await U(this,Fl,`f`).recoverSelection(t.result,{command:`chat-send`,requestId:e.requestId});if(r!==U(this,Bl,`f`)||U(this,G,`f`).isDisposed())return;let a=U(this,Il,`f`).delete(e.requestId);try{U(this,W,`m`,su).call(this,e,t,i,a,n)}finally{U(this,W,`m`,uu).call(this)}},su=function(e,t,n,r,i){let{deps:a}=U(this,G,`f`);if(U(this,Ll,`f`).delete(e.requestId)){i===U(this,Pl,`f`).generation&&U(this,W,`m`,Yl).call(this,e,t);return}if(r&&i===U(this,Pl,`f`).generation){if(n===null){U(this,W,`m`,cu).call(this,e,t);return}U(this,W,`m`,nu).call(this,{requestId:U(this,G,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,modelSelectionId:n,expiredResend:!0,firstSentAt:a.clock.now(),turnSeq:e.turnSeq})}},cu=function(e,t){let{deps:n}=U(this,G,`f`);if(t.errorCode===du){n.logger.warn(`ChatSession: chat-send refused before it ran \u2014 turn held`,{requestId:e.requestId,errorCode:t.errorCode}),U(this,W,`m`,eu).call(this,e.turnSeq),U(this,W,`m`,ql).call(this,e,`chat-send rejected: ${t.errorCode}`,null);return}let r=yl(t.errorCode,t.result);if(r!==null){n.logger.warn(`ChatSession: chat-send refused for its files \u2014 turn held`,{requestId:e.requestId,errorCode:t.errorCode,attachmentCount:e.attachments.length}),U(this,W,`m`,eu).call(this,e.turnSeq),U(this,W,`m`,ql).call(this,e,`chat-send rejected: ${t.errorCode}`,r);return}if(U(this,G,`f`).feedLocalEvent(qs(t)),t.errorCode===`model_not_allowed`){let r=kc(t.result);r===null&&n.logger.error(`ChatSession: model_not_allowed ack without a readable default`,{requestId:e.requestId}),U(this,Fl,`f`).onModelNotAllowed(r===null?null:r.defaultSelectionId)}},lu=function(e){Nl(this,Rl,e,`f`),U(this,G,`f`).store.state.turnCreatePending!==e&&U(this,G,`f`).store.update({turnCreatePending:e})},uu=function(){let e=U(this,Il,`f`).size>0;U(this,G,`f`).store.state.turnAckPending!==e&&U(this,G,`f`).store.update({turnAckPending:e})};function mu(e){if(e.questionActionDeadlineMs<=3e4)throw Error(`ChatSession policy: questionActionDeadlineMs (${e.questionActionDeadlineMs}) must exceed the command ack window (${Go})`);if(e.stallTimeoutMs<=3e4)throw Error(`ChatSession policy: stallTimeoutMs (${e.stallTimeoutMs}) must exceed the command ack window (${Go})`)}function hu(e){mu(e.policy);let t=Ao(e.tools),n=!1,r=0,i=null,a=/* @__PURE__ */ new Set,o=null,s=e.browser===null?null:new Oc({browser:e.browser,deliver:(e,t)=>y.deliverPageSnapshot(e,t),logger:e.logger,onDeliveryDropped:e=>m.feedLocalEvent(qs(e)),onChange:()=>c.invalidate()}),c=new ml(pl(e.transport.getStatus()),()=>s===null?{status:`idle`,failureReason:null}:{status:fc(s.phase),failureReason:s.failureReason}),l=_l({clock:e.clock,timeoutMs:e.policy.stallTimeoutMs,onStall:()=>{if(c.state.chat.permissionModeLane!==null){p();return}e.logger.warn(`ChatSession: stream stalled \u2014 no progress within the window`,{conversationId:c.state.conversationId}),S(Ks())}});function u(e){let n=c.state.chat.permissionModeLane,r=t(c.state.chat,e);r!==c.state.chat&&c.update({chat:r}),r.permissionModeLane!==n&&f(),T()}function d(e){l.observe(e),u({type:`EVENT`,payload:e}),c.state.chat.permissionModeLane!==null&&l.arm()}function f(){let{chat:e}=c.state;e.permissionModeLane!==null||e.isStreaming||e.pendingSend?l.arm():e.pendingConfirmations.some(e=>e.status===`open`)?l.pause():l.disarm()}function p(){var t;let{chat:n}=c.state;e.logger.warn(`ChatSession: permission-mode lane stalled \u2014 its calls go back to the user`,{conversationId:c.state.conversationId,decisionLaneId:(t=n.permissionModeLane)==null?void 0:t.decisionLaneId}),n.isStreaming||n.pendingSend?S(Ks()):b.hasPendingDecision&&(b.abandonPendingDecision(),m.feedLocalEvent(Js())),u({type:`PERMISSION_MODE_LANE_EXPIRED`}),E()}let m={deps:e,store:c,stallGuard:l,dispatch:u,feedLocalEvent:d,newId:Zo,isDisposed:()=>n},h=new _s(m),g=new Is(m,()=>{s==null||s.abort(),a.clear(),x.reset(),o=null,b.forgetPendingDecision()},{currentLaneId:()=>{let e=b.pendingDecisionLaneId;if(e!==null)return e;let t=c.state.chat.permissionModeLane;return t===null?null:t.decisionLaneId},onHistory:e=>b.consumeHistoryCompletion(e.decisionLaneCompletedIds)},()=>h.refresh()),_=new Vs(m,g),v=il({reloadCapabilities:re,resolveSelection:t=>e.capabilities.resolveSelection(t),setModelSelection:M,logger:e.logger}),y=new pu(m,g,{onModelNotAllowed:ee,refetchHistory:E,recoverSelection:v,newConversationPermissionMode:()=>{let e=h.view();return e.kind===`known`&&e.scope===`last-choice`?e.value:null},settledNewConversationPermissionMode:e=>h.settledNewConversationMode(e),refreshLastPermissionMode:()=>h.refresh(),rereadStaleLastPermissionMode:()=>h.rereadStale()}),b=new rl(m,g,y,{abortPageAnalysis:()=>s==null?void 0:s.abort(),refetchHistory:E,recoverSelection:v}),x=new oc(m,{refetchHistory:E});function S(e){b.abandonPendingDecision(),m.feedLocalEvent(e)}function C(){let{chat:e,conversationId:t}=c.state,n=_o(e),r=e.pendingRefetch||g.rowsOwed,i=!n&&e.appendedRowsOwed.length>0;if(t===null||!r||!(n||i)){o=null;return}let a=`${t}|${n?`quiet`:e.appendedRowsOwed.join(`,`)}|${e.pendingConfirmations.map(e=>`${e.toolCallId}:${e.status}`).join(`,`)}`;a===o||g.catchUpInFlight||(o=a,w(t))}function w(e){let t=!_o(c.state.chat);g.readHistory(e,`catch-up`).then(e=>{!n&&e===`applied`&&(g.rowsOwed||t)&&(o=null,C())})}function T(){n||(C(),b.maybeSendBulkConfirmation())}function E(){let e=c.state.conversationId;e!==null&&w(e)}function ee(e){c.update({modelSelectionId:null,modelSelectionRejected:{defaultSelectionId:e}}),re()}function D(t){let n=t.hostAction;if(n!==void 0){if(!Hs(e.open,n.executorPanelId)){e.logger.debug(`ChatSession: host action for another panel \u2014 not executed here`,{toolCallId:t.toolCallId,kind:n.kind});return}if(!a.has(t.toolCallId))switch(a.add(t.toolCallId),n.kind){case`capture-page`:if(s===null){e.logger.error(`ChatSession: capture-page action on a host without a browser port`,{toolCallId:t.toolCallId});return}s.request({captureRequestId:n.captureRequestId,toolCallId:t.toolCallId});return;case`run-in-tab`:O(t.toolCallId,n.kind,e=>e.runScenarioInTab({scenarioId:n.scenarioId,runId:n.runId,testRunId:n.testRunId}));return;case`run-batch-in-tab`:O(t.toolCallId,n.kind,e=>e.runScenarioBatchInTab({runs:n.runs,executionMode:n.executionMode,testRunId:n.testRunId}));return}}}function O(t,r,i){let a=e.browser;if(a===null){e.logger.error(`ChatSession: ${r} action on a host without a browser port`,{toolCallId:t});return}let o=g.generation,s=e=>{n||o!==g.generation||c.update({browserRunFailures:{...c.state.browserRunFailures,[t]:e}})};i(a).then(e=>{e.ok||s(e.reason)},n=>{e.logger.error(`ChatSession: ${r} request failed`,{toolCallId:t,error:Qo(n)}),s(`no_response`)})}function te(t){if(Xa(c.state.chat,t)&&g.noteRowAnnounced(),t.type===`conversation-started`&&t.conversationId!==c.state.conversationId){e.logger.error(`ChatSession: conversation-started names a conversation not bound`,{bound:c.state.conversationId,named:t.conversationId});return}b.consumeDecisionOutcome(t)||(d(t),t.type===`error`&&t.code===`model_not_allowed`&&ee(null),t.type===`tool-result`&&D(t),t.type===`host-action`&&x.handle(t),s==null||s.onEvent(t),t.type===`done`&&y.flushUndelivered())}function k(e){if(c.update({connectionStatus:e}),e===`connected`||e===`restored`){y.flushUndelivered(),(b.pendingDecisionLaneId!==null||c.state.chat.permissionModeLane!==null)&&E();return}if(e!==`lost`&&e!==`failed`)return;if(e===`failed`&&b.pendingDecisionLaneId!==null){let{chat:t}=c.state;t.isStreaming||t.pendingSend?S(Gs(Us.connectionLostDuringStream,`socket ${e}`)):(b.abandonPendingDecision(),m.feedLocalEvent(Js())),E();return}let{chat:t}=c.state;if(!y.hasTurnAwaitingAck&&(t.isStreaming||t.pendingSend)){if(b.hasPendingDecision){m.feedLocalEvent(Gs(Us.connectionLostDuringStream,`socket ${e}`));return}S(Gs(Us.connectionLostDuringStream,`socket ${e}`))}}function A(t){if(!n)switch(t.kind){case`event`:te(t.event);return;case`task-card`:return;case`status`:k(t.status);return;case`resync-required`:e.logger.warn(`ChatSession: transport asked for a resync \u2014 re-reading history`),E();return;default:return t}}let j=e.transport.subscribe(A);function ne(){if(i===null)throw Error(`ChatSession: a capability read was superseded with no newer read`);return i}function re(){if(n)return Promise.resolve({status:`disposed`});r+=1;let t=r;c.update({capabilityLoad:{status:`loading`}});let a=Jo(e.capabilities.load(),e.clock,e.policy.capabilityLoadDeadlineMs).then(e=>n?{status:`disposed`}:t===r?(c.update({capabilityLoad:{status:`ready`,value:e}}),{status:`ready`,value:e}):ne(),i=>n?{status:`disposed`}:t===r?(e.logger.warn(`ChatSession: capability load failed`,{error:Qo(i)}),c.update({capabilityLoad:{status:`failed`,cause:i}}),{status:`failed`}):ne());return i=a,a}function M(e){n||c.update({modelSelectionId:e,modelSelectionRejected:null})}function N(t){if(n)return;let r=c.state.projectId;if(r!==t){if(bs(r,t)&&(g.select(null,`load-history`),y.resetForProject(),c.update({unsentTurns:[],modelSelectionRejected:null})),c.update({projectId:t}),t===null){e.transport.close();return}h.refresh(),e.memory.read(t).then(r=>{if(n||c.state.projectId!==t||r===null)return;let{conversationId:i,chat:a}=c.state;if(i!==null||y.isCreatingConversation||a.messages.length>0){e.logger.debug(`ChatSession: remembered conversation not opened \u2014 chat already in use`,{projectId:t,remembered:r});return}g.select(r,`load-history`)},n=>{e.logger.error(`ChatSession: memory.read failed \u2014 empty state`,{projectId:t,error:Qo(n)})})}}function ie(t){if(n)return;let r=c.state.projectId;if(r===null){e.logger.error(`ChatSession: openConversation with no project`,{conversationId:t});return}t!==c.state.conversationId&&(c.state.chat.isStreaming&&b.stop(),e.memory.remember(r,t).catch(t=>{e.logger.error(`ChatSession: memory.remember failed`,{projectId:r,error:Qo(t)})}),c.update({unsentTurns:[]}),g.select(t,`load-history`))}function ae(){if(n)return;let t=c.state.projectId;t!==null&&e.memory.forget(t).catch(n=>{e.logger.error(`ChatSession: memory.forget failed`,{projectId:t,error:Qo(n)})}),c.update({unsentTurns:[]}),g.select(null,`load-history`)}function oe(t,r){let{chat:i}=c.state;if(n||i.isStreaming||i.pendingSend||y.hasTurnAwaitingAck)return{kind:`ignored`};let a;for(let e=i.messages.length-1;e>=0&&a===void 0;--e){var o;((o=i.messages[e])==null?void 0:o.role)===`user`&&(a=i.messages[e])}return a===void 0||a.content.trim()===``?{kind:`ignored`}:y.submit({text:a.content,attachments:y.lastTurnUnboundAttachments,launchEffort:t,place:r,activeObject:e.activeObject(),holdOnRefusal:!1,resend:!0})}function se(t){return{...t,activeObject:e.activeObject()}}function ce(e){return y.submit({text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,holdOnRefusal:e.source===`external`,resend:!1})}function le(e){let t=c.state.unsentTurns.find(t=>t.id===e);if(n||t===void 0)return{kind:`ignored`};if(t.release===`on-reconnect`)return y.flushUndelivered(),c.state.unsentTurns.some(t=>t.id===e)?{kind:`ignored`}:{kind:`sent`};let r=y.submit({text:t.text,attachments:t.attachments,launchEffort:t.launchEffort,place:t.place,activeObject:t.activeObject,holdOnRefusal:!1,resend:t.inTranscript});return r.kind===`sent`&&c.update({unsentTurns:Al(c.state.unsentTurns,e)}),r}return{getSnapshot:()=>c.getSnapshot(),subscribe:e=>c.subscribe(e),setProject:N,openConversation:ie,startNewConversation:ae,loadOlderHistory:()=>_.load(),send:e=>ce(se(e)),prepareSend:se,sendPrepared:ce,retryLastTurn:oe,stop:()=>b.stop(),confirm:(e,t)=>b.answerConfirmation(e,`confirm`,t===void 0?null:t),confirmAll:(e,t)=>b.confirmAll(e,t),reject:e=>b.answerConfirmation(e,`reject`,null),confirmChangeSet:e=>b.answerChangeSet(e,`confirm`),rejectChangeSet:e=>b.answerChangeSet(e,`reject`),rejectRunWait:e=>b.rejectRunWait(e),answerQuestion:e=>b.answerQuestion(e),cancelQuestion:e=>b.cancelQuestion(e),sendUnsentTurn:le,discardUnsentTurn:e=>{n||c.update({unsentTurns:Al(c.state.unsentTurns,e)})},retryUnsent:()=>{let e=c.state.unsentTurns[0];return e===void 0?{kind:`ignored`}:le(e.id)},setModelSelection:M,setPermissionMode:e=>h.set(e),retryPermissionModeWrite:()=>h.retry(),dismissPermissionModeWriteFailure:()=>h.dismissFailure(),refreshLastPermissionMode:()=>h.refresh(),reloadCapabilities:()=>{re()},dispose:()=>{n||(n=!0,l.disarm(),y.dispose(),s==null||s.abort(),j(),e.transport.close(),c.clearListeners())}}}function gu(){return{now:()=>Date.now(),setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e)}}var _u=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},K=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du=5e3,Ou=2e3,ku=/* @__PURE__ */ new Set([tr.AUTH_FAILED,tr.PROTOCOL_VIOLATION,tr.HEARTBEAT_TIMEOUT]),Au=5,ju=class{constructor(e){vu.add(this),yu.set(this,void 0),bu.set(this,`connecting`),xu.set(this,/* @__PURE__ */ new Set),Su.set(this,null),Cu.set(this,null),wu.set(this,0),_u(this,yu,e,`f`)}get status(){return K(this,bu,`f`)}onStatusChange(e){return K(this,xu,`f`).add(e),()=>{K(this,xu,`f`).delete(e)}}onConnected(){if(K(this,bu,`f`)!==`failed`){if(K(this,vu,`m`,Eu).call(this),_u(this,wu,0,`f`),K(this,bu,`f`)===`lost`){K(this,vu,`m`,Tu).call(this,`restored`),_u(this,Cu,K(this,yu,`f`).setTimeout(()=>{_u(this,Cu,null,`f`),K(this,vu,`m`,Tu).call(this,`connected`)},Ou),`f`);return}K(this,vu,`m`,Tu).call(this,`connected`)}}onDisconnected(e){if(K(this,bu,`f`)!==`failed`){if(e===tr.CHANNEL_NOT_FOUND){K(this,vu,`m`,Eu).call(this),K(this,vu,`m`,Tu).call(this,`failed`);return}if(ku.has(e)){if(_u(this,wu,K(this,wu,`f`)+1,`f`),K(this,wu,`f`)>=Au){K(this,vu,`m`,Eu).call(this),K(this,vu,`m`,Tu).call(this,`failed`);return}}else _u(this,wu,0,`f`);if(e===tr.NORMAL_CLOSURE){K(this,vu,`m`,Eu).call(this),K(this,vu,`m`,Tu).call(this,`connecting`);return}K(this,vu,`m`,Tu).call(this,`reconnecting`),K(this,Su,`f`)===null&&K(this,bu,`f`)!==`lost`&&_u(this,Su,K(this,yu,`f`).setTimeout(()=>{_u(this,Su,null,`f`),K(this,bu,`f`)===`reconnecting`&&K(this,vu,`m`,Tu).call(this,`lost`)},Du),`f`)}}onReconnectStopped(){K(this,bu,`f`)!==`failed`&&(K(this,vu,`m`,Eu).call(this),K(this,vu,`m`,Tu).call(this,`failed`))}reset(){K(this,bu,`f`)!==`failed`&&(K(this,vu,`m`,Eu).call(this),_u(this,wu,0,`f`),K(this,vu,`m`,Tu).call(this,`connecting`))}dispose(){K(this,vu,`m`,Eu).call(this),K(this,xu,`f`).clear()}};yu=/* @__PURE__ */ new WeakMap,bu=/* @__PURE__ */ new WeakMap,xu=/* @__PURE__ */ new WeakMap,Su=/* @__PURE__ */ new WeakMap,Cu=/* @__PURE__ */ new WeakMap,wu=/* @__PURE__ */ new WeakMap,vu=/* @__PURE__ */ new WeakSet,Tu=function(e){if(e===K(this,bu,`f`))return;let t=K(this,bu,`f`);_u(this,bu,e,`f`);for(let n of K(this,xu,`f`))n(e,t)},Eu=function(){K(this,Su,`f`)!==null&&(K(this,yu,`f`).clearTimeout(K(this,Su,`f`)),_u(this,Su,null,`f`)),K(this,Cu,`f`)!==null&&(K(this,yu,`f`).clearTimeout(K(this,Cu,`f`)),_u(this,Cu,null,`f`))};var Mu=Us.permissionModeChanged,Nu=/* @__PURE__ */ new Set([`client.turn_held_unsent`,Mu,`reports.projection_not_initialized`,`assistant.recover_last_message`]),Pu=/* @__PURE__ */ new Set([`workflows.agents_over_max`,`ai.reasoning_unsupported`]);function Fu(e){return{code:e.code,message:e.message,errorCode:e.errorCode??null,providerErrorCode:e.providerErrorCode??null}}function Iu(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role===`user`)return n.id}return null}function Lu(e,t,n,r){if(e.kind===`needs-sign-in`)return n.placeholderSignIn;if(e.kind===`needs-project`||t.projectId===null)return n.placeholderNoProject;if(t.capabilityLoad.status===`failed`)return n.placeholderNoModels;switch(t.connectionStatus){case`reconnecting`:case`lost`:case`failed`:return n.placeholderOffline;case`connecting`:case`connected`:case`restored`:return r===null?n.placeholder:r}}function Ru(e){return e.status===`failed`?qo(e.cause)?{kind:`timed-out`}:{kind:`failed`}:null}function zu(e,t){return e.upload({path:Gn.attachmentUpload.path(t.projectId,t.fileName),contentType:t.mediaType,bytes:t.bytes,schema:Hn,signal:t.signal,onProgress:t.onProgress})}var Bu=I({success:bt(!0)});async function Vu(e,t){await e.request({method:Gn.attachmentDelete.method,path:Gn.attachmentDelete.path(t),schema:Bu})}function Hu(e,t,n){return e.download({path:Gn.attachmentContent.path(t),signal:n})}var Uu={status:`idle`},Wu={status:`loading`},Gu={status:`failed`};function Ku(e){return Un(e)?`text/plain; charset=utf-8`:e}function qu(e){let{http:t,logger:n}=e,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Set,o=new AbortController,s=(e,t)=>{r.set(e,t);for(let e of a)e()};return{get(e){let t=r.get(e);return t===void 0?Uu:t},load(e){let a=i.get(e.id);if(a!==void 0)return a;let c=r.get(e.id);if(c!==void 0&&c.status===`ready`)return Promise.resolve(c);let{signal:l}=o;s(e.id,Wu);let u=Hu(t,e.id,l).then(t=>{if(l.aborted)return Uu;let n=new Blob([t.bytes.slice()],{type:Ku(e.mediaType)}),r={status:`ready`,url:URL.createObjectURL(n)};return i.delete(e.id),s(e.id,r),r},t=>l.aborted?Uu:(n.warn(`chat attachment content read failed`,{attachmentId:e.id,status:t instanceof Yn?t.status:null,errorCode:t instanceof Yn?t.errorCode:null}),i.delete(e.id),s(e.id,Gu),Gu));return i.set(e.id,u),u},subscribe(e){return a.add(e),()=>a.delete(e)},clear(){o.abort(),o=new AbortController,i.clear();for(let e of r.values())e.status===`ready`&&URL.revokeObjectURL(e.url);r.clear();for(let e of a)e()}}}var Ju=new Intl.PluralRules(`ru`),Yu=new Intl.PluralRules(`en`);function q(e,t){switch(Ju.select(e)){case`one`:return t.one;case`few`:case`other`:return t.few;default:return t.many}}function J(e,t){return Yu.select(e)===`one`?t.one:t.other}var Xu=e=>J(e,{one:`file`,other:`files`}),Zu=e=>e===null?`The selected model`:`Model ${e}`,Qu={units:{b:`B`,kb:`KB`,mb:`MB`},facts:{pdf:(e,t)=>`${e} ${J(e,{one:`page`,other:`pages`})}, ${t}`,image:(e,t,n)=>`${e}\u00D7${t}, ${n}`,text:e=>e},typeLabel:{"image/png":`PNG`,"image/jpeg":`JPEG`,"image/webp":`WebP`,"application/pdf":`PDF`,"text/plain":`TXT`,"text/markdown":`MD`},message:{listLabel:`Message files`,view:e=>`View \u201C${e}\u201D`,open:e=>`Open \u201C${e}\u201D in a new tab`,thumbnailLoading:e=>`Loading the thumbnail of \u201C${e}\u201D`,thumbnailFailed:`The thumbnail did not load`,openFailed:`Could not open.`,retry:`Retry`},viewer:{label:e=>`Viewing: ${e}`,openInTab:`Open in a new tab`,close:`Close the viewer`,previous:`Previous image`,next:`Next image`,position:(e,t)=>`${e} of ${t}`,loading:e=>`Loading \u201C${e}\u201D`,failed:`The image did not load`},conversation:{text:(e,t)=>`Model ${e} will not read the files of this conversation (${t}) \u2014 `,pick:`switch to another model`},unsent:{files:e=>`${e} ${Xu(e)}`,unsupported:(e,t)=>`${Zu(e)} does not take these files: ${t} \u2014 switch to another`,noFiles:e=>`${Zu(e)} does not take files \u2014 switch to another`,types:(e,t)=>`${Zu(e)} does not take ${t} \u2014 switch to another`,reason:{fileBytes:e=>`a file is over ${e}`,imageBytes:e=>`an image is over ${e}`,requestBytes:e=>`the request is over ${e}`,filesBytes:e=>`the files together are over ${e}`,imageEdge:e=>`an image side is over ${e} px`,imagePatches:e=>`an image is over ${e} million pixels`,pdfPages:e=>`the PDF has over ${e} pages`,imagesCount:e=>`over ${e} images`,manyImagesEdge:e=>`with many images each side must be at most ${e} px`,contextWindow:`the files do not fit the model\u2019s window`,unknownSize:`the files are larger than the model takes`},notFound:`The files of this message are no longer available: an unsent file is kept for a day. Delete the message and attach the files again.`,alreadySent:`These files were already sent with another message. Delete the message and attach the files again.`}},$u=new Intl.NumberFormat(`en`),ed=e=>$u.format(e),td=e=>J(e,{one:`change`,other:`changes`}),nd=(e,t,n)=>`${ed(e)} ${J(e,{one:t,other:n})}`,rd=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e.slice(-1).join(``)}`,id={title:`Changes`,cardAria:e=>`Changes: ${e.toLocaleLowerCase(`en`)}`,phaseAnnouncement:e=>`Change status: ${e.toLocaleLowerCase(`en`)}`,contextScenario:e=>`Scenario \u201C${e}\u201D`,contextProject:e=>`Project \u201C${e}\u201D`,contextObject:e=>`\u201C${e}\u201D`,marker:{inspecting:`Inspecting`,proposed:`Proposed`,awaiting:`Awaiting decision`,applying:`Applying`,applied:`Applied`,rejected:`Rejected`,partial:`Partially applied`,failed:`Not applied`,undone:`Undone`,superseded:`Superseded`,closed:`Closed`},earlyTitle:{searching:`Searching for a matching scenario\u2026`,search_results_shown:`Found several matches`,no_results:`Nothing matched`,item_selected:`Target selected`,inspecting:`Inspecting details\u2026`,ambiguity_choose_target:`Choose a target`},preparing:`The assistant is preparing a change\u2026`,changesCount:e=>`${ed(e)} ${td(e)}`,noResults:`Nothing matched.`,chooseTargetHint:`Choose which target was meant:`,selected:`Selected`,nothingChanged:`Nothing has changed yet.`,evidenceHeading:`Evidence`,entityLabelMissing:`label missing`,open:`Open`,openAria:e=>`Open: ${e}`,searchingAria:`Searching`,whatChanges:`What will change`,proposalEmpty:`No changes proposed yet.`,secretChip:`secret`,evidence:`Rationale`,cascadeTitle:`Also will be deleted`,cascadeEntity:{step:`Steps`,scenario_run:`Scenario runs`,api_folder:`Folders`,api_saved_request:`Saved requests`,checklist_item:`Checklist items`,checklist_item_step:`Checklist item steps`,test_run_result:`Test run results`},cascadeUnknown:e=>`Unknown entities (${e})`,cascadeCount:{step:e=>nd(e,`step`,`steps`),scenario_run:e=>nd(e,`scenario run`,`scenario runs`),api_folder:e=>nd(e,`folder`,`folders`),api_saved_request:e=>nd(e,`saved request`,`saved requests`),checklist_item:e=>nd(e,`checklist item`,`checklist items`),checklist_item_step:e=>nd(e,`item step`,`item steps`),test_run_result:e=>nd(e,`run result`,`run results`)},cascadeCountUnknown:(e,t)=>`${e}: ${ed(t)}`,dock:{factScenario:`Scenario`,factProject:`Project`,factObject:`What`,factWithIt:`Along with it`,factEdits:`Edits`,recordWithIt:e=>`along with it ${e}`,editsCount:e=>nd(e,`edit`,`edits`),showInFeed:`Show in the feed`,showInFeedAria:e=>`Show in the feed: ${e}`,blockedUnworded:`Cannot confirm yet \u2014 see the record in the feed`,decided:{confirmDelete:`Deletion confirmed`,confirm:`Changes confirmed`,reject:`Rejected`},secretSaved:(e,t)=>t===null?`${rd(e)} saved`:`${rd(e)} saved to ${t}`},secretInput:{titleTail:` \u2014 secret for environment`,countTitle:e=>nd(e,`secret`,`secrets`),countTitleTail:` for environment`,placeholder:`Secret value`,fieldLabel:e=>`Value of ${e}`,fieldLabelReplace:e=>`New value of ${e}`,show:`Show value`,hide:`Hide value`,save:`Save`,saveMany:e=>`Save ${nd(e,`value`,`values`)}`,saving:`Saving`,replace:`Replace`,replacing:`Replacing`,retry:`Retry`,privacy:`The model and the chat will not see the value`,tooLong:(e,t)=>`At most ${ed(e)} characters \u2014 now ${ed(t)}`,failed:{network:`Could not save the value \u2014 no connection to the server.`,server:`Could not save the value \u2014 the server did not respond.`,refused:`Could not save the value \u2014 the server refused it.`},closed:`The change is already closed \u2014 the value was not saved`,confirmFailed:`The value was received, but the change could not be confirmed. \u201CRetry\u201D sends it again.`,current:`Now`,currentAria:`Current value hidden, will be replaced`,willReplace:`Will be replaced`,whyName:`Why it waits for you`,whyText:e=>`${e} already has a value \u2014 the new one replaces it. You confirm the replacement, even in \u201Cno confirmation\u201D mode.`,hiddenAria:`Value hidden`,savedIn:e=>`Saved to ${e}`,saved:`Saved`,declined:`Rejected \u2014 the value was not saved`,reenter:`Enter again`,reenterAria:e=>`Enter the value of ${e} again`,setByYou:e=>`set by you at ${e}`,setAt:e=>`set at ${e}`,notSet:`value not set`,savingAnnouncement:`Saving the value`},killSwitch:{title:`Progon writes are turned off for this company.`,body:`A company admin can enable them in Settings \u2192 AI. You can review this plan, but it cannot be applied.`},disabledReason:{still_composing:`The proposal is being updated \u2014 confirm will be available shortly.`,awaiting_secret_value:`Waiting for the secret value \u2014 enter it in the card above the message field.`},confirm:`Confirm changes`,confirmDelete:`Confirm deletion`,reject:`Reject`,bugFiling:{title:`File a bug?`,confirm:`File bug`,capture:{ready:`Screenshot`,awaiting:`Screenshot still uploading`,unavailable:`No screenshot`,no_screen:`Request and response, no screen to capture`},address:e=>`address ${e}`,severity:e=>`Severity: ${e}`,factFinding:`Finding`,factSeverity:`Severity`,factWithIt:`With it`,severityWord:{critical:`critical`,high:`high`,medium:`medium`,low:`low`}},closedBy:{line:{launch_stopped:`Closed \u2014 the launch stopped`,finding_filed:`Closed \u2014 you filed this bug yourself`},launchStoppedNote:`An answer would change nothing now`,findingFiledNote:(e,t)=>`You filed bug #${String(e)} from this finding at ${t} \u2014 no answer needed`},rejectPlain:`Just reject`,rejectWithReason:`Reject with a comment`,reasonLabel:`Why?`,reasonHint:`(optional \u2014 helps the assistant propose a better option)`,commandFailed:{confirm:`Failed to confirm \u2014 try again.`,reject:`Failed to reject \u2014 try again.`,retry:`Retry failed \u2014 try again.`},applyingSubject:e=>`Applying ${ed(e)} ${td(e)}`,applyingGeneric:`Applying\u2026`,applyDuration:e=>`Apply time: ${ed(e)} ms`,applyAria:`Changes are being applied`,applyDisclaimer:`Do not assume success until the server confirms. You can navigate away \u2014 this task will continue and update when you return.`,attempt:e=>`attempt ${ed(e)}`,verified:`confirmed by the server`,appliedGroup:e=>`Applied (${ed(e)})`,failedGroup:e=>`Failed or blocked (${ed(e)})`,row:{applied:`Applied`,failed:`Failed to apply`,batch_aborted:`Rolled back`,pending:`Not attempted`,skipped:`Skipped`},applyError:{stale_guard:`The item changed after this proposal was composed.`,secret_expired_or_consumed:`The secret value has already been used or has expired.`,"assistant.change_set.batch_aborted":`Rolled back: another item in the same confirmation failed to apply.`,"assistant.change_set.apply_unexpected_error":`Unexpected error while applying.`,"assistant.ai_write_disabled":`Progon writes are turned off for this company.`,"variables.duplicate_name":`A variable with this name already exists.`},whatNext:`What to do next: retry the failed items, review any blocked ones, or revise your request.`,applyMissing:`Apply summary missing from snapshot.`,retryRemaining:e=>`Retry remaining (${ed(e)})`,revise:`Revise request`,reviseDraftScenario:e=>`Propose a different change for \u201C${e}\u201D`,reviseDraftProject:e=>`Propose a different change in project \u201C${e}\u201D`,rejectedTitle:`No changes made.`,rejectedLead:`The proposal was rejected before apply. Your project data is unchanged.`,undoneTitle:`Changes undone`,undoneLead:`The applied changes were reverted to their previous state.`,superseded:`Superseded by a newer proposal.`,unknownState:`Task status not supported by this version`,undo:{action:`Undo changes`,until:e=>`Undo available until ${e}`,busy:`Undoing\u2026`,blocked:{stale:`Undo unavailable: the data changed after apply.`,expired:`Undo unavailable: the undo window has elapsed.`,kill_switch:`Undo unavailable: Progon writes are disabled for this company.`},unavailable:`Undo unavailable.`,error:{"change_sets.undo_stale":`Undo unavailable: the data changed after apply.`,"change_sets.undo_expired":`Undo unavailable: the undo window has elapsed.`,"change_sets.undo_not_eligible":`Undo unavailable.`,"assistant.ai_write_disabled":`Undo unavailable: Progon writes are disabled for this company.`},failed:`Failed to undo the changes. Try again.`,unknown:`Undo status unknown \u2014 reload the card.`,sideEffectsTitle:`Not reversed automatically:`,sideEffect:{test_plan_assignment_advance:`Test-plan assignment advancement`}},loadingAria:`Loading task status`,loadError:`Couldn't load task status.`,loadErrorText:`Nothing changed on the server.`,retry:`Retry`,unavailable:`Card unavailable`,unavailableText:`You have no access to this change, or it was deleted.`,unsupported:{title:`Changes card not supported`,body:`The answer came in a format this version cannot show. Reload the page or the extension.`},turn:{title:`Changes`,awaiting:e=>`awaiting decision ${ed(e)}`,proposals:e=>`${ed(e)} ${J(e,{one:`proposal`,other:`proposals`})}`,remaining:(e,t)=>`${ed(e)} of ${ed(t)} left`,applying:(e,t)=>`Applying ${ed(e)} of ${ed(t)}\u2026`,done:(e,t)=>`Done: ${ed(e)} of ${ed(t)}`,applied:e=>`${ed(e)} applied`,rejected:e=>`${ed(e)} rejected`,errors:e=>`${ed(e)} ${J(e,{one:`error`,other:`errors`})}`,superseded:e=>`${ed(e)} superseded`,closed:e=>`${ed(e)} closed`,undone:e=>`${ed(e)} undone`,loadFailed:e=>`${ed(e)} failed to load`,confirmAll:e=>`Confirm all (${ed(e)})`,rejectAll:`Reject all`,passFailures:e=>J(e,{one:`${ed(e)} action failed \u2014 that card is unchanged`,other:`${ed(e)} actions failed \u2014 those cards are unchanged`})}},ad=new Intl.NumberFormat(`en`),od=new Intl.NumberFormat(`en`,{style:`percent`,maximumFractionDigits:0}),sd={title:`Coverage check`,caption:e=>`\u201C${e}\u201D`,cardAria:e=>`Coverage check: ${e}`,covered:`Fully covered`,partial:`Partially covered`,gaps:`Gaps`,tagWarningPill:`Tag filter caveat`,unknownItem:`Unknown`,similarity:e=>`${od.format(e)} match`,steps:e=>`${ad.format(e)} ${J(e,{one:`step`,other:`steps`})}`,unsupported:{title:`Coverage card not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},cd=new Intl.NumberFormat(`en`),ld=e=>cd.format(e),ud={kind:{atlas_crawl:`Site crawl`,make_auto:`Scenario run`},stage:{queued:`Queued`,launching:`Launching`,link_pending:`Linking to the map`,crawling:`Exploring the site`,running_batch:`Running scenarios`,completed:`Completed`,failed:`Failed`,cancelled:`Stopped`},machineMissing:`Machine name not received`,activity:e=>`Active ${e}`,activityNone:`no activity`,foundCaption:`On the map`,found:{screens:e=>J(e,{one:`screen`,other:`screens`}),edges:e=>J(e,{one:`transition`,other:`transitions`}),notes:e=>J(e,{one:`note`,other:`notes`}),unexplored:e=>J(e,{one:`unexplored`,other:`unexplored`})},degraded:`The map cannot be read right now \u2014 counters are unavailable. The work continues.`,terminalPrefix:`Finished because`,terminalReason:{claim_timeout:`the agent never picked up the job`,launch_timeout:`the browser did not start in time`,launch_error:`the browser failed to start`,browser_gone:`the browser disappeared`,agent_lost:`the agent stopped responding`,max_duration:`the time limit was reached`,killed:`the agent browser was closed manually`,stalled:`the work made no progress`,capability_mismatch:`the agent does not support automatic mapping`,subject_rejected:`the server rejected the run`,model_timeout:`the model did not answer in time`,runs_not_started:`the runs did not start`,credits_exhausted:`credits ran out`,tab_closed:`the run tab was closed`,slot_taken:`another run took the machine slot`,ai_disabled:`an administrator turned Progon off`},openMap:`Open map`,openMapAria:e=>`Open the map of project \u201C${e}\u201D`,cancel:{atlas_crawl:`Stop`,make_auto:`Cancel batch`},kill:`Close agent browser`,cancelConfirm:{atlas_crawl:{question:`Stop the exploration?`,body:`The exploration will stop.`,bodyKept:`Everything the agent has already seen stays on the map.`,bodyQueued:`The job will be removed from the queue \u2014 nothing has started yet.`,keep:`Keep exploring`,confirm:`Stop`},make_auto:{question:`Cancel the batch?`,body:`The whole batch stops: the current run is interrupted and the scenarios still in the queue will not start. Mapping collected so far is kept.`,bodyKept:null,bodyQueued:`The batch will be removed from the queue \u2014 nothing has started yet.`,keep:`Keep batch`,confirm:`Cancel batch`}},killConfirm:{question:`Close the agent browser?`,body:{atlas_crawl:`The browser on the agent machine will be force-closed and the exploration will end as \u201Cbrowser closed manually\u201D. Use it if the agent did not stop after Stop.`,make_auto:`The browser on the agent machine will be force-closed and the batch will end as \u201Cbrowser closed manually\u201D. Use it if the agent did not stop after Cancel.`},keep:`Keep open`,confirm:`Close browser`},failed:{cancel:{atlas_crawl:`Could not stop the exploration.`,make_auto:`Could not cancel the batch.`},kill:`Could not close the agent browser.`,conflict:`The job has already changed \u2014 status refreshed.`},cardAria:e=>`Job: ${e}`,unsupported:{title:`Job status is not supported`,body:`The status came in a format this version cannot show. Reload the page or the extension.`},collection:{collectionAria:e=>`Jobs: ${ld(e)}`,roleCarousel:`job track`,roleSlide:`job`,previous:`Previous job`,next:`Next job`,goToSlide:`Job {index} of {total}`}},dd={explore_app:{id:`explore_app`,title:{ru:`\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u044C`,en:`Explore`},chip:{hint:{ru:`\u041E\u0431\u043E\u0439\u0442\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043A\u0430\u0440\u0442\u0443 \u044D\u043A\u0440\u0430\u043D\u043E\u0432`,en:`Walk through the app and build the screen map`},briefTemplate:{ru:`\u041E\u0431\u043E\u0439\u0434\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u0441\u0442\u0440\u043E\u0439 \u043A\u0430\u0440\u0442\u0443 \u044D\u043A\u0440\u0430\u043D\u043E\u0432.
355
+ \u0411\u0430\u0433 \u2014 \u0432\u0441\u0451, \u0447\u0442\u043E \u043B\u043E\u043C\u0430\u0435\u0442 \u043F\u0443\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438\u043B\u0438 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043E\u0448\u0438\u0431\u043A\u043E\u0439.
356
+ \u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Walk through the app and build the screen map.
357
+ A bug is anything that breaks the user's path or answers with an error.
358
+ Do not touch: `}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`],browserSuggested:!0},find_bugs:{id:`find_bugs`,title:{ru:`\u041D\u0430\u0439\u0442\u0438 \u0431\u0430\u0433\u0438`,en:`Find bugs`},chip:{hint:{ru:`\u0418\u0441\u043A\u0430\u0442\u044C \u0434\u0435\u0444\u0435\u043A\u0442\u044B \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0447\u0430\u0441\u0442\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F`,en:`Hunt for defects in the part of the app you name`},briefTemplate:{ru:`\u041D\u0430\u0439\u0434\u0438 \u0431\u0430\u0433\u0438 \u0432:
359
+ \u0411\u0430\u0433 \u2014 \u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u043F\u0440\u0438\u043D\u044F\u0442\u044B\u0439 \u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434, \u043E\u0448\u0438\u0431\u043A\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.
360
+ \u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Find bugs in:
361
+ A bug is wrong data, accepted invalid input, a server error.
362
+ Do not touch: `}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`],browserSuggested:!0},create_tests:{id:`create_tests`,title:{ru:`\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0442\u0435\u0441\u0442\u044B`,en:`Create tests`},chip:{hint:{ru:`\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B \u043F\u043E \u0442\u043E\u043C\u0443, \u0447\u0442\u043E \u0435\u0441\u0442\u044C \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438`,en:`Write scenarios and checklists from what the app has`},briefTemplate:{ru:`\u041D\u0430\u043F\u0438\u0448\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B \u0434\u043B\u044F:
363
+ \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u2014 \u043F\u043E \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044E: \u0447\u0442\u043E \u0434\u0435\u043B\u0430\u0435\u0442 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0438 \u0447\u0442\u043E \u043C\u043E\u0436\u0435\u0442 \u043F\u043E\u0439\u0442\u0438 \u043D\u0435 \u0442\u0430\u043A, \u0441 \u0433\u0440\u0430\u043D\u0438\u0446\u0430\u043C\u0438 \u0438 \u043E\u0448\u0438\u0431\u043E\u0447\u043D\u044B\u043C\u0438 \u043F\u0443\u0442\u044F\u043C\u0438.
364
+ \u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Write scenarios and checklists for:
365
+ Checks follow behaviour: what the user does and what can go wrong, with limits and error paths.
366
+ Do not touch: `}},defaultAllowedChanges:[`file_bugs`,`write_tests`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`],browserSuggested:!0},automate_scenarios:{id:`automate_scenarios`,title:{ru:`\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,en:`Automate`},chip:{hint:{ru:`\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438`,en:`Make scenarios automated`},briefTemplate:{ru:`\u0421\u0434\u0435\u043B\u0430\u0439 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438.
367
+ \u0415\u0441\u043B\u0438 \u0448\u0430\u0433 \u0443\u0441\u0442\u0430\u0440\u0435\u043B \u2014 \u043F\u043E\u043F\u0440\u0430\u0432\u044C \u0435\u0433\u043E \u0438 \u043D\u0430\u043F\u0438\u0448\u0438 \u0432 \u043E\u0442\u0447\u0451\u0442\u0435, \u0447\u0442\u043E \u043F\u043E\u043C\u0435\u043D\u044F\u043B.`,en:`Make the chosen scenarios automated.
368
+ If a step is outdated, fix it and say in the report what you changed.`}},defaultAllowedChanges:[`file_bugs`,`write_tests`],defaultCaptureApi:!1,suggestedScopeKinds:[`scenarios`],browserSuggested:!0},run_scenarios:{id:`run_scenarios`,title:{ru:`\u041F\u0440\u043E\u0433\u043D\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,en:`Run scenarios`},chip:{hint:{ru:`\u041F\u0440\u043E\u0433\u043D\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u0442\u044C, \u0447\u0442\u043E \u0443\u043F\u0430\u043B\u043E`,en:`Run scenarios and sort out what failed`},briefTemplate:{ru:`\u041F\u0440\u043E\u0433\u043E\u043D\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0438, \u0447\u0442\u043E \u0443\u043F\u0430\u043B\u043E: \u0431\u0430\u0433 \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0438\u043B\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0448\u0430\u0433.
369
+ \u0411\u0430\u0433\u0438 \u0437\u0430\u0432\u043E\u0434\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E \u0431\u0430\u0433\u0430\u043C \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F.`,en:`Run the scenarios and sort out what failed: a bug in the app or an outdated step.
370
+ File bugs only for bugs of the app.`}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!1,suggestedScopeKinds:[`test_run`,`test_plan`,`scenarios`],browserSuggested:!1},custom:{id:`custom`,title:{ru:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`,en:`AI task`},chip:null,defaultAllowedChanges:null,defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`,`test_run`,`test_plan`],browserSuggested:!1}},fd=[`explore_app`,`find_bugs`,`create_tests`,`automate_scenarios`,`run_scenarios`];function pd(e){return fd.some(t=>Object.values(dd[t].chip.briefTemplate).includes(e))}function md(e){return dd[e]}function hd(e){return e.name===null?e.briefLine:e.name}var gd={web_runs_prompt:`from Launches`,web_test_run_dialog:`from a test run`,web_map_dialog:`from the map`,web_scenarios_dialog:`from Scenarios`,chat:`from a chat`},_d=e=>J(e,{one:`agent`,other:`agents`}),vd={title:{make_auto:`Swarm \u00B7 Make Auto`,atlas:`Swarm \u00B7 Atlas`,preset:`AI task`},subtitle:(e,t,n)=>`${e} \u00B7 Max \u00B7 up to ${t} ${_d(t)} \u00B7 since ${n}`,preset:{stopConfirm:{question:`Stop the task?`,body:`The agent window closes and running runs are cancelled. The report is marked \u00ABPartial\u00BB. What is done \u2014 bugs, findings, scenarios \u2014 stays.`,keep:`Keep running`,confirm:`Stop the task`,failed:`Could not stop the task`},scope:e=>{switch(e.kind){case`project`:return`Whole app`;case`scenarios`:return`${e.count} ${J(e.count,{one:`scenario`,other:`scenarios`})}`;case`test_run`:return e.name===null?`Test run #TR-${String(e.number).padStart(3,`0`)}`:`Test run \u201C${e.name}\u201D`;case`test_plan`:return`Test plan \u201C${e.name}\u201D`}},level:e=>e.effort===`max`?`Max \u00B7 ${e.maxAgents} ${_d(e.maxAgents)}`:e.effort===`thinking`?`Thinking`:`Normal`,since:e=>`since ${e}`,counts:{findings:e=>J(e,{one:`finding`,other:`findings`}),bugs:e=>J(e,{one:`bug`,other:`bugs`}),undecided:e=>J(e,{one:`awaits a decision`,other:`await a decision`}),notDone:`not done`},awaitingBrowser:{sidePanel:`Connect this browser \u2014 the lead starts at once`,web:`You can continue from the Progon side panel in Chrome`},startingRunner:`Waiting for the runner to take the task`,pillAwaitingBrowser:`Waiting for a browser`,stripAwaitingBrowser:`The task is waiting for a browser`,panelWait:{title:e=>`\u201C${e}\u201D is waiting for a browser`,lostTitle:e=>`The browser disconnected \u2014 \u201C${e}\u201D is waiting`,lostDetail:e=>`The agent window closed at ${e}, the work done is saved`,origin:(e,t,n)=>`Launched ${gd[e]} at ${t} \u00B7 ${n}`,resume:`Continue in this browser`,openLaunch:`Launch page`},stripChatLeadAwaitingAnswer:`The assistant awaits your reply`,stripChatLeadAwaitingMessage:`The assistant awaits your message`,chatLeadIdle:`The assistant wakes up when the run ends`,partialCancelled:e=>`Incomplete: stopped at ${e}.`,partialFailed:e=>`Incomplete: ${e}.`,failureReason:{credits:`the company ran out of AI credits`,turnShape:`the lead answered outside the rules`,internal:`internal error of the lead`,initiatorUnavailable:`the initiator is unavailable`,other:e=>`the lead stopped with the error \u201C${e}\u201D`},beforeStop:(e,t)=>t===null?`Before the stop \u2014 ${e}.`:`Before the stop \u2014 ${e}, ${t}.`},topic:e=>e.kind===`atlas`?e.projectName:e.kind===`preset`?hd(e):e.scenarioName===null?`${e.scenarioCount} ${J(e.scenarioCount,{one:`scenario`,other:`scenarios`})}`:e.scenarioName.trim()===``?`Untitled scenario`:e.scenarioName,pill:{startingBrowser:`Connecting`,startingRunner:`Connecting`,running:`Running`,awaiting:`Awaiting reply`,browserLost:`Waiting for browser`,runnerLost:`Waiting for runner`,pausing:`Pausing`,paused:`Paused`,stopping:`Stopping`,finalizing:`Final analysis`,completed:`Done`,failed:`Failed`,cancelled:`Stopped`},pauseCause:{user:`manual`,credits:`credits`},lead:{startingBrowser:`Waiting for the browser to take the swarm`,startingRunner:`Waiting for the runner to take the swarm`,active:`The lead is handing out work`,idle:`The agents are working, the lead awaits their reports`,awaiting:`The lead awaits your reply \u2014 the question is below`,stopping:`Closing the windows and stopping the tasks. What is done stays.`},startingRow:{browser:`Windows open in the background \u2014 focus stays with you`,runner:`Windows open in the runner's browser`},hostLost:{sidePanel:`The browser was closed \u2014 the agents' windows are closed, the queues are paused.`,web:`The browser is disconnected. You can continue from the Progon side panel in Chrome.`,runner:`The runner's job ended. Why \u2014 on the launch page, with \u00ABContinue on a runner\u00BB.`},worker:{name:e=>`Agent ${e}`,kind:{make_auto:`Make Auto`,atlas:`Atlas`,run:`Run`},task:e=>`task ${e}`,opening:`Window opening`,idle:`Awaiting a task`,busy:`Taking a task`,closing:`Window closing`,untitledScenario:`Untitled scenario`,crawl:e=>e===null?`Crawl`:`Crawl \u201C${e}\u201D`,progress:(e,t)=>`${e} of ${t}`,steps:e=>`${e} ${J(e,{one:`step`,other:`steps`})}`},end:{tally:(e,t)=>`Done ${e} of ${t}`,tallyBeforeStop:(e,t)=>`Done before the stop: ${e} of ${t}`,screens:e=>`${e} ${J(e,{one:`screen`,other:`screens`})} on the map`,cancelledBy:(e,t)=>`Stopped by ${e}, ${t}.`,reportPartial:`The report is marked \u00ABIncomplete\u00BB.`,failureReason:{credits:`The company ran out of AI credits.`,turnShape:`The lead answered outside the swarm\u2019s rules.`,internal:`Internal error of the lead.`,initiatorUnavailable:`The swarm stopped: the initiator is unavailable.`,other:e=>`The lead stopped with the error \u201C${e}\u201D.`}},actions:{open:`Swarm page`,openLaunch:`Launch page`,openReport:`Open report`,stop:`Stop`,resume:`Continue in this browser`,stopConfirm:{question:`Stop the swarm?`,body:`The windows close and the tasks stop. What is done \u2014 scenarios and screens on the map \u2014 stays.`,keep:`Keep running`,confirm:`Stop the swarm`},stopFailed:`Could not stop the swarm`},strip:{awaiting:`The lead awaits your reply`,toQuestion:`To the question`,lostBrowser:`Browser disconnected`,lostRunner:`Waiting for runner`,resume:`Continue`,startingBrowser:`Connecting the browser`,startingRunner:`Connecting the runner`,active:`The lead is handing out work`,idle:`The agents are working`,stopping:`The swarm is stopping`,toBlock:`To the swarm`,toBlockLabel:`Show the swarm block`,windows:e=>`${e} ${J(e,{one:`window`,other:`windows`})}`}},yd={failed:e=>`Could not start the scenario: ${e}`,failedBatch:e=>`Could not start the scenarios: ${e}`,reason:{no_active_tab:`no active tab. Open the project page first.`,content_not_loaded:`the extension is not loaded on this page. Refresh it and try again.`,launch_refused:`the tab did not start the run: another run is in progress there, or it could not be prepared.`,no_response:`the extension did not answer the run request. Try again.`,test_run_tab_missing:`the tab with this run's test run is closed, or its test run has ended.`},unsupported:{title:`Run in tab not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},bd=new Intl.NumberFormat(`en`),xd=e=>bd.format(e),Sd={title:`Run on agent`,cardAria:e=>`Run on agent: ${e}`,outcome:{refused:`Rejected`,refusedWithReason:e=>`Rejected: ${e}`,launched:(e,t)=>`Launched ${xd(e)} of ${xd(t)}`},confirmed:`Confirmed`,refusedHead:`Rejected`,refusedList:`Rejected scenarios`,launchedSummary:`Launched`,launchedList:`Launched scenarios`,unsupported:{title:`Run card not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},Cd={listLabel:(e,t)=>`${e} \u00B7 ${xd(t)}`,token:{"stand.main":`Safe`,"stand.dangerous":`Full`,"scenarios.ad_hoc_batch":`A one-off batch of steps, not a saved scenario`,"environment.projectDefault":`The project's default`,"status.running":`Running`,"status.finished":`Finished`,"status.aborted":`Aborted`,"aiRunMode.mapping":`Bind steps to page elements`,"aiRunMode.agentic":`The agent walks through the scenario`,"window.headful":`With browser window`,"window.headless":`Without browser window`,"executor.extension":`Browser extension`,"executor.agent":`Runner`,"billingPeriod.monthly":`Monthly`,"billingPeriod.yearly":`Yearly`,"requestType.plan_change":`Plan change`,"requestType.topup":`Credit top-up`,"requestType.seats":`Additional seats`,"role.user":`User`,"allowedChange.file_bugs":`File bugs`,"allowedChange.write_tests":`Create and change scenarios and checklists`,"allowedChange.edit_project":`Other changes`,"scope.project":`Whole application`},warning:{"stand.dangerous":`Full access on an unattended machine: the agent will be able to change and delete any data, with nobody next to it. Enable this on a test stand only.`},unrecognized:`Value not recognized`},wd=new Intl.NumberFormat(`en`),Td=e=>wd.format(e),Ed={title:`Scenario`,caption:e=>`SC-${String(e)}`,cardAria:(e,t)=>`Scenario ${e}: ${t}`,lifecycle:{draft:`Draft`,ready:`Live`,outdated:`Outdated`,archived:`Archived`},steps:e=>J(e,{one:`step`,other:`steps`}),runs:e=>J(e,{one:`run`,other:`runs`}),mapping:{label:{none:`Mapping: none`,partial:`Mapping: partial`,full:`Mapping: full`},hint:{none:`no step is linked yet`,partial:`some steps are linked to pages and elements`,full:`every step is linked`},hintNoSteps:`no steps`,tip:e=>`Steps mapped to pages and elements: ${e}`},open:`Open in workspace`,openShort:`Open`,openAria:e=>`Open in workspace: ${e}`,run:`Run`,runAria:e=>`Run: ${e}`,runCommand:e=>`Run scenario ${e}`,runNoSteps:`No steps to run \u2014 add steps in the workspace.`,expand:`Expand \u2014 steps and history`,expandShort:`Expand`,collapse:`Collapse`,tabsAria:`Scenario sections`,tabSteps:`Steps`,tabRuns:`Run history`,step:{aria:(e,t)=>`Step ${Td(e)}: ${t}`,missingLabel:`step text is missing`,moreExpected:e=>`+${Td(e)}`,expectedHeading:`Expected results`},stepsEmptyTitle:`No steps yet`,stepsEmptyHint:`Add steps in the workspace \u2014 record them in the extension, type them or import them.`,stepsShown:(e,t)=>`Showing ${Td(e)} of ${Td(t)}`,stepsLoadMore:e=>`Load ${Td(e)} more`,stepsLoading:`Loading steps\u2026`,stepsLoadFailed:(e,t)=>`Could not load steps \u00B7 showing ${Td(e)} of ${Td(t)}`,runsEmptyTitle:`Never run`,runsEmptyHint:`Run the scenario \u2014 its run history appears here.`,runsEmptyHintNoSteps:`Add steps and run the scenario \u2014 its run history appears here.`,runsLoading:`Loading run history\u2026`,runsLoadFailed:`Could not load the run history`,runsShown:(e,t)=>`Showing ${Td(e)} of ${Td(t)}`,runsLoadMore:e=>`Show ${Td(e)} more`,runStatus:{queued:`Queued`,launching:`Launching`,in_progress:`In progress`,completed:`Completed`,failed:`Failed`,cancelled:`Cancelled`},runMode:{manual:`Manual`,semi_auto:`Semi-auto`,auto:`Auto`},runProgress:(e,t)=>`step ${Td(e)} of ${Td(t)}`,runDurationUnavailable:`Duration unavailable`,runMomentUnavailable:`\u2014`,unsupported:{title:`Scenario card is not supported`,body:`The answer came in a format this version cannot show. Reload the page or the extension and ask in the chat again.`},collection:{collectionAria:e=>`Scenarios: ${Td(e)}`,roleCarousel:`scenario track`,roleSlide:`scenario`,previous:`Previous scenario`,next:`Next scenario`,goToSlide:`Scenario {index} of {total}`}},Dd=new Intl.NumberFormat(`en`),Y=e=>Dd.format(e),Od=e=>J(e,{one:`run`,other:`runs`}),kd=e=>J(e,{one:`failure`,other:`failures`}),Ad=e=>J(e,{one:`pass`,other:`passes`}),jd=e=>J(e,{one:`day`,other:`days`}),Md=e=>J(e,{one:`page`,other:`pages`}),Nd={not_enrolled:()=>`No machine is connected yet.`,none_ready:e=>`None of your machines (${Y(e)}) is ready for this work.`,one_ready:e=>`One machine is ready. Machines in total: ${Y(e)}.`,many_ready:e=>`Several machines are ready. Machines in total: ${Y(e)}.`},Pd={playback:`No playback`,atlas_crawl:`No site crawl`,make_auto:`No scenario auto-build`},Fd={common:{missingName:`name is missing`,open:`Open`,newTabSuffix:` (new tab)`,noOpenTarget:`no open target`,noOpenTargetHint:`There is no open target for this entity type`,moreActions:`More actions`,retry:`Retry`,commandFailure:{confirm:`Could not confirm \u2014`,reject:`Could not reject \u2014`,reason:{rejected:`the server did not accept the decision. Try again.`,ack_timeout:`the server did not answer. Try again.`,not_open:`the connection is not open yet. Try again.`,connection_closed:`the connection dropped. Try again.`}},entityType:{scenario:`Scenario`,bug:`Bug`,"checklist-item":`Checklist item`,checklist:`Checklist`,"saved-request":`API request`,collection:`Collection`,"shared-step":`Shared step`,run:`Test run`,"test-run":`Test run`,page:`Page`,"test-plan":`Test plan`,environment:`Environment`,variable:`Variable`,incident:`Incident`,"atlas-fact":`Map`,"api-folder":`API folder`,"api-endpoint":`API endpoint`,section:`Section`}},collection:{counter:`{index} / {total}`,counterUnknown:`{index}`,positionMore:`More`,scrubberAria:`Position in the track`,slideAria:`{index} of {total}`,slideAriaAtLeast:`{index} of {total}+`,slideAriaUnknown:`{index}, set size unknown`,loadedOf:`{loaded} of {total} shown`,loadedOfAtLeast:`{loaded} of {total}+ shown`,loadedOfUnknown:`{loaded} shown`,loadMore:`Load {remaining} more`,loadMoreUnknown:`Load more`,loading:`Loading the next page\u2026`,loadMoreFailed:`Could not load the next page`,retry:`Retry`,loadedMore:`{count} more loaded, {total} in total`,loadedMoreAtLeast:`{count} more loaded, at least {total} in total`,loadedMoreUnknown:`{count} more loaded`},report:{title:{metric_card:`Metric`,trend_card:`Trend`,finding_card:`Weak spot`,stability_row_card:`Scenario stability`,scenario_stability_card:`Scenario stability \u2014 details`,failure_breakdown_card:`Failure causes`,weak_spot_feature_card:`Weak area: feature`,weak_spot_page_card:`Weak area: page`,hotspot_card:`Bug hotspot`},window:{"7d":`7 days`,"14d":`14 days`,"30d":`30 days`,"90d":`90 days`},windowShort:{"7d":`7 d`,"14d":`14 d`,"30d":`30 d`,"90d":`90 d`},basisRuns:(e,t)=>`last ${Y(e)} ${Od(e)} (up to ${Y(t)} ${jd(t)})`,currentState:`current state`,noWindow:`window does not apply`,asOf:e=>`as of ${e}`,stamp:{source:(e,t)=>[`Source: ${e}`,...t].join(` \u00B7 `),metric:(e,t)=>`${e} \u00B7 version ${t}`,rule:(e,t)=>`rule ${e} \u00B7 version ${t}`,definition:e=>`definition version ${e}`,mapping:e=>`mapping version ${e}`,envelope:(e,t)=>`${e} \u00B7 version ${t}`},metric:{name:{pass_rate:`Run pass rate`,runs_total:`Runs`,runs_passed:`Passed runs`,runs_failed:`Failed runs`,runs_evaluated:`Runs in the denominator`,runs_infra:`Infrastructure runs`,runs_cancelled:`Cancelled runs`,runs_abandoned:`Abandoned runs`,run_duration_sum_ms:`Total run duration`,run_duration_count:`Runs with a known duration`,run_duration_avg:`Average run duration`,page_steps_executed:`Steps executed on the page`,page_steps_passed:`Steps passed on the page`,page_steps_failed:`Steps failed on the page`,page_steps_healed:`Self-healed steps on the page`,page_step_success_rate:`Page step success rate`,page_healed_rate:`Page self-healing share`,step_failures:`Step failures`,run_failures:`Run failures`,bugs_opened:`Bugs opened`,bugs_closed:`Bugs closed`,open_bugs:`Open bugs`,covered_pages:`Covered pages`,total_pages:`Total pages`,page_coverage_pct:`Page coverage`,unstable_scenarios:`Unstable scenarios`},missingName:`Metric without a name in this version`,missingNameDetail:e=>`metricId: ${e}`,unit:{percent:`%`,count:``,ms:`ms`,days:`d`},denominator:{pass_rate:e=>`of ${Y(e)} ${Od(e)}`,runs_total:e=>`${Y(e)} ${Od(e)}`,unstable_scenarios:e=>`of ${Y(e)} automated ${J(e,{one:`scenario`,other:`scenarios`})}`,open_bugs:e=>`${Y(e)} open`,page_coverage_pct:e=>`of ${Y(e)} ${Md(e)}`,generic:e=>`base: ${Y(e)}`},insufficient:`Not enough data in the window \u2014 the metric is not computed.`,noSeriesValue:`Not enough data in the window \u2014 no chart is drawn.`,deltaHint:`vs the previous period`,deltaPointsHint:` \u00B7 pp \u2014 percentage points, the difference of two percentages`,deltaPoints:e=>`${e} pp`,sparkAria:e=>`Trend: ${e}`,sparkGap:(e,t)=>`Not enough data on ${e}: ${Y(t)} ${Od(t)}`,openReport:`Open the full report`},trend:{lastDay:e=>`Last day (${e})`,dayDenominator:e=>`day denominator: ${Y(e)}`,points:`Points`,empty:`No points \u2014 not a single day in the window had enough data.`,gaps:e=>`Days with no value: ${Y(e)} \u2014 the day denominator is below the minimum.`},finding:{severity:{critical:`critical`,high:`important`,watch:`watch`},sentence:{uncovered_high_priority:e=>({before:`Feature `,after:` (${e.priority} priority): ${Y(e.uncovered)} of ${Y(e.total)} ${Md(e.total)} not covered`}),consistently_failing_scenario:e=>({before:`Scenario `,after:` failed in the last ${Y(e.count)} ${Od(e.count)} in a row`}),low_page_success:e=>({before:`Page `,after:`: step success ${e.rate} of ${Y(e.executions)} (threshold: ${e.threshold})`}),high_healed_rate:e=>({before:`Page `,after:`: ${e.rate} of passed steps needed self-healing (threshold: ${e.threshold})`}),stale_page:e=>({before:`Page `,after:` has not been checked for ${Y(e.days)} ${jd(e.days)} (threshold: ${Y(e.threshold)})`}),open_bugs_no_verification_critical:e=>({before:`Page `,after:`: ${Y(e.count)} critical ${J(e.count,{one:`bug`,other:`bugs`})} and no passed check in ${e.window}`}),open_bugs_no_verification_high:e=>({before:`Page `,after:`: ${Y(e.count)} high-severity ${J(e.count,{one:`bug`,other:`bugs`})} and no passed check in ${e.window}`})},dominantCause:(e,t,n)=>`; main cause \u2014 ${e.toLocaleLowerCase(`en`)} (${Y(t)} of ${Y(n)} ${kd(n)})`,unknownRule:`The rule of this weak spot is not supported by this version.`,incompleteEvidence:`The rule evidence is incomplete, so no statement is made.`,ruleIdDetail:e=>`ruleId: ${e}`,evidence:(e,t,n)=>`${Y(e)} \u00B7 ${t} \u00B7 threshold ${Y(n)}`,evidenceAria:`Evidence behind the statement`,evidenceRows:{denominator:`Denominator`,threshold:`Threshold`,window:`Window`,rule:`Rule`},open:{scenario:`Open the scenario`,page:`Open the page`,feature:`Open the feature`}},openAria:(e,t)=>`${e} \u201C${t}\u201D`,stability:{status:{consistently_failing:`consistently failing`,flaky:`flaky`,monitoring:`monitoring`,insufficient_history:`not enough history`,stable:`stable`},evidence:{flaky:(e,t,n)=>`Flaky \u2014 ${Y(e)} ${kd(e)} and ${Y(t)} ${Ad(t)} in the last ${Y(n)} ${Od(n)}`,consistently_failing:e=>J(e,{one:`Consistently failing \u2014 the last ${Y(e)} run failed`,other:`Consistently failing \u2014 the last ${Y(e)} runs failed in a row`}),monitoring:(e,t)=>`Monitoring \u2014 ${Y(e)} ${kd(e)} out of ${Y(t)} ${Od(t)}; flaky needs \u22652 failures and \u22652 passes at n\u22656`,insufficientHistory:e=>`Not enough history \u2014 ${Y(e)} ${Od(e)}; classification needs \u22653`,insufficientHistoryWatermark:e=>`Not enough history \u2014 history is classified from ${e}: the scenario was edited`,stable:e=>`Stable \u2014 ${Y(e)} ${Od(e)} with no failures`},stripAria:(e,t,n)=>`${Y(e)} ${Ad(e)}, ${Y(t)} ${kd(t)} out of ${Y(n)}`,stripAriaBeforeChange:e=>` \u00B7 before the scenario was edited: ${Y(e)} ${Od(e)}`,beforeChange:`before the scenario was edited`,success:`Success rate`,outOf:(e,t)=>`${Y(e)} of ${Y(t)}`,dominantCause:`Main cause`,noFailures:`no failures`,lastRun:`Last run`,historyReset:e=>`History is classified from ${e}: the scenario was edited.`,causesTitle:`Failure causes`,failures:e=>`${Y(e)} ${kd(e)}`,healed:`Step self-healing`,aiExecuted:`AI-executed steps`,ofPassedSteps:(e,t)=>`${Y(e)} of ${Y(t)} passed ${J(t,{one:`step`,other:`steps`})}`,erFailed:`Failed expected results`,erFailedValue:(e,t)=>`in ${Y(e)} of ${Y(t)} ${Od(t)}`,rawCodes:e=>`Cause codes \u00B7 mapping ${e}`,rawCode:(e,t)=>`${e} \u00D7${Y(t)}`,recentRuns:`Recent runs`,outcome:{passed:`passed`,failed:`failed`,infra:`infrastructure`,cancelled:`cancelled`,abandoned:`abandoned`},totalFailures:`Failures in total`,noCauses:`No failures.`},cause:{element_resolution:`Element lookup`,step_definition:`Step definition`,action_dispatch:`Action dispatch`,precondition:`Precondition not met`,infrastructure:`Infrastructure`,cancelled:`Cancelled`,unrecognized:`Unrecognized`},weakSpots:{coverage:`Coverage`,coverageValue:(e,t)=>`${Y(e)} of ${Y(t)} ${Md(t)}`,stepSuccess:`Step success rate`,ofSteps:(e,t)=>`${Y(e)} of ${Y(t)} ${J(t,{one:`step`,other:`steps`})}`,noExecutions:`no executions`,openBugs:`Open bugs`,findings:`Weak spots`,findingsNone:`none`,findingCount:{critical:e=>`${Y(e)} critical ${J(e,{one:`finding`,other:`findings`})}`,high:e=>`${Y(e)} important ${J(e,{one:`finding`,other:`findings`})}`,watch:e=>`${Y(e)} ${J(e,{one:`finding`,other:`findings`})} on watch`},pagesTitle:`Feature pages`,pagesCount:(e,t)=>`${Y(e)} of ${Y(t)}`,pageCovered:`covered`,pageNotCovered:`not covered`,pageBugs:e=>`bugs: ${Y(e)}`,pagesTruncated:(e,t)=>`Showing ${Y(e)} of ${Y(t)} feature pages.`,membership:`A page can belong to several features \u2014 per-feature sums do not add up.`,unassigned:`no feature`,priority:{critical:`Critical`,high:`High`,medium:`Medium`,low:`Low`,ignore:`Ignored`}},lastPassed:{label:`Last passed check`,never:`no passed checks yet`,today:`today`,yesterday:`yesterday`,daysAgo:e=>`${Y(e)} ${jd(e)} ago`},hotspot:{open:`Open bugs`,opened:`Opened in the window`,closed:`Closed in the window`,closedHint:`Closures are counted from the reports release: earlier closures carry no close date, and rebuilding it from the change time would be made up.`,unmapped:`Unmapped`,unmappedHint:`Bugs whose element or page has been deleted.`,severityChip:{critical:e=>`${Y(e)} crit`,high:e=>`${Y(e)} high`,medium:e=>`${Y(e)} med`,low:e=>`${Y(e)} low`,none:e=>`${Y(e)} no severity`,unknown:(e,t)=>`${Y(e)} ${t}`}},envelope:{shownOfTotal:(e,t)=>`Showing ${Y(e)} of ${Y(t)} \u2014 the full list is in the report.`,truncated:`Not all rows are shown \u2014 the full list is in the report.`},unsupported:{title:`This report card is not supported`,body:`The report data arrived in a shape this version cannot show. Reload the page or update the extension \u2014 the numbers are still in Progon\u2019s reply text.`},collection:{collectionAria:e=>`Report cards: ${Y(e)}`,roleCarousel:`card track`,roleSlide:`card`,previous:`Previous card`,next:`Next card`,goToSlide:`Card {index} of {total}`}},runnerReadiness:{title:e=>`Machine readiness: ${e}`,job:{atlas_crawl:`site crawl`,make_auto:`scenario auto-build`,swarm:`agent swarm`},evaluatedAt:e=>`as of ${e}`,fleet:Nd,state:{not_owner:()=>`Not found`,pending_enroll:()=>`Awaiting connection`,offline:()=>`Offline`,capability_missing:e=>e===null?`Update needed`:Pd[e],queue_full:()=>`Queue full`,ready:()=>`Ready`},platform:{darwin:`macOS`,linux:`Linux`,win32:`Windows`},lastSeen:e=>`last seen ${e}`,lastSeenNever:`never came online`,machinesAria:e=>`Machines: ${Y(e)}`,noRunners:`The machine list is empty.`,truncated:(e,t)=>`Showing ${Y(e)} of ${Y(t)}.`,unsupported:{title:`This machine card is not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`},collection:{collectionAria:e=>`Readiness reports: ${Y(e)}`,roleCarousel:`readiness report track`,roleSlide:`report`,previous:`Previous report`,next:`Next report`,goToSlide:`Report {index} of {total}`}},runnerEnrollment:{title:e=>`Connect your machine: ${e}`,expiresAt:e=>`valid until ${e}`,step:{install:`Install the agent`,enroll:`Connect the machine`,approve:`Approve it in the browser`,start:`Start the daemon`},copy:`Copy`,copied:`Copied`,copyAria:{install:`Copy the install command`,enroll:`Copy the enroll command`,start:`Copy the start command`},copiedAria:{install:`Copied \u2014 the install command`,enroll:`Copied \u2014 the enroll command`,start:`Copied \u2014 the start command`},approveBefore:`The enroll command prints a confirmation code and an approval link shaped like`,approveAfter:`\u2014 open it in a browser signed in to Progon, check the code matches your terminal, name the machine and approve it.`,cadence:e=>`Approve the request within ${Y(e)} s.`,askAgain:`Once the machine is connected, ask in the chat again.`,unsupported:{title:`These connection instructions are not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`}},references:{title:`References`,groupAria:`References from the reply`,destination:{workbench:`in the workbench`,map:`on the map`,run:`opens the run`,list:`in the list`},action:{workbench:`Open in the workbench`,map:`Open on the map`,run:`Open the run`,list:`Open in the list`},noOpenAria:e=>`No open target: ${e}`,unsupported:{title:`References from the reply are not supported`,body:`The references arrived in a format this version cannot show. Reload the page or update the extension.`}},sectionLink:{title:`Project sections`,groupAria:`Project section links`,action:`Open the section`,sections:{scenarios:`Scenarios`,"shared-steps":`Shared Steps`,"api-collections":`API Requests`,"api-catalog":`API Requests`,checklists:`Checklists`,bugs:`Bugs`,"test-runs":`Test Runs`,map:`Project Map`},unrecognized:`Unrecognized section`,serverLabel:e=>`Section \u00B7 from the server: \u201C${e}\u201D`,noRoute:`no link`,noRouteHint:`No link could be built for this section`,noRouteAria:e=>`No link for the section: ${e}`,unsupported:{title:`This section link is not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension.`}},search:{title:`Found in the project`,evidence:`Why it matched`,openAria:e=>`Open: ${e}`,emptyTitle:`Nothing found`,emptyForQuery:e=>`Nothing matched \u201C${e}\u201D with enough confidence.`,emptyBody:`Searched across the available entity types \u2014 scenarios, bugs, checklist items.`,shownOfTotal:(e,t)=>`Showing ${Y(e)} of ${Y(t)}.`,shownOfAtLeast:(e,t)=>`Showing ${Y(e)} of ${Y(t)}+.`,shownUnknown:e=>`Showing ${Y(e)}.`,loadMore:e=>`Load ${Y(e)} more`,loadMoreUnknown:`Load more`,loading:`Loading the next page\u2026`,loadFailed:`Could not load the next page`,retry:`Retry`,unsupported:{title:`These search results are not supported`,body:`The search reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`},collection:{collectionAria:e=>`Found: ${Y(e)}`,roleCarousel:`result track`,roleSlide:`result`,previous:`Previous result`,next:`Next result`,goToSlide:`Result {index} of {total}`}},jobStatus:ud,workflow:vd,scenario:Ed,coverage:sd,runInTab:yd,runStartAgent:Sd,confirmation:Cd,changeSet:id},Id={byCode:{"agent_jobs.dispatch_key_spent":`This confirmation is used up: the exploration it started has finished. Ask for the exploration again.`,"agent_jobs.not_active":`The job has already finished \u2014 there is nothing to stop.`,"agent_jobs.not_found":`Job not found.`,"ai.bedrock_not_configured":`Amazon Bedrock is not configured`,"ai.capabilities.unknown_provider":`Unknown provider.`,"ai.company_not_found":`Company not found.`,"ai.completion_failed":`Progon request failed`,"ai.concurrency_gate_unavailable":`Progon is temporarily unavailable because of a problem on our side. Please try again later.`,"ai.credit_charge_failed":`Credits could not be charged for this request. Please try again or contact support.`,"ai.credit_estimate_invalid":`Credit estimate is invalid.`,"ai.credit_reservation_failed":`Could not reserve credits.`,"ai.credit_reservation_not_found":`Credit reservation not found.`,"ai.credit_reservation_not_open":`This credit reservation is no longer open.`,"ai.credits_insufficient":`Not enough credits`,"ai.element_html_required":`Element HTML is required`,"ai.frozen_model_lane_retired":`Frozen on a model lane the platform no longer operates. Launch it again on a current model.`,"ai.generation_failed":`Progon generation failed`,"ai.messages_required":`Messages are required`,"ai.model_not_allowed":`This model is not allowed`,"ai.model_not_configured":`No model is available for your account. Configure one in settings or contact your administrator.`,"ai.model_output_ceiling_below_thinking_budget":`The model's catalog output ceiling is below its thinking budget \u2014 an administrator must raise the ceiling or lower the budget.`,"ai.model_output_ceiling_missing":`This model has no response ceiling recorded in the catalog, and the provider requires one. Contact your administrator.`,"ai.model_plan_restricted":`Your plan does not allow this model`,"ai.plan_restricted":`Your plan does not allow this action`,"ai.provider_empty_response":`Provider returned an empty response`,"ai.provider_error":`Provider error`,"ai.provider_not_configured":`Provider is not configured`,"ai.reasoning_unsupported":`The model does not control reasoning \u2014 choose \u00ABNormal\u00BB in \u00ABEffort\u00BB and send again.`,"ai.user_company_missing":`User is not associated with a company`,"ai.user_concurrency_exceeded":`Too many requests are running at once. Wait for the current ones to finish and try again.`,"ai.user_credits_limit":`User credit limit reached`,"ai.user_disabled":`Progon is disabled for your account. Contact your administrator.`,"ai.user_model_not_allowed":`This model is not available for your account`,"ai.user_not_found":`User account not found.`,"ai_models.no_sendable_model":`No model is available for this run \u2014 pick one in the top bar or configure a key in settings.`,"ai_models.selection_not_sendable":`This model cannot be selected right now.`,"ai_settings.admin_required":`Admin access required.`,"ai_settings.api_key_missing":`No saved API key found.`,"ai_settings.company_key_required":`Company API key is required for this action.`,"ai_settings.company_not_found":`Company not found.`,"ai_settings.company_provider_required":`A company provider must be configured.`,"ai_settings.enterprise_required_company":`Company keys require an Enterprise plan.`,"ai_settings.enterprise_required_personal":`Personal keys require an Enterprise plan.`,"ai_settings.enterprise_required_user":`User keys require an Enterprise plan.`,"ai_settings.invalid_provider":`Invalid provider selected.`,"ai_settings.model_unavailable":`Selected model is not available for your account.`,"ai_settings.personal_provider_required":`A personal provider must be configured.`,"ai_settings.plan_not_found":`Plan not found.`,"ai_settings.provider_required":`Provider is required.`,"ai_settings.provider_unavailable":`Selected provider is not available.`,"ai_settings.unsupported_personal_provider":`Selected provider is not supported as a personal provider.`,"ai_settings.user_not_found":`User not found.`,"assistant.action_context_missing":`Cannot confirm: the conversation context is missing. Start a new conversation or reload.`,"assistant.conversations.invalid_cursor":`Invalid cursor.`,"assistant.conversations.not_found":`Conversation not found.`,"assistant.recover_last_message":`The previous answer was interrupted. Retry your last message.`,"assistant.search_session.not_found":`Search session not found or expired.`,"auth.company_forbidden":`Access denied to this company`,"auth.forbidden":`Insufficient permissions`,"auth.insufficient_scope":`Required permission scope is not granted.`,"auth.invalid_token":`Invalid or expired token`,"auth.login.company_inactive":`Company not found or deactivated`,"auth.login.email_not_verified":`Please verify your email to sign in`,"auth.login.email_rate_limited":`Too many login attempts for this email. Please try again later.`,"auth.login.invalid_credentials":`Invalid email or password`,"auth.login.missing_credentials":`Email and password are required`,"auth.login.rate_limited":`Too many login attempts. Please try again later.`,"auth.missing_header":`Missing or invalid authorization header`,"auth.refresh.token_required":`Refresh token is required.`,"auth.register.capacity_reached":`We are accepting a limited number of new accounts right now, so sign-ups are temporarily closed. Please try again later, or contact support if you need access sooner.`,"auth.register.capacity_unreadable":`Registration could not be completed because of a server error. Please try again, and contact support if it persists.`,"auth.register.company_required":`Company name is required.`,"auth.register.email_domain_blocked":`This email provider is not accepted for registration. Please sign up with a permanent work or personal address.`,"auth.register.email_invalid":`Invalid email address.`,"auth.register.email_taken":`A user with this email already exists`,"auth.register.invite_code_invalid":`This invite code is not valid. Check the code you entered, or request a new one.`,"auth.register.invite_required":`Registration is currently by invitation only. Use the invitation link you were sent, or contact support to request access.`,"auth.register.name_required":`First and last name are required.`,"auth.register.rate_limited":`Too many registration attempts. Please try again later.`,"auth.required":`Authentication required`,"auth.resend.email_required":`Email is required.`,"auth.resend.rate_limited":`Please wait before requesting another code.`,"auth.session_invalidated":`Your session has been invalidated. Please log in again.`,"auth.session_required":`This action requires session authentication.`,"auth.token_expired":`Your token has expired. Please log in again.`,"auth.token_revoked":`Your token has been revoked. Please log in again.`,"auth.user_unavailable":`User not found or deactivated`,"auth.verify_email.invalid_code":`Invalid verification code`,"auth.verify_email.rate_limited":`Too many verification attempts. Please try again later.`,"auth.verify_email.required":`Email and verification code are required.`,"auth.verify_email.too_many_attempts":`Too many attempts. Please request a new code`,"available_models.missing_disabled_selection_id":`Disabled selection ID is missing.`,"available_models.redis_unavailable":`Model availability service is temporarily unavailable.`,"available_models.unknown_key_source":`Unknown API key source.`,"chat.busy":`The assistant is still answering the previous message. Wait and try again.`,"chat_confirm.display_unresolvable":`The assistant referred to an object that does not exist in this project. Say exactly what to start or stop and try again.`,"chat_confirm.pending_action_stale":`This proposal is stale: it was made before an update and its parameters no longer fit the tool. Ask again and the assistant will prepare a fresh one.`,"client.connection_lost_during_stream":`The answer was cut off. Try again once the connection is back.`,"client.browser_api_action_failed":`Could not finish the browser API request. Check history: the request may have been sent.`,"client.atlas_host_action_failed":`Could not finish starting the exploration in this browser. Check Atlas runs before trying again.`,"client.ai_run_host_action_failed":`Could not finish starting the AI run in this browser. Check its status before trying again.`,"client.workflow_host_action_failed":`Could not connect the swarm in this browser. Open the swarm page and try again.`,"client.permission_mode_changed":`The confirmation mode was changed in another window. Check the switch and send the message again.`,"client.stream_stalled":`No answer for over a minute. Try again \u2014 the part of the answer already received stays above.`,"cmd.accept_timeout":`The server did not take the message in time. Try again.`,"company_models.default_must_be_enabled":`Model must be enabled in the allowlist before it can be set as default.`,"company_models.invalid_model_id":`Model not found.`,"company_models.plan_restricted":`This model requires a higher subscription plan.`,"conversation.project_id_required":`A project ID is required for this conversation.`,disconnected:`Connection lost. Please try again.`,"internal.invalid_token":`Invalid admin token.`,"internal.not_configured":`Internal API is not configured.`,"internal.operation_failed":`Internal operation failed.`,"internal.unexpected":`Unexpected error`,model_not_allowed:`That model isn't available for your plan \u2014 reverted to your default.`,"rate_limit.company_write_exceeded":`Company rate limit exceeded. Please retry later.`,"rate_limit.counter_upsert_failed":`Failed to update rate limit counter.`,"rate_limit.counter_upsert_invalid_count":`Rate limit counter returned an invalid value.`,"rate_limit.exceeded":`Too many requests. Please try again later.`,reconnect_failed:`Unable to reconnect. Please check your network and try again.`,reconnect_timeout:`Connection timed out. Please check your network and try again.`,selection_expired:`Message could not be sent. Please try again.`,"subscription.admin_api_error":`Unable to process request at this time.`,"subscription.admin_api_not_configured":`The upgrade request service is not configured.`,"subscription.admin_api_unavailable":`The upgrade request service is temporarily unavailable. Please try again later.`,"subscription.admin_required":`Admin access required.`,"subscription.company_not_found":`Company not found.`,"subscription.credits_maximum":`Maximum purchase is 100,000 credits.`,"subscription.credits_minimum":`Minimum purchase is 100 credits.`,"subscription.invalid_plan":`Invalid subscription plan.`,"subscription.payments_disabled":`Payment processing is temporarily unavailable. Please use the upgrade request form.`,"subscription.plan_config_missing":`Your subscription plan configuration could not be read, so this action cannot be completed. Please contact support.`,"subscription.plan_not_found":`Subscription plan not found.`,"subscription.request_already_open":`Your company already has an open upgrade request. Please wait for it to be resolved before submitting a new one.`,"subscription.seats_exceed_limit":`Cannot add seats: the maximum allowed for your plan would be exceeded.`,"subscription.seats_invalid":`Invalid seat count. Must be between 1 and 100.`,"subscription.seats_unlimited":`Your plan already includes unlimited seats.`,"ws.conversation_not_found":`Conversation not found.`,"ws.rate_limit_company":`Company connection limit reached. Please try again later.`,"ws.rate_limit_fleet":`Server connection limit reached. Please try again later.`,"ws.rate_limit_user":`Too many connections. Please try again later.`,"ws.run_not_found":`Progon run not found.`,"ws.runner_already_claimed":`Runner is already claimed for this run.`,"ws.runner_not_owner":`Runner claim was lost. Please reconnect.`,"ws.runner_restore_unavailable":`No active runner session to restore.`,"ws.runner_restore_window_expired":`Runner restore window has expired.`,"ws.session_not_found":`Session not found.`,"ws.unauthorized_channel":`Access denied or resource not found.`,"workflows.agents_over_max":`\u00ABMax agents\u00BB was lowered \u2014 \u00ABEffort\u00BB moved to the new maximum, send again.`,"workflows.not_found":`Swarm not found.`,"workflows.not_initiator_or_admin":`Only the person who launched the swarm or a company admin can stop it.`},byProviderCode:{"ai.zai.insufficient_balance":`Z.AI rejected the request \u2014 your account balance is insufficient, or the key and endpoint don't match. Check your Z.AI balance and key.`,"ai.zai.rate_limited":`Z.AI is rate-limiting requests. Please wait a moment and try again.`,"ai.zai.overloaded":`Z.AI is temporarily overloaded. Please wait a moment and try again.`,"ai.zai.quota_exhausted":`Your Z.AI usage quota is exhausted. Check your Z.AI plan limits.`,"ai.zai.plan_restricted":`This Z.AI key is restricted to a specific subscription or plan. Check your Z.AI plan.`,"ai.zai.content_policy":`Z.AI declined this request due to its content policy.`,"ai.zai.unknown_model":`The selected Z.AI model is not recognized. Pick a different GLM model.`,"ai.zai.auth_failed":`Z.AI authentication failed. Check that your API key is valid and active.`,"ai.zai.invalid_request":`Z.AI rejected the request as invalid. Check your input and try again.`,"ai.zai.context_overflow":`The conversation is too long for this Z.AI model. Start a new conversation or shorten your input.`,"ai.zai.vision_not_supported":`This Z.AI model does not support image input. Remove images or pick a vision-capable model.`,"ai.zai.abnormal_termination":`The Z.AI response ended unexpectedly. Please try again.`,"ai.zai.provider_error":`Z.AI returned an error. Please try again.`}},Ld=e=>J(e,{one:`message`,other:`messages`}),Rd=e=>J(e,{one:`agent`,other:`agents`}),zd={cards:Fd,shell:{header:{title:`Progon`,history:`History`,newConversation:`New conversation`,noProject:`No project selected`},composer:{inputLabel:`Message to the assistant`,placeholder:`Ask Progon\u2026`,placeholderNoModels:`Sending is unavailable until the model list loads`,placeholderSignIn:`Sign in in the extension first`,placeholderNoProject:`Select a project first`,placeholderOffline:`No connection \u2014 sending is unavailable`,send:`Send`,stop:`Stop the answer`,placeholderWithFiles:`Write what to do with the files\u2026`,sendBlocked:{uploading:`Wait for the files to upload`,refused:`Remove the files that cannot be sent`,noText:`Write a message for the files`},settingsLabel:`Answer settings`,effort:{name:`Effort`,note:`The assistant's answers and its launches`,levels:{normal:`Normal`,thinking:`Thinking`,max:`Max`},rows:{normal:`Normal answers, launches by one agent`,thinking:`The assistant and the agent think deeper`,max:`Deeper, and launches by a swarm of agents`},footer:`Holds until the end of the conversation. A new conversation starts on \u00ABNormal\u00BB.`,chipMax:e=>`Max \u00B7 ${e} ${Rd(e)}`,chipMaxShort:e=>`Max \u00B7 ${e}`,long:{normal:`Normal \u00B7 one agent`,thinking:`Thinking \u00B7 one agent`,max:e=>`Max \u00B7 ${e} ${Rd(e)}`},chipLabel:e=>`Effort: ${e}`,reasonPlace:`Needs a browser: \u00ABMaximum\u00BB is the agents' windows`,agents:{label:`Agents`,limit:e=>`No more than ${e} \u2014`,settingsLink:`\u00ABSettings \u2192 AI \u2192 Agent swarm\u00BB`,groupLabel:`Number of agents`,fewer:`Fewer agents`,more:`More agents`}},permission:{groupLabel:`Action confirmations`,menuNote:`For this conversation`,chipLabel:e=>`Confirmations: ${e}`,ask:`Ask`,bypass:`No confirmations`,askHint:`Launches and irreversible edits wait for your confirmation.`,bypassHint:`Launches and edits run at once. Deletions still wait for confirmation.`,arrived:e=>`Confirmations: ${e}`},place:{name:`Where to work`,note:`For every launch from the message`,title:`Where the AI works in a browser: this browser, a runner or no browser`,chipLabel:e=>`Where to work: ${e}`,thisBrowser:`This browser`,thisBrowserRowOpensWindows:`Windows open in the background of this Chrome`,thisBrowserRowTasksOnly:`In the web chat \u2014 tasks only; runs and crawls go through a runner or the side panel`,none:`No browser`,noneRow:`API requests and server-side scenarios only`,runner:e=>`Runner ${e}`,runnerUnread:`Runner`,runnerGone:`Runner unavailable`,runnerGoneHint:`The chosen runner was deleted or is no longer available to you. Pick where to work.`,runnerFree:`Free`,runnerBusy:`Busy \u2014 the launch will queue`,runnerBlocked:{notOwner:`Only its owner can launch`,notEnrolled:`Not connected yet`,offline:`Offline`},fleetLoading:`Loading runners\u2026`,fleetFailed:`Could not load runners`,fleetRetry:`Retry`,fleetEmpty:`Your company has no runners`,othersGroup:e=>`Other people's runners (${e})`},hint:`Enter to send, Shift+Enter for a new line`,plainHint:`Enter to send`,attachments:{attach:`Attach a file`,trayLabel:`Files of the message`,remove:e=>`Remove the file \u00AB${e}\u00BB`,uploading:e=>`Uploading ${e}%`,uploadingLabel:e=>`Uploading ${e}`,pastedName:e=>`Screenshot ${e}`,drop:{title:`Drop to attach`,types:`PNG, JPEG, WebP, PDF, TXT, MD`,sizes:`Images and PDF up to 50 MB, text up to 4 MB`},retry:`Retry`,reupload:`Upload again`,pickModel:`switch to another`,refusal:{type:`This file cannot be attached: PNG, JPEG, WebP, PDF, TXT, MD are supported`,tooLarge:e=>`File too large: ${e}`,limit:{image:`an image \u2014 up to 50 MB`,pdf:`PDF \u2014 up to 50 MB`,text:`text \u2014 up to 4 MB`},fileName:`The file name is longer than 255 characters \u2014 rename the file and attach it again`,empty:`The file is empty`,textNotUtf8:`The text is not UTF-8 \u2014 save the file as UTF-8 and attach it again`,unreadable:`The file cannot be read \u2014 it may be damaged`,contentMismatch:e=>`The content does not look like ${e} \u2014 attach the real file`,pdfEncrypted:`The PDF is password-protected \u2014 remove the password and attach it again`,server:`The server did not accept the file`,failedNetwork:`Not uploaded: the connection was interrupted`,failedServer:`Not uploaded: the server did not answer`,expired:`An unsent file is kept for a day \u2014 this one is already deleted`,modelNoFiles:e=>`${e} does not take files \u2014 `,modelNoType:(e,t)=>`${e} does not take ${t} \u2014 `,modelFact:(e,t)=>`${e} does not take this file: ${t} \u2014 `},announce:{uploaded:e=>`The file \u00AB${e}\u00BB is uploaded`,refused:(e,t)=>`The file \u00AB${e}\u00BB cannot be sent: ${t}`}}},transcript:{copyAnswer:{label:`Copy answer`,done:`Answer copied`,failed:`Could not copy the answer`},activity:{done:e=>`Completed ${e} ${J(e,{one:`action`,other:`actions`})}`,doneOf:(e,t)=>`Completed ${e} of ${t} ${J(t,{one:`action`,other:`actions`})}`,doneShort:e=>`${e} done`,failedShort:e=>`${e} failed`,running:e=>`Running: ${e}`,failed:`failed`,unknown:`outcome unknown`},feedLabel:`Conversation feed`,scrollToBottom:`Scroll to bottom`,olderHistory:{loading:`Loading earlier messages\u2026`,failed:`Could not load earlier messages`,retry:`Retry`},leadByline:`Swarm lead`,taskLeadByline:`Lead`,retry:`Retry`,thinking:`Thinking\u2026`,thoughtFor:e=>`Thought for ${e}s`,thinkingPhase:`Thinking\u2026`,toolCall:`Tool call`,toolCallCancelled:`Tool call cancelled`,toolCallStatus:{confirmed:`Action completed`,waitingForBrowser:`Waiting for the browser action`,stoppingBrowser:`Stopping the browser action\u2026`,failed:`Action failed`,rejected:`Rejected`,rejectedLeadGrant:`Not allowed \u2014 goes to the report \u00B7 you`,closed:`Closed: the launch stopped`,unknown:`Action outcome unknown`,launchedElsewhere:`Started in a new conversation`,openConversation:`Open the conversation`},unknownTool:{title:`Result not supported`,body:`This version cannot show the result of this action. Reload the page or update the extension.`},stopFailed:{rejected:`Could not stop the answer \u2014 the server did not accept the command. Try again.`,ack_timeout:`Could not stop the answer \u2014 the server did not respond. Try again.`,not_open:`Could not stop the answer \u2014 the connection is not open yet. Try again.`,connection_closed:`Could not stop the answer \u2014 the connection dropped. Try again.`},details:`Details`,cardsFailed:{title:`Could not show the cards of this answer.`,text:`The answer text above is intact.`,retry:`Show again`}},empty:{heading:`How can I help?`,subtext:`Ask about your testing or hand over a task`,footnote:`A click puts a task draft into the field \u2014 adjust it and send`,reportHeading:`Ask about this report`},errors:{classes:{rateLimit:{title:`Too many requests`,hint:`Wait a moment and try again`},credits:{title:`Limit reached`,hint:`Check your plan or limits in settings`},auth:{title:`Provider authorization failed`,hint:`Check the API key in settings`},connection:{title:`Provider unavailable`,hint:`Check the settings and try again`},stalled:{title:`The assistant stopped responding`,hint:null},streamCut:{title:`Connection lost`,hint:null},generic:{title:`Progon assistant error`,hint:`Please try again`}}},notices:{dismiss:`Dismiss notice`,capabilities:{title:`Model list unavailable`,sendBlocked:`Messages cannot be sent until the model list loads again.`,timedOut:`The model list did not load in time.`,loadFailed:`Could not load the model list.`,retry:`Load the model list`},permissionReadFailed:{title:`Could not load the confirmation mode`,text:`A new conversation cannot start without it. Load it again.`,retry:`Retry`},permissionWriteFailed:{title:e=>`Could not switch to \u201C${e}\u201D`,textConversation:e=>`The conversation stayed in \u201C${e}\u201D mode.`,textNewConversation:e=>`A new conversation will start in \u201C${e}\u201D mode.`,retry:`Retry`},unsent:{title:e=>`Not sent: ${e} ${Ld(e)}`,textWaiting:`The model list could not be read, so the messages stayed here. Send them once the list loads.`,textReady:`The model list could not be read, so the messages stayed here. The list is loaded again \u2014 send or delete them.`,textFailed:`These messages did not reach the assistant. Send them again or delete them.`,textReconnect:`The messages will be sent once the connection is back.`,listLabel:`Unsent messages`,send:e=>`Send: ${e}`,discard:e=>`Delete: ${e}`,sendShort:`Send`,discardShort:`Delete`},interrupted:{title:`The previous request was interrupted`,text:`The answer to the last message did not arrive.`,retry:`Retry`},reportInitializing:{title:`The report is still being prepared`,text:`The data will appear after the first calculation. Try again a little later.`,retry:`Check again`},readiness:{signInTitle:`Sign in to use the assistant`,signInText:`Open the extension popup and sign in to Progon.`,projectTitle:`Select a project`,projectText:`The assistant works with the data of the selected project.`},pageScan:{scanning:`Scanning page\u2026`,delivering:`Sending scan results\u2026`,failedTitle:`This page cannot be scanned`,failed:{no_capturable_tab:`Restricted or unsupported address (chrome://, extension store, PDF).`,capture_failed:`Page scan failed. Please try again.`,capture_timeout:`Page scan timed out. Please try again.`,oversize_unrecoverable:`This page is too large to scan, even after reducing detail.`}},history:{loadFailed:`Could not load the conversation.`,retry:`Retry`}},connection:{reconnecting:`Connection lost \u2014 reconnecting\u2026`,restored:`Connection restored \u2014 events synchronized.`,failedTitle:`Connection failed`,failedHint:{"reload-page":`Reload the page to reconnect.`,"check-network":`Could not connect. Check your network.`}},history:{title:`Chat history`,close:`Close history`,newChat:`New chat`,search:`Search conversations\u2026`,searchLabel:`Search conversations`,emptyTitle:`No conversations yet`,emptyText:`Start a new chat.`,noResults:e=>`No results for \u201C${e}\u201D`,noResultsText:`Try a different search term`,errorTitle:`Failed to load conversations`,errorText:`Check your connection and try again.`,retry:`Retry`,loadingMore:`Loading\u2026`,untitled:e=>`Conversation of ${e}`,delete:e=>`Delete conversation \u201C${e}\u201D`,deleteFailed:`Could not delete the conversation. Try again.`,reportTag:`Report`,groups:{today:`Today`,yesterday:`Yesterday`,previous7Days:`Previous 7 days`,previous30Days:`Previous 30 days`,older:`Older`}},modelPicker:{selectModel:`Select model`,loading:`Loading models\u2026`,currentlySelected:`Currently selected`,footerNote:`Choice applies to your next message.`,manageKeys:`Manage keys`,upsell:`Bring your own key on Enterprise`,upgrade:`Upgrade`,rejected:`That model isn't available for your plan \u2014 reverted to your default.`,disabledKeyInvalid:`Key invalid \u2014 update it in Settings`,disabledNoKey:`No personal key configured`,disabledSuffixA11y:`unavailable`,tier:{fastest:`Fastest`,balanced:`For everyday tasks`,smartest:`Smartest`},byok:{personal:`Your key`,company:`Company key`},byokHeader:{personal:`Your key`,company:`Company key`}},confirmation:{regionLabel:`Action required`,confirmAll:e=>`Confirm all (${e})`,confirm:`Confirm`,reject:`Reject`,queuePosition:`Action {index} of {total}`,warningBadge:`Needs attention`,grant:{no:`No, report only`,yes:`Allow in this run`},unrecognizedTool:`Unrecognized action`},runWait:{title:`Waiting for executions`,status:{waiting:`Waiting for completion`,fired:`Executions finished`,running:`Reviewing results`,done:`Review complete`,cancelled:`Wait cancelled`},subject:{scenario_run:`Scenario run`,agent_job:`Agent job`,atlas_run:`Atlas crawl`,ai_run:`AI run`,workflow:`Swarm`},id:e=>`ID: ${e}`,stopWaiting:`Stop waiting`,stopWaitingFailed:`Could not cancel the wait. Try again.`},questions:{pendingTitle:`Clarification needed`,progress:`Answered: {resolved} of {total}`,progressLabel:`Questions`,progressSegmentAnswered:`Question {index}: answered`,progressSegmentUnanswered:`Question {index}: unanswered`,progressSegmentSkipped:`Question {index}: skipped`,questionIndex:`Question {index} of {total}`,previousQuestion:`Back`,nextQuestion:`Next`,showAllQuestions:`Show all questions`,oneQuestionAtATime:`One question at a time`,recommended:`Recommended`,customChoice:`Other`,customAnswerLabel:`Your answer`,customAnswerPlaceholder:`Enter another option\u2026`,textAnswerLabel:`Answer`,textAnswerPlaceholder:`Enter your answer\u2026`,skipQuestion:`Skip`,restoreQuestion:`Answer`,validationSingle:`Choose one option.`,validationMultiple:`Choose at least one option.`,validationText:`Enter an answer.`,cancelAll:`Cancel all`,submitAnswers:`Send`,sending:`Sending`,loading:`Loading questions`,retry:`Retry`,refresh:`Refresh`,retryErrorBadge:`Not sent`,nonretryableBadge:`Page unavailable`,nonretryableDescription:`Open this conversation in a secure context (HTTPS) to continue.`,staleBadge:`Already resolved`,unauthorizedBadge:`No access`,unauthorizedDescription:`Sign in again or return to the project where this conversation started.`,unavailableBadge:`Unavailable`,answeredTitle:`Clarification`,answeredBadge:`Answered`,continuationPendingBadge:`Queued`,continuationRunningBadge:`Continuing`,continuationFailedBadge:`Could not continue`,skippedBadge:`Skipped`,skippedAnswer:`Skipped`,cancelledTitle:`Clarification`,cancelledBadge:`Cancelled`,supersededTitle:`Clarification`,supersededBadge:`Replaced`,answerSeparator:`, `,unavailableAnswer:`Answer unavailable`,arrived:e=>`New question, the answer card is above the input: ${e}`},agentQuestions:{openRun:`Open run`,assumptionLabel:`Until you answer, the agent goes on like this`,decline:`Don\u2019t answer`,viaAssistant:`Passed on by the assistant from your words`,askerEnded:`The agent finished its work, no answer is needed`,leadWaits:`lead is waiting`,workersContinue:`Workers keep going`,agentsIdle:`No agents are working now`},context:{report:{label:`Report context`,title:e=>`Report: ${e}`,note:`The assistant sees this report and reads its figures from the same data as the page.`,nameUnavailable:`name unavailable`,entity:{scenario:`selected scenario`,page:`selected page`,feature:`selected feature`},view:{overview:`Overview`,stability:`Stability`,"weak-spots":`Weak spots`,"bug-hotspots":`Bug hotspots`},window:{"7d":`7 days`,"14d":`14 days`,"30d":`30 days`,"90d":`90 days`},lastRuns:(e,t)=>`last ${e} runs (up to ${t} days)`,status:{consistently_failing:`consistently failing`,flaky:`flaky`,monitoring:`monitoring`,insufficient_history:`little history`,stable:`stable`},prompts:{overviewWeakSpots:`What are this project\u2019s weak spots?`,overviewChanged:e=>`What changed over the last ${e}?`,overviewWhereToLook:`Where should I look first?`,stabilityWhyScenario:e=>`Why is \u201C${e}\u201D unstable?`,stabilityWhatToFix:`Which scenarios should I fix first?`,stabilityCauses:`Break the failures down by cause`,weakSpotsWhatToCover:`What should I cover with tests first?`,weakSpotsWhyEntity:e=>`Why is \u201C${e}\u201D a weak spot?`,bugHotspotsWhere:`Where do bugs pile up?`,bugHotspotsStale:`Which pages with bugs have not been checked in a while?`}}}},errors:Id,attachments:Qu},Bd=e=>q(e,{one:`\u0444\u0430\u0439\u043B`,few:`\u0444\u0430\u0439\u043B\u0430`,many:`\u0444\u0430\u0439\u043B\u043E\u0432`}),Vd={units:{b:`\u0411`,kb:`\u041A\u0411`,mb:`\u041C\u0411`},facts:{pdf:(e,t)=>`${e} \u0441\u0442\u0440., ${t}`,image:(e,t,n)=>`${e}\u00D7${t}, ${n}`,text:e=>e},typeLabel:{"image/png":`PNG`,"image/jpeg":`JPEG`,"image/webp":`WebP`,"application/pdf":`PDF`,"text/plain":`TXT`,"text/markdown":`MD`},message:{listLabel:`\u0424\u0430\u0439\u043B\u044B \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,view:e=>`\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u00AB${e}\u00BB`,open:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u00AB${e}\u00BB \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435`,thumbnailLoading:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u0438\u043D\u0438\u0430\u0442\u044E\u0440\u044B \u00AB${e}\u00BB`,thumbnailFailed:`\u041C\u0438\u043D\u0438\u0430\u0442\u044E\u0440\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C`,openFailed:`\u041D\u0435 \u043E\u0442\u043A\u0440\u044B\u043B\u043E\u0441\u044C.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},viewer:{label:e=>`\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440: ${e}`,openInTab:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435`,close:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430`,position:(e,t)=>`${e} \u0438\u0437 ${t}`,loading:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u00AB${e}\u00BB`,failed:`\u041A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C`},conversation:{text:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u044D\u0442\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u044B (${t}) \u2014 `,pick:`\u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C`},unsent:{files:e=>`${e} ${Bd(e)}`,unsupported:(e,t)=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B: ${t} \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,noFiles:e=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,types:(e,t)=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 ${t} \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,reason:{fileBytes:e=>`\u0444\u0430\u0439\u043B \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,imageBytes:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,requestBytes:e=>`\u0437\u0430\u043F\u0440\u043E\u0441 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,filesBytes:e=>`\u0444\u0430\u0439\u043B\u044B \u0432\u043C\u0435\u0441\u0442\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,imageEdge:e=>`\u0441\u0442\u043E\u0440\u043E\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} px`,imagePatches:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u043C\u043B\u043D \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439`,pdfPages:e=>`\u0432 PDF \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,imagesCount:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,manyImagesEdge:e=>`\u043F\u0440\u0438 \u043C\u043D\u043E\u0433\u0438\u0445 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430\u0445 \u0441\u0442\u043E\u0440\u043E\u043D\u0430 \u043A\u0430\u0436\u0434\u043E\u0439 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} px`,contextWindow:`\u0444\u0430\u0439\u043B\u044B \u043D\u0435 \u043F\u043E\u043C\u0435\u0449\u0430\u044E\u0442\u0441\u044F \u0432 \u043E\u043A\u043D\u043E \u043C\u043E\u0434\u0435\u043B\u0438`,unknownSize:`\u0444\u0430\u0439\u043B\u044B \u0431\u043E\u043B\u044C\u0448\u0435, \u0447\u0435\u043C \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u044C`},notFound:`\u0424\u0430\u0439\u043B\u044B \u044D\u0442\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B: \u043D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0441\u0443\u0442\u043A\u0438. \u0423\u0434\u0430\u043B\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0437\u0430\u043D\u043E\u0432\u043E.`,alreadySent:`\u042D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B \u0443\u0436\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B \u0441 \u0434\u0440\u0443\u0433\u0438\u043C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435\u043C. \u0423\u0434\u0430\u043B\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0437\u0430\u043D\u043E\u0432\u043E.`}},Hd=new Intl.NumberFormat(`ru`),Ud=e=>Hd.format(e),Wd=e=>q(e,{one:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435`,few:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,many:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439`}),Gd={inspecting:`\u0418\u0437\u0443\u0447\u0435\u043D\u0438\u0435`,proposed:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u043E`,awaiting:`\u0416\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,applying:`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F`,applied:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,rejected:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,partial:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E`,failed:`\u041D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,undone:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,superseded:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E`},Kd={step:`\u0428\u0430\u0433\u0438`,scenario_run:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,api_folder:`\u041F\u0430\u043F\u043A\u0438`,api_saved_request:`\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u044B`,checklist_item:`\u041F\u0443\u043D\u043A\u0442\u044B \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,checklist_item_step:`\u0428\u0430\u0433\u0438 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`,test_run_result:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u0440\u043E\u0433\u043E\u043D\u0430`},qd=(e,t,n)=>r=>`${Ud(r)} ${q(r,{one:e,few:t,many:n})}`,Jd=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} \u0438 ${e.slice(-1).join(``)}`,Yd={title:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,cardAria:e=>`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F: ${e.toLocaleLowerCase(`ru`)}`,phaseAnnouncement:e=>`\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439: ${e.toLocaleLowerCase(`ru`)}`,contextScenario:e=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u00AB${e}\u00BB`,contextProject:e=>`\u041F\u0440\u043E\u0435\u043A\u0442 \u00AB${e}\u00BB`,contextObject:e=>`\u00AB${e}\u00BB`,marker:Gd,earlyTitle:{searching:`\u0418\u0449\u0443 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439\u2026`,search_results_shown:`\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439`,no_results:`\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E`,item_selected:`\u0426\u0435\u043B\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u0430`,inspecting:`\u0418\u0437\u0443\u0447\u0430\u044E \u0434\u0435\u0442\u0430\u043B\u0438\u2026`,ambiguity_choose_target:`\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0446\u0435\u043B\u044C`},preparing:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0433\u043E\u0442\u043E\u0432\u0438\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435\u2026`,changesCount:e=>`${Ud(e)} ${Wd(e)}`,noResults:`\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.`,chooseTargetHint:`\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435, \u043A\u0430\u043A\u0443\u044E \u0446\u0435\u043B\u044C \u0438\u043C\u0435\u043B\u043E\u0441\u044C \u0432 \u0432\u0438\u0434\u0443:`,selected:`\u0412\u044B\u0431\u0440\u0430\u043D\u043E`,nothingChanged:`\u041D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E.`,evidenceHeading:`\u0414\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430`,entityLabelMissing:`\u043C\u0435\u0442\u043A\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C: ${e}`,searchingAria:`\u0418\u0434\u0451\u0442 \u043F\u043E\u0438\u0441\u043A`,whatChanges:`\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F`,proposalEmpty:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442.`,secretChip:`\u0441\u0435\u043A\u0440\u0435\u0442`,evidence:`\u041E\u0431\u043E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435`,cascadeTitle:`\u0422\u0430\u043A\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u043E`,cascadeEntity:Kd,cascadeUnknown:e=>`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435 \u043E\u0431\u044A\u0435\u043A\u0442\u044B (${e})`,cascadeCount:{step:qd(`\u0448\u0430\u0433`,`\u0448\u0430\u0433\u0430`,`\u0448\u0430\u0433\u043E\u0432`),scenario_run:qd(`\u043F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,`\u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`),api_folder:qd(`\u043F\u0430\u043F\u043A\u0430`,`\u043F\u0430\u043F\u043A\u0438`,`\u043F\u0430\u043F\u043E\u043A`),api_saved_request:qd(`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u043E\u0441`,`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u0430`,`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432`),checklist_item:qd(`\u043F\u0443\u043D\u043A\u0442 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,`\u043F\u0443\u043D\u043A\u0442\u0430 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,`\u043F\u0443\u043D\u043A\u0442\u043E\u0432 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`),checklist_item_step:qd(`\u0448\u0430\u0433 \u043F\u0443\u043D\u043A\u0442\u0430`,`\u0448\u0430\u0433\u0430 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`,`\u0448\u0430\u0433\u043E\u0432 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`),test_run_result:qd(`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`)},cascadeCountUnknown:(e,t)=>`${e}: ${Ud(t)}`,dock:{factScenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,factProject:`\u041F\u0440\u043E\u0435\u043A\u0442`,factObject:`\u0427\u0442\u043E`,factWithIt:`\u0412\u043C\u0435\u0441\u0442\u0435 \u0441 \u044D\u0442\u0438\u043C`,factEdits:`\u041F\u0440\u0430\u0432\u043E\u043A`,recordWithIt:e=>`\u0432\u043C\u0435\u0441\u0442\u0435 \u0441 \u044D\u0442\u0438\u043C ${e}`,editsCount:qd(`\u043F\u0440\u0430\u0432\u043A\u0430`,`\u043F\u0440\u0430\u0432\u043A\u0438`,`\u043F\u0440\u0430\u0432\u043E\u043A`),showInFeed:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u043B\u0435\u043D\u0442\u0435`,showInFeedAria:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u043B\u0435\u043D\u0442\u0435: ${e}`,blockedUnworded:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043F\u043E\u043A\u0430 \u043D\u0435\u043B\u044C\u0437\u044F \u2014 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u0432 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u043B\u0435\u043D\u0442\u0435`,decided:{confirmDelete:`\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E`,confirm:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u044B`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`},secretSaved:(e,t)=>t===null?`${Jd(e)} ${e.length===1?`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D`:`\u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B`}`:`${Jd(e)} ${e.length===1?`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D`:`\u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B`} \u0432 ${t}`},secretInput:{titleTail:` \u2014 \u0441\u0435\u043A\u0440\u0435\u0442 \u0434\u043B\u044F \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,countTitle:qd(`\u0441\u0435\u043A\u0440\u0435\u0442`,`\u0441\u0435\u043A\u0440\u0435\u0442\u0430`,`\u0441\u0435\u043A\u0440\u0435\u0442\u043E\u0432`),countTitleTail:` \u0434\u043B\u044F \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,placeholder:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u0435\u043A\u0440\u0435\u0442\u0430`,fieldLabel:e=>`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ${e}`,fieldLabelReplace:e=>`\u041D\u043E\u0432\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ${e}`,show:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,hide:`\u0421\u043A\u0440\u044B\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,save:`\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C`,saveMany:e=>`\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C ${Ud(e)} ${q(e,{one:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,few:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F`,many:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439`})}`,saving:`\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u044E`,replace:`\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C`,replacing:`\u0417\u0430\u043C\u0435\u043D\u044F\u044E`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,privacy:`\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u0447\u0430\u0442 \u043D\u0435 \u0443\u0432\u0438\u0434\u044F\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,tooLong:(e,t)=>`\u041D\u0435 \u0434\u043B\u0438\u043D\u043D\u0435\u0435 ${Ud(e)} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u2014 \u0441\u0435\u0439\u0447\u0430\u0441 ${Ud(t)}`,failed:{network:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u043D\u0435\u0442 \u0441\u0432\u044F\u0437\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C.`,server:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B.`,refused:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0442\u043A\u0430\u0437\u0430\u043B.`},closed:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,confirmFailed:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u0440\u0438\u043D\u044F\u0442\u043E, \u043D\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C. \u00AB\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C\u00BB \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442 \u0435\u0433\u043E \u0437\u0430\u043D\u043E\u0432\u043E.`,current:`\u0421\u0435\u0439\u0447\u0430\u0441`,currentAria:`\u0422\u0435\u043A\u0443\u0449\u0435\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043A\u0440\u044B\u0442\u043E, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,willReplace:`\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u0441\u044F`,whyName:`\u041F\u043E\u0447\u0435\u043C\u0443 \u0436\u0434\u0451\u0442 \u0432\u0430\u0441`,whyText:e=>`\u0423 ${e} \u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u043D\u043E\u0432\u043E\u0435 \u0437\u0430\u043C\u0435\u043D\u0438\u0442 \u0435\u0433\u043E. \u0417\u0430\u043C\u0435\u043D\u0443 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0432\u044B, \u0434\u0430\u0436\u0435 \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB\u0431\u0435\u0437 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F\u00BB.`,hiddenAria:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043A\u0440\u044B\u0442\u043E`,savedIn:e=>`\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E \u0432 ${e}`,saved:`\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,declined:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E \u2014 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,reenter:`\u0412\u0432\u0435\u0441\u0442\u0438 \u0437\u0430\u043D\u043E\u0432\u043E`,reenterAria:e=>`\u0412\u0432\u0435\u0441\u0442\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ${e} \u0437\u0430\u043D\u043E\u0432\u043E`,setByYou:e=>`\u0437\u0430\u0434\u0430\u043D\u043E \u0432\u0430\u043C\u0438 \u0432 ${e}`,setAt:e=>`\u0437\u0430\u0434\u0430\u043D\u043E \u0432 ${e}`,notSet:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0437\u0430\u0434\u0430\u043D\u043E`,savingAnnouncement:`\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u044E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`},killSwitch:{title:`\u0417\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,body:`\u0410\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u043C\u043E\u0436\u0435\u0442 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0435\u0451 \u0432 \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0418\u0418. \u041F\u043B\u0430\u043D \u043C\u043E\u0436\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C, \u043D\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F.`},disabledReason:{still_composing:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u2014 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F.`,awaiting_secret_value:`\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u0435\u043A\u0440\u0435\u0442\u0430 \u2014 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0435\u0433\u043E \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435 \u043D\u0430\u0434 \u043F\u043E\u043B\u0435\u043C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.`},confirm:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,confirmDelete:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,bugFiling:{title:`\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433?`,confirm:`\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433`,capture:{ready:`\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442`,awaiting:`\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442 \u0435\u0449\u0451 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F`,unavailable:`\u0411\u0435\u0437 \u0441\u043A\u0440\u0438\u043D\u0448\u043E\u0442\u0430`,no_screen:`\u0417\u0430\u043F\u0440\u043E\u0441 \u0438 \u043E\u0442\u0432\u0435\u0442, \u0441\u043D\u0438\u043C\u043A\u0430 \u044D\u043A\u0440\u0430\u043D\u0430 \u043D\u0435 \u0431\u044B\u0432\u0430\u0435\u0442`},address:e=>`\u0430\u0434\u0440\u0435\u0441 ${e}`,severity:e=>`\u0421\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0441\u0442\u044C: ${e}`,factFinding:`\u041D\u0430\u0445\u043E\u0434\u043A\u0430`,factSeverity:`\u0421\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0441\u0442\u044C`,factWithIt:`\u0421 \u043D\u0435\u0439`,severityWord:{critical:`\u043A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F`,high:`\u0432\u044B\u0441\u043E\u043A\u0430\u044F`,medium:`\u0441\u0440\u0435\u0434\u043D\u044F\u044F`,low:`\u043D\u0438\u0437\u043A\u0430\u044F`}},closedBy:{line:{launch_stopped:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`,finding_filed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0432\u044B \u0437\u0430\u0432\u0435\u043B\u0438 \u044D\u0442\u043E\u0442 \u0431\u0430\u0433 \u0441\u0430\u043C\u0438`},launchStoppedNote:`\u041E\u0442\u0432\u0435\u0442 \u0443\u0436\u0435 \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442`,findingFiledNote:(e,t)=>`\u0411\u0430\u0433 #${String(e)} \u0438\u0437 \u044D\u0442\u043E\u0439 \u043D\u0430\u0445\u043E\u0434\u043A\u0438 \u0437\u0430\u0432\u0435\u043B\u0438 \u0432\u044B \u0432 ${t} \u2014 \u043E\u0442\u0432\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043D\u0443\u0436\u0435\u043D`},rejectPlain:`\u041F\u0440\u043E\u0441\u0442\u043E \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,rejectWithReason:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0441 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u043C`,reasonLabel:`\u041F\u043E\u0447\u0435\u043C\u0443?`,reasonHint:`(\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u2014 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0443 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0438\u0442\u044C \u043B\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442)`,commandFailed:{confirm:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,reject:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,retry:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},applyingSubject:e=>`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F ${Ud(e)} ${Wd(e)}`,applyingGeneric:`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u043C\u2026`,applyDuration:e=>`\u0412\u0440\u0435\u043C\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F: ${Ud(e)} \u043C\u0441`,applyAria:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F`,applyDisclaimer:`\u041D\u0435 \u0441\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u043C \u0434\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0443\u0439\u0442\u0438 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u0441\u044F \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0435.`,attempt:e=>`\u043F\u043E\u043F\u044B\u0442\u043A\u0430 ${Ud(e)}`,verified:`\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C`,appliedGroup:e=>`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E (${Ud(e)})`,failedGroup:e=>`\u041E\u0448\u0438\u0431\u043A\u0438 \u0438\u043B\u0438 \u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u043A\u0438 (${Ud(e)})`,row:{applied:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C`,batch_aborted:`\u041E\u0442\u043A\u0430\u0447\u0435\u043D\u043E`,pending:`\u041D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,skipped:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`},applyError:{stale_guard:`\u041E\u0431\u044A\u0435\u043A\u0442 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u0442\u043E\u0433\u043E, \u043A\u0430\u043A \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u043B\u043E \u0441\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E.`,secret_expired_or_consumed:`\u0421\u0435\u043A\u0440\u0435\u0442\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E \u0438\u043B\u0438 \u0441\u0440\u043E\u043A \u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0438\u0441\u0442\u0451\u043A.`,"assistant.change_set.batch_aborted":`\u041E\u0442\u043A\u0430\u0447\u0435\u043D\u043E: \u0434\u0440\u0443\u0433\u043E\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u044D\u0442\u043E\u0433\u043E \u0436\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043B\u0441\u044F.`,"assistant.change_set.apply_unexpected_error":`\u041D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u0438.`,"assistant.ai_write_disabled":`\u0417\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,"variables.duplicate_name":`\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.`},whatNext:`\u0427\u0442\u043E \u0434\u0435\u043B\u0430\u0442\u044C \u0434\u0430\u043B\u044C\u0448\u0435: \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u0435\u0443\u0434\u0430\u0432\u0448\u0438\u0435\u0441\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441.`,applyMissing:`\u0421\u0432\u043E\u0434\u043A\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u043D\u0438\u043C\u043A\u0435.`,retryRemaining:e=>`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044F (${Ud(e)})`,revise:`\u041F\u0435\u0440\u0435\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441`,reviseDraftScenario:e=>`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0438 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u00AB${e}\u00BB`,reviseDraftProject:e=>`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0438 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432 \u043F\u0440\u043E\u0435\u043A\u0442\u0435 \u00AB${e}\u00BB`,rejectedTitle:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435 \u0441\u0434\u0435\u043B\u0430\u043D\u043E.`,rejectedLead:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u043B\u043E \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E \u0434\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u0414\u0430\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C.`,undoneTitle:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u044B`,undoneLead:`\u041F\u0440\u0438\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u044B \u043A \u043F\u0440\u0435\u0436\u043D\u0435\u043C\u0443 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044E.`,superseded:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E \u0431\u043E\u043B\u0435\u0435 \u043D\u043E\u0432\u044B\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C.`,unknownState:`\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0434\u0430\u043D\u043D\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439`,undo:{action:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,until:e=>`\u041C\u043E\u0436\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0434\u043E ${e}`,busy:`\u041E\u0442\u043C\u0435\u043D\u044F\u0435\u043C\u2026`,blocked:{stale:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0434\u0430\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F.`,expired:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u043E\u043A\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,kill_switch:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0437\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},unavailable:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.`,error:{"change_sets.undo_stale":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0434\u0430\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F.`,"change_sets.undo_expired":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u043E\u043A\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,"change_sets.undo_not_eligible":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.`,"assistant.ai_write_disabled":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0437\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,unknown:`\u0421\u0442\u0430\u0442\u0443\u0441 \u043E\u0442\u043C\u0435\u043D\u044B \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D \u2014 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443.`,sideEffectsTitle:`\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438:`,sideEffect:{test_plan_assignment_advance:`\u041F\u0440\u043E\u0434\u0432\u0438\u0436\u0435\u043D\u0438\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0432 \u0442\u0435\u0441\u0442-\u043F\u043B\u0430\u043D\u0435`}},loadingAria:`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438`,loadError:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438.`,loadErrorText:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043D\u0435 \u0437\u0430\u0442\u0440\u043E\u043D\u0443\u0442\u044B.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,unavailable:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,unavailableText:`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u044D\u0442\u043E\u043C\u0443 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044E \u0438\u043B\u0438 \u043E\u043D\u043E \u0443\u0434\u0430\u043B\u0435\u043D\u043E.`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},turn:{title:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,awaiting:e=>`${q(e,{one:`\u0436\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,few:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,many:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`})} ${Ud(e)}`,proposals:e=>`${Ud(e)} ${q(e,{one:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435`,few:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F`,many:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439`})}`,remaining:(e,t)=>`\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C ${Ud(e)} \u0438\u0437 ${Ud(t)}`,applying:(e,t)=>`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u044E ${Ud(e)} \u0438\u0437 ${Ud(t)}\u2026`,done:(e,t)=>`\u0413\u043E\u0442\u043E\u0432\u043E: ${Ud(e)} \u0438\u0437 ${Ud(t)}`,applied:e=>`${Ud(e)} \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,rejected:e=>`${Ud(e)} \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,errors:e=>`${Ud(e)} ${q(e,{one:`\u043E\u0448\u0438\u0431\u043A\u0430`,few:`\u043E\u0448\u0438\u0431\u043A\u0438`,many:`\u043E\u0448\u0438\u0431\u043E\u043A`})}`,superseded:e=>`${Ud(e)} \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u043E \u043D\u043E\u0432\u044B\u043C`,closed:e=>`${Ud(e)} \u0437\u0430\u043A\u0440\u044B\u0442\u043E`,undone:e=>`${Ud(e)} \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,loadFailed:e=>`${Ud(e)} \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C`,confirmAll:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u0441\u0435 (${Ud(e)})`,rejectAll:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0432\u0441\u0435`,passFailures:e=>q(e,{one:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${Ud(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u2014 \u044D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C`,few:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${Ud(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u2014 \u044D\u0442\u0438 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C`,many:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${Ud(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u2014 \u044D\u0442\u0438 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C`})}},Xd=new Intl.NumberFormat(`ru`),Zd=new Intl.NumberFormat(`ru`,{style:`percent`,maximumFractionDigits:0}),Qd={title:`\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F`,caption:e=>`\u00AB${e}\u00BB`,cardAria:e=>`\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F: ${e}`,covered:`\u041F\u043E\u043B\u043D\u043E\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,partial:`\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,gaps:`\u041F\u0440\u043E\u0431\u0435\u043B\u044B`,tagWarningPill:`\u0417\u0430\u043C\u0435\u0447\u0430\u043D\u0438\u0435 \u043F\u043E \u0442\u0435\u0433\u0430\u043C`,unknownItem:`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E`,similarity:e=>`\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435 ${Zd.format(e)}`,steps:e=>`${Xd.format(e)} ${q(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`})}`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},$d=new Intl.NumberFormat(`ru`),ef=e=>$d.format(e),tf={kind:{atlas_crawl:`\u041E\u0431\u0445\u043E\u0434 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u041F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},stage:{queued:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,launching:`\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F`,link_pending:`\u0421\u0432\u044F\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0441 \u043A\u0430\u0440\u0442\u043E\u0439`,crawling:`\u0418\u0441\u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0441\u0430\u0439\u0442`,running_batch:`\u041F\u0440\u043E\u0433\u043E\u043D\u044F\u0435\u0442 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,completed:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E`,failed:`\u041E\u0448\u0438\u0431\u043A\u0430`,cancelled:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E`},machineMissing:`\u0418\u043C\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E`,activity:e=>`\u0410\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C ${e}`,activityNone:`\u043D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u0438`,foundCaption:`\u041D\u0430 \u043A\u0430\u0440\u0442\u0435`,found:{screens:e=>q(e,{one:`\u044D\u043A\u0440\u0430\u043D`,few:`\u044D\u043A\u0440\u0430\u043D\u0430`,many:`\u044D\u043A\u0440\u0430\u043D\u043E\u0432`}),edges:e=>q(e,{one:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434`,few:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430`,many:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434\u043E\u0432`}),notes:e=>q(e,{one:`\u0437\u0430\u043C\u0435\u0442\u043A\u0430`,few:`\u0437\u0430\u043C\u0435\u0442\u043A\u0438`,many:`\u0437\u0430\u043C\u0435\u0442\u043E\u043A`}),unexplored:e=>q(e,{one:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0439`,few:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0445`,many:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0445`})},degraded:`\u041A\u0430\u0440\u0442\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u2014 \u0441\u0447\u0451\u0442\u0447\u0438\u043A\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u0420\u0430\u0431\u043E\u0442\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442\u0441\u044F.`,terminalPrefix:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E \u043F\u043E\u0442\u043E\u043C\u0443, \u0447\u0442\u043E`,terminalReason:{claim_timeout:`\u0430\u0433\u0435\u043D\u0442 \u0442\u0430\u043A \u0438 \u043D\u0435 \u0432\u0437\u044F\u043B \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,launch_timeout:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0443\u0441\u043F\u0435\u043B \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C\u0441\u044F`,launch_error:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0441\u043C\u043E\u0433 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C\u0441\u044F`,browser_gone:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438\u0441\u0447\u0435\u0437`,agent_lost:`\u0430\u0433\u0435\u043D\u0442 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043B \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,max_duration:`\u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D \u043B\u0438\u043C\u0438\u0442 \u0432\u0440\u0435\u043C\u0435\u043D\u0438`,killed:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E`,stalled:`\u0440\u0430\u0431\u043E\u0442\u0430 \u0441\u0442\u043E\u044F\u043B\u0430 \u0431\u0435\u0437 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0430`,capability_mismatch:`\u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0443\u044E \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0443`,subject_rejected:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0443\u0441\u043A \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,model_timeout:`\u0438\u0441\u0442\u0435\u043A\u043B\u043E \u0432\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u0438`,runs_not_started:`\u043F\u0440\u043E\u0433\u043E\u043D\u044B \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u0438\u0441\u044C`,credits_exhausted:`\u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B`,tab_closed:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0431\u044B\u043B\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u0430`,slot_taken:`\u043C\u0435\u0441\u0442\u043E \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0437\u0430\u043D\u044F\u043B \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0433\u043E\u043D`,ai_disabled:`Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u043E\u043C`},openMap:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u0430\u0440\u0442\u0443`,openMapAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u0430\u0440\u0442\u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u00AB${e}\u00BB`,cancel:{atlas_crawl:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`,make_auto:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442`},kill:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430`,cancelConfirm:{atlas_crawl:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435?`,body:`\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0451\u0442\u0441\u044F.`,bodyKept:`\u0412\u0441\u0451, \u0447\u0442\u043E \u0430\u0433\u0435\u043D\u0442 \u0443\u0436\u0435 \u0443\u0432\u0438\u0434\u0435\u043B, \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u043D\u0430 \u043A\u0430\u0440\u0442\u0435.`,bodyQueued:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043D\u044F\u0442\u043E \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 \u043D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u043E\u0441\u044C.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`},make_auto:{question:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442?`,body:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u0432\u0435\u0441\u044C \u043F\u0430\u043A\u0435\u0442: \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D \u043F\u0440\u0435\u0440\u0432\u0451\u0442\u0441\u044F, \u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438, \u0434\u043E \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0447\u0435\u0440\u0435\u0434\u044C \u043D\u0435 \u0434\u043E\u0448\u043B\u0430, \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u044F\u0442\u0441\u044F. \u0423\u0436\u0435 \u0441\u043E\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F.`,bodyKept:null,bodyQueued:`\u041F\u0430\u043A\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043D\u044F\u0442 \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 \u043D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u043E\u0441\u044C.`,keep:`\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u044C`,confirm:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442`}},killConfirm:{question:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430?`,body:{atlas_crawl:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E, \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044F \u0441 \u043F\u0440\u0438\u0447\u0438\u043D\u043E\u0439 \u00AB\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E\u00BB. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435, \u0435\u0441\u043B\u0438 \u043F\u043E\u0441\u043B\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F.`,make_auto:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0430\u043A\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044F \u0441 \u043F\u0440\u0438\u0447\u0438\u043D\u043E\u0439 \u00AB\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E\u00BB. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435, \u0435\u0441\u043B\u0438 \u043F\u043E\u0441\u043B\u0435 \u043E\u0442\u043C\u0435\u043D\u044B \u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F.`},keep:`\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C`,confirm:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`},failed:{cancel:{atlas_crawl:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435.`,make_auto:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442.`},kill:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430.`,conflict:`\u0417\u0430\u0434\u0430\u0447\u0430 \u0443\u0436\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C \u2014 \u0441\u0442\u0430\u0442\u0443\u0441 \u043E\u0431\u043D\u043E\u0432\u043B\u0451\u043D.`},cardAria:e=>`\u0417\u0430\u0434\u0430\u0447\u0430: ${e}`,unsupported:{title:`\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u0421\u0442\u0430\u0442\u0443\u0441 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},collection:{collectionAria:e=>`\u0417\u0430\u0434\u0430\u0447\u0438: ${ef(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0437\u0430\u0434\u0430\u0447`,roleSlide:`\u0437\u0430\u0434\u0430\u0447\u0430`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430`,goToSlide:`\u0417\u0430\u0434\u0430\u0447\u0430 {index} \u0438\u0437 {total}`}},nf={web_runs_prompt:`\u0438\u0437 \u00AB\u0417\u0430\u043F\u0443\u0441\u043A\u043E\u0432\u00BB`,web_test_run_dialog:`\u0438\u0437 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D\u0430`,web_map_dialog:`\u0441 \u043A\u0430\u0440\u0442\u044B`,web_scenarios_dialog:`\u0438\u0437 \u00AB\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432\u00BB`,chat:`\u0438\u0437 \u0447\u0430\u0442\u0430`},rf=e=>q(e,{one:`\u0430\u0433\u0435\u043D\u0442\u0430`,few:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`}),af={title:{make_auto:`\u0420\u043E\u0439 \u00B7 \u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E`,atlas:`\u0420\u043E\u0439 \u00B7 Atlas`,preset:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`},subtitle:(e,t,n)=>`${e} \u00B7 \u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 \u0434\u043E ${t} ${rf(t)} \u00B7 \u0441 ${n}`,preset:{stopConfirm:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435?`,body:`\u041E\u043A\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F, \u0438\u0434\u0443\u0449\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u0441\u044F. \u041E\u0442\u0447\u0451\u0442 \u0431\u0443\u0434\u0435\u0442 \u043F\u043E\u043C\u0435\u0447\u0435\u043D \u00AB\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439\u00BB. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u2014 \u0431\u0430\u0433\u0438, \u043D\u0430\u0445\u043E\u0434\u043A\u0438, \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u2014 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`},scope:e=>{switch(e.kind){case`project`:return`\u0412\u0441\u0451 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435`;case`scenarios`:return`${e.count} ${q(e.count,{one:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,few:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,many:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`;case`test_run`:return e.name===null?`\u0422\u0435\u0441\u0442-\u0440\u0430\u043D #TR-${String(e.number).padStart(3,`0`)}`:`\u0422\u0435\u0441\u0442-\u0440\u0430\u043D \u00AB${e.name}\u00BB`;case`test_plan`:return`\u0422\u0435\u0441\u0442-\u043F\u043B\u0430\u043D \u00AB${e.name}\u00BB`}},level:e=>e.effort===`max`?`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e.maxAgents} ${q(e.maxAgents,{one:`\u0430\u0433\u0435\u043D\u0442`,few:`\u0430\u0433\u0435\u043D\u0442\u0430`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`})}`:e.effort===`thinking`?`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435`:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439`,since:e=>`\u0441 ${e}`,counts:{findings:e=>q(e,{one:`\u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u043D\u0430\u0445\u043E\u0434\u043E\u043A`}),bugs:e=>q(e,{one:`\u0431\u0430\u0433`,few:`\u0431\u0430\u0433\u0430`,many:`\u0431\u0430\u0433\u043E\u0432`}),undecided:e=>q(e,{one:`\u0436\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,few:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,many:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`}),notDone:`\u043D\u0435 \u0441\u0434\u0435\u043B\u0430\u043D\u043E`},awaitingBrowser:{sidePanel:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u044D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u2014 \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043D\u0430\u0447\u043D\u0451\u0442 \u0441\u0440\u0430\u0437\u0443`,web:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043C\u043E\u0436\u043D\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 Progon \u0432 Chrome`},startingRunner:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0440\u0430\u043D\u043D\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,pillAwaitingBrowser:`\u0416\u0434\u0451\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,stripAwaitingBrowser:`\u0417\u0430\u043F\u0443\u0441\u043A \u0436\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,panelWait:{title:e=>`\u00AB${e}\u00BB \u0436\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,lostTitle:e=>`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u043B\u0441\u044F \u2014 \u00AB${e}\u00BB \u0436\u0434\u0451\u0442`,lostDetail:e=>`\u041E\u043A\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u043E \u0432 ${e}, \u0441\u0434\u0435\u043B\u0430\u043D\u043D\u043E\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,origin:(e,t,n)=>`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E ${nf[e]} \u0432 ${t} \u00B7 ${n}`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,openLaunch:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},stripChatLeadAwaitingAnswer:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430`,stripChatLeadAwaitingMessage:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,chatLeadIdle:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043F\u0440\u043E\u0441\u043D\u0451\u0442\u0441\u044F, \u043A\u043E\u0433\u0434\u0430 \u043F\u0440\u043E\u0433\u043E\u043D \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u0441\u044F`,partialCancelled:e=>`\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439: \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0432 ${e}.`,partialFailed:e=>`\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439: ${e}.`,failureReason:{credits:`\u0443 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0418\u0418`,turnShape:`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442\u0438\u043B \u043D\u0435 \u043F\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C`,internal:`\u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u0432\u0435\u0434\u0443\u0449\u0435\u0433\u043E`,initiatorUnavailable:`\u0438\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,other:e=>`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439 \u00AB${e}\u00BB`},beforeStop:(e,t)=>t===null?`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u2014 ${e}.`:`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u2014 ${e}, ${t}.`},topic:e=>e.kind===`atlas`?e.projectName:e.kind===`preset`?hd(e):e.scenarioName===null?`${e.scenarioCount} ${q(e.scenarioCount,{one:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,few:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,many:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`:e.scenarioName.trim()===``?`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F`:e.scenarioName,pill:{startingBrowser:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C`,startingRunner:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C`,running:`\u0418\u0434\u0451\u0442`,awaiting:`\u0416\u0434\u0451\u0442 \u043E\u0442\u0432\u0435\u0442\u0430`,browserLost:`\u0416\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,runnerLost:`\u0416\u0434\u0451\u0442 \u0440\u0430\u043D\u043D\u0435\u0440`,pausing:`\u0421\u0442\u0430\u0432\u0438\u0442\u0441\u044F \u043D\u0430 \u043F\u0430\u0443\u0437\u0443`,paused:`\u041D\u0430 \u043F\u0430\u0443\u0437\u0435`,stopping:`\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,finalizing:`\u0418\u0442\u043E\u0433\u043E\u0432\u044B\u0439 \u0430\u043D\u0430\u043B\u0438\u0437`,completed:`\u0413\u043E\u0442\u043E\u0432\u043E`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u0441\u044F`,cancelled:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`},pauseCause:{user:`\u0432\u0440\u0443\u0447\u043D\u0443\u044E`,credits:`\u043A\u0440\u0435\u0434\u0438\u0442\u044B`},lead:{startingBrowser:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0440\u043E\u0439`,startingRunner:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0440\u0430\u043D\u043D\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0440\u043E\u0439`,active:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0430\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0443`,idle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442, \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0438\u0445 \u043E\u0442\u0447\u0451\u0442\u043E\u0432`,awaiting:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430 \u2014 \u0432\u043E\u043F\u0440\u043E\u0441 \u043D\u0438\u0436\u0435`,stopping:`\u0417\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u043E\u043A\u043D\u0430 \u0438 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C \u0437\u0430\u0434\u0430\u043D\u0438\u044F. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F.`},startingRow:{browser:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0444\u043E\u043D\u0435 \u2014 \u0444\u043E\u043A\u0443\u0441 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u0443 \u0432\u0430\u0441`,runner:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u0430`},hostLost:{sidePanel:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u043B\u0441\u044F \u2014 \u043E\u043A\u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0437\u0430\u043A\u0440\u044B\u0442\u044B, \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u043D\u0430 \u043F\u0430\u0443\u0437\u0435.`,web:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D. \u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043C\u043E\u0436\u043D\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 Progon \u0432 Chrome.`,runner:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u0430 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u043E\u0441\u044C. \u041F\u043E\u0447\u0435\u043C\u0443 \u2014 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430, \u0442\u0430\u043C \u0436\u0435 \u00AB\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043D\u0430 \u0440\u0430\u043D\u043D\u0435\u0440\u0435\u00BB.`},worker:{name:e=>`\u0410\u0433\u0435\u043D\u0442 ${e}`,kind:{make_auto:`\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E`,atlas:`Atlas`,run:`\u041F\u0440\u043E\u0433\u043E\u043D`},task:e=>`\u0437\u0430\u0434\u0430\u043D\u0438\u0435 ${e}`,opening:`\u041E\u043A\u043D\u043E \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F`,idle:`\u0416\u0434\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u044F`,busy:`\u0411\u0435\u0440\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,closing:`\u041E\u043A\u043D\u043E \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F`,untitledScenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F`,crawl:e=>e===null?`\u041E\u0431\u0445\u043E\u0434`:`\u041E\u0431\u0445\u043E\u0434 \u00AB${e}\u00BB`,progress:(e,t)=>`${e} \u0438\u0437 ${t}`,steps:e=>`${e} ${q(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`})}`},end:{tally:(e,t)=>`\u0413\u043E\u0442\u043E\u0432\u043E ${e} \u0438\u0437 ${t}`,tallyBeforeStop:(e,t)=>`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0433\u043E\u0442\u043E\u0432\u043E ${e} \u0438\u0437 ${t}`,screens:e=>`${e} ${q(e,{one:`\u044D\u043A\u0440\u0430\u043D`,few:`\u044D\u043A\u0440\u0430\u043D\u0430`,many:`\u044D\u043A\u0440\u0430\u043D\u043E\u0432`})} \u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,cancelledBy:(e,t)=>`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430: ${e}, ${t}.`,reportPartial:`\u041E\u0442\u0447\u0451\u0442 \u00AB\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439\u00BB.`,failureReason:{credits:`\u0423 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0418\u0418.`,turnShape:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442\u0438\u043B \u043D\u0435 \u043F\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C \u0440\u043E\u044F.`,internal:`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u0432\u0435\u0434\u0443\u0449\u0435\u0433\u043E.`,initiatorUnavailable:`\u0420\u043E\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D: \u0438\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,other:e=>`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439 \u00AB${e}\u00BB.`}},actions:{open:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0440\u043E\u044F`,openLaunch:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`,openReport:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043E\u0442\u0447\u0451\u0442`,stop:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,stopConfirm:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439?`,body:`\u041E\u043A\u043D\u0430 \u0437\u0430\u043A\u0440\u043E\u044E\u0442\u0441\u044F, \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u044F\u0442\u0441\u044F. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u2014 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u044D\u043A\u0440\u0430\u043D\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435 \u2014 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439`},stopFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439`},strip:{awaiting:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430`,toQuestion:`\u041A \u0432\u043E\u043F\u0440\u043E\u0441\u0443`,lostBrowser:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D`,lostRunner:`\u0416\u0434\u0451\u0442 \u0440\u0430\u043D\u043D\u0435\u0440`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C`,startingBrowser:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,startingRunner:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0440\u0430\u043D\u043D\u0435\u0440`,active:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0430\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0443`,idle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442`,stopping:`\u0420\u043E\u0439 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,toBlock:`\u041A \u0440\u043E\u044E`,toBlockLabel:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043B\u043E\u043A \u0440\u043E\u044F`,windows:e=>`${e} ${q(e,{one:`\u043E\u043A\u043D\u043E`,few:`\u043E\u043A\u043D\u0430`,many:`\u043E\u043A\u043E\u043D`})}`}},of={failed:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439: ${e}`,failedBatch:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438: ${e}`,reason:{no_active_tab:`\u043D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0438. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`,content_not_loaded:`\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u043D\u0430 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,launch_refused:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439: \u0432 \u043D\u0435\u0439 \u0443\u0436\u0435 \u0438\u0434\u0451\u0442 \u0434\u0440\u0443\u0433\u043E\u0439 \u0437\u0430\u043F\u0443\u0441\u043A, \u0438\u043B\u0438 \u0435\u0433\u043E \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u0438\u0442\u044C.`,no_response:`\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B\u043E \u043D\u0430 \u0437\u0430\u043F\u0440\u043E\u0441 \u0437\u0430\u043F\u0443\u0441\u043A\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,test_run_tab_missing:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u0441 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D\u043E\u043C \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u0430 \u0438\u043B\u0438 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D \u0432 \u043D\u0435\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D.`},unsupported:{title:`\u0417\u0430\u043F\u0443\u0441\u043A \u0432\u043E \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},sf=new Intl.NumberFormat(`ru`),cf=e=>sf.format(e),lf={title:`\u0417\u0430\u043F\u0443\u0441\u043A \u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u0435`,cardAria:e=>`\u0417\u0430\u043F\u0443\u0441\u043A \u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u0435: ${e}`,outcome:{refused:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,refusedWithReason:e=>`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E: ${e}`,launched:(e,t)=>`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E ${cf(e)} \u0438\u0437 ${cf(t)}`},confirmed:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E`,refusedHead:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u044B`,refusedList:`\u041E\u0442\u043A\u043B\u043E\u043D\u0451\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,launchedSummary:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u044B`,launchedList:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},uf={listLabel:(e,t)=>`${e} \u00B7 ${cf(t)}`,token:{"stand.main":`\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0439`,"stand.dangerous":`\u041F\u043E\u043B\u043D\u044B\u0439`,"scenarios.ad_hoc_batch":`\u0420\u0430\u0437\u043E\u0432\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u0448\u0430\u0433\u043E\u0432, \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,"environment.projectDefault":`\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,"status.running":`\u0418\u0434\u0451\u0442`,"status.finished":`\u0417\u0430\u043A\u043E\u043D\u0447\u0435\u043D`,"status.aborted":`\u041F\u0440\u0435\u0440\u0432\u0430\u043D`,"aiRunMode.mapping":`\u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u0448\u0430\u0433\u043E\u0432 \u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,"aiRunMode.agentic":`\u0410\u0433\u0435\u043D\u0442 \u043F\u0440\u043E\u0445\u043E\u0434\u0438\u0442 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,"window.headful":`\u0421 \u043E\u043A\u043D\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,"window.headless":`\u0411\u0435\u0437 \u043E\u043A\u043D\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,"executor.extension":`\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,"executor.agent":`\u0420\u0430\u043D\u043D\u0435\u0440`,"billingPeriod.monthly":`\u041F\u043E\u043C\u0435\u0441\u044F\u0447\u043D\u043E`,"billingPeriod.yearly":`\u0417\u0430 \u0433\u043E\u0434`,"requestType.plan_change":`\u0421\u043C\u0435\u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0430`,"requestType.topup":`\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432`,"requestType.seats":`\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043C\u0435\u0441\u0442\u0430`,"role.user":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C`,"allowedChange.file_bugs":`\u0417\u0430\u0432\u043E\u0434\u0438\u0442\u044C \u0431\u0430\u0433\u0438`,"allowedChange.write_tests":`\u0421\u043E\u0437\u0434\u0430\u0432\u0430\u0442\u044C \u0438 \u043C\u0435\u043D\u044F\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,"allowedChange.edit_project":`\u041F\u0440\u043E\u0447\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,"scope.project":`\u0412\u0441\u0451 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435`},warning:{"stand.dangerous":`\u041F\u043E\u043B\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u043D\u0430 \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u043E\u0439 \u043C\u0430\u0448\u0438\u043D\u0435: \u0430\u0433\u0435\u043D\u0442 \u0441\u043C\u043E\u0436\u0435\u0442 \u0438\u0437\u043C\u0435\u043D\u044F\u0442\u044C \u0438 \u0443\u0434\u0430\u043B\u044F\u0442\u044C \u043B\u044E\u0431\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u0438 \u0440\u044F\u0434\u043E\u043C \u043D\u0438\u043A\u043E\u0433\u043E \u043D\u0435 \u0431\u0443\u0434\u0435\u0442. \u0412\u043A\u043B\u044E\u0447\u0430\u0439\u0442\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0435\u0441\u0442\u043E\u0432\u043E\u043C \u0441\u0442\u0435\u043D\u0434\u0435.`},unrecognized:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E`},df=new Intl.NumberFormat(`ru`),ff=e=>df.format(e),pf={title:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,caption:e=>`SC-${String(e)}`,cardAria:(e,t)=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 ${e}: ${t}`,lifecycle:{draft:`\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A`,ready:`Live`,outdated:`\u0423\u0441\u0442\u0430\u0440\u0435\u043B`,archived:`\u0412 \u0430\u0440\u0445\u0438\u0432\u0435`},steps:e=>q(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`}),runs:e=>q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),mapping:{label:{none:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u043D\u0435\u0442`,partial:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u0430\u044F`,full:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u043F\u043E\u043B\u043D\u0430\u044F`},hint:{none:`\u0448\u0430\u0433\u0438 \u0435\u0449\u0451 \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B`,partial:`\u0447\u0430\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u0430 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430\u043C \u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C`,full:`\u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B`},hintNoSteps:`\u0448\u0430\u0433\u043E\u0432 \u043D\u0435\u0442`,tip:e=>`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B: ${e}`},open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,openShort:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438: ${e}`,run:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,runAria:e=>`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C: ${e}`,runCommand:e=>`\u0417\u0430\u043F\u0443\u0441\u0442\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 ${e}`,runNoSteps:`\u041D\u0435\u0442 \u0448\u0430\u0433\u043E\u0432 \u0434\u043B\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u2014 \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438.`,expand:`\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u2014 \u0448\u0430\u0433\u0438 \u0438 \u0438\u0441\u0442\u043E\u0440\u0438\u044F`,expandShort:`\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C`,collapse:`\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C`,tabsAria:`\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,tabSteps:`\u0428\u0430\u0433\u0438`,tabRuns:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432`,step:{aria:(e,t)=>`\u0428\u0430\u0433 ${ff(e)}: ${t}`,missingLabel:`\u0442\u0435\u043A\u0441\u0442 \u0448\u0430\u0433\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,moreExpected:e=>`+${ff(e)}`,expectedHeading:`\u041E\u0436\u0438\u0434\u0430\u0435\u043C\u044B\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B`},stepsEmptyTitle:`\u0428\u0430\u0433\u043E\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442`,stepsEmptyHint:`\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u2014 \u0437\u0430\u043F\u0438\u0441\u044C\u044E \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438, \u0432\u0440\u0443\u0447\u043D\u0443\u044E \u0438\u043B\u0438 \u0438\u043C\u043F\u043E\u0440\u0442\u043E\u043C.`,stepsShown:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${ff(e)} \u0438\u0437 ${ff(t)}`,stepsLoadMore:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 ${ff(e)}`,stepsLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0448\u0430\u0433\u0438\u2026`,stepsLoadFailed:(e,t)=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0448\u0430\u0433\u0438 \u00B7 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${ff(e)} \u0438\u0437 ${ff(t)}`,runsEmptyTitle:`\u0415\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u0441\u044F`,runsEmptyHint:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u0437\u0434\u0435\u0441\u044C.`,runsEmptyHintNoSteps:`\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0438 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u0437\u0434\u0435\u0441\u044C.`,runsLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432\u2026`,runsLoadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432`,runsShown:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${ff(e)} \u0438\u0437 ${ff(t)}`,runsLoadMore:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 ${ff(e)}`,runStatus:{queued:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,launching:`\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F`,in_progress:`\u0412 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0435`,completed:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E`,failed:`\u041E\u0448\u0438\u0431\u043A\u0430`,cancelled:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`},runMode:{manual:`\u0420\u0443\u0447\u043D\u043E\u0439`,semi_auto:`\u041F\u043E\u043B\u0443\u0430\u0432\u0442\u043E`,auto:`\u0410\u0432\u0442\u043E`},runProgress:(e,t)=>`\u0448\u0430\u0433 ${ff(e)} \u0438\u0437 ${ff(t)}`,runDurationUnavailable:`\u0414\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,runMomentUnavailable:`\u2014`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438: ${ff(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,roleSlide:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,goToSlide:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 {index} \u0438\u0437 {total}`}},mf=new Intl.NumberFormat(`ru`),X=e=>mf.format(e),hf=e=>q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),gf=e=>q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),_f=e=>q(e,{one:`\u043F\u0430\u0434\u0435\u043D\u0438\u0435`,few:`\u043F\u0430\u0434\u0435\u043D\u0438\u044F`,many:`\u043F\u0430\u0434\u0435\u043D\u0438\u0439`}),vf=e=>q(e,{one:`\u0443\u0441\u043F\u0435\u0445`,few:`\u0443\u0441\u043F\u0435\u0445\u0430`,many:`\u0443\u0441\u043F\u0435\u0445\u043E\u0432`}),yf=e=>q(e,{one:`\u0434\u0435\u043D\u044C`,few:`\u0434\u043D\u044F`,many:`\u0434\u043D\u0435\u0439`}),bf={not_enrolled:()=>`\u041D\u0438 \u043E\u0434\u043D\u043E\u0439 \u043C\u0430\u0448\u0438\u043D\u044B \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E.`,none_ready:e=>`\u041D\u0438 \u043E\u0434\u043D\u0430 \u0438\u0437 \u043C\u0430\u0448\u0438\u043D (${X(e)}) \u043D\u0435 \u0433\u043E\u0442\u043E\u0432\u0430 \u043A \u044D\u0442\u043E\u0439 \u0440\u0430\u0431\u043E\u0442\u0435.`,one_ready:e=>`\u041E\u0434\u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0430 \u0433\u043E\u0442\u043E\u0432\u0430. \u0412\u0441\u0435\u0433\u043E \u043C\u0430\u0448\u0438\u043D: ${X(e)}.`,many_ready:e=>`\u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043C\u0430\u0448\u0438\u043D \u0433\u043E\u0442\u043E\u0432\u044B. \u0412\u0441\u0435\u0433\u043E \u043C\u0430\u0448\u0438\u043D: ${X(e)}.`},xf={playback:`\u041D\u0435\u0442 \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u0438\u044F`,atlas_crawl:`\u041D\u0435\u0442 \u043E\u0431\u0445\u043E\u0434\u0430 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u041D\u0435\u0442 \u0430\u0432\u0442\u043E\u0441\u0431\u043E\u0440\u043A\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},Sf={common:{missingName:`\u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,newTabSuffix:` (\u043D\u043E\u0432\u0430\u044F \u0432\u043A\u043B\u0430\u0434\u043A\u0430)`,noOpenTarget:`\u043D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F`,noOpenTargetHint:`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0442\u0438\u043F\u0430 \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0438 \u043D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F`,moreActions:`\u0415\u0449\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,commandFailure:{confirm:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u2014`,reject:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u2014`,reason:{rejected:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u0440\u0435\u0448\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,ack_timeout:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,not_open:`\u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,connection_closed:`\u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},entityType:{scenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,bug:`\u0411\u0430\u0433`,"checklist-item":`\u041F\u0443\u043D\u043A\u0442 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,checklist:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442`,"saved-request":`API-\u0437\u0430\u043F\u0440\u043E\u0441`,collection:`\u041A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u044F`,"shared-step":`\u041E\u0431\u0449\u0438\u0439 \u0448\u0430\u0433`,run:`\u0422\u0435\u0441\u0442-\u0437\u0430\u043F\u0443\u0441\u043A`,"test-run":`\u0422\u0435\u0441\u0442-\u0437\u0430\u043F\u0443\u0441\u043A`,page:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,"test-plan":`\u0422\u0435\u0441\u0442-\u043F\u043B\u0430\u043D`,environment:`\u041E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0435`,variable:`\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F`,incident:`\u0418\u043D\u0446\u0438\u0434\u0435\u043D\u0442`,"atlas-fact":`\u041A\u0430\u0440\u0442\u0430`,"api-folder":`\u041F\u0430\u043F\u043A\u0430 API`,"api-endpoint":`API-\u044D\u043D\u0434\u043F\u043E\u0438\u043D\u0442`,section:`\u0420\u0430\u0437\u0434\u0435\u043B`}},collection:{counter:`{index} / {total}`,counterUnknown:`{index}`,positionMore:`\u0414\u0430\u043B\u0435\u0435`,scrubberAria:`\u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0432 \u043B\u0435\u043D\u0442\u0435`,slideAria:`{index} \u0438\u0437 {total}`,slideAriaAtLeast:`{index} \u0438\u0437 {total}+`,slideAriaUnknown:`{index}, \u0440\u0430\u0437\u043C\u0435\u0440 \u043D\u0430\u0431\u043E\u0440\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`,loadedOf:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded} \u0438\u0437 {total}`,loadedOfAtLeast:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded} \u0438\u0437 {total}+`,loadedOfUnknown:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded}`,loadMore:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 {remaining}`,loadMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\u2026`,loadMoreFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,loadedMore:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}, \u0432\u0441\u0435\u0433\u043E {total}`,loadedMoreAtLeast:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}, \u0432\u0441\u0435\u0433\u043E \u043D\u0435 \u043C\u0435\u043D\u044C\u0448\u0435 {total}`,loadedMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}`},report:{title:{metric_card:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C`,trend_card:`\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430`,finding_card:`\u0421\u043B\u0430\u0431\u043E\u0435 \u043C\u0435\u0441\u0442\u043E`,stability_row_card:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,scenario_stability_card:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F \u2014 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E`,failure_breakdown_card:`\u041F\u0440\u0438\u0447\u0438\u043D\u044B \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,weak_spot_feature_card:`\u0421\u043B\u0430\u0431\u0430\u044F \u0437\u043E\u043D\u0430: \u0444\u0438\u0447\u0430`,weak_spot_page_card:`\u0421\u043B\u0430\u0431\u0430\u044F \u0437\u043E\u043D\u0430: \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,hotspot_card:`\u0413\u043E\u0440\u044F\u0447\u0430\u044F \u0442\u043E\u0447\u043A\u0430 \u0431\u0430\u0433\u043E\u0432`},window:{"7d":`7 \u0434\u043D\u0435\u0439`,"14d":`14 \u0434\u043D\u0435\u0439`,"30d":`30 \u0434\u043D\u0435\u0439`,"90d":`90 \u0434\u043D\u0435\u0439`},windowShort:{"7d":`7 \u0434`,"14d":`14 \u0434`,"30d":`30 \u0434`,"90d":`90 \u0434`},basisRuns:(e,t)=>`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 ${X(e)} ${hf(e)} (\u0434\u043E ${X(t)} ${yf(t)})`,currentState:`\u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435`,noWindow:`\u043E\u043A\u043D\u043E \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F`,asOf:e=>`\u043D\u0430 ${e}`,stamp:{source:(e,t)=>[`\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: ${e}`,...t].join(` \u00B7 `),metric:(e,t)=>`${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`,rule:(e,t)=>`\u043F\u0440\u0430\u0432\u0438\u043B\u043E ${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`,definition:e=>`\u0432\u0435\u0440\u0441\u0438\u044F \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F ${e}`,mapping:e=>`\u0432\u0435\u0440\u0441\u0438\u044F \u043C\u0430\u043F\u043F\u0438\u043D\u0433\u0430 ${e}`,envelope:(e,t)=>`${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`},metric:{name:{pass_rate:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,runs_total:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_passed:`\u0423\u0441\u043F\u0435\u0448\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_failed:`\u0423\u043F\u0430\u0432\u0448\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_evaluated:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0432 \u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u0435`,runs_infra:`\u0418\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_cancelled:`\u041E\u0442\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_abandoned:`\u0411\u0440\u043E\u0448\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,run_duration_sum_ms:`\u0421\u0443\u043C\u043C\u0430\u0440\u043D\u0430\u044F \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,run_duration_count:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0441 \u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E\u0439 \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\u044E`,run_duration_avg:`\u0421\u0440\u0435\u0434\u043D\u044F\u044F \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,page_steps_executed:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_passed:`\u0423\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_failed:`\u0423\u043F\u0430\u0432\u0448\u0438\u0445 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_healed:`\u0421\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043E\u043A \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_step_success_rate:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,page_healed_rate:`\u0414\u043E\u043B\u044F \u0441\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0438 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,step_failures:`\u041F\u0430\u0434\u0435\u043D\u0438\u044F \u0448\u0430\u0433\u043E\u0432`,run_failures:`\u041F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,bugs_opened:`\u0417\u0430\u0432\u0435\u0434\u0435\u043D\u043E \u0431\u0430\u0433\u043E\u0432`,bugs_closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u0431\u0430\u0433\u043E\u0432`,open_bugs:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,covered_pages:`\u041F\u043E\u043A\u0440\u044B\u0442\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,total_pages:`\u0412\u0441\u0435\u0433\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,page_coverage_pct:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,unstable_scenarios:`\u041D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`},missingName:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0432 \u044D\u0442\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0438`,missingNameDetail:e=>`metricId: ${e}`,unit:{percent:`%`,count:``,ms:`\u043C\u0441`,days:`\u0434\u043D.`},denominator:{pass_rate:e=>`\u0438\u0437 ${X(e)} ${q(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`})}`,runs_total:e=>`${X(e)} ${hf(e)}`,unstable_scenarios:e=>`\u0438\u0437 ${X(e)} ${q(e,{one:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,few:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,many:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`,open_bugs:e=>`${X(e)} ${q(e,{one:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0439`,few:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445`,many:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445`})}`,page_coverage_pct:e=>`\u0438\u0437 ${X(e)} ${q(e,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`,generic:e=>`\u0431\u0430\u0437\u0430: ${X(e)}`},insufficient:`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E \u2014 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043D.`,noSeriesValue:`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E \u2014 \u0433\u0440\u0430\u0444\u0438\u043A \u043D\u0435 \u043F\u043E\u0441\u0442\u0440\u043E\u0435\u043D.`,deltaHint:`\u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u043F\u0435\u0440\u0438\u043E\u0434\u0443`,deltaPointsHint:` \u00B7 \u043F.\u043F. \u2014 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u044B\u0435 \u043F\u0443\u043D\u043A\u0442\u044B, \u0440\u0430\u0437\u043D\u0438\u0446\u0430 \u0434\u0432\u0443\u0445 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u043E\u0432`,deltaPoints:e=>`${e} \u043F.\u043F.`,sparkAria:e=>`\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430: ${e}`,sparkGap:(e,t)=>`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 ${e}: ${X(t)} ${hf(t)}`,openReport:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u043D\u044B\u0439 \u043E\u0442\u0447\u0451\u0442`},trend:{lastDay:e=>`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0434\u0435\u043D\u044C (${e})`,dayDenominator:e=>`\u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C \u0434\u043D\u044F: ${X(e)}`,points:`\u0422\u043E\u0447\u0435\u043A`,empty:`\u0422\u043E\u0447\u0435\u043A \u043D\u0435\u0442 \u2014 \u0437\u0430 \u043E\u043A\u043D\u043E \u043D\u0435 \u043D\u0430\u0431\u0440\u0430\u043B\u043E\u0441\u044C \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0434\u043D\u044F.`,gaps:e=>`\u0414\u043D\u0435\u0439 \u0431\u0435\u0437 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F: ${X(e)} \u2014 \u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C \u0434\u043D\u044F \u043D\u0438\u0436\u0435 \u043C\u0438\u043D\u0438\u043C\u0443\u043C\u0430.`},finding:{severity:{critical:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u043E`,high:`\u0432\u0430\u0436\u043D\u043E`,watch:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`},sentence:{uncovered_high_priority:e=>({before:`\u0424\u0438\u0447\u0430 `,after:` (${e.priority} \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442): \u043D\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u043E ${X(e.uncovered)} \u0438\u0437 ${X(e.total)} ${q(e.total,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`}),consistently_failing_scenario:e=>({before:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 `,after:` \u0443\u043F\u0430\u043B \u0432 ${X(e.count)} ${q(e.count,{one:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u043F\u0440\u043E\u0433\u043E\u043D\u0435`,few:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`,many:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`})} \u043F\u043E\u0434\u0440\u044F\u0434`}),low_page_success:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 ${e.rate} \u0438\u0437 ${X(e.executions)} (\u043F\u043E\u0440\u043E\u0433: ${e.threshold})`}),high_healed_rate:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${e.rate} \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u043F\u043E\u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043B\u0438 \u0441\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0438 (\u043F\u043E\u0440\u043E\u0433: ${e.threshold})`}),stale_page:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:` \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0430\u0441\u044C ${X(e.days)} ${yf(e.days)} (\u043F\u043E\u0440\u043E\u0433: ${X(e.threshold)})`}),open_bugs_no_verification_critical:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${X(e.count)} ${q(e.count,{one:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0439 \u0431\u0430\u0433`,few:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u0431\u0430\u0433\u0430`,many:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u0431\u0430\u0433\u043E\u0432`})} \u0438 \u043D\u0438 \u043E\u0434\u043D\u043E\u0439 \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0439 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0437\u0430 ${e.window}`}),open_bugs_no_verification_high:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${X(e.count)} ${q(e.count,{one:`\u0432\u0430\u0436\u043D\u044B\u0439 \u0431\u0430\u0433`,few:`\u0432\u0430\u0436\u043D\u044B\u0445 \u0431\u0430\u0433\u0430`,many:`\u0432\u0430\u0436\u043D\u044B\u0445 \u0431\u0430\u0433\u043E\u0432`})} \u0438 \u043D\u0438 \u043E\u0434\u043D\u043E\u0439 \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0439 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0437\u0430 ${e.window}`})},dominantCause:(e,t,n)=>`; \u043E\u0441\u043D\u043E\u0432\u043D\u0430\u044F \u043F\u0440\u0438\u0447\u0438\u043D\u0430 \u2014 ${e.toLocaleLowerCase(`ru`)} (${X(t)} \u0438\u0437 ${X(n)} ${_f(n)})`,unknownRule:`\u041F\u0440\u0430\u0432\u0438\u043B\u043E \u044D\u0442\u043E\u0433\u043E \u0441\u043B\u0430\u0431\u043E\u0433\u043E \u043C\u0435\u0441\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u044D\u0442\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439.`,incompleteEvidence:`\u0414\u0430\u043D\u043D\u044B\u0445 \u043F\u0440\u0430\u0432\u0438\u043B\u0430 \u043D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0447\u0442\u043E\u0431\u044B \u0441\u0444\u043E\u0440\u043C\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0432\u043E\u0434.`,ruleIdDetail:e=>`ruleId: ${e}`,evidence:(e,t,n)=>`${X(e)} \u00B7 ${t} \u00B7 \u043F\u043E\u0440\u043E\u0433 ${X(n)}`,evidenceAria:`\u041E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0432\u044B\u0432\u043E\u0434\u0430`,evidenceRows:{denominator:`\u0417\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C`,threshold:`\u041F\u043E\u0440\u043E\u0433`,window:`\u041E\u043A\u043D\u043E`,rule:`\u041F\u0440\u0430\u0432\u0438\u043B\u043E`},open:{scenario:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,page:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,feature:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0444\u0438\u0447\u0443`}},openAria:(e,t)=>`${e} \u00AB${t}\u00BB`,stability:{status:{consistently_failing:`\u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442`,flaky:`flaky`,monitoring:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`,insufficient_history:`\u043C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438`,stable:`\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E`},evidence:{flaky:(e,t,n)=>`Flaky \u2014 ${X(e)} ${_f(e)} \u0438 ${X(t)} ${vf(t)} \u0432 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 ${X(n)} ${q(n,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0435`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`})}`,consistently_failing:e=>q(e,{one:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0441\u044F \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`,few:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043F\u043E\u0434\u0440\u044F\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0438\u0441\u044C \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`,many:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 \u043F\u043E\u0434\u0440\u044F\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0438\u0441\u044C \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`}),monitoring:(e,t)=>`\u041D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435 \u2014 ${X(e)} ${_f(e)} \u043D\u0430 ${X(t)} ${hf(t)}; \u0434\u043B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0430 flaky \u043D\u0443\u0436\u043D\u043E \u22652 \u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u0438 \u22652 \u0443\u0441\u043F\u0435\u0445\u043E\u0432 \u043F\u0440\u0438 n\u22656`,insufficientHistory:e=>`\u041C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u2014 ${X(e)} ${hf(e)}; \u0434\u043B\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 \u043D\u0443\u0436\u043D\u043E \u22653`,insufficientHistoryWatermark:e=>`\u041C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0441 ${e}: \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0451\u043D`,stable:e=>`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E \u2014 ${X(e)} ${hf(e)} \u0431\u0435\u0437 \u043F\u0430\u0434\u0435\u043D\u0438\u0439`},stripAria:(e,t,n)=>`${X(e)} ${vf(e)}, ${X(t)} ${_f(t)} \u0438\u0437 ${X(n)}`,stripAriaBeforeChange:e=>` \u00B7 \u0434\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F: ${X(e)} ${hf(e)}`,beforeChange:`\u0434\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,success:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C`,outOf:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)}`,dominantCause:`\u041E\u0441\u043D. \u043F\u0440\u0438\u0447\u0438\u043D\u0430`,noFailures:`\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435\u0442`,lastRun:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D`,historyReset:e=>`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0441 ${e}: \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0451\u043D.`,causesTitle:`\u041F\u0440\u0438\u0447\u0438\u043D\u044B \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,failures:e=>`${X(e)} ${_f(e)}`,healed:`\u0421\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0430 \u0448\u0430\u0433\u043E\u0432`,aiExecuted:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0448\u0430\u0433\u043E\u0432 \u0447\u0435\u0440\u0435\u0437 \u0418\u0418`,ofPassedSteps:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${q(t,{one:`\u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0433\u043E \u0448\u0430\u0433\u0430`,few:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432`,many:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432`})}`,erFailed:`\u041D\u0435\u043F\u0440\u043E\u0439\u0434\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438`,erFailedValue:(e,t)=>`\u0432 ${X(e)} \u0438\u0437 ${X(t)} ${gf(t)}`,rawCodes:e=>`\u041A\u043E\u0434\u044B \u043F\u0440\u0438\u0447\u0438\u043D \u00B7 \u043C\u0430\u043F\u043F\u0438\u043D\u0433 ${e}`,rawCode:(e,t)=>`${e} \u00D7${X(t)}`,recentRuns:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,outcome:{passed:`\u0443\u0441\u043F\u0435\u0445`,failed:`\u043F\u0430\u0434\u0435\u043D\u0438\u0435`,infra:`\u0438\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430`,cancelled:`\u043E\u0442\u043C\u0435\u043D\u0451\u043D`,abandoned:`\u0431\u0440\u043E\u0448\u0435\u043D`},totalFailures:`\u0412\u0441\u0435\u0433\u043E \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,noCauses:`\u041F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435\u0442.`},cause:{element_resolution:`\u041F\u043E\u0438\u0441\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430`,step_definition:`\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0448\u0430\u0433\u0430`,action_dispatch:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,precondition:`\u041F\u0440\u0435\u0434\u0443\u0441\u043B\u043E\u0432\u0438\u0435 \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,infrastructure:`\u0418\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430`,cancelled:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,unrecognized:`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u044B\u0435`},weakSpots:{coverage:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,coverageValue:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${q(t,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`,stepSuccess:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432`,ofSteps:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${q(t,{one:`\u0448\u0430\u0433\u0430`,few:`\u0448\u0430\u0433\u043E\u0432`,many:`\u0448\u0430\u0433\u043E\u0432`})}`,noExecutions:`\u043D\u0435\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0439`,openBugs:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,findings:`\u0421\u043B\u0430\u0431\u044B\u0435 \u043C\u0435\u0441\u0442\u0430`,findingsNone:`\u043D\u0435\u0442`,findingCount:{critical:e=>`${X(e)} ${q(e,{one:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u0430\u044F \u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0435 \u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u043D\u0430\u0445\u043E\u0434\u043E\u043A`})}`,high:e=>`${X(e)} ${q(e,{one:`\u0432\u0430\u0436\u043D\u0430\u044F \u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u0432\u0430\u0436\u043D\u044B\u0435 \u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u0432\u0430\u0436\u043D\u044B\u0445 \u043D\u0430\u0445\u043E\u0434\u043E\u043A`})}`,watch:e=>`${X(e)} ${q(e,{one:`\u043D\u0430\u0445\u043E\u0434\u043A\u0430 \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`,few:`\u043D\u0430\u0445\u043E\u0434\u043A\u0438 \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`,many:`\u043D\u0430\u0445\u043E\u0434\u043E\u043A \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`})}`},pagesTitle:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0444\u0438\u0447\u0438`,pagesCount:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)}`,pageCovered:`\u043F\u043E\u043A\u0440\u044B\u0442\u0430`,pageNotCovered:`\u043D\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0430`,pageBugs:e=>`\u0431\u0430\u0433\u043E\u0432: ${X(e)}`,pagesTruncated:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B ${X(e)} \u0438\u0437 ${X(t)} \u0441\u0442\u0440\u0430\u043D\u0438\u0446 \u0444\u0438\u0447\u0438.`,membership:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043C\u043E\u0436\u0435\u0442 \u0432\u0445\u043E\u0434\u0438\u0442\u044C \u0432 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0444\u0438\u0447 \u2014 \u0441\u0443\u043C\u043C\u044B \u043F\u043E \u0444\u0438\u0447\u0430\u043C \u043D\u0435 \u0441\u043A\u043B\u0430\u0434\u044B\u0432\u0430\u044E\u0442\u0441\u044F.`,unassigned:`\u0431\u0435\u0437 \u0444\u0438\u0447\u0438`,priority:{critical:`\u041A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0439`,high:`\u0412\u044B\u0441\u043E\u043A\u0438\u0439`,medium:`\u0421\u0440\u0435\u0434\u043D\u0438\u0439`,low:`\u041D\u0438\u0437\u043A\u0438\u0439`,ignore:`\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044F`}},lastPassed:{label:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u0430\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430`,never:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u043F\u0440\u043E\u0432\u0435\u0440\u043E\u043A \u043D\u0435 \u0431\u044B\u043B\u043E`,today:`\u0441\u0435\u0433\u043E\u0434\u043D\u044F`,yesterday:`\u0432\u0447\u0435\u0440\u0430`,daysAgo:e=>`${X(e)} ${yf(e)} \u043D\u0430\u0437\u0430\u0434`},hotspot:{open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,opened:`\u041D\u043E\u0432\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u0437\u0430 \u043E\u043A\u043D\u043E`,closedHint:`\u0417\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u0441\u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u0441 \u0440\u0435\u043B\u0438\u0437\u0430 \u043E\u0442\u0447\u0451\u0442\u043E\u0432: \u0443 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u0438\u0445 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0439 \u0434\u0430\u0442\u0430 \u043D\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0430, \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0435\u0451 \u043F\u043E \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0431\u044B\u043B\u043E \u0431\u044B \u0432\u044B\u0434\u0443\u043C\u043A\u043E\u0439.`,unmapped:`\u041D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u043E`,unmappedHint:`\u0411\u0430\u0433\u0438, \u0447\u0435\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0438\u043B\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u044B.`,severityChip:{critical:e=>`${X(e)} \u043A\u0440\u0438\u0442`,high:e=>`${X(e)} \u0432\u044B\u0441`,medium:e=>`${X(e)} \u0441\u0440\u0435\u0434`,low:e=>`${X(e)} \u043D\u0438\u0437`,none:e=>`${X(e)} \u0431\u0435\u0437 \u0432\u0430\u0436\u043D\u043E\u0441\u0442\u0438`,unknown:(e,t)=>`${X(e)} ${t}`}},envelope:{shownOfTotal:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)} \u2014 \u043F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0432 \u043E\u0442\u0447\u0451\u0442\u0435.`,truncated:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043D\u0435 \u0432\u0441\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u2014 \u043F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0432 \u043E\u0442\u0447\u0451\u0442\u0435.`},unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u0447\u0451\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0447\u0451\u0442\u0430 \u043F\u0440\u0438\u0448\u043B\u0438 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u2014 \u0447\u0438\u0441\u043B\u0430 \u043E\u0441\u0442\u0430\u044E\u0442\u0441\u044F \u0432 \u0442\u0435\u043A\u0441\u0442\u0435 \u043E\u0442\u0432\u0435\u0442\u0430 Progon.`},collection:{collectionAria:e=>`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043E\u0442\u0447\u0451\u0442\u0430: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u0435\u043A`,roleSlide:`\u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,goToSlide:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 {index} \u0438\u0437 {total}`}},runnerReadiness:{title:e=>`\u0413\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u044C \u043C\u0430\u0448\u0438\u043D: ${e}`,job:{atlas_crawl:`\u043E\u0431\u0445\u043E\u0434 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u0430\u0432\u0442\u043E\u0441\u0431\u043E\u0440\u043A\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,swarm:`\u0440\u043E\u0439 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`},evaluatedAt:e=>`\u043D\u0430 ${e}`,fleet:bf,state:{not_owner:()=>`\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D`,pending_enroll:()=>`\u041E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,offline:()=>`\u041D\u0435 \u0432 \u0441\u0435\u0442\u0438`,capability_missing:e=>e===null?`\u041D\u0443\u0436\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435`:xf[e],queue_full:()=>`\u041E\u0447\u0435\u0440\u0435\u0434\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0430`,ready:()=>`\u0413\u043E\u0442\u043E\u0432`},platform:{darwin:`macOS`,linux:`Linux`,win32:`Windows`},lastSeen:e=>`\u043D\u0430 \u0441\u0432\u044F\u0437\u0438 ${e}`,lastSeenNever:`\u043D\u0438 \u0440\u0430\u0437\u0443 \u043D\u0435 \u0432\u044B\u0445\u043E\u0434\u0438\u043B\u0430 \u043D\u0430 \u0441\u0432\u044F\u0437\u044C`,machinesAria:e=>`\u041C\u0430\u0448\u0438\u043D\u044B: ${X(e)}`,noRunners:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u0430\u0448\u0438\u043D \u043F\u0443\u0441\u0442.`,truncated:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}.`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E \u043C\u0430\u0448\u0438\u043D\u0430\u0445 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u041E\u0442\u0447\u0451\u0442\u044B \u043E \u0433\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u0438: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u043E\u0442\u0447\u0451\u0442\u043E\u0432 \u043E \u0433\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u0438`,roleSlide:`\u043E\u0442\u0447\u0451\u0442`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442`,goToSlide:`\u041E\u0442\u0447\u0451\u0442 {index} \u0438\u0437 {total}`}},runnerEnrollment:{title:e=>`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0435\u0439 \u043C\u0430\u0448\u0438\u043D\u044B: ${e}`,expiresAt:e=>`\u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E \u0434\u043E ${e}`,step:{install:`\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0430\u0433\u0435\u043D\u0442`,enroll:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043C\u0430\u0448\u0438\u043D\u0443`,approve:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,start:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0434\u0435\u043C\u043E\u043D`},copy:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,copied:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E`,copyAria:{install:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438`,enroll:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,start:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},copiedAria:{install:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438`,enroll:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,start:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},approveBefore:`\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043D\u0430\u043F\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0438 \u0441\u0441\u044B\u043B\u043A\u0443 \u0432\u0438\u0434\u0430`,approveAfter:`\u2014 \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0435\u0451 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0433\u0434\u0435 \u0432\u044B \u0432\u043E\u0448\u043B\u0438 \u0432 Progon, \u0441\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u043E\u0434 \u0441 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u043E\u043C, \u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0438\u043C\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u0438 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435.`,cadence:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043D\u0443\u0436\u043D\u043E \u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435 ${X(e)} \u0441.`,askAgain:`\u041F\u043E\u0441\u043B\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,unsupported:{title:`\u0418\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},references:{title:`\u0421\u0441\u044B\u043B\u043A\u0438`,groupAria:`\u0421\u0441\u044B\u043B\u043A\u0438 \u0438\u0437 \u043E\u0442\u0432\u0435\u0442\u0430`,destination:{workbench:`\u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,map:`\u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,run:`\u043E\u0442\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u0437\u0430\u043F\u0443\u0441\u043A`,list:`\u0432 \u0441\u043F\u0438\u0441\u043A\u0435`},action:{workbench:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,map:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,run:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A`,list:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0441\u043F\u0438\u0441\u043A\u0435`},noOpenAria:e=>`\u041D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F: ${e}`,unsupported:{title:`\u0421\u0441\u044B\u043B\u043A\u0438 \u0438\u0437 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F`,body:`\u0421\u0441\u044B\u043B\u043A\u0438 \u043F\u0440\u0438\u0448\u043B\u0438 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},sectionLink:{title:`\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,groupAria:`\u0421\u0441\u044B\u043B\u043A\u0438 \u043D\u0430 \u0440\u0430\u0437\u0434\u0435\u043B\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,action:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B`,sections:{scenarios:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,"shared-steps":`\u041E\u0431\u0449\u0438\u0435 \u0448\u0430\u0433\u0438`,"api-collections":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,"api-catalog":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,checklists:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,bugs:`\u0411\u0430\u0433\u0438`,"test-runs":`\u041F\u0440\u043E\u0433\u043E\u043D\u044B`,map:`\u041A\u0430\u0440\u0442\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430`},unrecognized:`\u0420\u0430\u0437\u0434\u0435\u043B \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D`,serverLabel:e=>`\u0420\u0430\u0437\u0434\u0435\u043B \u00B7 \u043E\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: \u00AB${e}\u00BB`,noRoute:`\u043D\u0435\u0442 \u0441\u0441\u044B\u043B\u043A\u0438`,noRouteHint:`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0440\u0430\u0437\u0434\u0435\u043B\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443`,noRouteAria:e=>`\u041D\u0435\u0442 \u0441\u0441\u044B\u043B\u043A\u0438 \u0434\u043B\u044F \u0440\u0430\u0437\u0434\u0435\u043B\u0430: ${e}`,unsupported:{title:`\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0440\u0430\u0437\u0434\u0435\u043B \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},search:{title:`\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u0432 \u043F\u0440\u043E\u0435\u043A\u0442\u0435`,evidence:`\u041E\u0431\u043E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C: ${e}`,emptyTitle:`\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E`,emptyForQuery:e=>`\u041F\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0443 \u00AB${e}\u00BB \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0441 \u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E\u0439 \u0443\u0432\u0435\u0440\u0435\u043D\u043D\u043E\u0441\u0442\u044C\u044E.`,emptyBody:`\u041F\u043E\u0438\u0441\u043A \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D \u043F\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C \u0442\u0438\u043F\u0430\u043C \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0435\u0439 \u2014 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438, \u0431\u0430\u0433\u0438, \u043F\u0443\u043D\u043A\u0442\u044B \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430.`,shownOfTotal:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}.`,shownOfAtLeast:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}+.`,shownUnknown:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)}.`,loadMore:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 ${X(e)}`,loadMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\u2026`,loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,unsupported:{title:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u041D\u0430\u0439\u0434\u0435\u043D\u043E: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432`,roleSlide:`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,goToSlide:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 {index} \u0438\u0437 {total}`}},jobStatus:tf,workflow:af,scenario:pf,coverage:Qd,runInTab:of,runStartAgent:lf,confirmation:uf,changeSet:Yd},Cf={byCode:{"agent_jobs.dispatch_key_spent":`\u042D\u0442\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E: \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435, \u043A\u043E\u0442\u043E\u0440\u043E\u0435 \u043E\u043D\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u043E, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"agent_jobs.not_active":`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u043E\u0441\u044C \u2014 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E.`,"agent_jobs.not_found":`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.`,"ai.bedrock_not_configured":`Amazon Bedrock \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,"ai.capabilities.unknown_provider":`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440.`,"ai.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai.completion_failed":`\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u043F\u0440\u043E\u0441\u0430 \u043A Progon`,"ai.concurrency_gate_unavailable":`Progon \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0438\u0437-\u0437\u0430 \u0441\u0431\u043E\u044F \u043D\u0430 \u043D\u0430\u0448\u0435\u0439 \u0441\u0442\u043E\u0440\u043E\u043D\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ai.credit_charge_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043F\u0438\u0441\u0430\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0437\u0430 \u044D\u0442\u043E\u0442 \u0437\u0430\u043F\u0440\u043E\u0441. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"ai.credit_estimate_invalid":`\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u0430\u044F \u043E\u0446\u0435\u043D\u043A\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"ai.credit_reservation_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B.`,"ai.credit_reservation_not_found":`\u0420\u0435\u0437\u0435\u0440\u0432 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai.credit_reservation_not_open":`\u042D\u0442\u043E\u0442 \u0440\u0435\u0437\u0435\u0440\u0432 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u0443\u0436\u0435 \u0437\u0430\u043A\u0440\u044B\u0442.`,"ai.credits_insufficient":`\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432`,"ai.element_html_required":`HTML \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u0435\u043D`,"ai.frozen_model_lane_retired":`\u0417\u0430\u043C\u043E\u0440\u043E\u0436\u0435\u043D\u043E \u043D\u0430 \u043B\u0435\u0439\u043D\u0435 \u043C\u043E\u0434\u0435\u043B\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0435\u0442. \u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0437\u0430\u043D\u043E\u0432\u043E \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u043C\u043E\u0434\u0435\u043B\u0438.`,"ai.generation_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435 Progon`,"ai.messages_required":`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B`,"ai.model_not_allowed":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,"ai.model_not_configured":`\u0414\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 \u043D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438. \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.model_output_ceiling_below_thinking_budget":`\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u043E\u0442\u0432\u0435\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 \u043C\u0435\u043D\u044C\u0448\u0435 \u0431\u044E\u0434\u0436\u0435\u0442\u0430 \u0440\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0439 \u2014 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443 \u043D\u0443\u0436\u043D\u043E \u043F\u043E\u0434\u043D\u044F\u0442\u044C \u043F\u043E\u0442\u043E\u043B\u043E\u043A \u0438\u043B\u0438 \u0441\u043D\u0438\u0437\u0438\u0442\u044C \u0431\u044E\u0434\u0436\u0435\u0442.`,"ai.model_output_ceiling_missing":`\u0414\u043B\u044F \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 \u043D\u0435 \u0437\u0430\u0434\u0430\u043D \u043F\u043E\u0442\u043E\u043B\u043E\u043A \u043E\u0442\u0432\u0435\u0442\u0430, \u0430 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0435\u0433\u043E. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.model_plan_restricted":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u043D\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u044D\u0442\u0443 \u043C\u043E\u0434\u0435\u043B\u044C`,"ai.plan_restricted":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u043D\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u044D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,"ai.provider_empty_response":`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B \u043F\u0443\u0441\u0442\u043E\u0439 \u043E\u0442\u0432\u0435\u0442`,"ai.provider_error":`\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430`,"ai.provider_not_configured":`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,"ai.reasoning_unsupported":`\u041C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435\u043C \u2014 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u00AB\u041E\u0431\u044B\u0447\u043D\u044B\u0439\u00BB \u0432 \u00AB\u0423\u0441\u0438\u043B\u0438\u0438\u00BB \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"ai.user_company_missing":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D \u043A \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`,"ai.user_concurrency_exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 \u2014 \u0434\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0442\u0435\u043A\u0443\u0449\u0438\u0445 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.user_credits_limit":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F`,"ai.user_disabled":`Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.user_model_not_allowed":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430`,"ai.user_not_found":`\u0423\u0447\u0451\u0442\u043D\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai_models.no_sendable_model":`\u041D\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u0438, \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0439 \u0434\u043B\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u2014 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0432 \u0432\u0435\u0440\u0445\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043B\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u043A\u043B\u044E\u0447 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445.`,"ai_models.selection_not_sendable":`\u042D\u0442\u0443 \u043C\u043E\u0434\u0435\u043B\u044C \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u044B\u0431\u0440\u0430\u0442\u044C.`,"ai_settings.admin_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"ai_settings.api_key_missing":`\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 API-\u043A\u043B\u044E\u0447 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai_settings.company_key_required":`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C \u043A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0439 API-\u043A\u043B\u044E\u0447.`,"ai_settings.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai_settings.company_provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.enterprise_required_company":`\u041A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.enterprise_required_personal":`\u041B\u0438\u0447\u043D\u044B\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.enterprise_required_user":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.invalid_provider":`\u0412\u044B\u0431\u0440\u0430\u043D \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440.`,"ai_settings.model_unavailable":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438.`,"ai_settings.personal_provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043B\u0438\u0447\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.plan_not_found":`\u0422\u0430\u0440\u0438\u0444 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai_settings.provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.provider_unavailable":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,"ai_settings.unsupported_personal_provider":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043B\u0438\u0447\u043D\u043E\u0433\u043E.`,"ai_settings.user_not_found":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"assistant.action_context_missing":`\u041D\u0435\u043B\u044C\u0437\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C: \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u0434\u0438\u0430\u043B\u043E\u0433\u0430 \u043F\u043E\u0442\u0435\u0440\u044F\u043D. \u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.`,"assistant.conversations.invalid_cursor":`\u041D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043A\u0443\u0440\u0441\u043E\u0440.`,"assistant.conversations.not_found":`\u0414\u0438\u0430\u043B\u043E\u0433 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"assistant.recover_last_message":`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442 \u0431\u044B\u043B \u043F\u0440\u0435\u0440\u0432\u0430\u043D. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.`,"assistant.search_session.not_found":`\u041F\u043E\u0438\u0441\u043A\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438\u043B\u0438 \u0438\u0441\u0442\u0435\u043A\u043B\u0430.`,"auth.company_forbidden":`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`,"auth.forbidden":`\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u043F\u0440\u0430\u0432`,"auth.insufficient_scope":`\u0422\u0440\u0435\u0431\u0443\u0435\u043C\u044B\u0435 \u043F\u0440\u0430\u0432\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 (scope) \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B.`,"auth.invalid_token":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0438\u043B\u0438 \u0438\u0441\u0442\u0435\u043A\u0448\u0438\u0439 \u0442\u043E\u043A\u0435\u043D`,"auth.login.company_inactive":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438\u043B\u0438 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u0430`,"auth.login.email_not_verified":`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 email \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430`,"auth.login.email_rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0432\u0445\u043E\u0434\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E email. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.login.invalid_credentials":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 email \u0438\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C`,"auth.login.missing_credentials":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 email \u0438 \u043F\u0430\u0440\u043E\u043B\u044C`,"auth.login.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0432\u0445\u043E\u0434\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.missing_header":`\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438`,"auth.refresh.token_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043A\u0435\u043D \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F.`,"auth.register.capacity_reached":`\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u0437\u0430\u043A\u0440\u044B\u0442\u0430 \u2014 \u043C\u044B \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u043C \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u043D\u043E\u0432\u044B\u0445 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.capacity_unreadable":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044E \u0438\u0437-\u0437\u0430 \u043E\u0448\u0438\u0431\u043A\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437, \u0430 \u0435\u0441\u043B\u0438 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u0435\u0442\u0441\u044F, \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.company_required":`\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,"auth.register.email_domain_blocked":`\u042D\u0442\u043E\u0442 \u043F\u043E\u0447\u0442\u043E\u0432\u044B\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442 \u0434\u043B\u044F \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u044B\u0439 \u0440\u0430\u0431\u043E\u0447\u0438\u0439 \u0438\u043B\u0438 \u043B\u0438\u0447\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441.`,"auth.register.email_invalid":`\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 email.`,"auth.register.email_taken":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0441 \u0442\u0430\u043A\u0438\u043C email \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442`,"auth.register.invite_code_invalid":`\u041A\u043E\u0434 \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u043E\u0434 \u0438\u043B\u0438 \u0437\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439.`,"auth.register.invite_required":`\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0438\u0437 \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.name_required":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0438 \u0444\u0430\u043C\u0438\u043B\u0438\u044E.`,"auth.register.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F`,"auth.resend.email_required":`\u0423\u043A\u0430\u0436\u0438\u0442\u0435 email.`,"auth.resend.rate_limited":`\u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u044B\u043C \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u043C \u043A\u043E\u0434\u0430.`,"auth.session_invalidated":`\u0421\u0435\u0441\u0441\u0438\u044F \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u0430. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.session_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0441\u0441\u0438\u044E.`,"auth.token_expired":`\u0422\u043E\u043A\u0435\u043D \u0438\u0441\u0442\u0451\u043A. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.token_revoked":`\u0422\u043E\u043A\u0435\u043D \u043E\u0442\u043E\u0437\u0432\u0430\u043D. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.user_unavailable":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u0438\u043B\u0438 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D`,"auth.verify_email.invalid_code":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F`,"auth.verify_email.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.verify_email.required":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 email \u0438 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,"auth.verify_email.too_many_attempts":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A. \u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434`,"available_models.missing_disabled_selection_id":`\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ID \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u0439 \u0432\u044B\u0431\u043E\u0440\u043A\u0438.`,"available_models.redis_unavailable":`\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u0438 \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,"available_models.unknown_key_source":`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A API-\u043A\u043B\u044E\u0447\u0430.`,"chat.busy":`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0435\u0449\u0451 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.`,"chat_confirm.display_unresolvable":`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0441\u043E\u0441\u043B\u0430\u043B\u0441\u044F \u043D\u0430 \u043E\u0431\u044A\u0435\u043A\u0442, \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043D\u0435\u0442 \u0432 \u044D\u0442\u043E\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u0435. \u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435, \u0447\u0442\u043E \u0438\u043C\u0435\u043D\u043D\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C, \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"chat_confirm.pending_action_stale":`\u042D\u0442\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043B\u043E: \u043E\u043D\u043E \u0431\u044B\u043B\u043E \u0441\u0434\u0435\u043B\u0430\u043D\u043E \u0434\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430, \u0438 \u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0442 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0443. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u2014 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0441\u043E\u0441\u0442\u0430\u0432\u0438\u0442 \u043D\u043E\u0432\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435.`,"client.connection_lost_during_stream":`\u041E\u0442\u0432\u0435\u0442 \u043E\u0431\u043E\u0440\u0432\u0430\u043B\u0441\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430, \u043A\u043E\u0433\u0434\u0430 \u0441\u0432\u044F\u0437\u044C \u0432\u0435\u0440\u043D\u0451\u0442\u0441\u044F.`,"client.browser_api_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C API-\u0437\u0430\u043F\u0440\u043E\u0441 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0438\u0441\u0442\u043E\u0440\u0438\u044E: \u0437\u0430\u043F\u0440\u043E\u0441 \u043C\u043E\u0433 \u0431\u044B\u0442\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D.`,"client.atlas_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0431\u0445\u043E\u0434\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043E\u0431\u0445\u043E\u0434\u044B Atlas \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043E\u043C.`,"client.ai_run_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A AI-\u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043E\u043C.`,"client.workflow_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u043E\u0439 \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0440\u043E\u044F \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"client.permission_mode_changed":`\u0420\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438 \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u044C \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"client.stream_stalled":`\u041E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u043C\u0438\u043D\u0443\u0442\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u2014 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u0430\u044F \u0447\u0430\u0441\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u0430 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u0432\u044B\u0448\u0435.`,"cmd.accept_timeout":`\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u0443\u0441\u043F\u0435\u043B \u043F\u0440\u0438\u043D\u044F\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"company_models.default_must_be_enabled":`\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0430 \u0432 \u0441\u043F\u0438\u0441\u043E\u043A \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0445, \u043F\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043C \u0435\u0451 \u043C\u043E\u0436\u043D\u043E \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,"company_models.invalid_model_id":`\u041C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"company_models.plan_restricted":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0431\u043E\u043B\u0435\u0435 \u0432\u044B\u0441\u043E\u043A\u043E\u043C \u0442\u0430\u0440\u0438\u0444\u0435.`,"conversation.project_id_required":`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C ID \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`,disconnected:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"internal.invalid_token":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"internal.not_configured":`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 API \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D.`,"internal.operation_failed":`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0430\u0441\u044C \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439.`,"internal.unexpected":`\u041D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430`,model_not_allowed:`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0435\u043C \u0442\u0430\u0440\u0438\u0444\u0435 \u2014 \u0432\u044B\u0431\u0440\u0430\u043D\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,"rate_limit.company_write_exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"rate_limit.counter_upsert_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0447\u0451\u0442\u0447\u0438\u043A \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0439.`,"rate_limit.counter_upsert_invalid_count":`\u0421\u0447\u0451\u0442\u0447\u0438\u043A \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0439 \u0432\u0435\u0440\u043D\u0443\u043B \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435.`,"rate_limit.exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,reconnect_failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,reconnect_timeout:`\u0412\u0440\u0435\u043C\u044F \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0438\u0441\u0442\u0435\u043A\u043B\u043E. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,selection_expired:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"subscription.admin_api_error":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u0432 \u0434\u0430\u043D\u043D\u044B\u0439 \u043C\u043E\u043C\u0435\u043D\u0442.`,"subscription.admin_api_not_configured":`\u0421\u0435\u0440\u0432\u0438\u0441 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0437\u0430\u044F\u0432\u043E\u043A \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D.`,"subscription.admin_api_unavailable":`\u0421\u0435\u0440\u0432\u0438\u0441 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0437\u0430\u044F\u0432\u043E\u043A \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"subscription.admin_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"subscription.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"subscription.credits_maximum":`\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043A\u0443\u043F\u043A\u0430 \u2014 100 000 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"subscription.credits_minimum":`\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043A\u0443\u043F\u043A\u0430 \u2014 100 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"subscription.invalid_plan":`\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0442\u0430\u0440\u0438\u0444\u043D\u044B\u0439 \u043F\u043B\u0430\u043D.`,"subscription.payments_disabled":`\u041E\u043F\u043B\u0430\u0442\u0430 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0444\u043E\u0440\u043C\u0443 \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0430 \u0430\u043F\u0433\u0440\u0435\u0439\u0434.`,"subscription.plan_config_missing":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E \u0442\u0430\u0440\u0438\u0444\u043D\u043E\u0433\u043E \u043F\u043B\u0430\u043D\u0430, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"subscription.plan_not_found":`\u0422\u0430\u0440\u0438\u0444\u043D\u044B\u0439 \u043F\u043B\u0430\u043D \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"subscription.request_already_open":`\u0423 \u0432\u0430\u0448\u0435\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0430 \u043D\u0430 \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u0438. \u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0435\u0451 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438, \u043F\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043C \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u043D\u043E\u0432\u0443\u044E.`,"subscription.seats_exceed_limit":`\u041D\u0435\u043B\u044C\u0437\u044F \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043C\u0435\u0441\u0442\u0430: \u043F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C, \u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0442\u0430\u0440\u0438\u0444\u0430.`,"subscription.seats_invalid":`\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442. \u0414\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043E\u0442 1 \u0434\u043E 100.`,"subscription.seats_unlimited":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u0443\u0436\u0435 \u0432\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u043D\u0435\u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442.`,"ws.conversation_not_found":`\u0414\u0438\u0430\u043B\u043E\u0433 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ws.rate_limit_company":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.rate_limit_fleet":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.rate_limit_user":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.run_not_found":`\u0417\u0430\u043F\u0443\u0441\u043A Progon \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ws.runner_already_claimed":`\u0418\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C \u0443\u0436\u0435 \u0437\u0430\u043D\u044F\u0442 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0430.`,"ws.runner_not_owner":`\u041F\u0440\u0430\u0432\u043E \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0443\u0442\u0435\u0440\u044F\u043D\u043E. \u041F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u0441\u044C.`,"ws.runner_restore_unavailable":`\u041D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F.`,"ws.runner_restore_window_expired":`\u041E\u043A\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,"ws.session_not_found":`\u0421\u0435\u0441\u0441\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ws.unauthorized_channel":`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u0438\u043B\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"workflows.agents_over_max":`\u00AB\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u0432\u00BB \u0443\u043C\u0435\u043D\u044C\u0448\u0438\u043B\u0438 \u2014 \u00AB\u0423\u0441\u0438\u043B\u0438\u0435\u00BB \u0441\u0434\u0432\u0438\u043D\u0443\u0442\u043E \u043D\u0430 \u043D\u043E\u0432\u044B\u0439 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C, \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"workflows.not_found":`\u0420\u043E\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"workflows.not_initiator_or_admin":`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439 \u043C\u043E\u0436\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u0442\u043E\u0442, \u043A\u0442\u043E \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B, \u0438\u043B\u0438 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},byProviderCode:{"ai.zai.insufficient_balance":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u2014 \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043D\u0430 \u0441\u0447\u0451\u0442\u0435 \u043B\u0438\u0431\u043E \u043A\u043B\u044E\u0447 \u0438 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0431\u0430\u043B\u0430\u043D\u0441 \u0438 \u043A\u043B\u044E\u0447 Z.AI.`,"ai.zai.rate_limited":`Z.AI \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u043E\u0442\u0443 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.overloaded":`\u0421\u0435\u0440\u0432\u0438\u0441 Z.AI \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.quota_exhausted":`\u041A\u0432\u043E\u0442\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F Z.AI \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D\u0430. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043B\u0438\u043C\u0438\u0442\u044B \u0432\u0430\u0448\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 Z.AI.`,"ai.zai.plan_restricted":`\u042D\u0442\u043E\u0442 \u043A\u043B\u044E\u0447 Z.AI \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D\u043D\u043E\u0439 \u043F\u043E\u0434\u043F\u0438\u0441\u043A\u043E\u0439 \u0438\u043B\u0438 \u043F\u043B\u0430\u043D\u043E\u043C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0430\u0448 \u043F\u043B\u0430\u043D Z.AI.`,"ai.zai.content_policy":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u0438\u0437-\u0437\u0430 \u043F\u043E\u043B\u0438\u0442\u0438\u043A\u0438 \u0432 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430.`,"ai.zai.unknown_model":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C Z.AI \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u0430. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C GLM.`,"ai.zai.auth_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0432 Z.AI. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435, \u0447\u0442\u043E API-\u043A\u043B\u044E\u0447 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D \u0438 \u0430\u043A\u0442\u0438\u0432\u0435\u043D.`,"ai.zai.invalid_request":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u043A\u0430\u043A \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0432\u043E\u0434 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.context_overflow":`\u0414\u0438\u0430\u043B\u043E\u0433 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043B\u0438\u043D\u043D\u044B\u0439 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 Z.AI. \u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u0441\u043E\u043A\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0432\u043E\u0434.`,"ai.zai.vision_not_supported":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C Z.AI \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F. \u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439.`,"ai.zai.abnormal_termination":`\u041E\u0442\u0432\u0435\u0442 Z.AI \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0441\u044F \u043D\u0435\u0448\u0442\u0430\u0442\u043D\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"ai.zai.provider_error":`Z.AI \u0432\u0435\u0440\u043D\u0443\u043B \u043E\u0448\u0438\u0431\u043A\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},wf=e=>q(e,{one:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435`,few:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,many:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439`}),Tf=e=>q(e,{one:`\u0430\u0433\u0435\u043D\u0442`,few:`\u0430\u0433\u0435\u043D\u0442\u0430`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`}),Ef={cards:Sf,shell:{header:{title:`Progon`,history:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F`,newConversation:`\u041D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433`,noProject:`\u041F\u0440\u043E\u0435\u043A\u0442 \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D`},composer:{inputLabel:`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0443`,placeholder:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 Progon\u2026`,placeholderNoModels:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430, \u043F\u043E\u043A\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439`,placeholderSignIn:`\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438`,placeholderNoProject:`\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0435\u043A\u0442`,placeholderOffline:`\u041D\u0435\u0442 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,send:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,stop:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442`,placeholderWithFiles:`\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0441 \u0444\u0430\u0439\u043B\u0430\u043C\u0438\u2026`,sendBlocked:{uploading:`\u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0444\u0430\u0439\u043B\u043E\u0432`,refused:`\u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,noText:`\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043A \u0444\u0430\u0439\u043B\u0430\u043C`},settingsLabel:`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0442\u0432\u0435\u0442\u0430`,effort:{name:`\u0423\u0441\u0438\u043B\u0438\u0435`,note:`\u041E\u0442\u0432\u0435\u0442\u044B \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0438 \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0438`,levels:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439`,thinking:`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435`,max:`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C`},rows:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0435 \u043E\u0442\u0432\u0435\u0442\u044B, \u0437\u0430\u043F\u0443\u0441\u043A\u0438 \u043E\u0434\u043D\u0438\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u043C`,thinking:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0438 \u0430\u0433\u0435\u043D\u0442 \u0434\u0443\u043C\u0430\u044E\u0442 \u0433\u043B\u0443\u0431\u0436\u0435`,max:`\u0413\u043B\u0443\u0431\u0436\u0435, \u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0438 \u2014 \u0440\u043E\u0435\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u0432`},footer:`\u0414\u0435\u0440\u0436\u0438\u0442\u0441\u044F \u0434\u043E \u043A\u043E\u043D\u0446\u0430 \u0431\u0435\u0441\u0435\u0434\u044B. \u041D\u043E\u0432\u0430\u044F \u0431\u0435\u0441\u0435\u0434\u0430 \u043D\u0430\u0447\u043D\u0451\u0442\u0441\u044F \u0441 \u00AB\u041E\u0431\u044B\u0447\u043D\u044B\u0439\u00BB.`,chipMax:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e} ${Tf(e)}`,chipMaxShort:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e}`,long:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439 \u00B7 \u043E\u0434\u0438\u043D \u0430\u0433\u0435\u043D\u0442`,thinking:`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435 \u00B7 \u043E\u0434\u0438\u043D \u0430\u0433\u0435\u043D\u0442`,max:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e} ${Tf(e)}`},chipLabel:e=>`\u0423\u0441\u0438\u043B\u0438\u0435: ${e}`,reasonPlace:`\u041D\u0443\u0436\u0435\u043D \u0431\u0440\u0430\u0443\u0437\u0435\u0440: \u00AB\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C\u00BB \u2014 \u044D\u0442\u043E \u043E\u043A\u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,agents:{label:`\u0410\u0433\u0435\u043D\u0442\u043E\u0432`,limit:e=>`\u041D\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u2014`,settingsLink:`\u00AB\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0418\u0418 \u2192 \u0420\u043E\u0439 \u0430\u0433\u0435\u043D\u0442\u043E\u0432\u00BB`,groupLabel:`\u0427\u0438\u0441\u043B\u043E \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,fewer:`\u041C\u0435\u043D\u044C\u0448\u0435 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,more:`\u0411\u043E\u043B\u044C\u0448\u0435 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`}},permission:{groupLabel:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`,menuNote:`\u0414\u043B\u044F \u044D\u0442\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u044B`,chipLabel:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F: ${e}`,ask:`\u0421\u043F\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044C`,bypass:`\u0411\u0435\u0437 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439`,askHint:`\u0417\u0430\u043F\u0443\u0441\u043A\u0438 \u0438 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u044B\u0435 \u043F\u0440\u0430\u0432\u043A\u0438 \u0436\u0434\u0443\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,bypassHint:`\u0417\u0430\u043F\u0443\u0441\u043A\u0438 \u0438 \u043F\u0440\u0430\u0432\u043A\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u044E\u0442\u0441\u044F \u0441\u0440\u0430\u0437\u0443. \u0423\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0432\u0441\u0451 \u0440\u0430\u0432\u043D\u043E \u0436\u0434\u0443\u0442 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,arrived:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F: ${e}`},place:{name:`\u0413\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C`,note:`\u0414\u043B\u044F \u0432\u0441\u0435\u0445 \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u0438\u0437 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,title:`\u0413\u0434\u0435 \u0418\u0418 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: \u044D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0440\u0430\u043D\u043D\u0435\u0440 \u0438\u043B\u0438 \u0431\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,chipLabel:e=>`\u0413\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C: ${e}`,thisBrowser:`\u042D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,thisBrowserRowOpensWindows:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0444\u043E\u043D\u0435 \u044D\u0442\u043E\u0433\u043E Chrome`,thisBrowserRowTasksOnly:`\u0412 \u0432\u0435\u0431-\u0447\u0430\u0442\u0435 \u2014 \u0442\u043E\u043B\u044C\u043A\u043E \u0437\u0430\u0434\u0430\u043D\u0438\u044F; \u043F\u0440\u043E\u0433\u043E\u043D \u0438 \u043E\u0431\u0445\u043E\u0434 \u2014 \u0441 \u0440\u0430\u043D\u043D\u0435\u0440\u0430 \u0438\u043B\u0438 \u0438\u0437 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438`,none:`\u0411\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,noneRow:`\u0422\u043E\u043B\u044C\u043A\u043E API-\u0437\u0430\u043F\u0440\u043E\u0441\u044B \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,runner:e=>`\u0420\u0430\u043D\u043D\u0435\u0440 ${e}`,runnerUnread:`\u0420\u0430\u043D\u043D\u0435\u0440`,runnerGone:`\u0420\u0430\u043D\u043D\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,runnerGoneHint:`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0430\u043D\u043D\u0435\u0440 \u0443\u0434\u0430\u043B\u0451\u043D \u0438\u043B\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0430\u043C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u0433\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C.`,runnerFree:`\u0421\u0432\u043E\u0431\u043E\u0434\u0435\u043D`,runnerBusy:`\u0417\u0430\u043D\u044F\u0442 \u2014 \u0437\u0430\u043F\u0443\u0441\u043A \u0432\u0441\u0442\u0430\u043D\u0435\u0442 \u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u044C`,runnerBlocked:{notOwner:`\u0417\u0430\u043F\u0443\u0441\u043A \u0442\u043E\u043B\u044C\u043A\u043E \u0443 \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0430`,notEnrolled:`\u0415\u0449\u0451 \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D`,offline:`\u041E\u0444\u043B\u0430\u0439\u043D`},fleetLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0440\u0430\u043D\u043D\u0435\u0440\u044B\u2026`,fleetFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0430\u043D\u043D\u0435\u0440\u044B`,fleetRetry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,fleetEmpty:`\u0412 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u043D\u0435\u0442 \u0440\u0430\u043D\u043D\u0435\u0440\u043E\u0432`,othersGroup:e=>`\u0427\u0443\u0436\u0438\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u044B (${e})`},hint:`Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C, Shift+Enter \u2014 \u043D\u043E\u0432\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430`,plainHint:`Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,attachments:{attach:`\u041F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u0444\u0430\u0439\u043B`,trayLabel:`\u0424\u0430\u0439\u043B\u044B \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,remove:e=>`\u0423\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u00AB${e}\u00BB`,uploading:e=>`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F ${e}%`,uploadingLabel:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 ${e}`,pastedName:e=>`\u0421\u043D\u0438\u043C\u043E\u043A \u044D\u043A\u0440\u0430\u043D\u0430 ${e}`,drop:{title:`\u041E\u0442\u043F\u0443\u0441\u0442\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C`,types:`PNG, JPEG, WebP, PDF, TXT, MD`,sizes:`\u041A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0438 PDF \u0434\u043E 50 \u041C\u0411, \u0442\u0435\u043A\u0441\u0442 \u0434\u043E 4 \u041C\u0411`},retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,reupload:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430`,pickModel:`\u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,refusal:{type:`\u0422\u0430\u043A\u043E\u0439 \u0444\u0430\u0439\u043B \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F: \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F PNG, JPEG, WebP, PDF, TXT, MD`,tooLarge:e=>`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439 \u0444\u0430\u0439\u043B: ${e}`,limit:{image:`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u2014 \u0434\u043E 50 \u041C\u0411`,pdf:`PDF \u2014 \u0434\u043E 50 \u041C\u0411`,text:`\u0442\u0435\u043A\u0441\u0442 \u2014 \u0434\u043E 4 \u041C\u0411`},fileName:`\u0418\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u0434\u043B\u0438\u043D\u043D\u0435\u0435 255 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u2014 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043B \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,empty:`\u0424\u0430\u0439\u043B \u043F\u0443\u0441\u0442\u043E\u0439`,textNotUtf8:`\u0422\u0435\u043A\u0441\u0442 \u043D\u0435 \u0432 UTF-8 \u2014 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0432 UTF-8 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,unreadable:`\u0424\u0430\u0439\u043B \u043D\u0435 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044F \u2014 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043E\u043D \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0451\u043D`,contentMismatch:e=>`\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043D\u0435 \u043F\u043E\u0445\u043E\u0436\u0435 \u043D\u0430 ${e} \u2014 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u0444\u0430\u0439\u043B`,pdfEncrypted:`PDF \u0437\u0430\u0449\u0438\u0449\u0451\u043D \u043F\u0430\u0440\u043E\u043B\u0435\u043C \u2014 \u0441\u043D\u0438\u043C\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,server:`\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u0444\u0430\u0439\u043B`,failedNetwork:`\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C`,failedServer:`\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B`,expired:`\u041D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0441\u0443\u0442\u043A\u0438 \u2014 \u044D\u0442\u043E\u0442 \u0443\u0436\u0435 \u0443\u0434\u0430\u043B\u0451\u043D`,modelNoFiles:e=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u2014 `,modelNoType:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 ${t} \u2014 `,modelFact:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u044D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B: ${t} \u2014 `},announce:{uploaded:e=>`\u0424\u0430\u0439\u043B \u00AB${e}\u00BB \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D`,refused:(e,t)=>`\u0424\u0430\u0439\u043B \u00AB${e}\u00BB \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C: ${t}`}}},transcript:{copyAnswer:{label:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442`,done:`\u041E\u0442\u0432\u0435\u0442 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442`},activity:{done:e=>`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e} ${q(e,{one:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,few:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,many:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`})}`,doneOf:(e,t)=>`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e} \u0438\u0437 ${t} ${q(t,{one:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,few:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`,many:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`})}`,doneShort:e=>`\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e}`,failedShort:e=>`${e} \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439`,running:e=>`\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F: ${e}`,failed:`\u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,unknown:`\u0438\u0441\u0445\u043E\u0434 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`},feedLabel:`\u041B\u0435\u043D\u0442\u0430 \u0434\u0438\u0430\u043B\u043E\u0433\u0430`,scrollToBottom:`\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u0432\u043D\u0438\u0437`,olderHistory:{loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u044E \u0440\u0430\u043D\u043D\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F\u2026`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0430\u043D\u043D\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},leadByline:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u043E\u044F`,taskLeadByline:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,thinking:`\u0414\u0443\u043C\u0430\u044E\u2026`,thoughtFor:e=>`\u0414\u0443\u043C\u0430\u043B ${e} \u0441`,thinkingPhase:`\u0414\u0443\u043C\u0430\u044E\u2026`,toolCall:`\u0412\u044B\u0437\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430`,toolCallCancelled:`\u0412\u044B\u0437\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u043E\u0442\u043C\u0435\u043D\u0451\u043D`,toolCallStatus:{confirmed:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,waitingForBrowser:`\u041E\u0436\u0438\u0434\u0430\u0435\u043C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,stoppingBrowser:`\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435\u2026`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,rejected:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,rejectedLeadGrant:`\u041D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043E \u2014 \u043F\u043E\u0439\u0434\u0451\u0442 \u0432 \u043E\u0442\u0447\u0451\u0442 \u00B7 \u0432\u044B`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E: \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`,unknown:`\u0418\u0441\u0445\u043E\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`,launchedElsewhere:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E \u0432 \u043D\u043E\u0432\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u0435`,openConversation:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0431\u0435\u0441\u0435\u0434\u0443`},unknownTool:{title:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u042D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043D\u0435 \u0443\u043C\u0435\u0435\u0442 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u044D\u0442\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},stopFailed:{rejected:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u043A\u043E\u043C\u0430\u043D\u0434\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,ack_timeout:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,not_open:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,connection_closed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},details:`\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438`,cardsFailed:{title:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u044D\u0442\u043E\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430.`,text:`\u0422\u0435\u043A\u0441\u0442 \u043E\u0442\u0432\u0435\u0442\u0430 \u0432\u044B\u0448\u0435 \u043D\u0435 \u043F\u043E\u0441\u0442\u0440\u0430\u0434\u0430\u043B.`,retry:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430`}},empty:{heading:`\u0427\u0435\u043C \u043C\u043E\u0433\u0443 \u043F\u043E\u043C\u043E\u0447\u044C?`,subtext:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043E \u0442\u0435\u0441\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438 \u0438\u043B\u0438 \u043F\u043E\u0440\u0443\u0447\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,footnote:`\u041A\u043B\u0438\u043A \u0432\u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0433\u043E\u0442\u043E\u0432\u043A\u0443 \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0432 \u043F\u043E\u043B\u0435 \u2014 \u043F\u043E\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435`,reportHeading:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043F\u0440\u043E \u044D\u0442\u043E\u0442 \u043E\u0442\u0447\u0451\u0442`},errors:{classes:{rateLimit:{title:`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432`,hint:`\u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435`},credits:{title:`\u041B\u0438\u043C\u0438\u0442 \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0442\u0430\u0440\u0438\u0444 \u0438\u043B\u0438 \u043B\u0438\u043C\u0438\u0442\u044B \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`},auth:{title:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 API-\u043A\u043B\u044E\u0447 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`},connection:{title:`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435`},stalled:{title:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043B \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,hint:null},streamCut:{title:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E`,hint:null},generic:{title:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 Progon`,hint:`\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437`}}},notices:{dismiss:`\u0421\u043A\u0440\u044B\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,capabilities:{title:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,sendBlocked:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430, \u043F\u043E\u043A\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F \u0441\u043D\u043E\u0432\u0430.`,timedOut:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0441\u044F \u0437\u0430 \u043E\u0442\u0432\u0435\u0434\u0451\u043D\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F.`,loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439.`,retry:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439`},permissionReadFailed:{title:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439`,text:`\u0411\u0435\u0437 \u043D\u0435\u0433\u043E \u043D\u043E\u0432\u0443\u044E \u0431\u0435\u0441\u0435\u0434\u0443 \u043D\u0435 \u043D\u0430\u0447\u0430\u0442\u044C. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},permissionWriteFailed:{title:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u00AB${e}\u00BB`,textConversation:e=>`\u0411\u0435\u0441\u0435\u0434\u0430 \u043E\u0441\u0442\u0430\u043B\u0430\u0441\u044C \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB${e}\u00BB.`,textNewConversation:e=>`\u041D\u043E\u0432\u0430\u044F \u0431\u0435\u0441\u0435\u0434\u0430 \u043D\u0430\u0447\u043D\u0451\u0442\u0441\u044F \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB${e}\u00BB.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},unsent:{title:e=>`\u041D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E: ${e} ${wf(e)}`,textWaiting:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0447\u0438\u0442\u0430\u043B\u0441\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043B\u0438\u0441\u044C \u0437\u0434\u0435\u0441\u044C. \u041E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445, \u043A\u043E\u0433\u0434\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F.`,textReady:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0447\u0438\u0442\u0430\u043B\u0441\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043B\u0438\u0441\u044C \u0437\u0434\u0435\u0441\u044C. \u0421\u043F\u0438\u0441\u043E\u043A \u0441\u043D\u043E\u0432\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445 \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u0435.`,textFailed:`\u042D\u0442\u0438 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043D\u0435 \u0434\u043E\u0448\u043B\u0438 \u0434\u043E \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430. \u041E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u0435.`,textReconnect:`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0443\u0439\u0434\u0443\u0442 \u0441\u0430\u043C\u0438, \u043A\u043E\u0433\u0434\u0430 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u043D\u0451\u0442\u0441\u044F.`,listLabel:`\u041D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,send:e=>`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C: ${e}`,discard:e=>`\u0423\u0434\u0430\u043B\u0438\u0442\u044C: ${e}`,sendShort:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,discardShort:`\u0423\u0434\u0430\u043B\u0438\u0442\u044C`},interrupted:{title:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0437\u0430\u043F\u0440\u043E\u0441 \u0431\u044B\u043B \u043F\u0440\u0435\u0440\u0432\u0430\u043D`,text:`\u041E\u0442\u0432\u0435\u0442 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0435 \u043F\u0440\u0438\u0448\u0451\u043B.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},reportInitializing:{title:`\u041E\u0442\u0447\u0451\u0442 \u0435\u0449\u0451 \u0433\u043E\u0442\u043E\u0432\u0438\u0442\u0441\u044F`,text:`\u0414\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u0440\u0430\u0441\u0447\u0451\u0442\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435.`,retry:`\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430`},readiness:{signInTitle:`\u0412\u043E\u0439\u0434\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u043E\u043C`,signInText:`\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043F\u0430\u043F \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F \u0438 \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0432 Progon.`,projectTitle:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0435\u043A\u0442`,projectText:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`},pageScan:{scanning:`\u0421\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B\u2026`,delivering:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F\u2026`,failedTitle:`\u042D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043D\u0435\u043B\u044C\u0437\u044F \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,failed:{no_capturable_tab:`\u041E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u044B\u0439 \u0438\u043B\u0438 \u043D\u0435\u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 (chrome://, \u043C\u0430\u0433\u0430\u0437\u0438\u043D \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439, PDF).`,capture_failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,capture_timeout:`\u0418\u0441\u0442\u0435\u043A\u043B\u043E \u0432\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,oversize_unrecoverable:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u0430\u044F \u0434\u043B\u044F \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F, \u0434\u0430\u0436\u0435 \u0441 \u0443\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435\u043C \u0434\u0435\u0442\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438.`}},history:{loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`}},connection:{reconnecting:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E \u2014 \u043F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F\u2026`,restored:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u2014 \u0441\u043E\u0431\u044B\u0442\u0438\u044F \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u044B.`,failedTitle:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C`,failedHint:{"reload-page":`\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0434\u043B\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F.`,"check-network":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C.`}},history:{title:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0447\u0430\u0442\u043E\u0432`,close:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E`,newChat:`\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442`,search:`\u041F\u043E\u0438\u0441\u043A \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432\u2026`,searchLabel:`\u041F\u043E\u0438\u0441\u043A \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432`,emptyTitle:`\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432`,emptyText:`\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442.`,noResults:e=>`\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043F\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0443 \u00AB${e}\u00BB`,noResultsText:`\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0437\u0430\u043F\u0440\u043E\u0441`,errorTitle:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433\u0438`,errorText:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,loadingMore:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026`,untitled:e=>`\u0414\u0438\u0430\u043B\u043E\u0433 \u043E\u0442 ${e}`,delete:e=>`\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433 \u00AB${e}\u00BB`,deleteFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,reportTag:`\u041E\u0442\u0447\u0451\u0442`,groups:{today:`\u0421\u0435\u0433\u043E\u0434\u043D\u044F`,yesterday:`\u0412\u0447\u0435\u0440\u0430`,previous7Days:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 7 \u0434\u043D\u0435\u0439`,previous30Days:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 30 \u0434\u043D\u0435\u0439`,older:`\u0421\u0442\u0430\u0440\u044B\u0435`}},modelPicker:{selectModel:`\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043C\u043E\u0434\u0435\u043B\u0438\u2026`,currentlySelected:`\u0412\u044B\u0431\u0440\u0430\u043D\u0430`,footerNote:`\u0412\u044B\u0431\u043E\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.`,manageKeys:`\u041A\u043B\u044E\u0447\u0438`,upsell:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447 \u2014 \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise`,upgrade:`\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0442\u0430\u0440\u0438\u0444`,rejected:`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0435\u043C \u0442\u0430\u0440\u0438\u0444\u0435 \u2014 \u0432\u044B\u0431\u0440\u0430\u043D\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,disabledKeyInvalid:`\u041A\u043B\u044E\u0447 \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D \u2014 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`,disabledNoKey:`\u041B\u0438\u0447\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,disabledSuffixA11y:`\u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,tier:{fastest:`\u0421\u0430\u043C\u0430\u044F \u0431\u044B\u0441\u0442\u0440\u0430\u044F`,balanced:`\u0414\u043B\u044F \u043F\u043E\u0432\u0441\u0435\u0434\u043D\u0435\u0432\u043D\u044B\u0445 \u0437\u0430\u0434\u0430\u0447`,smartest:`\u0421\u0430\u043C\u0430\u044F \u0443\u043C\u043D\u0430\u044F`},byok:{personal:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447`,company:`\u041A\u043B\u044E\u0447 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`},byokHeader:{personal:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447`,company:`\u041A\u043B\u044E\u0447 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`}},confirmation:{regionLabel:`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,confirmAll:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u0441\u0435 (${e})`,confirm:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,queuePosition:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 {index} \u0438\u0437 {total}`,warningBadge:`\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F`,unrecognizedTool:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E`,grant:{no:`\u041D\u0435\u0442, \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u043E\u0442\u0447\u0451\u0442`,yes:`\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A\u0435`}},runWait:{title:`\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0439`,status:{waiting:`\u0416\u0434\u0451\u043C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F`,fired:`\u0418\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u044B`,running:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u044E \u0440\u0430\u0437\u0431\u043E\u0440`,done:`\u0420\u0430\u0437\u0431\u043E\u0440 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D`,cancelled:`\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`},subject:{scenario_run:`\u041F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,agent_job:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u0430`,atlas_run:`\u041E\u0431\u0445\u043E\u0434 Atlas`,ai_run:`AI-\u043F\u0440\u043E\u0433\u043E\u043D`,workflow:`\u0420\u043E\u0439`},id:e=>`ID: ${e}`,stopWaiting:`\u041D\u0435 \u0436\u0434\u0430\u0442\u044C`,stopWaitingFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},questions:{pendingTitle:`\u041D\u0443\u0436\u043D\u043E \u0443\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,progress:`\u041E\u0442\u0432\u0435\u0447\u0435\u043D\u043E: {resolved} \u0438\u0437 {total}`,progressLabel:`\u0412\u043E\u043F\u0440\u043E\u0441\u044B`,progressSegmentAnswered:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u043E\u0442\u0432\u0435\u0447\u0435\u043D`,progressSegmentUnanswered:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u0431\u0435\u0437 \u043E\u0442\u0432\u0435\u0442\u0430`,progressSegmentSkipped:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D`,questionIndex:`\u0412\u043E\u043F\u0440\u043E\u0441 {index} \u0438\u0437 {total}`,previousQuestion:`\u041D\u0430\u0437\u0430\u0434`,nextQuestion:`\u0414\u0430\u043B\u0435\u0435`,showAllQuestions:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B`,oneQuestionAtATime:`\u041F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u0432\u043E\u043F\u0440\u043E\u0441\u0443`,recommended:`\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F`,customChoice:`\u0421\u0432\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442`,customAnswerLabel:`\u0421\u0432\u043E\u0439 \u043E\u0442\u0432\u0435\u0442`,customAnswerPlaceholder:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u2026`,textAnswerLabel:`\u041E\u0442\u0432\u0435\u0442`,textAnswerPlaceholder:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043E\u0442\u0432\u0435\u0442\u2026`,skipQuestion:`\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,restoreQuestion:`\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C`,validationSingle:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0434\u0438\u043D \u0432\u0430\u0440\u0438\u0430\u043D\u0442.`,validationMultiple:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u0438\u043D \u043F\u0443\u043D\u043A\u0442.`,validationText:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043E\u0442\u0432\u0435\u0442.`,cancelAll:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0451`,submitAnswers:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,sending:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430`,loading:`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0432\u043E\u043F\u0440\u043E\u0441\u043E\u0432`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,refresh:`\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C`,retryErrorBadge:`\u041D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E`,nonretryableBadge:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,nonretryableDescription:`\u0427\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C, \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u044D\u0442\u0443 \u0431\u0435\u0441\u0435\u0434\u0443 \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043D\u043D\u043E\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0435 (HTTPS).`,staleBadge:`\u0423\u0436\u0435 \u043E\u0442\u0432\u0435\u0447\u0435\u043D\u043E`,unauthorizedBadge:`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430`,unauthorizedDescription:`\u0412\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 \u0432\u0435\u0440\u043D\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u0440\u043E\u0435\u043A\u0442, \u0433\u0434\u0435 \u043D\u0430\u0447\u0430\u043B\u0441\u044F \u044D\u0442\u043E\u0442 \u0434\u0438\u0430\u043B\u043E\u0433.`,unavailableBadge:`\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,answeredTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,answeredBadge:`\u041E\u0442\u0432\u0435\u0447\u0435\u043D\u043E`,continuationPendingBadge:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,continuationRunningBadge:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u0435`,continuationFailedBadge:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C`,skippedBadge:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`,skippedAnswer:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`,cancelledTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,cancelledBadge:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,supersededTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,supersededBadge:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,answerSeparator:`, `,unavailableAnswer:`\u041E\u0442\u0432\u0435\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,arrived:e=>`\u041D\u043E\u0432\u044B\u0439 \u0432\u043E\u043F\u0440\u043E\u0441, \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430 \u2014 \u043D\u0430\u0434 \u043F\u043E\u043B\u0435\u043C \u0432\u0432\u043E\u0434\u0430: ${e}`},agentQuestions:{openRun:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D`,assumptionLabel:`\u041F\u043E\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435\u0442, \u0430\u0433\u0435\u043D\u0442 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442 \u0442\u0430\u043A`,decline:`\u041D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,viaAssistant:`\u041F\u0435\u0440\u0435\u0434\u0430\u043D\u043E \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u043E\u043C \u0441 \u0432\u0430\u0448\u0438\u0445 \u0441\u043B\u043E\u0432`,askerEnded:`\u0410\u0433\u0435\u043D\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B \u0440\u0430\u0431\u043E\u0442\u0443, \u043E\u0442\u0432\u0435\u0442 \u043D\u0435 \u043D\u0443\u0436\u0435\u043D`,leadWaits:`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442`,workersContinue:`\u0420\u0430\u0431\u043E\u0447\u0438\u0435 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u044E\u0442`,agentsIdle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442`},context:{report:{label:`\u041A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u043E\u0442\u0447\u0451\u0442\u0430`,title:e=>`\u041E\u0442\u0447\u0451\u0442: ${e}`,note:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0432\u0438\u0434\u0438\u0442 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442 \u0438 \u0431\u0435\u0440\u0451\u0442 \u0446\u0438\u0444\u0440\u044B \u0438\u0437 \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043D\u043D\u044B\u0445, \u0447\u0442\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430.`,nameUnavailable:`\u0438\u043C\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,entity:{scenario:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,page:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,feature:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0444\u0438\u0447\u0430`},view:{overview:`\u041E\u0431\u0437\u043E\u0440`,stability:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C`,"weak-spots":`\u0421\u043B\u0430\u0431\u044B\u0435 \u0437\u043E\u043D\u044B`,"bug-hotspots":`\u0413\u043E\u0440\u044F\u0447\u0438\u0435 \u0442\u043E\u0447\u043A\u0438`},window:{"7d":`7 \u0434\u043D\u0435\u0439`,"14d":`14 \u0434\u043D\u0435\u0439`,"30d":`30 \u0434\u043D\u0435\u0439`,"90d":`90 \u0434\u043D\u0435\u0439`},lastRuns:(e,t)=>`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 ${e} \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 (\u0434\u043E ${t} \u0434\u043D\u0435\u0439)`,status:{consistently_failing:`\u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442`,flaky:`flaky`,monitoring:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`,insufficient_history:`\u043C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438`,stable:`\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E`},prompts:{overviewWeakSpots:`\u041A\u0430\u043A\u0438\u0435 \u0441\u043B\u0430\u0431\u044B\u0435 \u043C\u0435\u0441\u0442\u0430 \u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430?`,overviewChanged:e=>`\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C \u0437\u0430 ${e}?`,overviewWhereToLook:`\u041A\u0443\u0434\u0430 \u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,stabilityWhyScenario:e=>`\u041F\u043E\u0447\u0435\u043C\u0443 \u00AB${e}\u00BB \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u0435\u043D?`,stabilityWhatToFix:`\u041A\u0430\u043A\u0438\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0447\u0438\u043D\u0438\u0442\u044C \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,stabilityCauses:`\u0420\u0430\u0437\u0431\u0435\u0439 \u043F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u043E \u043F\u0440\u0438\u0447\u0438\u043D\u0430\u043C`,weakSpotsWhatToCover:`\u0427\u0442\u043E \u043F\u043E\u043A\u0440\u044B\u0442\u044C \u0442\u0435\u0441\u0442\u0430\u043C\u0438 \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,weakSpotsWhyEntity:e=>`\u041F\u043E\u0447\u0435\u043C\u0443 \u00AB${e}\u00BB \u0432 \u0441\u043B\u0430\u0431\u044B\u0445 \u0437\u043E\u043D\u0430\u0445?`,bugHotspotsWhere:`\u0413\u0434\u0435 \u0441\u043A\u0430\u043F\u043B\u0438\u0432\u0430\u044E\u0442\u0441\u044F \u0431\u0430\u0433\u0438?`,bugHotspotsStale:`\u041A\u0430\u043A\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0441 \u0431\u0430\u0433\u0430\u043C\u0438 \u0434\u0430\u0432\u043D\u043E \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0438\u0441\u044C?`}}}},errors:Cf,attachments:Vd},Z=S(),Df={ru:Ef,en:zd},Of=(0,R.createContext)(null);function kf({locale:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Of.Provider,{value:e,children:t})}function Q(){let e=(0,R.useContext)(Of);if(e===null)throw Error(`useChatLocale: no <ChatLocaleProvider> above this chat component`);return e}function $(){return Df[Q()]}var Af=1e3,jf=1e6;function Mf(e,t){return new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e)}function Nf(e,t,n){return e>=jf?`${Mf(e/jf,t)} ${n.mb}`:e>=Af?`${Math.round(e/Af)} ${n.kb}`:`${e} ${n.b}`}function Pf(e,t,n){let r=Nf(e.byteSize,t,n.units);if(e.mediaType===`application/pdf`){if(e.pageCount===null)throw Error(`Attachment ${e.id}: an application/pdf without its page count`);return n.facts.pdf(e.pageCount,r)}if(Kn(e.mediaType)){if(e.image===null)throw Error(`Attachment ${e.id}: an ${e.mediaType} without its size`);return n.facts.image(e.image.width,e.image.height,r)}return n.facts.text(r)}function Ff(e){let t=e.lastIndexOf(`.`);return t<=0?{base:e,ext:``}:{base:e.slice(0,t),ext:e.slice(t)}}function If(e,t){let{store:n}=Bf(),{id:r,mediaType:i}=e,a=(0,R.useSyncExternalStore)(n.subscribe,()=>n.get(r),()=>n.get(r)),o=(0,R.useCallback)(()=>n.load({id:r,mediaType:i}),[n,r,i]),s=a.status===`idle`;return(0,R.useEffect)(()=>{t&&s&&o()},[t,s,o]),{content:a,load:o}}var Lf=`button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])`;function Rf({images:e,index:t,onIndex:n,onClose:r}){let i=$().attachments,a=Q(),o=(0,R.useRef)(null),s=(0,R.useRef)(null),c=e[t];if(c===void 0)throw Error(`AttachmentViewer: no image at ${t} of ${e.length}`);let{content:l}=If(c,!0),u=e.length>1;(0,R.useEffect)(()=>{var e;(e=s.current)==null||e.focus({preventScroll:!0})},[]),(0,R.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),r())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]);let d=r=>n((t+r+e.length)%e.length);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{ref:o,className:`qa-ai-chat-viewer`,role:`dialog`,"aria-modal":`true`,"aria-label":i.viewer.label(c.fileName),"data-testid":`ai-chat-attachment-viewer`,onKeyDown:e=>{if(u&&e.key===`ArrowLeft`){e.preventDefault(),d(-1);return}if(u&&e.key===`ArrowRight`){e.preventDefault(),d(1);return}if(e.key!==`Tab`||o.current===null)return;let t=Array.from(o.current.querySelectorAll(Lf)),n=t[0],r=t[t.length-1];n!==void 0&&r!==void 0&&(e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus()))},children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-bar`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-title`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:c.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:Pf(c,a,i)})]}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:i.viewer.openInTab,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,disabled:l.status!==`ready`,onClick:()=>{l.status===`ready`&&window.open(l.url,`_blank`,`noopener`)},children:/* @__PURE__ */ (0,Z.jsx)(Nn,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:i.viewer.close,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:s,type:`button`,className:`qa-ai-chat-ib`,onClick:r,children:/* @__PURE__ */ (0,Z.jsx)(C,{"aria-hidden":`true`})})})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-viewer-stage`,children:l.status===`ready`?/* @__PURE__ */ (0,Z.jsx)(`img`,{src:l.url,alt:c.fileName},c.id):l.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-viewer-failed`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(Br,{"aria-hidden":`true`}),i.viewer.failed]}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-viewer-loading`,role:`img`,"aria-busy":`true`,"aria-label":i.viewer.loading(c.fileName)})}),u&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-nav`,children:[/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:i.viewer.previous,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:()=>d(-1),children:/* @__PURE__ */ (0,Z.jsx)(Pn,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-live":`polite`,children:i.viewer.position(t+1,e.length)}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:i.viewer.next,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:()=>d(1),children:/* @__PURE__ */ (0,Z.jsx)(je,{"aria-hidden":`true`})})})]})]})}var zf=(0,R.createContext)(null);function Bf(){let e=(0,R.useContext)(zf);if(e===null)throw Error(`useChatAttachments: no <ChatAttachmentsProvider> above this chat component`);return e}function Vf({http:e,logger:t,conversationId:n,children:r}){let[i]=(0,R.useState)(()=>qu({http:e,logger:t})),[a,o]=(0,R.useState)(null),s=(0,R.useRef)(null);(0,R.useEffect)(()=>()=>i.clear(),[i,n]);let c=(0,R.useCallback)((e,t,r)=>{s.current=r,o({conversationId:n,images:e,index:t})},[n]),l=(0,R.useCallback)(()=>{o(null);let e=s.current;s.current=null,e!==null&&e.isConnected&&e.focus({preventScroll:!0})},[]),u=(0,R.useMemo)(()=>({store:i,openViewer:c}),[i,c]);return/* @__PURE__ */ (0,Z.jsxs)(zf.Provider,{value:u,children:[r,a!==null&&a.conversationId===n&&/* @__PURE__ */ (0,Z.jsx)(Rf,{images:a.images,index:a.index,onIndex:e=>o({...a,index:e}),onClose:l})]})}function Hf(e,t,n){let r=/* @__PURE__ */ new Map;for(let e of t)r.set(e.id,e);for(let t of e)if(t.attachments!==void 0)for(let e of t.attachments)r.set(e.id,e);let i=0;for(let e of r.values())zn(e,n.attachments).ok||(i+=1);return i}function Uf({messages:e,filesBefore:t,model:n,onPickModel:r}){let i=$().attachments.conversation;if(n===null)return null;let a=Hf(e,t,n);return a===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-files-warning`,role:`status`,"data-testid":`ai-chat-files-warning`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[i.text(n.name,a),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-files-warning-pick`,onClick:r,children:i.pick})]})]})}function Wf(e,t){if(e===null)return null;for(let n of e.groups){let e=n.models.find(e=>e.id===t);if(e!==void 0)return e}return null}function Gf(e,t,n,r){let{reason:i}=r.unsent,a=e.factValue,o=e=>Nf(e,n,r.units),s=e=>Mf(e,n);if(e.fact===`context_window`)return i.contextWindow;if(a===null)return i.unknownSize;switch(e.fact){case`media_type`:throw Error(`factReason: media_type has no fact reason`);case`file_bytes`:return i.fileBytes(o(a));case`image_bytes`:return i.imageBytes(o(Math.floor(a*3/4)));case`request_bytes`:return i.requestBytes(o(a));case`files_bytes`:return i.filesBytes(o(a));case`image_edge`:return i.imageEdge(s(a));case`image_patches`:{let e=t===null||t.attachments===null?null:t.attachments.facts.imageMaxPatches;return e===null?i.unknownSize:i.imagePatches(s(Math.floor(a*e.patchPx**2/1e6)))}case`pdf_pages`:return i.pdfPages(s(a));case`images_count`:return i.imagesCount(s(a));case`many_images_edge`:return i.manyImagesEdge(s(a))}}function Kf(e){let{refusal:t,files:n,models:r,locale:i,copy:a,logger:o}=e;switch(t.errorCode){case Jn.notFound:return{sentence:a.unsent.notFound,resendable:!1};case Jn.alreadySent:return{sentence:a.unsent.alreadySent,resendable:!1};case Jn.unsupportedByModel:{let e=Xn.safeParse(t.params);if(!e.success)return o.error(`chat send refusal: unsupported_by_model params failed validation`,{issues:e.error.issues.map(e=>e.message)}),null;let s=e.data,c=Wf(r,s.modelId),l=c===null?null:c.name;if(s.fact!==`media_type`)return{sentence:a.unsent.unsupported(l,Gf(s,c,i,a)),resendable:!0};if(c!==null&&c.attachments===null)return{sentence:a.unsent.noFiles(l),resendable:!0};let u=new Set(s.attachmentIds),d=[...new Set(n.filter(e=>u.has(e.id)).map(e=>a.typeLabel[e.mediaType]))];return d.length===0?(o.error(`chat send refusal: unsupported_by_model names no file of the turn`,{attachmentIds:s.attachmentIds}),null):{sentence:a.unsent.types(l,d.join(`, `)),resendable:!0}}default:return null}}function qf(e){return{attachments:e.attachments,refusal:e.release===`manual`?e.refusal:null}}function Jf(e){let{models:t,locale:n,copy:r,logger:i}=e;return e=>{let{attachments:a,refusal:o}=qf(e);return{label:a.length===0?null:r.unsent.files(a.length),refusal:o===null?null:Kf({refusal:o,files:a,models:t,locale:n,copy:r,logger:i})}}}var Yf=(0,R.createContext)(null);function Xf({value:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Yf.Provider,{value:e,children:t})}function Zf(){let e=(0,R.useContext)(Yf);if(e===null)throw Error(`useChatCardEnvironment: no <ChatCardEnvironmentProvider> above this card`);return e}var Qf=Pt(L(),L()),$f=mt(`target`,[I({target:bt(`workbench`),routeKey:L().min(1),params:Qf.optional(),query:Qf.optional()}),I({target:bt(`detail`),routeKey:L().min(1),params:Qf.optional(),query:Qf.optional()}),I({target:bt(`list`),routeKey:L().min(1),listFilter:Pt(L(),L().optional()),query:Qf.optional()}),I({target:bt(`none`)})]);function ep(e){if(e===void 0)return``;let t=Object.entries(e).filter(e=>e[1]!==void 0&&e[1]!==``);return t.length===0?``:`?${t.map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`)}`}function tp(e){if(e===void 0)return``;let t=Object.values(e).filter(e=>e!==``);return t.length===0?``:`/${t.map(e=>encodeURIComponent(e)).join(`/`)}`}function np(e){if(!Number.isInteger(e)||e<=0)throw Error(`entity-route: project number must be a positive integer, got ${String(e)}`);return`${te}/${String(e)}`}function rp(e,t){let n=np(e);switch(t.target){case`none`:return null;case`workbench`:return`${n}/${t.routeKey}${ep(t.query)}`;case`detail`:return`${n}/${t.routeKey}${tp(t.params)}${ep(t.query)}`;case`list`:return`${n}/${t.routeKey}${ep(t.listFilter)}`}}var ip=`{projectRef}`;function ap(e,t){return e.startsWith(`/project/${ip}/`)?`${np(t)}${e.slice(`${te}/${ip}`.length)}`:null}var op=[`scenario`,`bug`,`checklist-item`,`checklist`,`saved-request`,`collection`,`shared-step`,`run`,`test-run`,`page`,`test-plan`,`environment`,`variable`,`incident`,`atlas-fact`,`api-folder`,`api-endpoint`,`section`];function sp(e){return op.includes(e)}var cp={scenario:{tone:`scenario`,icon:/* @__PURE__ */ (0,Z.jsx)(Wr,{size:16})},bug:{tone:`error`,icon:/* @__PURE__ */ (0,Z.jsx)(Sr,{size:16})},"checklist-item":{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(Tn,{size:16})},checklist:{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(Tn,{size:16})},"saved-request":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(r,{size:16})},collection:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Zn,{size:16})},"shared-step":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(an,{size:16})},run:{tone:`success`,icon:/* @__PURE__ */ (0,Z.jsx)($r,{size:16})},"test-run":{tone:`success`,icon:/* @__PURE__ */ (0,Z.jsx)($r,{size:16})},page:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(In,{size:16})},"test-plan":{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(Tn,{size:16})},environment:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(oi,{size:16})},variable:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16})},incident:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(Ze,{size:16})},"atlas-fact":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(qr,{size:16})},"api-folder":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Zn,{size:16})},"api-endpoint":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(oi,{size:16})},section:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(Zn,{size:16})}},lp={tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(In,{size:16})};function up(e){return sp(e)?cp[e]:lp}function dp(e,t){return sp(e)?t.entityType[e]:e}var fp=(0,R.createContext)(`open`);function pp({mode:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(fp.Provider,{value:e,children:t})}function mp(){return(0,R.useContext)(fp)}var hp=(0,R.createContext)(()=>void 0);function gp({hold:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(hp.Provider,{value:e,children:t})}function _p(){return(0,R.useContext)(hp)}var vp=(0,R.createContext)(()=>void 0);function yp({reveal:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(vp.Provider,{value:e,children:t})}function bp(){return(0,R.useContext)(vp)}function xp(e,t){return[`qa-chat-card`,e===void 0||e===`neutral`?void 0:`qa-chat-card--${e}`,t].filter(Boolean).join(` `)}function Sp({props:e,fold:t}){let{icon:n,tileTone:r=`primary`,meta:i,tone:a,children:o,sections:s,note:c,footer:l,className:u,role:d,data:f}=e,[p,m]=(0,R.useState)(!1),[h,g]=(0,R.useState)(0),[_,v]=(0,R.useState)(!1),y=_p(),b=bp(),x=(0,R.useId)(),S=(0,R.useRef)(null),C=(0,R.useRef)(null),{handle:w,linked:T=!1,onLinkChange:E}=t;return(0,R.useImperativeHandle)(w,()=>({reveal(){y(),m(!0),v(!1),g(e=>e+1)}}),[y]),(0,R.useEffect)(()=>{var e;if(h===0)return;let t=S.current;t!==null&&b(t),(e=C.current)==null||e.focus({preventScroll:!0}),v(!0)},[h,b]),/* @__PURE__ */ (0,Z.jsxs)(`article`,{ref:S,className:[xp(a,u),`qa-chat-card--fold`,p&&`qa-chat-card--fold-open`,T&&`qa-chat-card--linked`,_&&`qa-chat-card--revealed`].filter(Boolean).join(` `),role:d,"aria-label":e[`aria-label`],"aria-labelledby":e[`aria-labelledby`],"aria-busy":e[`aria-busy`],"data-card-fold":p?`open`:`folded`,...E===void 0?{}:{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onFocus:()=>E(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||E(!1)}},onAnimationEnd:e=>{e.target===e.currentTarget&&v(!1)},...f,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${r}`,"aria-hidden":`true`,children:n}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-text`,children:[/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:C,type:`button`,className:`qa-chat-card__fold-toggle`,"aria-expanded":p,"aria-controls":x,onClick:()=>{y(),m(e=>!e)},children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__fold-facts`,children:t.facts})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-side`,children:[i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__meta`,children:i}),t.quickActions,/* @__PURE__ */ (0,Z.jsx)(ve,{className:`qa-chat-card__fold-chevron`,size:16,"aria-hidden":`true`})]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:x,className:`qa-chat-card__fold-region`,hidden:!p,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__body`,children:o}),s,c!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__note`,children:c}),l]})]})}function Cp(e){let t=mp();return e.bare!==!0&&e.fold!==void 0&&(t===`folded`||t===`open-until-decided`&&e.fold.decided===!0)?/* @__PURE__ */ (0,Z.jsx)(Sp,{props:e,fold:e.fold}):/* @__PURE__ */ (0,Z.jsx)(wp,{...e})}function wp(e){let{icon:t,tileTone:n=`primary`,title:r,caption:i,meta:a,tone:o=`neutral`,children:s,sections:c,note:l,footer:u,className:d,bare:f=!1,role:p,data:m}=e,h=xp(o,d);return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:h,role:p,"aria-label":e[`aria-label`],"aria-labelledby":e[`aria-labelledby`],"aria-busy":e[`aria-busy`],...m,children:[f?s:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${n}`,"aria-hidden":`true`,children:t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__titles`,children:[/* @__PURE__ */ (0,Z.jsx)(`h3`,{className:`qa-chat-card__title`,children:r}),i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-chat-card__caption`,children:i})]}),a!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__meta`,children:a})]}),s]}),c,l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__note`,children:l}),u]})}function Tp(e){let{tone:t=`success`,dot:n=!0,children:r,role:i,className:a}=e,o=[`qa-chat-card__pill`,`qa-chat-card__pill--${t}`,a].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:o,role:i,"aria-live":e[`aria-live`],children:[n&&/* @__PURE__ */ (0,Z.jsx)(`i`,{className:`qa-chat-card__pill-dot`,"aria-hidden":`true`}),r]})}function Ep({children:e,missing:t=!1,ref:n}){return/* @__PURE__ */ (0,Z.jsx)(`h4`,{ref:n,className:`qa-chat-card__subject${t?` qa-chat-card__subject--missing`:``}`,children:e})}function Dp({children:e,clamp:t=!1}){return/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-chat-card__lead${t?` qa-chat-card__lead--clamp`:``}`,children:e})}function Op(e){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-chat-card__rows`,"aria-label":e[`aria-label`],children:e.children})}function kp({label:e,value:t}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-chat-card__row`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__row-key`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__row-value`,children:t})]})}function Ap(e){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-chat-card__list`,"aria-label":e[`aria-label`],children:e.children})}function jp({icon:e,tileTone:t=`primary`,name:n,note:r,noteWraps:i=!1,trailing:a}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-chat-card__list-item${i?` qa-chat-card__list-item--wrap`:``}`,children:[e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${t}`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-chat-card__list-grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__list-name`,children:n}),r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__list-note`,children:r})]}),a]})}function Mp({summary:e,children:t,defaultOpen:n=!1,className:r}){return/* @__PURE__ */ (0,Z.jsxs)(`details`,{className:[`qa-chat-card__disclosure`,r].filter(Boolean).join(` `),open:n?!0:void 0,children:[/* @__PURE__ */ (0,Z.jsxs)(`summary`,{className:`qa-chat-card__disclosure-summary`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__disclosure-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(ve,{size:14})}),e]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__disclosure-body`,children:t})]})}function Np({children:e,className:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:[`qa-chat-card__actions`,t].filter(Boolean).join(` `),children:e})}function Pp({icon:e,title:t,text:n,actions:r}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__empty`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__empty-icon`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{className:`qa-chat-card__empty-title`,children:t}),n!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-chat-card__empty-text`,children:n}),r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__empty-actions`,children:r})]})}var Fp=`qa-card-kit`;function Ip({icon:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-card-kit__note-line`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__note-icon`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t})]})}function Lp({tip:e,children:t,className:n}){return/* @__PURE__ */ (0,Z.jsx)(xe,{content:e,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(`qa-card-kit__tipped`,n),tabIndex:0,children:t})})}function Rp({value:e,base:t}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-card-kit__v-stack`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:t})]})}function zp({path:e,label:t,accessibleName:n,emphasis:r=`primary`}){let{navigation:i}=Zf(),a=$().cards;return/* @__PURE__ */ (0,Z.jsx)(N,{variant:r,size:`sm`,icon:i.opensInNewTab?/* @__PURE__ */ (0,Z.jsx)(Nn,{size:14}):void 0,"aria-label":`${n}${i.opensInNewTab?a.common.newTabSuffix:``}`,onClick:()=>i.openPath(e),children:t})}function Bp({label:e,icon:t,onClick:n,disabledReason:r}){return r===void 0?/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:e,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-chat-card__quick`,onClick:n,children:t})}):/* @__PURE__ */ (0,Z.jsx)(se,{disabled:!0,reason:r,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-chat-card__quick`,"aria-label":e,children:t})})}function Vp({size:e}){let{navigation:t}=Zf();return t.opensInNewTab?/* @__PURE__ */ (0,Z.jsx)(Nn,{size:e}):/* @__PURE__ */ (0,Z.jsx)(wn,{size:e})}function Hp({title:e,body:t,family:n,resultKind:r}){let{logger:i}=Zf();return(0,R.useEffect)(()=>{i.warn(`chat result not supported by its card`,{card:n,resultKind:r})},[i,n,r]),/* @__PURE__ */ (0,Z.jsx)(Cp,{className:h(Fp,`qa-card-kit--unsupported`),icon:/* @__PURE__ */ (0,Z.jsx)(ti,{size:16}),tileTone:`muted`,title:e,"aria-label":e,children:/* @__PURE__ */ (0,Z.jsx)(Dp,{children:t})})}function Up({label:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head`,children:e}),t]})}function Wp(e){return`path`in e}function Gp({row:e}){let{navigation:t}=Zf(),n=$().cards.common,{open:r}=e,i=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${e.tile.tone} qa-ref__tile`,"aria-hidden":`true`,children:e.tile.icon}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ref__grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(`qa-ref__name`,e.nameMissing&&`qa-ref__name--missing`),children:e.name}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ref__note`,children:[e.note,Wp(r)&&r.destination!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__dest`,children:` \u00B7 ${r.destination}`})]})]})]});if(!Wp(r))return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ref`,role:`note`,"aria-label":r.ariaLabel,children:[i,/* @__PURE__ */ (0,Z.jsx)(xe,{content:r.hint,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__pill`,tabIndex:0,children:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`neutral`,className:`qa-card-kit__pill-plain`,children:r.pill})})})]});let a=`${r.action}: ${e.name}${t.opensInNewTab?n.newTabSuffix:``}`;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ref qa-ref--clickable`,children:[i,/* @__PURE__ */ (0,Z.jsx)(xe,{content:r.action,relationship:`none`,children:/* @__PURE__ */ (0,Z.jsxs)(N,{variant:`secondary`,size:`sm`,className:`qa-ref__open`,icon:/* @__PURE__ */ (0,Z.jsx)(Vp,{size:14}),"aria-label":a,onClick:()=>t.openPath(r.path),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__open-label`,children:n.open}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__open-label-wide`,children:r.action})]})})]})}function Kp({groupAria:e,rows:t}){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-refs`,role:`group`,"aria-label":e,children:t.map(e=>/* @__PURE__ */ (0,Z.jsx)(Gp,{row:e},e.key))})}function qp({title:e,groupAria:t,icon:n,rows:r}){return/* @__PURE__ */ (0,Z.jsx)(Cp,{className:`${Fp} qa-ref-card`,icon:n,tileTone:`info`,title:e,"aria-label":e,meta:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:r.length}),children:/* @__PURE__ */ (0,Z.jsx)(Kp,{groupAria:t,rows:r})})}var Jp=I({type:L(),id:L(),projectId:L(),label:L(),open:$f}),Yp=F(Jp),Xp=`map`;function Zp(e){switch(e.target){case`workbench`:return`workbench`;case`detail`:return e.routeKey===Xp?`map`:`run`;case`list`:return`list`}}function Qp(e){let t=$().cards,{project:n}=Zf();return e.map((e,r)=>{let i=e.label.trim().length===0,a=i?t.common.missingName:e.label,o={key:`${e.type}:${e.id}:${String(r)}`,tile:up(e.type),name:a,nameMissing:i,note:dp(e.type,t.common)},s=n===null||e.projectId!==n.id?null:rp(n.number,e.open);if(e.open.target===`none`||s===null)return{...o,open:{pill:t.common.noOpenTarget,hint:t.common.noOpenTargetHint,ariaLabel:t.references.noOpenAria(a)}};let c=Zp(e.open);return{...o,open:{path:s,action:t.references.action[c],destination:t.references.destination[c]}}})}function $p(e){let t=/* @__PURE__ */ new Set;return e.filter(e=>{let n=`${e.projectId}:${e.type}:${e.id}`;return!t.has(n)&&(t.add(n),!0)})}function em({row:e}){let{navigation:t}=Zf(),n=$().cards.common,{open:r}=e,i=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link__icon`,"aria-hidden":`true`,children:e.tile.icon}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(`qa-ai-chat-link__name`,e.nameMissing&&`qa-ai-chat-link__name--missing`),children:e.name}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-link__type`,children:e.note})]});return Wp(r)?/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsx)(xe,{content:r.action,relationship:`none`,children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-link`,"aria-label":`${r.action}: ${e.name}${t.opensInNewTab?n.newTabSuffix:``}`,onClick:()=>t.openPath(r.path),children:[i,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link__open`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Vp,{size:12})})]})})}):/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsx)(xe,{content:r.hint,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link qa-ai-chat-link--inert`,role:`note`,tabIndex:0,"aria-label":r.ariaLabel,children:i})})})}function tm({references:e}){let t=$().cards.references,n=Qp($p(e));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-links`,"data-testid":`ai-chat-references`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-links__label`,"aria-hidden":`true`,children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-links__list`,"aria-label":t.groupAria,children:n.map(e=>/* @__PURE__ */ (0,Z.jsx)(em,{row:e},e.key))})]})}function nm({entries:e}){let t=$().cards.references,n=e.flatMap(e=>e.outcome.status===`accepted`?[...e.outcome.result]:[]),r=e.flatMap((e,t)=>e.outcome.status===`rejected`?[{key:String(t),raw:e.outcome.raw}]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&/* @__PURE__ */ (0,Z.jsx)(tm,{references:n}),r.map(e=>/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`references`,resultKind:lm(e.raw)},e.key))]})}var rm={id:`references`,schema:Yp,Card:nm};function im(e){if(typeof e!=`object`||!e||!(`entities`in e))return;let t=e.entities;if(!Array.isArray(t)||!t.every(e=>typeof e==`object`&&!!e&&typeof e.projectId==`string`))return;let n=Yp.safeParse(t);return n.success?n.data:void 0}var am=I({tool:L(),error:I({code:L(),message:L()})});function om(e){let t;try{t=JSON.parse(e)}catch{return!1}return am.safeParse(t).success}function sm(e){return typeof e==`string`?om(e):typeof e==`object`&&!!e&&`success`in e&&e.success===!1}function cm(e){return typeof e==`object`&&!!e&&`outcome`in e&&e.outcome===`unknown`}function lm(e){return typeof e==`object`&&e&&`resultKind`in e&&typeof e.resultKind==`string`?e.resultKind:null}var um=I({projectId:jt(),changeSetId:jt(),changeSetItemId:jt(),environment:pt,variableName:L().regex(ot),replacesExistingValue:Ht(),description:L().nullable(),valueDeposit:I({byUserId:jt(),at:Nt()}).nullable()});I({value:L().min(1).max(Tt)}).strict();var dm=I({changeSetItemId:jt(),valueReceived:bt(!0),expiresAt:Nt()}).strict(),fm=I({changeSetId:L().min(1),projectId:L().min(1),mode:Ct([`auto_undo`,`preview_confirm`,`confirmed_apply`]).optional()}),pm=I({label:L(),openTarget:$f}),mm=I({type:L(),id:L(),label:L(),open:$f}),hm=I({kind:L(),label:L(),detail:L().optional(),entityRef:mm.optional()}),gm=I({kind:L(),label:L(),reason:L(),cta:pm.optional()}),_m=I({kind:L(),label:L(),detail:L().optional(),cta:pm.optional()}),vm=I({ru:L().min(1),en:L().min(1)}),ym=I({capture:Ct([`awaiting`,`ready`,`unavailable`,`no_screen`]),pageUrl:lt.nullable(),severity:st,finding:I({candidate:xt,open:$f})}),bm=I({actionType:L(),actionTitle:vm,entityLabel:L(),field:L().optional(),before:L().optional(),after:L(),isSecret:Ht().optional(),removesData:Ht(),diffKind:Ct([`replace`,`add`,`delete`,`move`]),bug:ym.optional()}),xm=I({entityType:L().min(1),count:Wt().int().min(0)}),Sm=I({intentSummary:L(),targetEnvironment:I({id:L().min(1),label:L()}).optional(),items:F(bm),cascade:F(xm).optional()}),Cm=I({changeSetId:L().min(1),expectedRevision:Wt().int().min(1),confirmEnabled:Ht()}),wm=I({actionType:L(),actionTitle:vm,entityLabel:L(),status:Ct([`applied`,`failed`,`skipped`]),errorCode:L().optional(),detail:L().optional()}),Tm=I({actionType:L(),actionTitle:vm,entityLabel:L(),before:L().optional(),after:L().optional(),itemStatus:Ct([`applied`,`failed`,`batch_aborted`,`pending`]),errorCode:L().optional()}),Em=I({eligible:Ht(),offeredUntil:L().nullable(),blockedReason:Ct([`stale`,`expired`,`kill_switch`,`not_auto`,`already_undone`]).nullable(),undoneAt:L().nullable(),nonReversedSideEffects:F(L())}),Dm=I({outcome:Ct([`applied`,`partially_applied`,`failed`]),applied:F(wm),failed:F(wm),attempt:Wt().int().min(1),durationMs:Wt().int().nonnegative().optional(),retryAvailable:Ht(),retryApprovalRequestId:jt().nullable().optional(),undo:Em.optional(),rows:F(Tm).optional()}),Om=mt(`reason`,[I({reason:bt(`launch_stopped`)}),I({reason:bt(`finding_filed`),bug:I({id:jt(),number:Wt().int().min(1),filedAt:Nt()})})]),km=I({taskId:L().min(1),projectId:L().min(1),environmentId:L().min(1).optional(),state:L().min(1),revision:Wt().int().min(1),header:I({projectName:L(),scenarioLabel:L().optional(),environmentLabel:L().optional()}),evidence:F(hm),proposal:Sm.optional(),blockers:F(gm),warnings:F(_m),confirmation:Cm.optional(),applySummary:Dm.optional(),confirmDisabledReason:L().min(1).optional(),closure:Om.optional(),secretInputRequests:F(um)}),Am=I({taskSnapshot:km}).transform(e=>e.taskSnapshot),jm=I({taskId:L().min(1),state:L().min(1),revision:Wt().int()}),Mm=[`searching`,`search_results_shown`,`no_results`,`item_selected`,`inspecting`,`ambiguity_choose_target`],Nm=[`proposal_pending`,`confirmation_required`],Pm=[`applying`,`applied`,`partial_failure`,`rejected_no_op`,`undone`,`superseded`,`closed`],Fm=/* @__PURE__ */ new Set([...Mm,...Nm,...Pm]);function Im(e){return Fm.has(e)}function Lm(e){return Mm.includes(e)}var Rm=`confirmation_required`,zm={searching:{marker:`proposed`,tone:`info`,live:!0},search_results_shown:{marker:`proposed`,tone:`info`,live:!1},no_results:{marker:`proposed`,tone:`info`,live:!1},item_selected:{marker:`proposed`,tone:`info`,live:!1},ambiguity_choose_target:{marker:`proposed`,tone:`info`,live:!1},inspecting:{marker:`inspecting`,tone:`info`,live:!0},proposal_pending:{marker:`awaiting`,tone:`primary`,live:!0},confirmation_required:{marker:`awaiting`,tone:`primary`,live:!0},applying:{marker:`applying`,tone:`warning`,live:!0},applied:{marker:`applied`,tone:`success`,live:!1},partial_failure:{marker:`partial`,tone:`error`,live:!1},rejected_no_op:{marker:`rejected`,tone:`neutral`,live:!1},undone:{marker:`undone`,tone:`neutral`,live:!1},superseded:{marker:`superseded`,tone:`neutral`,live:!1},closed:{marker:`closed`,tone:`neutral`,live:!1}};function Bm(e,t){var n;let r=zm[e];return e===`partial_failure`&&((n=t.applySummary)==null?void 0:n.outcome)===`failed`?{...r,marker:`failed`}:r}function Vm(e){return e!==void 0&&e.length>0&&e.every(e=>e.removesData)}function Hm(e){return e!==void 0&&e.some(e=>e.removesData)}function Um(e){return{deletes:Hm(e),destructive:Vm(e)}}function Wm(e){return{variant:e.deletes?`danger-soft`:`primary`,label:e.destructive?`confirmDelete`:`confirm`}}function Gm(e){let t=e==null?void 0:e[0];return e===void 0||t===void 0?null:e.every(e=>e.actionType===t.actionType)?t.actionType:null}function Km(e){return e.confirmDisabledReason!==void 0||e.blockers.length>0?!1:e.confirmation===void 0||e.confirmation.confirmEnabled}var qm=/* @__PURE__ */ new Set([`insert_scenario_step`,`append_scenario_step`]);function Jm(e){let t=Gm(e);return Vm(e)?`delete`:t===null?`layers`:t===`create_bug`?`bug`:t===`create_environment_variable`?`key`:qm.has(t)?`add`:`layers`}function Ym(e,t){switch(e){case`searching`:case`search_results_shown`:case`no_results`:return{kind:`search`,tone:`primary`};case`inspecting`:return{kind:`inspect`,tone:`primary`};case`item_selected`:case`ambiguity_choose_target`:return{kind:`target`,tone:`primary`};case`proposal_pending`:case`confirmation_required`:case`applying`:{var n;let e=Jm((n=t.proposal)==null?void 0:n.items);return{kind:e,tone:e===`delete`?`error`:`primary`}}case`applied`:return{kind:`applied`,tone:`success`};case`partial_failure`:return{kind:`partial`,tone:`error`};case`rejected_no_op`:return{kind:`rejected`,tone:`muted`};case`undone`:return{kind:`undone`,tone:`muted`};case`superseded`:return{kind:`superseded`,tone:`muted`};case`closed`:var r;return{kind:Jm((r=t.proposal)==null?void 0:r.items),tone:`muted`}}}function Xm(e,t){var n;return e===`applied`?`success`:e===`partial_failure`||(e===`proposal_pending`||e===`confirmation_required`)&&Hm((n=t.proposal)==null?void 0:n.items)?`error`:`neutral`}function Zm(e){return{scenarioLabel:e.header.scenarioLabel??null,projectName:e.header.projectName,environmentLabel:e.header.environmentLabel??null}}function Qm(e){let t=e.split(/[_.]/).filter(e=>e.length>0);return t.length===0?e:t.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var $m=[`step`,`scenario_run`,`api_folder`,`api_saved_request`,`checklist_item`,`checklist_item_step`,`test_run_result`],eh=[`stale_guard`,`secret_expired_or_consumed`,`assistant.change_set.batch_aborted`,`assistant.change_set.apply_unexpected_error`,`assistant.ai_write_disabled`,`variables.duplicate_name`],th=[`test_plan_assignment_advance`],nh=[`still_composing`,`awaiting_secret_value`],rh=[`change_sets.undo_stale`,`change_sets.undo_expired`,`change_sets.undo_not_eligible`,`assistant.ai_write_disabled`];function ih(e,t){return e.includes(t)}var ah=Gt();function oh(e,t){if(e===void 0||!e.retryAvailable)return null;let n=e.retryApprovalRequestId;return n===null?{kind:`fresh`}:n===void 0?t===null?null:{kind:`known`,key:t}:{kind:`known`,key:n}}var sh=4e3,ch=6e4,lh=3e4,uh=new Set(rh);function dh(e){queueMicrotask(()=>{throw e})}function fh(e){return e instanceof Yn&&e.status>=400&&e.status<500}var ph=class extends Error{constructor(){super(`change-set undo: no answer within ${String(lh)} ms`),this.name=`UndoTimeoutError`}};function mh(e,t,n){let{http:r,taskEvents:i}=e,[a,o]=(0,R.useState)({status:`loading`}),[s,c]=(0,R.useState)(null),[l,u]=(0,R.useState)(null),[d,f]=(0,R.useState)(null),[p,m]=(0,R.useState)(null),[h,g]=(0,R.useState)({phase:`idle`}),_=(0,R.useRef)(!1),v=(0,R.useRef)(!0),y=(0,R.useRef)(0),b=(0,R.useRef)(0);(0,R.useEffect)(()=>(v.current=!0,()=>{v.current=!1}),[]);let x=(0,R.useCallback)(e=>{y.current+=1;let i=y.current;e||o({status:`loading`}),r.request({method:`GET`,path:Gn.changeSetSnapshot.path(t,n),schema:Am}).then(e=>{!v.current||i<=b.current||(b.current=i,c(e),o({status:`ready`,snapshot:e}))},t=>{!v.current||i<=b.current||(dh(t),!e&&(b.current=i,o({status:`failed`,reason:t instanceof Vt?`unsupported`:t instanceof Yn&&(t.status===403||t.status===404)?`unavailable`:`retryable`})))})},[r,t,n]);(0,R.useEffect)(()=>{x(!1)},[x]),(0,R.useEffect)(()=>i.subscribe(e=>{let t=jm.safeParse(e);t.success&&t.data.taskId===n&&x(!0)}),[i,n,x]);let S=(s==null?void 0:s.state)??null,C=h.phase===`waiting`,w=S===`applying`||S===`confirmation_required`||C&&(S===`applied`||S===`partial_failure`);(0,R.useEffect)(()=>{if(!w)return;let e=setInterval(()=>x(!0),sh);return()=>clearInterval(e)},[w,x]),(0,R.useEffect)(()=>{if(!C||S===`undone`)return;let e=setTimeout(()=>{g({phase:`refused`,code:null,timedOut:!0,blockedFor:null})},ch);return()=>clearTimeout(e)},[C,S]);let T=(0,R.useCallback)(async(e,i,a)=>{if(s===null)return`skipped`;_.current=!0,u(e),f(null);try{return await r.request({method:`POST`,path:Gn.changeSetCommand.path(t,n,e),body:i,schema:ah}),a(),`succeeded`}catch(t){return fh(t)?(v.current&&f({command:e,state:s.state}),`failed`):(dh(t),`unknown`)}finally{_.current=!1,v.current&&(u(null),x(!0))}},[r,t,n,s,x]),E=(0,R.useCallback)(async()=>{if(_.current||s===null)return`skipped`;if(s.confirmation===void 0)return dh(/* @__PURE__ */ Error(`change-set ${n}: confirm asked without a confirmation block`)),`skipped`;let e=Ve();return T(`confirm`,{approvalRequestId:e,expectedRevision:s.confirmation.expectedRevision,applyRequestId:Ve()},()=>{v.current&&m(e)})},[s,n,T]),ee=(0,R.useCallback)(async e=>_.current?`skipped`:T(`reject`,e===null?{approvalRequestId:Ve()}:{approvalRequestId:Ve(),reason:e},()=>void 0),[T]),D=oh(s==null?void 0:s.applySummary,p),O=(0,R.useCallback)(()=>{_.current||s===null||D===null||T(`retry`,{approvalRequestId:D.kind===`known`?D.key:Ve(),expectedRevision:s.revision,applyRequestId:Ve()},()=>void 0)},[s,D,T]),te=(0,R.useCallback)(()=>{var e;if(_.current||s===null||((e=s.applySummary)==null||(e=e.undo)==null?void 0:e.eligible)!==!0)return;let t=s;_.current=!0,u(`undo`),g({phase:`sending`});let i,a=new Promise((e,t)=>{i=setTimeout(()=>t(new ph),lh)});Promise.race([r.request({method:`POST`,path:Gn.changeSetUndo.path(n),body:{undoRequestId:Ve(),expectedRevision:s.revision},schema:ah}),a]).then(()=>{v.current&&g({phase:`waiting`,unknown:!1})},e=>{if(fh(e)||dh(e),!v.current)return;if(!fh(e)){g({phase:`waiting`,unknown:!0});return}let n=e.errorCode!==null&&ih(rh,e.errorCode)?e.errorCode:null;g({phase:`refused`,code:n,timedOut:!1,blockedFor:n!==null&&uh.has(n)?t:null})}).finally(()=>{clearTimeout(i),_.current=!1,v.current&&(u(null),x(!0))})},[r,n,s,x]);return{load:a,snapshot:s,busy:l,commandFailure:d,canRetryApply:D!==null,undo:S===`undone`?{phase:`idle`}:h,reload:()=>x(!1),refresh:()=>x(!0),confirm:E,reject:ee,retryApply:O,requestUndo:te}}function hh(e,t){return ih($m,e)?t.cascadeEntity[e]:t.cascadeUnknown(Qm(e))}function gh(e,t,n){return ih($m,e)?n.cascadeCount[e](t):n.cascadeCountUnknown(Qm(e),t)}function _h(e,t){return ih(eh,e)?t.applyError[e]:null}function vh(e,t){return ih(th,e)?t.undo.sideEffect[e]:Qm(e)}function yh(e,t,n){let r=e.kind===`scenario`?n.contextScenario(e.label):e.kind===`object`?n.contextObject(e.label):n.contextProject(e.label);return t===null?r:`${r} \u00B7 ${t}`}function bh(e,t){let n=e.scenarioLabel===null?t.contextProject(e.projectName):t.contextScenario(e.scenarioLabel);return e.environmentLabel===null?n:`${n} \u00B7 ${e.environmentLabel}`}function xh(e,t,n,r){var i;if(Lm(e))return n.earlyTitle[e];let a=(i=t.proposal)==null?void 0:i.items,o=a==null?void 0:a[0];return a===void 0||o===void 0?n.preparing:Gm(a)===null?n.changesCount(a.length):o.actionTitle[r]}function Sh(e,t){return e.scenarioLabel===null?t.reviseDraftProject(e.projectName):t.reviseDraftScenario(e.scenarioLabel)}function Ch(e){let[t,...n]=e??[];return t===void 0||t.entityLabel===``?null:n.every(e=>e.entityLabel===t.entityLabel)?t.entityLabel:null}function wh(e){var t;let n=e.header.scenarioLabel;if(n!==void 0)return{kind:`scenario`,label:n};let r=Ch((t=e.proposal)==null?void 0:t.items);return r===null?{kind:`project`,label:e.header.projectName}:{kind:`object`,label:r}}function Th(e,t){var n,r;let i=(n=e.proposal)==null?void 0:n.items,a=(((r=e.proposal)==null?void 0:r.cascade)??[]).filter(e=>e.count>0);return{target:wh(e),withIt:a.length===0?null:a.map(e=>gh(e.entityType,e.count,t)).join(`, `),edits:i===void 0||i.length===0||Vm(i)?null:i.length}}function Eh(e,t,n){let r=[yh(t.target,e.header.environmentLabel??null,n)];return t.withIt!==null&&r.push(n.dock.recordWithIt(t.withIt)),t.edits!==null&&r.push(n.dock.editsCount(t.edits)),r.join(` \u00B7 `)}function Dh(e,t){if(Km(e))return null;let[n]=e.blockers;if(n!==void 0)return n.label;let r=e.confirmDisabledReason;return r===`kill_switch_off`?t.killSwitch.title:r!==void 0&&ih(nh,r)?t.disabledReason[r]:t.dock.blockedUnworded}function Oh(e,t){let n=e.blockers.find(e=>e.kind!==kh);if(n!==void 0)return n.label;let r=e.confirmDisabledReason;return r===void 0||r===`awaiting_secret_value`?null:r===`kill_switch_off`?t.killSwitch.title:ih(nh,r)?t.disabledReason[r]:t.dock.blockedUnworded}var kh=`secret_value_required`;function Ah(e,t){let n=t(`apiExecution.assertion.subject.${e.type}`,{target:e.target??``}),r=t(`apiExecution.assertion.comparator.${e.comparator}`);return e.expected===null?`${n} ${r}`:`${n} ${r} ${e.expected}`}function jh(e){return e.id===void 0?``:` ${e.id}`}function Mh(e,t){let n=e.assertionConfig[t];if(typeof n!=`string`)throw Error(`Expected-result${jh(e)} is missing string assertionConfig.${t}`);return n}function Nh(e){if(!(`label`in e))throw Error(`Expected-result${jh(e)} is missing required label`);if(e.label!==null&&typeof e.label!=`string`)throw Error(`Expected-result${jh(e)} has an invalid label`);if(e.assertionType===`text_free`){if(e.label!==null)throw Error(`Text-free expected-result${jh(e)} must have a null label`);return null}if(e.label!==null){if(e.label.trim().length===0)throw Error(`Expected-result${jh(e)} has a blank label`);return{kind:`label`,value:e.label}}switch(e.assertionType){case`text_contains`:return{kind:`text_contains`,value:Mh(e,`expectedText`)};case`text_equals`:return{kind:`text_equals`,value:Mh(e,`expectedText`)};case`assert_text`:return{kind:`assert_text`,mode:Mh(e,`mode`),value:Mh(e,`value`)};case`element_visible`:return{kind:`element_visible`};case`element_exists`:return{kind:`element_exists`};case`element_not_exists`:return{kind:`element_not_exists`};case`input_value`:return{kind:`input_value`,value:Mh(e,`expectedValue`)};default:throw Error(`Expected-result${jh(e)} has unsupported assertion type ${e.assertionType}`)}}function Ph(e){return e.assertionType!==`text_free`}function Fh(e){return Ph(e)?!0:e.text!==null&&e.text.trim().length>0}function Ih(e,t){return t(rn(e))}function Lh(e,t){switch(e){case`equals`:return t(`expectedResult.assertTextModes.equals`);case`contains`:return t(`expectedResult.assertTextModes.contains`);case`matches`:return t(`expectedResult.assertTextModes.matches`);case`starts_with`:return t(`expectedResult.assertTextModes.startsWith`);case`ends_with`:return t(`expectedResult.assertTextModes.endsWith`);default:throw TypeError(`Unsupported assert_text mode: ${e}`)}}function Rh(e,t){let n=Nh(e);if(n===null)throw TypeError(`Typed expected result produced no description`);switch(n.kind){case`label`:return n.value;case`text_contains`:return t(`expectedResult.descriptions.textContains`,{value:n.value});case`text_equals`:return t(`expectedResult.descriptions.textEquals`,{value:n.value});case`assert_text`:return t(`expectedResult.descriptions.assertText`,{mode:Lh(n.mode,t),value:n.value});case`element_visible`:return t(`expectedResult.descriptions.elementVisible`);case`element_exists`:return t(`expectedResult.descriptions.elementExists`);case`element_not_exists`:return t(`expectedResult.descriptions.elementNotExists`);case`input_value`:return t(`expectedResult.descriptions.inputValue`,{value:n.value})}}function zh(e,t){if(!Ph(e)){if(e.text===null)throw TypeError(`text_free expected result must carry text`);return{description:e.text,assertionTypeLabel:null}}let n=e.assertionType;return{description:Rh(e,t),assertionTypeLabel:Ih(n,t)}}var Bh=/* @__PURE__ */ new Set([`element_not_found`,`element_not_found_page_busy`]);function Vh(e,t){let{source:n,evidence:r,origin:i}=e;switch(n.kind){case`atlas_turn`:if(i.kind!==`atlas_turn`)throw qh(e,i.kind);return{title:n.title,observed:n.observed,expected:n.expected===null?t(`findings.expected.atlasNone`):n.expected,sourceLine:i.title===null?t(`findings.source.atlasTurnUntitled`,{agent:i.agentNumber,step:i.stepNumber}):t(`findings.source.atlasTurn`,{agent:i.agentNumber,title:i.title,step:i.stepNumber})};case`run_step`:{if(r.kind!==`run_step`)throw qh(e,r.kind);if(i.kind!==`run_step`)throw qh(e,i.kind);let a=n.stepIndex+1;return{title:Uh(r,a,t),observed:r.actual===null?Hh(r,t):r.actual,expected:r.failedCheck===null?t(`findings.expected.runStepNone`):zh(r.failedCheck,t).description,sourceLine:i.scenarioName===null?t(`findings.source.runStepDeleted`,{agent:i.agentNumber,n:a}):t(`findings.source.runStep`,{agent:i.agentNumber,scenario:i.scenarioName,n:a})}}case`server_step`:{if(r.kind!==`server_step`)throw qh(e,r.kind);if(i.kind!==`server_step`)throw qh(e,i.kind);let n=Gh(r),a=i.requestName===null?t(`findings.source.serverItemRequest`,{request:n}):t(`findings.source.serverItemNamed`,{name:i.requestName});return{title:i.requestName===null?t(`findings.title.serverStep`,{request:n,status:r.responseStatus}):t(`findings.title.serverStepNamed`,{name:i.requestName,status:r.responseStatus}),observed:r.responseStatusText===null?t(`findings.observed.response`,{status:r.responseStatus}):t(`findings.observed.responseWithText`,{status:r.responseStatus,statusText:r.responseStatusText}),expected:Wh(r,t),sourceLine:i.testRun===null?t(`findings.source.serverStep`,{item:a}):i.testRun.name===null?t(`findings.source.serverStepRunNumber`,{item:a,number:String(i.testRun.number).padStart(3,`0`)}):t(`findings.source.serverStepRun`,{item:a,run:i.testRun.name})}}}}function Hh(e,t){switch(e.failureCode){case null:return t(`findings.stepFailure.assertion`);case`element_not_found`:return t(`findings.stepFailure.element_not_found`);case`element_not_found_page_busy`:return t(`findings.stepFailure.element_not_found_page_busy`);case`native_dialog_open`:return t(`findings.stepFailure.native_dialog_open`);default:return t(`findings.stepFailure.other`,{code:e.failureCode})}}function Uh(e,t,n){let r=e.failureCode!==null&&Bh.has(e.failureCode),i=e.stepName.trim();return i.length===0?n(r?`findings.title.runStepNotFoundUnnamed`:`findings.title.runStepUnnamed`,{n:t}):n(r?`findings.title.runStepNotFound`:`findings.title.runStep`,{n:t,name:i})}function Wh(e,t){let n=e.failedChecks.map(e=>t(`findings.expected.checkQuoted`,{check:Ah(e,t)})).join(`, `);return t(`findings.expected.checks`,{count:e.failedChecks.length,checks:n})}function Gh(e){return`${e.method.toUpperCase()} ${Kh(e.url)}`}function Kh(e){if(!URL.canParse(e))return e;let t=new URL(e);return`${t.pathname}${t.search}`}function qh(e,t){return/* @__PURE__ */ Error(`Finding ${e.id}: source '${e.source.kind}' with '${t}'`)}function Jh(){let{t:e,i18n:t}=ye();return(0,R.useMemo)(()=>({t:e,has:e=>t.exists(e)}),[e,t])}var Yh=`create_bug`;function Xh(e){var t;let n=(t=e.proposal)==null?void 0:t.items;if((n==null?void 0:n.length)!==1)return null;let[r]=n;return r===void 0||r.actionType!==Yh||r.bug===void 0?null:{facts:r.bug}}function Zh(e){let t=new URL(e);return`${t.pathname}${t.search}`}function Qh(e,t){return[t.capture[e.capture],...e.pageUrl===null?[]:[t.address(Zh(e.pageUrl))]].join(`, `)}function $h({facts:e}){let t=$().cards.changeSet.bugFiling;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug`,"data-testid":`change-set-bug-filing`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug__line`,children:[/* @__PURE__ */ (0,Z.jsx)(Cr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:Qh(e,t)})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug__line`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.severity(t.severityWord[e.severity])})]})]})}function eg(e,t){return Vh(e.candidate,t).title}function tg({finding:e}){let{t}=Jh(),{project:n,navigation:r}=Zf(),i=eg(e,t),a=n===null?null:rp(n.number,e.open);return a===null?i:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-cs-linkish`,"data-testid":`change-set-bug-finding`,onClick:()=>r.openPath(a),children:i})}function ng(e,t,n){var r,i;let a=$().cards.changeSet,o=Q(),s=t.status===`ready`?t.snapshot:null,c=s!==null&&Im(s.state)?s.state:null,l=(0,R.useMemo)(()=>s===null?null:Xh(s),[s]),u=s===null||c===null?null:l===null?xh(c,s,a,o):a.bugFiling.title,d=c===Rm,f=s!==null&&Km(s),{deletes:p,destructive:m}=Um(s==null||(r=s.proposal)==null?void 0:r.items),h=s!==null&&c!==null?Ym(c,s).kind:null,g=(0,R.useMemo)(()=>s===null?null:Th(s,a),[s,a]),_=s===null?null:Dh(s,a),v=s===null?null:Oh(s,a),y=s===null?null:s.secretInputRequests,b=(i=e.conversation.changeSetDecision)==null?void 0:i.register;(0,R.useEffect)(()=>{if(d&&n!==null&&b!==void 0&&h!==null&&u!==null&&g!==null&&y!==null)return b(n,{title:u,confirmEnabled:f,destructive:m,deletes:p,icon:h,facts:g,confirmBlockedReason:_,bug:l,secretInputRequests:y,confirmBlockedBeyondSecrets:v})},[d,n,b,u,f,m,p,h,g,_,l,y,v])}function rg(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.toolResults!==void 0)for(let{toolCallId:e,result:r}of n.toolResults){if(lm(r)!==`change_set_proposal`)continue;let n=fm.safeParse(r);n.success&&n.data.mode===`preview_confirm`&&(t.has(e)||t.set(e,{toolCallId:e,projectId:n.data.projectId,changeSetId:n.data.changeSetId}))}return[...t.values()]}function ig({preview:e}){let t=Zf(),{load:n}=mh(t,e.projectId,e.changeSetId);return ng(t,n,e.toolCallId),null}function ag({messages:e}){return rg(e).map(e=>/* @__PURE__ */ (0,Z.jsx)(ig,{preview:e},e.toolCallId))}function og(){let e=null,t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map,r=()=>{for(let e of t)e()};return{subscribe(e){return t.add(e),()=>t.delete(e)},link:()=>e,setLink(t,n,i){if(i){if((e==null?void 0:e.toolCallId)===t&&e.from===n)return;e={toolCallId:t,from:n},r();return}(e==null?void 0:e.toolCallId)===t&&e.from===n&&(e=null,r())},registerRecord(e,t){return n.set(e,t),r(),()=>{n.get(e)===t&&(n.delete(e),r())}},hasRecord:e=>n.has(e),reveal(e){let t=n.get(e);return t!==void 0&&(t.reveal(),!0)}}}function sg(e,t){return(0,R.useSyncExternalStore)(e.subscribe,()=>e.hasRecord(t))}function cg(e,t,n){return{linked:(0,R.useSyncExternalStore)(e.subscribe,()=>{let r=e.link();return r!==null&&r.toolCallId===t&&r.from!==n}),onLinkChange:(0,R.useCallback)(r=>e.setLink(t,n,r),[e,t,n])}}function lg({chat:e}){let[t,n]=(0,R.useState)(0),r=(0,R.useCallback)(()=>n(e=>e+1),[]),[i]=(0,R.useState)(og),[a,o]=(0,R.useState)(()=>/* @__PURE__ */ new Map),s=(0,R.useCallback)((e,t)=>(o(n=>new Map(n).set(e,t)),()=>{o(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}),[]),{answeredToolCallIds:c}=e;return{register:s,dockEntries:[...a].filter(([e])=>!c.includes(e)).map(([e,t])=>({toolCallId:e,...t})),tether:i,focusRequest:t,focusComposer:r}}function ug({chat:e,decisionProgress:t}){let{isStreaming:n,confirmationAnswerInFlight:r,permissionModeLane:i}=e;return(0,R.useCallback)(e=>oa({isStreaming:n,confirmationAnswerInFlight:r,permissionModeLane:i},e)||t!==null,[n,r,i,t])}var dg=[`isUnassigned`,`hasUnboundElementSteps`,`hasUnlockedTextSteps`],fg={ru:{needsBinding:(e,t)=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043F\u0440\u0438\u0432\u044F\u0437\u043A\u0438: ${e}. \u0421\u043D\u0430\u0447\u0430\u043B\u0430 ${t}, \u043F\u043E\u0442\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A.`,causesSentence:e=>`${e}.`,causes:{isUnassigned:`\u043D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,hasUnboundElementSteps:`\u0435\u0441\u0442\u044C \u0448\u0430\u0433\u0438 \u0431\u0435\u0437 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430`,hasUnlockedTextSteps:`\u0435\u0441\u0442\u044C \u043D\u0435\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0435 \u0448\u0430\u0433\u0438`},actions:{make_auto:`\u00AB\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E\u00BB`,bind_elements:{hub:`\u00AB\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\u00BB`,web:`\u00AB\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\u00BB \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438 Progon`}},noSteps:`\u0412 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u043D\u0435\u0442 \u0448\u0430\u0433\u043E\u0432.`,aiUnavailableForTextSteps:`\u0418\u0418 \u043D\u0435\u0442, \u0430 \u0432 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0435\u0441\u0442\u044C \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0435 \u0448\u0430\u0433\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043E\u043D \u043D\u0443\u0436\u0435\u043D.`,unread:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.`,noReadyScenarios:`\u0421\u0440\u0435\u0434\u0438 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432 \u043D\u0435\u0442 \u0433\u043E\u0442\u043E\u0432\u044B\u0445 \u043A \u0437\u0430\u043F\u0443\u0441\u043A\u0443 \u0432 \u00AB\u0410\u0432\u0442\u043E\u00BB.`},en:{needsBinding:(e,t)=>`This scenario needs binding: ${e}. First use ${t}, then run it.`,causesSentence:e=>`${e}.`,causes:{isUnassigned:`no page is assigned`,hasUnboundElementSteps:`some steps have no element`,hasUnlockedTextSteps:`some text steps are not locked`},actions:{make_auto:`"Make Auto"`,bind_elements:{hub:`"Bind elements"`,web:`"Bind elements" in the Progon extension`}},noSteps:`This scenario has no steps.`,aiUnavailableForTextSteps:`AI is unavailable, and this scenario has text steps that need it.`,unread:`This scenario cannot run automatically.`,noReadyScenarios:`None of the selected scenarios is ready to run in Auto.`}};function pg(e,t,n){let r=fg[n];switch(e.status){case`needs_binding`:return r.needsBinding(_g(e.causes,n),yg(e.offeredActions.map(e=>vg(r,e,t)),n,`disjunction`,`a needs_binding refusal offers no action, but offeredActions is .min(1) on both schemas`));case`no_steps`:return r.noSteps;case`ai_unavailable_for_text_steps`:return r.aiUnavailableForTextSteps}}function mg(e,t){return fg[t].causesSentence(bg(_g(e,t)))}function hg(e){return fg[e].unread}function gg(e){return fg[e].noReadyScenarios}function _g(e,t){let n=fg[t];return yg(dg.filter(t=>e[t]).map(e=>n.causes[e]),t,`conjunction`,`a needs_binding refusal has no true cause, but needsMapping is the OR of exactly these three`)}function vg(e,t,n){let r=e.actions[t];return typeof r==`string`?r:r[n]}function yg(e,t,n,r){if(e.length===0)throw Error(`scenario-launch-refusal-text: ${r}`);return new Intl.ListFormat(t,{style:`long`,type:n}).format(e)}function bg(e){return e.charAt(0).toUpperCase()+e.slice(1)}function xg(){let{t:e,i18n:t}=ye(),n=t.resolvedLanguage;return(0,R.useMemo)(()=>{let r=e,i=x.find(e=>e===n);if(i===void 0)throw Error(`i18n resolved an unsupported UI locale: ${String(n)}`);return{t:r,has:e=>t.exists(e),locale:i}},[t,n,e])}var Sg=`scenarios.not_auto_runnable`;function Cg(e,t,n){if(t!==Sg)return null;let r=Jt.safeParse(n==null?void 0:n.decision);return r.success?pg(r.data,`web`,e):hg(e)}function wg(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:null}function Tg(e,t){if(!(t instanceof He)||t.errorCode!==`remote_runs.text_steps_unsupported`)return null;let n=t.params;if(!n)return null;let r=wg(n.unconvertedTextStepCount),i=wg(n.lockedTextStepCount);return r===null||i===null?null:r>0?e(`apiErrors.remote_runs.text_steps_unsupported.unconverted`):i>0?e(`apiErrors.remote_runs.text_steps_unsupported.locked`):null}function Eg(e,t,n){let r=Cg(t,n.error_code,n.params);if(r!==null)return r;let i=`apiErrors.${n.error_code}`;if(e.has(i)){let t=[],r=e.t(i,{...n.params,missingInterpolationHandler:(e,n)=>(t.push(n[0]),``)});if(t.length===0)return r}return qe(n.message)}function Dg(e,t,n,r){if(t instanceof He){let n=Tg(e.t,t);if(n!==null)return n;let r=Cg(e.locale,t.errorCode,t.params);if(r!==null)return r}return Ee(e,t,n,r)}var Og=`qa-ai-chat-place inline-flex h-7 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-solid pr-[7px] pl-[9px] text-xs font-medium transition-[border-color,background-color,color,box-shadow] duration-(--motion-short) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-50`,kg=`my-1 h-px shrink-0 bg-stroke-light`;function Ag(e,t){return e.block===null?e.occupied?t.runnerBusy:t.runnerFree:t.runnerBlocked[e.block]}function jg(e,t,n){switch(e.kind){case`opening`:return t.status===`failed`?n.fleetFailed:n.fleetLoading;case`this_browser`:return n.thisBrowser;case`none`:return n.none;case`runner`:return n.runner(e.runner.name);case`runner-unread`:return n.runnerUnread;case`runner-gone`:return n.runnerGone}}function Mg(e,t){switch(e.kind){case`opening`:return t.status===`failed`?Ze:oi;case`this_browser`:return r;case`none`:return jr;case`runner`:case`runner-unread`:return oi;case`runner-gone`:return Ze}}function Ng({place:e,view:t,fleet:n,onChoose:i,onOpen:a,copy:o,heading:s,thisBrowserReach:c,look:l,disabled:u=!1}){let[d,f]=(0,R.useState)(!1),[p,m]=(0,R.useState)(null),[g,_]=(0,R.useState)(!1),v=(0,R.useId)(),y=(0,R.useRef)(null),b=(0,R.useId)(),x=Cn(),S=d&&!u,C=t.kind===`runner-gone`,w=C||t.kind===`opening`&&n.status===`failed`,T=jg(t,n,o),E=Mg(t,n),ee=n.status===`ready`?n.runners:[],D=e=>({key:`runner-${e.id}`,place:{kind:`runner`,agentId:e.id},icon:oi,title:o.runner(e.name),detail:Ag(e,o),withheld:e.block!==null}),O={key:`this_browser`,place:{kind:`this_browser`},icon:r,title:o.thisBrowser,detail:c===`opens_windows`?o.thisBrowserRowOpensWindows:o.thisBrowserRowTasksOnly,withheld:!1},te={key:`none`,place:{kind:`none`},icon:jr,title:o.none,detail:o.noneRow,withheld:!1},k=ee.filter(e=>e.mine).map(D),A=ee.filter(e=>!e.mine).map(D),j=t=>e!==null&&Be(e,t.place),ne=g||A.some(j),re=p===null?void 0:[O,...k,...A,te].find(e=>e.key===p),M=e=>{e.withheld||(i(e.place),m(e.key),f(!1))},N=e=>{let t=[...e.currentTarget.querySelectorAll(`[role="radio"]`)].filter(e=>e.getAttribute(`aria-disabled`)!==`true`),n=t.findIndex(e=>e===document.activeElement),r=n=>{let r=t[n];r!==void 0&&(e.preventDefault(),r.focus())};switch(e.key){case`ArrowDown`:case`ArrowRight`:r((n+1)%t.length);break;case`ArrowUp`:case`ArrowLeft`:r((n-1+t.length)%t.length);break;case`Home`:r(0);break;case`End`:r(t.length-1)}},ie=n.status===`loading`||n.status===`idle`?o.fleetLoading:n.status===`failed`?o.fleetFailed:n.runners.length===0?o.fleetEmpty:null,ae=t=>{let n=j(t),r=n||e===null&&t.key===`this_browser`,i=t.icon;return/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:r?y:void 0,type:`button`,role:`radio`,"aria-checked":n,"aria-disabled":t.withheld||void 0,tabIndex:r?0:-1,"data-testid":`ai-chat-place-${t.key}`,onClick:()=>M(t),className:h(`grid w-full grid-cols-[16px_minmax(0,1fr)_16px] items-center gap-2.5 rounded-md border-0 bg-transparent px-2 py-[7px] text-left text-fg-secondary`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`,t.withheld?`cursor-not-allowed text-fg-muted opacity-55`:`hover:bg-(--color-bg-elevated-hover) focus-visible:bg-(--color-bg-elevated-hover)`),children:[/* @__PURE__ */ (0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5 text-fg-secondary`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`block truncate text-body-sm font-medium text-fg-primary`,children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-caption leading-[1.4] text-fg-muted`,children:t.detail})]}),/* @__PURE__ */ (0,Z.jsx)(Ge,{"aria-hidden":`true`,className:h(`size-3.5 text-(--color-primary-text)`,!n&&`invisible`)})]},t.key)},oe=l===`setting`?/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:h(`qa-ai-chat-set qa-ai-chat-set--place`,w&&`qa-ai-chat-set--gone`),"aria-describedby":C?b:void 0,disabled:u,"data-place":t.kind,"data-testid":`ai-chat-place-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(E,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-set-value`,children:T})]}):/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:h(Og,w?`border-[color-mix(in_srgb,var(--color-error)_45%,transparent)] bg-(--color-error-bg) text-(--color-error-text)`:`border-(--color-border) bg-transparent text-fg-secondary enabled:hover:border-(--color-border-hover) enabled:hover:text-fg-primary`,S&&`border-(--color-border-focus) shadow-(--glow-primary-sm)`),"aria-label":o.chipLabel(T),"aria-describedby":C?b:void 0,disabled:u,"data-place":t.kind,"data-testid":`ai-chat-place-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(E,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:T}),/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`,className:h(`size-3 shrink-0 transition-transform duration-(--motion-medium) ease-(--ease-out)`,S&&`rotate-180`)})]});return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(cn,{title:o.name,titleVisible:!1,trigger:oe,triggerTooltip:l===`setting`?{content:o.chipLabel(T),relationship:`label`}:{content:o.title,relationship:`description`},open:S,onOpenChange:e=>{e&&!d&&a(),f(e&&!u)},side:`top`,collisionAvoidance:sn,...x===null?{}:{positionAnchor:x},initialFocusRef:y,className:x===null?Xt:Sn,"data-testid":`ai-chat-place-popover`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[s&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`flex items-baseline justify-between gap-2 px-2 py-1.5`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`text-xs font-semibold tracking-[-0.1px] text-fg-primary`,children:o.name}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`text-caption text-fg-muted`,children:o.note})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":o.name,className:`flex flex-col gap-px`,onKeyDown:N,children:[ae(O),/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:kg}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex max-h-60 flex-col gap-px overflow-y-auto`,"data-testid":`ai-chat-place-runners`,children:[k.map(ae),ie!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-[7px] pl-[34px] text-caption text-fg-muted`,"data-testid":`ai-chat-place-fleet-state`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:ie}),n.status===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-caption text-(--color-primary-text) hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus)`,onClick:a,children:o.fleetRetry})]}),A.length>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":ne,"aria-controls":v,onClick:()=>_(!ne),"data-testid":`ai-chat-place-others`,className:`grid w-full cursor-pointer grid-cols-[16px_minmax(0,1fr)] items-center gap-2.5 rounded-md border-0 bg-transparent px-2 py-[7px] text-left text-caption font-medium text-fg-muted hover:bg-(--color-bg-elevated-hover) hover:text-fg-secondary focus-visible:bg-(--color-bg-elevated-hover) focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`,children:[/* @__PURE__ */ (0,Z.jsx)(je,{"aria-hidden":`true`,className:h(`size-3.5 transition-transform duration-(--motion-short) ease-(--ease-out)`,ne&&`rotate-90`)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:o.othersGroup(A.length)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:v,className:`flex flex-col gap-px`,hidden:!ne,children:ne&&A.map(ae)})]})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:kg}),ae(te)]})]})}),C&&/* @__PURE__ */ (0,Z.jsx)(`p`,{id:b,role:`status`,className:l===`setting`?`qa-ai-chat-sets-note`:`qa-ai-chat-place-gone m-0 flex items-start gap-1.5 text-caption leading-[1.45] text-(--color-error-text)`,"data-testid":`ai-chat-place-gone`,children:o.runnerGoneHint}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:re===void 0?``:o.chipLabel(re.title)})]})}var Pg={explore_app:qr,find_bugs:Sr,create_tests:Tn,automate_scenarios:gi,run_scenarios:$r};function Fg(e,t,n){return{type:`text`,inputMode:`url`,autoComplete:`off`,spellCheck:!1,value:e,onValueChange:t,disabled:n,"data-testid":`launch-address-input`}}function Ig({state:e,disabled:t}){let{t:n}=xg(),r=e.scope===void 0;return/* @__PURE__ */ (0,Z.jsx)(f,{...Fg(e.value,e.setValue,t||r),label:n(`launchAddress.crawl.label`),placeholder:n(`launchAddress.crawl.placeholder`),...r?{hint:n(`launchAddress.crawl.loadingHint`)}:{}})}function Lg(e,t,n,r){let i=be(t);return n.kind===`create`?e.targets.create(i,{applicationId:Oe(n.pair.applicationId),environmentId:n.pair.environmentId,baseUrl:r}):e.targets.update(i,n.target.id,{baseUrl:r,expectedUpdatedAt:n.target.updatedAt})}function Rg(e,t){return e(`launchAddress.pair`,{application:t.applicationName===null?e(`launchAddress.applicationGone`):t.applicationName,environment:t.environmentName===null?e(`launchAddress.environmentGone`):t.environmentName})}function zg({projectId:e,cell:t,children:n,testId:r}){return/* @__PURE__ */ (0,Z.jsx)(Fe,{target:{kind:`environment-addresses`,projectRef:be(e),...t===void 0?{}:{cell:{applicationId:t.applicationId,environmentId:t.environmentId}}},placement:`same-tab`,className:`rounded-(--radius-sm) font-medium text-fg-link underline-offset-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/40`,"data-testid":r,children:n})}function Bg({projectId:e}){let{t}=ye();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,className:`flex items-start gap-3 rounded-(--radius-md) border border-[color:var(--color-chip-primary-border)] bg-(--color-bg-primary-tint-15) px-3 py-2.5`,"data-testid":`launch-address-not-configured`,children:[/* @__PURE__ */ (0,Z.jsx)(r,{size:16,className:`mt-0.5 shrink-0 text-fg-link`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 text-[length:var(--text-sm)]`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`font-medium text-fg-primary`,children:t(`launchAddress.notConfigured.title`)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`text-fg-secondary`,children:[t(`launchAddress.notConfigured.body`),` `,/* @__PURE__ */ (0,Z.jsx)(zg,{projectId:e,testId:`launch-address-not-configured-link`,children:t(`launchAddress.openAddresses`)})]})]})]})}function Vg({checked:e,onChange:t,pairLabel:n,plan:r,disabled:i}){let{t:a}=ye(),o=(0,R.useId)(),s=e&&r.state===`ok`;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,"data-testid":`launch-address-save`,children:[/* @__PURE__ */ (0,Z.jsx)(vn,{checked:e,onChange:t,disabled:i,label:a(`launchAddress.saveAs`,{pair:n}),describedBy:s?o:void 0}),s&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{id:o,className:`flex items-center gap-1.5 pl-6 text-[length:var(--text-xs)] text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(Ge,{size:12,className:`shrink-0 text-fg-success`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:/* @__PURE__ */ (0,Z.jsx)(it,{i18nKey:`launchAddress.willSaveAs`,values:{baseUrl:r.baseUrl},components:{mono:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`font-mono text-fg-primary`})}})})]})]})}function Hg(e){let t=d(),n=(0,R.useCallback)(async n=>{let r=be(e),[i,a]=await Promise.all([t.applications.byProject(r,{signal:n}),t.targets.listAll(r,{signal:n})]);return{applications:i,targets:a}},[t,e]);return c({fetcher:n,deps:[e]})}function Ug(e,t,n,r){let i=e.applications.find(e=>e.id===n),a=t.find(e=>e.id===r);return{applicationId:n,environmentId:r,applicationName:i===void 0?null:i.name,environmentName:a===void 0?null:a.name}}function Wg(e,t,n){if(n.kind===`cell_missing`)return{kind:`create`,pair:Ug(e,t,n.applicationId,n.environmentId)};if(n.kind===`address_required`){let r=e.targets.find(e=>e.id===n.targetId);return r===void 0?null:{kind:`patch`,pair:Ug(e,t,r.applicationId,r.environmentId),target:r}}return null}function Gg({state:e,projectId:t,catalog:n,namesLoading:r,environments:i,disabled:a}){let o=xg(),{t:s}=o,c=Fg(e.value,e.setValue,a);if(e.source===`inherited`)return/* @__PURE__ */ (0,Z.jsx)(f,{...c,label:s(`runEntryUrl.label`),error:e.missingRepeatAddress?s(`runEntryUrl.errors.repeatCleared`):void 0,hint:s(`runEntryUrl.hintRepeat`)});if(e.refusal!==null&&e.refusal.kind===`not_configured`)return/* @__PURE__ */ (0,Z.jsx)(Bg,{projectId:t});if(e.isLoading||r)return/* @__PURE__ */ (0,Z.jsx)(Ae,{className:`h-10 w-full`,label:s(`common.loading`)});let l=e.refusedCell;if(l!==null){let n=Rg(s,l.pair);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`run-entry-url-missing`,children:[/* @__PURE__ */ (0,Z.jsx)(f,{...c,label:s(`runEntryUrl.labelFor`,{pair:n}),placeholder:s(`runEntryUrl.placeholder`),error:Xg(o,e),hint:Yg(s,l)}),/* @__PURE__ */ (0,Z.jsx)(Vg,{checked:e.saveChecked,onChange:e.setSaveChecked,pairLabel:n,plan:e.savePlan,disabled:a}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`text-[length:var(--text-xs)] text-fg-muted`,children:/* @__PURE__ */ (0,Z.jsx)(zg,{projectId:t,cell:{applicationId:l.pair.applicationId,environmentId:l.pair.environmentId},testId:`run-entry-url-open-cell`,children:s(`launchAddress.openCell`,{pair:n})})})]})}let u=e.defaultApplicationNote;if(u!==null)return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-col gap-2`,"data-testid":`run-entry-url-default-missing`,children:/* @__PURE__ */ (0,Z.jsx)(f,{...c,label:s(`runEntryUrl.labelFor`,{pair:Rg(s,u.pair)}),placeholder:s(`runEntryUrl.placeholder`),hint:Jg(s,u)})});let d=qg(e,n,i);return/* @__PURE__ */ (0,Z.jsx)(f,{...c,label:d===null?s(`runEntryUrl.label`):s(`runEntryUrl.labelFor`,{pair:Rg(s,d)}),placeholder:s(`runEntryUrl.placeholder`),error:e.read.status===`error`?Dg(o,e.read.error,`runEntryUrl.errors.load`):void 0,hint:Kg(s,e,d)})}function Kg(e,t,n){return t.source===`scenario`&&t.read.status===`resolved`?e(`runEntryUrl.hintScenario`):n===null?t.refusal===null?e(`runEntryUrl.hintUnnamed`):e(t.refusal.kind===`cell_missing`?`apiErrors.targets.cell_missing`:`apiErrors.targets.address_required`):e(`runEntryUrl.hintBatch`,{application:n.applicationName===null?e(`launchAddress.applicationGone`):n.applicationName})}function qg(e,t,n){if(e.read.status!==`resolved`||t===void 0||n===null)return null;let{applicationId:r,environmentId:i}=e.read.address;return Ug(t,n,r,i)}function Jg(e,t){let n=t.pair.applicationName===null?e(`launchAddress.applicationGone`):t.pair.applicationName,r=t.pair.environmentName===null?e(`launchAddress.environmentGone`):t.pair.environmentName;return t.kind===`patch`&&t.target.hostPattern!==null?e(`launchAddress.defaultPatternOnly`,{application:n,environment:r,pattern:t.target.hostPattern}):e(`launchAddress.defaultMissing`,{application:n,environment:r})}function Yg(e,t){let n=t.pair.applicationName===null?e(`launchAddress.applicationGone`):t.pair.applicationName,r=t.pair.environmentName===null?e(`launchAddress.environmentGone`):t.pair.environmentName;return t.kind===`create`||t.target.hostPattern===null?e(`launchAddress.cellMissing`,{application:n,environment:r}):e(`launchAddress.addressRequired`,{application:n,environment:r,pattern:t.target.hostPattern})}function Xg(e,t){let{t:n}=e;if(t.saveError!==null)return Dg(e,t.saveError,`launchAddress.errors.save`);if(t.saveChecked&&t.savePlan.state===`invalid`)return n(`environments.addresses.errors.baseUrl.${t.savePlan.reason}`)}var Zg={projectDefault:`agentRunDispatch.environmentHint`,repeat:`makeAutoDispatch.repeat.environmentHint`,concrete:`launchAddress.environment.variablesHint`},Qg={projectDefault:`agentRunDispatch.errors.environmentsLoad`,repeat:`agentRunDispatch.errors.environmentsLoad`,concrete:`launchAddress.environment.loadError`};function $g({state:e,disabled:t,onAddressEdit:r}){let i=xg(),{t:a}=i,{environment:o,catalog:s,address:c,projectId:l}=e,u=e=>{c.setValue(e),r!==void 0&&r()},d=c.kind===`entryUrl`&&(c.source===`inherited`||c.refusal!==null&&c.refusal.kind===`not_configured`),f=o.loadError!==null;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(e_,{environment:o,disabled:t,loadErrorTitle:o.loadError===null?null:Dg(i,o.loadError,Qg[o.mode])}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s.error!==null&&!d&&/* @__PURE__ */ (0,Z.jsx)(re,{tone:`error`,title:Dg(i,s.error,`launchAddress.errors.catalogLoad`),actions:/* @__PURE__ */ (0,Z.jsx)(n,{onClick:s.reload,children:a(`common.retry`)})}),c.kind===`crawlStart`&&c.scopeError!==null&&/* @__PURE__ */ (0,Z.jsx)(re,{tone:`error`,title:Dg(i,c.scopeError,`launchAddress.crawl.scopeLoad`),actions:/* @__PURE__ */ (0,Z.jsx)(n,{onClick:c.reloadScope,children:a(`common.retry`)})}),c.kind===`crawlStart`?/* @__PURE__ */ (0,Z.jsx)(Ig,{state:{...c,setValue:u},disabled:t}):/* @__PURE__ */ (0,Z.jsx)(Gg,{state:{...c,setValue:u},projectId:l,catalog:s.data,namesLoading:s.data===void 0&&s.error===null||o.environments===void 0&&!f,environments:o.environments===void 0?null:o.environments,disabled:t})]})]})}function e_({environment:e,disabled:t,loadErrorTitle:r}){let{t:i}=xg();return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r!==null&&/* @__PURE__ */ (0,Z.jsx)(re,{tone:`error`,title:r,actions:/* @__PURE__ */ (0,Z.jsx)(n,{onClick:e.reload,children:i(`common.retry`)})}),e.shown&&/* @__PURE__ */ (0,Z.jsx)(tt,{label:i(`agentRunDispatch.environmentLabel`),options:e.options,value:e.value,onValueChange:e.setValue,disabled:t,placeholder:e.mode===`repeat`?i(`makeAutoDispatch.repeat.environmentChoosePlaceholder`):void 0,error:e.noticeKey===null?void 0:i(e.noticeKey),hint:i(Zg[e.mode]),"data-testid":`launch-environment`})]})}var t_=`relative inline-flex h-8 max-w-full min-w-0 items-center gap-2 rounded-md border border-solid border-stroke bg-surface-secondary pr-2 pl-3 text-xs text-fg-primary transition-[border-color,background-color,box-shadow] duration-(--motion-short) ease-(--ease-out) enabled:hover:border-stroke-hover enabled:hover:bg-surface-hover aria-expanded:border-stroke-focus aria-expanded:shadow-(--glow-primary-sm) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:text-fg-muted`;function n_(){return/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`,className:`size-3! text-fg-muted`})}function r_({icon:e,title:t,hint:n,checked:r,disabled:i=!1,onSelect:a,testId:o}){let s=(0,R.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"aria-disabled":i||void 0,"aria-describedby":n===void 0?void 0:s,onClick:i?void 0:a,"data-testid":o,className:h(`flex w-full items-center gap-3 rounded-md border-0 bg-transparent px-3 py-2 text-left text-xs text-fg-primary`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-stroke-focus`,i?`cursor-not-allowed opacity-(--opacity-inert)`:`cursor-pointer hover:bg-surface-hover-layer focus-visible:bg-surface-hover-layer`,r&&`bg-(--color-bg-primary-tint)`),children:[/* @__PURE__ */ (0,Z.jsx)(e,{"aria-hidden":`true`,className:`size-4 shrink-0 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`block truncate`,children:t}),n!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`small`,{id:s,className:`block text-caption text-fg-muted`,children:n})]}),r&&/* @__PURE__ */ (0,Z.jsx)(Ge,{"aria-hidden":`true`,className:`size-4 shrink-0 text-(--color-primary-text)`})]})}function i_({children:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-3 pt-2 pb-1 text-caption text-fg-muted`,children:e})}function a_(){return/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`my-1 h-px bg-stroke-light`})}function o_({children:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-fg-muted`,children:e})}function s_(e){try{return new URL(e).host}catch{return e}}function c_(e,t){try{return new URL(e).href===new URL(t).href}catch{return!1}}function l_(e,t){if(t===null)return null;let n=e.find(e=>e.value===t);if(n===void 0)throw Error(`Environment ${t} is not among the picker's options`);return n.label}function u_(e,t,n){let r=[];for(let i of e.applications)for(let a of t){let o=e.targets.find(e=>e.applicationId===i.id&&e.environmentId===a.id);if(o===void 0||o.baseUrl===null)continue;let s=Ug(e,t,i.id,a.id);r.push({targetId:o.id,environmentId:a.id,application:s.applicationName===null?n:s.applicationName,environment:a.name,url:o.baseUrl})}return r}function d_({state:e}){let{t}=ye(),[n,i]=(0,R.useState)(`closed`),{environment:a,address:o,catalog:s}=e.address,c=l_(a.options,a.value),l=o.value.trim()===``,u=s.data===void 0||a.environments===void 0?null:u_(s.data,a.environments,t(`launchAddress.applicationGone`)),d=u===null||l?void 0:u.find(e=>e.environmentId===a.value&&c_(e.url,o.value)),f=a.loadError!==null||o.scopeError!==null?t(`launchAddress.environment.loadError`):a.environments===void 0||o.block===`unread`?t(`taskForm.address.loading`):d===void 0?c===null?s_(o.value):l?t(`taskForm.address.missing`,{environment:c}):t(`taskForm.address.pair`,{environment:c,host:s_(o.value)}):t(`taskForm.address.cell`,{application:d.application,environment:d.environment}),p=e=>{a.setValue(e.environmentId),o.setValueFor(e.environmentId,e.url),i(`closed`)};return/* @__PURE__ */ (0,Z.jsx)(cn,{side:`top`,collisionAvoidance:sn,title:t(n===`custom`?`taskForm.address.panelLabel`:`taskForm.address.menuLabel`),open:n!==`closed`,onOpenChange:e=>i(e?`menu`:`closed`),trapFocus:!0,className:n===`custom`?`w-[420px] max-w-[calc(100vw-32px)] gap-3`:`w-[340px] max-w-[calc(100vw-32px)] p-1`,"data-testid":n===`custom`?`task-form-address-panel`:`task-form-address-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:t_,"aria-label":t(`taskForm.address.label`,{address:f}),disabled:e.held,"data-testid":`task-form-address`,children:[/* @__PURE__ */ (0,Z.jsx)(r,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:f}),/* @__PURE__ */ (0,Z.jsx)(n_,{})]}),children:n===`custom`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-col gap-3`,children:/* @__PURE__ */ (0,Z.jsx)($g,{state:e.address,disabled:e.held})}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":t(`taskForm.address.menuLabel`),className:`flex flex-col`,children:[s.error!==null||a.loadError!==null?/* @__PURE__ */ (0,Z.jsxs)(o_,{children:[t(`launchAddress.environment.loadError`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:()=>{s.error!==null&&s.reload(),a.loadError!==null&&a.reload()},className:`cursor-pointer border-0 bg-transparent p-0 text-xs text-fg-link hover:underline`,children:t(`taskForm.scope.retry`)})]}):u===null?/* @__PURE__ */ (0,Z.jsx)(o_,{children:t(`taskForm.address.loading`)}):u.map(e=>/* @__PURE__ */ (0,Z.jsx)(r_,{icon:r,title:t(`taskForm.address.cell`,{application:e.application,environment:e.environment}),hint:s_(e.url),checked:(d==null?void 0:d.targetId)===e.targetId,onSelect:()=>p(e),testId:`task-form-address-cell-${e.targetId}`},e.targetId)),/* @__PURE__ */ (0,Z.jsx)(a_,{}),/* @__PURE__ */ (0,Z.jsx)(r_,{icon:de,title:t(`taskForm.address.custom`),checked:!1,onSelect:()=>i(`custom`),testId:`task-form-address-custom`})]})})}var f_=`inline-flex h-6 items-center gap-1 rounded-full border border-solid px-2.5 font-mono text-caption transition-[border-color,background-color,color] duration-(--motion-short) ease-(--ease-out) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled [&>svg]:size-3 [&>svg]:shrink-0`;function p_({login:e,disabled:t}){let{t:n}=ye(),{variables:r,chosen:i}=e,a=r.kind===`ready`?r.variables:[],o=new Set(a.map(e=>e.name)),s=r.kind===`ready`?i.filter(e=>!o.has(e)):[];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`group`,"aria-label":n(`taskForm.login.label`),className:`flex flex-wrap items-center gap-1.5 text-caption text-fg-muted`,"data-testid":`task-form-login`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 pr-1`,children:[/* @__PURE__ */ (0,Z.jsx)(Vr,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),n(`taskForm.login.lead`)]}),r.kind===`no_environment`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n(`taskForm.login.noEnvironment`)}),r.kind===`reading`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n(`taskForm.login.reading`)}),r.kind===`failed`&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[n(`taskForm.login.failed`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:r.retry,className:`cursor-pointer border-0 bg-transparent p-0 text-caption text-fg-link hover:underline`,children:n(`taskForm.scope.retry`)})]}),r.kind===`ready`&&a.length===0&&s.length===0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n(`taskForm.login.empty`)}),a.map(r=>{let a=i.includes(r.name);return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":a,disabled:t,onClick:()=>e.toggle(r.name,!a),"data-testid":`task-form-login-${r.name}`,className:h(f_,a?`border-[color-mix(in_srgb,var(--color-primary)_55%,transparent)] bg-(--color-bg-primary-tint-15) text-(--color-primary-text)`:`border-stroke bg-surface-secondary text-fg-secondary enabled:hover:border-stroke-hover enabled:hover:text-fg-primary`),children:[r.isSecret&&/* @__PURE__ */ (0,Z.jsx)(tn,{"aria-label":n(`taskForm.login.secret`)}),r.name]},r.name)}),s.map(r=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":!0,disabled:t,onClick:()=>e.toggle(r,!1),"data-testid":`task-form-login-gone-${r}`,className:h(f_,`border-(--color-border-warning) bg-(--color-warning-bg) text-fg-primary [&>svg]:text-(--color-warning-text)`),children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),r,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,children:n(`taskForm.login.gone`)})]},r))]})}var m_={text:In,auto:gi};function h_({value:e,onChange:t,disabled:n}){let{t:r}=ye(),[i,a]=(0,R.useState)(!1),o=r(e===null?`taskForm.scenarioKind.unset`:`taskForm.scenarioKind.short.${e}`),s=e===null?In:m_[e];return/* @__PURE__ */ (0,Z.jsx)(cn,{side:`top`,collisionAvoidance:sn,title:r(`taskForm.scenarioKind.menuLabel`),open:i,onOpenChange:a,className:`w-[340px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scenario-kind-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:h(t_,e===null&&`border-(--color-border-warning)! bg-(--color-warning-bg)! [&>svg]:text-(--color-warning-text)!`),"aria-label":r(`taskForm.scenarioKind.label`,{kind:o}),disabled:n,"data-testid":`task-form-scenario-kind`,"data-unset":e===null||void 0,children:[/* @__PURE__ */ (0,Z.jsx)(s,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:r(`taskForm.scenarioKind.chip`,{kind:o})}),/* @__PURE__ */ (0,Z.jsx)(n_,{})]}),children:/* @__PURE__ */ (0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":r(`taskForm.scenarioKind.menuLabel`),className:`flex flex-col`,children:Mt.map(n=>/* @__PURE__ */ (0,Z.jsx)(r_,{icon:m_[n],title:r(`taskForm.scenarioKind.items.${n}`),hint:r(`taskForm.scenarioKind.hints.${n}`),checked:e===n,onSelect:()=>{t(n),a(!1)},testId:`task-form-scenario-kind-${n}`},n))})})}function g_({mode:e,className:t}){switch(e){case`observe`:return/* @__PURE__ */ (0,Z.jsx)(Yt,{"aria-hidden":`true`,className:t});case`main`:return/* @__PURE__ */ (0,Z.jsx)(pn,{"aria-hidden":`true`,className:t});case`dangerous`:return/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`,className:t})}}function __({allowed:e,onToggle:t,disabled:n,captureApi:r,site:i}){let{t:a}=ye(),s=e.map(e=>a(`taskForm.allow.short.${e}`)).join(`, `),c=i===null?e.length===0?a(`taskForm.allow.projectOnlyNone`):a(`taskForm.allow.projectOnly`,{list:s}):a(`taskForm.allow.chip`,{site:i.value===null?a(`taskForm.site.unset`):a(`taskForm.site.chip.${i.value}`),project:e.length===0?a(`taskForm.allow.projectNone`):a(`taskForm.allow.project`,{list:s})}),l=i!==null&&i.value===`dangerous`,u=i!==null&&i.value===null||r!==null&&r.checked===null;return/* @__PURE__ */ (0,Z.jsxs)(o,{label:a(`taskForm.allow.menuName`),side:`top`,className:`w-[360px] max-w-[calc(100vw-16px)]`,matchTriggerWidth:!1,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,disabled:n,"data-testid":`task-form-allow`,"data-site":i===null||i.value===null?void 0:i.value,"data-unset":u||void 0,className:h(`inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full border border-solid pr-[7px] pl-[9px] text-xs font-medium whitespace-nowrap transition-[border-color,background-color,color] duration-(--motion-short) aria-expanded:border-(--color-border-focus) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-50`,l?`border-(--color-border-error-soft) bg-(--color-bg-error-tint-subtle) text-(--color-error-text)`:u?`border-(--color-border-warning) bg-(--color-warning-bg) text-fg-secondary enabled:hover:text-fg-primary [&>svg:first-child]:text-(--color-warning-text)`:`border-[color-mix(in_srgb,var(--color-primary)_30%,transparent)] bg-(--color-bg-primary-tint) text-fg-secondary enabled:hover:text-fg-primary`),children:[l?/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}):/* @__PURE__ */ (0,Z.jsx)(tn,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:c}),/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`,className:h(`size-3 shrink-0`,l?`text-current`:`text-fg-muted`)})]}),children:[i!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Ie,{label:a(`taskForm.site.menuLabel`),children:/* @__PURE__ */ (0,Z.jsx)(w,{value:i.value,onValueChange:i.onChange,children:Lt.map(e=>/* @__PURE__ */ (0,Z.jsx)(E,{value:e,label:a(`taskForm.site.menu.${e}`),hint:a(`taskForm.site.hints.${e}`),icon:/* @__PURE__ */ (0,Z.jsx)(g_,{mode:e}),...e===`dangerous`?{tone:`danger`}:{},keepOpen:!0,"data-testid":`task-form-site-${e}`},e))})}),l&&/* @__PURE__ */ (0,Z.jsx)(v_,{lead:a(`taskForm.site.warnMenuLead`),className:`mx-1 mt-1 mb-2`,children:a(`taskForm.site.warnMenu`)}),/* @__PURE__ */ (0,Z.jsx)(k,{})]}),/* @__PURE__ */ (0,Z.jsx)(Ie,{label:a(`taskForm.allow.menuLabel`),children:Bt.map(n=>/* @__PURE__ */ (0,Z.jsx)(D,{label:a(`taskForm.allow.items.${n}`),hint:a(`taskForm.allow.hints.${n}`),checked:e.includes(n),onCheckedChange:e=>t(n,e),"data-testid":`task-form-allow-${n}`},n))}),r!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(k,{}),r.checked===null?/* @__PURE__ */ (0,Z.jsx)(Ie,{label:a(`taskForm.allow.captureApiAsk`),children:/* @__PURE__ */ (0,Z.jsxs)(w,{value:null,onValueChange:e=>r.onCheckedChange(e===`record`),children:[/* @__PURE__ */ (0,Z.jsx)(E,{value:`record`,label:a(`taskForm.allow.captureApiRecord`),hint:a(`taskForm.allow.captureApiHint`),keepOpen:!0,"data-testid":`task-form-capture-api-record`}),/* @__PURE__ */ (0,Z.jsx)(E,{value:`skip`,label:a(`taskForm.allow.captureApiSkip`),keepOpen:!0,"data-testid":`task-form-capture-api-skip`})]})}):/* @__PURE__ */ (0,Z.jsx)(D,{label:a(`taskForm.allow.captureApi`),hint:a(`taskForm.allow.captureApiHint`),checked:r.checked,onCheckedChange:r.onCheckedChange,"data-testid":`task-form-capture-api`})]}),/* @__PURE__ */ (0,Z.jsx)(Ne,{icon:/* @__PURE__ */ (0,Z.jsx)(Zt,{}),children:a(`taskForm.allow.deleteAlwaysAsks`)})]})}function v_({lead:e,children:t,className:n,"data-testid":r}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`note`,className:h(`m-0 flex items-center gap-2 rounded-md border border-solid border-(--color-border-error-soft) bg-(--color-bg-error-tint-subtle) px-3 py-2 text-xs text-fg-primary animate-(--animation-alert-in) motion-reduce:animate-none`,n),"data-testid":r,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-(--color-error-text)`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`font-semibold text-(--color-error-text)`,children:e}),` `,t]})]})}var y_=[`ask`,`bypass`],b_={ask:jn,bypass:Ge};function x_({value:e,onChange:t,disabled:n}){let{t:r}=ye(),i=b_[e];return/* @__PURE__ */ (0,Z.jsx)(o,{label:r(`taskForm.mode.menuLabel`),side:`top`,className:`w-[300px]`,matchTriggerWidth:!1,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,disabled:n,"aria-label":r(`taskForm.mode.chipLabel`,{mode:r(`taskForm.mode.${e}`)}),"data-testid":`task-form-mode`,"data-mode":e,className:`inline-flex h-7 items-center gap-1.5 rounded-full border border-solid border-(--color-border) bg-transparent pr-[7px] pl-[9px] text-xs font-medium whitespace-nowrap text-fg-secondary transition-[border-color,background-color,color,box-shadow] duration-(--motion-short) enabled:hover:border-(--color-border-hover) enabled:hover:text-fg-primary aria-expanded:border-(--color-border-focus) aria-expanded:shadow-(--glow-primary-sm) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-50`,children:[/* @__PURE__ */ (0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),r(`taskForm.mode.${e}`),/* @__PURE__ */ (0,Z.jsx)(ve,{"aria-hidden":`true`,className:`size-3 shrink-0 text-fg-muted`})]}),children:/* @__PURE__ */ (0,Z.jsx)(w,{value:e,onValueChange:t,children:y_.map(e=>{let t=b_[e];return/* @__PURE__ */ (0,Z.jsx)(E,{value:e,label:r(`taskForm.mode.${e}`),hint:r(`taskForm.mode.hints.${e}`),icon:/* @__PURE__ */ (0,Z.jsx)(t,{}),"data-testid":`task-form-mode-${e}`},e)})})})}function S_({value:e,onValueChange:t,clearLabel:n,count:r,look:i=`field`,size:a=`md`,className:o,ref:s,...c}){let l=(0,R.useRef)(null),u=e!==``,d=ae();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(i===`quiet`?pe:ue(`default`,!1,d,a,`search`),o),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:Xe,children:/* @__PURE__ */ (0,Z.jsx)(b,{"aria-hidden":`true`})}),/* @__PURE__ */ (0,Z.jsx)(`input`,{ref:e=>{l.current=e,typeof s==`function`?s(e):s&&(s.current=e)},type:`search`,value:e,onChange:e=>t(e.target.value),className:h(y,`[&::-webkit-search-cancel-button]:appearance-none`),...c}),u&&r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-fg-muted`,children:r}),u&&/* @__PURE__ */ (0,Z.jsx)(j,{size:`sm`,className:`-mr-1.5`,"aria-label":n,icon:/* @__PURE__ */ (0,Z.jsx)(C,{"aria-hidden":`true`}),onClick:()=>{var e;t(``),(e=l.current)==null||e.focus()}})]})}function C_(e){switch(e.kind){case`project`:return{kind:`project`};case`scenarios`:return{kind:`scenarios`,scenarioIds:[...e.scenarioIds]};case`test_run`:return{kind:`test_run`,testRunId:e.testRunId};case`test_plan`:return{kind:`test_plan`,testPlanId:e.testPlanId}}}function w_(e){let[t,...n]=e;return t===void 0?null:{kind:`scenarios`,scenarioIds:[t.id,...n.map(e=>e.id)],firstName:t.name}}function T_(e,t){let n=e.resultsWriter;return n===null?{kind:`nobody`}:n.userId===t?{kind:`mine`,relation:e.testPlanId===null?`free`:`plan`}:{kind:`other`,writer:n.userDisplayName===null?n.userEmail:n.userDisplayName}}function E_(e,t){return e.data===void 0?e.error===null?{status:`loading`}:{status:`failed`,retry:t}:{status:`ready`,items:e.data.items,total:e.data.total}}function D_(e,t,n){let r=d(),i=(0,R.useDeferredValue)(t.trim()),a=(0,R.useCallback)(async t=>{let n=await r.testRuns.listUnified({projectId:e,launchKind:`test_run`,status:`in_progress`,limit:50,offset:0,...i===``?{}:{search:i}},{signal:t});return{items:n.items.filter(e=>e.kind===`run`),total:n.total}},[r,e,i]),o=c({fetcher:a,deps:[e,i],enabled:n}),s=(0,R.useCallback)(async t=>{let n=await cr(t=>r.assignedPlans.list(e,{state:`unfinished`,...t}),t,{pageSize:500,route:`GET /test-plans/project/:id/assigned-to-me`});return{items:n,total:n.length}},[r,e]),l=c({fetcher:s,deps:[e],enabled:n});return{runs:E_(o,o.reload),plans:E_(l,l.reload)}}var O_={project:an,scenarios:Gr,test_run:Ar,test_plan:Tn};function k_({state:e,viewerId:t,scenarioPicker:n}){let{t:r}=ye(),[i,a]=(0,R.useState)(!1),[o,s]=(0,R.useState)(!1),[c,l]=(0,R.useState)(null),{scope:u,scopeRequest:d}=e,f=d===`scenarios`&&n!==null,p=i||d!==null&&!f,m=o||f,g=()=>{a(!1),e.clearScopeRequest()},_=()=>{s(!1),e.clearScopeRequest()},v=P_(u,r),y=O_[u.kind];return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(cn,{side:`top`,collisionAvoidance:sn,title:r(`taskForm.scope.menuLabel`),description:d===null?void 0:r(`taskForm.scope.suggested`),open:p,onOpenChange:e=>{if(!e){g();return}m&&_(),a(!0)},className:`w-[380px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scope-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:l,type:`button`,className:h(t_,e.scopeSuggested&&`border-(--color-border-primary-tint-55)! bg-(--color-bg-primary-tint)! animate-(--animation-scope-suggest) motion-reduce:animate-none`),"aria-label":r(`taskForm.scope.label`,{scope:v.text}),disabled:e.held,"data-testid":`task-form-scope`,children:[/* @__PURE__ */ (0,Z.jsx)(y,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:v.text}),v.detail!==null&&/* @__PURE__ */ (0,Z.jsx)(`em`,{className:`truncate text-fg-muted not-italic`,children:v.detail}),/* @__PURE__ */ (0,Z.jsx)(n_,{})]}),children:p&&/* @__PURE__ */ (0,Z.jsx)(A_,{state:e,viewerId:t,offerScenarios:n!==null,onPicked:g,onScenarios:()=>{g(),s(!0)}})}),n!==null&&c!==null&&/* @__PURE__ */ (0,Z.jsx)(cn,{anchor:c,open:m,onOpenChange:e=>{e||_()},side:`top`,collisionAvoidance:sn,title:r(`taskForm.scope.scenariosListLabel`),titleVisible:!1,className:`w-[400px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scenario-list`,children:m&&n({onPick:t=>{let n=w_(t);n!==null&&e.setScope(n),_()}})})]})}function A_({state:e,viewerId:t,offerScenarios:n,onPicked:r,onScenarios:i}){let{t:a}=ye(),[o,s]=(0,R.useState)(``),c=D_(e.projectId,o,!0),{scope:l}=e,u=t=>{e.setScope(t),r()};return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":a(`taskForm.scope.menuLabel`),className:`flex flex-col`,children:[/* @__PURE__ */ (0,Z.jsx)(r_,{icon:an,title:a(`taskForm.scope.project`),checked:l.kind===`project`,onSelect:()=>u({kind:`project`}),testId:`task-form-scope-project`}),n&&/* @__PURE__ */ (0,Z.jsx)(r_,{icon:Gr,title:a(`taskForm.scope.scenariosPick`),hint:a(`taskForm.scope.scenariosPickHint`),checked:l.kind===`scenarios`,onSelect:i,testId:`task-form-scope-scenarios`}),/* @__PURE__ */ (0,Z.jsx)(a_,{}),/* @__PURE__ */ (0,Z.jsx)(i_,{children:a(`taskForm.scope.runsHeader`)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-2 pb-1`,children:/* @__PURE__ */ (0,Z.jsx)(S_,{value:o,onValueChange:s,"aria-label":a(`taskForm.scope.runsSearch`),placeholder:a(`taskForm.scope.runsSearch`),clearLabel:a(`taskForm.scope.runsSearchClear`),look:`quiet`})}),/* @__PURE__ */ (0,Z.jsx)(j_,{list:c.runs,empty:a(`taskForm.scope.runsEmpty`),render:e=>{let n=T_(e,t),r=M_(e);return/* @__PURE__ */ (0,Z.jsx)(r_,{icon:n.kind===`mine`?Ar:tn,title:N_(r,a),hint:n.kind===`mine`?n.relation===`free`?a(`taskForm.scope.runMine`):a(`taskForm.scope.runAssigned`):n.kind===`other`?a(`taskForm.scope.runForbidden`,{name:n.writer}):a(`taskForm.scope.runForbiddenNobody`),disabled:n.kind!==`mine`,checked:l.kind===`test_run`&&l.testRunId===e.id,onSelect:()=>u({kind:`test_run`,testRunId:e.id,run:r}),testId:`task-form-scope-run-${e.id}`},e.id)}}),/* @__PURE__ */ (0,Z.jsx)(a_,{}),/* @__PURE__ */ (0,Z.jsx)(i_,{children:a(`taskForm.scope.plansHeader`)}),/* @__PURE__ */ (0,Z.jsx)(j_,{list:c.plans,empty:a(`taskForm.scope.plansEmpty`),render:e=>/* @__PURE__ */ (0,Z.jsx)(r_,{icon:Tn,title:e.planName,hint:a(`taskForm.scope.planHint`),checked:l.kind===`test_plan`&&l.testPlanId===e.planId,onSelect:()=>u({kind:`test_plan`,testPlanId:e.planId,planName:e.planName}),testId:`task-form-scope-plan-${e.planId}`},e.planId)})]})}function j_({list:e,empty:t,render:n}){let{t:r}=ye();if(e.status===`loading`)return/* @__PURE__ */ (0,Z.jsx)(o_,{children:r(`taskForm.scope.loading`)});if(e.status===`failed`)return/* @__PURE__ */ (0,Z.jsxs)(o_,{children:[r(`taskForm.scope.loadError`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:e.retry,className:`cursor-pointer border-0 bg-transparent p-0 text-xs text-fg-link hover:underline`,children:r(`taskForm.scope.retry`)})]});if(e.items.length===0)return/* @__PURE__ */ (0,Z.jsx)(o_,{children:t});let i=e.total-e.items.length;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex max-h-56 flex-col overflow-y-auto`,children:[e.items.map(n),i>0&&/* @__PURE__ */ (0,Z.jsx)(o_,{children:r(`taskForm.scope.more`,{count:i})})]})}function M_(e){return{number:e.number,name:e.name}}function N_(e,t){return`${t(`taskForm.scope.runNumber`,{number:String(e.number).padStart(3,`0`)})} \u00B7 ${e.name===null?t(`taskForm.scope.runUntitled`):e.name}`}function P_(e,t){switch(e.kind){case`project`:return{text:t(`taskForm.scope.project`),detail:null};case`scenarios`:{let n=e.scenarioIds.length;return{text:t(`taskForm.scope.scenarios`,{count:n}),detail:e.firstName===null?null:n===1?t(`taskForm.scope.scenariosFirst`,{name:e.firstName}):t(`taskForm.scope.scenariosMore`,{name:e.firstName,count:n-1})}}case`test_run`:return{text:t(`taskForm.scope.testRun`,{name:N_(e.run,t)}),detail:null};case`test_plan`:return{text:t(`taskForm.scope.testPlan`,{name:e.planName}),detail:null}}}function F_({state:e,variant:t,viewerId:n,scenarioPicker:r,launchSlot:i,notice:a,launchLabel:o,"data-testid":s}){let{t:c}=ye(),{navigation:l}=_(),{locale:u}=e,d=Df[u].shell.composer,f={...kn(),rows:{normal:c(`taskForm.effortRows.normal`),thinking:c(`taskForm.effortRows.thinking`),max:c(`taskForm.effortRows.max`)}},p=(0,R.useId)(),m=(0,R.useRef)(null),g=(0,R.useCallback)(()=>{let e=m.current;e!==null&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight+2}px`)},[]);(0,R.useLayoutEffect)(g,[g,e.draft.brief]),(0,R.useEffect)(()=>(window.addEventListener(`resize`,g),()=>window.removeEventListener(`resize`,g)),[g]);let v=t===`inline`,y=t!==`dialog`,b=e.submitting,x=e.draft.allowedChanges.includes(`write_tests`),{questions:S}=e,C=e.held,w=t=>{t.key===`Enter`&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.launch())},T=e.blocked===null?null:c(`taskForm.blocked.${e.blocked}`);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`relative flex flex-col`,t===`card`&&`min-h-0 flex-1`,v&&`rounded-2xl border border-solid border-stroke-hover bg-surface-card shadow-(--shadow-lg)`),...v?{role:`region`,"aria-label":c(`taskForm.title`)}:{},"aria-busy":b||void 0,"data-testid":s,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`relative flex flex-col`,y?`px-4 pt-4 pb-3`:`px-6 pt-4 pb-5`,t===`card`&&`min-h-0 flex-1 overflow-y-auto [scrollbar-width:thin]`),inert:b,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`rounded-xl border border-solid border-stroke-hover bg-surface-primary transition-[border-color,box-shadow] duration-(--motion-short) ease-(--ease-out) focus-within:border-stroke-focus focus-within:shadow-(--glow-primary)`,children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{htmlFor:p,className:`sr-only`,children:c(`taskForm.briefLabel`)}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:m,id:p,value:e.draft.brief,onChange:t=>e.setBrief(t.target.value),onBlur:e.commitBrief,onKeyDown:w,placeholder:c(`taskForm.placeholder`),disabled:C,className:h(`block w-full resize-none border-0 bg-transparent px-4 pt-4 pb-2 font-sans text-[length:var(--text-body-md)] leading-[1.6] tracking-control whitespace-pre-wrap text-fg-primary outline-none placeholder:text-fg-muted`,v?`min-h-[72px]`:`min-h-24`),"data-testid":`task-form-brief`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{role:`group`,"aria-label":c(`taskForm.chipsLabel`),className:`flex flex-wrap gap-1.5 px-3 pb-3`,children:fd.map(t=>/* @__PURE__ */ (0,Z.jsx)(L_,{id:t,locale:u,pressed:e.draft.presetId===t,disabled:C,onPress:()=>e.pressChip(t)},t))})]}),S.brief!==void 0&&/* @__PURE__ */ (0,Z.jsx)(I_,{field:`brief`,text:S.brief}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[/* @__PURE__ */ (0,Z.jsx)(k_,{state:e,viewerId:n,scenarioPicker:r}),e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(d_,{state:e}),x&&/* @__PURE__ */ (0,Z.jsx)(h_,{value:e.draft.newScenarioKind,onChange:e.setScenarioKind,disabled:C})]}),e.login!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mt-2`,children:/* @__PURE__ */ (0,Z.jsx)(p_,{login:e.login,disabled:C})}),S.entryUrl!==void 0&&e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(I_,{field:`entryUrl`,text:S.entryUrl}),S.newScenarioKind!==void 0&&x&&/* @__PURE__ */ (0,Z.jsx)(I_,{field:`newScenarioKind`,text:S.newScenarioKind}),e.scopeSuggested&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`status`,className:`mt-2 mb-0 flex items-center gap-1.5 text-caption text-fg-muted`,"data-testid":`task-form-scope-suggested`,children:[/* @__PURE__ */ (0,Z.jsx)(ci,{"aria-hidden":`true`,className:`size-[13px] shrink-0 text-(--color-primary-text)`}),c(`taskForm.scope.suggestedByChip`)]}),e.withBrowser&&e.draft.standMode===`dangerous`&&/* @__PURE__ */ (0,Z.jsx)(v_,{lead:c(`taskForm.site.warnFieldLead`),className:`mt-4`,"data-testid":`task-form-site-warning`,children:c(`taskForm.site.warnField`)}),!e.withBrowser&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`mt-4 mb-0 flex items-center gap-2 rounded-md bg-surface-hover-layer px-3 py-2 text-xs text-fg-secondary`,"data-testid":`task-form-no-browser`,children:[/* @__PURE__ */ (0,Z.jsx)(jr,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-fg-muted`}),c(`taskForm.noBrowser`)]}),S.standMode!==void 0&&e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(I_,{field:`standMode`,text:S.standMode}),S.captureApi!==void 0&&e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(I_,{field:`captureApi`,text:S.captureApi}),e.error!==null&&/* @__PURE__ */ (0,Z.jsx)(z_,{error:e.error,locale:u,onAction:t=>t===`addresses`?l.openInWeb({kind:`environment-addresses`,projectRef:be(e.projectId)},`new-tab`):l.openInWeb({kind:`ai-settings`},`new-tab`)}),a!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mt-4`,children:a})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`relative flex flex-none flex-wrap items-center gap-2 border-t border-solid border-stroke-light bg-(--modal-footer-bg) py-3 pr-4`,t===`card`?`rounded-b-sm pl-4`:y?`rounded-b-2xl pl-4`:`rounded-b-2xl pl-6`),children:[/* @__PURE__ */ (0,Z.jsx)(Ng,{place:e.place.place,view:e.place.view,fleet:e.place.fleet,onChoose:e.choosePlace,onOpen:e.place.reloadFleet,copy:d.place,heading:!1,thisBrowserReach:`opens_windows`,look:`chip`,disabled:C}),/* @__PURE__ */ (0,Z.jsx)(yn,{choice:e.effort.choice,facts:e.effort.facts,onChoose:e.effort.choose,onAgentsChange:e.effort.setAgents,onOpenSettings:()=>l.openInWeb({kind:`ai-settings`},`new-tab`),copy:f,look:On,disabled:C||e.effort.locked}),e.mode!==null&&/* @__PURE__ */ (0,Z.jsx)(x_,{value:e.mode.value,onChange:e.mode.set,disabled:C}),/* @__PURE__ */ (0,Z.jsx)(__,{allowed:e.draft.allowedChanges,onToggle:e.setAllowed,disabled:C,captureApi:e.withBrowser?{checked:e.draft.captureApi,onCheckedChange:e.setCaptureApi}:null,site:e.withBrowser?{value:e.draft.standMode,onChange:e.setStandMode}:null}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[i,/* @__PURE__ */ (0,Z.jsx)(se,{disabled:T!==null,reason:T===null?``:T,children:/* @__PURE__ */ (0,Z.jsx)(N,{type:`button`,variant:`primary`,size:`md`,className:`h-10! rounded-lg! px-5! text-body-sm!`,icon:/* @__PURE__ */ (0,Z.jsx)($r,{"aria-hidden":`true`}),loading:b,loadingLabel:c(`taskForm.launching`),onClick:()=>void e.launch(),"data-testid":`task-form-launch`,children:o===void 0?c(`taskForm.launch`):o})})]}),e.effort.loadError!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 basis-full text-caption text-(--color-error-text)`,children:c(`launchEffort.loadError`)})]})]})}function I_({field:e,text:t}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`mt-2 mb-0 flex items-start gap-1.5 text-caption text-fg-secondary`,"data-testid":`task-form-question-${e}`,children:[/* @__PURE__ */ (0,Z.jsx)(Dr,{"aria-hidden":`true`,className:`mt-px size-[13px] shrink-0 text-(--color-warning-text)`}),t]})}function L_({id:e,locale:t,pressed:n,disabled:r,onPress:i}){let a=Pg[e],o=md(e);return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":n,disabled:r,onClick:i,"data-testid":`task-form-chip-${e}`,className:h(`inline-flex h-7 items-center gap-1.5 rounded-full border border-dashed border-stroke-hover bg-transparent pr-3 pl-2 text-xs text-fg-secondary`,`transition-[border-color,background-color,color] duration-(--motion-short) ease-(--ease-out)`,`enabled:hover:border-solid enabled:hover:bg-surface-hover-layer enabled:hover:text-fg-primary`,`aria-pressed:border-solid aria-pressed:border-[color-mix(in_srgb,var(--color-primary)_55%,transparent)] aria-pressed:bg-(--color-bg-primary-tint-15) aria-pressed:text-(--color-primary-text)`,`focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled`),children:[/* @__PURE__ */ (0,Z.jsx)(a,{"aria-hidden":`true`,className:h(`size-[13px]`,n?`text-(--color-primary-text)`:`text-fg-muted`)}),o.title[t]]})}function R_(e,t){let[n,r]=Array.from(e);if(n===void 0||r===void 0)return e;let i=n.toLocaleLowerCase(t),a=r!==r.toLocaleUpperCase(t);return i!==n&&a?`${i}${e.slice(n.length)}`:e}function z_({error:e,locale:t,onAction:n}){let{t:r}=ye();return/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`alert`,className:`mt-4 mb-0 flex items-center gap-3 rounded-md border border-solid border-(--color-border-error-soft) bg-(--color-bg-error-tint-subtle) p-3 text-xs text-fg-primary animate-(--animation-alert-in) motion-reduce:animate-none`,"data-testid":`task-form-error`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-(--color-error-text)`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0`,children:e.kind===`refused`?r(`taskForm.errors.notStarted`,{reason:R_(e.reason,t)}):e.text}),e.kind===`refused`&&e.action!==null&&/* @__PURE__ */ (0,Z.jsx)(N,{type:`button`,variant:`secondary`,size:`sm`,className:`ml-auto shrink-0`,onClick:()=>{e.action!==null&&n(e.action)},"data-testid":`task-form-error-action`,children:r(`taskForm.errors.action.${e.action}`)})]})}function B_({tone:e=`error`,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`qa-card-kit__alert`,e===`warning`&&`qa-card-kit__alert--warning`),role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Qe,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t})]})}function V_({question:e,body:t,children:n}){let r=(0,R.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__confirm`,role:`group`,"aria-labelledby":r,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{id:r,children:e}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__confirm-actions`,children:n})]})}function H_(e,t){return e.filter(e=>e.command!==`chat-stop`&&e.toolCallId===t)}function U_({toolCallId:e}){let{commandFailures:t}=Zf(),n=$().cards.common.commandFailure,r=H_(t,e),i=r[r.length-1];if(i===void 0)return null;let a=i.command===`chat-tool-confirm`?n.confirm:n.reject;return/* @__PURE__ */ (0,Z.jsx)(B_,{children:`${a} ${n.reason[i.reason]}`})}var W_={scope:null,placeToOpening:!1};function G_(e){return e.trim()===``||pd(e)}function K_(e,t){let{chip:n}=md(e);if(n===null)throw Error(`Preset ${e} is in PRESET_CHIP_ORDER but has no chip`);return n.briefTemplate[t]}function q_(e){let t=md(e).defaultAllowedChanges;if(t===null)throw Error(`Preset ${e} is a chip but has no \u00AB\u041C\u043E\u0436\u043D\u043E\u00BB defaults`);return Bt.filter(e=>t.includes(e))}function J_(e,t,n){if(e.presetId===t)return{draft:{...e,presetId:`custom`},effects:W_};let r=md(t),i=G_(e.brief)?K_(t,n.locale):e.brief,a=q_(t);return{draft:{brief:i,presetId:t,allowedChanges:a,newScenarioKind:X_(a,e.newScenarioKind),captureApi:r.defaultCaptureApi,standMode:e.standMode},effects:{scope:n.scopeKind===`project`?Y_(r.suggestedScopeKinds):null,placeToOpening:n.placeIsNone&&r.browserSuggested}}}function Y_(e){let[t]=e;return t===`project`||e.includes(`project`)?null:t===`test_run`?{kind:`latest_test_run`}:{kind:`open`,on:t}}function X_(e,t){return e.includes(`write_tests`)?t:null}function Z_(e,t){return t&&(e.captureApi===null||e.standMode===null)}function Q_(e,t,n){let r=new Set(e.allowedChanges);n?r.add(t):r.delete(t);let i=Bt.filter(e=>r.has(e));return{...e,allowedChanges:i,newScenarioKind:X_(i,e.newScenarioKind)}}var $_=[`make_auto`,`atlas_crawl`,`swarm`],ev=[`pending_enroll`,`active`,`revoked`],tv=[`not_owner`,`pending_enroll`,`offline`,`capability_missing`,`queue_full`,`ready`],nv=[`not_enrolled`,`none_ready`,`one_ready`,`many_ready`],rv=[`agents.no_dispatch_target`,`agents.offline`,`agents.runner_ambiguous`],iv=Ct($_),av=I({queued:Wt().int().min(0),limit:Wt().int().min(0),remaining:Wt().int().min(0)}),ov=I({lifecycle:Ct(ev),lastSeenAt:Nt().nullable(),online:Ht(),declaredCapabilities:F(L()).nullable(),queue:I({runs:av,jobs:av}),activeRun:I({id:L(),scenarioId:L(),scenarioName:L(),status:Ut}).nullable(),activeJob:I({id:L(),kind:iv,scenariosTotal:Wt().int().min(0).nullable()}).nullable()}),sv=I({agentId:L(),name:L(),hostname:L().nullable(),platform:rt.nullable(),agentVersion:L().nullable(),state:Ct(tv),blocker:I({errorCode:Ct([`agents.not_owner`,`agents.offline`,`agents.capability_missing`,`agents.queue_full`]),httpStatus:It([bt(403),bt(409)])}).nullable(),facts:ov}),cv=I({resultKind:bt(`runner_readiness`),readinessFor:iv,capability:L(),evaluatedAt:Nt(),presenceWindowMs:Wt().int().min(0),resolution:mt(`kind`,[I({kind:bt(`resolved`),agentId:L(),name:L()}),I({kind:bt(`refused`),errorCode:Ct(rv)})]),fleetState:Ct(nv),runners:F(sv),total:Wt().int().min(0)}),lv=I({resultKind:bt(`runner_enrollment_instructions`),readinessFor:iv,instructions:I({packageName:L(),installCommand:L(),enrollCommand:L(),startCommand:L(),approvalUrlPattern:L(),requestTtlSec:Wt().int().min(0),pollIntervalSec:Wt().int().min(0),steps:F(L())}),expiresAt:Nt()}),uv=I({id:jt(),name:L().min(1),ownerName:L().min(1),mine:Ht(),lifecycle:Ct(ev),online:Ht(),activeRun:I({}).loose().nullable(),activeJob:I({}).loose().nullable().optional()}),dv=I({items:F(uv),total:Wt().int(),offset:Wt().int()});async function fv(e,t){return(await lr(t=>e.request({method:Gn.agentList.method,path:Gn.agentList.path(t),schema:dv}),t)).map(e=>({id:e.id,name:e.name,ownerName:e.ownerName,mine:e.mine,block:or(e),occupied:sr(e)}))}function pv({http:e,ready:t}){let[n,r]=(0,R.useState)({status:`idle`}),[i,a]=(0,R.useState)(0),o=(0,R.useCallback)(()=>a(e=>e+1),[]);return(0,R.useEffect)(()=>{if(!t)return;let n=new AbortController;return r(e=>e.status===`ready`?e:{status:`loading`}),fv(e,n.signal).then(e=>{n.signal.aborted||r({status:`ready`,runners:e})},()=>{n.signal.aborted||r(e=>e.status===`ready`?e:{status:`failed`})}),()=>n.abort()},[t,e,i]),(0,R.useEffect)(()=>{if(!t)return;let e=()=>{document.visibilityState===`visible`&&o()};return window.addEventListener(`focus`,o),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,o),document.removeEventListener(`visibilitychange`,e)}},[t,o]),{fleet:n,reloadFleet:o}}function mv(e){let t=e.find(e=>e.block===null);return t===void 0?{kind:`this_browser`}:{kind:`runner`,agentId:t.id}}function hv(e,t){if(e.kind!==`runner`)return e;if(t.status!==`ready`)return{kind:`runner-unread`,agentId:e.agentId};let n=t.runners.find(t=>t.id===e.agentId);return n===void 0?{kind:`runner-gone`,agentId:e.agentId}:{kind:`runner`,runner:n}}function gv({http:e,ready:t}){let[n,r]=(0,R.useState)(et),{fleet:i,reloadFleet:a}=pv({http:e,ready:t});return{place:n,view:(0,R.useMemo)(()=>hv(n,i),[n,i]),fleet:i,choose:r,reloadFleet:a}}function _v({title:e,subtitle:t,onDiscard:n,discarding:r,children:i,testState:a}){let{t:o}=ye(),s=(0,R.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-ai-chat-dock-card`,"data-testid":`ai-launch-card`,"data-launch-card-state":a,"aria-labelledby":s,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(ci,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:[/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:s,children:e}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-subtitle`,children:t})]}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(C,{size:14}),loading:r,disabled:r,onClick:n,"data-testid":`ai-launch-card-discard`,children:o(`taskForm.card.discard`)})]}),i]})}function vv({children:e}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`status`,className:`m-0 flex items-start gap-2 rounded-md border border-solid border-(--color-border-primary-tint-55) bg-(--color-bg-primary-tint) px-3 py-2 text-xs leading-normal text-fg-primary`,"data-testid":`ai-launch-card-notice`,children:[/* @__PURE__ */ (0,Z.jsx)(M,{"aria-hidden":`true`,className:`mt-px size-3.5 shrink-0 text-(--color-primary-text)`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0`,children:e})]})}function yv(e,t){let n=d(),[r,i]=(0,R.useState)(`idle`);return{discarding:r===`discarding`,failed:r===`failed`,discard:()=>{i(`discarding`),n.launchDrafts.discard(e.id).then(()=>t.reload(),()=>i(`failed`))}}}function bv(e,t){switch(e.key){case`task`:return{version:t,task:e.fields};case`amend`:return{version:t,amend:e.fields};case`continue`:{let{amendment:n}=e.fields;return e.amendBase!==void 0&&n!=null?{version:t,continue:e.fields,amendBase:e.amendBase}:{version:t,continue:e.fields}}}}function xv(e,t){if(t===null)return e;if(e===null)return t;if(e.key!==t.key)throw Error(`Draft writer: a '${t.key}' change while '${e.key}' waits`);if(t.key===`continue`&&e.key===`continue`){let n=`amendment`in t.fields?t.amendBase:e.amendBase;return{key:`continue`,fields:{...e.fields,...t.fields},...n===void 0?{}:{amendBase:n}}}return{key:t.key,fields:{...e.fields,...t.fields}}}function Sv({draft:e,adopt:t,onStale:n}){let r=d(),[i,a]=(0,R.useState)(null),o=(0,R.useRef)(e.version),s=(0,R.useRef)(null),c=(0,R.useRef)(null),l=(0,R.useRef)(null),u=e.id;(0,R.useEffect)(()=>{l.current===null&&(o.current=e.version)},[e.version]);let f=(0,R.useCallback)(async()=>{for(;;){let e=s.current;if(e===null)return o.current;s.current=null;try{let n=await r.launchDrafts.patch(u,bv(e,o.current));o.current=n.version,t(n)}catch(t){let r=s.current;return s.current=null,t instanceof He&&t.errorCode===`launch_drafts.version_changed`?(c.current=null,n(`version_changed`)):(c.current=xv(e,r),a(t),n(`write_failed`)),null}}},[r,u,t,n]),p=(0,R.useCallback)(e=>{a(null);let t=c.current;c.current=null,s.current=xv(xv(t,s.current),e),l.current===null&&(l.current=f().finally(()=>{l.current=null}))},[f]);return{write:p,flush:(0,R.useCallback)(async()=>{let e=!1;for(;;){let t=l.current;if(t!==null){if(await t===null&&c.current===null)return null;continue}let n=c.current;if(n===null)return o.current;if(e)return null;e=!0,p(n)}},[p]),failure:i}}var Cv=/* @__PURE__ */ new Set([`launch_drafts.version_changed`,`launch_drafts.not_open`,`workflows.segment_changed`,`workflows.not_amendable`,`workflows.not_continuable`]);function wv(e,t){return e===null?t.task.launchKind===`preset`?{text:``,allowedChanges:t.task.allowedChanges,newScenarioKind:t.task.newScenarioKind}:{text:``,allowedChanges:[],newScenarioKind:null}:{text:e.briefAddition===null?``:e.briefAddition,allowedChanges:e.allowedChanges,newScenarioKind:e.newScenarioKind}}function Tv(e){let t=e.text.trim();return{briefAddition:t===``?null:t,allowedChanges:[...e.allowedChanges],newScenarioKind:e.newScenarioKind}}function Ev(e,t){return e.intent!==`continue`||e.continue.amendment!==null||t.task.launchKind!==`preset`?null:{allowedChanges:[...t.task.allowedChanges],newScenarioKind:t.task.newScenarioKind}}function Dv(e,t){return e.text.trim()!==``||e.newScenarioKind!==t.newScenarioKind||e.allowedChanges.length!==t.allowedChanges.length||e.allowedChanges.some(e=>!t.allowedChanges.includes(e))}function Ov({draft:e,source:t,staleNotice:n,onStale:r}){let{t:i}=ye(),a=d(),o=xg(),s=$(),c=Q(),l=s.cards.workflow,{http:u,browser:f}=Zf(),p=(0,R.useId)(),m=e.display.target;if(m===null)throw Error(`Launch draft ${e.id}: an ${e.intent} draft without its target`);let h=m.task.launchKind===`preset`?m.task:null,g=e.intent===`continue`,[_,v]=(0,R.useState)(()=>wv(e.intent===`amend`?e.amend:e.continue.amendment,m)),[y]=(0,R.useState)(()=>Ev(e,m)),[b,x]=(0,R.useState)(e.intent===`continue`?e.continue.place:null),[S,C]=(0,R.useState)(!1),[w,T]=(0,R.useState)(null),E=Sv({draft:e,adopt:t.adopt,onStale:r}),ee=yv(e,t),{fleet:D,reloadFleet:O}=pv({http:u,ready:g}),te=t=>{if(T(null),e.intent===`amend`){E.write({key:`amend`,fields:Tv(t)});return}if(m.task.launchKind!==`preset`){E.write({key:`continue`,fields:{amendment:null}});return}let n=Dv(t,y===null?{allowedChanges:m.task.allowedChanges,newScenarioKind:m.task.newScenarioKind}:y)?Tv(t):null;E.write({key:`continue`,fields:{amendment:n},...y===null||n===null?{}:{amendBase:y}})},k=e=>{v(e),te(e)},A=()=>{let t=e.intent===`amend`?e.amend:e.continue.amendment;return t===null||t.briefAddition===null?``:t.briefAddition},j=()=>{_.text.trim()!==A()&&te(_)},ne=e.missing.find(e=>e.field===`change`),re=c,M=_.allowedChanges.includes(`write_tests`),ie=b===null?null:hv(b,D),ae=e.intent===`amend`&&ne!==void 0||M&&_.newScenarioKind===null||ie!==null&&ie.kind===`runner-gone`,oe=(0,R.useRef)(!1),se=async()=>{if(!(ae||oe.current)){oe.current=!0;try{await ce()}finally{oe.current=!1}}},ce=async()=>{C(!0),T(null),j();let n=await E.flush();if(n===null){C(!1);return}try{let r=await a.launchDrafts.launch(e.id,{version:n,target:null});C(!1),g&&b!==null&&b.kind===`this_browser`&&f!==null&&f.workflowHost.attach(r.workflow.id),t.adopt(r.draft)}catch(e){if(C(!1),e instanceof He&&e.errorCode!==void 0&&Cv.has(e.errorCode)){r(`version_changed`);return}T(Dg(o,e,`taskForm.errors.launch`))}},le=g?i(`taskForm.card.continue.subtitle`,{task:l.topic(m.topic),segment:m.segment,status:l.pill[m.status]}):i(`taskForm.card.amend.subtitle`,{task:l.topic(m.topic),status:l.pill[m.status]}),ue=E.failure===null?w:i(`taskForm.card.notSaved`,{reason:Dg(o,E.failure,`taskForm.errors.launch`)}),fe=S;return/* @__PURE__ */ (0,Z.jsxs)(_v,{title:i(g?`taskForm.card.continue.title`:`taskForm.card.amend.title`),subtitle:le,onDiscard:fe?null:ee.discard,discarding:ee.discarding,testState:e.intent,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-3 pb-3`,children:[h!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-md bg-(--color-bg-modal-inset) px-3 py-2 text-xs leading-normal`,children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 line-clamp-3 whitespace-pre-wrap text-fg-primary`,children:h.brief}),h.amendments.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 line-clamp-2 border-0 border-l-2 border-solid border-stroke pl-2 text-fg-secondary`,children:e.text},e.createdAt))]}),h===null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 text-xs text-fg-secondary`,children:i(`taskForm.card.continue.swarm`)}),h!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`rounded-xl border border-solid border-stroke-hover bg-surface-primary transition-[border-color,box-shadow] duration-(--motion-short) ease-(--ease-out) focus-within:border-stroke-focus focus-within:shadow-(--glow-primary)`,children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{htmlFor:p,className:`sr-only`,children:i(`taskForm.card.additionLabel`)}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{id:p,value:_.text,rows:3,placeholder:i(g?`taskForm.card.continue.placeholder`:`taskForm.card.amend.placeholder`),disabled:fe,onChange:e=>{T(null),v({..._,text:e.target.value})},onBlur:j,className:`block w-full resize-y border-0 bg-transparent px-3 py-2.5 font-sans text-[length:var(--text-body-sm)] leading-[1.6] text-fg-primary outline-none placeholder:text-fg-muted`,"data-testid":`ai-launch-card-addition`})]}),ne!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`m-0 flex items-start gap-1.5 text-caption text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(Dr,{"aria-hidden":`true`,className:`mt-px size-[13px] shrink-0 text-(--color-warning-text)`}),ne.question[re]]}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(vv,{children:n}),ee.failed&&/* @__PURE__ */ (0,Z.jsx)(B_,{children:i(`taskForm.card.discardFailed`)}),ue!==null&&/* @__PURE__ */ (0,Z.jsx)(B_,{children:ue})]})}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[g&&b!==null&&ie!==null&&/* @__PURE__ */ (0,Z.jsx)(Ng,{place:b,view:ie,fleet:D,onChoose:e=>{x(e),T(null),E.write({key:`continue`,fields:{place:e}})},onOpen:O,copy:s.shell.composer.place,heading:!1,thisBrowserReach:`opens_windows`,look:`chip`,disabled:fe}),h!==null&&/* @__PURE__ */ (0,Z.jsx)(__,{allowed:_.allowedChanges,onToggle:(e,t)=>{let n=new Set(_.allowedChanges);t?n.add(e):n.delete(e);let r=Bt.filter(e=>n.has(e));k({..._,allowedChanges:r,newScenarioKind:X_(r,_.newScenarioKind)})},disabled:fe,captureApi:null,site:null}),h!==null&&M&&/* @__PURE__ */ (0,Z.jsx)(h_,{value:_.newScenarioKind,onChange:e=>k({..._,newScenarioKind:e}),disabled:fe}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,className:`ml-auto`,icon:g?/* @__PURE__ */ (0,Z.jsx)($r,{size:14}):/* @__PURE__ */ (0,Z.jsx)(de,{size:14}),loading:S,disabled:ae||fe,onClick:()=>void se(),"data-testid":`ai-launch-card-press`,children:i(g?`taskForm.card.continue.press`:`taskForm.card.amend.press`)})]})]})}function kv(e){let[t,n]=(0,R.useState)({key:e,value:null,save:null}),[r,i]=(0,R.useState)(null),a=t.key===e?t:{key:e,value:null,save:null},o=t=>{i(null),n(n=>({...n.key===e?n:{key:e,value:null,save:null},...t}))};return{value:a.value,save:a.save,setValue:e=>o({value:e}),setValueFor:(e,t)=>{i(null),n({key:e,value:t,save:null})},setSave:e=>o({save:e}),reset:()=>n({key:e,value:null,save:null}),saveError:r,setSaveError:i}}function Av({projectId:e,environment:t,active:n,opening:r}){let i=d(),a=t===null?null:t.environmentId,o=a===null?``:a,s=(0,R.useCallback)(async t=>{let n=a===null?{}:{environmentId:a},r=await i.projects.crawlScope(be(e),n,{signal:t});return{key:o,scope:r}},[i,e,a,o]),{data:l,error:u,reload:f}=c({fetcher:s,deps:[e,o],enabled:n&&t!==null}),p=l===void 0||l.key!==o?void 0:l.scope,m=kv(o),[h,g]=(0,R.useState)(r);return h!==null&&n&&t!==null&&(g(null),m.setValueFor(h.environmentId===null?o:h.environmentId,h.value)),{scope:p,scopeError:u,reloadScope:f,value:m.value===null?jv(p):m.value,setValue:m.setValue,setValueFor:(e,t)=>m.setValueFor(e===null?``:e,t),block:p===void 0?`unread`:null}}function jv(e){return e===void 0?``:e.startUrl.state===`resolved`?e.startUrl.url:``}function Mv(e){let t=e.trim();if(t===``)return{state:`empty`};let n=t.includes(`://`)?t:`https://${t}`,r=a(n);if(!r.ok)return{state:`invalid`,reason:r.reason};let i=fr(r.url.origin);if(!i.ok)return{state:`invalid`,reason:i.reason};let o=r.url.href,s=o===`${r.url.origin}/`;return{state:`ok`,baseUrl:i.baseUrl,launchUrl:s?void 0:o,href:o}}var Nv=`targets.not_configured`,Pv=`targets.cell_missing`,Fv=`targets.address_required`;function Iv(e){return e===Nv||e===Pv||e===Fv}function Lv(e,t,n){if(t===Nv)return{kind:`not_configured`};if(t===Pv){let t=n==null?void 0:n.applicationId,r=n==null?void 0:n.environmentId;return typeof t==`string`&&typeof r==`string`?{kind:`cell_missing`,applicationId:t,environmentId:r}:(e.error(`targets.cell_missing arrived without its application \u00D7 environment pair`,{params:n}),null)}if(t===Fv){let t=n==null?void 0:n.targetId;return typeof t==`string`?{kind:`address_required`,targetId:t}:(e.error(`targets.address_required arrived without its targetId`,{params:n}),null)}return null}function Rv(e,t){return t instanceof He?Lv(e,t.errorCode,t.params):null}function zv({projectId:e,environment:t,source:n,catalog:r,environments:i,reloadCatalog:a}){let o=d(),{logger:s}=_(),l=n!==null&&n.kind===`inherited`?n.entryUrl:null,u=l!==null,f=n!==null&&n.kind===`scenario`?n.scenarioId:null,p=n!==null&&(n.kind===`scenario`||n.kind===`launchCell`),m=t===null?null:t.environmentId,h=`${m===null?``:m}|${f===null?``:f}`,g=(0,R.useCallback)(async t=>{let n={...m===null?{}:{environmentId:m},...f===null?{}:{scenarioId:f}};try{let r=await o.projects.entryUrl(be(e),n,{signal:t});return{key:h,read:{status:`resolved`,address:r}}}catch(e){if(e instanceof He&&Iv(e.errorCode)){let t=Lv(s,e.errorCode,e.params);if(t!==null)return{key:h,read:{status:`refused`,refusal:t}}}throw e}},[o,s,e,m,f,h]),{data:v,error:y,reload:b}=c({fetcher:g,deps:[e,h],enabled:n!==null&&!u&&t!==null}),x=y===null?v===void 0||v.key!==h?{status:`loading`}:v.read:{status:`error`,error:y},S=kv(h),[C,w]=(0,R.useState)(null),T=x.status===`refused`?x.refusal:null,E=C!==null&&C.key===h?C.refusal:T!==null&&(p||T.kind===`not_configured`)?T:null,ee=E===null&&!p?T:null,D=e=>e===null||r===void 0||i===void 0?null:Wg(r,i,e),O=D(E),te=x.status===`resolved`?x.address.entryUrl:null,k=u?l:E===null?te:null,A=S.value===null?k===null?``:k:S.value,j=A.trim(),ne=E!==null&&E.kind!==`not_configured`,re=S.save===null?ne&&E.kind===`cell_missing`:S.save,M=Mv(A),N=ne&&re&&M.state!==`empty`,ie=u&&j===``,ae=(()=>{if(u)return j===``?void 0:j;if(j!==``&&(te===null||j!==te&&`${j}/`!==te))return j})(),oe=ie?`repeatCleared`:!u&&N&&M.state===`invalid`?`saveInvalid`:null;return{value:A,setValue:S.setValue,isLoading:!u&&x.status===`loading`,read:x,refusal:E,refusedCell:O,defaultApplicationNote:D(ee),missingRepeatAddress:ie,saveChecked:re,setSaveChecked:S.setSave,savePlan:M,saveError:S.saveError,block:oe,override:ae,adoptDispatchRefusal:e=>{let t=Rv(s,e);return t!==null&&(w({key:h,refusal:t}),!0)},prepareDispatch:async()=>{if(!N||O===null||M.state!==`ok`)return{ok:!0,entryUrl:ae,saved:!1};S.setSaveError(null);try{let t=await Lg(o,e,O,M.baseUrl);s.info(`Launch address saved into its cell`,{projectId:e,targetId:t.id,applicationId:t.applicationId,environmentId:t.environmentId,mode:O.kind})}catch(t){return s.error(`Failed to save the launch address into its cell`,{error:t instanceof Error?t:Error(String(t)),projectId:e,mode:O.kind}),S.setSaveError(t),{ok:!1}}return w(null),S.reset(),b(),a(),{ok:!0,entryUrl:M.launchUrl,saved:!0}}}}var Bv=`project-default`;function Vv(e,t){return e===null?{kind:`projectDefault`}:t===void 0?{kind:`unreadable`}:t.some(t=>t.id===e)?{kind:`named`,id:e}:{kind:`deleted`}}function Hv(e){return e.kind===`projectDefault`?Bv:e.kind===`named`?e.id:``}function Uv(e,t){return e.kind===`deleted`?`makeAutoDispatch.repeat.environmentSourceDeleted`:e.kind===`unreadable`&&t?`makeAutoDispatch.repeat.environmentSourceUnreadable`:null}function Wv(e){return e===`project-default`?null:e}function Gv(e,t){if(t!==null&&e.some(e=>e.id===t))return t;let n=e.find(e=>e.isDefault);if(n!==void 0)return n.id;let r=e[0];return r===void 0?null:r.id}function Kv(e,t){let{t:n}=ye(),r=d(),[i,a]=(0,R.useState)(null),o=(0,R.useCallback)(t=>r.environments.list(be(e),{signal:t}),[r,e]),{data:s,error:l,reload:u}=c({fetcher:o,deps:[e]}),f=(0,R.useMemo)(()=>s===void 0?[]:s.map(e=>({value:e.id,label:e.name})),[s]),p=n(`agentRunDispatch.environment.asUsual`),m=(0,R.useMemo)(()=>t.kind===`concrete`?f:[{value:Bv,label:p},...f],[t.kind,f,p]),h={mode:t.kind,environments:s,loadError:l,reload:u,options:m,setValue:a};if(t.kind===`concrete`){let e=s===void 0?null:Gv(s,t.preferredEnvironmentId),n=i===null?e:i;return{...h,value:n,noticeKey:null,shown:s!==void 0&&s.length>0,body:s===void 0?null:{environmentId:n}}}let g=t.kind===`repeat`?Vv(t.environmentId,s):null,_=g===null?Bv:Hv(g),v=i===null?_:i;return{...h,value:v===``?null:v,noticeKey:g===null?null:Uv(g,l!==null),shown:!0,body:v===``?null:{environmentId:Wv(v)}}}function qv({projectId:e,environment:t,address:n}){let r=Kv(e,t),i=Hg(e),a={data:i.data,error:i.error,reload:i.reload},o=r.environments,s=zv({projectId:e,environment:r.body,source:n.kind===`crawlStart`?null:n,catalog:a.data,environments:o,reloadCatalog:a.reload}),c=Av({projectId:e,environment:r.body,active:n.kind===`crawlStart`,opening:n.kind===`crawlStart`&&n.opening!==void 0?n.opening:null});return{projectId:e,environment:r,catalog:a,address:n.kind===`crawlStart`?{kind:`crawlStart`,...c}:{kind:`entryUrl`,source:n.kind,...s}}}function Jv(){let{t:e}=ye(),t=xg();return{generic:e=>Dg(t,e,`taskForm.errors.launch`),addressMissing:t=>t===null?e(`taskForm.errors.addressMissingNoEnvironment`):e(`taskForm.errors.addressMissing`,{environment:t}),missingFields:t=>e(`taskForm.errors.incomplete`,{fields:t.map(t=>e(`taskForm.errors.missingField.${t}`)).join(`; `)})}}var Yv=/* @__PURE__ */ new Set([`targets.not_configured`,`agents.entry_url_out_of_scope`,`agents.entry_url_override_invalid`]);function Xv(e,t,n){let r=O.parse(e.params).missing,i=t!==null&&t.blank&&r.includes(`entryUrl`),[a,...o]=s.filter(e=>r.includes(e)&&!(i&&e===`entryUrl`));return{kind:`refused`,reason:[...i?[n.addressMissing(t.environmentName)]:[],...a===void 0?[]:[n.missingFields([a,...o])]].join(`; `),action:i?`addresses`:null}}function Zv(e,t,n){if(!(e instanceof He)||e.errorCode===void 0)return{kind:`refused`,reason:n.generic(e),action:null};if(e.errorCode===`launch_drafts.incomplete`)return Xv(e,t,n);let r=Yv.has(e.errorCode)?`addresses`:e.errorCode.startsWith(`ai_models.`)?`ai_settings`:null;return{kind:`refused`,reason:n.generic(e),action:r}}var Qv=new Set(ht);function $v(e,t){let n=d(),{data:r,error:i,reload:a}=c({fetcher:async r=>t===null?[]:(await n.variables.getContext(be(e),{environmentId:t},{signal:r})).resolved.filter(e=>Qv.has(e.scope)&&ot.test(e.name)).map(e=>({name:e.name,isSecret:e.isSecret})).sort((e,t)=>e.name.localeCompare(t.name)),deps:[n,e,t],enabled:t!==null});return t===null?{kind:`no_environment`}:i===null?r===void 0?{kind:`reading`}:{kind:`ready`,variables:r}:{kind:`failed`,retry:a}}function ey(e,t,n){let r=e.filter(e=>e!==t);return n?[...r,t]:r}var ty={"launch_drafts.version_changed":`version_changed`,"launch_drafts.not_open":`not_open`,"workflows.conversation_busy":`conversation_busy`};function ny(e){return e===`ru`||e===`en`}function ry(e,t){if(t===null||t.kind!==e.kind)throw Error(`Launch draft: scope label ${t===null?`null`:t.kind} does not name scope ${e.kind}`);switch(e.kind){case`project`:return{kind:`project`};case`scenarios`:{let[t,...n]=e.scenarioIds;if(t===void 0)throw Error(`Launch draft: a scenarios scope without scenarios`);return{kind:`scenarios`,scenarioIds:[t,...n],firstName:null}}case`test_run`:if(t.kind!==`test_run`)throw Error(`unreachable: label kind checked above`);return{kind:`test_run`,testRunId:e.testRunId,run:{number:t.number,name:t.name}};case`test_plan`:if(t.kind!==`test_plan`)throw Error(`unreachable: label kind checked above`);return{kind:`test_plan`,testPlanId:e.testPlanId,planName:t.name}}}function iy(e){return{brief:e.brief===null?``:e.brief,presetId:e.presetId,allowedChanges:e.allowedChanges,newScenarioKind:e.newScenarioKind,captureApi:e.captureApi,standMode:e.standMode}}function ay(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:e}function oy(e,t,n){return Se(e)?{place:e,captureApi:t.captureApi,standMode:t.standMode,entryUrl:n.entryUrl,environmentId:n.environmentId,credentials:n.variableNames.length===0?null:{variableNames:[...n.variableNames],role:null}}:{place:e,...t.newScenarioKind===`auto`?{newScenarioKind:null}:{},captureApi:null,standMode:null,entryUrl:null,environmentId:null,credentials:null}}function sy({draft:e,source:t,target:n,onStale:r}){let i=d(),{t:a,i18n:o}=ye(),s=xg(),c=Jv(),{http:l}=Zf(),u=o.resolvedLanguage;if(u===void 0||!ny(u))throw Error(`The task form has no templates for the UI locale ${String(u)}`);let f=e.task,p=e.projectId,[m,h]=(0,R.useState)(()=>iy(f)),[g,_]=(0,R.useState)(()=>ry(f.scope,e.display.scopeLabel)),[v,y]=(0,R.useState)(null),[b,x]=(0,R.useState)(f.place),[S,C]=(0,R.useState)(f.credentials===null?[]:f.credentials.variableNames),[w,T]=(0,R.useState)(null),[E,ee]=(0,R.useState)(!1),D=Sv({draft:e,adopt:t.adopt,onStale:r}),{fleet:O,reloadFleet:te}=pv({http:l,ready:!0}),k=Se(b),A=xn(ay(f.level),!k),j=qv({projectId:p,environment:{kind:`concrete`,preferredEnvironmentId:f.environmentId},address:{kind:`crawlStart`,...f.entryUrl===null?{}:{opening:{environmentId:f.environmentId,value:f.entryUrl}}}}),ne=j.environment.body,re=ne!==null,M=ne===null?null:ne.environmentId,N=j.address.value,ie=$v(p,j.environment.value),ae=(0,R.useRef)(null);(0,R.useEffect)(()=>{if(!k||!re)return;let e=ae.current;if(e===null){if(ae.current={environmentId:M,entryUrl:N},(f.environmentId===null||f.environmentId===M)&&(f.entryUrl===null?N.trim()===``:f.entryUrl===N))return}else if(e.environmentId===M&&e.entryUrl===N)return;let t=e!==null&&e.environmentId!==M;ae.current={environmentId:M,entryUrl:N},t&&C([]),D.write({key:`task`,fields:{entryUrl:N.trim()===``?null:N,environmentId:M,...t?{credentials:null}:{}}})},[k,re,M,N,f.environmentId,f.entryUrl,D]);let oe=(0,R.useRef)(JSON.stringify(f.level)),se=JSON.stringify(A.input);(0,R.useEffect)(()=>{oe.current!==se&&(oe.current=se,D.write({key:`task`,fields:{level:A.input}}))},[se,A.input,D]);let ce=e=>{T(null),D.write({key:`task`,fields:e})},le=e=>{x(e),!Se(e)&&m.newScenarioKind===`auto`&&h(e=>({...e,newScenarioKind:null})),ce(oy(e,m,{entryUrl:N.trim()===``?null:N,environmentId:M,variableNames:S}))},ue={place:b,view:hv(b,O),fleet:O,choose:le,toOpeningPlace:()=>le(O.status===`ready`?mv(O.runners):{kind:`this_browser`}),reopen:()=>void 0,reloadFleet:te},de=Object.fromEntries(e.missing.filter(e=>e.field!==`change`).map(e=>[e.field,e.question[u]])),fe=m.brief.trim()===``?`brief`:m.allowedChanges.includes(`write_tests`)&&m.newScenarioKind===null?`scenarioKind`:ue.view.kind===`runner-gone`?`place`:Z_(m,k)?`siteChoice`:k&&(j.environment.body===null||j.address.block===`unread`)?`loading`:null,pe=(0,R.useRef)(f.brief===null?``:f.brief),me=()=>{let e=m.brief.trim();e!==pe.current&&(pe.current=e,ce({brief:e===``?null:e}))},he=(0,R.useRef)(!1),ge=async()=>{if(!(fe!==null||he.current)){he.current=!0;try{await _e()}finally{he.current=!1}}},_e=async()=>{T(null),A.clearRefusal(),ee(!0),me();let a=await D.flush();if(a===null){ee(!1);return}let o;try{o=await i.launchDrafts.launch(e.id,{version:a,target:n})}catch(e){ee(!1);let t=e instanceof He&&e.errorCode!==void 0?ty[e.errorCode]:void 0;if(t!==void 0){r(t);return}if(A.adoptLaunchRefusal(e))return;T(Zv(e,k?{blank:N.trim()===``,environmentName:j.environment.value===null?null:ve()}:null,c));return}ee(!1),t.adopt(o.draft)};function ve(){let e=j.environment.options.find(e=>e.value===j.environment.value);if(e===void 0)throw Error(`Environment ${String(j.environment.value)} is not among the options`);return e.label}let be=(e,t)=>{h(e),ce(t)};return{projectId:p,locale:u,draft:m,setBrief:e=>{T(null),h(t=>({...t,brief:e}))},commitBrief:me,pressChip:e=>{let t=J_(m,e,{locale:u,scopeKind:g.kind,placeIsNone:!k}),n=t.draft;be(n,{presetId:n.presetId,allowedChanges:[...n.allowedChanges],newScenarioKind:n.newScenarioKind,...n.brief===m.brief?{}:{brief:n.brief.trim()===``?null:n.brief.trim()},...k?{captureApi:n.captureApi}:{}});let r=t.effects.scope;(r==null?void 0:r.kind)===`open`&&y(r.on),(r==null?void 0:r.kind)===`latest_test_run`&&y(`test_run`),t.effects.placeToOpening&&ue.toOpeningPlace()},setAllowed:(e,t)=>{let n=Q_(m,e,t);be(n,{allowedChanges:[...n.allowedChanges],newScenarioKind:n.newScenarioKind})},setScenarioKind:e=>be({...m,newScenarioKind:e},{newScenarioKind:e}),setCaptureApi:e=>be({...m,captureApi:e},{captureApi:e}),setStandMode:e=>be({...m,standMode:e},{standMode:e}),scope:g,setScope:e=>{_(e),ce({scope:C_(e)})},scopeSuggested:!1,scopeRequest:v,clearScopeRequest:()=>y(null),address:j,place:ue,choosePlace:le,withBrowser:k,login:k?{variables:ie,chosen:S,toggle:(e,t)=>{let n=ey(S,e,t);C(n),ce({credentials:n.length===0?null:{variableNames:n,role:null}})}}:null,questions:de,effort:A,mode:null,blocked:fe,submitting:E,held:E,error:w===null&&D.failure!==null?{kind:`unknown`,text:a(`taskForm.card.notSaved`,{reason:Dg(s,D.failure,`taskForm.errors.launch`)})}:w,launch:ge}}function cy({source:e}){let{t}=ye(),[n,r]=(0,R.useState)(null),{reload:i}=e,a=(0,R.useCallback)(e=>{r(e),i()},[i]),{read:o}=e;if(o.kind===`reading`)return null;if(o.kind===`failed`)return/* @__PURE__ */ (0,Z.jsxs)(_v,{title:t(`taskForm.title`),subtitle:t(`taskForm.card.subtitle`),onDiscard:null,discarding:!1,testState:`unread`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsx)(B_,{children:t(`taskForm.card.readFailed`)})}),/* @__PURE__ */ (0,Z.jsx)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:o.retry,children:t(`taskForm.scope.retry`)})})]});let{draft:s}=o;if(s===null)return null;let c=`${s.id}:${String(e.revision)}`,l=n===null||n===`write_failed`?null:t(`taskForm.card.stale.${n}`);return s.intent===`new`?/* @__PURE__ */ (0,Z.jsx)(ly,{draft:s,source:e,staleNotice:l,onStale:a},c):/* @__PURE__ */ (0,Z.jsx)(Ov,{draft:s,source:e,staleNotice:l,onStale:a},c)}function ly(e){let{t}=ye(),n=d(),r=c({fetcher:async e=>(await n.auth.me({signal:e})).id,deps:[n]});return r.error===null?r.data===void 0?/* @__PURE__ */ (0,Z.jsx)(_v,{title:t(`taskForm.title`),subtitle:t(`taskForm.card.subtitle`),onDiscard:null,discarding:!1,testState:`reading`,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,"aria-busy":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 pb-3 text-xs text-fg-muted`,role:`status`,children:t(`taskForm.card.reading`)})})}):/* @__PURE__ */ (0,Z.jsx)(uy,{...e,viewerId:r.data}):/* @__PURE__ */ (0,Z.jsxs)(_v,{title:t(`taskForm.title`),subtitle:t(`taskForm.card.subtitle`),onDiscard:null,discarding:!1,testState:`unread`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsx)(B_,{children:t(`taskForm.card.readFailed`)})}),/* @__PURE__ */ (0,Z.jsx)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:r.reload,children:t(`taskForm.scope.retry`)})})]})}function uy({draft:e,source:t,staleNotice:n,onStale:r,viewerId:i}){let{t:a}=ye(),o=d(),s=$().cards.workflow,c=e.display.busyWith,l=c!==null&&c.topic.kind===`preset`,[u,f]=(0,R.useState)(`calling_conversation`),p=c===null?u:`new_conversation`,m=sy({draft:e,source:t,target:p,onStale:r}),h=yv(e,t),[g,_]=(0,R.useState)(!1),[v,y]=(0,R.useState)(null),b=xg(),x=async n=>{_(!0),y(null);let i=m.draft.brief.trim();try{let r=await o.workflows.get(n);if(r.launch.kind!==`preset`)throw Error(`Launch draft: the live task ${n} is a ${r.launch.kind} swarm`);let a=await o.launchDrafts.patch(e.id,{version:e.version,switchTo:{intent:`amend`,targetWorkflowId:n,amend:{briefAddition:i===``?null:i,allowedChanges:[...r.launch.allowedChanges],newScenarioKind:r.launch.newScenarioKind}},amendBase:{allowedChanges:[...r.launch.allowedChanges],newScenarioKind:r.launch.newScenarioKind}});_(!1),t.adopt(a)}catch(e){if(_(!1),e instanceof He&&e.errorCode===`launch_drafts.version_changed`){r(`version_changed`);return}y(Dg(b,e,`taskForm.errors.launch`))}},S=c===null?n===null?void 0:/* @__PURE__ */ (0,Z.jsx)(vv,{children:n}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n!==null&&/* @__PURE__ */ (0,Z.jsx)(vv,{children:n}),/* @__PURE__ */ (0,Z.jsx)(vv,{children:a(l?`taskForm.card.busy`:`taskForm.card.busySwarm`,{task:s.topic(c.topic),status:s.pill[c.status]})}),l&&/* @__PURE__ */ (0,Z.jsx)(`div`,{children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,loading:g,disabled:g||m.held,onClick:()=>void x(c.workflowId),"data-testid":`ai-launch-card-amend-live`,children:a(`taskForm.card.amendLive`)})}),v!==null&&/* @__PURE__ */ (0,Z.jsx)(B_,{children:v})]});return/* @__PURE__ */ (0,Z.jsxs)(_v,{title:a(`taskForm.title`),subtitle:a(`taskForm.card.subtitle`),onDiscard:m.held?null:h.discard,discarding:h.discarding,testState:c===null?`new`:`busy`,children:[h.failed&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pt-3`,children:/* @__PURE__ */ (0,Z.jsx)(B_,{children:a(`taskForm.card.discardFailed`)})}),/* @__PURE__ */ (0,Z.jsx)(F_,{state:m,variant:`card`,viewerId:i,scenarioPicker:null,notice:S,launchLabel:c===null?void 0:a(`taskForm.card.launchNew`),launchSlot:/* @__PURE__ */ (0,Z.jsx)(oe,{"aria-label":a(`taskForm.card.target.label`),size:`sm`,value:p,onValueChange:f,disabled:m.held,options:[{value:`calling_conversation`,label:a(`taskForm.card.target.calling_conversation`),...c===null?{}:{disabledReason:a(`taskForm.card.target.busyReason`)},testId:`ai-launch-card-target-calling`},{value:`new_conversation`,label:a(`taskForm.card.target.new_conversation`),testId:`ai-launch-card-target-new`}],"data-testid":`ai-launch-card-target`}),"data-testid":`ai-launch-card-form`})]})}var dy={search:/* @__PURE__ */ (0,Z.jsx)(b,{size:16}),inspect:/* @__PURE__ */ (0,Z.jsx)(Pr,{size:16}),target:/* @__PURE__ */ (0,Z.jsx)(En,{size:16}),layers:/* @__PURE__ */ (0,Z.jsx)(an,{size:16}),add:/* @__PURE__ */ (0,Z.jsx)(de,{size:16}),delete:/* @__PURE__ */ (0,Z.jsx)(Er,{size:16}),key:/* @__PURE__ */ (0,Z.jsx)(Vr,{size:16}),applied:/* @__PURE__ */ (0,Z.jsx)(Ue,{size:16}),partial:/* @__PURE__ */ (0,Z.jsx)(Ze,{size:16}),rejected:/* @__PURE__ */ (0,Z.jsx)(kr,{size:16}),undone:/* @__PURE__ */ (0,Z.jsx)(mi,{size:16}),superseded:/* @__PURE__ */ (0,Z.jsx)(hn,{size:16}),bug:/* @__PURE__ */ (0,Z.jsx)(Sr,{size:16}),unknown:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:16})};function fy(e){return dy[e]}var py=/* @__PURE__ */ new Set([`applied`,`rejected_no_op`,`undone`,`superseded`,`closed`]);function my({state:e,snapshot:t,subject:n,dockRecord:r,decidedInDock:i=!1,children:a,sections:o,note:s,footer:c}){let l=$().cards.changeSet,u=Q(),{t:d}=Jh(),f=Bm(e,t),p=Ym(e,t),m=l.marker[f.marker],g=bh(Zm(t),l),_=Lm(e)?null:Xh(t),v=e===`closed`&&t.closure!==void 0?l.closedBy.line[t.closure.reason]:null,y=_===null?void 0:{title:l.bugFiling.title,caption:v===null?eg(_.facts.finding,d):v},b=n??xh(e,t,l,u),x=py.has(e)||r!==void 0||i&&e===`applying`,S=y!==void 0&&r===void 0&&!py.has(e),C=/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:f.tone,...f.live?{className:`qa-card-kit__pill-live`}:{},children:m});return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:h(Fp,`qa-cs-card`,e===`applying`&&`qa-card-kit--live`,r!==void 0&&`qa-cs-card--awaiting`,S&&`qa-cs-card--need`),tone:r===void 0?S?`warning`:Xm(e,t):`neutral`,icon:dy[p.kind],tileTone:S?`primary`:p.tone,title:y===void 0?l.title:y.title,caption:y===void 0?g:y.caption,...S?{}:{meta:C},"aria-label":y===void 0?l.cardAria(m):y.title,fold:{title:y===void 0?xh(e,t,l,u):y.title,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:y===void 0?v===null?Eh(t,Th(t,l),l):v:y.caption}),decided:x,...r===void 0?{}:{handle:r.handle,linked:r.linked,onLinkChange:r.onLinkChange}},sections:o,note:s,footer:c,data:{"data-change-set-state":t.state},children:[y===void 0&&/* @__PURE__ */ (0,Z.jsx)(Ep,{children:b}),a,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,role:`status`,"aria-live":`polite`,children:l.phaseAnnouncement(m)})]})}function hy({toolCallId:e,entry:t,locked:n,progress:r,onDecide:i,tether:a}){let o=(0,R.useId)(),s=(0,R.useId)(),c=$().cards.changeSet,l=c.dock,u=c.bugFiling,{linked:d,onLinkChange:f}=cg(a,e,`dock`),p=sg(a,e),m=r!==null&&r.current!==null&&r.current.toolCallId===e?r.current.verdict:null,h=Wm(t),{facts:g,bug:_}=t,v=!t.confirmEnabled,y=t.deletes||_!==null;return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:[`qa-ai-chat-dock-card`,y&&`qa-ai-chat-dock-card--warning`,d&&`qa-ai-chat-dock-card--linked`].filter(Boolean).join(` `),"data-testid":`ai-change-set-decision`,"data-tone":y?`warning`:`neutral`,"aria-labelledby":o,"aria-busy":m!==null||void 0,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onFocus:()=>f(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||f(!1)},children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:t.deletes?/* @__PURE__ */ (0,Z.jsx)(Ze,{}):fy(t.icon)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:o,children:t.title})}),p&&/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`description`,content:l.showInFeed,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-dock-card-locate`,"aria-label":l.showInFeedAria(t.title),"data-testid":`ai-change-set-decision-locate`,onClick:()=>a.reveal(e),children:/* @__PURE__ */ (0,Z.jsx)(yr,{"aria-hidden":`true`})})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-body`,children:[_===null?/* @__PURE__ */ (0,Z.jsxs)(`dl`,{className:`qa-ai-chat-dock-card-facts`,"data-testid":`ai-change-set-decision-facts`,children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:g.target.kind===`scenario`?l.factScenario:g.target.kind===`object`?l.factObject:l.factProject}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:g.target.label}),g.withIt!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:l.factWithIt}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{className:`qa-ai-chat-dock-card-fact--risk`,children:g.withIt})]}),g.edits!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:l.factEdits}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:g.edits})]})]}):/* @__PURE__ */ (0,Z.jsxs)(`dl`,{className:`qa-ai-chat-dock-card-facts`,"data-testid":`ai-change-set-decision-facts`,children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factFinding}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:/* @__PURE__ */ (0,Z.jsx)(tg,{finding:_.facts.finding})}),/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factSeverity}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:u.severityWord[_.facts.severity]}),/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factWithIt}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:Qh(_.facts,u)})]}),v&&t.confirmBlockedReason!==null&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-ai-chat-dock-card-why`,id:s,"data-testid":`ai-change-set-decision-why`,children:[/* @__PURE__ */ (0,Z.jsx)(M,{"aria-hidden":`true`}),t.confirmBlockedReason]}),/* @__PURE__ */ (0,Z.jsx)(U_,{toolCallId:e})]}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(kr,{size:14}),loading:m===`reject`,disabled:n,onClick:()=>i(e,`reject`),children:c.reject}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:h.variant,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ge,{size:14}),loading:m===`confirm`,disabled:n,"aria-disabled":v||void 0,"aria-describedby":v&&t.confirmBlockedReason!==null?s:void 0,onClick:()=>{v||i(e,`confirm`)},children:_===null?c[h.label]:c.bugFiling.confirm})]})]})}var gy=`\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022`,_y=`ui-secret-dots`;function vy({label:e,size:t=`md`,className:n,"data-testid":r}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{role:`img`,"aria-label":e,"data-testid":r,className:h(`inline-flex max-w-full min-w-0 items-center gap-1.5 rounded-md border border-stroke-light bg-surface-hover-layer text-(length:--text-body-sm)`,t===`sm`?`h-6 px-1.5`:`h-8 px-2.5`,n),children:[/* @__PURE__ */ (0,Z.jsx)(tn,{size:14,className:`shrink-0 text-fg-muted`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(_y,`tracking-[2px] text-fg-secondary`),"aria-hidden":`true`,children:gy})]})}function yy({tone:e,icon:t}){return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-tile qa-sc-tile--${e}`,"aria-hidden":`true`,children:t===`check`?/* @__PURE__ */ (0,Z.jsx)(Ge,{}):t===`swap`?/* @__PURE__ */ (0,Z.jsx)(Kr,{}):/* @__PURE__ */ (0,Z.jsx)(tn,{})})}function by({name:e}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-sc-env`,children:[/* @__PURE__ */ (0,Z.jsx)(oi,{"aria-hidden":`true`}),e]})}function xy(e){let[t,...n]=e;return t===void 0?null:n.every(e=>e.environment.id===t.environment.id)?t.environment:null}function Sy({id:e,requests:t}){let n=$().cards.changeSet.secretInput,r=xy(t),[i]=t;return t.length===1&&i!==void 0?/* @__PURE__ */ (0,Z.jsxs)(`h2`,{className:`qa-sc-title`,id:e,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-var`,children:i.variableName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,children:n.titleTail}),/* @__PURE__ */ (0,Z.jsx)(by,{name:i.environment.name})]}):/* @__PURE__ */ (0,Z.jsxs)(`h2`,{className:`qa-sc-title`,id:e,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-count`,children:n.countTitle(t.length)}),r!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,children:n.countTitleTail}),/* @__PURE__ */ (0,Z.jsx)(by,{name:r.name})]})]})}function Cy({requests:e,outcome:t,onDone:n}){let r=(0,R.useId)(),i=$().cards.changeSet.secretInput,a=xy(e),[o]=e,s=e.length===1&&o!==void 0?o.description:null;return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-sc qa-sc--outcome`,"data-testid":`ai-secret-input-outcome`,"data-state":t,"aria-labelledby":r,onAnimationEnd:e=>{e.target===e.currentTarget&&e.animationName===`qa-sc-out`&&n()},children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-sc-head`,children:[/* @__PURE__ */ (0,Z.jsx)(yy,{tone:t===`sealed`?`success`:`neutral`,icon:t===`sealed`?`check`:`lock`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-id`,children:/* @__PURE__ */ (0,Z.jsx)(Sy,{id:r,requests:e})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{}),s!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-sc-desc`,children:s})]}),t===`sealed`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-slot qa-sc-slot--success`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-sealed`,children:[/* @__PURE__ */ (0,Z.jsx)(vy,{label:i.hiddenAria,className:`qa-sc-secret`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-done`,children:a===null?i.saved:i.savedIn(a.name)})]})}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-slot`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-declined`,children:[/* @__PURE__ */ (0,Z.jsx)(C,{"aria-hidden":`true`}),i.declined]})})]})}function wy({copy:e,name:t,saved:n,disabled:r,onReopen:i}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-sealed`,"data-testid":`ai-secret-input-sealed`,children:[/* @__PURE__ */ (0,Z.jsx)(vy,{label:e.hiddenAria,className:`qa-sc-secret`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-done`,children:n}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`xs`,className:`qa-sc-reenter`,"aria-label":e.reenterAria(t),disabled:r,"data-testid":`ai-secret-input-reenter`,onClick:i,children:e.reenter})]})}function Ty({copy:e,name:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-was`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-was-label`,children:e.current}),/* @__PURE__ */ (0,Z.jsx)(vy,{label:e.currentAria,className:`qa-sc-secret qa-sc-secret--struck`}),/* @__PURE__ */ (0,Z.jsx)(_r,{className:`qa-sc-was-arrow`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-sc-badge-warn`,children:[e.willReplace,/* @__PURE__ */ (0,Z.jsx)(p,{name:e.whyName,text:e.whyText(t),placement:`top-end`})]})]})}function Ey({field:e,size:t,copy:n,busy:r,closed:i,invalid:a,describedBy:o,onKeyDown:s,onValue:c,onToggle:l,fieldRef:u,trailing:d}){let f=(0,R.useId)(),p=ae(),{request:m,value:g,shown:_}=e;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(ue(r?`busy`:a?`invalid`:`default`,!1,p,t),`qa-sc-field`,`qa-sc-field--${t}`),children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:f,children:m.replacesExistingValue?n.fieldLabelReplace(m.variableName):n.fieldLabel(m.variableName)}),/* @__PURE__ */ (0,Z.jsx)(`input`,{ref:u,id:f,className:h(y,`qa-sc-input`,_&&`qa-sc-input--shown`),type:_?`text`:`password`,value:g,placeholder:n.placeholder,autoComplete:`off`,spellCheck:!1,autoCapitalize:`off`,"data-1p-ignore":``,"data-lpignore":`true`,readOnly:r,disabled:i,"aria-invalid":a||void 0,"aria-describedby":o,onChange:e=>c(m.changeSetItemId,e.target.value),onKeyDown:s}),/* @__PURE__ */ (0,Z.jsx)(j,{size:`sm`,icon:_?/* @__PURE__ */ (0,Z.jsx)(un,{}):/* @__PURE__ */ (0,Z.jsx)(Yt,{}),"aria-pressed":_,"aria-label":_?n.hide:n.show,disabled:r||i,onClick:e=>l(m.changeSetItemId,e.detail>0)}),!i&&d]})}function Dy({copy:e,count:t,replaces:n,failure:r,busy:i,held:a,disabled:o,describedBy:s,inField:c,decisionLabel:l,onPress:u}){let d=r!==null&&r.kind!==`length`&&r.kind!==`closed`&&!i,f=d?e.retry:l===null?t>1?e.saveMany(t):n?e.replace:e.save:l;return/* @__PURE__ */ (0,Z.jsx)(N,{variant:n&&!d&&l===null?`danger-soft`:`primary`,size:`sm`,icon:d?/* @__PURE__ */ (0,Z.jsx)(ii,{}):void 0,loading:i,loadingLabel:l===null?n&&t===1?e.replacing:e.saving:l,disabled:o&&!i,"aria-disabled":a&&!i||void 0,"aria-describedby":s,"data-testid":`ai-secret-input-submit`,className:c?`qa-sc-field-action`:void 0,onClick:()=>{a||u()},children:f})}function Oy({copy:e,sealed:t,closed:n,failure:r,overLength:i,longest:a,lengthLineId:o}){if(n)return/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(M,{"aria-hidden":`true`}),e.closed]});if(i!==null||(r==null?void 0:r.kind)===`length`)return/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line qa-sc-line--error`,id:o,children:[/* @__PURE__ */ (0,Z.jsx)(Qe,{"aria-hidden":`true`}),e.tooLong(Tt,i===null?a:i)]});if(r!==null&&r.kind!==`closed`){let t=r.kind===`confirm`?e.confirmFailed:r.kind===`network`?e.failed.network:r.kind===`server`?e.failed.server:e.failed.refused,n=r.kind===`server`||r.kind===`refused`?r.status:null;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-banner`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Qe,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-banner-text`,children:t}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-banner-code`,children:n})]})}return t?null:/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line`,children:[/* @__PURE__ */ (0,Z.jsx)(si,{"aria-hidden":`true`}),e.privacy]})}async function ky(e,t,n){let r=Gn.changeSetSecretValue;await e.request({method:r.method,path:r.path(t.projectId,t.changeSetId,t.changeSetItemId),body:{value:n},schema:dm})}function Ay(e){if(e instanceof Vt)return{kind:`server`,status:null};if(!(e instanceof Yn))return{kind:`network`};let{status:t,errorCode:n}=e;return t===0?{kind:`network`}:t===409||t===404||n===`secret_unknown_item_id`?{kind:`closed`}:t===400&&n===`validation.failed`?{kind:`length`}:t>=500||t===429?{kind:`server`,status:t}:{kind:`refused`,status:t}}var jy={closed:0,length:1,refused:2,server:3,network:4};function My(e){return e.reduce((e,t)=>e===null||jy[t.kind]<jy[e.kind]?t:e,null)}var Ny={value:``,shown:!1,reopened:!1};function Py(e,t){return new Map(Array.from(e,([e,n])=>[e,t(n)]))}function Fy(e,t){let[n]=e.filter(e=>e.toolCallId===t&&e.command===`chat-tool-confirm`).slice(-1);return n??null}function Iy({requests:e,toolCallId:t,http:n,locked:r,held:i,progress:a,commandFailures:o,logger:s,onConfirm:c}){var l;let[u,d]=(0,R.useState)(()=>/* @__PURE__ */ new Map),f=e.map(e=>{let t=u.get(e.changeSetItemId)??Ny,n=e.valueDeposit!==null&&!t.reopened;return{request:e,value:n?``:t.value,shown:!n&&t.shown,sealed:n}}),p=(e,t)=>{d(n=>{let r=new Map(n);return r.set(e,t(n.get(e)??Ny)),r})},[m,h]=(0,R.useState)({kind:`editing`,failure:null}),g=Fy(o,t),_=m.kind===`deciding`&&!m.sent;(0,R.useEffect)(()=>{_&&!r&&(h({kind:`deciding`,sent:!0,failureBefore:g}),c())},[_,r,g,c]);let v=m.kind===`deciding`&&m.sent&&g!==m.failureBefore,y=f.reduce((e,t)=>t.value.length>1e4&&(e===null||t.value.length>e)?t.value.length:e,null),b=f.every(e=>e.sealed||e.value.length>0),x=f.every(e=>e.sealed),S=m.kind===`editing`||v,C=v?{kind:`confirm`}:m.kind===`editing`?m.failure:null,w=(a==null||(l=a.current)==null?void 0:l.toolCallId)===t,T=()=>{d(e=>Py(e,e=>({...e,value:``,shown:!1})))};return{fields:f,phase:m.kind===`closed`?`closed`:S?`editing`:`busy`,failure:C,overLength:y,filled:b,allSealed:x,setValue(e,t){p(e,e=>({...e,value:t}))},toggleShown(e){p(e,e=>({...e,shown:!e.shown}))},reopen(e){S&&p(e,()=>({value:``,shown:!1,reopened:!0}))},submit(){if(!S||!b||y!==null||r||i||w)return;let e=f.filter(e=>!e.sealed);d(e=>Py(e,e=>({...e,shown:!1}))),h({kind:`depositing`}),Promise.all(e.map(({request:e,value:t})=>ky(n,e,t).then(()=>null,t=>{let n=Ay(t);return n.kind===`server`&&n.status===null&&s.warn(`chat.secret_input.deposit_unreadable`,{changeSetId:e.changeSetId,changeSetItemId:e.changeSetItemId,error:t instanceof Error?t.name:typeof t}),n}))).then(e=>{let t=My(e.filter(e=>e!==null));t===null?h({kind:`deciding`,sent:!1,failureBefore:null}):t.kind===`closed`?(T(),h({kind:`closed`})):h({kind:`editing`,failure:t})})},wipe:T}}function Ly({toolCallId:e,requests:t,heldReason:n,locked:r,progress:i,onDecide:a,tether:o}){var s;let c=(0,R.useId)(),l=(0,R.useId)(),u=$().cards.changeSet,d=u.secretInput,f=Zf(),{linked:p,onLinkChange:m}=cg(o,e,`dock`),g=sg(o,e),_=(0,R.useRef)(/* @__PURE__ */ new Map),v=(0,R.useRef)(null),y=Iy({requests:t,toolCallId:e,http:f.http,locked:r,held:n!==null,progress:i,commandFailures:f.commandFailures,logger:f.logger,onConfirm:()=>a(e,`confirm`)}),b=t.length===1?t[0]:void 0,x=y.allSealed,S=y.fields.filter(e=>!e.sealed),C=S.some(e=>e.request.replacesExistingValue),w=y.phase===`busy`,T=y.phase===`closed`,E=i!==null&&i.current!==null&&i.current.toolCallId===e&&i.current.verdict===`reject`,ee=f.commandFailures.filter(t=>t.toolCallId===e).slice(-1)[0],D=ee!==void 0&&ee.command===`chat-tool-reject`,O=y.overLength!==null||((s=y.failure)==null?void 0:s.kind)===`length`,te=`${l}-len`,k=`${l}-held`,A=h(O&&te,n!==null&&k)||void 0,ne=y.filled&&n===null,re=T?`neutral`:x?`success`:C?`warning`:`live`,ie=xy(t),ae=ie===null?d.saved:d.savedIn(ie.name),[oe]=y.fields,se=b!==void 0&&oe!==void 0&&oe.sealed,ce=b===void 0?null:b.description,le=xy(t)!==null,ue=e=>{let t=_.current.get(e);t!==void 0&&(t.focus(),t.setSelectionRange(t.value.length,t.value.length))},de=e=>{if(e.key!==`Enter`)return;e.preventDefault();let t=y.fields.find(e=>!e.sealed&&e.value.length===0);if(y.fields.length>1&&t!==void 0){ue(t.request.changeSetItemId);return}y.submit()},fe=e=>{v.current=e,y.reopen(e)},pe=e=>t=>{if(t===null){_.current.delete(e);return}_.current.set(e,t),v.current===e&&(v.current=null,t.focus())},me=/* @__PURE__ */ (0,Z.jsx)(Dy,{copy:d,count:S.length,replaces:C,failure:y.failure,busy:w,held:!ne,disabled:r||T||y.overLength!==null,describedBy:n===null?void 0:k,inField:b!==void 0&&!se,decisionLabel:x?u.confirm:null,onPress:y.submit});return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:h(`qa-sc`,C&&`qa-sc--replace`,p&&`qa-sc--linked`),"data-testid":`ai-secret-input-card`,"data-state":y.phase,"aria-labelledby":c,"aria-busy":w||void 0,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),onFocus:()=>m(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||m(!1)},children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-sc-head`,children:[/* @__PURE__ */ (0,Z.jsx)(yy,{tone:re,icon:x&&!T?`check`:C&&!T?`swap`:`lock`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-id`,children:/* @__PURE__ */ (0,Z.jsx)(Sy,{id:c,requests:t})}),T?/* @__PURE__ */ (0,Z.jsx)(`span`,{}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-corner`,children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`xs`,loading:E,disabled:w||r,"data-testid":`ai-secret-input-reject`,onClick:()=>{y.wipe(),a(e,`reject`)},children:u.reject}),g&&/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`description`,content:u.dock.showInFeed,placement:`top-end`,children:/* @__PURE__ */ (0,Z.jsx)(j,{size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(yr,{}),"aria-label":u.dock.showInFeedAria(b===void 0?d.countTitle(t.length):b.variableName),"data-testid":`ai-secret-input-locate`,onClick:()=>o.reveal(e)})})]}),ce!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-sc-desc`,children:ce})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`qa-sc-slot`,C&&!T&&`qa-sc-slot--warning`,x&&!T&&`qa-sc-slot--success`,w&&`qa-sc-slot--busy`,T&&`qa-sc-slot--closed`),"aria-busy":w||void 0,children:[b!==void 0&&se?/* @__PURE__ */ (0,Z.jsx)(wy,{copy:d,name:b.variableName,saved:ae,disabled:w||r||T,onReopen:()=>fe(b.changeSetItemId)}):b===void 0?y.fields.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-row`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-row-label`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.request.variableName}),e.request.description!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e.request.description}),!le&&/* @__PURE__ */ (0,Z.jsx)(by,{name:e.request.environment.name}),e.request.replacesExistingValue&&!e.sealed&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-badge-warn`,children:d.willReplace}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(`qa-sc-row-fill`,(e.sealed||e.value.length>0)&&`qa-sc-row-fill--on`),"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Ge,{})})]}),e.sealed?/* @__PURE__ */ (0,Z.jsx)(wy,{copy:d,name:e.request.variableName,saved:d.saved,disabled:w||r||T,onReopen:()=>fe(e.request.changeSetItemId)}):/* @__PURE__ */ (0,Z.jsx)(Ey,{field:e,size:`md`,copy:d,busy:w,closed:T,invalid:O&&e.value.length>1e4,describedBy:A,onKeyDown:de,onValue:y.setValue,onToggle:(e,t)=>{y.toggleShown(e),t&&ue(e)},fieldRef:pe(e.request.changeSetItemId),trailing:null})]},e.request.changeSetItemId)):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[b.replacesExistingValue&&!T&&/* @__PURE__ */ (0,Z.jsx)(Ty,{copy:d,name:b.variableName}),y.fields.map(e=>/* @__PURE__ */ (0,Z.jsx)(Ey,{field:e,size:`lg`,copy:d,busy:w,closed:T,invalid:O,describedBy:A,onKeyDown:de,onValue:y.setValue,onToggle:(e,t)=>{y.toggleShown(e),t&&ue(e)},fieldRef:pe(e.request.changeSetItemId),trailing:me},e.request.changeSetItemId))]}),/* @__PURE__ */ (0,Z.jsx)(Oy,{copy:d,sealed:x,closed:T,failure:y.failure,overLength:y.overLength,longest:Math.max(...y.fields.map(e=>e.value.length)),lengthLineId:te}),n!==null&&!T&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line`,id:k,children:[/* @__PURE__ */ (0,Z.jsx)(M,{"aria-hidden":`true`}),n]}),D&&!w&&/* @__PURE__ */ (0,Z.jsx)(U_,{toolCallId:e}),(b===void 0||se)&&!T&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-foot`,children:me})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,children:w?d.savingAnnouncement:``})]})}function Ry({conversationId:e,presentToolCallIds:t,dockRef:n,onFocusComposer:r,copy:i}){let a=(0,R.useRef)({conversationId:e,calls:/* @__PURE__ */ new Map}),[o,s]=(0,R.useState)(null);return(0,R.useEffect)(()=>{if(a.current.conversationId!==e){a.current={conversationId:e,calls:/* @__PURE__ */ new Map},s(null);return}let{calls:i}=a.current,o=new Set(t),c=null;for(let[e,t]of[...i])o.has(e)||(i.delete(e),c=t);if(c===null)return;s(c.verdict===`reject`?{kind:`reject`}:c.secretSaved===null?{kind:c.destructive?`confirmDelete`:`confirm`}:{kind:`secretSaved`,saved:c.secretSaved});let l=document.activeElement,u=n.current;(l===null||l===document.body||u!==null&&u.contains(l))&&r()},[e,t,n,r]),{pressed(e,t){for(let n of e)a.current.calls.set(n.toolCallId,{verdict:t,destructive:n.destructive,secretSaved:n.secretSaved})},announcement:o===null?``:o.kind===`secretSaved`?i.secretSaved(o.saved.names,o.saved.environment):i.decided[o.kind]}}function zy({conversationId:e,present:t}){let n=(0,R.useRef)({conversationId:e,pressed:/* @__PURE__ */ new Map,seen:/* @__PURE__ */ new Map}),[r,i]=(0,R.useState)({conversationId:e,items:[]});return(0,R.useEffect)(()=>{n.current.conversationId!==e&&(n.current={conversationId:e,pressed:/* @__PURE__ */ new Map,seen:/* @__PURE__ */ new Map});let{pressed:r,seen:a}=n.current,o=new Map(t.map(e=>[e.toolCallId,e.requests])),s=[];for(let[e,t]of[...r]){if(o.has(e))continue;r.delete(e);let n=a.get(e);n!==void 0&&s.push({toolCallId:e,requests:n,outcome:t===`confirm`?`sealed`:`declined`})}n.current.seen=o,s.length!==0&&i(t=>({conversationId:e,items:[...t.conversationId===e?t.items:[],...s]}))},[e,t]),{pressed(e,t){n.current.pressed.set(e,t)},items:r.conversationId===e?r.items:[],done(e){i(t=>({conversationId:t.conversationId,items:t.items.filter(t=>t.toolCallId!==e)}))}}}function By(e){return Object.prototype.hasOwnProperty.call(er,e)}function Vy(e){return er[e]===`warning`}function Hy(e){return e.kind===`list`||e.key===`entryUrl`||e.key===`reason`}function Uy({fact:e,copy:t}){switch(e.kind){case`workflow`:{let n=_t.safeParse(e.topic);return n.success?hd(n.data):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__unrecognized`,children:t.unrecognized})}case`text`:return e.key===`entryUrl`||e.key===`run`?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__mono`,children:e.text}):e.text;case`token`:{let n=`${e.key}.${e.token}`;return By(n)?Vy(n)?/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`warning`,dot:!1,children:t.token[n]}):t.token[n]:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__unrecognized`,children:t.unrecognized})}case`list`:return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-confirm-facts__chips`,children:e.items.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(Wr,{"aria-hidden":`true`}),e]},`${String(t)}:${e}`))})}}function Wy({facts:e}){let t=$().cards.confirmation,n=Q();return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`dl`,{className:`qa-confirm-facts`,children:e.map(e=>{let r=e.label[n];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`qa-confirm-facts__cell`,Hy(e)&&`qa-confirm-facts__cell--wide`),children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:e.kind===`list`?t.listLabel(r,e.items.length):r}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:/* @__PURE__ */ (0,Z.jsx)(Uy,{fact:e,copy:t})})]},e.key)})})}function Gy(e,t){return e.flatMap(e=>{if(e.kind!==`token`)return[];let n=`${e.key}.${e.token}`;return!By(n)||!Vy(n)?[]:[t.warning[n]]})}var Ky=e=>typeof e==`object`&&e&&`op`in e?e.op:void 0;function qy(e){return e.toolName===`workflow_task_execute`&&Ky(e.args)===`request_change`}var Jy=er;function Yy(e){if(e===null)return`default`;for(let t of e.facts)if(t.kind===`token`&&Jy[`${t.key}.${t.token}`]===`warning`)return`warning`;return`default`}var Xy=2,Zy=`allowedChange`;function Qy(e,t){return t===null?e:e.filter(e=>e.key!==Zy)}function $y({confirmation:e,confirmationPosition:t,pendingConfirmationCount:n,actionsLocked:r,onConfirm:i,onReject:a}){var o,s;let c=(0,R.useId)(),l=$(),u=Q(),d=l.shell.confirmation,{toolCallId:f,toolName:p,display:m}=e,h=((o=e.operationTitles)==null?void 0:o.map(e=>e[u]))??[],[g]=h,_=qy(e)&&h.length===1&&g!==void 0?g:null,v=_??((s=e.title)==null?void 0:s[u]),y=_===null?h:[],b=m===null?null:Qy(m.facts,_),x=Yy(m),S=b===null?[]:Gy(b,l.cards.confirmation),C=x===`warning`,w=_===null?{reject:d.reject,confirm:d.confirm}:{reject:d.grant.no,confirm:d.grant.yes};return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-ai-chat-dock-card${C?` qa-ai-chat-dock-card--warning`:``}`,"data-testid":`ai-pending-confirmation`,"data-tool-name":p,"data-tone":x,"data-pending-confirmation-count":n,"data-tool-purpose-state":y.length>0?`present`:`absent`,"data-confirmation-kind":_===null?`action`:`lead-grant`,"aria-labelledby":c,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:v===void 0?/* @__PURE__ */ (0,Z.jsx)(Dr,{}):C?/* @__PURE__ */ (0,Z.jsx)(Ze,{}):_===null?/* @__PURE__ */ (0,Z.jsx)(Fn,{}):/* @__PURE__ */ (0,Z.jsx)(tn,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:v===void 0?/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:c,"data-tool-name-state":`unrecognized`,children:d.unrecognizedTool}):/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:c,children:v})}),C&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-badge`,"data-testid":`ai-pending-confirmation-warning-badge`,children:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`warning`,children:d.warningBadge})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-body`,children:[y.length>0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-purpose`,children:y.join(` \u00B7 `)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{"data-testid":`ai-pending-confirmation-facts`,"data-confirmation-facts-state":b===null?`absent`:`present`,children:b!==null&&/* @__PURE__ */ (0,Z.jsx)(Wy,{facts:b})}),S.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-warning`,"data-testid":`ai-pending-confirmation-warning`,children:e},e))]}),/* @__PURE__ */ (0,Z.jsx)(U_,{toolCallId:f}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[n>=Xy&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-counter`,"data-testid":`ai-pending-confirmation-queue-counter`,children:d.queuePosition.replace(`{index}`,String(t)).replace(`{total}`,String(n))}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(kr,{size:14}),disabled:r,onClick:()=>a(f),children:w.reject}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ue,{size:14}),disabled:r,onClick:()=>i(f),children:w.confirm})]})]})}function eb(e,t){switch(e.kind){case`ai_run`:return`/ai-runs/${encodeURIComponent(e.id)}`;case`atlas_run`:return t===null?null:`${Re(t,`map/history`)}#run-${encodeURIComponent(e.id)}`;default:{let t=e.kind;throw Error(`agentExecutionWebPath: no page for executor kind ${String(t)}`)}}}function tb({question:e,bar:t}){let n=$().shell.agentQuestions,{project:r}=Zf();if(!T(e.asker))return null;let i=eb(e.asker,r===null?null:r.number);if(i===null)return null;let a=/* @__PURE__ */ (0,Z.jsx)(zp,{path:i,label:n.openRun,accessibleName:n.openRun,emphasis:`secondary`});return t?/* @__PURE__ */ (0,Z.jsx)(Np,{children:a}):a}function nb(e,t){return e.mode===`text`?t.validationText:e.mode===`single`?t.validationSingle:t.validationMultiple}function rb({batchId:e,question:t,draft:n,showValidation:r,disabled:i,onChange:a}){let o=$().shell.questions,s=(0,R.useId)(),c=(0,R.useRef)(!1),l=`qa-chat-question-${e}-${t.id}`,u=`${s}-error`,d=`${s}-custom`,f=r,p=f?u:void 0,m=e=>{if(t.mode===`single`){a({...n,selectedOptionIds:[e],customActive:!1,skipped:!1});return}let r=n.selectedOptionIds.includes(e)?n.selectedOptionIds.filter(t=>t!==e):[...n.selectedOptionIds,e];a({...n,selectedOptionIds:r,customActive:!1,skipped:!1})},h=e=>{c.current=e,a({...n,customActive:e,selectedOptionIds:e?[]:n.selectedOptionIds,skipped:!1})},g=(0,R.useCallback)(e=>{e&&c.current&&(c.current=!1,e.focus())},[]);return/* @__PURE__ */ (0,Z.jsxs)(`fieldset`,{className:`qa-ai-chat-question-field${n.skipped?` qa-ai-chat-question-field--skipped`:``}${f?` qa-ai-chat-question-field--invalid`:``}`,disabled:i,"data-question-id":t.id,children:[/* @__PURE__ */ (0,Z.jsx)(`legend`,{className:`qa-ai-chat-question-legend`,children:/* @__PURE__ */ (0,Z.jsx)(`h4`,{className:`qa-ai-chat-question-title`,tabIndex:-1,children:t.question})}),t.mode!==`text`&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-options`,children:[t.options.map(e=>{let r=n.selectedOptionIds.includes(e.id);return/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-question-option`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:t.mode===`single`?`radio`:`checkbox`,name:l,checked:r,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,onChange:()=>m(e.id)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-question-option-copy`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-label`,children:e.label}),e.description&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-detail`,children:e.description})]}),e.recommended&&/* @__PURE__ */ (0,Z.jsx)(Tp,{dot:!1,className:`qa-ai-chat-question-recommended`,children:o.recommended})]},e.id)}),t.allowCustom&&/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-question-option`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:t.mode===`single`?`radio`:`checkbox`,name:l,checked:n.customActive,"aria-controls":n.customActive?d:void 0,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,onChange:e=>h(e.currentTarget.checked)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-copy`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-label`,children:o.customChoice})})]})]}),(t.mode===`text`||n.customActive)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:d,className:`qa-ai-chat-question-custom`,children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`${d}-input`,children:t.mode===`text`?o.textAnswerLabel:o.customAnswerLabel}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:g,id:`${d}-input`,value:n.customText,placeholder:t.mode===`text`?o.textAnswerPlaceholder:o.customAnswerPlaceholder,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,"data-question-text-input":!0,onChange:e=>a({...n,customText:e.currentTarget.value,skipped:!1})})]}),t.skippable&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-local-actions`,children:/* @__PURE__ */ (0,Z.jsx)(N,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>{a({...n,skipped:!n.skipped,selectedOptionIds:[],customActive:!1,customText:``})},children:n.skipped?o.restoreQuestion:o.skipQuestion})}),f&&/* @__PURE__ */ (0,Z.jsx)(`p`,{id:u,className:`qa-ai-chat-question-validation`,role:`alert`,children:nb(t,o)})]})}function ib(e){return e.origin===`agent`}function ab(e){return ee(e)?e.payload:null}function ob(e,t){let n=t.questions;if(e.status!==`answered`){let r=ib(e)&&e.status===`superseded`;return cb(n,e.status,r?t.agentQuestions.askerEnded:null)}let r=e.answers.length>0&&e.answers.every(e=>`skip`in e);return ib(e)?sb(n,r):e.continuationStatus===`pending`?{title:n.answeredTitle,badge:n.continuationPendingBadge,tone:`muted`,allSkipped:r,outcome:null}:e.continuationStatus===`running`?{title:n.answeredTitle,badge:n.continuationRunningBadge,tone:`warning`,allSkipped:r,outcome:null}:e.continuationStatus===`failed`?{title:n.answeredTitle,badge:n.continuationFailedBadge,tone:`error`,allSkipped:r,outcome:null}:sb(n,r)}function sb(e,t){return{title:e.answeredTitle,badge:t?e.skippedBadge:e.answeredBadge,tone:t?`muted`:`success`,allSkipped:t,outcome:null}}function cb(e,t,n){let r=t===`cancelled`;return{title:r?e.cancelledTitle:e.supersededTitle,badge:r?e.cancelledBadge:e.supersededBadge,tone:`muted`,allSkipped:!1,outcome:n}}function lb(e,t){return ob(e,t).badge}function ub(e,t,n){switch(e){case`retryable`:return{badge:t.retryErrorBadge,actionLine:null,canCancel:!0,action:n.onRetry,actionLabel:t.retry,Icon:Qe};case`nonretryable`:return{badge:t.nonretryableBadge,actionLine:t.nonretryableDescription,canCancel:!1,action:void 0,actionLabel:null,Icon:Qe};case`stale`:return{badge:t.staleBadge,actionLine:null,canCancel:!1,action:n.onRefresh,actionLabel:t.refresh,Icon:me};case`unauthorized`:return{badge:t.unauthorizedBadge,actionLine:t.unauthorizedDescription,canCancel:!1,action:void 0,actionLabel:null,Icon:Qe};case`unavailable`:return{badge:t.unavailableBadge,actionLine:null,canCancel:!0,action:n.onRetry,actionLabel:t.retry,Icon:Qe};default:throw Error(`Unhandled question action error kind: ${e}`)}}function db(e,t){return ub(e,t,{}).badge}function fb({onRetry:e}){let t=$().shell.questions;return e?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-inline-status`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-status-icon qa-ai-chat-question-status-icon--error`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Qe,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-status-actions`,children:/* @__PURE__ */ (0,Z.jsx)(N,{type:`button`,variant:`primary`,size:`sm`,onClick:e,children:t.retry})})]}):null}function pb({batchId:e,kind:t,declineLabel:n,onCancel:r,onRetry:i,onRefresh:a}){let o=$().shell.questions,{canCancel:s,action:c,actionLabel:l,actionLine:u,badge:d,Icon:f}=ub(t,o,{onRetry:i,onRefresh:a});return/* @__PURE__ */ (0,Z.jsx)(Cp,{bare:!0,className:`qa-ai-chat-question-card`,data:{"data-question-batch-id":e,"data-question-state":t},children:/* @__PURE__ */ (0,Z.jsx)(Pp,{icon:/* @__PURE__ */ (0,Z.jsx)(f,{size:28}),title:d,text:u??void 0,actions:s||c?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[s&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,onClick:r,children:n}),c&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,onClick:c,children:l})]}):void 0})})}function mb({batch:e,formattedResolvedAt:t}){let n=$().shell,r=n.questions,i=ob(e,n),a=ib(e)?e:null,o=e.status===`answered`,s=!ib(e)&&e.status===`answered`?e.continuationStatus:null,c=o&&i.allSkipped&&(a!==null||s===`completed`)?`skipped`:e.status,l=[i.outcome===null?null:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:i.outcome},`outcome`),a!==null&&a.status===`answered`&&a.answeredVia===`assistant`?/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(Yr,{}),children:n.agentQuestions.viaAssistant},`via`):null].filter(e=>e!==null),u=a===null?t:[a.askerLabel,t].filter(e=>e!==void 0).join(` \u00B7 `);return/* @__PURE__ */ (0,Z.jsx)(Cp,{className:`qa-ai-chat-question-card`,icon:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:16}),title:i.title,caption:u,meta:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:i.tone===`muted`?`neutral`:i.tone,children:i.badge}),tone:i.tone===`muted`?`neutral`:i.tone,note:l.length===0?void 0:l,footer:a===null?void 0:/* @__PURE__ */ (0,Z.jsx)(tb,{question:a,bar:!0}),data:{"data-question-batch-id":e.id,"data-question-state":c,"data-continuation-state":s===null?void 0:s},children:o&&/* @__PURE__ */ (0,Z.jsx)(Op,{children:e.questions.map(t=>{let n=e.answers.find(e=>e.questionId===t.id),i=r.unavailableAnswer;if(n&&`skip`in n&&(i=r.skippedAnswer),n&&`customText`in n&&(i=n.customText),n&&`selectedOptionIds`in n){let e=new Set(n.selectedOptionIds),a=t.options.filter(t=>e.has(t.id)).map(e=>e.label);a.length>0&&(i=a.join(r.answerSeparator))}return/* @__PURE__ */ (0,Z.jsx)(kp,{label:t.question,value:i},t.id)})})})}function hb(){return{selectedOptionIds:[],customActive:!1,customText:``,skipped:!1}}function gb(e){let t=hb();return e.mode!==`text`||e.prefill===void 0?t:{...t,customText:e.prefill}}function _b(e){return Object.fromEntries(e.map(e=>[e.id,gb(e)]))}function vb(e,t){return t.skipped?e.skippable:t.customActive||e.mode===`text`?t.customText.trim().length>0:t.selectedOptionIds.length>0}function yb(e,t){return e.map(e=>{let n=t[e.id]??hb();return n.skipped?{questionId:e.id,skip:!0}:e.mode===`text`||n.customActive?{questionId:e.id,customText:n.customText}:{questionId:e.id,selectedOptionIds:n.selectedOptionIds}})}function bb(e,t){return Object.entries(t).reduce((e,[t,n])=>e.split(`{${t}}`).join(String(n)),e)}function xb(){let e=$().shell.questions;return/* @__PURE__ */ (0,Z.jsx)(`article`,{className:`qa-ai-chat-question-card`,role:`status`,"aria-label":e.loading,"data-question-state":`loading`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-question-header`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-header-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Dr,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-heading`,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--title`})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-loading-stack`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--line`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--option`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--option`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--line`})]})]})})}function Sb({question:e,controller:t,placement:n}){var r,i;let a=$().shell,o=a.questions,s=ib(e)?e:null,c=s!==null&&s.asker.kind===`workflow`?s:null,l=c!==null&&c.assumption===null,u=c===null||t.workflowAgentsWorking===void 0?null:t.workflowAgentsWorking(c.asker.id),d=u===null?null:u?a.agentQuestions.workersContinue:a.agentQuestions.agentsIdle,f=s===null?o.cancelAll:a.agentQuestions.decline,p=e.questions.length,m=(0,R.useRef)(null),h=(0,R.useRef)(!1),[g,_]=(0,R.useState)(()=>_b(e.questions)),[v,y]=(0,R.useState)(!1),[b,x]=(0,R.useState)(!1),[S,C]=(0,R.useState)(0),[w,T]=(0,R.useState)(!1),E=(0,R.useMemo)(()=>Object.fromEntries(e.questions.map(e=>[e.id,vb(e,g[e.id])])),[e.questions,g]),ee=Object.values(E).filter(Boolean).length,D=p>=(n===`dock`?2:4),O=D&&!w,te=p>1,k=((r=t.error)==null?void 0:r.batchId)===e.id?t.error:null,A=t.pendingBatchId===e.id||b,j=((i=t.restoredBatchIds)==null?void 0:i.includes(e.id))??!1;(0,R.useEffect)(()=>{k&&(h.current=!1,x(!1))},[k]);let ne=e=>{var t;let n=((t=m.current)==null?void 0:t.querySelectorAll(`[data-question-id]`))??[];return Array.from(n).find(t=>t.dataset.questionId===e)},re=t=>{var n;let r=e.questions[t];r&&((n=ne(r.id))==null||(n=n.querySelector(`.qa-ai-chat-question-title`))==null||n.focus())},M=t=>{var n;let r=e.questions[t];if(!r)return;let i=g[r.id],a=r.mode===`text`||(i==null?void 0:i.customActive);(n=ne(r.id))==null||(n=n.querySelector(a?`[data-question-text-input]`:`[data-question-control]`))==null||n.focus()},ie=e=>{T(!1),C(e),queueMicrotask(()=>re(e))},ae=()=>{T(e=>!e),queueMicrotask(()=>re(S))},oe=async e=>{if(!h.current){h.current=!0,x(!0);try{await e()}catch{h.current=!1,x(!1)}}},se=n=>{n==null||n.preventDefault();let r=e.questions.findIndex(e=>!E[e.id]);if(r>=0){y(!0),O&&C(r),queueMicrotask(()=>M(r));return}oe(()=>t.onAnswer(e.id,e.revision,yb(e.questions,g)))},ce=e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&e.target instanceof HTMLTextAreaElement&&(e.preventDefault(),se())};if(k&&k.kind!==`retryable`)return/* @__PURE__ */ (0,Z.jsx)(pb,{batchId:e.id,kind:k.kind,declineLabel:f,onCancel:()=>void oe(()=>t.onCancel(e.id,e.revision)),onRetry:t.onRetry?()=>void oe(()=>t.onRetry(e.id)):void 0,onRefresh:t.onRefresh?()=>void oe(()=>t.onRefresh(e.id)):void 0});let le=O?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-footer-counter`,children:bb(o.questionIndex,{index:S+1,total:p})}):null,ue=O?[e.questions[S]]:e.questions,de=[`qa-ai-chat-question-card`,p>1&&!O&&`qa-ai-chat-question-card--all`,A&&`qa-ai-chat-question-card--sending`,k&&`qa-ai-chat-question-card--error`,l&&`qa-ai-chat-question-card--lead-waits`].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`form`,{ref:m,className:de,"data-question-batch-id":e.id,"data-asker-kind":s===null?void 0:s.asker.kind,"data-asker-id":s===null?void 0:s.asker.id,"data-question-state":A?`sending`:j?`restored`:`pending`,"aria-busy":A||void 0,noValidate:!0,onSubmit:se,onKeyDown:ce,children:[D&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-progress`,role:`group`,"aria-label":o.progressLabel,children:e.questions.map((e,t)=>{let n=E[e.id]===!0,r=g[e.id].skipped,i=v&&!n,a=r?o.progressSegmentSkipped:n?o.progressSegmentAnswered:o.progressSegmentUnanswered;return/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:[`qa-ai-chat-question-progress-segment`,n&&`qa-ai-chat-question-progress-segment--answered`,i&&`qa-ai-chat-question-progress-segment--invalid`].filter(Boolean).join(` `),"data-question-index":t,"aria-current":O&&t===S?`true`:void 0,"aria-label":bb(a,{index:t+1}),disabled:A,onClick:()=>ie(t)},e.id)})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-question-header`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-header-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Dr,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-heading`,children:[c===null&&/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:o.pendingTitle}),s!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-question-caption`,children:s.askerLabel})]}),l&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-lead-waits`,children:a.agentQuestions.leadWaits}),(k||te)&&/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:k?`error`:`neutral`,"aria-live":`polite`,children:k?o.retryErrorBadge:bb(o.progress,{resolved:ee,total:p})})]}),s!==null&&s.assumption!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-question-assumption`,children:/* @__PURE__ */ (0,Z.jsxs)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(ai,{}),children:[a.agentQuestions.assumptionLabel,`: `,s.assumption]})}),k&&/* @__PURE__ */ (0,Z.jsx)(fb,{onRetry:t.onRetry?()=>void oe(()=>t.onRetry(e.id)):void 0}),ue.map(t=>/* @__PURE__ */ (0,Z.jsx)(rb,{batchId:e.id,question:t,draft:g[t.id],showValidation:v&&!E[t.id],disabled:A,onChange:e=>_(n=>({...n,[t.id]:e}))},t.id)),D&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(on,{}),disabled:A,onClick:ae,children:w?o.oneQuestionAtATime:o.showAllQuestions})]}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-question-footer`,children:[s===null?le:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-question-footer-lead`,children:[c===null?/* @__PURE__ */ (0,Z.jsx)(tb,{question:s,bar:!1}):d!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-footer-note`,children:d}),le]}),O&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,disabled:S===0||A,onClick:()=>ie(S-1),children:o.previousQuestion}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,disabled:S===p-1||A,onClick:()=>ie(S+1),children:o.nextQuestion})]}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,disabled:A,onClick:()=>void oe(()=>t.onCancel(e.id,e.revision)),children:f}),/* @__PURE__ */ (0,Z.jsxs)(N,{variant:`primary`,size:`sm`,type:`submit`,disabled:A,children:[A&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-spinner`,"aria-hidden":`true`}),A?o.sending:o.submitAnswers]})]})]})}function Cb({batch:e,loading:t=!1,controller:n,placement:r=`transcript`}){var i,a;let o=$().shell,s=o.questions;if(t)return/* @__PURE__ */ (0,Z.jsx)(xb,{});if(!e)return null;let c=((i=n.error)==null?void 0:i.batchId)===e.id?n.error:null,l=c?db(c.kind,s):e.status===`pending`?``:lb(e,o),u=e.questions.map(e=>e.question).join(s.answerSeparator),d=e.status===`pending`?/* @__PURE__ */ (0,Z.jsx)(Sb,{question:e,controller:n,placement:r},`${e.id}:${e.revision}`):/* @__PURE__ */ (0,Z.jsx)(mb,{batch:e,formattedResolvedAt:(a=n.formatResolvedAt)==null?void 0:a.call(n,e.resolvedAt)});return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only qa-ai-chat-question-announcement`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:l&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:u}),` `,/* @__PURE__ */ (0,Z.jsx)(`span`,{children:l})]})}),d]})}function wb(e){let t=e.secretInputRequests;return t.length>0?t:null}function Tb(e){if(e===null)return!1;let{read:t}=e;return t.kind===`failed`||t.kind===`ready`&&t.draft!==null}function Eb(e,t){let n=(0,R.useRef)({conversationId:t,ids:/* @__PURE__ */ new Set}),[r,i]=(0,R.useState)({conversationId:t,items:[]});if((0,R.useEffect)(()=>{n.current.conversationId!==t&&(n.current={conversationId:t,ids:/* @__PURE__ */ new Set});let{ids:r}=n.current,a=e.filter(e=>!r.has(e.id));if(a.length!==0){for(let e of a)r.add(e.id);i({conversationId:t,items:a.map(e=>({key:e.id,questions:e.questions.map(e=>e.question)}))})}},[e,t]),r.conversationId!==t)return[];let a=new Set(e.map(e=>e.id));return r.items.filter(e=>a.has(e.key))}function Db({regionLabel:e,conversationId:t,questions:n,questionController:r,confirmation:i,changeSets:a,isDecisionLocked:o,decisionProgress:s,onChangeSetDecision:c,onConfirmAll:l,changeSetTether:u,onFocusComposer:d,launchDraft:f}){let p=$(),m=p.shell.confirmation,h=p.shell.questions,g=Eb(n,t),_=(0,R.useRef)(null),v=Ry({conversationId:t,presentToolCallIds:a.map(e=>e.toolCallId),dockRef:_,onFocusComposer:d,copy:p.cards.changeSet.dock}),y=zy({conversationId:t,present:(0,R.useMemo)(()=>a.flatMap(e=>{let t=wb(e);return t===null?[]:[{toolCallId:e.toolCallId,requests:t}]}),[a])}),b=y.items,x=+!!Tb(f),S=x>0||n.length>0||i!==null||a.length>0||b.length>0,C=(i==null?void 0:i.items.filter(e=>e.status===`open`))??[],w=a.filter(e=>e.confirmEnabled&&wb(e)===null),T=C.length+w.length,E=[...C,...w].every(e=>o(e.toolCallId)),ee=x+n.length+((i==null?void 0:i.items.length)??0)+a.length+b.length;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[g.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{children:h.arrived(e.questions.join(h.answerSeparator))},e.key)),v.announcement!==``&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:v.announcement})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-zone${S?` qa-ai-chat-dock-zone--open`:``}`,...S?{role:`region`,"aria-label":e}:{},children:/* @__PURE__ */ (0,Z.jsx)(`div`,{children:S&&/* @__PURE__ */ (0,Z.jsxs)(`section`,{ref:_,className:`qa-ai-chat-dock${ee>1?` qa-ai-chat-dock--multiple`:``}`,"data-testid":`ai-chat-dock`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-stack`,"data-testid":`ai-chat-dock-stack`,children:[f!==null&&/* @__PURE__ */ (0,Z.jsx)(cy,{source:f}),n.map(e=>/* @__PURE__ */ (0,Z.jsx)(Cb,{batch:e,controller:r,placement:`dock`},e.id)),i==null?void 0:i.items.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)($y,{confirmation:e,confirmationPosition:t+1,pendingConfirmationCount:i.items.length,actionsLocked:o(e.toolCallId)||e.status!==`open`,onConfirm:i.onConfirm,onReject:i.onReject},e.toolCallId)),a.map(({toolCallId:e,...t})=>{let n=wb(t);if(n===null)return/* @__PURE__ */ (0,Z.jsx)(hy,{toolCallId:e,entry:t,locked:o(e),progress:s,onDecide:(e,n)=>{v.pressed([{toolCallId:e,destructive:t.destructive,secretSaved:null}],n),c(e,n)},tether:u},e);let r=xy(n);return/* @__PURE__ */ (0,Z.jsx)(Ly,{toolCallId:e,requests:n,heldReason:t.confirmBlockedBeyondSecrets,locked:o(e),progress:s,onDecide:(e,i)=>{y.pressed(e,i),v.pressed([{toolCallId:e,destructive:t.destructive,secretSaved:{names:n.map(e=>e.variableName),environment:r===null?null:r.name}}],i),c(e,i)},tether:u},`${e}:${n.map(e=>e.changeSetItemId).join(`,`)}`)}),b.map(e=>/* @__PURE__ */ (0,Z.jsx)(Cy,{requests:e.requests,outcome:e.outcome,onDone:()=>y.done(e.toolCallId)},`outcome:${e.toolCallId}`))]}),T>1&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,className:`qa-ai-chat-dock-confirm-all`,icon:/* @__PURE__ */ (0,Z.jsx)(Ge,{size:14}),loading:s!==null&&s.confirmAll,disabled:E,onClick:()=>{v.pressed(w.map(e=>({toolCallId:e.toolCallId,destructive:e.destructive,secretSaved:null})),`confirm`),l(C.map(e=>e.toolCallId),w.map(e=>e.toolCallId))},children:m.confirmAll(T)})]})})})]})}var Ob=`workflow_draft`,kb=/* @__PURE__ */ new Set([`launch_draft`,`launch_draft_discarded`]);function Ab(e){let t=[];for(let n of e){if(n.toolResults===void 0||n.toolCalls===void 0)continue;let e=new Set(n.toolCalls.filter(e=>e.toolName===Ob).map(e=>e.id));for(let{toolCallId:r,result:i}of n.toolResults){if(!e.has(r))continue;let n=lm(i);n!==null&&kb.has(n)&&t.push(r)}}return t.join(`,`)}function jb(e){return e.state===`open`?e:null}function Mb(e){return{id:e.id,version:e.version,open:e.state===`open`}}function Nb(e,t){return t===null||t.id!==e.id?!1:e.version<t.version||e.version===t.version&&!t.open}function Pb(e,t){return e===null||t===null?e===t:e.id===t.id&&e.version===t.version}function Fb({conversationId:e,messages:t}){let n=d(),r=(0,R.useMemo)(()=>Ab(t),[t]),[i,a]=(0,R.useState)(null),[o,s]=(0,R.useState)(0);(0,R.useEffect)(()=>{if(e===null)return;let t=new AbortController;return n.launchDrafts.list({conversationId:e,state:`open`,limit:1},{signal:t.signal}).then(n=>{if(t.signal.aborted)return;let[r]=n.items,i=r===void 0?null:r;a(t=>{let n=t!==null&&t.conversationId===e?t:null;if(n!==null&&i!==null&&Nb(i,n.mark))return n;let r=n!==null&&n.read!==null&&n.read.kind===`ready`?n.read.draft:null,a=n===null?0:Pb(r,i)?n.revision:n.revision+1;return{conversationId:e,read:{kind:`ready`,draft:i},revision:a,mark:i===null?n===null?null:n.mark:Mb(i)}})},()=>{t.signal.aborted||a(t=>({conversationId:e,read:{kind:`failed`,retry:()=>s(e=>e+1)},revision:t===null||t.conversationId!==e?0:t.revision,mark:t===null||t.conversationId!==e?null:t.mark}))}),()=>t.abort()},[n,e,r,o]);let c=(0,R.useCallback)(e=>a(t=>t===null||t.conversationId!==e.conversationId?t:{...t,read:{kind:`ready`,draft:jb(e)},mark:Mb(e)}),[]),l=(0,R.useCallback)(()=>s(e=>e+1),[]);if(e===null)return null;let u=i!==null&&i.conversationId===e?i:null;return{conversationId:e,read:u===null||u.read===null?{kind:`reading`}:u.read,revision:u===null?0:u.revision,adopt:c,reload:l}}function Ib(e){let t=(0,R.useCallback)(t=>e.subscribe(t),[e]);return(0,R.useSyncExternalStore)(t,()=>e.get())}var Lb=()=>()=>{};function Rb(e){let t=(0,R.useCallback)(t=>e===null?Lb():e.subscribe(t),[e]);return(0,R.useSyncExternalStore)(t,()=>e===null?null:e.get())}var zb=/[\p{Cc}\p{Cf}]+/gu;function Bb(e){let t=e.replace(zb,` `).replace(/\s+/gu,` `).trim();return t.length<=60?t:t.slice(0,60).trimEnd()}function Vb(e){let t=Bb(e);return t===``?null:t}function Hb(e,t){return t.title(t.view[e.view])}function Ub(e,t){var n;let{context:r}=e,i=[{text:r.window===null?t.lastRuns(kt.maxRuns,kt.maxAgeDays):t.window[r.window],missing:!1}],a=(n=r.filters)==null?void 0:n.status;return a!==void 0&&i.push({text:t.status[a],missing:!1}),r.selectedEntity!==void 0&&i.push(Wb(r.selectedEntity.type,e.entityName,t)),i}function Wb(e,t,n){if(t===null)return{text:n.entity[e],missing:!1};let r=t.trim();return r===``?{text:n.nameUnavailable,missing:!0}:{text:r,missing:!1}}function Gb(e,t){let{context:n}=e,r=t.prompts,i=n.selectedEntity!==void 0&&e.entityName!==null?Vb(e.entityName):null;switch(n.view){case`overview`:return[r.overviewWeakSpots,...n.window===null?[]:[r.overviewChanged(t.window[n.window])],r.overviewWhereToLook];case`stability`:return[i===null?r.stabilityWhatToFix:r.stabilityWhyScenario(i),r.stabilityCauses];case`weak-spots`:return[r.weakSpotsWhatToCover,...i===null?[]:[r.weakSpotsWhyEntity(i)]];case`bug-hotspots`:return[r.bugHotspotsWhere,r.bugHotspotsStale]}}function Kb(e){let{report:t,copy:n,locale:r}=e;return t===null?{kind:`tasks`,heading:n.empty.heading,subtext:n.empty.subtext,footnote:n.empty.footnote,chips:fd.map(e=>{let t=dd[e],n=Pg[e];return{id:e,title:t.title[r],hint:t.chip.hint[r],template:t.chip.briefTemplate[r],icon:/* @__PURE__ */ (0,Z.jsx)(n,{"aria-hidden":`true`})}})}:{kind:`report`,heading:n.empty.reportHeading,prompts:Gb(t,n.context.report).map((e,t)=>({id:`report-${t}`,text:e}))}}function qb(e){return e.kind===`report`?/* @__PURE__ */ (0,Z.jsx)(wr,{}):/* @__PURE__ */ (0,Z.jsx)(ci,{})}function Jb({welcome:e,draftStore:t,onSend:n,onInsert:r}){let i=Ib(t),a=i.trim()!==``,o=e.kind===`tasks`&&i.trim()!==``&&!pd(i);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-welcome`,"data-testid":`ai-chat-empty-state`,"data-welcome":e.kind,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-welcome-mark`,"aria-hidden":`true`,children:qb(e)}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:e.heading}),e.kind===`report`?e.prompts.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-suggest${a?` qa-ai-chat-suggest--faded`:``}`,children:e.prompts.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,disabled:a,onClick:()=>n(e.text),children:[/* @__PURE__ */ (0,Z.jsx)(ci,{"aria-hidden":`true`}),e.text]},e.id))}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.subtext}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-tasks${o?` qa-ai-chat-tasks--faded`:``}`,children:e.chips.map(e=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"data-testid":`ai-chat-task-chip-${e.id}`,disabled:o,onClick:()=>r(e.template),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tasks-icon`,children:e.icon}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-tasks-text`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.title}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:e.hint})]})]})},e.id))}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-tasks-hint`,children:e.footnote})]})]})}var Yb=I({kind:Ct([`scenario`,`shared-step`,`element`,`page`,`test-plan`,`test-run`,`api-request`,`checklist`,`map`]),id:L().min(1).nullable()}),Xb=I({projectId:jt().transform(be),keys:Ot([Yb],Yb)}),Zb={kind:`none`};function Qb(e){if(typeof e!=`object`||!e||!(`changed`in e))return Zb;let t=Xb.safeParse(e.changed);return t.success?{kind:`changed`,hint:t.data}:{kind:`malformed`,issuePaths:t.error.issues.map(e=>[`changed`,...e.path].join(`.`))}}function $b(e){let{transport:t,logger:n,entityChanged:r}=e;(0,R.useEffect)(()=>{if(r===null)return;let e=(e,t,i)=>{let a=Qb(i);a.kind===`changed`?r(a.hint):a.kind===`malformed`&&n.warn(`${e}: changed is not an entity hint`,{toolCallId:t,issuePaths:a.issuePaths})};return t.subscribe(t=>{if(t.kind!==`event`)return;let{event:n}=t;n.type===`tool-result`?e(`tool result`,n.toolCallId,n.result):n.type===`action-resolved`&&e(`action resolved`,n.toolCallId,n)})},[t,n,r])}function ex({projectName:e,pinned:t,historyOpen:n,historyAvailable:r,onOpenHistory:i,onNewConversation:a,hostActions:o,copy:s}){return/* @__PURE__ */ (0,Z.jsx)(`header`,{className:`qa-ai-chat-header`,children:/* @__PURE__ */ (0,Z.jsxs)(ze,{children:[t===null&&/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:s.history,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,"aria-expanded":n,disabled:!r,onClick:i,"data-testid":`ai-chat-history-button`,children:/* @__PURE__ */ (0,Z.jsx)(Jr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-who`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-header-tile`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(ci,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-names`,children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{className:`qa-ai-chat-header-title`,children:t===null?s.title:/* @__PURE__ */ (0,Z.jsx)(tx,{source:t.title})}),t===null?e===null?/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project qa-ai-chat-header-project--missing`,children:s.noProject}):/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project`,children:e}):/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project`,children:/* @__PURE__ */ (0,Z.jsx)(tx,{source:t.caption})})]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-actions`,children:[t===null&&/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:s.newConversation,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:a,"data-testid":`ai-chat-new-conversation`,children:/* @__PURE__ */ (0,Z.jsx)(de,{"aria-hidden":`true`})})}),o]})]})})}function tx({source:e}){return Ib(e)}var nx=/* @__PURE__ */ new Set([`managed`]),rx={fastest:0,balanced:1,smartest:2};function ix(e,t){return e===`key_invalid`?t.disabledKeyInvalid:e===`no_key`?t.disabledNoKey:null}var ax=[];function ox({capabilities:e,selectionId:t,onSelect:n,resolvedEcho:r,overrideRejected:i,isStreaming:a,onManageKeys:o,onUpgrade:s,openRequest:c,flagged:l}){let u=$().shell.modelPicker,d=e.status===`loading`,f=e.status===`ready`?e.value:null,p=f===null?ax:f.groups,[m,h]=(0,R.useState)(!1),[g,_]=(0,R.useState)(-1),v=(0,R.useRef)(null),y=(0,R.useRef)(null),b=(0,R.useId)(),x=p,S=[],C=[];for(let e of x)if(nx.has(e.source))for(let t of e.models)S.push({model:t,source:e.source});else C.push(e);let w=[...S].sort((e,t)=>rx[e.model.tier]-rx[t.model.tier]),T=[...w,...C.flatMap(e=>e.models.map(t=>({model:t,source:e.source})))],E=f===null?null:qn(f,t,r),ee=f===null||a,D=E!==null&&(E.source===`personal`||E.source===`company`)?E.source===`personal`?u.byok.personal:u.byok.company:null,O=(0,R.useRef)(T),te=(0,R.useRef)(E);(0,R.useEffect)(()=>{O.current=T,te.current=E}),(0,R.useEffect)(()=>{if(!m)return;let e=e=>{var t,n;let r=e.target;!((t=v.current)!=null&&t.contains(r))&&!((n=y.current)!=null&&n.contains(r))&&h(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[m]),(0,R.useEffect)(()=>{if(m){var e;let t=te.current,n=O.current,r=t?n.findIndex(e=>e.model.id===t.model.id&&e.source===t.source):-1;_(r>=0?r:0),(e=y.current)==null||e.focus()}},[m]);let k=(0,R.useCallback)(()=>{ee||h(!0)},[ee]),A=(0,R.useCallback)(()=>{var e;h(!1),(e=v.current)==null||e.focus()},[]),j=(0,R.useRef)(k);(0,R.useEffect)(()=>{j.current=k},[k]),(0,R.useEffect)(()=>{c!==0&&j.current()},[c]);let ne=(0,R.useCallback)((e,t)=>{Vn(e)&&(n(t,e),A())},[n,A]),re=(0,R.useCallback)(e=>{if(e.key===` `)e.preventDefault(),m?A():k();else if(e.key===`Enter`){if(e.preventDefault(),m){let e=T[g];e?ne(e.model,e.source):A()}else k()}else e.key===`Escape`&&A()},[m,k,A,T,g,ne]),M=(0,R.useCallback)(e=>{if(e.key===`Escape`){e.preventDefault(),A();return}if(e.key===`ArrowDown`){e.preventDefault(),_(e=>Math.min(e+1,T.length-1));return}if(e.key===`ArrowUp`){e.preventDefault(),_(e=>Math.max(e-1,0));return}if(e.key===`Enter`&&g>=0){e.preventDefault();let t=T[g];t&&ne(t.model,t.source)}},[A,T,g,ne]);(0,R.useEffect)(()=>{if(!m||g<0)return;let e=y.current;if(!e)return;let t=e.querySelector(`[data-option-index="${g}"]`);t==null||t.scrollIntoView({block:`nearest`})},[g,m]);let N=()=>d?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-skeleton`,"data-testid":`model-picker-trigger-skeleton`,"aria-label":u.loading}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[E?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-trigger-name`,children:E.model.shortName}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-trigger-name qa-ai-chat-modelpicker-trigger-name--empty`,children:u.selectModel}),D!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-trigger-provenance`,"data-testid":`model-picker-trigger-provenance`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(Vr,{className:`qa-ai-chat-modelpicker-trigger-icon`,size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-sr-only`,children:D})]}),/* @__PURE__ */ (0,Z.jsx)(ve,{className:`qa-ai-chat-modelpicker-trigger-chevron${m?` qa-ai-chat-modelpicker-trigger-chevron--open`:``}`,size:12,"aria-hidden":`true`})]}),ie=0,ae=(e,t,n)=>{let r=ie++,i=(E==null?void 0:E.model.id)===e.id&&(E==null?void 0:E.source)===t,a=g===r,o=Vn(e),s=!o,c=ix(e.disabledReason,u),l=!n,d=n&&!s?u.tier[e.tier]:null,f=l?t===`personal`?u.byok.personal:u.byok.company:null,p=s&&c?`${e.name} \u2014 ${c}, ${u.disabledSuffixA11y}`:void 0;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:[`qa-ai-chat-modelpicker-option`,i?`qa-ai-chat-modelpicker-option--active`:``,a?`qa-ai-chat-modelpicker-option--focused`:``,s?`qa-ai-chat-modelpicker-option--disabled`:``,d||s&&c?`qa-ai-chat-modelpicker-option--two-line`:``].filter(Boolean).join(` `),"data-testid":`model-picker-option-${e.id}`,"data-source":t,"data-model":e.id,"data-option-index":r,role:`option`,"aria-selected":i,"aria-disabled":s?`true`:void 0,"aria-label":p,onClick:o?()=>ne(e,t):void 0,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-option-main`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-option-name`,children:e.name}),d!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-tier-descriptor`,"data-testid":`model-picker-tier-${e.id}`,children:d}),s&&c!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-disabled-reason${e.disabledReason===`key_invalid`?` qa-ai-chat-modelpicker-disabled-reason--invalid`:``}`,"data-testid":`model-picker-disabled-reason-${e.id}`,children:c})]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-option-right`,children:[f!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-provenance`,"data-testid":`model-picker-provenance-${e.id}`,children:f}),i&&/* @__PURE__ */ (0,Z.jsx)(Ge,{className:`qa-ai-chat-modelpicker-check`,size:12,"data-testid":`model-picker-active-check`,"aria-label":u.currentlySelected})]})]},e.id)},oe=()=>m?/* @__PURE__ */ (0,Z.jsxs)(`div`,{ref:y,className:`qa-ai-chat-modelpicker-dropdown`,"data-testid":`model-picker-dropdown`,role:`listbox`,id:b,"aria-label":u.selectModel,onKeyDown:M,tabIndex:-1,children:[/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[w.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-group`,"data-testid":`model-picker-group-unified`,children:w.map(({model:e,source:t})=>ae(e,t,!0))}),C.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-group`,"data-testid":`model-picker-group-${e.source}`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-group-label`,children:e.source===`personal`?u.byokHeader.personal:u.byokHeader.company}),e.models.map(t=>ae(t,e.source,!1))]},e.source))]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-footer`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-footer-note`,"data-testid":`model-picker-footer-note`,children:u.footerNote}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-modelpicker-manage-keys`,onClick:()=>{A(),o()},"data-testid":`model-picker-manage-keys-link`,children:u.manageKeys})]}),f!==null&&!f.isEnterprise&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-upsell`,"data-testid":`model-picker-upsell`,children:[/* @__PURE__ */ (0,Z.jsx)(Vr,{size:12,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-upsell-text`,children:u.upsell}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-modelpicker-upsell-link`,onClick:()=>{A(),s()},children:u.upgrade})]})]}):null,se=()=>i?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-reject-error`,"data-testid":`model-picker-reject-error`,role:`alert`,children:u.rejected}):null,ce=E===null?null:D===null?E.model.name:`${E.model.name} \u00B7 ${D}`,le=/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:v,type:`button`,className:`qa-ai-chat-modelpicker-trigger${i?` qa-ai-chat-modelpicker-trigger--rejected`:``}${l?` qa-ai-chat-modelpicker-trigger--flagged`:``}${ee?` qa-ai-chat-modelpicker-trigger--disabled`:``}`,"data-testid":`model-picker-trigger`,"data-provider":E==null?void 0:E.source,"data-model":E==null?void 0:E.model.id,onClick:()=>m?A():k(),onKeyDown:re,"aria-haspopup":`listbox`,"aria-expanded":m,"aria-controls":m?b:void 0,"aria-disabled":ee,disabled:!1,children:N()});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker`,children:[/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`description`,content:ce,disabled:ce===null,children:le}),se(),oe()]})}var sx={"ai-keys":`/settings/personal/ai`,"billing-plan":`/settings/company/billing/plan`};function cx(e){return sx[e]}function lx({copy:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-drop`,"aria-hidden":`true`,"data-testid":`ai-chat-attachment-drop`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-drop-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-drop-icon`,children:/* @__PURE__ */ (0,Z.jsx)(hi,{})}),/* @__PURE__ */ (0,Z.jsx)(`h4`,{children:e.title}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{children:[e.types,/* @__PURE__ */ (0,Z.jsx)(`br`,{}),e.sizes]})]})})}function ux(e){return Array.from(e.dataTransfer.types).includes(`Files`)}function dx(e){let[t,n]=(0,R.useState)(!1),r=(0,R.useRef)(0),i=e!==null,a=(0,R.useCallback)(()=>{r.current=0,n(!1)},[]);return(0,R.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,a]),(0,R.useEffect)(()=>{i||a()},[i,a]),{active:t,handlers:{onDragEnter:(0,R.useCallback)(e=>{i&&ux(e)&&(e.preventDefault(),r.current+=1,n(!0))},[i]),onDragOver:(0,R.useCallback)(e=>{i&&ux(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)},[i]),onDragLeave:(0,R.useCallback)(e=>{i&&ux(e)&&(r.current=Math.max(0,r.current-1),r.current===0&&n(!1))},[i]),onDrop:(0,R.useCallback)(t=>{if(e===null||!ux(t))return;t.preventDefault(),a();let n=Array.from(t.dataTransfer.files);n.length>0&&e(n)},[a,e])}}}var fx=[137,80,78,71,13,10,26,10],px=[255,216,255],mx=[37,80,68,70,45],hx=[82,73,70,70],gx=[87,69,66,80];function _x(e,t){if(e.length===0)return{ok:!1,reason:`empty`};let n=yx(e);if(n===null)return Un(t.mediaType)?bx(e)?{ok:!0,mediaType:t.mediaType,image:null}:{ok:!1,reason:`text_not_utf8`}:{ok:!1,reason:`content_mismatch`};if(n!==t.mediaType)return{ok:!1,reason:`content_mismatch`};if(n===`application/pdf`)return{ok:!0,mediaType:n,image:null};let r=xx(e,n);return r===null?{ok:!1,reason:`image_header_unreadable`}:{ok:!0,mediaType:n,image:r}}function vx(e,t,n=0){return e.length<n+t.length?!1:t.every((t,r)=>e[n+r]===t)}function yx(e){return vx(e,fx)?`image/png`:vx(e,px)?`image/jpeg`:vx(e,hx)&&vx(e,gx,8)?`image/webp`:vx(e,mx)?`application/pdf`:null}function bx(e){if(e.includes(0))return!1;try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(e),!0}catch(e){if(e instanceof TypeError)return!1;throw e}}function xx(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=t===`image/png`?Cx(e,n):t===`image/jpeg`?Ex(e,n):Mx(e,n);return r===null||r.width<1||r.height<1?null:r}var Sx=[73,72,68,82];function Cx(e,t){return e.length<24||!vx(e,Sx,12)||t.getUint32(8)<13?null:{width:t.getUint32(16),height:t.getUint32(20)}}function wx(e){return e===1||e>=208&&e<=216}function Tx(e){return e>=192&&e<=207&&e!==196&&e!==200&&e!==204}function Ex(e,t){let n=2;for(;n<e.length;){if(e[n]!==255)return null;for(;n<e.length&&e[n]===255;)n+=1;let r=e[n];if(r===void 0)return null;if(n+=1,wx(r))continue;if(r===217||r===218||n+2>e.length)return null;let i=t.getUint16(n);if(i<2)return null;if(Tx(r))return i<7||n+7>e.length?null:{width:t.getUint16(n+5),height:t.getUint16(n+3)};n+=i}return null}var Dx=[86,80,56,32],Ox=[86,80,56,76],kx=[86,80,56,88],Ax=[157,1,42],jx=47;function Mx(e,t){if(vx(e,Dx,12))return e.length<30||!vx(e,Ax,23)?null:{width:t.getUint16(26,!0)&16383,height:t.getUint16(28,!0)&16383};if(vx(e,Ox,12)){if(e.length<25||e[20]!==jx)return null;let n=t.getUint32(21,!0);return{width:(n&16383)+1,height:(n>>>14&16383)+1}}return vx(e,kx,12)?e.length<30?null:{width:Nx(t,24)+1,height:Nx(t,27)+1}:null}function Nx(e,t){return e.getUint8(t)|e.getUint8(t+1)<<8|e.getUint8(t+2)<<16}var Px=`.png,.jpg,.jpeg,.webp,.pdf,.txt,.md`,Fx=/* @__PURE__ */ new Map([[`png`,`image/png`],[`jpg`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`webp`,`image/webp`],[`pdf`,`application/pdf`],[`txt`,`text/plain`],[`md`,`text/markdown`]]);function Ix(e){let t=e.lastIndexOf(`.`);return t<=0||t===e.length-1?null:e.slice(t+1).toLowerCase()}function Lx(e){let t=Ix(e);if(t===null)return null;let n=Fx.get(t);return n===void 0?null:n}function Rx(e,t,n){return n===null?{kind:`type`}:e.length>255?{kind:`file_name`}:t>Rn[n]?{kind:`too_large`,mediaType:n}:null}function zx(e,t){if(t===null)return null;if(e.upload.kind===`uploaded`){let n=zn(e.upload.attachment,t.attachments);return n.ok?null:n.fact}let{check:n}=e;if(n.kind!==`passed`)return null;let r=Bn({mediaType:n.mediaType,byteSize:e.byteSize,image:n.image},t.attachments);return r.ok?null:r.fact}function Bx(e,t){return e.check.kind===`passed`&&e.upload.kind===`idle`&&zx(e,t)===null}function Vx(e,t){return e.upload.kind===`uploaded`&&t-Date.parse(e.upload.attachment.createdAt)>=864e5}function Hx(e,t,n){let{check:r,upload:i}=e;if(r.kind===`refused`)return{kind:`local_refused`,refusal:r.refusal};if(i.kind===`refused`)return{kind:`server_refused`,errorCode:i.errorCode};if(i.kind===`failed`)return{kind:`failed`,cause:i.cause};if(Vx(e,n))return{kind:`expired`};let a=zx(e,t);if(a!==null)return{kind:`model_refused`,fact:a};if(r.kind===`reading`)return{kind:`reading`};switch(i.kind){case`uploaded`:return{kind:`ready`,attachment:i.attachment};case`uploading`:case`idle`:return{kind:`uploading`}}}function Ux(e){return e===`local_refused`||e===`server_refused`||e===`failed`||e===`expired`||e===`model_refused`}function Wx(e){return Ux(e.kind)}function Gx(e,t){return e.length===0?null:e.some(Wx)?`refused`:e.some(e=>e.kind===`uploading`||e.kind===`reading`)?`uploading`:t?null:`no_text`}function Kx(e){return e.check.kind===`passed`&&Kn(e.check.mediaType)&&e.check.image!==null}function qx(e){return e.map(e=>{if(e.upload.kind!==`uploaded`)throw Error(`uploadedAttachments: the chip ${e.key} is not uploaded`);return e.upload.attachment})}var Jx=class{constructor(){this.shares=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Map}set(e,t){this.shares.get(e)!==t&&(this.shares.set(e,t),this.notify(e))}delete(e){this.shares.delete(e)&&this.notify(e)}get(e){let t=this.shares.get(e);return t===void 0?0:t}subscribe(e,t){let n=this.listeners.get(e);return n===void 0&&(n=/* @__PURE__ */ new Set,this.listeners.set(e,n)),n.add(t),()=>{let n=this.listeners.get(e);n!==void 0&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){let t=this.listeners.get(e);if(t!==void 0)for(let e of t)e()}};function Yx(e,t){let n=(0,R.useCallback)(n=>e.subscribe(t,n),[e,t]),r=(0,R.useCallback)(()=>e.get(t),[e,t]);return(0,R.useSyncExternalStore)(n,r,r)}var Xx=6e4;function Zx(e){let{totalBytes:t,onStall:n}=e,r=0,i=!1,a=null,o=()=>{a!==null&&clearTimeout(a),a=null},s=()=>{o(),a=setTimeout(()=>{a=null,i=!0,n()},Xx)};return s(),{advance(e){if(!i){if(e===0){r=0,s();return}e<=r||(r=e,e>=t?o():s())}},stop(){i=!0,o()}}}var Qx=6e4,$x=0,eS=()=>`attachment-${++$x}`,tS=408;function nS(e){return!(e instanceof Yn)||e.status===0||e.status===tS?{kind:`failed`,cause:`network`}:e.status>=500?{kind:`failed`,cause:`server`}:{kind:`refused`,errorCode:e.errorCode}}function rS({http:e,projectId:t,model:n,resetKey:r,logger:i}){let[a,o]=(0,R.useState)([]),[s,c]=(0,R.useState)(()=>Date.now()),l=(0,R.useRef)(/* @__PURE__ */ new Map),[u]=(0,R.useState)(()=>new Jx),d=(0,R.useRef)(a);(0,R.useEffect)(()=>{d.current=a},[a]);let f=(0,R.useCallback)((e,t)=>{o(n=>n.map(n=>n.key===e?t(n):n))},[]),p=(0,R.useCallback)(t=>{var n;if((n=l.current.get(t.key))==null||n.abort(),l.current.delete(t.key),t.upload.kind!==`uploaded`)return;let{id:r}=t.upload.attachment;Vu(e,r).catch(e=>{i.warn(`chat attachment discard failed`,{attachmentId:r,status:e instanceof Yn?e.status:null,errorCode:e instanceof Yn?e.errorCode:null})})},[e,i]),m=(0,R.useCallback)(()=>{for(let e of d.current)p(e);d.current=[],o([])},[p]),h=(0,R.useRef)({resetKey:r,projectId:t});(0,R.useEffect)(()=>{let e=h.current;(e.resetKey!==r||e.projectId!==t)&&(h.current={resetKey:r,projectId:t},m())},[r,t,m]),(0,R.useEffect)(()=>()=>{for(let e of l.current.values())e.abort();l.current.clear()},[]);let g=(0,R.useCallback)((e,t,n)=>{t.arrayBuffer().then(t=>{let r=new Uint8Array(t),i=_x(r,{mediaType:n}),a=i.ok?{kind:`passed`,mediaType:i.mediaType,bytes:r,image:i.image}:{kind:`refused`,refusal:{kind:`bytes`,reason:i.reason}};f(e,e=>({...e,check:a}))}).catch(t=>{i.warn(`chat attachment read failed`,{message:t instanceof Error?t.message:String(t)}),f(e,e=>({...e,check:{kind:`refused`,refusal:{kind:`unreadable`}}}))})},[i,f]),_=(0,R.useCallback)(e=>{let t=e.map(e=>{let t=Lx(e.name),n=Rx(e.name,e.size,t);return{key:eS(),file:e,fileName:e.name,byteSize:e.size,declared:t,check:n===null?{kind:`reading`}:{kind:`refused`,refusal:n},upload:{kind:`idle`}}});o(e=>[...e,...t]);for(let e of t)e.check.kind===`reading`&&e.declared!==null&&g(e.key,e.file,e.declared)},[g]),v=(0,R.useCallback)(n=>{let{check:r}=n;if(r.kind!==`passed`||t===null)return;let a=new AbortController;l.current.set(n.key,a),u.set(n.key,0),f(n.key,e=>({...e,upload:{kind:`uploading`}}));let o=r.bytes.byteLength,s=!1,c=0,d=Zx({totalBytes:o,onStall:()=>{s=!0,a.abort(new DOMException(`No upload progress for 60 s`,`TimeoutError`))}});zu(e,{projectId:t,fileName:n.fileName,mediaType:r.mediaType,bytes:r.bytes,signal:a.signal,onProgress:e=>{a.signal.aborted||(d.advance(e),c=Math.max(c,e),u.set(n.key,c/o))}}).then(e=>{d.stop(),u.delete(n.key),l.current.delete(n.key),f(n.key,t=>({...t,upload:{kind:`uploaded`,attachment:e}}))}).catch(e=>{if(d.stop(),u.delete(n.key),a.signal.aborted&&!s)return;l.current.delete(n.key);let t=s?{kind:`failed`,cause:`network`}:nS(e);i.warn(`chat attachment upload failed`,{mediaType:r.mediaType,byteSize:n.byteSize,stalled:s,status:e instanceof Yn?e.status:null,errorCode:e instanceof Yn?e.errorCode:null}),f(n.key,e=>({...e,upload:t}))})},[e,i,u,t,f]);(0,R.useEffect)(()=>{for(let e of a)t!==null&&Bx(e,n)&&!l.current.has(e.key)&&v(e)},[a,n,t,v]);let y=a.some(e=>e.upload.kind===`uploaded`);(0,R.useEffect)(()=>{if(!y)return;c(Date.now());let e=setInterval(()=>c(Date.now()),Qx);return()=>clearInterval(e)},[y]);let b=(0,R.useCallback)(e=>{let t=d.current.find(t=>t.key===e);t!==void 0&&(p(t),o(t=>t.filter(t=>t.key!==e)))},[p]),x=(0,R.useCallback)(e=>{f(e,e=>({...e,upload:{kind:`idle`}}))},[f]),S=(0,R.useCallback)(()=>{let e=d.current;return d.current=[],o([]),e},[]),C=(0,R.useCallback)(e=>{o(t=>[...e,...t])},[]),w=(0,R.useMemo)(()=>a.map(e=>({attachment:e,view:Hx(e,n,s)})),[a,n,s]);return{items:w,model:n,progress:u,sendBlock:(0,R.useCallback)(e=>Gx(w.map(e=>e.view),e),[w]),add:_,remove:b,retry:x,detach:S,reattach:C}}function iS({host:e,projectId:t,model:n,resetKey:r,accepting:i}){let a=(0,R.useMemo)(()=>n===null?null:{name:n.name,attachments:n.attachments},[n]),o=rS({http:e.http,projectId:t,model:a,resetKey:r,logger:e.logger}),{add:s}=o,c=dx(i?s:null),[l,u]=(0,R.useState)(0);return{attachments:o,drop:c,modelListRequest:l,openModelList:(0,R.useCallback)(()=>u(e=>e+1),[]),modelFlagged:o.items.some(e=>e.view.kind===`model_refused`)}}function aS(){let e=``,t=/* @__PURE__ */ new Set;return{get:()=>e,set:n=>{if(n!==e){e=n;for(let e of t)e()}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}}function oS({label:e}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-tile qa-ai-chat-filechip-tile--doc`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e})]})}function sS({fileName:e}){let{base:t,ext:n}=Ff(e);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-name`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-name-base`,children:t}),n!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-name-ext`,children:n})]})}function cS(e,t){let[n,r]=(0,R.useState)(null);return(0,R.useEffect)(()=>{if(!t)return;let n=URL.createObjectURL(e);return r(n),()=>{URL.revokeObjectURL(n),r(null)}},[t,e]),n}function lS({attachment:e,thumbnail:t,bad:n,typeLabel:r}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-att-tile-wrap`,children:[t===null?/* @__PURE__ */ (0,Z.jsx)(oS,{label:uS(e,r)}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-tile`,children:/* @__PURE__ */ (0,Z.jsx)(`img`,{src:t,alt:``})}),n&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-bad`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsxs)(`svg`,{viewBox:`0 0 24 24`,children:[/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M12 6v7`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M12 18h.01`})]})})]})}function uS(e,t){if(e.declared!==null)return t[e.declared];let n=Ix(e.fileName);return n===null?``:n.slice(0,3).toUpperCase()}function dS({item:e,progress:t,facts:n,reason:r,justUploaded:i,onRemove:a,onRetry:o,onPickModel:s,copy:c,typeLabel:l}){let{attachment:u,view:d}=e,f=(0,R.useId)(),p=cS(u.file,Kx(u)),m=r!==null,h=Yx(t,u.key),g=d.kind===`uploading`?h:null,_=g!==null,v=d.kind===`failed`?c.retry:d.kind===`expired`?c.reupload:null,y=[`qa-ai-chat-att`,_?`qa-ai-chat-att--up`:``,m?`qa-ai-chat-att--err`:``,i&&d.kind===`ready`?`qa-ai-chat-att--done`:``].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:y,role:`listitem`,style:g===null?void 0:{"--qa-ai-chat-att-progress":g},"aria-describedby":m?f:void 0,"data-testid":`ai-chat-attachment`,"data-state":d.kind,children:[/* @__PURE__ */ (0,Z.jsx)(lS,{attachment:u,thumbnail:p,bad:m,typeLabel:l}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-att-text`,children:m?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-att-name-row`,children:[/* @__PURE__ */ (0,Z.jsx)(sS,{fileName:u.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,children:n})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-att-why`,id:f,"data-testid":`ai-chat-attachment-reason`,children:[r.kind===`sentence`?r.text:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r.lead,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-att-link`,onClick:s,"data-testid":`ai-chat-attachment-pick-model`,children:c.pickModel})]}),v!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[` `,/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-att-link qa-ai-chat-att-act`,onClick:o,"data-testid":`ai-chat-attachment-retry`,children:[/* @__PURE__ */ (0,Z.jsx)(ii,{"aria-hidden":`true`}),v]})]})]})]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(sS,{fileName:u.fileName}),g===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,children:n}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,role:`progressbar`,"aria-label":c.uploadingLabel(u.fileName),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(g*100),children:c.uploading(Math.round(g*100))})]})}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:c.remove(u.fileName),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-att-remove`,onClick:a,"data-testid":`ai-chat-attachment-remove`,children:/* @__PURE__ */ (0,Z.jsx)(C,{"aria-hidden":`true`})})})]})}function fS(e,t,n){let r=Nf(e.byteSize,t,n.units),{upload:i,check:a}=e;return i.kind===`uploaded`?Pf(i.attachment,t,n):a.kind===`passed`&&a.image!==null?n.facts.image(a.image.width,a.image.height,r):n.facts.text(r)}function pS(e,t){switch(e.kind){case`type`:return t.refusal.type;case`file_name`:return t.refusal.fileName;case`unreadable`:return t.refusal.unreadable;case`too_large`:return t.refusal.tooLarge(Kn(e.mediaType)?t.refusal.limit.image:Un(e.mediaType)?t.refusal.limit.text:t.refusal.limit.pdf);case`bytes`:switch(e.reason){case`empty`:return t.refusal.empty;case`content_mismatch`:return t.refusal.type;case`text_not_utf8`:return t.refusal.textNotUtf8;case`image_header_unreadable`:return t.refusal.unreadable}}}function mS(e,t,n,r){switch(e){case Jn.contentMismatch:return n.refusal.contentMismatch(r.typeLabel[t]);case Jn.textNotUtf8:return n.refusal.textNotUtf8;case Jn.pdfEncrypted:return n.refusal.pdfEncrypted;case Jn.pdfUnreadable:case Jn.imageUnreadable:return n.refusal.unreadable;case Jn.emptyFile:return n.refusal.empty;case Jn.invalidFileName:return n.refusal.fileName;case`FST_ERR_CTP_BODY_TOO_LARGE`:return pS({kind:`too_large`,mediaType:t},n);case`FST_ERR_CTP_INVALID_MEDIA_TYPE`:return n.refusal.type;default:return n.refusal.server}}function hS(e,t,n,r){let{reason:i}=r.unsent,a=e=>Nf(e,n,r.units),o=e=>Mf(e,n),s=t=>{if(t===null)throw Error(`factWords: no number for the fact ${e}`);return t};switch(e){case`image_bytes`:return i.imageBytes(a(Math.floor(s(t.imageMaxBase64Bytes)*3/4)));case`image_edge`:return i.imageEdge(o(s(t.imageMaxEdgePx)));case`image_patches`:{let e=t.imageMaxPatches;if(e===null)throw Error(`factWords: no number for the fact image_patches`);return i.imagePatches(o(Math.floor(e.maxPatches*e.patchPx**2/1e6)))}case`pdf_pages`:return i.pdfPages(o(s(t.pdfMaxPagesPerRequest)));case`file_bytes`:return i.fileBytes(a(s(t.fileMaxBytes)));case`request_bytes`:return i.requestBytes(a(s(t.requestMaxBytes)));case`media_type`:case`files_bytes`:case`images_count`:case`many_images_edge`:case`context_window`:throw Error(`factWords: ${e} is not a fact of one file`)}}function gS(e,t,n,r,i,a){let o=t.upload.kind===`uploaded`?t.upload.attachment.mediaType:t.declared;if(n.attachments===null)return i.refusal.modelNoFiles(n.name);if(o===null)throw Error(`modelRefusalLead: a model refusal of an untyped file`);return e===`media_type`?i.refusal.modelNoType(n.name,a.typeLabel[o]):i.refusal.modelFact(n.name,hS(e,n.attachments.facts,r,a))}function _S(e,t,n,r,i,a){switch(e.kind){case`local_refused`:return{kind:`sentence`,text:pS(e.refusal,i)};case`server_refused`:if(t.declared===null)throw Error(`chipReasonOf: a server refusal of an untyped file`);return{kind:`sentence`,text:mS(e.errorCode,t.declared,i,a)};case`failed`:return{kind:`sentence`,text:e.cause===`network`?i.refusal.failedNetwork:i.refusal.failedServer};case`expired`:return{kind:`sentence`,text:i.refusal.expired};case`model_refused`:if(n===null)throw Error(`chipReasonOf: a model refusal without a model`);return{kind:`model`,lead:gS(e.fact,t,n,r,i,a)};case`reading`:case`uploading`:case`ready`:return null}}function vS(e,t){return e.kind===`sentence`?e.text:`${e.lead}${t.pickModel}`}var yS=1100;function bS({attachments:e,onPickModel:t,copy:n}){let r=Q(),i=$().attachments,{items:a,model:o}=e,s=(0,R.useRef)(null),[c,l]=(0,R.useState)(!1),[u,d]=(0,R.useState)(/* @__PURE__ */ new Set),[f,p]=(0,R.useState)(``),m=(0,R.useRef)(/* @__PURE__ */ new Map),h=(0,R.useRef)(/* @__PURE__ */ new Set),g=a.map(e=>({item:e,reason:_S(e.view,e.attachment,o,r,n,i),facts:fS(e.attachment,r,i)}));(0,R.useEffect)(()=>{let e=m.current,t=/* @__PURE__ */ new Map,r=[],i=[];for(let{item:a,reason:o}of g){let{key:s}=a.attachment,c=e.get(s);t.set(s,a.view.kind),c!==a.view.kind&&(o!==null&&(c===void 0||!Ux(c))?r.push(n.announce.refused(a.attachment.fileName,vS(o,n))):a.view.kind===`ready`&&c===`uploading`&&(r.push(n.announce.uploaded(a.attachment.fileName)),i.push(s)))}if(m.current=t,r.length>0&&p(r.join(`. `)),i.length===0)return;d(e=>/* @__PURE__ */ new Set([...e,...i]));let a=setTimeout(()=>{h.current.delete(a),d(e=>new Set([...e].filter(e=>!i.includes(e))))},yS);h.current.add(a)}),(0,R.useEffect)(()=>()=>{for(let e of h.current)clearTimeout(e);h.current.clear()},[]);let _=()=>{let e=s.current;e!==null&&l(e.scrollTop+e.clientHeight<e.scrollHeight-1)};(0,R.useLayoutEffect)(_,[a]);let v=a.some(e=>Wx(e.view));return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:s,className:[`qa-ai-chat-att-tray`,v?`qa-ai-chat-att-tray--tall`:``,c?`qa-ai-chat-att-tray--fade`:``].filter(Boolean).join(` `),role:`list`,"aria-label":n.trayLabel,onScroll:_,onAnimationEnd:_,"data-testid":`ai-chat-attachment-tray`,children:g.map(({item:r,reason:a,facts:o})=>/* @__PURE__ */ (0,Z.jsx)(dS,{item:r,progress:e.progress,facts:o,reason:a,justUploaded:u.has(r.attachment.key),onRemove:()=>e.remove(r.attachment.key),onRetry:()=>e.retry(r.attachment.key),onPickModel:t,copy:n,typeLabel:i.typeLabel},r.attachment.key))}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,"aria-live":`polite`,children:f})]})}var xS=/^image\.(png|jpe?g|webp)$/i,SS={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`};function CS(e){let t=e=>String(e).padStart(2,`0`);return`${t(e.getHours())}-${t(e.getMinutes())}-${t(e.getSeconds())}`}function wS(e,t,n){return e.getData(`text/plain`)===``?Array.from(e.files).map(e=>{let r=SS[e.type];return r===void 0||e.name!==``&&!xS.test(e.name)?e:new File([e],`${n(CS(t))}.${r}`,{type:e.type,lastModified:e.lastModified})}):[]}var TS=[`ask`,`bypass`],ES={ask:Rr,bypass:Mr};function DS({permission:e,copy:t}){let{value:n,disabled:r,arrival:i,onChange:a}=e,[o,s]=(0,R.useState)(!1),c=(0,R.useRef)(null),l=(0,R.useRef)(null),u=(0,R.useRef)(!1),d=Cn(),f=o&&!r;(0,R.useEffect)(()=>{var e;if(r||!u.current)return;u.current=!1;let t=document.activeElement;(t===null||t===document.body)&&((e=l.current)==null||e.focus())},[r,n]);let p={ask:t.askHint,bypass:t.bypassHint},m=e=>{s(!1),e!==n&&(u.current=!0,a(e))},g=e=>{let t=[...e.currentTarget.querySelectorAll(`[role="radio"]`)],n=t.findIndex(e=>e===document.activeElement),r=n=>{let r=t[n];r!==void 0&&(e.preventDefault(),r.focus())};switch(e.key){case`ArrowDown`:case`ArrowRight`:r((n+1)%t.length);break;case`ArrowUp`:case`ArrowLeft`:r((n-1+t.length)%t.length);break;case`Home`:r(0);break;case`End`:r(t.length-1)}},_=n===null?t.groupLabel:t[n],v=n===null?Rr:ES[n],y=/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:l,type:`button`,className:h(`qa-ai-chat-set`,n===`bypass`&&`qa-ai-chat-set--bypass`,i!==null&&`qa-ai-chat-set--arrived`),"aria-label":n===null?t.groupLabel:t.chipLabel(_),disabled:r,"data-value":n===null?void 0:n,"data-testid":`ai-chat-permission`,onAnimationEnd:i===null?void 0:i.onShown,children:[/* @__PURE__ */ (0,Z.jsx)(v,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-set-value`,children:_})]});return/* @__PURE__ */ (0,Z.jsx)(cn,{title:t.groupLabel,titleVisible:!1,trigger:y,open:f,onOpenChange:e=>s(e&&!r),side:`top`,collisionAvoidance:sn,...d===null?{}:{positionAnchor:d},initialFocusRef:c,className:Sn,"data-testid":`ai-chat-permission-popover`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`flex items-baseline justify-between gap-2 px-2 pt-1.5 pb-2`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`text-xs font-semibold text-fg-primary`,children:t.groupLabel}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`text-xs text-fg-muted`,children:t.menuNote})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":t.groupLabel,className:`flex flex-col`,onKeyDown:g,children:TS.map((e,r)=>{let i=e===n,a=ES[e],o=i||n===null&&r===0;return/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:o?c:void 0,type:`button`,role:`radio`,"aria-checked":i,tabIndex:o?0:-1,"data-value":e,"data-testid":`ai-chat-permission-${e}`,onClick:()=>m(e),className:h(`grid w-full grid-cols-[18px_minmax(0,1fr)_16px] items-start gap-2.5 rounded-md border-0 bg-transparent p-2 text-left`,`hover:bg-(--color-bg-elevated-hover) focus-visible:bg-(--color-bg-elevated-hover)`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`),children:[/* @__PURE__ */ (0,Z.jsx)(a,{"aria-hidden":`true`,className:h(`mt-0.5 size-4`,i?`text-(--color-primary-text)`:`text-fg-muted`)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:h(`block text-body-sm font-medium`,i?`text-(--color-primary-text)`:`text-fg-primary`),children:t[e]}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-xs leading-[1.45] text-fg-muted`,children:p[e]})]}),/* @__PURE__ */ (0,Z.jsx)(Ge,{"aria-hidden":`true`,className:h(`mt-0.5 size-4 text-(--color-primary-text)`,!i&&`invisible`)})]},e)})})]})})}var OS=1e4,kS=5,AS=1e3,jS=1.5;function MS(e){let{isStreaming:t,errorCode:n,send:r,stop:i,onAbandoned:a}=e,o=(0,R.useRef)(a);(0,R.useEffect)(()=>{o.current=a},[a]);let[s,c]=(0,R.useState)(null),[l,u]=(0,R.useState)(!1),d=(0,R.useRef)(null),f=(0,R.useRef)(null),p=(0,R.useRef)(null),m=(0,R.useCallback)(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null),f.current=null,u(!1)},[]),h=(0,R.useCallback)(e=>{r(e).kind!==`sent`&&m()},[m,r]),g=(0,R.useCallback)(e=>{i(),c(e),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{d.current=null,c(null),o.current(e.message)},OS)},[i]);return(0,R.useEffect)(()=>{s===null||t||(d.current!==null&&(clearTimeout(d.current),d.current=null),c(null),f.current={prepared:s.prepared,retriesLeft:kS,timerPending:!1},u(!0),h(s.prepared))},[h,t,s]),(0,R.useEffect)(()=>{if(n!==`chat.busy`){f.current!==null&&m();return}let e=f.current;if(e===null||e.timerPending)return;if(e.retriesLeft<=0){m();return}let t=(e,n,r)=>{f.current={prepared:n,retriesLeft:e,timerPending:!0},p.current=setTimeout(()=>{p.current=null;let e=f.current;e!==null&&(f.current={...e,timerPending:!1},h(e.prepared),f.current!==null&&(e.retriesLeft>0?t(e.retriesLeft-1,e.prepared,r*jS):m()))},r)};t(e.retriesLeft-1,e.prepared,AS)},[h,m,n]),(0,R.useEffect)(()=>()=>{d.current!==null&&clearTimeout(d.current),p.current!==null&&clearTimeout(p.current),f.current=null},[]),{queued:s!==null,busyChainActive:l,sendAfterStop:g}}var NS=typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`field-sizing`,`content`),PS=120,FS=300;function IS({draftStore:e,isStreaming:t,pendingHostAction:n,interactive:r,placeholder:i,errorCode:a,prepareSend:o,sendPrepared:s,stop:c,autoFocus:l,fillRequest:u,focusRequest:d,chips:f,onBusyChainChange:p,copy:m}){let h=(0,R.useRef)(null),g=(0,R.useRef)(null),_=(0,R.useRef)(null),v=(0,R.useId)(),[y,b]=(0,R.useState)(null),x=(0,R.useRef)(null),S=f===null?null:f.attachments,C=Ib(e),w=e.set,{queued:T,busyChainActive:E,sendAfterStop:ee}=MS({isStreaming:t,errorCode:a,send:s,stop:c,onAbandoned:(0,R.useCallback)(t=>{let n=e.get();w(n.trim().length===0?t.text:`${t.text}\n${n}`),S!==null&&t.attachments.length>0&&S.reattach(t.attachments)},[S,e,w])});(0,R.useEffect)(()=>{p(E)},[E,p]),(0,R.useEffect)(()=>{if(l)return x.current=setTimeout(()=>{var e;x.current=null;let t=h.current;t!==null&&t.contains(document.activeElement)||(e=g.current)==null||e.focus({preventScroll:!0})},FS),()=>{x.current!==null&&(clearTimeout(x.current),x.current=null)}},[l]),(0,R.useEffect)(()=>{if(u===0)return;let e=g.current;if(e===null)return;let t=e.value.indexOf(`
371
+ `),n=t===-1?e.value.length:t;e.focus({preventScroll:!0}),e.setSelectionRange(n,n)},[u]),(0,R.useEffect)(()=>{var e;d!==0&&((e=g.current)==null||e.focus({preventScroll:!0}))},[d]);let D=(0,R.useCallback)(()=>{x.current!==null&&(clearTimeout(x.current),x.current=null)},[]),O=(0,R.useCallback)(()=>{if(NS)return;let e=g.current;e!==null&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,PS)}px`)},[]);(0,R.useLayoutEffect)(O,[O,C]),(0,R.useEffect)(()=>{if(!NS)return window.addEventListener(`resize`,O),()=>window.removeEventListener(`resize`,O)},[O]);let[te,k]=(0,R.useState)(!1),A=C.trim(),j=S===null?null:S.sendBlock(A.length>0),ne=(0,R.useCallback)(()=>{if(k(!1),n&&A.length===0){c();return}if(t){if(A.length===0){c();return}if(j!==null)return;w(``);let e={text:A,attachments:S===null?[]:S.detach()};ee({message:e,prepared:o(A,`external`,qx(e.attachments))});return}if(A.length===0||!r||j!==null)return;let e=S===null?[]:S.items.map(e=>e.attachment);s(o(A,`composer`,qx(e))).kind===`sent`&&(w(``),S!==null&&S.detach())},[S,r,t,n,o,w,ee,s,j,c,A]),re=r&&A.length>0&&j===null,M=S!==null&&S.items.length>0,N={uploading:m.sendBlocked.uploading,refused:m.sendBlocked.refused,no_text:m.sendBlocked.noText},ie=e=>{S!==null&&e.length!==0&&S.add(e)},ae=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:g,value:C,rows:1,placeholder:r&&M?m.placeholderWithFiles:i,"aria-label":m.inputLabel,"aria-describedby":v,disabled:!r,"data-testid":`ai-chat-input`,onChange:e=>w(e.target.value),onPaste:e=>{if(S===null)return;let t=wS(e.clipboardData,/* @__PURE__ */ new Date,m.attachments.pastedName);t.length!==0&&(e.preventDefault(),ie(t))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ne())}}),/* @__PURE__ */ (0,Z.jsx)(`span`,{id:v,className:`qa-ai-chat-sr-only`,children:f===null?m.plainHint:m.hint})]}),oe=T?/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-send qa-ai-chat-send--pending`,disabled:!0,"aria-busy":`true`,"aria-label":m.send,"data-testid":`ai-chat-send-button`,children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`icon-pending`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{})]})}):t||n?/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:m.stop,open:te,onOpenChange:k,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-send qa-ai-chat-send--stop`,onClick:c,"data-testid":`ai-chat-stop-button`,children:/* @__PURE__ */ (0,Z.jsx)(ui,{"aria-hidden":`true`})})}):/* @__PURE__ */ (0,Z.jsx)(xe,{...j===null?{relationship:`label`,content:m.send}:{relationship:`description`,content:N[j]},open:te,onOpenChange:k,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`submit`,className:`qa-ai-chat-send`,"aria-label":m.send,"aria-disabled":re?void 0:`true`,"data-testid":`ai-chat-send-button`,onClick:e=>{re||e.preventDefault()},children:/* @__PURE__ */ (0,Z.jsx)(br,{"aria-hidden":`true`})})});return f===null?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-composer-wrap`,ref:h,onPointerDownCapture:D,children:/* @__PURE__ */ (0,Z.jsxs)(`form`,{className:`qa-ai-chat-composer`,onSubmit:e=>{e.preventDefault(),ne()},noValidate:!0,children:[ae,/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-composer-foot qa-ai-chat-composer-foot--plain`,children:oe})]})}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-composer-wrap`,ref:h,onPointerDownCapture:D,children:/* @__PURE__ */ (0,Z.jsxs)(ln.Provider,{value:y,children:[/* @__PURE__ */ (0,Z.jsxs)(`form`,{ref:b,className:`qa-ai-chat-composer`,onSubmit:e=>{e.preventDefault(),ne()},noValidate:!0,children:[f.attachments.items.length>0&&/* @__PURE__ */ (0,Z.jsx)(bS,{attachments:f.attachments,onPickModel:f.onPickModel,copy:m.attachments}),ae,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-composer-foot`,children:[/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:m.attachments.attach,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-attach`,disabled:!r,onClick:()=>{var e;return(e=_.current)==null?void 0:e.click()},"data-testid":`ai-chat-attach-button`,children:/* @__PURE__ */ (0,Z.jsx)(Qr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`input`,{ref:_,type:`file`,multiple:!0,accept:Px,hidden:!0,tabIndex:-1,"aria-hidden":`true`,"data-testid":`ai-chat-attach-input`,onChange:e=>{let t=e.currentTarget;t.files!==null&&ie(Array.from(t.files)),t.value=``}}),f.modelPicker,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-composer-grow`}),oe]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-sets`,role:`group`,"aria-label":m.settingsLabel,children:[f.effortChip,/* @__PURE__ */ (0,Z.jsx)(DS,{permission:f.permission,copy:m.permission}),f.placeChip]})]})})}function LS(e){return typeof e!=`object`||!e||Array.isArray(e)?null:e}function RS(e){let t;try{t=JSON.parse(e)}catch{return null}return LS(t)}function zS(e){let t=LS(e.error);if(t===null)return null;let n=t.message;if(typeof n!=`string`)return null;let r=t.code;return typeof r==`string`&&r.length>0?{kind:`error`,code:r,message:n}:{kind:`error`,message:n}}var BS=/* @__PURE__ */ new Set([`pending`,`confirmed`,`rejected`,`failed`,`closed`]);function VS(e){return typeof e==`string`&&BS.has(e)?e:null}function HS(e,t){if(t!==null){let e=VS(t.status);return{kind:`pending-tool-call`,toolCallId:t.toolCallId,toolName:t.toolName,args:t.args,display:t.display,...e===null?{}:{status:e}}}let n=RS(e);if(n===null)return{kind:`prose`,text:e};let r=zS(n);return r===null?{kind:`prose`,text:e}:r}function US(e){let{role:t,pendingToolCall:n,toolCalls:r,toolResults:i}=e,a=null;if(t===`assistant`&&n!=null){let t=HS(e.content,n);t.kind===`pending-tool-call`&&(a={toolCallId:t.toolCallId,toolName:t.toolName})}return{role:t,pendingToolCall:n,toolCalls:r,toolResults:i,confirmation:a}}function WS(e,t){return e.role===t.role&&e.pendingToolCall===t.pendingToolCall&&e.toolCalls===t.toolCalls&&e.toolResults===t.toolResults}function GS(e){return e.confirmation!==null||e.toolCalls!==void 0&&e.toolCalls.length>0||e.toolResults!==void 0&&e.toolResults.length>0}function KS(e,t,n,r){let i=e.get(t);if(i===void 0){e.set(t,/* @__PURE__ */ new Map([[n,r]]));return}i.set(n,r)}function qS(e,t,n){let r=e.get(t);r!==void 0&&(r.delete(n),r.size===0&&e.delete(t))}function JS(e,t){let n=e.get(t);if(n===void 0)return;let r=n.values().next();return r.done===!0?void 0:r.value}function YS(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function XS(){let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=0,o=0,s=null,c=null,l=/* @__PURE__ */ new Map;function u(e,i,a){a!==null&&a.confirmation!==null?r.set(e,a.confirmation):i!==null&&i.confirmation!==null&&r.delete(e);let o=a===null?void 0:a.toolCalls;if(i!==null&&i.toolCalls!==void 0){let n=new Set(o===void 0?[]:o.map(e=>e.toolCallId));for(let r of i.toolCalls)n.has(r.toolCallId)||qS(t,r.toolCallId,e)}if(o!==void 0)for(let n of o)KS(t,n.toolCallId,e,n.toolName);let s=a===null?void 0:a.toolResults;if(i!==null&&i.toolResults!==void 0){let t=new Set(s===void 0?[]:s.map(e=>e.toolCallId));for(let r of i.toolResults)t.has(r.toolCallId)||qS(n,r.toolCallId,e)}if(s!==void 0)for(let t of s){var c;let r=(c=n.get(t.toolCallId))==null?void 0:c.get(e);(r===void 0||r.value!==t.result)&&KS(n,t.toolCallId,e,{value:t.result})}}function d(e,r,i){let a=JS(t,r),o=i===null?a===void 0?null:a:i,s=JS(n,r),c=s===void 0?null:s,u=l.get(e);return u!==void 0&&u.toolCallId===r&&u.toolName===o&&u.result===c?u:{toolCallId:r,toolName:o,result:c}}function f(){let t=/* @__PURE__ */ new Map;for(let[e,n]of r)t.set(e,d(e,n.toolCallId,n.toolName));for(let[n,a]of i)!r.has(n)&&e.has(n)&&t.set(n,d(n,a,null));YS(t,l)||(l=t)}return{get resolvedConfirmationsRevision(){return a},recordResolvedConfirmation({messageId:e,toolCallId:t}){return i.get(e)!==t&&(i.set(e,t),a+=1,!0)},forgetResolvedConfirmations(){return i.size!==0&&(i.clear(),a+=1,!0)},read(t,n){if(t===s&&n===c)return l;let r=n!==c;s=t,c=n,o+=1;let a=0;for(let n of t){let t=e.get(n.id);if(t===void 0){let t=US(n);u(n.id,null,t),e.set(n.id,{message:n,facts:t,seenInRead:o}),a+=1,(GS(t)||i.has(n.id))&&(r=!0);continue}if(t.seenInRead!==o&&(t.seenInRead=o,a+=1),t.message===n||(t.message=n,WS(t.facts,n)))continue;let s=US(n);(GS(t.facts)||GS(s))&&(r=!0),u(n.id,t.facts,s),t.facts=s}if(a!==e.size)for(let[t,n]of e)n.seenInRead!==o&&((GS(n.facts)||i.has(t))&&(r=!0),u(t,n.facts,null),e.delete(t));return r&&f(),l}}}function ZS(e){let[t]=(0,R.useState)(XS),[n,r]=(0,R.useState)(()=>t.resolvedConfirmationsRevision);return{confirmedCalls:(0,R.useMemo)(()=>t.read(e,n),[t,e,n]),recordResolvedConfirmation:(0,R.useCallback)(e=>{t.recordResolvedConfirmation(e)&&r(t.resolvedConfirmationsRevision)},[t]),forgetResolvedConfirmations:(0,R.useCallback)(()=>{t.forgetResolvedConfirmations()&&r(t.resolvedConfirmationsRevision)},[t])}}var QS=I({type:bt(`action-resolved`),messageId:L().min(1),toolCallId:L().min(1)}),$S={kind:`other-event`};function eC(e){if(typeof e!=`object`||!e||!(`type`in e)||e.type!==`action-resolved`)return $S;let t=QS.safeParse(e);return t.success?{kind:`pairing`,pairing:{messageId:t.data.messageId,toolCallId:t.data.toolCallId}}:{kind:`malformed`,issuePaths:t.error.issues.map(e=>e.path.join(`.`))}}var tC=at({resultKind:bt(`workflow_started`),workflow:at({conversationId:jt().nullable()})});function nC(e,t){let n=tC.safeParse(e);if(!n.success)return null;let{conversationId:r}=n.data.workflow;return r!==null&&r!==t?r:null}function rC(e,t){let{launched:n,total:r}=De(e);return n===0?t.outcome.refused:t.outcome.launched(n,r)}var iC=/* @__PURE__ */ new WeakMap;function aC(e){let t=iC.get(e);if(t!==void 0)return t;let n=_e(e.value);return iC.set(e,n),n}function oC(e,t,n){if(e===null)return t.confirmed;let r=aC(e);switch(r.kind){case`dispatched`:return rC(r.result,t);case`refused`:{let{code:e,message:i,params:a}=r.refusal,o=n({error_code:e,message:i,...a===void 0?{}:{params:a}});return o===``?t.outcome.refused:t.outcome.refusedWithReason(o)}case`unreadable`:return t.confirmed}}function sC({label:e,count:t,children:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec-head`,children:[e,t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:t})]}),n]})}function cC({item:e}){let t=$().cards.changeSet,n=Q(),r=e.diffKind;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:h(r===`delete`&&`qa-cs-diff__row--delete`),children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-diff__what`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__verb`,children:e.actionTitle[n]}),e.entityLabel!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__target`,children:e.entityLabel}),e.field!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__field`,children:e.field}),e.isSecret===!0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-diff__secret`,children:[/* @__PURE__ */ (0,Z.jsx)(tn,{"aria-hidden":`true`}),t.secretChip]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-diff__vals`,children:[r===`replace`&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e.before}),/* @__PURE__ */ (0,Z.jsx)(wn,{className:`qa-cs-diff__arrow`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:e.after})]}),r===`add`&&/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:e.after}),r===`delete`&&/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e.before??e.after}),r===`move`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__pos`,children:e.after})]})]})}function lC({items:e}){let t=$().cards.changeSet;return e.length===0?/* @__PURE__ */ (0,Z.jsx)(sC,{label:t.whatChanges,children:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:t.proposalEmpty})}):/* @__PURE__ */ (0,Z.jsx)(sC,{label:t.whatChanges,...e.length>1?{count:t.changesCount(e.length)}:{},children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-diff`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(cC,{item:e},t))})})}function uC({entries:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(sC,{label:t.cascadeTitle,children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-cascade`,children:e.map((e,n)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:h(e.count===0&&`qa-cs-cascade__zero`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:hh(e.entityType,t)}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.count})]},n))})})}function dC({evidence:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(Mp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.evidence}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.length})]}),children:/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-cs-evidence`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[e.label,e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-muted`,children:[` `,e.detail]})]})},t))})})}function fC({label:e,target:t}){let{project:n,navigation:r}=Zf();if(n===null)return null;let i=rp(n.number,t);return i===null?null:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-cs-linkish`,onClick:()=>r.openPath(i),children:e})}function pC({warnings:e}){return e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-issue qa-cs-issue--warn`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.label}),e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.detail}),e.cta!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-issue__acts`,children:/* @__PURE__ */ (0,Z.jsx)(fC,{label:e.cta.label,target:e.cta.openTarget})})]})]},t))}function mC({blockers:e,idOf:t}){return e.map((e,n)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:t(n),className:`qa-cs-issue qa-cs-issue--block`,children:[/* @__PURE__ */ (0,Z.jsx)(tn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.label}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.reason}),e.cta!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-issue__acts`,children:/* @__PURE__ */ (0,Z.jsx)(fC,{label:e.cta.label,target:e.cta.openTarget})})]})]},n))}function hC({id:e}){let t=$().cards.changeSet.killSwitch;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:e,className:`qa-cs-issue qa-cs-issue--muted`,children:[/* @__PURE__ */ (0,Z.jsx)(tn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.body})]})]})}function gC({id:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{id:e,className:`qa-cs-why`,children:[/* @__PURE__ */ (0,Z.jsx)(zr,{"aria-hidden":`true`}),t]})}function _C(){let[e,t]=(0,R.useState)(!1);return{reasonOpen:e,openReason:()=>t(!0),closeReason:()=>t(!1)}}function vC({busy:e,onClose:t,onReject:n}){let r=$().cards.changeSet,i=(0,R.useId)(),[a,o]=(0,R.useState)(``),s=e=>{e.key===`Escape`&&(e.stopPropagation(),t())},c=a.trim();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-reason`,children:[/* @__PURE__ */ (0,Z.jsxs)(`label`,{htmlFor:i,children:[r.reasonLabel,` `,/* @__PURE__ */ (0,Z.jsx)(`small`,{children:r.reasonHint})]}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{id:i,rows:2,value:a,autoFocus:!0,onChange:e=>o(e.target.value),onKeyDown:s}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-reason__row`,children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,disabled:e,onClick:()=>n(null),children:r.rejectPlain}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,disabled:e,loading:e,onClick:()=>n(c.length>0?c:null),children:r.rejectWithReason})]})]})}function yC({deletion:e,confirmEnabled:t,disabledReasonIds:n,busy:r,onOpenReason:i,onConfirm:a,confirmLabel:o}){let s=$().cards.changeSet,c=!t,l=Wm(e);return/* @__PURE__ */ (0,Z.jsxs)(Np,{children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,className:`qa-chat-card__actions-push`,icon:/* @__PURE__ */ (0,Z.jsx)(kr,{size:14}),loading:r===`reject`,disabled:r!==null,onClick:i,children:s.reject}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:l.variant,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ge,{size:14}),loading:r===`confirm`,disabled:r!==null,"aria-disabled":c?!0:void 0,"aria-describedby":c&&n.length>0?n.join(` `):void 0,onClick:()=>{c||a()},children:o??s[l.label]})]})}function bC(e,t){return e!==null&&e.pressed!==null?e.pressed:e!==null&&e.locked?`other`:t===`confirm`?`confirm`:t===null?null:`other`}function xC({state:e,snapshot:t,controller:n,chatDecision:r,dockRecord:i}){let a=$().cards.changeSet,o=Q(),s=(0,R.useId)(),c=_C(),l=t.proposal,u=Xh(t),d=xh(e,t,a,o),f=l===void 0?null:l.intentSummary.trim(),p=u===null&&f!==null&&f.length>0&&f!==d?f:null,m=t.confirmDisabledReason,h=m!==void 0&&ih(nh,m)?m:null,g=`${s}-ks`,_=`${s}-why`,v=e=>`${s}-b${String(e)}`,y=[...t.blockers.map((e,t)=>v(t)),...m===`kill_switch_off`?[g]:[],...h===null?[]:[_]],b=n.commandFailure!==null&&n.commandFailure.state===t.state?n.commandFailure.command:null,x=n.busy;return/* @__PURE__ */ (0,Z.jsxs)(my,{state:e,snapshot:t,...i===null?{}:{dockRecord:i},sections:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(dC,{evidence:t.evidence}),r===null&&c.reasonOpen&&/* @__PURE__ */ (0,Z.jsx)(vC,{busy:x===`reject`,onClose:c.closeReason,onReject:e=>{n.reject(e).then(c.closeReason)}}),b!==null&&/* @__PURE__ */ (0,Z.jsx)(B_,{children:a.commandFailed[b]}),r!==null&&i===null&&/* @__PURE__ */ (0,Z.jsx)(U_,{toolCallId:r.toolCallId})]}),footer:i!==null||c.reasonOpen&&r===null?void 0:/* @__PURE__ */ (0,Z.jsx)(yC,{deletion:Um(l==null?void 0:l.items),confirmEnabled:Km(t),disabledReasonIds:y,busy:bC(r,n.busy),onOpenReason:r===null?c.openReason:()=>r.decide(`reject`),onConfirm:()=>{r===null?n.confirm():r.decide(`confirm`)},...u===null?{}:{confirmLabel:a.bugFiling.confirm}}),children:[p!==null&&/* @__PURE__ */ (0,Z.jsx)(Dp,{children:p}),u===null?l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(lC,{items:l.items}):/* @__PURE__ */ (0,Z.jsx)($h,{facts:u.facts}),(l==null?void 0:l.cascade)!==void 0&&/* @__PURE__ */ (0,Z.jsx)(uC,{entries:l.cascade}),/* @__PURE__ */ (0,Z.jsx)(pC,{warnings:t.warnings}),/* @__PURE__ */ (0,Z.jsx)(mC,{blockers:t.blockers,idOf:v}),m===`kill_switch_off`&&/* @__PURE__ */ (0,Z.jsx)(hC,{id:g}),h!==null&&/* @__PURE__ */ (0,Z.jsx)(gC,{id:_,children:a.disabledReason[h]})]})}function SC({state:e,snapshot:t,controller:n,chatDecision:r,tether:i}){let{toolCallId:a}=r,o=(0,R.useRef)(null),{linked:s,onLinkChange:c}=cg(i,a,`feed`);return(0,R.useEffect)(()=>i.registerRecord(a,{reveal:()=>{var e;return(e=o.current)==null?void 0:e.reveal()}}),[i,a]),(0,R.useEffect)(()=>()=>c(!1),[c]),/* @__PURE__ */ (0,Z.jsx)(xC,{state:e,snapshot:t,controller:n,chatDecision:r,dockRecord:{handle:o,linked:s,onLinkChange:c}})}var CC=(0,R.createContext)(null);function wC(e,t){let n=(0,R.useContext)(CC),{state:r,loadFailed:i,confirm:a,reject:o}=t;(0,R.useEffect)(()=>{if(n!==null)return n.register(e,{state:r,loadFailed:i,confirm:a,reject:o}),()=>n.unregister(e)},[n,e,r,i,a,o])}function TC(e,t){let n={total:e.length,loading:0,loadFailed:0,awaiting:0,applying:0,applied:0,rejected:0,failed:0,superseded:0,closed:0,undone:0};for(let r of e){let e=t.get(r);if(e===void 0){n.loading+=1;continue}if(e.loadFailed){n.loadFailed+=1;continue}switch(e.state){case null:n.loading+=1;break;case Rm:n.awaiting+=1;break;case`applying`:n.applying+=1;break;case`applied`:n.applied+=1;break;case`rejected_no_op`:n.rejected+=1;break;case`partial_failure`:n.failed+=1;break;case`superseded`:n.superseded+=1;break;case`closed`:n.closed+=1;break;case`undone`:n.undone+=1}}return n}function EC(e){return e.total-e.superseded-e.closed-e.undone-e.loadFailed}function DC(e){return e.applied+e.rejected+e.failed}function OC(e){let t=EC(e);return t>0&&DC(e)===t}function kC(e){return e.awaiting>0&&e.loading===0}function AC(e){let t=EC(e),n=DC(e);return e.applying>0?{kind:`applying`,count:e.applied+e.applying,total:t}:OC(e)?{kind:`done`,count:n,total:t}:n>0?{kind:`remaining`,count:t-n,total:t}:e.awaiting>0?{kind:`awaiting`,count:e.awaiting}:{kind:`proposals`,count:e.total}}function jC(e,t,n){return new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:t}).format(e)}function MC(e,t){return new Intl.NumberFormat(t).format(e)}function NC(e,t,n){return`${e>0?`+`:e<0?`\u2212`:``}${jC(Math.abs(e),t,n)}`}function PC(e,t){return t===0?null:Math.round(e/t*100)}function FC(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}var IC={hour:`2-digit`,minute:`2-digit`},LC={day:`numeric`,month:`short`,hour:`2-digit`,minute:`2-digit`},RC={day:`numeric`,month:`short`};function zC(e,t,n=/* @__PURE__ */ new Date){let r=new Date(e);return new Intl.DateTimeFormat(t,FC(r,n)?IC:LC).format(r)}function BC(e,t){return new Intl.DateTimeFormat(t,LC).format(new Date(e))}function VC(e,t){return new Intl.DateTimeFormat(t,{dateStyle:`long`,timeZone:`UTC`}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`))}function HC(e,t){return new Intl.DateTimeFormat(t,{...RC,timeZone:`UTC`}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`))}function UC(e,t){return new Intl.DateTimeFormat(t,RC).format(new Date(e))}var WC=864e5;function GC(e,t=Date.now()){let n=Date.parse(`${e}T00:00:00Z`),r=Math.floor(t/WC)*WC;return Math.round((r-n)/WC)}function KC(e,t,n=/* @__PURE__ */ new Date){let r=new Date(e),i=new Intl.DateTimeFormat(t,IC).format(r),a=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),o=Math.round((a(r)-a(n))/WC);return o===0||o===-1?`${new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(o,`day`)}, ${i}`:new Intl.DateTimeFormat(t,LC).format(r)}var qC=6e4,JC=60*qC,YC=30*WC,XC=365*WC,ZC=45e3;function QC(e,t,n){let r=Math.max(0,t-Date.parse(e)),i=new Intl.RelativeTimeFormat(n,{numeric:`auto`});return r<ZC?i.format(0,`minute`):r<JC?i.format(-Math.max(1,Math.floor(r/qC)),`minute`):r<WC?i.format(-Math.max(1,Math.floor(r/JC)),`hour`):r<YC?i.format(-Math.max(1,Math.floor(r/WC)),`day`):r<XC?i.format(-Math.max(1,Math.floor(r/YC)),`month`):i.format(-Math.max(1,Math.floor(r/XC)),`year`)}function $C(e,t){let n=Math.max(0,Math.round(e/1e3)),r=Math.floor(n/60),i=n%60,a=(e,n)=>new Intl.NumberFormat(t,{style:`unit`,unit:n,unitDisplay:`short`}).format(e);return r===0?a(i,`second`):`${a(r,`minute`)} ${a(i,`second`)}`}function ew({items:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-cs-apply`,role:`status`,"aria-label":t.applyAria,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-bar`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`i`,{})}),e!==void 0&&e.length>0&&/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-ticks`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-ticks__t`,children:[e.entityLabel,e.field!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__field`,children:e.field})]})]},t))})]})}var tw={applied:{tone:`ok`,Icon:Ue},failed:{tone:`fail`,Icon:kr},batch_aborted:{tone:`abort`,Icon:Er},pending:{tone:`pend`,Icon:Mn}};function nw({before:e,after:t}){return e===void 0&&t===void 0?null:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__dl`,children:[e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e}),e!==void 0&&t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(wn,{"aria-hidden":`true`}),t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:t})]})}function rw({rows:e}){let t=$().cards.changeSet,n=Q(),r=new Set(e.map(e=>e.actionType)).size>1;return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-results`,children:e.map((e,i)=>{let{tone:a,Icon:o}=tw[e.itemStatus],s=e.errorCode===void 0?null:_h(e.errorCode,t);return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-cs-results__${a}`,children:[/* @__PURE__ */ (0,Z.jsx)(o,{"aria-hidden":!0}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__ent`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${t.row[e.itemStatus]}: `}),r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-results__act`,children:e.actionTitle[n]}),e.entityLabel]}),/* @__PURE__ */ (0,Z.jsx)(nw,{...e.before===void 0?{}:{before:e.before},...e.after===void 0?{}:{after:e.after}}),e.errorCode!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__err`,children:[s,/* @__PURE__ */ (0,Z.jsx)(`code`,{children:e.errorCode})]})]},i)})})}function iw({label:e,tone:t,rows:n}){let r=$().cards.changeSet,i=Q();return n.length===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head qa-cs-legacy__${t}`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-results`,children:n.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:e.status===`applied`?`qa-cs-results__ok`:e.status===`skipped`?`qa-cs-results__pend`:`qa-cs-results__fail`,children:[e.status===`applied`?/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`}):e.status===`skipped`?/* @__PURE__ */ (0,Z.jsx)(Mn,{"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(kr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__ent`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${r.row[e.status]}: `}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-results__act`,children:e.actionTitle[i]}),e.entityLabel]}),e.status===`failed`&&(e.errorCode!==void 0||e.detail!==void 0)&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__err`,children:[e.detail,e.errorCode!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:e.errorCode})]})]},t))})]})}function aw({summary:e}){let t=$().cards.changeSet;return e.rows===void 0?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(iw,{label:t.appliedGroup(e.applied.length),tone:`ok`,rows:e.applied}),/* @__PURE__ */ (0,Z.jsx)(iw,{label:t.failedGroup(e.failed.length),tone:`fail`,rows:e.failed})]}):/* @__PURE__ */ (0,Z.jsx)(rw,{rows:e.rows})}function ow({attempt:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-chipline`,children:[e>1&&/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`neutral`,dot:!1,children:t.attempt(e)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-verified`,children:[/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`}),t.verified]})]})}function sw({effects:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-side-effects`,children:[t.undo.sideEffectsTitle,/* @__PURE__ */ (0,Z.jsx)(`ul`,{children:e.map(e=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:vh(e,t)},e))})]})}function cw(e,t){return e.timedOut?t.undo.unknown:e.code===null?t.undo.failed:t.undo.error[e.code]}function lw({block:e,undo:t,canRequest:n,onUndo:r}){let i=$().cards.changeSet,a=Q();if(e.blockedReason===`not_auto`)return null;if(t.phase===`sending`||t.phase===`waiting`)return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-undo`,children:/* @__PURE__ */ (0,Z.jsxs)(N,{variant:`secondary`,size:`sm`,disabled:!0,"aria-busy":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`}),i.undo.busy]})});let o=e.eligible&&n&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(mi,{size:14}),onClick:r,children:i.undo.action});if(t.phase===`refused`)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-undo`,children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-undo__error`,role:`alert`,children:cw(t,i)}),o]});if(e.eligible)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-undo`,children:[o,e.offeredUntil!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-undo__deadline`,children:i.undo.until(zC(e.offeredUntil,a))})]});let s=e.blockedReason===`stale`||e.blockedReason===`expired`||e.blockedReason===`kill_switch`?i.undo.blocked[e.blockedReason]:e.blockedReason===null?null:i.undo.unavailable;return s===null?null:/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-cs-why`,children:[/* @__PURE__ */ (0,Z.jsx)(tn,{"aria-hidden":`true`}),s]})}function uw({row:e}){let t=$().cards.changeSet,{project:n,navigation:r}=Zf(),i=e.entityRef,a=up(i.type),o=n===null?null:rp(n.number,i.open),s=i.label===``?null:i.label;return/* @__PURE__ */ (0,Z.jsx)(jp,{icon:a.icon,tileTone:a.tone,name:s??/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-missing`,children:t.entityLabelMissing}),trailing:o!==null&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Vp,{size:14}),"aria-label":t.openAria(s??t.entityLabelMissing),onClick:()=>r.openPath(o),children:t.open})})}function dw(e){return e.entityRef!==void 0}function fw({evidence:e}){let t=$().cards.changeSet,n=e.filter(dw);return n.length===0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:t.noResults}):/* @__PURE__ */ (0,Z.jsx)(Ap,{children:n.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(uw,{row:e},t))})}function pw({count:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-skeleton-lines`,"aria-hidden":`true`,children:Array.from({length:e},(e,t)=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk`},t))})}function mw({state:e,evidence:t}){let n=$().cards.changeSet;switch(e){case`searching`:return/* @__PURE__ */ (0,Z.jsx)(pw,{count:3});case`no_results`:return/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:n.noResults});case`search_results_shown`:return/* @__PURE__ */ (0,Z.jsx)(fw,{evidence:t});case`ambiguity_choose_target`:return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:n.chooseTargetHint}),/* @__PURE__ */ (0,Z.jsx)(fw,{evidence:t})]});case`item_selected`:{let e=t.find(dw);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-chipline`,children:[/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`info`,children:n.selected}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-muted`,children:n.nothingChanged})]}),e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(Ap,{children:/* @__PURE__ */ (0,Z.jsx)(uw,{row:e})})]})}case`inspecting`:return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head`,children:n.evidenceHeading}),t.length>0&&/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-cs-evidence`,children:t.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[e.label,e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-muted`,children:[` `,e.detail]})]})},t))}),/* @__PURE__ */ (0,Z.jsx)(pw,{count:1})]})}}function hw(e){let{viewer:t}=Zf();return(0,R.useEffect)(()=>{e&&t.request()},[e,t]),(0,R.useSyncExternalStore)(t.subscribe,t.read)}function gw(e,t,n,r){switch(t.kind){case`reading`:return null;case`known`:return t.id===e.byUserId?r.setByYou(n):r.setAt(n);case`unknown`:return r.setAt(n)}}function _w({requests:e}){let t=$().cards.changeSet.secretInput,n=Q(),r=hw(e.some(e=>e.valueDeposit!==null));if(e.length===0)return null;let i=xy(e)!==null;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-plates`,"data-testid":`ai-secret-history`,children:e.map(e=>{let a=e.valueDeposit,o=a===null?null:gw(a,r,zC(a.at,n),t);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-plate`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-plate-var`,children:e.variableName}),!i&&/* @__PURE__ */ (0,Z.jsx)(by,{name:e.environment.name}),a===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.notSet}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(vy,{label:t.hiddenAria,className:`qa-sc-secret`}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:o})]})]},e.changeSetItemId)})})}function vw({snapshot:e}){return e.secretInputRequests.length===0?null:/* @__PURE__ */ (0,Z.jsx)(_w,{requests:e.secretInputRequests})}function yw({snapshot:e}){let t=$().cards.changeSet,{conversation:n}=Zf();return/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(me,{size:14}),onClick:()=>n.setDraft(Sh(Zm(e),t)),children:t.revise})}function bw({state:e,snapshot:t,decidedInDock:n}){var r;let i=$().cards.changeSet,a=(r=t.proposal)==null?void 0:r.items;return/* @__PURE__ */ (0,Z.jsx)(my,{state:e,snapshot:t,decidedInDock:n,subject:a!==void 0&&a.length>0?i.applyingSubject(a.length):i.applyingGeneric,note:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:i.applyDisclaimer}),children:/* @__PURE__ */ (0,Z.jsx)(ew,{items:a})})}function xw({state:e,snapshot:t,controller:n}){let r=$().cards.changeSet,i=t.applySummary,a=i==null?void 0:i.undo,o=n.undo;return/* @__PURE__ */ (0,Z.jsxs)(my,{state:e,snapshot:t,sections:o.phase===`waiting`&&o.unknown?/* @__PURE__ */ (0,Z.jsx)(B_,{tone:`warning`,children:r.undo.unknown}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(vw,{snapshot:t}),i===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyMissing}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(ow,{attempt:i.attempt}),i.durationMs!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyDuration(i.durationMs)}),/* @__PURE__ */ (0,Z.jsx)(aw,{summary:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(lw,{block:a,undo:o,canRequest:n.busy===null&&(o.phase!==`refused`||o.blockedFor!==t),onUndo:n.requestUndo}),a.blockedReason!==`not_auto`&&/* @__PURE__ */ (0,Z.jsx)(sw,{effects:a.nonReversedSideEffects})]})]})]})}function Sw(e){let t=e.applySummary;return t===void 0?0:t.rows===void 0?t.failed.length:t.rows.filter(e=>e.itemStatus!==`applied`).length}function Cw({state:e,snapshot:t,controller:n}){let r=$().cards.changeSet,i=t.applySummary,a=i==null?void 0:i.undo,o=n.undo,s=Sw(t),c=i!==void 0&&i.retryAvailable&&n.canRetryApply&&s>0,l=n.commandFailure!==null&&n.commandFailure.state===t.state;return/* @__PURE__ */ (0,Z.jsxs)(my,{state:e,snapshot:t,sections:l||o.phase===`waiting`&&o.unknown?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[l&&/* @__PURE__ */ (0,Z.jsx)(B_,{children:r.commandFailed.retry}),o.phase===`waiting`&&o.unknown&&/* @__PURE__ */ (0,Z.jsx)(B_,{tone:`warning`,children:r.undo.unknown})]}):void 0,note:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:r.whatNext}),footer:/* @__PURE__ */ (0,Z.jsxs)(Np,{children:[c&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),loading:n.busy===`retry`,disabled:n.busy!==null,onClick:n.retryApply,children:r.retryRemaining(s)}),/* @__PURE__ */ (0,Z.jsx)(yw,{snapshot:t})]}),children:[/* @__PURE__ */ (0,Z.jsx)(vw,{snapshot:t}),i===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyMissing}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[i.attempt>1&&/* @__PURE__ */ (0,Z.jsx)(ow,{attempt:i.attempt}),i.durationMs!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyDuration(i.durationMs)}),/* @__PURE__ */ (0,Z.jsx)(aw,{summary:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(lw,{block:a,undo:o,canRequest:n.busy===null&&(o.phase!==`refused`||o.blockedFor!==t),onUndo:n.requestUndo}),a.blockedReason!==`not_auto`&&/* @__PURE__ */ (0,Z.jsx)(sw,{effects:a.nonReversedSideEffects})]})]})]})}function ww({state:e,snapshot:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(my,{state:e,snapshot:t,subject:n.rejectedTitle,footer:/* @__PURE__ */ (0,Z.jsx)(Np,{children:/* @__PURE__ */ (0,Z.jsx)(yw,{snapshot:t})}),children:[/* @__PURE__ */ (0,Z.jsx)(Dp,{children:n.rejectedLead}),/* @__PURE__ */ (0,Z.jsx)(vw,{snapshot:t})]})}function Tw({state:e,snapshot:t}){var n;let r=$().cards.changeSet,i=(n=t.applySummary)==null||(n=n.undo)==null?void 0:n.nonReversedSideEffects;return/* @__PURE__ */ (0,Z.jsxs)(my,{state:e,snapshot:t,subject:r.undoneTitle,children:[/* @__PURE__ */ (0,Z.jsx)(Dp,{children:r.undoneLead}),i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(sw,{effects:i})]})}function Ew({state:e,snapshot:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsx)(my,{state:e,snapshot:t,sections:/* @__PURE__ */ (0,Z.jsx)(dC,{evidence:t.evidence}),note:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(hn,{}),children:n.superseded}),children:t.proposal!==void 0&&/* @__PURE__ */ (0,Z.jsx)(lC,{items:t.proposal.items})})}function Dw({state:e,snapshot:t}){let n=Xh(t);return/* @__PURE__ */ (0,Z.jsxs)(my,{state:e,snapshot:t,...t.closure===void 0?{}:{note:/* @__PURE__ */ (0,Z.jsx)(Ow,{closure:t.closure})},children:[n===null?t.proposal!==void 0&&/* @__PURE__ */ (0,Z.jsx)(lC,{items:t.proposal.items}):/* @__PURE__ */ (0,Z.jsx)($h,{facts:n.facts}),/* @__PURE__ */ (0,Z.jsx)(vw,{snapshot:t})]})}function Ow({closure:e}){let t=$().cards.changeSet.closedBy,n=Q();switch(e.reason){case`launch_stopped`:return/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(Or,{}),children:t.launchStoppedNote});case`finding_filed`:return/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(Ge,{}),children:t.findingFiledNote(e.bug.number,zC(e.bug.filedAt,n))})}}function kw(e){let{state:t,snapshot:n}=e;if(Lm(t))return/* @__PURE__ */ (0,Z.jsx)(my,{state:t,snapshot:n,children:/* @__PURE__ */ (0,Z.jsx)(mw,{state:t,evidence:n.evidence})});switch(t){case`applying`:return/* @__PURE__ */ (0,Z.jsx)(bw,{...e});case`applied`:return/* @__PURE__ */ (0,Z.jsx)(xw,{...e});case`partial_failure`:return/* @__PURE__ */ (0,Z.jsx)(Cw,{...e});case`rejected_no_op`:return/* @__PURE__ */ (0,Z.jsx)(ww,{...e});case`undone`:return/* @__PURE__ */ (0,Z.jsx)(Tw,{...e});case`superseded`:return/* @__PURE__ */ (0,Z.jsx)(Ew,{...e});case`closed`:return/* @__PURE__ */ (0,Z.jsx)(Dw,{...e})}}function Aw(){let e=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(Cp,{bare:!0,className:h(Fp,`qa-cs-card`),"aria-busy":!0,"aria-label":e.loadingAria,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton__head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--tile`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton__titles`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w45`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--thin qa-cs-sk--w30`})]})]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--h qa-cs-sk--w75`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w92`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w80`})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__actions`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--btn`})})]})}function jw({reason:e,onRetry:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsx)(Cp,{bare:!0,tone:e===`retryable`?`error`:`neutral`,className:h(Fp,`qa-cs-card`),children:e===`retryable`?/* @__PURE__ */ (0,Z.jsx)(Pp,{icon:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),title:n.loadError,text:n.loadErrorText,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:t,children:n.retry})}):/* @__PURE__ */ (0,Z.jsx)(Pp,{icon:/* @__PURE__ */ (0,Z.jsx)(tn,{}),title:n.unavailable,text:n.unavailableText})})}function Mw({snapshot:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:h(Fp,`qa-cs-card`,`qa-card-kit--unsupported`),icon:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:16}),tileTone:`muted`,title:t.title,...e===null?{}:{caption:bh(Zm(e),t)},"aria-label":`${t.title}: ${t.unknownState}`,sections:e===null?void 0:/* @__PURE__ */ (0,Z.jsx)(dC,{evidence:e.evidence}),children:[/* @__PURE__ */ (0,Z.jsx)(Ep,{children:t.unknownState}),(e==null?void 0:e.proposal)!==void 0&&/* @__PURE__ */ (0,Z.jsx)(lC,{items:e.proposal.items})]})}function Nw({projectId:e,changeSetId:t,chatPreview:n=!1,toolCallId:r}){let i=Zf(),a=mh(i,e,t),{load:o,confirm:s,reject:c}=a,l=o.status===`ready`?o.snapshot:null,u=l!==null&&Im(l.state)?l.state:null,d=i.conversation.changeSetDecision,f=r??null,p=n&&f!==null&&d!==void 0;ng(i,o,f);let m=(0,R.useCallback)(()=>p&&f!==null&&d!==void 0?(d.decide(f,`reject`),Promise.resolve(`unknown`)):c(null),[c,p,f,d]),h=(0,R.useCallback)(()=>p&&f!==null&&d!==void 0?(d.decide(f,`confirm`),Promise.resolve(`unknown`)):s(),[s,p,f,d]);if(wC(t,{state:l===null?null:l.state,loadFailed:o.status===`failed`,confirm:h,reject:m}),o.status===`loading`)return/* @__PURE__ */ (0,Z.jsx)(Aw,{});if(o.status===`failed`)return o.reason===`unsupported`?/* @__PURE__ */ (0,Z.jsx)(Mw,{snapshot:null}):/* @__PURE__ */ (0,Z.jsx)(jw,{reason:o.reason,onRetry:a.reload});if(n&&!p||u===null)return/* @__PURE__ */ (0,Z.jsx)(Mw,{snapshot:o.snapshot});let g=p&&f!==null&&d!==void 0?{toolCallId:f,locked:d.isLocked(f)||d.isResolved(f),pressed:d.progress!==null&&d.progress.current!==null&&d.progress.current.toolCallId===f?d.progress.current.verdict:null,decide:e=>d.decide(f,e)}:null;return u===`confirmation_required`&&g!==null&&d!==void 0?/* @__PURE__ */ (0,Z.jsx)(SC,{state:u,snapshot:o.snapshot,controller:a,chatDecision:g,tether:d.tether}):u===`proposal_pending`||u===`confirmation_required`?/* @__PURE__ */ (0,Z.jsx)(xC,{state:u,snapshot:o.snapshot,controller:a,chatDecision:g,dockRecord:null}):/* @__PURE__ */ (0,Z.jsx)(kw,{state:u,snapshot:o.snapshot,controller:a,decidedInDock:p})}function Pw(e,t,n){let r=[];e.applied>0&&r.push({text:n.applied(e.applied),bad:!1}),e.rejected>0&&r.push({text:n.rejected(e.rejected),bad:!1});let i=e.failed+t;return i>0&&r.push({text:n.errors(i),bad:!0}),e.superseded>0&&r.push({text:n.superseded(e.superseded),bad:!1}),e.closed>0&&r.push({text:n.closed(e.closed),bad:!1}),e.undone>0&&r.push({text:n.undone(e.undone),bad:!1}),e.loadFailed>0&&r.push({text:n.loadFailed(e.loadFailed),bad:!0}),r}function Fw(e,t){let n=AC(e);switch(n.kind){case`applying`:return t.applying(n.count,n.total);case`done`:return t.done(n.count,n.total);case`remaining`:return t.remaining(n.count,n.total);case`awaiting`:return t.awaiting(n.count);case`proposals`:return t.proposals(n.count)}}function Iw({counts:e,passFailures:t}){let n=$().cards.changeSet.turn;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-tsum`,role:`status`,"aria-live":`polite`,children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:n.title}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.total}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-tsum__head`,children:Fw(e,n)}),Pw(e,t,n).map(e=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-tsum__seg-wrap`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-tsum__sep`,"aria-hidden":`true`,children:`\u00B7`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(`qa-cs-tsum__seg`,e.bad&&`qa-cs-tsum__seg--bad`),children:e.text})]},e.text))]})}function Lw(){return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`})}function Rw({counts:e,running:t,passFailures:n,onRun:r}){let i=$().cards.changeSet.turn,a=t!==null||!kC(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bulk`,children:[n>0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-bulk__warn`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),i.passFailures(n)]}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,className:`qa-chat-card__actions-push`,icon:t===`reject`?/* @__PURE__ */ (0,Z.jsx)(Lw,{}):/* @__PURE__ */ (0,Z.jsx)(kr,{size:14}),disabled:a,"aria-busy":t===`reject`,onClick:()=>r(`reject`),children:i.rejectAll}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,icon:t===`confirm`?/* @__PURE__ */ (0,Z.jsx)(Lw,{}):/* @__PURE__ */ (0,Z.jsx)(Ge,{size:14}),disabled:a,"aria-busy":t===`confirm`,onClick:()=>r(`confirm`),children:i.confirmAll(e.awaiting)})]})}function zw({cards:e}){let t=(0,R.useRef)(/* @__PURE__ */ new Map),[,n]=(0,R.useReducer)(e=>e+1,0),[r,i]=(0,R.useState)(null),a=(0,R.useRef)(null),[o,s]=(0,R.useState)(0),c=(0,R.useRef)(!0);(0,R.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]);let l=(0,R.useMemo)(()=>({register(e,r){t.current.set(e,r),n()},unregister(e){t.current.delete(e)&&n()}}),[]),u=(0,R.useCallback)(async n=>{if(a.current!==null)return;a.current=n,i(n),s(0);let r=0;try{for(let i of e){let e=t.current.get(i.changeSetId);if(e===void 0||e.state!==`confirmation_required`)continue;let a;try{a=n===`confirm`?await e.confirm():await e.reject()}catch(e){queueMicrotask(()=>{throw e}),a=`unknown`}a===`failed`&&(r+=1)}}finally{a.current=null,c.current&&(i(null),s(r))}},[e]),d=TC(e.map(e=>e.changeSetId),t.current),f=e.some(e=>e.mode===`preview_confirm`);return/* @__PURE__ */ (0,Z.jsx)(CC.Provider,{value:l,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-group`,children:[/* @__PURE__ */ (0,Z.jsx)(Iw,{counts:d,passFailures:o}),e.map(e=>/* @__PURE__ */ (0,Z.jsx)(Nw,{projectId:e.projectId,changeSetId:e.changeSetId,chatPreview:e.mode===`preview_confirm`,toolCallId:e.mode===`preview_confirm`?e.toolCallId:null},e.changeSetId)),!f&&!OC(d)&&/* @__PURE__ */ (0,Z.jsx)(Rw,{counts:d,running:r,passFailures:o,onRun:e=>{u(e)}})]})})}function Bw(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.has(n.changeSetId)||t.set(n.changeSetId,n);return[...t.values()]}function Vw({entries:e}){let t=$().cards.changeSet,n=Bw(e.flatMap(e=>{var t;return e.outcome.status===`accepted`?[{...e.outcome.result,toolCallId:((t=e.call)==null?void 0:t.toolCallId)??null}]:[]})),[r]=n;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length===1&&r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(Nw,{projectId:r.projectId,changeSetId:r.changeSetId,chatPreview:r.mode===`preview_confirm`,toolCallId:r.mode===`preview_confirm`?r.toolCallId:null}),n.length>1&&/* @__PURE__ */ (0,Z.jsx)(zw,{cards:n}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`change-set`,resultKind:lm(e.outcome.raw)},e.call===null?`rejected:${String(n)}`:e.call.toolCallId):null)]})}var Hw={id:`change-set`,schema:fm,Card:Vw},Uw=I({entityType:L().min(1),entityId:L().min(1),similarity:Wt().min(0).max(1),name:L(),stepsCount:Wt().int().nonnegative().nullable().optional()}).transform(e=>({entityType:e.entityType,entityId:e.entityId,similarity:e.similarity,name:e.name,stepsCount:e.stepsCount??null})),Ww=I({success:bt(!0),data:I({query:L(),tagMatchWarning:L().nullable().optional(),coveredCount:Wt().int().nonnegative(),partialCount:Wt().int().nonnegative(),covered:F(Uw),partial:F(Uw),gaps:F(L())})}).transform(({data:e})=>({query:e.query,tagMatchWarning:e.tagMatchWarning??null,coveredCount:e.coveredCount,partialCount:e.partialCount,covered:e.covered,partial:e.partial,gaps:e.gaps})),Gw={scenario:`scenario`,checklist_item:`checklist-item`};function Kw({label:e,matches:t}){let n=$().cards.coverage;return t.length===0?null:/* @__PURE__ */ (0,Z.jsx)(Up,{label:e,children:/* @__PURE__ */ (0,Z.jsx)(Ap,{"aria-label":e,children:t.map(e=>{let t=up(Gw[e.entityType]??e.entityType),r=e.name.trim().length===0;return/* @__PURE__ */ (0,Z.jsx)(jp,{icon:t.icon,tileTone:t.tone,name:r?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-coverage-missing`,children:n.unknownItem}):e.name,note:[n.similarity(e.similarity),...e.stepsCount===null?[]:[n.steps(e.stepsCount)]].join(` \u00B7 `)},`${e.entityType}:${e.entityId}`)})})})}function qw({result:e}){let t=$().cards.coverage,n=Q(),r=e.tagMatchWarning!==null;return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:h(Fp,`qa-coverage-card`),tone:r?`warning`:`neutral`,tileTone:r?`warning`:`success`,icon:r?/* @__PURE__ */ (0,Z.jsx)(Ze,{size:16}):/* @__PURE__ */ (0,Z.jsx)(si,{size:16}),title:t.title,caption:t.caption(e.query),"aria-label":t.cardAria(e.query),fold:{title:t.cardAria(e.query),facts:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${t.covered}: ${MC(e.coveredCount,n)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${t.partial}: ${MC(e.partialCount,n)}`})]})},...r?{meta:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`warning`,children:t.tagWarningPill})}:{},children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair__full`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:MC(e.coveredCount,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.covered})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair__part`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:MC(e.partialCount,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.partial})]})]}),e.tagMatchWarning!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-warning`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.tagMatchWarning})]}),/* @__PURE__ */ (0,Z.jsx)(Kw,{label:t.covered,matches:e.covered}),/* @__PURE__ */ (0,Z.jsx)(Kw,{label:t.partial,matches:e.partial}),e.gaps.length>0&&/* @__PURE__ */ (0,Z.jsx)(Up,{label:t.gaps,children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-coverage-gaps`,"aria-label":t.gaps,children:e.gaps.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e})]},`${String(t)}:${e}`))})})]})}function Jw({entries:e}){let t=$().cards.coverage;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(qw,{result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`coverage`,resultKind:lm(e.outcome.raw)},r)})})}var Yw={id:`coverage`,schema:Ww,Card:Jw};function Xw(e,t,n,r){let i=r-n;return t===`eq`&&i>0?bb(e.loadMore,{remaining:i}):e.loadMoreUnknown}function Zw({labels:e,totalForm:t,slideIndex:n,loaderIndex:r,loaded:i,total:a}){if(n===r)return Xw(e,t,i,a);let o=n+1;switch(t){case`eq`:return bb(e.slideAria,{index:o,total:a});case`atLeast`:return bb(e.slideAriaAtLeast,{index:o,total:a});case`unknown`:return bb(e.slideAriaUnknown,{index:o})}}function Qw(e){let{labels:t,totalForm:n,slideIndex:r,loaderIndex:i,total:a}=e;return r===i?Zw(e):n===`eq`?bb(t.goToSlide,{index:r+1,total:a}):Zw(e)}function $w(e,t,n,r){switch(t){case`eq`:return bb(e.loadedOf,{loaded:n,total:r});case`atLeast`:return bb(e.loadedOfAtLeast,{loaded:n,total:r});case`unknown`:return bb(e.loadedOfUnknown,{loaded:n})}}function eT({labels:e,status:t,totalForm:n,loaded:r,total:i}){return t===`loading`?e.loading:t===`error`?e.retry:Xw(e,n,r,i)}function tT({loaded:e,total:t,totalForm:n,status:r,labels:i,onLoadMore:a}){let o=r===`error`,s=r===`loading`,c=$w(i,n,e,t);return/* @__PURE__ */ (0,Z.jsx)(Cp,{bare:!0,className:`qa-ai-chat-collection__more`,role:o?`alert`:void 0,"aria-busy":s?!0:void 0,data:{"data-state":r},children:/* @__PURE__ */ (0,Z.jsx)(Pp,{icon:o?/* @__PURE__ */ (0,Z.jsx)(Qe,{size:28}):/* @__PURE__ */ (0,Z.jsx)(de,{size:28}),title:o?i.loadMoreFailed:c,text:o?c:void 0,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:o?`secondary`:`primary`,size:`sm`,icon:o?/* @__PURE__ */ (0,Z.jsx)(ri,{size:14}):/* @__PURE__ */ (0,Z.jsx)(de,{size:14}),disabled:s,onClick:a,children:eT({labels:i,status:r,totalForm:n,loaded:e,total:t})})})})}function nT({labels:e,totalForm:t,count:n,total:r}){switch(t){case`eq`:return bb(e.loadedMore,{count:n,total:r});case`atLeast`:return bb(e.loadedMoreAtLeast,{count:n,total:r});case`unknown`:return bb(e.loadedMoreUnknown,{count:n})}}function rT({items:e,page:t,onLoadMore:n,keyOf:r,kind:i}){let[a,o]=(0,R.useReducer)((e,t)=>{switch(t.type){case`start`:return{...e,status:`loading`};case`success`:return{pages:[...e.pages,t.result],status:`idle`};case`error`:return{...e,status:`error`}}},{pages:[],status:`idle`}),{entries:s,lastAppended:c}=(0,R.useMemo)(()=>{let t=/* @__PURE__ */ new Set,n=[],i=e=>{let i=0;for(let a of e){let e=r(a);t.has(e)||(t.add(e),n.push({key:e,item:a}),i+=1)}return i};i(e);let o=0;for(let e of a.pages)o=i(e.items);return{entries:n,lastAppended:o}},[e,a.pages,r]),l=a.pages[a.pages.length-1],u=l===void 0?t:l.page,d=s.length;if(u!==null&&u.nextCursor!==null&&n===null)throw Error(`ChatCollection: missing onLoadMore for paged collection "${i}"`);let f=u===null?null:u.total,p=f!==null&&f.relation===`eq`&&f.value<d,m=f===null||p?d:f.value,h=u===null?`eq`:f===null||p?`unknown`:f.relation,g=u===null?null:u.nextCursor,_=(0,R.useRef)(a.status);_.current=a.status;let v=(0,R.useRef)(/* @__PURE__ */ new Set),y=(0,R.useCallback)(()=>{g!==null&&n!==null&&_.current!==`loading`&&(v.current.has(g)||(v.current.add(g),o({type:`start`}),n(g).then(e=>o({type:`success`,result:e}),()=>{v.current.delete(g),o({type:`error`})})))},[g,n]);return{entries:s,loaded:d,total:m,totalForm:h,hasMore:g!==null,status:a.status,lastAppended:c,loadMore:y}}function iT({kind:e,items:t,keyOf:n,renderItem:r,page:i,onLoadMore:a,labels:o,header:s}){let{entries:c,loaded:l,total:u,totalForm:d,hasMore:f,status:p,lastAppended:m,loadMore:h}=rT({items:t,page:i,onLoadMore:a,keyOf:n,kind:e}),g=u>l||d===`unknown`&&f;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--rows`,"data-kind":e,"data-has-more":f?`true`:void 0,role:`group`,"aria-label":o.collectionAria,children:[s,g&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-collection__caption`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__caption-page`,children:$w(o,d,l,u)})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__rows`,children:c.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__row`,children:r(e.item,{index:t,loaded:l,total:u,totalIsExact:d===`eq`,active:!1})},e.key))}),f&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__rows-footer`,children:/* @__PURE__ */ (0,Z.jsx)(tT,{loaded:l,total:u,totalForm:d,status:p,labels:o,onLoadMore:h})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:m>0&&nT({labels:o,totalForm:d,count:m,total:u})})]})}function aT(e,t,n){return t?n.segmentCurrent:e===`resolved`?n.segmentResolved:e===`skipped`?n.segmentSkipped:n.segmentPending}function oT({kind:e,items:t,keyOf:n,renderItem:r,stepper:i,labels:a}){let{activeIndex:o,onActiveIndexChange:s,stateOf:c}=i,l=t.length,u=l-1,d=(0,R.useRef)(/* @__PURE__ */ new Map),f=(e,t)=>{var n;let r;switch(e.key){case`ArrowRight`:r=t+1;break;case`ArrowLeft`:r=t-1;break;case`Home`:r=0;break;case`End`:r=u;break;default:return}r<0||r>u||(e.preventDefault(),(n=d.current.get(r))==null||n.focus())};return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--stepper`,"data-kind":e,role:`group`,"aria-roledescription":a.roleStepper,"aria-label":bb(a.stepperAria,{total:l}),children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__progress`,children:t.map((e,t)=>{let r=c(t),i=t===o;return/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,ref:e=>{if(e!==null)return d.current.set(t,e),()=>{d.current.delete(t)}},className:`qa-ai-chat-collection__step`,"data-state":r,"aria-current":i?`step`:void 0,"aria-label":bb(aT(r,i,a),{index:t+1,total:l}),tabIndex:i?0:-1,onClick:()=>s(t),onKeyDown:e=>f(e,t)},n(e))})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__steps`,children:t.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__step-panel`,"data-index":t,role:`group`,"aria-label":bb(a.stepPosition,{index:t+1,total:l}),hidden:t!==o,children:r(e,{index:t,loaded:l,total:l,totalIsExact:!0,active:t===o})},n(e)))})]})}var sT=.6,cT=`0px 100% 0px 100%`,lT=`{index}`;function uT(e,t){let n=e.indexOf(lT);if(n===-1)return{lead:bb(e,t),tail:``};let r=n+7;return{lead:bb(e.slice(0,r),t),tail:bb(e.slice(r),t)}}function dT({activeIndex:e,loaded:t,total:n,totalForm:r,slideCount:i,loaderIndex:a,labels:o,onGoTo:s}){let c=i-1,l=e+1,{lead:u,tail:d}=e===a?{lead:o.positionMore,tail:``}:r===`eq`?uT(o.counter,{index:l,total:n}):uT(o.counterUnknown,{index:l});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__controls`,onKeyDown:t=>{if(t.target instanceof HTMLInputElement)return;let n;switch(t.key){case`ArrowRight`:n=e+1;break;case`ArrowLeft`:n=e-1;break;case`Home`:n=0;break;case`End`:n=c;break;default:return}n<0||n>c||(t.preventDefault(),s(n,`live`))},children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-collection__counter`,children:[u,d!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__counter-total`,children:d})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__indicator`,children:/* @__PURE__ */ (0,Z.jsx)(fT,{activeIndex:e,slideCount:i,loaded:t,total:n,totalForm:r,loaderIndex:a,labels:o,onGoTo:s})}),/* @__PURE__ */ (0,Z.jsxs)(ze,{children:[/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:o.previous,children:/* @__PURE__ */ (0,Z.jsx)(j,{icon:/* @__PURE__ */ (0,Z.jsx)(Pn,{size:16}),className:`qa-ai-chat-collection__prev`,disabled:e===0,onClick:()=>s(e-1,`live`)})}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:o.next,children:/* @__PURE__ */ (0,Z.jsx)(j,{icon:/* @__PURE__ */ (0,Z.jsx)(je,{size:16}),className:`qa-ai-chat-collection__next`,disabled:e>=c,onClick:()=>s(e+1,`live`)})})]})]})}function fT({activeIndex:e,slideCount:t,loaded:n,total:r,totalForm:i,loaderIndex:a,labels:o,onGoTo:s}){return t<=6?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__dots`,children:Array.from({length:t},(t,c)=>/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-collection__dot`,"aria-label":Qw({labels:o,totalForm:i,slideIndex:c,loaderIndex:a,loaded:n,total:r}),"aria-current":c===e?`true`:void 0,onClick:()=>s(c,`live`)},c))}):/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`range`,className:`qa-ai-chat-collection__strip`,min:1,max:t,step:1,value:e+1,"aria-label":o.scrubberAria,"aria-valuetext":Zw({labels:o,totalForm:i,slideIndex:e,loaderIndex:a,loaded:n,total:r}),onChange:e=>s(Number(e.target.value)-1,`control`)})}function pT(e,t){if(t!==null)return e.some(e=>e.index===t&&e.ratio>=.6)?t:null;let n=null;for(let t of e)t.ratio<.6||(n===null||t.ratio>n.ratio)&&(n=t);return n===null?null:n.index}function mT(e){let t=Number(e.dataset.index);if(!Number.isInteger(t))throw Error(`ChatCollection: slide with no numeric data-index ("${String(e.dataset.index)}")`);return t}function hT({viewportRef:e,trackRef:t}){let[n,r]=(0,R.useState)(0),[i,a]=(0,R.useState)(null),o=(0,R.useRef)(0),s=(0,R.useRef)(0),c=(0,R.useRef)(/* @__PURE__ */ new Set),l=(0,R.useRef)(null),u=(0,R.useRef)(null),d=(0,R.useRef)(null);s.current=n;let f=(0,R.useCallback)(()=>{u.current=null,d.current!==null&&(clearTimeout(d.current),d.current=null)},[]),p=(0,R.useCallback)(e=>{var t;if(e!==null)return c.current.add(e),(t=l.current)==null||t.observe(e),()=>{var t;c.current.delete(e),(t=l.current)==null||t.unobserve(e)}},[]),m=(0,R.useCallback)(e=>{for(let t of c.current)if(mT(t)===e)return t;return null},[]);return(0,R.useEffect)(function(){let t=e.current;if(t===null)return;let n=new IntersectionObserver(e=>{let t=[];for(let n of e){let e=n.target;e instanceof HTMLLIElement&&c.current.has(e)&&t.push({index:mT(e),ratio:n.intersectionRatio})}let n=pT(t,u.current);if(n===null||(u.current!==null&&f(),n===s.current))return;let i=m(s.current),l=m(n),d=document.activeElement,p=i!==null&&l!==null&&d!==null&&i.contains(d)?l:null;p!==null&&p.focus({preventScroll:!0}),a(p===null?{seq:++o.current,index:n}:null),s.current=n,r(n)},{root:t,threshold:[sT]});l.current=n;for(let e of c.current)n.observe(e);return()=>{l.current=null,n.disconnect()}},[e,f,m]),(0,R.useEffect)(()=>f,[f]),{activeIndex:n,registerSlide:p,goToSlide:(0,R.useCallback)((n,i)=>{let c=e.current,l=t.current,p=m(n);if(c===null||l===null||p===null)return;let h=Math.abs(n-s.current),g=p.offsetLeft-l.offsetLeft;u.current=n,s.current=n,r(n),h>1?c.scrollTo({left:g,behavior:`instant`}):c.scrollTo({left:g}),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(f,600),i.announcer===`slide`&&p.focus({preventScroll:!0}),a(i.announcer===`live`?{seq:++o.current,index:n}:null)},[e,t,f,m]),announcement:i}}function gT(e,t,n){return e<t||n.has(e)}function _T({viewportRef:e}){let[t,n]=(0,R.useState)(()=>/* @__PURE__ */ new Set),r=(0,R.useRef)(/* @__PURE__ */ new Set),i=(0,R.useRef)(null),a=(0,R.useCallback)(e=>{var t;if(e!==null)return r.current.add(e),(t=i.current)==null||t.observe(e),()=>{var t;r.current.delete(e),(t=i.current)==null||t.unobserve(e)}},[]);return(0,R.useEffect)(function(){let t=e.current;if(t===null)return;let a=new IntersectionObserver(e=>{let t=[];for(let n of e){if(!n.isIntersecting)continue;let e=Number(n.target.dataset.index);Number.isInteger(e)&&(t.push(e),a.unobserve(n.target))}t.length!==0&&n(e=>{let n=new Set(e);for(let e of t)n.add(e);return n})},{root:t,rootMargin:cT});i.current=a;for(let e of r.current)a.observe(e);return()=>{i.current=null,a.disconnect()}},[e]),{registerSlide:a,isMounted:(0,R.useCallback)(e=>gT(e,3,t),[t])}}function vT({kind:e,items:t,keyOf:n,renderItem:r,page:i,onLoadMore:a,labels:o,header:s}){let c=(0,R.useRef)(null),l=(0,R.useRef)(null),{entries:u,loaded:d,total:f,totalForm:p,hasMore:m,status:h,lastAppended:g,loadMore:_}=rT({items:t,page:i,onLoadMore:a,keyOf:n,kind:e}),v=m?u.length+1:u.length,y=f>d||m,{activeIndex:b,registerSlide:x,goToSlide:S,announcement:C}=hT({viewportRef:c,trackRef:l}),{registerSlide:w,isMounted:T}=_T({viewportRef:c}),E=(0,R.useCallback)(e=>{let t=x(e),n=w(e);return()=>{t==null||t(),n==null||n()}},[x,w]),ee=u.length,D=m?ee:null;(0,R.useEffect)(function(){m&&b===ee&&h===`idle`&&_()},[m,b,ee,h,_]);let O=v-1,te=e=>{if(e.target!==e.currentTarget)return;let t;switch(e.key){case`ArrowRight`:t=b+1;break;case`ArrowLeft`:t=b-1;break;case`Home`:t=0;break;case`End`:t=O;break;default:return}t<0||t>O||(e.preventDefault(),S(t,{announcer:`slide`}))},k=(e,t,n,r)=>{let i=e===b;return/* @__PURE__ */ (0,Z.jsx)(`li`,{ref:E,"data-index":e,"data-active":i?`true`:void 0,className:`qa-ai-chat-collection__slide${r===void 0?``:` ${r}`}`,role:`group`,"aria-roledescription":o.roleSlide,"aria-label":Zw({labels:o,totalForm:p,slideIndex:e,loaderIndex:D,loaded:d,total:f}),tabIndex:i?0:-1,onKeyDown:te,onClick:i?void 0:()=>S(e,{announcer:`slide`}),children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__slide-content`,inert:!i,children:n})},t)};return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--carousel`,"data-kind":e,"data-has-more":m?`true`:void 0,children:[(s!==void 0||y)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__head`,children:[s,y&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__head-count`,children:$w(o,p,d,f)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:c,className:`qa-ai-chat-collection__viewport`,role:`group`,"aria-roledescription":o.roleCarousel,"aria-label":o.collectionAria,children:/* @__PURE__ */ (0,Z.jsxs)(`ul`,{ref:l,className:`qa-ai-chat-collection__track`,children:[u.map((e,t)=>k(t,e.key,T(t)?r(e.item,{index:t,loaded:d,total:f,totalIsExact:p===`eq`,active:t===b}):/* @__PURE__ */ (0,Z.jsx)(yT,{}))),m&&k(ee,`${e}:load-more`,/* @__PURE__ */ (0,Z.jsx)(tT,{loaded:d,total:f,totalForm:p,status:h,labels:o,onLoadMore:_}),`qa-ai-chat-collection__slide--more`)]})}),/* @__PURE__ */ (0,Z.jsx)(dT,{activeIndex:b,loaded:d,total:f,totalForm:p,slideCount:v,loaderIndex:D,labels:o,onGoTo:(e,t)=>S(e,{announcer:t})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:C!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:Zw({labels:o,totalForm:p,slideIndex:C.index,loaderIndex:D,loaded:d,total:f})},C.seq)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:g>0&&nT({labels:o,totalForm:p,count:g,total:f})})]})}function yT(){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__placeholder`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--head`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--title`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--line`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--meta`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--actions`})]})}function bT(e){return e.mode===`stepper`?/* @__PURE__ */ (0,Z.jsx)(oT,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,stepper:e.stepper,labels:e.labels}):e.mode===`rows`?/* @__PURE__ */ (0,Z.jsx)(iT,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,page:e.page,onLoadMore:e.onLoadMore,labels:e.labels,header:e.header}):/* @__PURE__ */ (0,Z.jsx)(vT,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,page:e.page,onLoadMore:e.onLoadMore,labels:e.labels,header:e.header})}function xT(e,t){let[n]=t.items;if(n===void 0)throw Error(`ChatCollection: empty collection for kind "${e.kind}"`);return t.items.length<2?e.renderSingle(n):e.mode===`rows`?/* @__PURE__ */ (0,Z.jsx)(bT,{mode:`rows`,kind:e.kind,items:t.items,keyOf:e.keyOf,renderItem:e.renderItem,labels:e.labels,page:t.page,onLoadMore:t.onLoadMore,header:t.header}):/* @__PURE__ */ (0,Z.jsx)(bT,{mode:`carousel`,kind:e.kind,items:t.items,keyOf:e.keyOf,renderItem:e.renderItem,labels:e.labels,page:t.page,onLoadMore:t.onLoadMore,header:t.header})}function ST(e,t,n){return{...e,collectionAria:t.collectionAria(n),roleCarousel:t.roleCarousel,roleSlide:t.roleSlide,previous:t.previous,next:t.next,goToSlide:t.goToSlide}}function CT({items:e}){let t=$().cards.common,n=(0,R.useId)(),[r,i]=(0,R.useState)(!1),a=(0,R.useRef)(null),o=(0,R.useRef)(null),s=(0,R.useRef)([]);(0,R.useEffect)(()=>{var e;if(!r)return;let t=e=>{a.current!==null&&!a.current.contains(e.target)&&i(!1)};return document.addEventListener(`pointerdown`,t),(e=s.current.find(e=>e!==null&&!e.disabled))==null||e.focus(),()=>document.removeEventListener(`pointerdown`,t)},[r]);let c=()=>{var e;i(!1),(e=o.current)==null||e.focus()};return/* @__PURE__ */ (0,Z.jsxs)(`span`,{ref:a,className:`qa-card-kit__more qa-card-kit__only-compact`,children:[/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:o,type:`button`,className:`qa-card-kit__more-button`,"aria-haspopup":`menu`,"aria-expanded":r,"aria-controls":r?n:void 0,"aria-label":t.moreActions,onClick:()=>i(e=>!e),onKeyDown:e=>{e.key===`ArrowDown`&&!r&&(e.preventDefault(),i(!0))},children:/* @__PURE__ */ (0,Z.jsx)(bn,{size:16,"aria-hidden":`true`})}),r&&/* @__PURE__ */ (0,Z.jsx)(`div`,{id:n,className:`qa-card-kit__more-menu`,role:`menu`,onKeyDown:e=>{let t=s.current.filter(e=>e!==null&&!e.disabled),n=t.findIndex(e=>e===document.activeElement),r=e.key===`ArrowDown`?t[(n+1)%t.length]:e.key===`ArrowUp`?t[(n-1+t.length)%t.length]:e.key===`Home`?t[0]:e.key===`End`?t[t.length-1]:void 0;if(e.key===`Escape`){e.preventDefault(),c();return}r!==void 0&&(e.preventDefault(),r.focus())},children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:e=>{s.current[t]=e},type:`button`,role:`menuitem`,tabIndex:-1,disabled:e.disabled===!0,onClick:()=>{c(),e.onSelect()},children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),e.label]},e.id))})]})}var wT=6e4;function TT(e,t,n){let r=Math.max(0,t-Date.parse(e));return r>=wT?QC(e,t,n):new Intl.RelativeTimeFormat(n,{numeric:`auto`}).format(-Math.round(r/1e3),`second`)}var ET=Gt();function DT(e){let{jobStatus:t}=Zf(),n=ir(e)===`active`;return(0,R.useEffect)(()=>n?t.watch(e):void 0,[t,e,n]),(0,R.useSyncExternalStore)(e=>t.subscribe(e),()=>t.latest(e.agentJobId))??e}var OT={active:`info`,success:`success`,error:`error`,neutral:`muted`},kT={active:`info`,success:`success`,error:`error`,neutral:`neutral`};function AT({found:e}){let t=$().cards.jobStatus,n=Q(),r=[{key:`screens`,value:e.screens,label:t.found.screens(e.screens)},{key:`edges`,value:e.edges,label:t.found.edges(e.edges)},{key:`notes`,value:e.notes,label:t.found.notes(e.notes)},{key:`unexplored`,value:e.unexplored,label:t.found.unexplored(e.unexplored)}];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__found`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__found-caption`,children:t.foundCaption}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-job-card__counters`,children:r.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:MC(e.value,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e.label})]},e.key))})]})}function jT({view:e}){let t=$().cards.jobStatus;if(e.terminal===null)return null;let{reason:n,message:r}=e.terminal;return n===null&&r===null?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`qa-job-card__terminal`,e.stage===`failed`&&`qa-job-card__terminal--error`),children:[n!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.terminalPrefix}),t.terminalReason[n]]}),r!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__terminal-message`,children:r})]})}function MT({payload:e}){let t=$().cards.jobStatus,n=Q(),{http:r,project:i,jobStatus:a}=Zf(),o=DT(e.view),[s,c]=(0,R.useState)({status:`idle`}),l=rr(o.stage),u=l.blockState===`active`,d=ar(o),f=t.kind[o.kind],p=s.status===`confirming`?s.action:null,m=s.status===`sending`?s.action:null,g=o.deeplink===null||i===null?null:rp(i.number,o.deeplink),_=e=>{c({status:`sending`,action:e}),r.request({method:`POST`,path:Gn.agentJobCommand.path(o.agentJobId,e),schema:ET}).then(()=>c({status:`idle`}),t=>{let n=t instanceof Yn&&t.status===409;c({status:`failed`,action:e,conflict:n}),n||queueMicrotask(()=>{throw t})}).finally(()=>a.refresh(o.agentJobId))},v=t.cancelConfirm[o.kind],y=o.status===`queued`?v.bodyQueued:v.bodyKept!==null&&o.degraded===null&&o.atlas!==null?`${v.body} ${v.bodyKept}`:v.body,b=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[p===`cancel`&&/* @__PURE__ */ (0,Z.jsxs)(V_,{question:v.question,body:y,children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,onClick:()=>c({status:`idle`}),children:v.keep}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(xr,{size:14}),onClick:()=>_(`cancel`),children:v.confirm})]}),p===`kill`&&/* @__PURE__ */ (0,Z.jsxs)(V_,{question:t.killConfirm.question,body:t.killConfirm.body[o.kind],children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,onClick:()=>c({status:`idle`}),children:t.killConfirm.keep}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ei,{size:14}),onClick:()=>_(`kill`),children:t.killConfirm.confirm})]}),s.status===`failed`&&(s.conflict?/* @__PURE__ */ (0,Z.jsx)(B_,{tone:`warning`,children:t.failed.conflict}):/* @__PURE__ */ (0,Z.jsx)(B_,{children:s.action===`cancel`?t.failed.cancel[o.kind]:t.failed.kill}))]}),x=u&&d.cancel,S=d.kill,C=p===null&&(g!==null||x||S)?/* @__PURE__ */ (0,Z.jsxs)(Np,{children:[g!==null&&i!==null&&/* @__PURE__ */ (0,Z.jsx)(zp,{path:g,label:t.openMap,accessibleName:t.openMapAria(i.name)}),x&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(xr,{size:14}),loading:m===`cancel`,disabled:m!==null,onClick:()=>c({status:`confirming`,action:`cancel`}),children:t.cancel[o.kind]}),S&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ei,{size:14}),loading:m===`kill`,disabled:m!==null,onClick:()=>c({status:`confirming`,action:`kill`}),children:t.kill})}),/* @__PURE__ */ (0,Z.jsx)(CT,{items:[{id:`kill`,label:t.kill,icon:/* @__PURE__ */ (0,Z.jsx)(ei,{}),disabled:m!==null,onSelect:()=>c({status:`confirming`,action:`kill`})}]})]})]}):void 0,w=o.machine.agentName.trim();return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:h(Fp,`qa-job-card`,u&&p===null&&`qa-card-kit--live`),tone:o.stage===`failed`?`error`:`neutral`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:16}),tileTone:OT[l.tone],title:f,caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__id`,children:o.agentJobId.slice(0,8)}),meta:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:kT[l.tone],role:`status`,...u?{className:`qa-card-kit__pill-live`}:{},children:t.stage[o.stage]}),"aria-label":t.cardAria(f),"aria-busy":m!==null||void 0,sections:b,footer:C,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__lines`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(Fn,{"aria-hidden":`true`}),w.length>0?w:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__missing`,children:t.machineMissing})]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(hr,{"aria-hidden":`true`}),o.lastActivityAt===null?t.activityNone:t.activity(TT(o.lastActivityAt,Date.parse(o.readAt),n))]})]}),o.degraded===null?o.atlas!==null&&/* @__PURE__ */ (0,Z.jsx)(AT,{found:o.atlas.found}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__degraded`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{size:15,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.degraded})]}),/* @__PURE__ */ (0,Z.jsx)(jT,{view:o})]})}function NT(e){return/* @__PURE__ */ (0,Z.jsx)(MT,{payload:e})}function PT(e,t){return{kind:`job`,mode:`carousel`,keyOf:e=>e.view.agentJobId,renderItem:NT,renderSingle:NT,labels:ST(e.collection,e.jobStatus.collection,t)}}function FT({entries:e}){let t=$().cards,n=e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]),r=e.flatMap(e=>e.outcome.status===`rejected`?[e.outcome.raw]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&xT(PT(t,n.length),{items:n,page:null,onLoadMore:null}),r.map((e,n)=>/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.jobStatus.unsupported.title,body:t.jobStatus.unsupported.body,family:`job-status`,resultKind:lm(e)},`rejected:${String(n)}`))]})}var IT={id:`job-status`,schema:Pe,Card:FT},LT=I({cardKind:bt(`metric_card`),metric:le,drillTarget:L().nullable()}),RT=I({cardKind:bt(`finding_card`),finding:fe}),zT=I({cardKind:bt(`stability_row_card`),row:We,basis:nt}),BT=I({cardKind:bt(`scenario_stability_card`),detail:ne}),VT=I({cardKind:bt(`failure_breakdown_card`),entity:he,causes:F(v),totalFailures:Wt().int().min(0),mappingVersion:L()}),HT=I({cardKind:bt(`weak_spot_feature_card`),row:$e}),UT=I({cardKind:bt(`weak_spot_page_card`),row:Me,unassigned:Ht()}),WT=I({cardKind:bt(`trend_card`),trend:t}),GT=I({cardKind:bt(`hotspot_card`),page:he.nullable(),counters:Je,lastPassedDate:Rt().nullable()}),KT=mt(`cardKind`,[LT,RT,zT,BT,VT,HT,UT,WT,GT]),qT={resultKind:bt(`report_cards`),scope:I({projectId:jt()}),asOf:Nt(),definitionVersions:Pt(L(),L()),cards:F(KT),truncated:Ht(),total:Wt().int().min(0).nullable().optional()},JT=mt(`basisKind`,[I({...qT,basisKind:bt(`window`),window:Te}),I({...qT,basisKind:bt(`last_runs`),basis:nt})]),YT=/* @__PURE__ */ `pass_rate.runs_total.runs_passed.runs_failed.runs_evaluated.runs_infra.runs_cancelled.runs_abandoned.run_duration_sum_ms.run_duration_count.run_duration_avg.page_steps_executed.page_steps_passed.page_steps_failed.page_steps_healed.page_step_success_rate.page_healed_rate.step_failures.run_failures.bugs_opened.bugs_closed.open_bugs.covered_pages.total_pages.page_coverage_pct.unstable_scenarios`.split(`.`);function XT(e){return YT.includes(e)}var ZT=[`pass_rate`,`runs_total`,`unstable_scenarios`,`open_bugs`,`page_coverage_pct`];function QT(e){return ZT.includes(e)}function $T(e,t,n,r){if(e===null)return{magnitude:`\u2014`,unit:null};let i=r.metric.unit[t.unit];return{magnitude:jC(e,t.precision,n),unit:i===``?null:i}}function eE(e,t,n,r){let i=$T(e,t,n,r);return i.unit===null?i.magnitude:`${i.magnitude}\u00A0${i.unit}`}function tE(e,t,n){let{previous:r,value:i,format:a}=e;if(r===null||r.insufficient||r.value===null||i===null)return null;let o=i-r.value,s=NC(o,a.precision,t),c=a.unit===`percent`,l=n.metric.unit[a.unit],u=c?n.metric.deltaPoints(s):l===``?s:`${s}\u00A0${l}`,d=o>0?`up`:o<0?`down`:`flat`;return o===0||a.goodDirection===`none`?{text:u,direction:d,tone:`neutral`,inPoints:c}:{text:u,direction:d,tone:(a.goodDirection===`up`?o>0:o<0)?`good`:`bad`,inPoints:c}}function nE(e,t){return XT(e)?{text:t.metric.name[e],missing:!1}:{text:t.metric.missingName,missing:!0}}function rE(e,t,n){return QT(e)?n.metric.denominator[e](t):n.metric.denominator.generic(t)}function iE(e,t){switch(e.kind){case`window`:return t.window[e.window];case`runs`:return t.basisRuns(e.basis.maxRuns,e.basis.maxAgeDays);case`currentState`:return t.currentState;case`noWindow`:return t.noWindow}}function aE(e,t){return e.trim().length===0?{text:t,missing:!0}:{text:e,missing:!1}}function oE(e,t){let n=t.weakSpots.priority;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:e}var sE={status:`incomplete_evidence`};function cE(e,t,n){return`${jC(e,0,t)}\u00A0${n.metric.unit.percent}`}function lE(e,t){let n=e.evidence.dominantCause;return n===void 0?``:t.finding.dominantCause(t.cause[n.group],n.count,n.totalFailures)}function uE(e,t=``){return{status:`stated`,before:e.before,after:`${e.after}${t}`}}function dE(e,t,n){let{evidence:r}=e,i=n.finding.sentence;switch(e.ruleId){case`uncovered_high_priority`:{var a;let e=r.values.uncoveredPages,o=r.values.totalPages,s=(a=r.labels)==null?void 0:a.priority;return e===void 0||o===void 0||s===void 0?sE:uE(i.uncovered_high_priority({priority:oE(s,n).toLocaleLowerCase(t),uncovered:e,total:o}))}case`consistently_failing_scenario`:{let t=r.values.consecutiveFails;return t===void 0?sE:uE(i.consistently_failing_scenario({count:t}),lE(e,n))}case`low_page_success`:{let a=r.values.page_step_success_rate;return a===void 0?sE:uE(i.low_page_success({rate:cE(a,t,n),executions:r.denominator,threshold:cE(r.threshold,t,n)}),lE(e,n))}case`high_healed_rate`:{let e=r.values.page_healed_rate;return e===void 0?sE:uE(i.high_healed_rate({rate:cE(e,t,n),threshold:cE(r.threshold,t,n)}))}case`stale_page`:{let e=r.values.daysSinceLastExecution;return e===void 0?sE:uE(i.stale_page({days:e,threshold:r.threshold}))}case`open_bugs_no_verification`:{let e=r.values.criticalBugs,t=r.values.highBugs;if(e===void 0||t===void 0||r.window===null)return sE;let a=n.window[r.window];return uE(e>0?i.open_bugs_no_verification_critical({count:e,window:a}):i.open_bugs_no_verification_high({count:t,window:a}))}default:return{status:`unknown_rule`}}}function fE(e){let{project:t}=Zf();return e===null||t===null?null:ap(e,t.number)}function pE({name:e}){let t=$().cards.common,n=aE(e,t.missingName);return/* @__PURE__ */ (0,Z.jsx)(Ep,{missing:n.missing,children:n.text})}function mE({delta:e}){let t=$().cards.report.metric,n=`${t.deltaHint}${e.inPoints?t.deltaPointsHint:``}`;return/* @__PURE__ */ (0,Z.jsxs)(Lp,{tip:n,className:h(`qa-report-delta`,`qa-report-delta--${e.tone}`),children:[e.direction===`up`&&/* @__PURE__ */ (0,Z.jsx)(br,{"aria-hidden":`true`}),e.direction===`down`&&/* @__PURE__ */ (0,Z.jsx)(_r,{"aria-hidden":`true`}),e.text]})}function hE({finding:e}){let t=$().cards.report,n=Q(),{evidence:r}=e,i=r.window===null?t.noWindow:t.windowShort[r.window],a=r.window===null?t.noWindow:t.window[r.window],o=t.finding.evidenceRows,s=/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-evidence-tip`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.denominator}: ${MC(r.denominator,n)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.window}: ${a}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.threshold}: ${MC(r.threshold,n)}`}),Object.entries(r.values).map(([e,t])=>/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${e}: ${MC(t,n)}`},e)),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${o.rule}: ${e.ruleId} \u00B7 ${e.ruleVersion}`})]});return/* @__PURE__ */ (0,Z.jsxs)(Lp,{tip:s,className:`qa-report-evidence`,children:[/* @__PURE__ */ (0,Z.jsx)(M,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${t.finding.evidenceAria}: `}),t.finding.evidence(r.denominator,i,r.threshold)]})}function gE({date:e}){let t=$().cards.report.lastPassed,n=Q();if(e===null)return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-warnink`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`}),t.never]});let r=GC(e),i=r<=0?t.today:r===1?t.yesterday:t.daysAgo(r);return/* @__PURE__ */ (0,Z.jsx)(Lp,{tip:VC(e,n),children:i})}function _E({passed:e,executed:t}){let n=$().cards.report,r=Q(),i=PC(e,t);return i===null?/* @__PURE__ */ (0,Z.jsx)(Rp,{value:`\u2014`,base:n.weakSpots.noExecutions}):/* @__PURE__ */ (0,Z.jsx)(Rp,{value:`${MC(i,r)} ${n.metric.unit.percent}`,base:n.weakSpots.ofSteps(e,t)})}function vE(e){return e.basisKind===`window`?{kind:`window`,window:e.window.label}:{kind:`runs`,basis:e.basis}}function yE(e,t){switch(e.cardKind){case`metric_card`:return e.metric.windowScoped?{kind:`window`,window:e.metric.window.label}:{kind:`currentState`};case`trend_card`:return{kind:`window`,window:e.trend.window.label};case`stability_row_card`:return{kind:`runs`,basis:e.basis};case`scenario_stability_card`:return{kind:`runs`,basis:e.detail.basis};case`finding_card`:return e.finding.evidence.window===null?{kind:`noWindow`}:{kind:`window`,window:e.finding.evidence.window};case`failure_breakdown_card`:case`weak_spot_feature_card`:case`weak_spot_page_card`:case`hotspot_card`:return t}}function bE(e,t){switch(e.cardKind){case`metric_card`:return e.metric.asOf;case`trend_card`:return e.trend.asOf;case`finding_card`:return e.finding.asOf;case`scenario_stability_card`:return e.detail.asOf;case`stability_row_card`:case`failure_breakdown_card`:case`weak_spot_feature_card`:case`weak_spot_page_card`:case`hotspot_card`:return t}}function xE(e){let{total:t}=e;return typeof t==`number`&&t>e.cards.length?{kind:`shownOfTotal`,shown:e.cards.length,total:t}:e.truncated?{kind:`truncated`}:null}function SE(e){let t=[],n=[],r=[];for(let i of e){let{call:e,outcome:a}=i;if(a.status===`rejected`){n.push({toolCallId:e===null?null:e.toolCallId,raw:a.raw});continue}if(e===null){n.push({toolCallId:null,raw:a.result});continue}let o=a.result,s={...e.title!==void 0&&{source:e.title},basis:vE(o),asOf:o.asOf,definitionVersions:o.definitionVersions},c=xE(o);o.cards.length===0&&c!==null&&r.push({toolCallId:e.toolCallId,note:c}),o.cards.forEach((n,r)=>{t.push({card:n,envelope:{toolCallId:e.toolCallId,toolName:e.toolName,caption:s},indexInEnvelope:r,envelopeNote:r===o.cards.length-1?c:null})})}return{slides:t,rejected:n,cardlessNotes:r}}function CE(e,t){return e.kind===`shownOfTotal`?t.envelope.shownOfTotal(e.shown,e.total):t.envelope.truncated}function wE({slide:e,icon:t,label:n,versions:r,pill:i,notes:a=[],sections:o,footer:s,children:c}){var l;let u=$(),d=u.cards.report,f=Q(),{caption:p}=e.envelope,m=iE(yE(e.card,p.basis),d),h=bE(e.card,p.asOf),g=d.asOf(zC(h,f)),_=r??Object.entries(p.definitionVersions).map(([e,t])=>d.stamp.envelope(e,t)),v=((l=p.source)==null?void 0:l[f])??u.shell.transcript.toolCall,y=d.stamp.source(v,_),b=e.envelopeNote===null?null:CE(e.envelopeNote,d),x=[...a,...b===null?[]:[/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:b},`envelope`)]];return/* @__PURE__ */ (0,Z.jsx)(Cp,{className:`${Fp} qa-report-card`,icon:t,title:d.title[e.card.cardKind],"aria-label":n,fold:{title:n,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:`${v} \u00B7 ${m}`})},caption:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-card__env`,children:v}),` \u00B7 ${m}`,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:` \u00B7 ${g}`})]}),meta:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[i,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-wide`,children:/* @__PURE__ */ (0,Z.jsx)(Lp,{tip:y,children:/* @__PURE__ */ (0,Z.jsx)(`time`,{dateTime:h,children:g})})})]}),...x.length===0?{}:{note:/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:x})},...o===void 0?{}:{sections:o},...s===void 0?{}:{footer:s},children:c})}var TE={critical:{tone:`error`},high:{tone:`warning`,className:`qa-report-pill--priority`},watch:{tone:`neutral`}};function EE({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{finding:a}=t,o=aE(a.entity.name,r.missingName),s=dE(a,i,n),c=fE(a.drillTarget),l=n.finding.open[a.entity.type],u=TE[a.severity];return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Hr,{size:16}),label:`${n.title.finding_card}: ${o.text}`,versions:[n.stamp.rule(a.ruleId,a.ruleVersion)],pill:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:u.tone,...u.className===void 0?{}:{className:u.className},children:n.finding.severity[a.severity]}),footer:c===null?void 0:/* @__PURE__ */ (0,Z.jsx)(Np,{children:/* @__PURE__ */ (0,Z.jsx)(zp,{path:c,label:l,accessibleName:n.openAria(l,o.text)})}),children:[s.status===`stated`?/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-report-finding`,children:[s.before,/* @__PURE__ */ (0,Z.jsx)(`b`,{className:o.missing?`qa-report-finding__missing`:void 0,children:o.text}),s.after]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Dp,{children:s.status===`unknown_rule`?n.finding.unknownRule:n.finding.incompleteEvidence}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-detail`,children:n.finding.ruleIdDetail(a.ruleId)})]}),/* @__PURE__ */ (0,Z.jsx)(hE,{finding:a})]})}var DE=300,OE=44,kE=4;function AE({points:e,ariaLabel:t}){let n=$().cards.report,r=Q(),i=e.flatMap(e=>e.value===null?[]:[e.value]),a=Math.min(...i),o=Math.max(...i)-a,s=t=>e.length>1?kE+t*292/(e.length-1):DE/2,c=e=>40-(o===0?.5:(e-a)/o)*36,l=e.map((e,t)=>e.value===null?null:{x:s(t),y:c(e.value)}),u=l.filter(e=>e!==null),d=u[0],f=u[u.length-1];if(d===void 0||f===void 0)throw Error(`Sparkline: rendered for a series with no value \u2014 the caller states that case`);let p=``,m=!1;for(let e of l){if(e===null){m=!1;continue}p+=`${m?`L`:`M`}${e.x.toFixed(1)} ${e.y.toFixed(1)} `,m=!0}let h=`M${d.x.toFixed(1)} ${String(OE)} ${u.map(e=>`L${e.x.toFixed(1)} ${e.y.toFixed(1)}`).join(` `)} L${f.x.toFixed(1)} ${String(OE)} Z`,g=e[0],_=e[e.length-1];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-spark`,children:[/* @__PURE__ */ (0,Z.jsxs)(`svg`,{className:`qa-report-spark__svg`,viewBox:`0 0 ${String(DE)} ${String(OE)}`,role:`img`,"aria-label":t,children:[/* @__PURE__ */ (0,Z.jsx)(`path`,{className:`qa-report-spark__area`,d:h}),/* @__PURE__ */ (0,Z.jsx)(`path`,{className:`qa-report-spark__line`,d:p.trim()}),e.map((e,t)=>e.value===null?/* @__PURE__ */ (0,Z.jsx)(`circle`,{className:`qa-report-spark__gap`,cx:s(t).toFixed(1),cy:42,r:2,children:/* @__PURE__ */ (0,Z.jsx)(`title`,{children:n.metric.sparkGap(HC(e.date,r),e.denominator)})},e.date):null),/* @__PURE__ */ (0,Z.jsx)(`circle`,{className:`qa-report-spark__last`,cx:f.x.toFixed(1),cy:f.y.toFixed(1),r:3.5})]}),g!==void 0&&_!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-spark__axis`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:HC(g.date,r)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:HC(_.date,r)})]})]})}function jE(e,t){return h(`qa-report-strip__cell`,`qa-report-strip__cell--${e===`P`?`passed`:e===`F`?`failed`:`unknown`}`,t&&`qa-report-strip__cell--pre`)}function ME({strip:e,preWatermarkStrip:t,passes:n,fails:r}){let i=$().cards.report.stability,a=Q(),o=t===null?[]:[...t],s=i.stripAria(n,r,n+r)+(o.length===0?``:i.stripAriaBeforeChange(o.length));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-strip`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-strip__cells`,role:`group`,"aria-label":s,children:[o.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:jE(e,!0),"aria-hidden":`true`},`pre-${String(t)}`)),o.length>0&&/* @__PURE__ */ (0,Z.jsx)(Lp,{tip:i.beforeChange,className:`qa-report-strip__divider`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:i.beforeChange})}),[...e].map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:jE(e,!1),"aria-hidden":`true`},`run-${String(t)}`))]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-strip__count`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-strip__ok`,children:`${MC(n,a)}\u2713`}),` `,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-strip__bad`,children:`${MC(r,a)}\u2717`})]})]})}function NE(e){return{"--qa-report-cause":`var(--color-cause-${e.replace(/_/g,`-`)})`}}function PE({group:e}){let t=$().cards.report;return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(`qa-report-cause`,e===`unrecognized`&&`qa-report-cause--unrecognized`),style:NE(e),children:t.cause[e]})}function FE({causes:e,countLabel:t}){let n=Math.max(...e.map(e=>e.count));return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-report-causes`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{style:NE(e.group),children:[/* @__PURE__ */ (0,Z.jsx)(PE,{group:e.group}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-causes__bar`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`i`,{style:{"--qa-report-cause-share":`${String(n===0?0:Math.round(e.count/n*100))}%`}})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-causes__count`,children:t(e.count)})]},e.group))})}function IE({causes:e}){let t=$().cards.report.stability;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-report-rawcodes`,children:e.flatMap(e=>e.rawCodes.map(n=>/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.rawCode(n.code,n.count)},`${e.group}:${n.code}`)))})}var LE={critical:{tone:`crit`,icon:/* @__PURE__ */ (0,Z.jsx)(Qe,{})},high:{tone:`high`,icon:/* @__PURE__ */ (0,Z.jsx)(fi,{})},watch:{tone:`plain`,icon:/* @__PURE__ */ (0,Z.jsx)(Yt,{})}};function RE({counts:e}){let t=$().cards.report.weakSpots,n=Q(),r=zt.filter(t=>e[t]>0);return r.length===0?t.findingsNone:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev-row`,children:r.map(r=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-sev qa-report-sev--${LE[r].tone}`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev__icon`,"aria-hidden":`true`,children:LE[r].icon}),/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,children:MC(e[r],n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:t.findingCount[r](e[r])})]},r))})}var zE={critical:{tone:`crit`,icon:/* @__PURE__ */ (0,Z.jsx)(Qe,{})},high:{tone:`high`,icon:/* @__PURE__ */ (0,Z.jsx)(br,{})},medium:{tone:`warn`,icon:/* @__PURE__ */ (0,Z.jsx)(Er,{})},low:{tone:`low`,icon:null}};function BE(e){return Object.prototype.hasOwnProperty.call(zE,e)}function VE({buckets:e}){let t=$().cards.report.hotspot.severityChip;return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev-row`,children:e.map(e=>{let{severity:n,count:r}=e;if(n===null)return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev qa-report-sev--plain`,children:t.none(r)},`__none__`);if(!BE(n))return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev qa-report-sev--plain`,children:t.unknown(r,n)},`raw:${n}`);let i=zE[n];return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-sev qa-report-sev--${i.tone}`,children:[i.icon!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev__icon`,"aria-hidden":`true`,children:i.icon}),t[n](r)]},n)})})}function HE(e){return e.some(e=>e.value!==null)}function UE({metricId:e}){let t=$().cards.report,n=nE(e,t);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Ep,{missing:n.missing,children:n.text}),n.missing&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-detail`,children:t.metric.missingNameDetail(e)})]})}function WE({slide:e,card:t}){let n=$().cards.report,r=Q(),{metric:i}=t,a=nE(i.metricId,n),o=fE(t.drillTarget),s=$T(i.insufficient?null:i.value,i.format,r,n),c=i.insufficient?null:tE(i,r,n),l=i.series;return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Lr,{size:16}),label:`${n.title.metric_card}: ${a.text}`,versions:[n.stamp.metric(i.metricId,i.definitionVersion)],footer:o===null?void 0:/* @__PURE__ */ (0,Z.jsx)(Np,{children:/* @__PURE__ */ (0,Z.jsx)(zp,{path:o,label:n.metric.openReport,accessibleName:n.openAria(n.metric.openReport,a.text)})}),children:[/* @__PURE__ */ (0,Z.jsx)(UE,{metricId:i.metricId}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-report-metric`,children:[s.magnitude,s.unit!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-metric__unit`,children:` ${s.unit}`}),c!==null&&/* @__PURE__ */ (0,Z.jsx)(mE,{delta:c})]}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:rE(i.metricId,i.denominator,n)}),i.insufficient?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.insufficient}):l===void 0||l.length===0?null:HE(l)?/* @__PURE__ */ (0,Z.jsx)(AE,{points:l,ariaLabel:n.metric.sparkAria(a.text)}):/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.noSeriesValue})]})}function GE({slide:e,card:t}){let n=$().cards.report,r=Q(),{trend:i}=t,a=nE(i.metricId,n),o=i.points[i.points.length-1],s=i.points.filter(e=>e.value===null).length;return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(fi,{size:16}),label:`${n.title.trend_card}: ${a.text}`,versions:[n.stamp.metric(i.metricId,i.definitionVersion)],notes:s===0?[]:[/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:n.trend.gaps(s)},`gaps`)],children:[/* @__PURE__ */ (0,Z.jsx)(UE,{metricId:i.metricId}),o===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.trend.empty}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[HE(i.points)?/* @__PURE__ */ (0,Z.jsx)(AE,{points:i.points,ariaLabel:n.metric.sparkAria(a.text)}):/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.noSeriesValue}),/* @__PURE__ */ (0,Z.jsxs)(Op,{children:[/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.trend.lastDay(HC(o.date,r)),value:/* @__PURE__ */ (0,Z.jsx)(Rp,{value:eE(o.value,i.format,r,n),base:n.trend.dayDenominator(o.denominator)})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.trend.points,value:MC(i.points.length,r)})]})]})]})}function KE(e,t,n){let r=n.stability.evidence;switch(e.status){case`flaky`:return r.flaky(e.fails,e.passes,e.windowRuns);case`consistently_failing`:return r.consistently_failing(e.consecutiveFails);case`monitoring`:return r.monitoring(e.fails,e.windowRuns);case`stable`:return r.stable(e.windowRuns);case`insufficient_history`:return e.historyResetByContentChange&&e.contentWatermarkAt!==null?r.insufficientHistoryWatermark(UC(e.contentWatermarkAt,t)):r.insufficientHistory(e.windowRuns)}}var qE={consistently_failing:`error`,flaky:`warning`,monitoring:`info`,insufficient_history:`neutral`,stable:`success`};function JE({part:e,total:t,base:n}){let r=$().cards.report,i=Q(),a=PC(e,t);return/* @__PURE__ */ (0,Z.jsx)(Rp,{value:a===null?`\u2014`:`${MC(a,i)} ${r.metric.unit.percent}`,base:n})}function YE(e,t,n,r){return!e||t===null?[]:[/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(hn,{}),children:n(UC(t,r))},`history`)]}function XE({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=aE(a.scenarioName,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(hr,{size:16}),label:`${n.title.stability_row_card}: ${o.text}`,versions:null,pill:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:qE[a.status],children:n.stability.status[a.status]}),notes:YE(a.historyResetByContentChange,a.contentWatermarkAt,n.stability.historyReset,i),children:[/* @__PURE__ */ (0,Z.jsx)(pE,{name:a.scenarioName}),/* @__PURE__ */ (0,Z.jsx)(Dp,{children:KE(a,i,n)}),/* @__PURE__ */ (0,Z.jsx)(ME,{strip:a.outcomeStrip,preWatermarkStrip:a.preWatermarkStrip,passes:a.passes,fails:a.fails}),/* @__PURE__ */ (0,Z.jsxs)(Op,{children:[/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.stability.success,value:/* @__PURE__ */ (0,Z.jsx)(JE,{part:a.passes,total:a.windowRuns,base:n.stability.outOf(a.passes,a.windowRuns)})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.stability.dominantCause,value:a.dominantCauseGroup===null?n.stability.noFailures:/* @__PURE__ */ (0,Z.jsx)(PE,{group:a.dominantCauseGroup})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.stability.lastRun,value:a.lastRunAt===null?`\u2014`:KC(a.lastRunAt,i)})]})]})}function ZE(e){return e.some(e=>e.rawCodes.length>0)}var QE={passed:`ok`,failed:`fail`,infra:`gray`,cancelled:`gray`,abandoned:`gray`};function $E({runs:e}){let t=$().cards.report.stability,n=Q();return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-report-runs`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-oc qa-report-oc--${QE[e.outcome]}`,children:t.outcome[e.outcome]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-runs__when`,children:KC(e.startedAt,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-runs__dur`,children:e.durationMs===null?`\u2014`:$C(e.durationMs,n)}),e.dominantCauseGroup!==null&&/* @__PURE__ */ (0,Z.jsx)(PE,{group:e.dominantCauseGroup})]},e.scenarioRunId))})}function eD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{detail:a}=t,o=aE(a.scenario.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(hr,{size:16}),label:`${n.title.scenario_stability_card}: ${o.text}`,versions:[n.stamp.definition(a.definitionVersion),n.stamp.mapping(a.causeMappingVersion)],pill:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:qE[a.status],children:n.stability.status[a.status]}),notes:YE(a.historyResetByContentChange,a.contentWatermarkAt,n.stability.historyReset,i),sections:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[ZE(a.causes)&&/* @__PURE__ */ (0,Z.jsx)(Mp,{summary:/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.rawCodes(a.causeMappingVersion)}),children:/* @__PURE__ */ (0,Z.jsx)(IE,{causes:a.causes})}),a.recentRuns.length>0&&/* @__PURE__ */ (0,Z.jsx)(Mp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.recentRuns}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:MC(a.recentRuns.length,i)})]}),children:/* @__PURE__ */ (0,Z.jsx)($E,{runs:a.recentRuns})})]}),children:[/* @__PURE__ */ (0,Z.jsx)(pE,{name:a.scenario.name}),/* @__PURE__ */ (0,Z.jsx)(Dp,{children:KE(a,i,n)}),/* @__PURE__ */ (0,Z.jsx)(ME,{strip:a.outcomeStrip,preWatermarkStrip:a.preWatermarkStrip,passes:a.passes,fails:a.fails}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-stack`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sublabel`,children:n.stability.causesTitle}),a.causes.length===0?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-denom`,children:n.stability.noCauses}):/* @__PURE__ */ (0,Z.jsx)(FE,{causes:a.causes,countLabel:n.stability.failures})]}),/* @__PURE__ */ (0,Z.jsxs)(Op,{children:[/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.stability.healed,value:/* @__PURE__ */ (0,Z.jsx)(JE,{part:a.healedSteps,total:a.passedSteps,base:n.stability.ofPassedSteps(a.healedSteps,a.passedSteps)})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.stability.aiExecuted,value:/* @__PURE__ */ (0,Z.jsx)(JE,{part:a.aiExecutedSteps,total:a.passedSteps,base:n.stability.ofPassedSteps(a.aiExecutedSteps,a.passedSteps)})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.stability.erFailed,value:n.stability.erFailedValue(a.erFailedRuns,a.windowRuns)})]})]})}function tD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),a=aE(t.entity.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Tr,{size:16}),label:`${n.title.failure_breakdown_card}: ${a.text}`,versions:[n.stamp.mapping(t.mappingVersion)],sections:ZE(t.causes)?/* @__PURE__ */ (0,Z.jsx)(Mp,{summary:/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.rawCodes(t.mappingVersion)}),children:/* @__PURE__ */ (0,Z.jsx)(IE,{causes:t.causes})}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(pE,{name:t.entity.name}),/* @__PURE__ */ (0,Z.jsx)(Op,{children:/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.stability.totalFailures,value:MC(t.totalFailures,i)})}),t.causes.length===0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.stability.noCauses}):/* @__PURE__ */ (0,Z.jsx)(FE,{causes:t.causes,countLabel:e=>MC(e,i)})]})}function nD({summary:e,children:t,className:n}){let r=(0,R.useId)(),[i,a]=(0,R.useState)(`by-tier`),o=(t,n)=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:h(`qa-chat-card__disclosure-summary`,`qa-card-kit__tier-summary`,n),"aria-expanded":t,"aria-controls":r,onClick:()=>a(t?`closed`:`open`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__disclosure-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(ve,{size:14})}),e]});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`qa-chat-card__disclosure`,`qa-card-kit__tier-disclosure`,n),"data-state":i,children:[i===`by-tier`?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[o(!1,`qa-card-kit__only-compact`),o(!0,`qa-card-kit__hide-compact`)]}):o(i===`open`,null),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:r,className:`qa-chat-card__disclosure-body qa-card-kit__tier-region`,hidden:i===`closed`,children:t})]})}var rD={critical:{tone:`error`},high:{tone:`warning`,className:`qa-report-pill--priority`},medium:{tone:`warning`}},iD={tone:`neutral`,className:`qa-card-kit__pill-plain`};function aD(e){return Object.prototype.hasOwnProperty.call(rD,e)?rD[e]:iD}function oD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=aE(a.feature.name,r.missingName),s=aD(a.priority),c=[...a.pagesTruncated?[/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:n.weakSpots.pagesTruncated(a.pages.length,a.totalPages)},`truncated`)]:[],/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:n.weakSpots.membership},`membership`)];return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(mn,{size:16}),label:`${n.title.weak_spot_feature_card}: ${o.text}`,versions:null,pill:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:s.tone,...s.className===void 0?{}:{className:s.className},children:oE(a.priority,n)}),notes:c,sections:a.pages.length===0?void 0:/* @__PURE__ */ (0,Z.jsx)(nD,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.weakSpots.pagesTitle}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:n.weakSpots.pagesCount(a.pages.length,a.totalPages)})]}),children:/* @__PURE__ */ (0,Z.jsx)(Ap,{"aria-label":n.weakSpots.pagesTitle,children:a.pages.map(e=>{let t=aE(e.page.name,r.missingName);return/* @__PURE__ */ (0,Z.jsx)(jp,{icon:/* @__PURE__ */ (0,Z.jsx)(In,{size:14}),tileTone:e.covered?`success`:`muted`,name:t.missing?/* @__PURE__ */ (0,Z.jsx)(`i`,{children:t.text}):t.text,note:`${e.covered?n.weakSpots.pageCovered:n.weakSpots.pageNotCovered} \u00B7 ${n.weakSpots.pageBugs(e.openBugs)}`},e.page.id)})})}),children:[/* @__PURE__ */ (0,Z.jsx)(pE,{name:a.feature.name}),/* @__PURE__ */ (0,Z.jsxs)(Op,{children:[/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.coverage,value:n.weakSpots.coverageValue(a.coveredPages,a.totalPages)}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.stepSuccess,value:/* @__PURE__ */ (0,Z.jsx)(_E,{passed:a.stepsPassed,executed:a.stepsExecuted})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.openBugs,value:MC(a.openBugs,i)}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.findings,value:/* @__PURE__ */ (0,Z.jsx)(RE,{counts:a.findingCounts})})]})]})}function sD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=aE(a.page.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(In,{size:16}),label:`${n.title.weak_spot_page_card}: ${o.text}`,versions:null,pill:t.unassigned?/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`neutral`,className:`qa-card-kit__pill-plain`,children:n.weakSpots.unassigned}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(pE,{name:a.page.name}),/* @__PURE__ */ (0,Z.jsxs)(Op,{children:[/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.coverage,value:a.covered?n.weakSpots.pageCovered:n.weakSpots.pageNotCovered}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.stepSuccess,value:/* @__PURE__ */ (0,Z.jsx)(_E,{passed:a.stepsPassed,executed:a.stepsExecuted})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.openBugs,value:MC(a.openBugs,i)}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.lastPassed.label,value:/* @__PURE__ */ (0,Z.jsx)(gE,{date:a.lastPassedDate})}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.weakSpots.findings,value:/* @__PURE__ */ (0,Z.jsx)(RE,{counts:a.findingCounts})})]})]})}function cD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{counters:a,page:o}=t,s=o===null?null:aE(o.name,r.missingName),c=a.openBySeverity.length===0?MC(a.openCount,i):/* @__PURE__ */ (0,Z.jsx)(Rp,{value:MC(a.openCount,i),base:/* @__PURE__ */ (0,Z.jsx)(VE,{buckets:a.openBySeverity})});return/* @__PURE__ */ (0,Z.jsxs)(wE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Fr,{size:16}),label:`${n.title.hotspot_card}: ${s===null?n.hotspot.unmapped:s.text}`,versions:null,children:[o===null?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Ep,{missing:!0,children:n.hotspot.unmapped}),/* @__PURE__ */ (0,Z.jsx)(Dp,{children:n.hotspot.unmappedHint})]}):/* @__PURE__ */ (0,Z.jsx)(pE,{name:o.name}),/* @__PURE__ */ (0,Z.jsxs)(Op,{children:[/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.hotspot.open,value:c}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.hotspot.opened,value:MC(a.openedInWindow,i)}),/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.hotspot.closed,value:/* @__PURE__ */ (0,Z.jsx)(Lp,{tip:n.hotspot.closedHint,children:MC(a.closedInWindow,i)})}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(kp,{label:n.lastPassed.label,value:/* @__PURE__ */ (0,Z.jsx)(gE,{date:t.lastPassedDate})})]})]})}function lD({slide:e}){let{card:t}=e;switch(t.cardKind){case`metric_card`:return/* @__PURE__ */ (0,Z.jsx)(WE,{slide:e,card:t});case`trend_card`:return/* @__PURE__ */ (0,Z.jsx)(GE,{slide:e,card:t});case`finding_card`:return/* @__PURE__ */ (0,Z.jsx)(EE,{slide:e,card:t});case`stability_row_card`:return/* @__PURE__ */ (0,Z.jsx)(XE,{slide:e,card:t});case`scenario_stability_card`:return/* @__PURE__ */ (0,Z.jsx)(eD,{slide:e,card:t});case`failure_breakdown_card`:return/* @__PURE__ */ (0,Z.jsx)(tD,{slide:e,card:t});case`weak_spot_feature_card`:return/* @__PURE__ */ (0,Z.jsx)(oD,{slide:e,card:t});case`weak_spot_page_card`:return/* @__PURE__ */ (0,Z.jsx)(sD,{slide:e,card:t});case`hotspot_card`:return/* @__PURE__ */ (0,Z.jsx)(cD,{slide:e,card:t})}}function uD(e){return/* @__PURE__ */ (0,Z.jsx)(lD,{slide:e})}function dD(e,t){return{kind:`report`,mode:`carousel`,keyOf:e=>`${e.envelope.toolCallId}:${String(e.indexInEnvelope)}`,renderItem:uD,renderSingle:uD,labels:ST(e.collection,e.report.collection,t)}}function fD({entries:e}){let t=$().cards,{slides:n,rejected:r,cardlessNotes:i}=SE(e);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&xT(dD(t,n.length),{items:n,page:null,onLoadMore:null}),i.map(({toolCallId:e,note:n})=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-cardless-note`,children:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:CE(n,t.report)})},`note:${e}`)),r.map((e,n)=>/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.report.unsupported.title,body:t.report.unsupported.body,family:`report`,resultKind:lm(e.raw)},e.toolCallId??`rejected:${String(n)}`))]})}var pD={id:`report`,schema:JT,Card:fD},mD=I({scenarioId:L().min(1),runId:L().min(1)}),hD=It([mD,I({runs:F(mD).min(1)})]);function gD({toolCallId:e,batch:t}){let{browser:n}=Zf(),r=$().cards.runInTab,i=n===null?void 0:n.runFailures[e];if(i===void 0)return null;let a=t?r.failedBatch:r.failed;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-run-in-tab`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Qe,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:a(r.reason[i])})]})}function _D({entries:e}){let t=$().cards.runInTab;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`run-in-tab-outcome`,resultKind:lm(e.outcome.raw)},r):e.call===null?null:/* @__PURE__ */ (0,Z.jsx)(gD,{toolCallId:e.call.toolCallId,batch:`runs`in e.outcome.result},r)})})}var vD={id:`run-in-tab-outcome`,schema:hD,Card:_D},yD=e=>e.outcome===`rejected`,bD=e=>e.outcome!==`rejected`;function xD(e,t){return e===0?`error`:e<t?`warning`:`success`}function SD({result:e}){let t=$().cards.runStartAgent,n=Q(),{dispatchRefusalSentence:r}=Zf(),{launched:i,total:a}=De(e),o=xD(i,a),s=e.items.filter(yD),c=e.items.filter(bD);return/* @__PURE__ */ (0,Z.jsx)(Cp,{className:h(Fp,`qa-run-agent-card`),tone:o===`success`?`neutral`:o,tileTone:o,icon:/* @__PURE__ */ (0,Z.jsx)(Xr,{size:16}),title:t.title,caption:e.agentName,"aria-label":t.cardAria(e.agentName),meta:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:o,children:rC(e,t)}),...c.length>0?{sections:/* @__PURE__ */ (0,Z.jsx)(Mp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.launchedSummary}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:MC(c.length,n)})]}),defaultOpen:s.length===0,children:/* @__PURE__ */ (0,Z.jsx)(Ap,{"aria-label":t.launchedList,children:c.map(e=>/* @__PURE__ */ (0,Z.jsx)(jp,{icon:/* @__PURE__ */ (0,Z.jsx)(Ue,{size:16}),tileTone:`success`,name:e.scenarioName},e.position))})})}:{},children:s.length>0&&/* @__PURE__ */ (0,Z.jsx)(Up,{label:t.refusedHead,children:/* @__PURE__ */ (0,Z.jsx)(Ap,{"aria-label":t.refusedList,children:s.map(e=>{let t=r(e.error);return/* @__PURE__ */ (0,Z.jsx)(jp,{icon:/* @__PURE__ */ (0,Z.jsx)(kr,{size:16}),tileTone:`error`,name:e.scenarioName,...t===``?{}:{note:t,noteWraps:!0}},e.position)})})})})}function CD({entries:e}){let t=$().cards.runStartAgent;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;if(e.outcome.status===`rejected`)return/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`run-start-agent`,resultKind:lm(e.outcome.raw)},r);let i=e.outcome.result;return i.kind===`dispatched`?/* @__PURE__ */ (0,Z.jsx)(SD,{result:i.result},r):null})})}var wD={id:`run-start-agent`,schema:ke,Card:CD};function TD({step:e,copied:t,onCopy:n,className:r}){let i=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsx)(N,{variant:t?`success-soft`:`secondary`,size:`sm`,className:r,icon:t?/* @__PURE__ */ (0,Z.jsx)(Ge,{size:14}):/* @__PURE__ */ (0,Z.jsx)(we,{size:14}),"aria-label":t?i.copiedAria[e]:i.copyAria[e],onClick:n,children:t?i.copied:i.copy})}function ED({step:e,command:t,copied:n,onCopy:r}){let i=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-enroll-step`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-enroll-step__top`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-enroll-step__label`,children:i.step[e]}),/* @__PURE__ */ (0,Z.jsx)(TD,{step:e,copied:n,onCopy:r,className:`qa-enroll-copy--narrow`})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-enroll-step__line`,children:[/* @__PURE__ */ (0,Z.jsx)(`code`,{className:`qa-enroll-step__code`,children:t}),/* @__PURE__ */ (0,Z.jsx)(TD,{step:e,copied:n,onCopy:r,className:`qa-enroll-copy--wide`})]})]})}function DD({result:e}){let t=$().cards.runnerEnrollment,n=$().cards.runnerReadiness.job,r=Q(),{instructions:i}=e,[a,o]=(0,R.useState)(/* @__PURE__ */ new Set),[s,c]=(0,R.useState)(null),l={install:i.installCommand,enroll:i.enrollCommand,start:i.startCommand},u=e=>{navigator.clipboard.writeText(l[e]).then(()=>{o(t=>new Set(t).add(e)),c(e)})},d=t.title(n[e.readinessFor]),f=t.expiresAt(BC(e.expiresAt,r)),p=e=>/* @__PURE__ */ (0,Z.jsx)(ED,{step:e,command:l[e],copied:a.has(e),onCopy:()=>u(e)});return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:`${Fp} qa-enroll-card`,icon:/* @__PURE__ */ (0,Z.jsx)(di,{size:16}),title:d,"aria-label":d,caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:f}),meta:/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-card-kit__t-wide`,dateTime:e.expiresAt,children:f}),note:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:t.askAgain}),children:[/* @__PURE__ */ (0,Z.jsxs)(`ol`,{className:`qa-enroll-steps`,children:[p(`install`),p(`enroll`),/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-enroll-step`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-enroll-step__top`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-enroll-step__label`,children:t.step.approve})}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-enroll-step__text`,children:[t.approveBefore,` `,/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i.approvalUrlPattern}),` `,t.approveAfter,` `,t.cadence(i.requestTtlSec)]})]}),p(`start`)]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:s===null?``:t.copiedAria[s]})]})}function OD({entries:e}){let t=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(DD,{result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`runner-enrollment`,resultKind:lm(e.outcome.raw)},r)})})}var kD={id:`runner-enrollment`,schema:lv,Card:OD},AD=[`playback`,`atlas_crawl`,`make_auto`];function jD(e){return AD.includes(e)}function MD(e){let[t]=e.split(`@`);return t!==void 0&&jD(t)?t:null}var ND=8,PD={ready:`success`,queue_full:`info`,pending_enroll:`warning`,capability_missing:`warning`,offline:`neutral`,not_owner:`error`};function FD(e,t,n,r){let i=[];return e.platform!==null&&i.push(n.platform[e.platform]),e.hostname!==null&&i.push(e.hostname),i.push(e.facts.lastSeenAt===null?n.lastSeenNever:n.lastSeen(QC(e.facts.lastSeenAt,t,r))),i.join(` \u00B7 `)}function ID({runner:e,capability:t,evaluatedAtMs:n}){let r=$().cards.runnerReadiness,i=$().cards.common,a=Q(),o=e.name.trim().length===0;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-runner-machine`,children:[/* @__PURE__ */ (0,Z.jsx)(Fn,{className:`qa-runner-machine__icon`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-runner-machine__who`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:o?`qa-runner-machine__name qa-runner-machine__name--missing`:`qa-runner-machine__name`,children:o?i.missingName:e.name}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-runner-machine__note`,children:FD(e,n,r,a)})]}),/* @__PURE__ */ (0,Z.jsx)(Lp,{tip:e.agentId,className:`qa-runner-machine__id`,children:e.agentId.slice(0,ND)}),/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:PD[e.state],children:r.state[e.state](MD(t))})]})}function LD({report:e}){let t=$().cards.runnerReadiness,n=Q(),r=Date.parse(e.evaluatedAt),i=t.evaluatedAt(BC(e.evaluatedAt,n)),a=t.title(t.job[e.readinessFor]),o=e.runners.length,s=t.fleet[e.fleetState](e.total),c=e.fleetState===`not_enrolled`||e.fleetState===`none_ready`;return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:`${Fp} qa-runner-card`,icon:/* @__PURE__ */ (0,Z.jsx)(Fn,{size:16}),title:a,"aria-label":a,fold:{title:a,facts:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:h(`qa-chat-card__fold-fact--sentence`,c&&`qa-chat-card__fold-fact--warning`),children:[c&&/* @__PURE__ */ (0,Z.jsx)(Ze,{className:`qa-chat-card__fold-fact-icon`,"aria-hidden":`true`}),s]})},caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:i}),meta:/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-card-kit__t-wide`,dateTime:e.evaluatedAt,children:i}),...o<e.total?{note:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:t.truncated(o,e.total)})}:{},children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-runner-fleet`,children:s}),o===0?e.fleetState===`not_enrolled`?null:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-runner-empty`,children:t.noRunners}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-runner-machines`,...o>1?{role:`group`,"aria-label":t.machinesAria(o)}:{},children:e.runners.map(t=>/* @__PURE__ */ (0,Z.jsx)(ID,{runner:t,capability:e.capability,evaluatedAtMs:r},t.agentId))})]})}function RD(e){return/* @__PURE__ */ (0,Z.jsx)(LD,{report:e.report})}function zD(e,t){return{kind:`runner`,mode:`carousel`,keyOf:e=>e.key,renderItem:RD,renderSingle:RD,labels:ST(e.collection,e.runnerReadiness.collection,t)}}function BD({entries:e}){let t=$().cards,n=[],r=[];return e.forEach((e,t)=>{let i=e.call===null?`entry:${String(t)}`:e.call.toolCallId;e.outcome.status===`accepted`?n.push({key:i,report:e.outcome.result}):r.push({key:i,raw:e.outcome.raw})}),/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&xT(zD(t,n.length),{items:n,page:null,onLoadMore:null}),r.map(e=>/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.runnerReadiness.unsupported.title,body:t.runnerReadiness.unsupported.body,family:`runner-readiness`,resultKind:lm(e.raw)},e.key))]})}var VD={id:`runner-readiness`,schema:cv,Card:BD};function HD(e){return e.deleted?`archived`:e.outdated?`outdated`:e.mappingStatus===`unassigned`?`draft`:`ready`}var UD={draft:`neutral`,ready:`success`,outdated:`warning`,archived:`neutral`},WD=I({id:L().min(1),orderIndex:Wt().int(),stepNumber:Wt().int(),actionType:L(),label:L(),inputValue:L().nullable(),targetUrl:L().nullable(),expectedResults:F(L())}),GD=I({resultKind:bt(`scenario_card`),scenarioId:L().min(1),projectId:L().min(1),number:Wt().int(),name:L(),description:L().nullable(),mappingStatus:Ct([`unassigned`,`page_mapped`,`partially_mapped`,`fully_mapped`]),deleted:Ht(),outdated:Ht(),tags:F(L()),totalSteps:Wt().int().nonnegative(),steps:F(WD),totalRuns:Wt().int().nonnegative(),open:$f}),KD=I({items:F(WD)}),qD=I({id:L().min(1),status:Ct([`queued`,`launching`,`in_progress`,`completed`,`failed`,`cancelled`]),executionMode:ie.nullable().optional(),startedAt:L(),completedAt:L().nullable().optional(),currentStepNumber:Wt().int()}).transform(e=>({id:e.id,status:e.status,executionMode:e.executionMode??null,startedAt:e.startedAt,completedAt:e.completedAt??null,currentStepNumber:e.currentStepNumber})),JD=F(qD);function YD(e){switch(e){case`unassigned`:return`none`;case`fully_mapped`:return`full`;case`page_mapped`:case`partially_mapped`:return`partial`}}var XD={queued:null,launching:`qa-scenario-run__status--live`,in_progress:`qa-scenario-run__status--live`,completed:`qa-scenario-run__status--ok`,failed:`qa-scenario-run__status--fail`,cancelled:null};function ZD({run:e,totalSteps:t}){let n=$().cards.scenario,r=Q(),i=Date.parse(e.startedAt),a=Number.isNaN(i)?n.runMomentUnavailable:KC(e.startedAt,r),o=null;if(e.status===`in_progress`)o=n.runProgress(e.currentStepNumber,t);else if(e.status!==`queued`&&e.status!==`launching`){let t=e.completedAt===null?NaN:Date.parse(e.completedAt);o=Number.isNaN(i)||Number.isNaN(t)?n.runDurationUnavailable:$C(t-i,r)}return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-scenario-run`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:h(`qa-scenario-run__status`,XD[e.status]),children:n.runStatus[e.status]}),e.executionMode!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__mode`,children:n.runMode[e.executionMode]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__when`,children:a}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__right`,children:o})]})}function QD({scenarioId:e,totalRuns:t,totalSteps:n,runAction:r}){let{scenario:i,common:a}=$().cards,{http:o}=Zf(),[s,c]=(0,R.useState)({status:`loading`,rows:[]}),[l,u]=(0,R.useState)(t>0?{offset:0,attempt:0}:null);(0,R.useEffect)(()=>{if(l===null)return;let t=!0;return o.request({method:`GET`,path:Gn.scenarioRuns.path(e,{limit:10,offset:l.offset}),schema:JD}).then(e=>{t&&c(t=>({status:`ready`,rows:[...t.rows,...e]}))},e=>{t&&c(e=>({status:`failed`,rows:e.rows})),queueMicrotask(()=>{throw e})}),()=>{t=!1}},[o,e,l]);let d=e=>{c(e=>({status:`loading`,rows:e.rows})),u(t=>({offset:e,attempt:t===null?0:t.attempt+1}))};if(t===0)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-empty`,children:[/* @__PURE__ */ (0,Z.jsx)($r,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:i.runsEmptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:n>0?i.runsEmptyHint:i.runsEmptyHintNoSteps}),n>0&&r]});let{rows:f}=s;if(f.length===0)return s.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsLoadFailed}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ri,{size:13}),onClick:()=>d(0),children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-runs-skeleton`,role:`status`,"aria-label":i.runsLoading,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-shimmer`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-shimmer`})]});let p=t-f.length;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-scenario-runs`,children:f.map(e=>/* @__PURE__ */ (0,Z.jsx)(ZD,{run:e,totalSteps:n},e.id))}),p>0&&(s.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsLoadFailed}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ri,{size:13}),onClick:()=>d(f.length),children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsShown(f.length,t)}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`sm`,loading:s.status===`loading`,onClick:()=>d(f.length),children:i.runsLoadMore(Math.min(10,p))})]}))]})}var $D={click:pn,input:pi,select:pi,checkbox:li,keyboard:gn,keypress:gn,submit:Ue,focus:mn,blur:Yt,navigate:Ur,canvas_click:_n,canvas_dblclick:_n,canvas_drag:_n,canvas_zoom:_n,canvas_pan:_n},eO=$r;function tO({actionType:e,size:t=14,className:n=``}){let r=$D[e]||eO;return/* @__PURE__ */ (0,Z.jsx)(r,{size:t,className:n})}function nO({step:e}){let t=$().cards.scenario,[n,r]=(0,R.useState)(!1),i=e.inputValue??e.targetUrl,[a]=e.expectedResults,o=i!==null||a!==void 0,s=e.label.trim().length===0,c=s?t.step.missingLabel:e.label,l=()=>r(e=>!e);return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-scenario-step`,...o?{role:`button`,tabIndex:0,"aria-expanded":n,"aria-label":t.step.aria(e.stepNumber,c),onClick:l,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())}}:{},children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-step__no`,children:String(e.stepNumber).padStart(2,`0`)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-step__icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(tO,{actionType:e.actionType,size:14})}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__text`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:s?`qa-scenario-step__label qa-scenario-step__label--missing`:`qa-scenario-step__label`,children:c}),o&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__sub`,children:[i!==null&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__expected`,children:[/* @__PURE__ */ (0,Z.jsx)(Ge,{"aria-hidden":`true`}),a]}),e.expectedResults.length>1&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.step.moreExpected(e.expectedResults.length-1)})]})]}),o?/* @__PURE__ */ (0,Z.jsx)(ve,{className:`qa-scenario-step__chevron`,"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(`span`,{}),o&&n&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-step__detail`,children:[i!==null&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i}),e.expectedResults.length>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.step.expectedHeading}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{children:e.expectedResults.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(Ge,{"aria-hidden":`true`}),e]},t))})]})]})]})}function rO({scenarioId:e,firstPage:t,totalSteps:n,emptyAction:r}){let{scenario:i,common:a}=$().cards,{http:o}=Zf(),[s,c]=(0,R.useState)([]),[l,u]=(0,R.useState)({status:`idle`});if(n===0)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-empty`,children:[/* @__PURE__ */ (0,Z.jsx)(on,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:i.stepsEmptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i.stepsEmptyHint}),r]});let d=[...t,...s],f=n-d.length,p=()=>{u({status:`loading`}),o.request({method:`GET`,path:Gn.scenarioSteps.path(e,{limit:20,offset:d.length}),schema:KD}).then(e=>{c(t=>[...t,...e.items]),u({status:`idle`})},e=>{u({status:`failed`}),queueMicrotask(()=>{throw e})})};return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-scenario-steps`,children:d.map(e=>/* @__PURE__ */ (0,Z.jsx)(nO,{step:e},e.id))}),f>0&&(l.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.stepsLoadFailed(d.length,n)}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ri,{size:13}),onClick:p,children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.stepsShown(d.length,n)}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(de,{size:13}),loading:l.status===`loading`,onClick:p,children:i.stepsLoadMore(f)})]}))]})}var iO=[`steps`,`runs`];function aO({path:e,name:t,emphasis:n}){let r=$().cards.scenario;return/* @__PURE__ */ (0,Z.jsx)(zp,{path:e,emphasis:n,accessibleName:r.openAria(t),label:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:r.open}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__only-compact`,children:r.openShort})]})})}function oO({result:e,path:t,runAction:n}){let r=$().cards.scenario,i=Q(),a=(0,R.useId)(),[o,s]=(0,R.useState)(`steps`),[c,l]=(0,R.useState)(!1),u=(0,R.useRef)({}),d=(e,t)=>{var n;s(e),e===`runs`&&l(!0),t&&((n=u.current[e])==null||n.focus())},f=e=>{let t=iO.indexOf(o),n=e.key===`ArrowRight`?iO[(t+1)%iO.length]:e.key===`ArrowLeft`?iO[(t-1+iO.length)%iO.length]:e.key===`Home`?iO[0]:e.key===`End`?iO[iO.length-1]:void 0;n!==void 0&&(e.preventDefault(),d(n,!0))},p=e=>e===`steps`?r.tabSteps:r.tabRuns,m=t=>t===`steps`?e.totalSteps:e.totalRuns;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-tabs`,role:`tablist`,"aria-label":r.tabsAria,onKeyDown:f,children:iO.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:t=>{u.current[e]=t},type:`button`,role:`tab`,id:`${a}-tab-${e}`,"aria-controls":`${a}-panel-${e}`,"aria-selected":o===e,tabIndex:o===e?0:-1,className:`qa-scenario-tab`,onClick:()=>d(e,!1),children:[p(e),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-tab__count`,children:MC(m(e),i)})]},e))}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-panel`,role:`tabpanel`,id:`${a}-panel-steps`,"aria-labelledby":`${a}-tab-steps`,hidden:o!==`steps`,children:/* @__PURE__ */ (0,Z.jsx)(rO,{scenarioId:e.scenarioId,firstPage:e.steps,totalSteps:e.totalSteps,emptyAction:t===null?null:/* @__PURE__ */ (0,Z.jsx)(aO,{path:t,name:e.name,emphasis:`secondary`})})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-panel`,role:`tabpanel`,id:`${a}-panel-runs`,"aria-labelledby":`${a}-tab-runs`,hidden:o!==`runs`,children:c&&/* @__PURE__ */ (0,Z.jsx)(QD,{scenarioId:e.scenarioId,totalRuns:e.totalRuns,totalSteps:e.totalSteps,runAction:n})})]})}function sO({result:e,presentation:t}){let{scenario:n,common:r}=$().cards,i=Q(),{project:a,navigation:o,browser:s,conversation:c}=Zf(),l=(0,R.useId)(),u=(0,R.useId)(),[d,f]=(0,R.useState)(!1),p=n.caption(e.number),m=e.name.trim().length===0,g=m?r.missingName:e.name,_=e.description===null?``:e.description.trim(),v=HD(e),y=YD(e.mappingStatus),b=y===`none`&&e.totalSteps===0?n.mapping.hintNoSteps:n.mapping.hint[y],x=a===null?null:rp(a.number,e.open),S=e.totalSteps===0,C=s===null?x===null?null:()=>o.openPath(x):()=>c.send(n.runCommand(p)),w=C===null?null:/* @__PURE__ */ (0,Z.jsx)(se,{disabled:S,reason:n.runNoSteps,children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)($r,{size:14}),"aria-describedby":S?u:void 0,onClick:S?void 0:C,children:n.run})}),T=/* @__PURE__ */ (0,Z.jsx)(oO,{result:e,path:x,runAction:w}),E=t===`full`?T:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-scenario-expand`,"aria-expanded":d,"aria-controls":l,onClick:()=>f(e=>!e),children:[/* @__PURE__ */ (0,Z.jsx)(ve,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:d?n.collapse:n.expand}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__only-compact`,children:d?n.collapse:n.expandShort})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:l,hidden:!d,children:d&&T})]});return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:h(Fp,`qa-scenario-card`),tileTone:`scenario`,icon:/* @__PURE__ */ (0,Z.jsx)(Nr,{size:16}),title:n.title,caption:p,meta:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:UD[v],children:n.lifecycle[v]}),"aria-label":n.cardAria(p,g),fold:{title:m?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-missing`,children:g}):g,facts:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--mono`,children:p}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${MC(e.totalSteps,i)} ${n.steps(e.totalSteps)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${MC(e.totalRuns,i)} ${n.runs(e.totalRuns)}`})]}),...x===null&&C===null?{}:{quickActions:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[x!==null&&/* @__PURE__ */ (0,Z.jsx)(Bp,{label:`${n.openAria(g)}${o.opensInNewTab?r.newTabSuffix:``}`,icon:/* @__PURE__ */ (0,Z.jsx)(Vp,{size:15}),onClick:()=>o.openPath(x)}),C!==null&&/* @__PURE__ */ (0,Z.jsx)(Bp,{label:n.runAria(g),icon:/* @__PURE__ */ (0,Z.jsx)($r,{size:15}),onClick:C,...S?{disabledReason:n.runNoSteps}:{}})]})}},sections:E,...S&&C!==null?{note:/* @__PURE__ */ (0,Z.jsx)(`span`,{id:u,children:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:n.runNoSteps})})}:{},footer:/* @__PURE__ */ (0,Z.jsxs)(Np,{children:[x===null?/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`neutral`,dot:!1,children:r.noOpenTarget}):/* @__PURE__ */ (0,Z.jsx)(aO,{path:x,name:g,emphasis:`primary`}),w]}),children:[/* @__PURE__ */ (0,Z.jsx)(Ep,{missing:m,children:g}),_.length>0&&/* @__PURE__ */ (0,Z.jsx)(Dp,{clamp:!0,children:_}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-facts`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:MC(e.totalSteps,i)}),n.steps(e.totalSteps)]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:MC(e.totalRuns,i)}),n.runs(e.totalRuns)]})]}),/* @__PURE__ */ (0,Z.jsxs)(Lp,{tip:n.mapping.tip(b),className:h(`qa-scenario-mapping`,`qa-scenario-mapping--${y}`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-mapping__glyph`,"aria-hidden":`true`}),n.mapping.label[y]]}),e.tags.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__tags`,children:e.tags.map(e=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tag`,children:e},e))})]})}function cO(e){return/* @__PURE__ */ (0,Z.jsx)(sO,{result:e,presentation:`compact`})}function lO(e){return/* @__PURE__ */ (0,Z.jsx)(sO,{result:e,presentation:`full`})}function uO(e,t){return{kind:`scenario`,mode:`carousel`,keyOf:e=>e.scenarioId,renderItem:cO,renderSingle:lO,labels:ST(e.collection,e.scenario.collection,t)}}function dO(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.scenarioId,n);return[...t.values()]}function fO({entries:e}){let t=$().cards,n=dO(e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]));return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&xT(uO(t,n.length),{items:n,page:null,onLoadMore:null}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.scenario.unsupported.title,body:t.scenario.unsupported.body,family:`scenario`,resultKind:lm(e.outcome.raw)},e.call===null?`rejected:${String(n)}`:e.call.toolCallId):null)]})}var pO={id:`scenario`,schema:GD,Card:fO};function mO(e){let{project:t}=Zf(),n=$f.safeParse(e.openTarget);return!n.success||t===null?null:rp(t.number,n.data)}function hO({item:e,presentation:t,footerExtra:n,note:r}){let i=$().cards,{navigation:a}=Zf(),o=mO(e),s=e.label.trim().length===0,c=s?i.common.missingName:e.label,[l,...u]=e.evidence,d=e.secondaryLabel===void 0||e.secondaryLabel===null||e.secondaryLabel.length===0?void 0:e.secondaryLabel,f=/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-search-card__evidence`,children:u.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:e},`${String(t)}:${e}`))});return/* @__PURE__ */ (0,Z.jsxs)(Cp,{className:h(Fp,`qa-search-card`,t===`compact`&&`qa-search-card--compact`),icon:/* @__PURE__ */ (0,Z.jsx)(b,{size:16}),tileTone:`info`,title:i.search.title,"aria-label":`${i.search.title}: ${c}`,fold:{title:s?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-missing`,children:c}):c,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:[d,l].filter(e=>e!==void 0).join(` \u00B7 `)}),...o===null?{}:{quickActions:/* @__PURE__ */ (0,Z.jsx)(Bp,{label:`${i.search.openAria(c)}${a.opensInNewTab?i.common.newTabSuffix:``}`,icon:/* @__PURE__ */ (0,Z.jsx)(Vp,{size:15}),onClick:()=>a.openPath(o)})}},...d===void 0?{}:{caption:d},meta:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:`neutral`,dot:!1,children:dp(e.entityType,i.common)}),...o===null?{role:`note`}:{},...r===void 0?{}:{note:r},sections:u.length===0?void 0:t===`compact`?/* @__PURE__ */ (0,Z.jsx)(Mp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.search.evidence}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.evidence.length})]}),children:f}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-search-card__evidence-block`,children:f}),footer:/* @__PURE__ */ (0,Z.jsxs)(Np,{children:[o===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-search-card__no-open`,children:i.common.noOpenTarget}):/* @__PURE__ */ (0,Z.jsx)(zp,{path:o,label:i.common.open,accessibleName:i.search.openAria(c)}),n]}),children:[/* @__PURE__ */ (0,Z.jsx)(Ep,{missing:s,children:c}),l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(Dp,{clamp:!0,children:l})]})}var gO=I({value:wt().nonnegative(),relation:Ct([`eq`,`atLeast`])}),_O=I({total:gO.nullable(),nextCursor:L().min(1).nullable()}),vO=I({entityType:L().min(1),entityId:L().min(1),label:L(),secondaryLabel:L().nullable().optional(),evidence:F(L()),openTarget:at({target:L()})}),yO=I({resultKind:bt(`unified_search`),items:F(vO),page:_O,limit:Wt().int().positive().optional(),normalizedQuery:L().optional()}).refine(e=>e.page.nextCursor===null||e.limit!==void 0,{message:"a unified_search page with a cursor must carry the `limit` it was minted at",path:[`limit`]}),bO=I({items:F(vO),page:_O}),xO=I({query:L().min(1),entityTypes:F(L()).nullable().optional()});function SO(e){let t=xO.safeParse(e);if(!t.success)return null;let n=t.data.entityTypes??[];return{query:t.data.query,entityTypes:n}}function CO(e){return`${e.entityType}:${e.entityId}`}function wO(e){return/* @__PURE__ */ (0,Z.jsx)(hO,{item:e,presentation:`compact`})}function TO(e){return/* @__PURE__ */ (0,Z.jsx)(hO,{item:e,presentation:`full`})}function EO(e,t){return e.total===null?t:e.total.value}function DO(e,t){return{kind:`search`,mode:`carousel`,keyOf:CO,renderItem:wO,renderSingle:TO,labels:ST(e.collection,e.search.collection,t)}}function OO(e,t){let{http:n,project:r}=Zf();return(0,R.useMemo)(()=>{if(t.page.nextCursor===null)return null;let{limit:i}=t;return async t=>{if(i===void 0)throw Error("search load-more: the result carries no `limit`");if(r===null)throw Error(`search load-more: the chat is bound to no project`);let a=e===null?null:SO(e.args);if(a===null)throw Error(`search load-more: the conversation does not carry the query the cursor is bound to`);let o=await n.request({method:`GET`,path:Gn.searchPage.path(r.id,a,{limit:i,cursor:t}),schema:bO});return{items:o.items,page:o.page}}},[e,t,n,r])}function kO(e,t,n){return t.total===null?e.shownUnknown(n):t.total.relation===`eq`?e.shownOfTotal(n,t.total.value):e.shownOfAtLeast(n,t.total.value)}function AO({item:e,page:t,loadMore:n,onLoaded:r}){var i;let a=$().cards.search,[o,s]=(0,R.useState)({status:`idle`}),c=()=>{s({status:`loading`}),n(t.nextCursor).then(e=>{s({status:`idle`}),r(e.items,e.page)},e=>{s({status:`failed`}),queueMicrotask(()=>{throw e})})},l=t.total===null?null:t.total.value-1,u=o.status===`loading`?a.loading:o.status===`failed`?a.retry:l===null||((i=t.total)==null?void 0:i.relation)!==`eq`?a.loadMoreUnknown:a.loadMore(l);return/* @__PURE__ */ (0,Z.jsx)(hO,{item:e,presentation:`full`,note:/* @__PURE__ */ (0,Z.jsx)(`span`,{role:`status`,"aria-live":`polite`,children:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(M,{}),children:o.status===`failed`?a.loadFailed:kO(a,t,1)})}),footerExtra:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(de,{size:14}),disabled:o.status===`loading`,onClick:c,children:u})})}function jO({normalizedQuery:e}){let t=$().cards.search,n=e===void 0?t.emptyBody:t.emptyForQuery(e);return/* @__PURE__ */ (0,Z.jsx)(Cp,{className:`${Fp} qa-search-card qa-search-card--empty`,icon:/* @__PURE__ */ (0,Z.jsx)(b,{size:16}),tileTone:`info`,title:t.emptyTitle,"aria-label":t.emptyTitle,fold:{title:t.emptyTitle,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:n})},children:/* @__PURE__ */ (0,Z.jsx)(Dp,{children:n})})}function MO({call:e,result:t}){let n=$().cards,r=Q(),i=OO(e,t),[a,o]=(0,R.useState)(null),s=new Set(t.items.map(CO)),c=a===null?t.items:[...t.items,...a.items.filter(e=>!s.has(CO(e)))],l=a===null?t.page:a.page,[u]=c;if(u===void 0)return/* @__PURE__ */ (0,Z.jsx)(jO,{normalizedQuery:t.normalizedQuery});if(c.length===1&&l.nextCursor!==null&&i!==null){let{nextCursor:e}=l;return/* @__PURE__ */ (0,Z.jsx)(AO,{item:u,page:{...l,nextCursor:e},loadMore:i,onLoaded:(e,t)=>o({items:e,page:t})})}let d=EO(l,c.length),f=l.nextCursor!==null;return xT(DO(n,d),{items:c,page:l,onLoadMore:i,...f?{header:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:n.search.title}),l.total!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__head-badge`,children:`${MC(l.total.value,r)}${l.total.relation===`atLeast`?`+`:``}`})]})}:{}})}function NO({entries:e}){let t=$().cards.search;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(MO,{call:e.call,result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`search`,resultKind:lm(e.outcome.raw)},r)})})}var PO={id:`search`,schema:yO,Card:NO},FO=[`scenarios`,`shared-steps`,`api-collections`,`api-catalog`,`checklists`,`bugs`,`test-runs`,`map`];function IO(e){return FO.includes(e)}var LO=I({resultKind:bt(`section_link`),section:L().min(1),label:L().min(1),open:at({target:L()})}),RO={tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(Zn,{size:16})};function zO(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.has(n.section)||t.set(n.section,n);return[...t.values()]}function BO(e){let t=$().cards,n=t.sectionLink,{project:r}=Zf();return zO(e).map(e=>{let i=IO(e.section),a=IO(e.section)?n.sections[e.section]:n.unrecognized,o={key:e.section,tile:RO,name:a,nameMissing:!i,note:i?t.common.entityType.section:n.serverLabel(e.label)},s=$f.safeParse(e.open),c=s.success&&r!==null?rp(r.number,s.data):null;return c===null?{...o,open:{pill:n.noRoute,hint:n.noRouteHint,ariaLabel:n.noRouteAria(a)}}:{...o,open:{path:c,action:n.action,destination:null}}})}function VO({results:e}){let t=$().cards.sectionLink,n=BO(e);return/* @__PURE__ */ (0,Z.jsx)(qp,{title:t.title,groupAria:t.groupAria,icon:/* @__PURE__ */ (0,Z.jsx)(ge,{size:16}),rows:n})}function HO({entries:e}){let t=$().cards.sectionLink,n=e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&/* @__PURE__ */ (0,Z.jsx)(VO,{results:n}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Hp,{title:t.unsupported.title,body:t.unsupported.body,family:`section-link`,resultKind:lm(e.outcome.raw)},e.call===null?`entry:${String(n)}`:e.call.toolCallId):null)]})}var UO={id:`section-link`,schema:LO,Card:HO};function WO(e){return t=>typeof t==`object`&&!!t&&`resultKind`in t&&t.resultKind===e}function GO(e){return WO(`unified_search`)(e)&&typeof e==`object`&&!!e&&`display`in e&&e.display===`collection`}function KO(e,t){return{id:e.id,declares:t,group(t,n){let[r,...i]=t.map(t=>{let n=e.schema.safeParse(t.raw);return{call:t.call,outcome:n.success?{status:`accepted`,result:n.data}:{status:`rejected`,raw:t.raw}}});return r===void 0?null:(0,R.createElement)(e.Card,{key:n,entries:[r,...i]})}}}var qO={"change-set":{grouping:`turn-group`}},JO={report:KO(pD,WO(`report_cards`)),"runner-readiness":KO(VD,WO(`runner_readiness`)),"runner-enrollment":KO(kD,WO(`runner_enrollment_instructions`)),references:KO(rm,()=>!0),"section-link":KO(UO,WO(`section_link`)),search:KO(PO,GO),scenario:KO(pO,WO(`scenario_card`)),"change-set":KO(Hw,WO(`change_set_proposal`)),"job-status":KO(IT,()=>!0),coverage:KO(Yw,WO(`coverage`)),"run-start-agent":KO(wD,WO(`run_start_agent`)),"run-in-tab-outcome":KO(vD,e=>WO(`run_in_tab_outcome`)(e)||WO(`run_batch_browser`)(e))};function YO({message:e,conversationId:t,confirmedCalls:n,copy:r,refusalSentence:i,pendingHostCallIds:a,stoppingHostCallIds:o,waitingForBrowser:s,stoppingBrowser:c}){let l=n.get(e.id);if(l===void 0)return{kind:`generic`};if(l.toolName===null)return{kind:`awaiting`};if(l.result===null&&o.has(l.toolCallId))return{kind:`outcome`,text:c};if(l.result===null&&a.has(l.toolCallId))return{kind:`outcome`,text:s};if(l.result===null)return{kind:`awaiting`};if(l.result!==null&&cm(l.result.value))return{kind:`unknown`};if(l.result!==null&&JO[`run-start-agent`].declares(l.result.value))return{kind:`outcome`,text:oC(l.result,r,i)};if(l.result!==null&&sm(l.result.value))return{kind:`failed`};if(t!==null){let e=nC(l.result.value,t);if(e!==null)return{kind:`launched_elsewhere`,conversationId:e}}return{kind:`generic`}}function XO(e,t){let[n,r]=(0,R.useState)(()=>/* @__PURE__ */ new Set),i=e.filter(e=>qy(e)&&!n.has(e.toolCallId));return i.length>0&&r(e=>/* @__PURE__ */ new Set([...e,...i.map(e=>e.toolCallId)])),(0,R.useMemo)(()=>{let e=/* @__PURE__ */ new Set;for(let[r,i]of t)n.has(i.toolCallId)&&e.add(r);return e},[t,n])}function ZO({label:e,icon:t,title:n,tags:r,note:i,testId:a}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-context`,role:`note`,"aria-label":e,"data-testid":a,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-context-tile`,"aria-hidden":`true`,children:t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-context-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:n}),r.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-context-scope`,children:r.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:e.missing?`qa-ai-chat-context-missing`:void 0,children:e.text},t))}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i})]})]})}function QO(e){let{runtime:t,source:n,conversationId:r}=e,{reportContexts:i,session:a}=t,o=(0,R.useCallback)(e=>i.subscribe(e),[i]),s=(0,R.useSyncExternalStore)(o,()=>r===null?null:i.get(r)),c=Rb(n===null?null:n.reportHandoff),l=(0,R.useRef)(null);return(0,R.useEffect)(()=>{c!==null&&l.current!==c&&(l.current=c,a.openConversation(c.conversationId))},[c,a]),{report:s===null?null:{context:s,entityName:c!==null&&c.conversationId===r?c.entityName:null}}}function $O({tone:e,lead:t,role:n,title:r,text:i,slim:a=!1,extra:o,actions:s,dismiss:c,testId:l}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-notice qa-ai-chat-notice--${e}${a?` qa-ai-chat-notice--slim`:``}`,role:n===`none`?void 0:n,"aria-live":n===`status`?`polite`:void 0,"data-testid":l,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-notice-lead`,"aria-hidden":`true`,children:t===`spinner`?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-notice-spinner`}):t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-notice-text`,children:[r!==null&&/* @__PURE__ */ (0,Z.jsx)(`b`,{children:r}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i}),o]}),c!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm qa-ai-chat-notice-close`,"aria-label":c.label,onClick:c.onDismiss,children:/* @__PURE__ */ (0,Z.jsx)(C,{})}),s!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-notice-actions`,children:s})]})}var ek=[`today`,`yesterday`,`previous7Days`,`previous30Days`,`older`];function tk(e,t){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=e=>{let t=new Date(n);return t.setDate(t.getDate()-e),t};return e>=n?`today`:e>=r(1)?`yesterday`:e>=r(7)?`previous7Days`:e>=r(30)?`previous30Days`:`older`}function nk(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=tk(r.updatedAt,t),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return ek.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{group:e,items:t}]})}var rk=I({id:L().min(1),title:L().nullable(),updatedAt:L().min(1),reportContext:Gt().nullable()}),ik=I({items:F(rk),nextCursor:L().nullable(),hasMore:Ht()}),ak=I({success:bt(!0)});function ok(e){return{id:e.id,title:e.title,updatedAt:new Date(e.updatedAt),fromReport:e.reportContext!==null}}function sk(e){let{http:t,logger:n,projectId:r}=e,[i,a]=(0,R.useState)({status:`loading`}),[o,s]=(0,R.useState)(``),[c,l]=(0,R.useState)(``),u=(0,R.useRef)(0),d=(0,R.useRef)(i);(0,R.useEffect)(()=>{d.current=i}),(0,R.useEffect)(()=>{let e=setTimeout(()=>l(o.trim()),300);return()=>clearTimeout(e)},[o]);let f=(0,R.useCallback)(e=>{let n=++u.current;return t.request({method:Gn.conversationList.method,path:Gn.conversationList.path({projectId:r,limit:20,cursor:e,search:c===``?null:c}),schema:ik}).then(e=>({seq:n,page:e,error:null}),e=>({seq:n,page:null,error:e}))},[c,t,r]),p=(0,R.useCallback)(()=>{a({status:`loading`}),f(null).then(({seq:e,page:t,error:i})=>{if(e===u.current){if(t===null){n.error(`conversation-list: first page failed`,{projectId:r,error:i}),a({status:`failed`});return}a({status:`ready`,rows:t.items.map(ok),nextCursor:t.hasMore?t.nextCursor:null,loadingMore:!1,moreFailed:!1})}})},[n,r,f]);return(0,R.useEffect)(p,[p]),{state:i,search:o,appliedSearch:c,setSearch:s,retry:p,loadMore:(0,R.useCallback)(()=>{let e=d.current;e.status!==`ready`||e.loadingMore||e.nextCursor===null||(a({...e,loadingMore:!0,moreFailed:!1}),f(e.nextCursor).then(({seq:e,page:t,error:i})=>{e===u.current&&a(e=>{if(e.status!==`ready`)return e;if(t===null)return n.error(`conversation-list: next page failed`,{projectId:r,error:i}),{...e,loadingMore:!1,moreFailed:!0};let a=new Set(e.rows.map(e=>e.id));return{status:`ready`,rows:[...e.rows,...t.items.map(ok).filter(e=>!a.has(e.id))],nextCursor:t.hasMore?t.nextCursor:null,loadingMore:!1,moreFailed:!1}})}))},[n,r,f]),remove:(0,R.useCallback)(async e=>{try{await t.request({method:Gn.conversationDelete.method,path:Gn.conversationDelete.path(e),schema:ak})}catch(t){return n.error(`conversation-list: delete failed`,{conversationId:e,error:t}),!1}return a(t=>t.status===`ready`?{...t,rows:t.rows.filter(t=>t.id!==e)}:t),!0},[t,n])}}var ck=6;function lk(e,t){let n=e.findIndex(e=>e.id===t);if(n<0)return null;let r=e[n+1]??e[n-1];return r===void 0?null:r.id}function uk({http:e,logger:t,projectId:n,currentConversationId:r,locale:i,copy:a,dismissLabel:o,onClose:s,onOpen:c,onNewConversation:l}){let u=sk({http:e,logger:t,projectId:n}),[d,f]=(0,R.useState)(!1),p=(0,R.useRef)(null),m=(0,R.useRef)(null),h=(0,R.useRef)(null),{state:g,loadMore:_}=u;(0,R.useEffect)(()=>{var e;(e=h.current)==null||e.focus()},[]),(0,R.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),s())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]);let v=g.status===`ready`&&g.nextCursor!==null&&!g.moreFailed;(0,R.useEffect)(()=>{let e=p.current,t=m.current;if(!v||e===null||t===null)return;let n=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&_()},{root:t,rootMargin:`100px`});return n.observe(e),()=>n.disconnect()},[v,_]);let y=(0,R.useMemo)(()=>new Intl.DateTimeFormat(i,{dateStyle:`medium`}),[i]),x=(e,t)=>{let n=lk(t,e.id);f(!1),u.remove(e.id).then(t=>{if(!t){f(!0);return}e.id===r&&(n===null?l():c(n))})},S=g.status===`ready`&&g.rows.length===0&&u.appliedSearch===``;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-drawer`,role:`dialog`,"aria-label":a.title,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-drawer-head`,children:[/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:a.close,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:s,ref:h,children:/* @__PURE__ */ (0,Z.jsx)(vr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:a.title}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(de,{size:14}),onClick:l,children:a.newChat})]}),(!S||d)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-drawer-tools`,children:[!S&&/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-drawer-search`,children:[/* @__PURE__ */ (0,Z.jsx)(b,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`search`,value:u.search,placeholder:a.search,"aria-label":a.searchLabel,onChange:e=>u.setSearch(e.target.value)})]}),d&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),role:`alert`,slim:!0,title:null,text:a.deleteFailed,dismiss:{label:o,onDismiss:()=>f(!1)},testId:`ai-chat-history-delete-failed`})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs`,ref:m,"aria-busy":g.status===`loading`||void 0,children:[g.status===`loading`&&Array.from({length:ck},(e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-conv-skeleton`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{}),/* @__PURE__ */ (0,Z.jsx)(`span`,{})]},t)),g.status===`failed`&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Qe,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.errorTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.errorText}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:u.retry,children:a.retry})]}),S&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,children:[/* @__PURE__ */ (0,Z.jsx)(hn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.emptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.emptyText})]}),g.status===`ready`&&g.rows.length===0&&u.appliedSearch!==``&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(b,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.noResults(u.appliedSearch)}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.noResultsText})]}),g.status===`ready`&&nk(g.rows,/* @__PURE__ */ new Date).map(({group:e,items:t})=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`group`,"aria-label":a.groups[e],children:[/* @__PURE__ */ (0,Z.jsx)(`h4`,{children:a.groups[e]}),t.map(e=>{let t=e.id===r,n=e.title!==null&&e.title.trim()!==``?e.title:a.untitled(y.format(e.updatedAt));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-conv${t?` qa-ai-chat-conv--current`:``}`,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-conv-main`,"aria-current":t?`true`:void 0,onClick:()=>c(e.id),children:[/* @__PURE__ */ (0,Z.jsx)(hn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-conv-title`,children:n}),e.fromReport&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-conv-ctx`,children:a.reportTag})]}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:a.delete(n),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm qa-ai-chat-conv-del`,onClick:()=>x(e,g.rows),children:/* @__PURE__ */ (0,Z.jsx)(C,{"aria-hidden":`true`})})})]},e.id)})]},e)),g.status===`ready`&&g.loadingMore&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-convs-more`,role:`status`,children:a.loadingMore}),g.status===`ready`&&g.moreFailed&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-convs-more`,children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:_,children:a.retry})}),v&&/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:p,className:`qa-ai-chat-convs-sentinel`,"aria-hidden":`true`})]})]})}var dk=/* @__PURE__ */ new Set;function fk(e){let{transport:t,stopOutcomes:n,conversationId:r,messages:i,confirmedCalls:a,historyLoading:o}=e,[s,c]=(0,R.useState)({conversationId:null,ids:dk}),[l,u]=(0,R.useState)({conversationId:null,ids:dk}),d=(0,R.useRef)({conversationId:null,ids:dk}),[f,p]=(0,R.useState)({conversationId:null,ids:dk}),m=(0,R.useRef)(!1),h=(0,R.useCallback)(()=>{let e=d.current;if(e.conversationId!==r||e.ids.size===0)return;p(t=>({conversationId:r,ids:/* @__PURE__ */ new Set([...t.conversationId===r?t.ids:[],...e.ids])})),c(t=>{if(t.conversationId!==r)return t;let n=new Set(t.ids);for(let t of e.ids)n.delete(t);return{conversationId:r,ids:n}});let t={conversationId:r,ids:dk};d.current=t,u(t)},[r]),g=(0,R.useCallback)(()=>{if(d.current.conversationId!==r)return;let e={conversationId:r,ids:dk};d.current=e,u(e)},[r]);(0,R.useEffect)(()=>n.subscribe(e=>{e.conversationId===r&&(e.accepted?h():g())}),[r,h,g,n]),(0,R.useEffect)(()=>t.subscribe(e=>{if(e.kind!==`event`)return;let t=e.event;if((t.type===`host-action`||t.type===`tool-result`)&&(c(e=>{let n=new Set(e.conversationId===r?e.ids:[]);return t.type===`host-action`?n.add(t.toolCallId):n.delete(t.toolCallId),{conversationId:r,ids:n}}),t.type===`tool-result`)){let e=d.current;if(e.conversationId===r&&e.ids.has(t.toolCallId)){let n=new Set(e.ids);n.delete(t.toolCallId);let i={conversationId:r,ids:n};d.current=i,u(i)}}}),[r,t]),(0,R.useEffect)(()=>{if(m.current&&!o){let e={conversationId:r,ids:dk};d.current=e,u(e),c({conversationId:r,ids:dk}),p({conversationId:r,ids:dk})}m.current=o},[r,o]);let _=l.conversationId===r?l.ids:dk,v=f.conversationId===r?f.ids:dk,y=(0,R.useMemo)(()=>{let e=new Set(s.conversationId===r?s.ids:[]);for(let t of i){let n=t.pendingToolCall;(n==null?void 0:n.hostActionContinuationStatus)===`pending`&&e.add(n.toolCallId)}for(let t of _)e.delete(t);for(let t of v)e.delete(t);for(let t of a.values())t.result!==null&&e.delete(t.toolCallId);return[...e].join(`
372
+ `)},[a,r,s,i,_,v]),b=(0,R.useMemo)(()=>new Set(y===``?[]:y.split(`
373
+ `)),[y]);return{pendingIds:b,stoppingIds:_,markStopping:(0,R.useCallback)(()=>{let e={conversationId:r,ids:b};d.current=e,u(e)},[r,b])}}function pk(e,t){switch(e){case`connecting`:case`connected`:return null;case`reconnecting`:case`lost`:return/* @__PURE__ */ (0,Z.jsx)($O,{tone:`warning`,lead:`spinner`,role:`none`,slim:!0,title:t.reconnecting,text:null,testId:`ai-chat-connection-${e}`});case`restored`:return/* @__PURE__ */ (0,Z.jsx)($O,{tone:`success`,lead:/* @__PURE__ */ (0,Z.jsx)(Ue,{}),role:`none`,slim:!0,title:null,text:t.restored,testId:`ai-chat-connection-restored`});case`failed`:return/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qn,{}),role:`alert`,title:t.failedTitle,text:t.failedText,testId:`ai-chat-connection-failed`})}}function mk({connectionStatus:e,labels:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-live-region`,role:`status`,"aria-live":`polite`,children:pk(e,t)})}function hk(e,t,n){return e.every(e=>e.release===`on-reconnect`)?n.textReconnect:e.some(e=>e.release===`manual`&&e.inTranscript)?n.textFailed:t?n.textReady:n.textWaiting}function gk({turns:e,canSend:t,onSend:n,onDiscard:r,cause:i,filesOf:a,copy:o}){let s=e.map(e=>({turn:e,files:a(e)})),c=null;for(let e of s)e.files.refusal!==null&&(c=e.files.refusal);return/* @__PURE__ */ (0,Z.jsx)($O,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(nn,{}),role:`status`,title:o.title(e.length),text:i??(c===null?hk(e,t,o):c.sentence),extra:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-unsent`,"aria-label":o.listLabel,children:s.map(({turn:e,files:i})=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-unsent-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-unsent-text`,children:e.text}),i.label!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-unsent-files`,children:[/* @__PURE__ */ (0,Z.jsx)(Qr,{"aria-hidden":`true`}),i.label]})]}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:o.send(e.text),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,disabled:!t||i.refusal!==null&&!i.refusal.resendable,onClick:()=>n(e.id),children:/* @__PURE__ */ (0,Z.jsx)(nn,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:o.discard(e.text),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,onClick:()=>r(e.id),children:/* @__PURE__ */ (0,Z.jsx)(C,{"aria-hidden":`true`})})})]},e.id))}),testId:`ai-chat-unsent`})}function _k({url:e}){return e===null?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-tabline`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tabline-fav`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tabline-url`,children:e})]})}function vk({connection:e,readiness:t,capabilities:n,onReloadCapabilities:r,unsent:i,interruptedTurnId:a,reportInitializing:o,onRetryLastTurn:s,historyFailed:c,onRetryHistory:l,stopFailure:u,permissionWriteFailure:d,permissionReadFailure:f,pageScan:p,context:m,copy:h}){let g=h.notices,[_,v]=(0,R.useState)(null),[y,b]=(0,R.useState)(null),[x,S]=(0,R.useState)(null),C=e=>({label:g.dismiss,onDismiss:e}),w=e=>h.composer.permission[e];p!==null&&p.status!==`idle`&&x!==null&&S(null);let T=p!==null&&p.failureReason!==null&&p.failureReason!==x?p.failureReason:null;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-lane`,"data-testid":`ai-chat-lane`,children:[/* @__PURE__ */ (0,Z.jsx)(mk,{...e}),t.kind===`needs-sign-in`&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(tn,{}),role:`status`,title:g.readiness.signInTitle,text:g.readiness.signInText,testId:`ai-chat-readiness-sign-in`}),t.kind===`needs-project`&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(Ir,{}),role:`status`,title:g.readiness.projectTitle,text:g.readiness.projectText,testId:`ai-chat-readiness-project`}),n!==null&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),role:`alert`,title:g.capabilities.title,text:`${n.kind===`timed-out`?g.capabilities.timedOut:g.capabilities.loadFailed} ${g.capabilities.sendBlocked}`,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(me,{size:14}),onClick:r,children:g.capabilities.retry}),testId:`ai-chat-capabilities-unavailable`}),i.turns.length>0&&/* @__PURE__ */ (0,Z.jsx)(gk,{turns:i.turns,canSend:i.canSend,onSend:i.onSend,onDiscard:i.onDiscard,cause:i.cause,filesOf:i.filesOf,copy:g.unsent}),a!==null&&a!==_&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(hn,{}),role:`status`,title:g.interrupted.title,text:g.interrupted.text,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:s,children:g.interrupted.retry}),dismiss:C(()=>v(a)),testId:`ai-chat-interrupted`}),o&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`neutral`,lead:/* @__PURE__ */ (0,Z.jsx)(zr,{}),role:`status`,title:g.reportInitializing.title,text:g.reportInitializing.text,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(me,{size:14}),onClick:s,children:g.reportInitializing.retry}),testId:`ai-chat-report-initializing`}),c&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),role:`alert`,title:null,text:g.history.loadFailed,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:l,children:g.history.retry}),testId:`ai-chat-history-failed`}),u!==null&&u!==y&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(ui,{}),role:`alert`,title:null,text:h.transcript.stopFailed[u.reason],dismiss:C(()=>b(u)),testId:`ai-chat-stop-failed`}),f!==null&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),role:`alert`,title:g.permissionReadFailed.title,text:g.permissionReadFailed.text,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:f.onRetry,children:g.permissionReadFailed.retry}),testId:`ai-chat-permission-read-failed`}),d!==null&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),role:`alert`,title:g.permissionWriteFailed.title(w(d.attempted)),text:d.scope===`conversation`?g.permissionWriteFailed.textConversation(w(d.kept)):g.permissionWriteFailed.textNewConversation(w(d.kept)),actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:d.onRetry,children:g.permissionWriteFailed.retry}),dismiss:C(d.onDismiss),testId:`ai-chat-permission-write-failed`}),p!==null&&p.status!==`idle`&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`info`,lead:`spinner`,role:`status`,title:p.status===`scanning`?g.pageScan.scanning:g.pageScan.delivering,text:null,extra:/* @__PURE__ */ (0,Z.jsx)(_k,{url:p.tabUrl}),actions:p.status===`delivering`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-notice-bar`,"aria-hidden":`true`}):void 0,testId:`ai-chat-page-${p.status}`}),T!==null&&/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),role:`alert`,title:g.pageScan.failedTitle,text:g.pageScan.failed[T],dismiss:C(()=>S(T)),testId:`ai-chat-page-scan-failed`}),m]})}var yk={report:`message`,"runner-readiness":`step`,"runner-enrollment":`step`,"section-link":`message`,search:`step`,scenario:`step`,coverage:`step`,"run-start-agent":`step`,"run-in-tab-outcome":`step`};function bk(e){let t=Object.keys(qO).find(t=>JO[t].declares(e));if(t!==void 0)return{family:t,grouping:qO[t].grouping};let n=Object.keys(yk).find(t=>JO[t].declares(e));return n===void 0?null:{family:n,grouping:yk[n]}}var xk={isRenderableToolResult(e){if(bk(e)!==null)return!0;let t=im(e);return t!==void 0&&t.length>0}},Sk=class{constructor(){this.levels=/* @__PURE__ */ new Map,this.selectionRead=null,this.listeners=/* @__PURE__ */ new Set}get(e){let t=this.levels.get(e);return t===void 0?null:t}startLoad(e){let t={level:null},n=this.selectionRead;return n!==null&&n.load===null&&n.state.conversationId===e&&(n.load=t),{record(e){t.level=e}}}followAdoptions(e,t){let n=e.getSnapshot().historyLoad;return e.subscribe(()=>{let r=e.getSnapshot(),i=n,a=r.historyLoad;if(a===i)return;n=a;let o=this.selectionRead;this.selectionRead=a.status===`loading`?{state:a,load:null}:null,i.status===`loading`&&a.status===`idle`&&r.conversationId===i.conversationId&&this.adopt(i.conversationId,o!==null&&o.state===i?o.load:null,t)})}adopt(e,t,n){if(t===null){n.error(`chat launch level: the session adopted a history load this store never saw start`,{conversationId:e});return}if(t.level===null){n.error(`chat launch level: the session adopted a history load that recorded no level`,{conversationId:e});return}if(!this.levels.has(e)){this.levels.set(e,t.level);for(let e of this.listeners)e()}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},Ck=[`overview`,`stability`,`weak-spots`,`bug-hotspots`],wk=`stability`,Tk=I({version:bt(1),view:Ct(Ck),window:Ct(Ft).nullable(),filters:I({status:Ct(At).optional()}).optional(),selectedEntity:I({type:Ct(Dt),id:jt()}).optional()}).refine(e=>e.view===wk==(e.window===null),{message:`window must be null for view 'stability' (run-count basis) and non-null for every other view`,path:[`window`]}).refine(e=>{var t;return((t=e.filters)==null?void 0:t.status)===void 0||e.view===wk},{message:`filters.status is accepted only for view 'stability' \u2014 no other report endpoint or tool takes a status filter`,path:[`filters`,`status`]}),Ek=I({toolCallId:L().min(1),toolName:L().min(1),title:I({ru:L().min(1),en:L().min(1)}).optional(),operationTitles:F(I({ru:L().min(1),en:L().min(1)})).optional(),args:Gt(),display:$n.nullable(),status:Gt().optional(),hostActionContinuationStatus:Ct([`pending`,`running`,`completed`,`stopped`,`cancelled`]).optional()}),Dk=F(I({ru:L().trim().min(1),en:L().trim().min(1)})),Ok=I({id:L().min(1),kind:L().min(1),revision:Wt().int(),state:Ct([`active`,`terminal`,`superseded`]),payload:I({}).passthrough()}),kk=I({id:L().min(1),role:L(),content:L().nullable(),toolCalls:Gt(),toolResults:Gt(),blocks:F(Ok).optional(),pendingToolCall:Ek.nullable().optional(),agentOrigin:Gt().optional(),createdAt:L().optional(),attachments:F(Hn)}),Ak=Ct(vo),jk=I({messages:F(kk),decisionLaneCompletedIds:F(L()),reportContext:Gt().optional(),permissionMode:Ct(vt).nullable(),permissionModeVersion:Wt().int().positive().nullable(),launchLevel:qt}).extend({windowFirstMessageId:L().min(1).nullable(),olderCursor:L().min(1).nullable(),filesBefore:F(Hn)}),Mk=class{constructor(){this.contexts=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Set}get(e){let t=this.contexts.get(e);return t===void 0?null:t}record(e,t){if(this.contexts.get(e)!==t){this.contexts.set(e,t);for(let e of this.listeners)e()}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}};function Nk(e){return typeof e==`object`&&!!e}function Pk(e,t){if(!Array.isArray(e))return;let n=e.flatMap(e=>{if(!Nk(e))return t.error(`chat history: persisted toolCalls entry is not an object \u2014 dropped`,{entryType:e===null?`null`:typeof e}),[];let{toolCallId:n,toolName:r,args:i,contentOffset:a,title:o,effect:s,operationTitles:c}=e;if(typeof n!=`string`||n===``||typeof r!=`string`)return t.error(`chat history: persisted toolCalls entry without toolCallId/toolName \u2014 dropped`,{keys:Object.keys(e)}),[];let l=Dk.safeParse(c);return[{toolCallId:n,toolName:r,args:i,...Nk(o)&&typeof o.ru==`string`&&typeof o.en==`string`&&o.ru.trim().length>0&&o.en.trim().length>0&&{title:{ru:o.ru,en:o.en}},...(s===`read`||s===`reversible`||s===`irreversible`)&&{effect:s},...l.success&&{operationTitles:l.data},...typeof a==`number`&&Number.isInteger(a)&&a>=0&&{contentOffset:a}}]});return n.length>0?n:void 0}function Fk(e,t){if(!Array.isArray(e))return Nk(e)?[{toolCallId:`${t}:result`,result:e}]:void 0;let n=e.flatMap(e=>Nk(e)&&typeof e.toolCallId==`string`&&e.toolCallId!==``?[{toolCallId:e.toolCallId,result:e.result}]:[]);return n.length>0?n:void 0}function Ik(e,t){let n=e.toolResults===void 0?[]:e.toolResults;n.some(e=>e.toolCallId===t.toolCallId)||(e.toolResults=[...n,t])}function Lk(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role===`assistant`)return n}}function Rk(e,t){let n=[],r=/* @__PURE__ */ new Map;for(let i of e){if(i.role===`assistant`||i.role===`user`||i.role===`agent`){let e=Pk(i.toolCalls,t),a={id:i.id,content:i.content===null?``:i.content,toolCalls:e,toolResults:Fk(i.toolResults,i.id),...i.blocks!==void 0&&{blocks:i.blocks},...i.pendingToolCall!==void 0&&{pendingToolCall:i.pendingToolCall},...i.attachments.length>0&&{attachments:i.attachments}},o;if(i.role===`agent`){let e=Ak.safeParse(i.agentOrigin);if(!e.success){t.error(`History agent row without a known agentOrigin \u2014 left out`,{messageId:i.id,agentOrigin:i.agentOrigin});continue}if(e.data===`workflow_lead`){if(i.createdAt===void 0){t.error(`History lead prose row without createdAt \u2014 left out`,{messageId:i.id});continue}o={...a,role:`agent`,agentOrigin:`workflow_lead`,createdAt:i.createdAt}}else o={...a,role:`agent`,agentOrigin:e.data}}else o={...a,role:i.role};if(n.push(o),i.role===`assistant`&&e!==void 0)for(let t of e)r.set(t.toolCallId,n.length-1);continue}if(i.role!==`tool`)continue;let e=Fk(i.toolResults,i.id);if(e!==void 0)for(let t of e){let e=r.get(t.toolCallId),i=e===void 0?Lk(n):n[e];i!==void 0&&i.role===`assistant`&&Ik(i,t)}}return n}function zk(e,t,n){if(t===null)return{messages:Rk(e,n),windowFirstMessageId:null};let r=e.findIndex(e=>e.id===t);if(r<0)throw Error(`Conversation history page names windowFirstMessageId ${t}, which is not among its messages`);let i=Rk(e.slice(0,r),n),a=Rk(e.slice(r),n),[o]=a;if(o===void 0)throw Error(`Conversation history window starting at ${t} has no row this build can draw`);return{messages:[...i,...a],windowFirstMessageId:o.id}}function Bk(e){switch(e){case void 0:case`pending`:return!0;case`confirmed`:case`rejected`:case`failed`:case`closed`:return!1}}function Vk(e,t){let n=[],r=[];for(let i of e){if(i.role!==`assistant`||i.pendingToolCall==null)continue;let e=HS(i.content,i.pendingToolCall);if(e.kind===`pending-tool-call`){if(!Bk(e.status)){r.push(e.toolCallId);continue}if(e.display===null){t.debug(`chat history: unanswered confirmation without persisted facts \u2014 not re-offered`,{messageId:i.id,toolName:e.toolName});continue}n.push({toolCallId:e.toolCallId,toolName:e.toolName,...i.pendingToolCall.title!==void 0&&{title:i.pendingToolCall.title},...i.pendingToolCall.operationTitles!==void 0&&{operationTitles:i.pendingToolCall.operationTitles.map(e=>({...e}))},args:e.args,description:``,display:e.display,status:`open`,anchorMessageId:null})}}return{pendingConfirmations:n,answeredToolCallIds:r}}var Hk=I({id:L().min(1),permissionMode:Ct(vt),permissionModeVersion:Wt().int().positive()}),Uk=`assistant.conversations.permission_mode_stale`;function Wk(e){let{http:t,logger:n,reportContexts:r,launchLevels:i}=e;return{async create(e,n){let r;try{r=await t.request({method:Gn.conversationCreate.method,path:Gn.conversationCreate.path(),body:{projectId:e,mode:`copilot`,permissionMode:n},schema:Hk})}catch(e){throw e instanceof Yn&&e.status===409&&e.errorCode===Uk?new wl(e.message):e}return{id:r.id,permissionMode:r.permissionMode,permissionModeVersion:r.permissionModeVersion}},async loadLatest(e,a){let o=i.startLoad(e),s;try{s=await t.request({method:Gn.conversationMessages.method,path:Gn.conversationMessages.path(e,{mode:`latest`,limit:30,decisionLaneId:a.decisionLaneId,outstandingCallIds:a.outstandingCallIds}),schema:jk})}catch(e){if(e instanceof Yn&&e.status===404)return{kind:`not-found`};throw e}if(s.reportContext===void 0||s.reportContext===null)r.record(e,null);else{let t=Tk.safeParse(s.reportContext);t.success?r.record(e,t.data):(n.warn(`chat history: reportContext failed validation \u2014 no report banner`,{conversationId:e,issues:t.error.issues.map(e=>e.message)}),r.record(e,null))}o.record(s.launchLevel);let{messages:c,windowFirstMessageId:l}=zk(s.messages,s.windowFirstMessageId,n);return{kind:`found`,page:{messages:c,windowFirstMessageId:l,olderCursor:s.olderCursor,filesBefore:s.filesBefore,...Vk(c,n),decisionLaneCompletedIds:s.decisionLaneCompletedIds,permissionMode:s.permissionMode,permissionModeVersion:s.permissionModeVersion}}},async loadOlder(e,r){let i;try{i=await t.request({method:Gn.conversationMessages.method,path:Gn.conversationMessages.path(e,{mode:`before`,limit:30,olderCursor:r}),schema:jk})}catch(e){if(e instanceof Yn&&e.status===404)return{kind:`not-found`};throw e}return{kind:`found`,page:{messages:Rk(i.messages,n),olderCursor:i.olderCursor}}}}}var Gk=I({id:L().min(1)}),Kk={kind:`reading`},qk={kind:`unknown`},Jk=class{constructor(e){this.state=Kk,this.started=!1,this.disposed=!1,this.listeners=/* @__PURE__ */ new Set,this.request=()=>{if(this.started||this.disposed)return;this.started=!0;let e=Gn.currentUser;this.deps.http.request({method:e.method,path:e.path(),schema:Gk}).then(({id:e})=>({kind:`known`,id:e}),e=>(this.deps.logger.warn(`chat.viewer.read_failed`,{error:e instanceof Error?e.name:typeof e,status:e instanceof Yn?e.status:null}),qk)).then(e=>{if(!this.disposed){this.state=e;for(let e of this.listeners)e()}})},this.read=()=>this.state,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.deps=e}dispose(){this.disposed=!0,this.listeners.clear()}},Yk=5e3,Xk=3e4,Zk=1.5,Qk=Yk,$k=Ho({baseIntervalMs:Yk,maxIntervalMs:Xk,backoffFactor:Zk,isTerminal:e=>ir(e)===`terminal`,activityStamp:e=>e.lastActivityAt}),eA=class extends Error{constructor(){super(`Agent job status read did not answer within ${String(Qk)} ms`),this.name=`ReadTimeoutError`}};function tA(e){return e instanceof eA?{code:`read_timeout`,message:e.message}:e instanceof Yn?{code:e.errorCode===null?`http_${String(e.status)}`:e.errorCode,message:e.message}:{code:`network_error`,message:e instanceof Error?e.message:String(e)}}var nA=class{constructor(e){this.deps=e,this.state=Fo(),this.holders=/* @__PURE__ */ new Map,this.readTokens=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Set,this.timer=null,this.cycleInFlight=!1,this.disposed=!1,this.dispatchVisibility(),this.unsubscribeVisibility=e.visibility.subscribe(()=>this.dispatchVisibility())}watch(e){let t=e.agentJobId,n=this.holders.get(t);this.holders.set(t,n===void 0?1:n+1),this.apply({type:`WATCH`,agentJobId:t,seed:e,now:Date.now()});let r=!1;return()=>{if(r)return;r=!0;let e=this.holders.get(t);if(e!==void 0){if(e>1){this.holders.set(t,e-1);return}this.holders.delete(t),this.readTokens.delete(t),this.apply({type:`UNWATCH`,agentJobId:t})}}}latest(e){let t=this.state.watched[e];return t===void 0?null:t.view}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}refresh(e){this.state.watched[e]!==void 0&&this.read(e)}dispose(){this.disposed=!0,this.unsubscribeVisibility(),this.timer!==null&&clearTimeout(this.timer.handle),this.timer=null,this.listeners.clear()}dispatchVisibility(){let e=!this.deps.visibility.get();e!==this.state.hidden&&this.apply({type:`VISIBILITY`,hidden:e,now:Date.now()})}apply(e){if(this.disposed)return;let t=$k(this.state,e);if(t!==this.state){this.state=t,this.reconcileTimer();for(let e of this.listeners)e()}}reconcileTimer(){let e=Vo(this.state),t=this.timer;if(e===null){t!==null&&clearTimeout(t.handle),this.timer=null;return}(t===null||t.dueAt!==e)&&(t!==null&&clearTimeout(t.handle),this.timer={dueAt:e,handle:setTimeout(()=>this.onTimer(),Math.max(0,e-Date.now()))})}onTimer(){if(this.timer=null,this.disposed||this.cycleInFlight)return;let e=Date.now(),t=Bo(this.state,e);if(t.length===0){this.reconcileTimer();return}this.cycleInFlight=!0,this.apply({type:`TICK`,now:e}),Promise.all(t.map(e=>this.read(e))).finally(()=>{this.cycleInFlight=!1,this.reconcileTimer()})}async read(e){let t=this.readTokens.get(e),n=t===void 0?1:t+1;this.readTokens.set(e,n);let r=null,i=new Promise((e,t)=>{r=setTimeout(()=>t(new eA),Qk)});try{let t=await Promise.race([this.deps.http.request({method:Gn.agentJobStatus.method,path:Gn.agentJobStatus.path(e),schema:g}),i]);if(this.readTokens.get(e)!==n)return;this.apply({type:`READ_OK`,agentJobId:e,view:t,now:Date.now()})}catch(t){if(this.readTokens.get(e)!==n)return;this.deps.logger.error(`Agent job status read for the chat card failed`,{agentJobId:e,error:t instanceof Error?t.message:String(t)}),this.apply({type:`READ_FAIL`,agentJobId:e,error:tA(t),now:Date.now()})}finally{r!==null&&clearTimeout(r)}}},rA=I({swarm:I({maxAgents:Kt})});async function iA(e){return{maxAgents:(await e.request({method:Gn.aiSettingsUser.method,path:Gn.aiSettingsUser.path(),schema:rA})).swarm.maxAgents}}var aA=[`runner_cards.v1`];function oA(e){return e.browser===null?{runnerType:`web`,clientCapabilities:aA}:{runnerType:`extension`,clientCapabilities:aA,panelId:e.browser.panelId}}var sA=Ct(vt),cA=I({permissionMode:sA,permissionModeVersion:Wt().int().positive()}),lA=I({permissionMode:sA});function uA(e){let{http:t}=e;return{async setConversationMode(e,n){let r=await t.request({method:Gn.conversationPermissionMode.method,path:Gn.conversationPermissionMode.path(e),body:{permissionMode:n},schema:cA});return{permissionMode:r.permissionMode,permissionModeVersion:r.permissionModeVersion}},async readLastChoice(){return(await t.request({method:Gn.lastPermissionModeRead.method,path:Gn.lastPermissionModeRead.path(),schema:lA})).permissionMode},async writeLastChoice(e){return(await t.request({method:Gn.lastPermissionModeWrite.method,path:Gn.lastPermissionModeWrite.path(),body:{permissionMode:e},schema:lA})).permissionMode}}}function dA(e){let t=null,n=/* @__PURE__ */ new Set,r=e=>{for(let t of n)t(e)};return{transport:{async open(n){t=n.conversationId,await e.open(n)},close(){t=null,e.close()},async send(n){let i=n.name===`chat-stop`?t:null;try{let t=await e.send(n);return i!==null&&r({conversationId:i,accepted:t.status===`accepted`}),t}catch(e){throw i!==null&&r({conversationId:i,accepted:!1}),e}},subscribe(t){return e.subscribe(t)},getStatus(){return e.getStatus()}},stopOutcomes:{subscribe(e){return n.add(e),()=>n.delete(e)}}}}function fA(e){return{read:()=>Promise.resolve(e.conversationId),remember:()=>Promise.resolve(),forget:()=>Promise.resolve()}}function pA(e){let t=new Mk,n=new Sk,{transport:r,stopOutcomes:i}=dA(e.transport),a=Wn({http:e.http,logger:e.logger}),o=hu({transport:r,clock:gu(),policy:Sl,tools:xk,conversations:Wk({http:e.http,logger:e.logger,reportContexts:t,launchLevels:n}),permissionModes:uA({http:e.http}),memory:e.conversationPin===null?e.conversationMemory:fA(e.conversationPin),capabilities:{load:async()=>{let[t,n]=await Promise.all([a.load(),iA(e.http)]);return{...t,swarm:n}},resolveSelection:t=>{let n=e.modelSelection.read();return n===null?null:Ln(t,n)}},browser:e.browser,activeObject:()=>e.conversationContext===null?null:e.conversationContext.activePageObject.get(),open:oA(e),logger:e.logger}),s=n.followAdoptions(o,e.logger),c=new nA({http:e.http,logger:e.logger,visibility:e.visibility}),l=new Jk({http:e.http,logger:e.logger});return{session:o,stopOutcomes:i,reportContexts:t,launchLevels:n,jobStatus:c,viewer:l,dispose(){s(),c.dispose(),l.dispose(),o.dispose()}}}function mA(e){let[t,n]=(0,R.useState)(null);return(0,R.useLayoutEffect)(()=>{let t=pA(e);return n(t),()=>{t.dispose(),n(null)}},[e]),t}function hA(e){let{session:t}=e,n=(0,R.useCallback)(e=>t.subscribe(e),[t]);return(0,R.useSyncExternalStore)(n,()=>t.getSnapshot())}function gA(e,t){let{unsent:n,unaccepted:r}=t;(0,R.useEffect)(()=>{if(e!==null&&n)return e.setUnsentWaiting(!0),()=>{e.setUnsentWaiting(!1)}},[e,n]),(0,R.useEffect)(()=>{if(e!==null&&r)return e.setUnacceptedWaiting(!0),()=>{e.setUnacceptedWaiting(!1)}},[e,r])}function _A(e,t){return e===null||t===null?e===t:e.keySource===t.keySource&&e.modelId===t.modelId}function vA(e){let t=(0,R.useRef)(null),n=(0,R.useCallback)(t=>e.subscribe(t),[e]),r=(0,R.useCallback)(()=>{let n=e.read();return _A(t.current,n)||(t.current=n),t.current},[e]);return(0,R.useSyncExternalStore)(n,r)}function yA(e){let{session:t,store:n,capabilityLoad:r}=e,i=vA(n);return(0,R.useEffect)(()=>{r.status===`ready`&&t.setModelSelection(i===null?null:Ln(r.value,i))},[r,t,i]),(0,R.useCallback)((e,r)=>{n.write({keySource:e,modelId:r.id}),t.setModelSelection(r.selectionId)},[t,n])}function bA(e){return e.scope===`conversation`?`conversation:${e.conversationId}`:`last-choice`}function xA(e){let{session:t,view:n,ready:r,newConversation:i,visible:a}=e,[o,s]=(0,R.useState)(null),[c,l]=(0,R.useState)(null),u=n.kind===`known`?{identity:bA(n),value:n.value,writeStatus:n.write.status}:null;if(u===null)c!==null&&l(null);else if(u.identity!==(o==null?void 0:o.identity)||u.value!==o.value||u.writeStatus!==o.writeStatus){s(u);let e=o!==null&&u.identity===o.identity,t=e&&u.value!==o.value,n=u.writeStatus===`writing`||(o==null?void 0:o.writeStatus)===`writing`;t&&!n?l(u.value):(!e||t||u.writeStatus===`writing`)&&l(null)}let d=c!==null&&n.kind===`known`&&n.write.status===`failed`;(0,R.useEffect)(()=>{d&&t.dismissPermissionModeWriteFailure()},[d,t]),(0,R.useEffect)(()=>{a&&i&&t.refreshLastPermissionMode()},[a,i,t]);let f=(0,R.useCallback)(()=>l(null),[]),p=(0,R.useCallback)(e=>t.setPermissionMode(e),[t]),m=n.kind===`known`?n:null,h=m!==null&&m.write.status===`failed`?{attempted:m.write.attempted,kept:m.value,scope:m.scope,onRetry:()=>t.retryPermissionModeWrite(),onDismiss:()=>t.dismissPermissionModeWriteFailure()}:null;return{readFailure:n.kind===`unknown`&&n.read===`failed`?{onRetry:()=>t.refreshLastPermissionMode()}:null,composer:{value:m===null?null:m.value,disabled:!r||m===null||m.write.status===`writing`,arrival:c===null?null:{onShown:f},onChange:p},failure:h,announced:c}}var SA=`chat_request_user_input`;function CA(e){switch(e){case`chat.question.forbidden`:return`unauthorized`;case`chat.question.continuation_unavailable`:return`unavailable`;case`chat.question.not_found`:case`chat.question.revision_conflict`:case`chat.question.stale_answer`:case`chat.question.already_pending`:return`stale`;default:return`retryable`}}function wA(e){switch(e.kind){case`accepted`:return null;case`rejected`:return CA(e.errorCode);case`failed`:return`retryable`}}function TA(e){let{session:t,conversationId:n,messages:r,restoredBatchIds:i,locale:a,logger:o}=e,[s,c]=(0,R.useState)(null),[u,d]=(0,R.useState)(null),f=(0,R.useRef)(/* @__PURE__ */ new Map),p=(0,R.useCallback)((e,t)=>{c(t=>t===e?null:t),d({batchId:e,kind:t})},[]),m=(0,R.useCallback)(async e=>{if(!e.inFlight){if(n===null){o.warn(`chat question action: no conversation bound`,{batchId:e.batchId}),p(e.batchId,`nonretryable`);return}if(globalThis.crypto===void 0||!(`subtle`in globalThis.crypto)){o.warn(`chat question action: crypto.subtle unavailable (insecure context)`,{batchId:e.batchId}),p(e.batchId,`nonretryable`);return}e.inFlight=!0,c(e.batchId),d(null);try{e.idempotencyKey===null&&(e.idempotencyKey=await Po(n,e.fingerprint));let r={batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey},i=e.kind===`answer`?await t.answerQuestion({...r,answers:e.answers}):await t.cancelQuestion(r);if(f.current.get(e.batchId)!==e)return;let a=wA(i);if(a===null){c(t=>t===e.batchId?null:t);return}p(e.batchId,a)}catch(t){o.warn(`chat question action failed before it was sent`,{batchId:e.batchId,error:t instanceof Error?t.message:String(t)}),p(e.batchId,`retryable`)}finally{e.inFlight=!1}}},[n,o,t,p]);(0,R.useEffect)(()=>{let e=new Set(r.flatMap(e=>e.blocks??[]).flatMap(e=>{let t=ab(e);return t===null?[]:[t]}).filter(e=>e.status!==`pending`).map(e=>e.id));if(e.size!==0){for(let t of e)f.current.delete(t);c(t=>t!==null&&e.has(t)?null:t),d(t=>t!==null&&e.has(t.batchId)?null:t)}},[r]),(0,R.useEffect)(()=>{let e=f.current;return()=>{e.clear(),c(null),d(null)}},[n]);let h=(0,R.useCallback)((e,t,n)=>{let r=Mo(e,t,n),i=f.current.get(e),a=i!==void 0&&i.fingerprint===r?i:{kind:`answer`,batchId:e,revision:t,answers:n,fingerprint:r,idempotencyKey:null,inFlight:!1};return f.current.set(e,a),m(a)},[m]),g=(0,R.useCallback)((e,t)=>{let n=No(e,t),r=f.current.get(e),i=r!==void 0&&r.fingerprint===n?r:{kind:`cancel`,batchId:e,revision:t,fingerprint:n,idempotencyKey:null,inFlight:!1};return f.current.set(e,i),m(i)},[m]),_=(0,R.useCallback)(e=>{let t=f.current.get(e);if(t!==void 0)return m(t)},[m]),v=(0,R.useCallback)(e=>{d(t=>t!==null&&t.batchId===e?null:t)},[]),y=r.flatMap(e=>e.role===`assistant`&&Sa(e).length===0&&e.toolCalls!==void 0&&e.toolCalls.some(e=>e.toolName===SA)?[e.id]:[]).join(`
374
+ `),b=(0,R.useMemo)(()=>y===``?[]:y.split(`
375
+ `),[y]),x=r.flatMap(e=>e.blocks??[]).filter(l).map(e=>`${e.payload.workflowId}\t${e.payload.workers.some(e=>e.unit!==null)?`1`:`0`}`).join(`
376
+ `),S=(0,R.useMemo)(()=>{let e=/* @__PURE__ */ new Map;for(let t of x===``?[]:x.split(`
377
+ `)){let[n,r]=t.split(` `);n!==void 0&&!e.has(n)&&e.set(n,r===`1`)}return t=>{let n=e.get(t);return n===void 0?null:n}},[x]),C=(0,R.useMemo)(()=>{let e=new Intl.DateTimeFormat(a,{dateStyle:`medium`,timeStyle:`short`});return t=>e.format(new Date(t))},[a]);return(0,R.useMemo)(()=>({pendingBatchId:s,error:u,restoredBatchIds:i,loadingAssistantMessageIds:b,onAnswer:h,onCancel:g,onRetry:_,onRefresh:v,formatResolvedAt:C,workflowAgentsWorking:S}),[u,C,S,b,h,g,v,_,s,i])}var EA=[`managed`,`company`,`personal`];function DA(e){return EA.includes(e)}function OA(e){let{transport:t,logger:n,conversationId:r,recordResolvedConfirmation:i}=e,[a,o]=(0,R.useState)(null);return(0,R.useEffect)(()=>t.subscribe(e=>{if(e.kind!==`event`)return;let t=e.event;if(t.type===`usage`){let{provider:e,model:i}=t;if(e===void 0||i===void 0)return;if(!DA(e)){n.warn(`usage echo: provider outside the client contract`,{provider:e,model:i});return}o({conversationId:r,value:{provider:e,model:i}});return}let a=eC(t);a.kind===`pairing`?i(a.pairing):a.kind===`malformed`&&n.warn(`action-resolved frame without a usable pairing`,{issuePaths:a.issuePaths})}),[r,n,i,t]),a!==null&&a.conversationId===r?a.value:null}var kA={rate_limited:`rateLimit`,rate_limit:`rateLimit`,credits_exhausted:`credits`,credit_limit:`credits`,auth_failed:`auth`,auth_expired:`auth`,provider_error:`connection`,reconnect_failed:`connection`,"client.stream_stalled":`stalled`,"client.connection_lost_during_stream":`streamCut`},AA=/* @__PURE__ */ new Set([`ai.model_not_configured`,`ai_settings.company_not_found`,`ai.company_not_found`,`ai.user_disabled`]);function jA(e){if(e===null||!Object.prototype.hasOwnProperty.call(kA,e))return null;let t=kA[e];return t===void 0?null:t}function MA(e){let t=jA(e.errorCode);if(t!==null)return t;let n=jA(e.code);return n===null?`generic`:n}function NA(e){return e.errorCode!==null&&AA.has(e.errorCode)||e.code!==null&&AA.has(e.code)}function PA(e,t){if(t===null||!Object.prototype.hasOwnProperty.call(e,t))return null;let n=e[t];return n===void 0?null:n}function FA(e,t){let n=PA(e.byProviderCode,t.providerErrorCode);if(n!==null)return n;let r=PA(e.byCode,t.errorCode);if(r!==null)return r;let i=PA(e.byCode,t.code);return i===null?t.message:i}function IA(e){return t=>{let n=MA(t),r=!NA(t);return{errorClass:n,title:e.classes[n].title,text:FA(e.errors,t),hint:r?e.classes[n].hint:null,retryable:r}}}function LA(e){if(e.role!==`agent`)return{role:e.role};if(e.agentOrigin===`agent_question`)return{role:`agent`,agentOrigin:`agent_question`};if(e.createdAt===void 0)throw Error(`Lead prose row ${e.id} reached the transcript without createdAt`);return{role:`agent`,agentOrigin:`workflow_lead`,createdAt:e.createdAt}}function RA(e){switch(e){case`confirmed`:case`failed`:case`rejected`:case`closed`:return!1;case`pending`:case void 0:return!0}}function zA(e){return{id:e.toolCallId,toolName:e.toolName,...e.title!==void 0&&{title:e.title},...e.effect!==void 0&&{effect:e.effect},...e.operationTitles!==void 0&&{operationTitles:e.operationTitles},args:e.args,...e.contentOffset!==void 0&&{contentOffset:e.contentOffset}}}function BA(e,t,n,r){let i=t.kind===`pending-tool-call`||n!==void 0;return{id:e.id,...LA(e),content:t.kind===`prose`?t.text:``,...t.kind===`error`&&{error:{...t.code!==void 0&&{code:t.code},message:t.message}},...n!==void 0&&{toolCallStatus:n},...t.kind===`pending-tool-call`&&qy(t)&&{answersLeadGrant:!0},...i&&!r&&RA(n)&&{toolCallCancelled:!0},...e.effort!==void 0&&{effort:e.effort},...e.thinkingText!==void 0&&{thinkingText:e.thinkingText},...e.thinkingDuration!==void 0&&{thinkingDuration:e.thinkingDuration},...e.toolCalls!==void 0&&{toolCalls:e.toolCalls.map(zA)},...e.toolResults!==void 0&&{toolResults:e.toolResults.map(e=>({toolCallId:e.toolCallId,result:e.result}))},...e.blocks!==void 0&&{blocks:e.blocks},...e.attachments!==void 0&&e.attachments.length>0&&{attachments:e.attachments}}}function VA(){let e=/* @__PURE__ */ new WeakMap;return(t,n)=>t.map(t=>{let r=e.get(t);if(r!==void 0&&(r.outcomeCallId===null||n.has(r.outcomeCallId)===r.awaitsOutcome))return r.message;let i=t.role===`assistant`?HS(t.content,t.pendingToolCall===void 0?null:t.pendingToolCall):{kind:`prose`,text:t.content},a=i.kind===`pending-tool-call`?i.toolCallId:null,o=t.pendingActionStatus,s=o===`confirmed`||o===`rejected`||o===`failed`||o===`closed`?o:i.kind===`pending-tool-call`?i.status:void 0,c=a!==null&&s===void 0?a:null,l=c!==null&&n.has(c),u=BA(t,i,s,l);return e.set(t,{outcomeCallId:c,awaitsOutcome:l,message:u}),u})}var HA=/\S/;function UA(e,t){let n=new Set(e.map(e=>e.id));return t.filter(e=>n.has(e.toolCallId))}function WA(e,t,n){let r=[{kind:`tools`,contentOffset:0,toolCalls:e,toolResults:UA(e,t)}];return HA.test(n)&&r.push({kind:`text`,text:n}),r}function GA(e,t){let n=0;for(let r of e){if(!Number.isInteger(r)||r<n||r>t)return!1;n=r}return!0}function KA(e){let t=e.content,n=e.toolCalls??[],r=e.toolResults??[];if(n.length===0)return{layout:`chronological`,segments:HA.test(t)?[{kind:`text`,text:t}]:[]};let i=n.map(e=>e.contentOffset);if(i.some(e=>e===void 0))return{layout:`legacy`,segments:WA(n,r,t)};let a=i;if(!GA(a,t.length))return{layout:`invalid`,segments:WA(n,r,t)};let o=[],s=0,c=0;for(;c<n.length;){let e=a[c],i=[];for(;c<n.length&&a[c]===e;)i.push(n[c]),c+=1;if(e>s){let n=t.slice(s,e);HA.test(n)&&o.push({kind:`text`,text:n})}o.push({kind:`tools`,contentOffset:e,toolCalls:i,toolResults:UA(i,r)}),s=e}if(s<t.length){let e=t.slice(s);HA.test(e)&&o.push({kind:`text`,text:e})}return{layout:`chronological`,segments:o}}function qA(e){let t=[e.code,e.errorCode,e.providerErrorCode].filter(e=>e!==null);return t.length===0?null:[...new Set(t)].join(` \u00B7 `)}function JA({error:e,presentation:t,copy:n,onRetry:r}){let i=qA(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-reply-error`,role:`alert`,"data-testid":`ai-chat-reply-error`,"data-error-class":t.errorClass,children:[/* @__PURE__ */ (0,Z.jsx)(Qe,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.text}),t.hint!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.hint}),i!==null&&n.details!==null&&/* @__PURE__ */ (0,Z.jsxs)(`details`,{children:[/* @__PURE__ */ (0,Z.jsx)(`summary`,{children:n.details}),/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i})]}),r!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-reply-error-actions`,children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:r,children:n.retry})})]})}function YA({liveText:e,storedText:t,durationSeconds:n,copy:r}){let[i,a]=(0,R.useState)(!1),o=t.length===0&&e.length>0;if(!o&&t.length===0)return null;let s=o||n===null?r.thinking:r.thoughtFor(n);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-thinking`,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-toolline qa-ai-chat-thinking-toggle`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[/* @__PURE__ */ (0,Z.jsx)(ci,{className:`qa-ai-chat-toolline-icon${o?` qa-ai-chat-thinking-icon--live`:``}`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:s}),/* @__PURE__ */ (0,Z.jsx)(je,{className:`qa-ai-chat-thinking-chevron${i?` qa-ai-chat-thinking-chevron--open`:``}`,"aria-hidden":`true`})]}),i&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-thinking-text`,children:[o?e:t,o&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-thinking-cursor`,"aria-hidden":`true`})]})]})}function XA({label:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-activity`,role:`status`,"data-testid":`ai-tool-activity`,children:e===null?/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-activity-dots`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{})]}):/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-activity-label qa-ai-chat-acts__sheen`,children:e})})}var ZA=/\S/,QA=1500;function $A(e){let t=e.toolCalls;if(t===void 0||t.length===0)return null;let n=new Set(e.toolResults===void 0?[]:e.toolResults.map(e=>e.toolCallId));for(let e=t.length-1;e>=0;--e){let r=t[e];if(r!==void 0&&!n.has(r.id))return r}return null}var ej=e=>({text:e,link:null});function tj(e,t,n){let r=t.toolCallStatus;if(r===null)return null;switch(e.toolCallStatus){case`confirmed`:{if(n.confirmedLine===null)return ej(r.confirmed);let t=n.confirmedLine(e);switch(t.kind){case`generic`:return ej(r.confirmed);case`outcome`:return ej(t.text);case`unknown`:return ej(r.unknown);case`failed`:return ej(r.failed);case`awaiting`:return null;case`launched_elsewhere`:return{text:r.launchedElsewhere,link:{conversationId:t.conversationId,label:r.openConversation}}}break}case`failed`:return ej(r.failed);case`rejected`:return ej(n.answersLeadGrant!==null&&n.answersLeadGrant(e)?r.rejectedLeadGrant:r.rejected);case`closed`:return ej(r.closed);case`pending`:case void 0:return null}}function nj(e){return{code:e.code===void 0?null:e.code,message:e.message,errorCode:null,providerErrorCode:null}}function rj({text:e,copy:t}){let[n,r]=(0,R.useState)(`idle`),i=(0,R.useRef)(null);(0,R.useEffect)(()=>()=>{i.current!==null&&clearTimeout(i.current)},[]);let a=e=>{r(e),i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>r(`idle`),QA)},o=n===`done`?t.done:n===`failed`?t.failed:t.label;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-answer-tools`,children:[/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:o,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>a(`done`),()=>a(`failed`))},children:n===`done`?/* @__PURE__ */ (0,Z.jsx)(Ge,{"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(we,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,role:`status`,children:n===`idle`?``:o})]})}var ij=(0,R.memo)(function({message:e,live:t,liveThinkingText:n,awaitingConfirmation:r,renderers:i,copy:a,presentError:o}){let{layout:s,segments:c}=(0,R.useMemo)(()=>KA(e),[e]),l=(0,R.useMemo)(()=>c.flatMap(e=>e.kind===`tools`?[e]:[]),[c]),u=i.cards,d=(0,R.useMemo)(()=>u(e,l),[u,e,l]),f=ZA.test(e.content),p=e.effort!==void 0&&ct(e.effort),m=t&&p&&a.thinking!==null&&n.length>0&&(e.thinkingText===void 0||e.thinkingText.length===0),h=i.activity,g=t&&h!==null?$A(e):null,_=g!==null&&h!==null?h(g):m?null:a.thinkingPhase,v=tj(e,a,i),{openConversation:y}=i,b=v===null?null:v.link,x=e.toolCallCancelled===!0&&(e.toolCallStatus===void 0||e.toolCallStatus===`pending`),S=e.error!==void 0||e.toolCallCancelled===!0,C=p&&a.thinking!==null?/* @__PURE__ */ (0,Z.jsx)(YA,{liveText:t?n:``,storedText:e.thinkingText===void 0?``:e.thinkingText,durationSeconds:e.thinkingDuration===void 0?null:e.thinkingDuration,copy:a.thinking}):null,w=0,T=!1,E=!1,ee=c.length-1,D=c.map((e,n)=>{if(e.kind===`text`)return S?null:(ZA.test(e.text)&&(T=!0),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-prose${t&&n===ee?` qa-ai-chat-prose--writing`:``}`,children:i.content(e.text,t)},`text-${String(n)}`));let a=d.atStep[w];w+=1;let o=i.activityLine===null?null:i.activityLine(e,{live:t,lastAndWorking:n===ee&&!r});return o!==null&&(E=!0),o===null&&a==null?null:(T=!0,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-step`,children:[o,a]},`step-${String(n)}`))}),O=t&&!r&&!f&&!E,te=i.blocks===null?null:i.blocks(e,t),k=a.copyAnswer!==null&&!t&&f&&!S;return C!==null||T||O||d.afterProse!==null||e.error!==void 0||x||v!==null||te!==null||k?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-assistant`,"data-segment-layout":s,"data-feed-row":e.id,children:[a.byline!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-byline`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-byline-badge`,children:/* @__PURE__ */ (0,Z.jsx)(ci,{"aria-hidden":`true`})}),a.byline]}),C,D,O&&/* @__PURE__ */ (0,Z.jsx)(XA,{label:_}),d.afterProse!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-step`,children:d.afterProse}),e.error!==void 0&&/* @__PURE__ */ (0,Z.jsx)(JA,{error:nj(e.error),presentation:o(nj(e.error)),copy:{retry:a.retry,details:a.details},onRetry:null}),x&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-turn-note`,"data-testid":`ai-message-tool-call-cancelled`,children:a.toolCallCancelled}),v!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-note`,"data-testid":`ai-message-tool-call-status`,"data-tool-call-status":e.toolCallStatus,children:[v.text,b!==null&&y!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[` \u00B7 `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-turn-note__link`,"data-testid":`ai-message-tool-call-open-conversation`,onClick:()=>y(b.conversationId),children:b.label})]})]}),te,k&&a.copyAnswer!==null&&/* @__PURE__ */ (0,Z.jsx)(rj,{text:e.content,copy:a.copyAnswer})]}):null});function aj(){return/* @__PURE__ */ (0,Z.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`circle`,{cx:`12`,cy:`9`,r:`3.4`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M5.5 20c.8-3.6 3.4-5.6 6.5-5.6s5.7 2 6.5 5.6`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`m9 3.2 3 1.6 3-1.6`})]})}var oj=(0,R.memo)(function({message:e,content:t,copy:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-lead`,"data-feed-row":e.id,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-byline`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-byline-badge`,children:/* @__PURE__ */ (0,Z.jsx)(aj,{})}),n.byline,/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-ai-chat-byline-time`,dateTime:e.createdAt,children:n.formatTime(e.createdAt)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-prose`,children:t(e.content,!1)})]})}),sj=`data-feed-drawn`;function cj(e){let t=[];for(let n of e.children)n instanceof HTMLElement&&n.dataset.feedRow!==void 0&&!n.hasAttribute(`data-feed-drawn`)&&t.push(n);return t}function lj(e){let t=(0,R.useRef)(null);(0,R.useEffect)(()=>()=>{t.current!==null&&cancelAnimationFrame(t.current)},[]);let n=(0,R.useCallback)(()=>{t.current===null&&(t.current=requestAnimationFrame(()=>{t.current=null;let r=e.current;if(r===null||r.getClientRects().length===0)return;let i=cj(r);i.length!==0&&(t.current=requestAnimationFrame(()=>{t.current=null;for(let e of i)e.isConnected&&e.setAttribute(sj,``);cj(r).length>0&&n()}))}))},[e]);return n}function uj(e){let t=[];for(let n of e.children)n instanceof HTMLElement&&n.dataset.feedRow!==void 0&&t.push(n);return t}function dj(e,t){for(let n of uj(e))if(n.dataset.feedRow===t)return n;return null}function fj(e){let t=e.children;for(let e=t.length-1;e>=0;--e){let n=t[e];if(n instanceof HTMLElement&&n.dataset.feedRow!==void 0&&n.hasAttribute(`data-feed-own`))return n}return null}var pj=.5;function mj(e,t){let n=0,r=e;for(;r instanceof HTMLElement&&r!==t;)n+=r.offsetTop,r=r.offsetParent;if(r!==t)throw Error(`A feed element is not laid out inside its scroller (offsetParent chain)`);return n}function hj(){let e=(0,R.useRef)(null),t=(0,R.useRef)(null),n=(0,R.useRef)(0),[r,i]=(0,R.useState)(null),a=(0,R.useCallback)(t=>{let r=e.current;r===null||Math.abs(t-n.current)<pj||(n.current=t,r.style.height=`${String(t)}px`)},[]),o=(0,R.useCallback)(e=>{t.current={rowId:e,replacedFrom:null},i(e)},[]),s=(0,R.useCallback)(()=>{t.current=null,i(null),a(0)},[a]),c=(0,R.useCallback)(e=>{let n=t.current;if(n===null)return null;let r=dj(e,n.rowId);if(r!==null)return r;let a=fj(e);if(a===null||a.dataset.feedRow===void 0)return s(),null;let o=a.dataset.feedRow;return t.current={rowId:o,replacedFrom:n.rowId},i(o),a},[s]);return{spacerRef:e,turnRowId:r,begin:o,end:s,reserve:(0,R.useCallback)((t,n)=>{let r=e.current,i=c(n);if(i===null||r===null)return null;let o=Math.max(0,mj(i,t)-12),s=mj(r,t),l=Number.parseFloat(getComputedStyle(t).paddingBottom),u=o+t.clientHeight-s-l;return a(Math.max(0,u)),{top:o,outgrown:u<-1}},[c,a]),successorOf:(0,R.useCallback)((e,n)=>{let r=t.current;return r===null?null:r.rowId===n?c(e):r.replacedFrom===n?dj(e,r.rowId):null},[c])}}var gj=100,_j=1,vj=150,yj=500,bj=/* @__PURE__ */ new Set([`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Tab`]),xj=16,Sj=`qa-ai-chat-messages--revealing`,Cj=.5;function wj(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function Tj(e,t){let n=uj(t),r=e.getBoundingClientRect().top,i=0,a=n.length;for(;i<a;){let e=i+a>>>1,t=n[e];t!==void 0&&t.getBoundingClientRect().bottom<=r?i=e+1:a=e}let o=n[i];return o===void 0||o.dataset.feedRow===void 0?null:{rowId:o.dataset.feedRow,offset:o.getBoundingClientRect().top-r}}function Ej({showEmpty:e,shown:t}){let n=(0,R.useRef)(null),r=(0,R.useRef)(null),i=hj(),{begin:a,reserve:o,end:s,successorOf:c}=i,l=(0,R.useRef)(`follow`),[u,d]=(0,R.useState)(!1),f=(0,R.useRef)(!1),p=(0,R.useRef)(null),m=(0,R.useRef)(0),h=(0,R.useRef)(null),g=(0,R.useRef)(!1),_=(0,R.useRef)(0),v=(0,R.useRef)(e);(0,R.useLayoutEffect)(()=>{v.current=e});let y=(0,R.useCallback)(()=>g.current||performance.now()<_.current,[]),b=(0,R.useCallback)(e=>{l.current=e,d(e===`detached`)},[]),x=(0,R.useCallback)(e=>{let t=n.current;if(t===null)return;let r=t.scrollTop;t.scrollTop=e;let i=t.scrollTop;m.current=i,h.current=i===r?null:i},[]),S=(0,R.useCallback)(()=>{let e=n.current,t=r.current;e!==null&&t!==null&&(p.current=Tj(e,t))},[]),C=(0,R.useCallback)(()=>{let e=n.current;e!==null&&(b(`follow`),p.current=null,x(e.scrollHeight))},[b,x]),w=(0,R.useCallback)(()=>{b(`follow`),p.current=null,x(0)},[b,x]),T=(0,R.useCallback)(()=>{let e=n.current,t=r.current;if(e===null||t===null||e.clientHeight===0)return;let i=p.current;if(i===null){S();return}let a=dj(t,i.rowId)??c(t,i.rowId);if(a===null){C();return}let o=e.scrollTop-m.current,s=i.offset-o,l=a.getBoundingClientRect().top-e.getBoundingClientRect().top-s;Math.abs(l)>=Cj&&x(e.scrollTop+l),S()},[S,C,c,x]),E=(0,R.useCallback)(e=>{let t=n.current;if(t!==null){if(e===null){C();return}y()&&Math.abs(t.scrollTop-m.current)>=1||(Math.abs(t.scrollTop-e.top)>=Cj&&x(e.top),e.outgrown&&(b(`detached`),S()))}},[S,C,y,b,x]),ee=(0,R.useCallback)(()=>{let e=n.current;if(e===null)return;let t=wj(e)<=gj;b(t?`follow`:`detached`),t?p.current=null:S()},[S,b]),D=(0,R.useRef)(null),O=(0,R.useCallback)(()=>{if(D.current!==null)return;let e=()=>{if(D.current=null,l.current===`follow`){if(y()){D.current=setTimeout(e,vj);return}C()}};D.current=setTimeout(e,vj)},[C,y]);(0,R.useEffect)(()=>()=>{D.current!==null&&clearTimeout(D.current)},[]);let te=(0,R.useCallback)(()=>{let e=n.current,t=r.current;if(e===null||t===null||e.clientHeight===0)return;let i=o(e,t);switch(l.current){case`held`:E(i);return;case`follow`:y()?O():C();return;case`detached`:T();return}},[T,E,O,C,y,o]),k=(0,R.useCallback)(()=>{if(l.current===`held`)return;f.current=!0;let e=l.current===`follow`;l.current=`detached`,e||S(),requestAnimationFrame(()=>requestAnimationFrame(()=>{f.current&&(f.current=!1,ee())}))},[S,ee]),A=(0,R.useCallback)(e=>{let t=n.current;if(t===null)return;b(`detached`);let r=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop-xj,i=Math.min(Math.max(r,0),t.scrollHeight-t.clientHeight);if(Math.abs(i-t.scrollTop)<1){S();return}t.classList.add(Sj),t.addEventListener(`scrollend`,()=>t.classList.remove(Sj),{once:!0}),t.scrollTo({top:i,behavior:`auto`})},[S,b]),j=(0,R.useCallback)(()=>{let e=n.current;if(e!==null){if(l.current!==`held`&&e.scrollHeight-e.clientHeight<=_j){b(`follow`),p.current=null;return}te()}},[te,b]),ne=(0,R.useRef)(null),re=(0,R.useRef)(null),M=(0,R.useCallback)(()=>{ne.current!==null&&(cancelAnimationFrame(ne.current),ne.current=null,re.current=null)},[]);(0,R.useEffect)(()=>M,[M]);let N=(0,R.useCallback)(()=>{ne.current===null&&(ne.current=requestAnimationFrame(()=>{ne.current=null;let e=re.current;re.current=null,v.current||j(),e!==null&&e()}))},[j]),ie=(0,R.useCallback)(({showEmpty:e,armToBottom:t,ownTurn:r},i)=>{if(n.current!==null){if(e){M(),s(),w(),i();return}if(t){M(),s(),C(),i();return}if(r!==null){M(),a(r),p.current=null,b(`held`),te(),i();return}re.current=i,N()}},[a,M,s,te,C,N,w,b]);return(0,R.useEffect)(()=>{let e=n.current,t=r.current;if(e===null||t===null)return;let i=new ResizeObserver(()=>{if(!v.current){if(f.current){f.current=!1,ee();return}te()}});return i.observe(e),i.observe(t),()=>i.disconnect()},[te,ee]),(0,R.useEffect)(()=>{let e=n.current;if(e===null)return;let t=e=>{_.current=Math.max(_.current,performance.now()+e)},r=()=>t(vj),i=()=>{g.current=!0},a=()=>{g.current&&(g.current=!1,t(vj))},o=e=>{bj.has(e.key)&&t(yj)},s=()=>{let n=e.scrollTop,r=h.current;h.current=null;let i=r!==null&&Math.abs(n-r)<1,a=m.current;if(m.current=n,v.current)return;if(!i&&y()){t(vj);let r=wj(e);if(n<a&&r>_j)l.current!==`detached`&&b(`detached`);else if(n>a&&r<=gj){(l.current!==`follow`||r>0)&&C();return}}if(l.current!==`detached`||!i&&!y()&&ne.current!==null)return;let o=p.current;if(o===null){S();return}p.current={rowId:o.rowId,offset:o.offset-(n-a)},N()};return e.addEventListener(`wheel`,r,{passive:!0}),e.addEventListener(`pointerdown`,i,{passive:!0}),e.addEventListener(`touchstart`,i,{passive:!0}),e.addEventListener(`keydown`,o),e.addEventListener(`scroll`,s,{passive:!0}),window.addEventListener(`pointerup`,a,{passive:!0}),window.addEventListener(`pointercancel`,a,{passive:!0}),window.addEventListener(`touchend`,a,{passive:!0}),window.addEventListener(`touchcancel`,a,{passive:!0}),()=>{e.removeEventListener(`wheel`,r),e.removeEventListener(`pointerdown`,i),e.removeEventListener(`touchstart`,i),e.removeEventListener(`keydown`,o),e.removeEventListener(`scroll`,s),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a),window.removeEventListener(`touchend`,a),window.removeEventListener(`touchcancel`,a)}},[S,C,y,N,b]),(0,R.useLayoutEffect)(()=>{if(t!==null)return t.subscribe(()=>{s(),v.current?w():C()})},[t,s,C,w]),{scrollerRef:n,feedRef:r,spacerRef:i.spacerRef,detached:u,turnRowId:i.turnRowId,pinToBottom:C,hold:k,reveal:A,afterRender:ie}}function Dj(e,t){let n=(0,R.useRef)(t);(0,R.useLayoutEffect)(()=>{n.current=t});let r=(0,R.useCallback)(()=>{let t=n.current,r=e.current;if(t===null||t.status!==`idle`||r===null||r.clientHeight===0)return;let i=r.scrollTop<=r.clientHeight,a=r.scrollHeight<=r.clientHeight;(i||a)&&t.load()},[e]);return(0,R.useEffect)(()=>{let t=e.current;if(t!==null)return t.addEventListener(`scroll`,r,{passive:!0}),()=>t.removeEventListener(`scroll`,r)},[e,r]),r}function Oj({older:e}){if(e===null)return null;switch(e.status){case`none`:case`idle`:return null;case`loading`:return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-older`,role:`status`,"data-testid":`ai-chat-older-history-loading`,children:[/* @__PURE__ */ (0,Z.jsx)(hn,{"aria-hidden":`true`}),e.copy.loading]});case`failed`:return/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Qe,{}),role:`alert`,slim:!0,title:null,text:e.copy.failed,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:e.load,children:e.copy.retry}),testId:`ai-chat-older-history-failed`})}}function kj(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role!==`agent`)return t}return-1}function Aj(e,t){if(t===null)return null;let n=null;for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0){if(i.id===t)return n;n===null&&i.role===`user`&&(n=i.id)}}return null}var jj=(0,R.memo)(function({message:e,attachments:t,raised:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-user${n?` qa-ai-chat-turn-user--raised`:``}`,"data-feed-row":e.id,"data-feed-own":``,children:[t!==null&&e.attachments!==void 0&&t(e),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-bubble`,children:e.content})]})}),Mj=(0,R.memo)(function({message:e,blocks:t}){let n=t===null?null:t(e,!1);return n===null?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-agent`,"data-feed-row":e.id,children:n})});function Nj({messages:e,isStreaming:t,liveThinkingText:n,awaitingConfirmation:r,error:i,empty:a,renderers:o,copy:s,presentError:c,shown:l,olderHistory:u}){let d=e.length===0&&!t&&a!==null,f=Ej({showEmpty:d,shown:l}),p=(0,R.useRef)(e.length),m=e[e.length-1],h=(0,R.useRef)(m===void 0?null:m.id),{afterRender:g}=f,_=Dj(f.scrollerRef,u),v=lj(f.feedRef),y=u===null?null:u.status;(0,R.useLayoutEffect)(()=>{v();let t=p.current;p.current=e.length;let n=e[e.length-1],r=h.current;h.current=n===void 0?null:n.id;let i=t===0&&e.length>0;g({showEmpty:d,armToBottom:i,ownTurn:i?null:Aj(e,r)},_)},[e,t,n,i,r,d,y,g,_,v]);let b=kj(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-messages`,ref:f.scrollerRef,tabIndex:s.feedLabel===null?void 0:0,"aria-label":s.feedLabel===null?void 0:s.feedLabel,children:[/* @__PURE__ */ (0,Z.jsx)(gp,{hold:f.hold,children:/* @__PURE__ */ (0,Z.jsx)(yp,{reveal:f.reveal,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-feed`,ref:f.feedRef,children:[/* @__PURE__ */ (0,Z.jsx)(Oj,{older:u}),d&&a,e.map((e,i)=>{switch(e.role){case`user`:return/* @__PURE__ */ (0,Z.jsx)(jj,{message:e,attachments:o.attachments,raised:e.id===f.turnRowId},e.id);case`agent`:return e.agentOrigin===`workflow_lead`?s.leadProse===null?null:/* @__PURE__ */ (0,Z.jsx)(oj,{message:e,content:o.content,copy:s.leadProse},e.id):/* @__PURE__ */ (0,Z.jsx)(Mj,{message:e,blocks:o.blocks},e.id);case`assistant`:{let a=i===b;return/* @__PURE__ */ (0,Z.jsx)(ij,{message:e,live:t&&a,liveThinkingText:a?n:``,awaitingConfirmation:r&&a,renderers:o,copy:s,presentError:c},e.id)}}}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(JA,{error:i.error,presentation:i.presentation,copy:{retry:s.retry,details:s.details},onRetry:i.onRetry})]})})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-feed-spacer`,ref:f.spacerRef,"aria-hidden":`true`}),f.detached&&/* @__PURE__ */ (0,Z.jsx)(xe,{relationship:`label`,content:s.scrollToBottom,children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-scroll-bottom`,onClick:f.pinToBottom,children:[/* @__PURE__ */ (0,Z.jsx)(_r,{"aria-hidden":`true`}),t&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-scroll-bottom-live`,"aria-hidden":`true`})]})})]})}function Pj(e){switch(e.status){case`completed`:case`failed`:case`cancelled`:case`pausing`:case`paused`:case`stopping`:case`finalizing`:return e.status;case`running`:return e.hostState===`lost`?`host_lost`:e.hostState===`none`&&e.executorKind!==`none`?`starting`:e.leadState===`awaiting_user`||e.openAsk?`awaiting`:`running`}}function Fj(e){return e===`completed`||e===`failed`||e===`cancelled`}function Ij(e,t){let n=t===`agent`;switch(e){case`starting`:return{tone:`run`,label:n?`startingRunner`:`startingBrowser`};case`running`:return{tone:`run`,label:`running`};case`awaiting`:return{tone:`wait`,label:`awaiting`};case`host_lost`:return{tone:`wait`,label:n?`runnerLost`:`browserLost`};case`pausing`:return{tone:`stop`,label:`pausing`};case`paused`:return{tone:`wait`,label:`paused`};case`stopping`:return{tone:`stop`,label:`stopping`};case`finalizing`:return{tone:`run`,label:`finalizing`};case`completed`:return{tone:`ok`,label:`completed`};case`failed`:return{tone:`fail`,label:`failed`};case`cancelled`:return{tone:`stop`,label:`cancelled`}}}var Lj={make_auto:_i,atlas:qr,run:$r},Rj=`bg-(image:--hatch-skipped)`,zj={success:`bg-(--color-progress-fill-success)`,error:`bg-(--color-progress-fill-failed)`,warning:`bg-warning`,info:`bg-info`,running:`relative overflow-hidden bg-(--color-progress-fill-running) after:absolute after:inset-0 after:w-[30%] after:bg-[linear-gradient(90deg,transparent,color-mix(in_srgb,var(--color-text-on-accent)_45%,transparent),transparent)] after:animate-(--animation-progress-shimmer) after:content-['']`,steady:`bg-(--color-progress-fill-running)`,cancelled:`bg-(--color-progress-fill-cancelled)`,muted:`bg-fg-muted`,quiet:`bg-[color-mix(in_srgb,var(--color-text-muted)_30%,transparent)]`,pending:`bg-surface-active`,skipped:`bg-surface-active ${Rj}`},Bj={success:`bg-(--color-progress-fill-success)`,error:`bg-(--color-progress-fill-failed)`,warning:`bg-warning`,info:`bg-info`,running:`bg-(--color-progress-fill-running)`,steady:`bg-(--color-progress-fill-running)`,cancelled:`bg-(--color-progress-fill-cancelled)`,muted:`bg-fg-muted`,quiet:`bg-[color-mix(in_srgb,var(--color-text-muted)_30%,transparent)]`,pending:`bg-stroke-hover`,skipped:`bg-stroke-hover ${Rj}`},Vj={start:`justify-start`,center:`justify-center`};function Hj({segments:e,total:t,summary:n,meta:r,legendAlign:i,className:a,"data-testid":o}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:a===void 0?`grid min-w-0 gap-2`:`grid min-w-0 gap-2 ${a}`,"data-testid":o,children:[n===void 0&&r===void 0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex justify-between gap-3 text-xs text-fg-muted tabular-nums [&_b]:font-semibold [&_b]:text-fg-primary`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:r})]}),/* @__PURE__ */ (0,Z.jsx)(Wj,{segments:e,total:t}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`m-0 flex list-none flex-wrap gap-x-3.5 gap-y-1 p-0 text-xs text-fg-secondary tabular-nums ${Vj[i]}`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{"data-legend":e.key,className:`inline-flex items-center gap-1.5`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{className:`size-2 shrink-0 rounded-2xs ${e.count>0?Bj[e.tone]:`bg-stroke-hover`}`,"aria-hidden":`true`}),e.label]},e.key))})]})}var Uj={md:`h-(--progress-track-md)`,sm:`h-(--progress-track-sm)`,xs:`h-(--progress-track-xs)`};function Wj({segments:e,total:t,size:n=`md`,className:r}){let i=`${Gj} ${Uj[n]}`;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:r===void 0?i:`${i} ${r}`,"aria-hidden":`true`,children:e.filter(e=>e.count>0).map(e=>/* @__PURE__ */ (0,Z.jsx)(`i`,{"data-segment":e.key,className:`block h-full transition-[width] duration-(--motion-long) ease-out motion-reduce:transition-none ${zj[e.tone]}${e.pulse===!0?` animate-(--animation-pulse-dot)`:``}`,style:{width:`${e.count/t*100}%`}},e.key))})}var Gj=`relative flex gap-0.5 overflow-hidden rounded-full bg-(--color-progress-track)`,Kj=6;function qj({count:e,label:t,className:n}){return/* @__PURE__ */ (0,Z.jsx)(`span`,{...t===void 0?{"aria-hidden":!0}:{role:`img`,"aria-label":t},className:h(`inline-flex items-center gap-0.5`,n),children:Array.from({length:Math.min(e,Kj)},(e,t)=>/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`relative h-[9px] w-[11px] rounded-[2px] border-[1.2px] border-solid border-current opacity-90 before:absolute before:inset-x-0 before:top-[1.5px] before:h-[1.2px] before:bg-current before:opacity-60 before:content-['']`},t))})}function Jj(e){return`workflow-block-${e}`}function Yj(e){return e.status===`running`&&(e.leadState===`awaiting_user`||e.openAsk)}function Xj(e){return e.launchKind===`preset`&&e.level.effort!==`max`}function Zj(e,t){return e.launchKind===`preset`&&t===`starting`&&e.place.kind===`this_browser`}function Qj(e,t){if(e.launchKind!==`preset`)return!0;let n=Pj(e);return n===`awaiting`||t&&Zj(e,n)}function $j(e){return e===`awaiting`||e===`host_lost`}function eM(e){return e.filter(e=>e.status===`idle`||e.status===`busy`).length}function tM(e,t){return t&&e.status===`running`&&(e.hostState===`none`||e.hostState===`lost`)&&e.executorKind===`browser`}function nM(e,t){return new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`}).format(new Date(e))}function rM(e,t){let n=e.flatMap(e=>e.blocks??[]).filter(l).find(e=>e.payload.workflowId===t);return n===void 0?null:n.payload.status}function iM(e){return e.flatMap(e=>e.blocks??[]).filter(l).filter(e=>e.payload.launchKind===`preset`).map(e=>e.payload.workflowId).sort().join(`,`)}function aM(e,t){return e.length>0&&e.every(e=>e.kind===`workflow`&&t.has(e.id))}function oM(e){let t=document.getElementById(Jj(e));t!==null&&(t.scrollIntoView({block:`center`,behavior:`smooth`}),t.focus({preventScroll:!0}))}function sM({blockId:e,payload:t,sidePanel:n,onToQuestion:r,onResume:i,resuming:a}){let o=$().cards.workflow,s=o.strip,c=Pj(t),l=$j(c),u=eM(t.workers),d=t.executorKind===`browser`,f=c===`awaiting`&&Xj(t),p=c===`awaiting`&&t.launchKind===`preset`,m=c===`awaiting`?f?t.openAsk?o.preset.stripChatLeadAwaitingAnswer:o.preset.stripChatLeadAwaitingMessage:s.awaiting:c===`host_lost`?d?s.lostBrowser:s.lostRunner:c===`starting`?Zj(t,c)?o.preset.stripAwaitingBrowser:d?s.startingBrowser:s.startingRunner:c===`stopping`?s.stopping:t.leadState===`active`?s.active:s.idle,g=p?jn:l?c===`host_lost`?Ze:Dr:Zr,_=tM(t,n)?/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)($r,{size:14}),loading:a,disabled:a,onClick:i,children:s.resume}):p?null:Yj(t)?/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`xs`,onClick:()=>r(t.workflowId),children:s.toQuestion}):/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`xs`,"aria-label":s.toBlockLabel,onClick:()=>oM(e),children:s.toBlock});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,"data-testid":`ai-chat-swarm-strip`,"data-phase":c,className:h(`mx-3 mb-2 flex items-center gap-2 rounded-md border border-solid pl-3 text-xs shadow-(--shadow-sm) [animation:slide-up_var(--motion-long)_var(--ease-out)]`,_===null?`py-2 pr-3`:`py-1.5 pr-1.5`,l?`border-(--color-border-warning) bg-(--color-warning-bg)`:`border-(--color-border) bg-(--glass-bg)`),children:[/* @__PURE__ */ (0,Z.jsx)(g,{"aria-hidden":`true`,className:h(`size-3.5 flex-none`,l?`text-(--color-warning-text)`:`text-(--color-primary-text)`)}),c!==`host_lost`&&u>0&&/* @__PURE__ */ (0,Z.jsx)(qj,{count:u,label:s.windows(u),className:`text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0 grow truncate text-fg-secondary`,children:m}),_]})}function cM({messages:e,workflowHost:t,onToQuestion:n}){let r=$().errors,a=e.flatMap(e=>e.blocks??[]).filter(i).filter(l).filter(e=>Qj(e.payload,t!==null)).reverse();return a.length===0?null:/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:a.map(e=>{let{workflowId:i}=e.payload,a=t===null?`idle`:t.statusOf(i);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(sM,{blockId:e.id,payload:e.payload,sidePanel:t!==null,onToQuestion:n,onResume:()=>t==null?void 0:t.attach(i),resuming:a===`resuming`}),a===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mx-3 mb-2`,children:/* @__PURE__ */ (0,Z.jsx)(B_,{children:r.byCode[`client.workflow_host_action_failed`]})})]},e.id)})})}function lM({launches:e,messages:t,workflowHost:n,openPath:r,onAttachSettled:i}){let a=e.filter(e=>rM(t,e.workflowId)===null);return uM(a.map(e=>e.workflowId),n,i),a.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-none flex-col gap-2 px-3 pt-3`,children:a.map(e=>/* @__PURE__ */ (0,Z.jsx)(dM,{launch:e,workflowHost:n,openPath:r},e.workflowId))})}function uM(e,t,n){let r=(0,R.useRef)(/* @__PURE__ */ new Set);(0,R.useEffect)(()=>{let i=!1;for(let n of e)t.statusOf(n)===`resuming`?r.current.add(n):r.current.delete(n)&&(i=!0);i&&n()})}function dM({launch:e,workflowHost:t,openPath:n}){let r=$(),i=r.cards.workflow.preset.panelWait,a=Q(),o=t.statusOf(e.workflowId),s=`panel-wait-${e.workflowId}`,c=e.reason===`host_lost`,l=e.reason===`host_lost`?i.lostDetail(nM(e.hostLostAt,a)):i.origin(e.surface,nM(e.startedAt,a),e.initiatorName);return/* @__PURE__ */ (0,Z.jsxs)(`section`,{role:`status`,"aria-labelledby":s,"data-testid":`ai-chat-panel-wait-strip`,"data-reason":e.reason,className:`grid grid-cols-[28px_minmax(0,1fr)] gap-x-3 gap-y-2 rounded-lg border border-solid border-(--color-border-warning) bg-(--color-warning-bg) p-3 text-xs [animation:var(--animation-slide-down)]`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-7 place-items-center rounded-md border border-solid border-[color-mix(in_srgb,var(--color-primary)_40%,transparent)] bg-(--color-bg-primary-tint-15) text-(--color-primary-text)${c?``:` shadow-(--glow-primary)`}`,children:/* @__PURE__ */ (0,Z.jsx)(ci,{className:`size-3.5`})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{id:s,className:`block text-(length:--text-body-sm) font-semibold text-fg-primary`,children:c?i.lostTitle(e.title):i.title(e.title)}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-(length:--text-caption) text-fg-secondary`,children:l})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`col-span-2 flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(gr,{size:14}),loading:o===`resuming`,disabled:o===`resuming`,onClick:()=>t.attach(e.workflowId),"data-testid":`ai-chat-panel-wait-resume`,children:i.resume}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(Nn,{size:14}),onClick:()=>n(e.deeplink),children:i.openLaunch})]}),o===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`col-span-2`,children:/* @__PURE__ */ (0,Z.jsx)(B_,{children:r.errors.byCode[`client.workflow_host_action_failed`]})})]})}var fM=3e4,pM=I({items:F(Ke),total:Wt().int().min(0)});function mM(e){return e.attention===`awaiting_browser`||e.attention===`host_lost`}async function hM(e,t){let n=[];for(let r=0;;r+=500){let i=await e.request({method:Gn.myLiveBrowserTasks.method,path:Gn.myLiveBrowserTasks.path(t,{limit:500,offset:r}),schema:pM});if(n.push(...i.items.filter(mM)),r+i.items.length>=i.total||i.items.length===0)return n}}function gM(e){let{http:t,logger:n,active:r,projectId:i,visible:a,conversationId:o}=e,[s,c]=(0,R.useState)({projectId:null,launches:[]}),[l,u]=(0,R.useState)(0),d=(0,R.useRef)(n);(0,R.useEffect)(()=>{d.current=n});let f=(0,R.useCallback)(()=>u(e=>e+1),[]);return(0,R.useEffect)(()=>{if(!r||i===null||!a)return;let e=!1,n=0,o=()=>{n+=1;let r=n;hM(t,i).then(t=>{let a=t.map(e=>{if(e.topic.kind!==`preset`)throw Error(`W10 answered swarm ${e.id} of topic ${e.topic.kind} to launchKind=preset`);if(e.launchSurface===null)throw Error(`W10 answered AI task ${e.id} without its launchSurface`);let t={workflowId:e.id,title:hd(e.topic),surface:e.launchSurface,startedAt:e.startedAt,initiatorName:e.initiator.displayName,deeplink:e.deeplink};if(e.attention===`awaiting_browser`)return{...t,reason:e.attention};if(e.hostLostAt===null)throw Error(`W10 answered host-lost AI task ${e.id} without its hostLostAt`);return{...t,reason:e.attention,hostLostAt:e.hostLostAt}});!e&&r===n&&c({projectId:i,launches:a})}).catch(t=>{e||d.current.error(`panel wait strip: reading the tasks waiting for a browser failed`,{projectId:i,error:t})})};o();let s=setInterval(o,fM);return window.addEventListener(`focus`,o),()=>{e=!0,clearInterval(s),window.removeEventListener(`focus`,o)}},[t,r,i,a,o,l]),{launches:r&&s.projectId===i?s.launches:[],reread:f}}function _M(e,t){let n=iM(e);return{aiTaskBlockIds:(0,R.useMemo)(()=>new Set(n===``?[]:n.split(`,`)),[n]),hiddenWorkflowId:t===null?null:t.workflowId}}function vM(e){let[t,n]=(0,R.useState)(()=>/* @__PURE__ */ new Map),r=(0,R.useCallback)((e,t)=>n(n=>{let r=new Map(n);return t===`idle`?r.delete(e):r.set(e,t),r}),[]);return(0,R.useMemo)(()=>e===null?null:{statusOf:e=>{let n=t.get(e);return n===void 0?`idle`:n},attach:t=>{r(t,`resuming`),e.attachWorkflowHost(t).then(()=>r(t,`idle`),e=>{r(t,`failed`),queueMicrotask(()=>{throw e})})}},[e,t,r])}var yM=``;function bM(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort,maxAgents:null}}function xM(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort}}function SM(e){let{conversationId:t,historyLoad:n,launchLevels:r,capabilityLoad:i}=e,a=t===null?yM:t,o=(0,R.useCallback)(e=>r.subscribe(e),[r]),s=(0,R.useSyncExternalStore)(o,()=>t===null?null:r.get(t)),[c,l]=(0,R.useState)(()=>/* @__PURE__ */ new Map),[u,d]=(0,R.useState)(!1),[f,p]=(0,R.useState)(t);if(f!==t&&(p(t),f===null&&t!==null)){d(!1);let e=c.get(yM);if(u&&n.status===`idle`&&e!==void 0&&!c.has(t)){let n=new Map(c);n.set(t,e),n.delete(yM),l(n)}}let m=i.status===`ready`?{block:Qt,maxAgents:i.value.swarm.maxAgents}:null,h=c.get(a),g=h===void 0?s===null?dn:xM(s):h,_=m===null?g:fn(g,m),v=e=>{l(t=>new Map(t).set(a,e))};return{choice:_,facts:m,choose:e=>{m!==null&&v(Dn(e,m.maxAgents))},setAgents:e=>{m!==null&&v(en(_,e,m.maxAgents))},forSend:()=>(t===null&&d(!0),bM(_)),resetNewConversation:()=>{d(!1),l(e=>{if(!e.has(yM))return e;let t=new Map(e);return t.delete(yM),t})}}}function CM(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort,maxAgents:null}}function wM({session:e,pin:t,launchEffortForSend:n,launchPlace:r}){let{place:i,reloadFleet:a}=r,o=(0,R.useCallback)((r,o,s)=>{if(t!==null){let n={text:r,launchEffort:CM(t.level),place:t.place,source:o,attachments:s};return e.prepareSend(n)}i.kind===`runner`&&a();let c={text:r,launchEffort:n(),place:i,source:o,attachments:s};return e.prepareSend(c)},[e,t,n,i,a]),s=(0,R.useCallback)(t=>e.sendPrepared(t),[e]);return{send:(0,R.useCallback)((e,t,n)=>s(o(e,t,n)),[o,s]),prepareSend:o,sendPrepared:s,retryLastTurn:(0,R.useCallback)(()=>{if(t!==null){e.retryLastTurn(CM(t.level),t.place);return}e.retryLastTurn(n(),i)},[e,t,n,i])}}function TM({attachments:e}){let t=$().attachments,n=e.filter(e=>Kn(e.mediaType)),r=n.length>1?`square`:`wide`;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-msg-files`,role:`group`,"aria-label":t.message.listLabel,"data-testid":`ai-chat-message-files`,children:e.map(e=>Kn(e.mediaType)?/* @__PURE__ */ (0,Z.jsx)(EM,{attachment:e,images:n,shape:r},e.id):/* @__PURE__ */ (0,Z.jsx)(OM,{attachment:e},e.id))})}function EM({attachment:e,images:t,shape:n}){let r=$().attachments.message,{openViewer:i}=Bf(),{content:a,load:o}=If(e,!0),s=`qa-ai-chat-thumb qa-ai-chat-thumb--${n}`;switch(a.status){case`idle`:case`loading`:return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`${s} qa-ai-chat-thumb--loading`,role:`img`,"aria-busy":`true`,"aria-label":r.thumbnailLoading(e.fileName),"data-testid":`ai-chat-message-thumb-loading`});case`failed`:return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`${s} qa-ai-chat-thumb--failed`,"data-testid":`ai-chat-message-thumb-failed`,children:[/* @__PURE__ */ (0,Z.jsx)(Br,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:r.thumbnailFailed}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-linkbtn`,onClick:()=>void o(),children:r.retry})]});case`ready`:return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:s,"aria-label":r.view(e.fileName),"data-testid":`ai-chat-message-thumb`,onClick:n=>i(t,t.findIndex(t=>t.id===e.id),n.currentTarget),children:[/* @__PURE__ */ (0,Z.jsx)(`img`,{src:a.url,alt:``}),n===`wide`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-thumb-zoom`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(vi,{})})]})}}function DM(e){let t=window.open(``,`_blank`);t!==null&&(t.opener=null),e().then(e=>{if(e===null){t!==null&&t.close();return}t===null?window.open(e.url,`_blank`,`noopener`):t.location.href=e.url})}function OM({attachment:e}){let t=$().attachments,n=Q(),{content:r,load:i}=If(e,!1),[a,o]=(0,R.useState)(!1),s=a&&r.status===`failed`,c=()=>{if(o(!0),r.status===`ready`){window.open(r.url,`_blank`,`noopener`);return}DM(async()=>{let e=await i();return e.status===`ready`?{url:e.url}:null})},l=Pf(e,n,t),u=/* @__PURE__ */ (0,Z.jsx)(oS,{label:t.typeLabel[e.mediaType]});return s?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-filechip qa-ai-chat-filechip--fail`,"data-testid":`ai-chat-message-doc-failed`,children:[u,/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-text`,children:[/* @__PURE__ */ (0,Z.jsx)(sS,{fileName:e.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-facts`,children:l}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-why`,children:[t.message.openFailed,` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-linkbtn`,onClick:c,children:t.message.retry})]})]})]}):/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-filechip`,"aria-label":t.message.open(e.fileName),"aria-busy":r.status===`loading`,"data-testid":`ai-chat-message-doc`,onClick:c,children:[u,/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-text`,children:[/* @__PURE__ */ (0,Z.jsx)(sS,{fileName:e.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-facts`,children:l})]}),/* @__PURE__ */ (0,Z.jsx)(Nn,{className:`qa-ai-chat-filechip-go`,"aria-hidden":`true`})]})}var kM={run:`border-[color-mix(in_srgb,var(--color-primary)_40%,transparent)] bg-(--color-bg-primary-tint-15) text-fg-on-primary-tint`,wait:`border-(--color-border-warning) bg-(--color-warning-bg) text-(--color-warning-text)`,ok:`border-(--color-border-success) bg-(--color-success-bg) text-(--color-success-text)`,fail:`border-(--color-border-error) bg-(--color-error-bg) text-(--color-error-text)`,stop:`border-(--color-border) bg-(--color-bg-cancelled-tint) text-fg-muted`,queue:`border-(--color-border) bg-(--color-bg-tertiary) text-fg-secondary`},AM={run:!0,wait:!0,ok:!1,fail:!1,stop:!1,queue:!1};function jM({tone:e,children:t,size:n=`md`,role:r}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{role:r,"data-tone":e,className:h(`inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border border-solid px-2 font-medium`,n===`lg`?`h-6 text-xs`:`h-[22px] text-caption`,`leading-[inherit]`,kM[e]),children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{"aria-hidden":`true`,className:h(`size-1.5 flex-none rounded-full bg-current`,AM[e]&&`[animation:pulse-dot_var(--motion-ambient)_var(--ease-in-out)_infinite]`)}),t]})}var MM={normal:1,thinking:2,max:3};function NM({payload:e,copy:t,locale:n}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-1`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[t.scope(e.scopeLabel),` \u00B7`]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)($t,{level:MM[e.level.effort],look:`quiet`}),t.level(e.level)]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[`\u00B7 `,t.since(nM(e.createdAt,n))]})]})}function PM(e,t,n){if(e.total===0&&(t===null||t===0))return[];let r=[{key:`findings`,value:e.total,noun:n.counts.findings(e.total)},{key:`bugs`,value:e.bugs,noun:n.counts.bugs(e.bugs)}];return t===null?e.undecided>0&&r.push({key:`undecided`,value:e.undecided,noun:n.counts.undecided(e.undecided)}):t>0&&r.push({key:`notDone`,value:t,noun:n.counts.notDone}),r}function FM({items:e}){return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-fg-secondary`,"data-testid":`workflow-block-counts`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`font-semibold text-fg-primary tabular-nums`,children:e.value}),` `,e.noun]},e.key))})}function IM({text:e}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`grid grid-cols-[20px_minmax(0,1fr)] items-start gap-2 text-xs text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(gr,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e})]})}function LM(e,t){switch(e){case`ai.credits_insufficient`:return t.failureReason.credits;case`turn_shape`:return t.failureReason.turnShape;case`lead_internal_error`:return t.failureReason.internal;case`initiator_unavailable`:return t.failureReason.initiatorUnavailable;default:return t.failureReason.other(e)}}function RM(e,t,n){if(e.status!==`cancelled`&&e.status!==`failed`)return null;let r=e.status===`cancelled`?t.partialCancelled(nM(e.end.endedAt,n)):t.partialFailed(LM(e.end.failureReason,t)),{findings:i}=e;return[r,i.total===0?null:t.beforeStop(`${i.total} ${t.counts.findings(i.total)}`,i.bugs===0?null:`${i.bugs} ${t.counts.bugs(i.bugs)}`),e.end.report.summary].filter(e=>e!==null).join(` `)}function zM({text:e,partial:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:h(`line-clamp-6 rounded-md border border-solid p-3 text-body-sm leading-[1.6] text-fg-primary`,t?`border-(--color-border) bg-(--color-bg-tertiary)`:`border-(--color-border-success) bg-(--color-success-bg)`),children:e})}function BM(e){try{return new URL(e).host}catch{return e}}function VM({launch:e}){let{t}=ye(),n=e.allowedChanges.length===0?t(`taskForm.allow.projectOnlyNone`):t(`taskForm.allow.projectOnly`,{list:e.allowedChanges.map(e=>t(`taskForm.allow.short.${e}`)).join(`, `)});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-md bg-(--color-bg-modal-inset) px-3 py-2`,"data-testid":`workflow-block-launch`,children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 line-clamp-2 text-xs leading-normal text-fg-primary`,children:e.briefLine}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-caption text-fg-muted`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(si,{"aria-hidden":`true`,className:`size-3 shrink-0`}),n]}),e.newScenarioKind!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(gi,{"aria-hidden":`true`,className:`size-3 shrink-0`}),t(`taskForm.scenarioKind.chip`,{kind:t(`taskForm.scenarioKind.short.${e.newScenarioKind}`)})]}),e.address!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(r,{"aria-hidden":`true`,className:`size-3 shrink-0`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:t(`taskForm.address.pair`,{environment:e.address.environmentName,host:BM(e.address.entryUrl)})})]})]})]})}var HM=I({id:L()});function UM(e){let{http:t}=Zf(),[n,r]=(0,R.useState)(`idle`);return{status:n,ask:()=>r(`confirming`),keep:()=>r(`idle`),stop:()=>{r(`stopping`),t.request({method:Gn.workflowCancel.method,path:Gn.workflowCancel.path(e),body:{},schema:HM}).then(()=>r(`idle`),e=>{r(`stopFailed`),e instanceof Yn&&e.status===409||queueMicrotask(()=>{throw e})})}}}function WM({state:e,words:t}){return e.status===`confirming`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsxs)(V_,{question:t.question,body:t.body,children:[/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,onClick:e.keep,children:t.keep}),/* @__PURE__ */ (0,Z.jsx)(N,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ui,{size:14}),onClick:e.stop,children:t.confirm})]})}):e.status===`stopFailed`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsx)(B_,{children:t.failed})}):null}var GM={starting:`border-(--color-border)`,running:`border-(--color-border)`,awaiting:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,host_lost:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,pausing:`border-(--color-border)`,paused:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,stopping:`border-(--color-border)`,finalizing:`border-(--color-border)`,completed:`border-(--color-border-success)`,failed:`border-(--color-border-error)`,cancelled:`border-(--color-border)`};function KM(e){return{...e.actions.stopConfirm,failed:e.actions.stopFailed}}function qM(e,t,n){switch(e){case`starting`:return{text:t.launchKind===`preset`?n.preset.startingRunner:t.executorKind===`browser`?n.lead.startingBrowser:n.lead.startingRunner,need:!1};case`awaiting`:return{text:n.lead.awaiting,need:!0};case`running`:return{text:t.leadState===`active`?n.lead.active:Xj(t)?n.preset.chatLeadIdle:n.lead.idle,need:!1};case`stopping`:return{text:n.lead.stopping,need:!1};case`host_lost`:case`pausing`:case`paused`:case`finalizing`:case`completed`:case`failed`:case`cancelled`:return null}}function JM(e,t){switch(e){case`ai.credits_insufficient`:return t.end.failureReason.credits;case`turn_shape`:return t.end.failureReason.turnShape;case`lead_internal_error`:return t.end.failureReason.internal;case`initiator_unavailable`:return t.end.failureReason.initiatorUnavailable;default:return t.end.failureReason.other(e)}}function YM(e,t,n){let r=[];return e.scenarios!==null&&r.push(t?n.end.tallyBeforeStop(e.scenarios.done,e.scenarios.total):n.end.tally(e.scenarios.done,e.scenarios.total)),e.screensCreated>0&&r.push(n.end.screens(e.screensCreated)),r.length===0?``:`${r.join(`, `)}.`}function XM(e,t){return e.summary===null?[t.end.reportPartial]:[t.end.reportPartial,e.summary]}function ZM(e,t,n){switch(e.status){case`completed`:return e.end.report.summary;case`failed`:return[JM(e.end.failureReason,t),YM(e.end.tally,!1,t),...XM(e.end.report,t)].filter(e=>e!==``).join(` `);case`cancelled`:return[t.end.cancelledBy(e.end.stoppedBy.displayName,nM(e.end.endedAt,n)),YM(e.end.tally,!0,t),...XM(e.end.report,t)].filter(e=>e!==``).join(` `);case`running`:case`pausing`:case`paused`:case`stopping`:case`finalizing`:return null}}function QM({worker:e,lit:t,copy:n}){let{unit:r}=e,i=t&&e.status===`busy`,a=r===null?e.status===`opening`?n.worker.opening:e.status===`closing`?n.worker.closing:e.status===`busy`?n.worker.busy:n.worker.idle:r.kind===`atlas`?n.worker.crawl(r.title):r.title.trim()===``?n.worker.untitledScenario:r.title,o=r===null||r.progress===null?null:r.progress.kind===`make_auto`?{text:n.worker.progress(r.progress.done,r.progress.total),percent:r.progress.total===0?null:r.progress.done/r.progress.total*100}:{text:n.worker.steps(r.progress.steps),percent:null},s=r===null?null:Lj[r.kind];return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`grid grid-cols-[22px_minmax(0,1fr)_auto] items-center gap-2 py-1.5 text-xs`,"data-testid":`workflow-block-worker`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-label":n.worker.name(e.ordinal),className:h(`relative grid h-[18px] w-[22px] place-items-center rounded-[4px] border-[1.3px] border-solid pt-0.5 text-micro font-semibold`,`before:absolute before:inset-x-0 before:top-[3px] before:h-px before:opacity-70 before:content-['']`,i?`border-(--color-secondary) text-(--color-primary-text) before:bg-(--color-secondary)`:`border-(--color-border-strong) text-fg-secondary before:bg-(--color-border-strong)`),children:e.ordinal}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:h(`truncate`,r===null?`text-fg-muted`:`text-fg-primary`),children:a}),r!==null&&s!==null&&/* @__PURE__ */ (0,Z.jsxs)(`small`,{className:`flex items-center gap-1.5 text-caption text-fg-muted`,children:[/* @__PURE__ */ (0,Z.jsx)(s,{"aria-hidden":`true`,className:`size-[11px]`}),n.worker.kind[r.kind],e.unitCount>1&&` \u00B7 ${n.worker.task(e.unitCount)}`]})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{children:o!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`min-w-[52px] text-right text-caption text-fg-secondary tabular-nums`,children:o.text}),o.percent!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`relative mt-1 ml-auto h-1 w-[52px] overflow-hidden rounded-full bg-(--color-progress-track) shadow-[inset_0_0_0_1px_var(--color-border-light)]`,children:/* @__PURE__ */ (0,Z.jsx)(`b`,{className:h(`block h-full rounded-[inherit] [transition:width_var(--motion-long)_var(--ease-out)]`,o.percent>=100?`bg-(--color-progress-fill-success)`:`bg-(--color-progress-fill-running)`),style:{width:`${o.percent}%`}})})]})})]})}function $M({blockId:e,payload:t,state:n}){let r=$().cards.workflow,i=$().errors,a=Q(),{navigation:o,browser:s}=Zf(),c=UM(t.workflowId),l=Pj(t),u=l===`paused`&&n===`terminal`,d=Fj(l)||u,f=Zj(t,l),p=t.launchKind===`preset`&&l===`starting`&&!f?Ij(`running`,t.executorKind):Ij(l,t.executorKind),m=(t.status===`pausing`||t.status===`paused`)&&t.pauseCause!==void 0?t.pauseCause:null,g=m===null?r.pill[p.label]:`${r.pill[p.label]}: ${r.pauseCause[m]}`,_=qM(l,t,r),v=ZM(t,r,a),y=!d&&tM(t,s!==null),b=t.launchKind===`preset`&&y,x=s===null?`idle`:s.workflowHost.statusOf(t.workflowId),S=l===`host_lost`?t.executorKind===`agent`?r.hostLost.runner:s===null?r.hostLost.web:r.hostLost.sidePanel:null,C=c.status===`confirming`,w=!d&&t.status!==`stopping`;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{id:Jj(e),tabIndex:-1,"aria-labelledby":`${Jj(e)}-title`,"data-testid":`workflow-block`,"data-phase":l,className:h(`overflow-hidden rounded-lg border border-solid bg-(--color-bg-card) shadow-(--shadow-sm) [animation:scale-in_var(--motion-long)_var(--ease-out)_both] focus:outline-none`,u?`border-(--color-border)`:GM[l]),children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex items-start gap-3 px-4 pt-4 pb-3`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:h(`grid size-[34px] flex-none place-items-center rounded-md border border-solid bg-(--color-bg-tertiary) text-(--color-primary-text)`,d?`border-(--color-border-light)`:`border-[color-mix(in_srgb,var(--color-primary)_45%,transparent)] shadow-(--glow-primary)`),children:t.launchKind===`preset`?/* @__PURE__ */ (0,Z.jsx)(ci,{className:`size-4`}):/* @__PURE__ */ (0,Z.jsx)(Zr,{className:`size-4`})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0 grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{id:`${Jj(e)}-title`,className:`text-sm leading-[1.3] font-semibold tracking-[-0.25px] text-fg-primary`,children:t.launchKind===`preset`?r.topic(t.topic):r.title[t.launchKind]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mt-0.5 text-caption text-fg-muted`,children:t.launchKind===`preset`?/* @__PURE__ */ (0,Z.jsx)(NM,{payload:t,copy:r.preset,locale:a}):r.subtitle(r.topic(t.topic),t.maxAgents,nM(t.createdAt,a))})]}),/* @__PURE__ */ (0,Z.jsx)(jM,{tone:f?`wait`:u?`stop`:p.tone,role:`status`,children:f?r.preset.pillAwaitingBrowser:g})]}),t.launchKind===`preset`&&/* @__PURE__ */ (0,Z.jsx)(tN,{payload:t,phase:l,lead:_,sidePanel:s!==null,copy:r,locale:a}),t.launchKind!==`preset`&&_!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:h(`mx-4 flex items-center gap-2 rounded-md px-3 py-2 text-xs`,_.need?`bg-(--color-warning-bg) text-fg-primary`:`bg-(--color-bg-modal-inset) text-fg-secondary`),children:[_.need?/* @__PURE__ */ (0,Z.jsx)(Dr,{"aria-hidden":`true`,className:`size-3.5 text-(--color-warning-text)`}):/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 flex-none rounded-full bg-(--color-secondary) [animation:var(--animation-pulse-dot)]`}),_.text]}),S!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,className:`mx-4 mb-3 flex items-start gap-2 rounded-md border border-solid border-(--color-border-warning) bg-(--color-warning-bg) p-3 text-xs leading-normal text-fg-primary`,children:[/* @__PURE__ */ (0,Z.jsx)(Ze,{"aria-hidden":`true`,className:`mt-px size-3.5 flex-none text-(--color-warning-text)`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{children:S})]}),t.launchKind!==`preset`&&!d&&l!==`stopping`&&/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`mt-3 mb-0 flex list-none flex-col gap-1 px-4 pb-3`,children:l===`starting`&&t.workers.length===0?/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`grid grid-cols-[22px_minmax(0,1fr)_auto] items-center gap-2 py-1.5 text-xs`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-[18px] w-[22px] place-items-center rounded-[4px] border-[1.3px] border-solid border-(--color-border-strong) text-micro text-fg-secondary`,children:`\u00B7`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`min-w-0 truncate text-fg-muted`,children:t.executorKind===`browser`?r.startingRow.browser:r.startingRow.runner}),/* @__PURE__ */ (0,Z.jsx)(`div`,{})]}):t.workers.map(e=>/* @__PURE__ */ (0,Z.jsx)(QM,{worker:e,lit:l!==`host_lost`,copy:r},e.ordinal))}),t.launchKind!==`preset`&&v!==null&&v!==``&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`mx-4 mt-0 mb-3 line-clamp-4 text-xs leading-[1.6] text-fg-secondary`,children:v}),/* @__PURE__ */ (0,Z.jsx)(WM,{state:c,words:t.launchKind===`preset`?r.preset.stopConfirm:KM(r)}),x===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsx)(B_,{children:i.byCode[`client.workflow_host_action_failed`]})}),!C&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-0 border-t border-solid border-(--color-border-light) bg-(--color-bg-tertiary) py-2 pr-3 pl-4`,children:[b&&/* @__PURE__ */ (0,Z.jsx)(eN,{resuming:x===`resuming`,onResume:()=>s==null?void 0:s.workflowHost.attach(t.workflowId),label:r.actions.resume}),!b&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(Nn,{size:14}),onClick:()=>o.openPath(t.deeplink),children:l===`completed`||t.launchKind===`preset`&&d?r.actions.openReport:t.launchKind===`preset`?r.actions.openLaunch:r.actions.open}),w&&/* @__PURE__ */ (0,Z.jsx)(N,{variant:`danger-ghost`,size:`xs`,className:t.launchKind===`preset`?`ml-auto`:void 0,icon:/* @__PURE__ */ (0,Z.jsx)(ui,{size:14}),loading:c.status===`stopping`,disabled:c.status===`stopping`,onClick:c.ask,"data-testid":`workflow-block-stop`,children:r.actions.stop}),y&&!b&&/* @__PURE__ */ (0,Z.jsx)(eN,{className:`ml-auto`,resuming:x===`resuming`,onResume:()=>s==null?void 0:s.workflowHost.attach(t.workflowId),label:r.actions.resume})]})]})}function eN({className:e,resuming:t,onResume:n,label:r}){return/* @__PURE__ */ (0,Z.jsx)(N,{variant:`primary`,size:`xs`,...e!==void 0&&{className:e},icon:/* @__PURE__ */ (0,Z.jsx)($r,{size:14}),loading:t,disabled:t,onClick:n,"data-testid":`workflow-block-resume`,children:r})}function tN({payload:e,phase:t,lead:n,sidePanel:r,copy:i,locale:a}){let o=Zj(e,t),s=e.status===`completed`?e.end.report.notDone:null,c=e.status===`cancelled`||e.status===`failed`?[]:PM(e.findings,s,i.preset),l=RM(e,i.preset,a);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 px-4 pb-3 text-xs text-fg-secondary`,children:[o?/* @__PURE__ */ (0,Z.jsx)(IM,{text:r?i.preset.awaitingBrowser.sidePanel:i.preset.awaitingBrowser.web}):n!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`grid grid-cols-[20px_minmax(0,1fr)] items-start gap-2`,children:[n.need?/* @__PURE__ */ (0,Z.jsx)(Dr,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-(--color-warning-text)`}):/* @__PURE__ */ (0,Z.jsx)(ci,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:n.need?`text-fg-primary`:void 0,children:n.text})]}),e.launch!==void 0&&/* @__PURE__ */ (0,Z.jsx)(VM,{launch:e.launch}),/* @__PURE__ */ (0,Z.jsx)(FM,{items:c}),e.status===`completed`&&/* @__PURE__ */ (0,Z.jsx)(zM,{text:e.end.report.summary,partial:!1}),l!==null&&/* @__PURE__ */ (0,Z.jsx)(zM,{text:l,partial:!0})]})}function nN(e){if(e===void 0)return null;let t=e.trim();return t===``?null:t}function rN({block:e,locked:t,stopping:n,resolved:r,onStopWaiting:i}){let a=$().shell.runWait,{commandFailures:o}=Zf(),{status:s,subjects:c,toolCallId:l}=e.payload,u=H_(o,l),d=u[u.length-1],f=s===`waiting`||s===`fired`,p=s===`waiting`||s===`fired`||s===`running`;return/* @__PURE__ */ (0,Z.jsxs)(Cp,{icon:/* @__PURE__ */ (0,Z.jsx)(zr,{size:16}),title:a.title,tileTone:p?`info`:s===`done`?`success`:`muted`,meta:/* @__PURE__ */ (0,Z.jsx)(Tp,{tone:p?`info`:s===`done`?`success`:`neutral`,role:`status`,"aria-live":`polite`,children:a.status[s]}),data:{"data-run-wait-status":s},footer:f&&!r?/* @__PURE__ */ (0,Z.jsx)(Np,{children:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(xr,{size:14}),disabled:t,loading:n,onClick:()=>i(l),children:a.stopWaiting})}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(Ap,{children:c.map(e=>{let t=nN(e.label);return/* @__PURE__ */ (0,Z.jsx)(jp,{name:t===null?a.subject[e.kind]:t,note:t===null?a.id(e.id):`${a.subject[e.kind]} \u00B7 ${a.id(e.id)}`},`${e.kind}:${e.id}`)})}),f&&!r&&d!==void 0&&/* @__PURE__ */ (0,Z.jsx)(B_,{children:a.stopWaitingFailed})]})}var iN=(0,R.memo)(function({text:e,live:t}){let n=(0,R.useMemo)(()=>Ki(e,{cache:!t}),[e,t]),r=(0,R.useMemo)(()=>({__html:n}),[n]);return/* @__PURE__ */ (0,Z.jsx)(`div`,{dangerouslySetInnerHTML:r})}),aN={scenario:`folded`,"runner-readiness":`folded`,report:`folded`,coverage:`folded`,search:`folded`,"change-set":`open-until-decided`,"job-status":`open`,"run-start-agent":`open`,"run-in-tab-outcome":`open`,"section-link":`open`,"runner-enrollment":`open`,references:`open`},oN=8,sN={running:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--running`,done:`qa-ai-chat-acts__tick`,failed:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--failed`,unknown:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--unknown`};function cN({chips:e}){let t=e.slice(0,oN);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-acts__ticks`,"aria-hidden":`true`,children:[t.map(e=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:sN[e.status]},e.key)),e.length>oN&&/* @__PURE__ */ (0,Z.jsx)(`em`,{children:`+${String(e.length-oN)}`})]})}function lN({status:e}){switch(e){case`running`:return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__spin`,"aria-hidden":`true`});case`done`:return/* @__PURE__ */ (0,Z.jsx)(Ue,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`});case`failed`:return/* @__PURE__ */ (0,Z.jsx)(kr,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`});case`unknown`:return/* @__PURE__ */ (0,Z.jsx)(Dr,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`})}}function uN({chip:e,copy:t}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ai-chat-chip qa-ai-chat-chip--${e.status}`,"data-tool-name":e.toolName,"data-tool-title-state":e.titleAbsent?`absent`:`present`,"data-tool-outcome":e.status,children:[/* @__PURE__ */ (0,Z.jsx)(lN,{status:e.status}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__label`,children:e.label}),e.status===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__why`,children:t.failed}),e.status===`unknown`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__why`,children:t.unknown}),e.count>1&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__rep`,children:`\u00D7${String(e.count)}`})]})}function dN({activity:e,copy:t,showZeroDone:n}){let r=n||e.done>0;return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-acts__tally`,children:[r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub`,children:` ${t.doneShort(e.done)}`}),e.failed>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub`,children:`,`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub qa-ai-chat-acts__sub--error`,children:` ${t.failedShort(e.failed)}`})]})]})}function fN({activity:e,thinkingWord:t,copy:n}){let[r,i]=(0,R.useState)(!1),a=_p(),o=(0,R.useId)(),{chips:s,phase:c}=e,l=s.length,u=e.failed+e.unknown>0?n.doneOf(e.done,l):n.done(l),d,f;switch(c.kind){case`running`:d=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-acts__lead qa-ai-chat-acts__sheen`,children:c.chip.label}),/* @__PURE__ */ (0,Z.jsx)(dN,{activity:e,copy:n,showZeroDone:!1})]}),f=n.running(c.chip.label);break;case`between`:d=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-acts__lead qa-ai-chat-acts__sheen`,children:t}),/* @__PURE__ */ (0,Z.jsx)(dN,{activity:e,copy:n,showZeroDone:!0})]}),f=n.done(e.done);break;case`finished`:d=/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__lead`,children:u}),f=u}return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-acts`,"data-testid":`ai-chat-activity-line`,"data-phase":c.kind,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-acts__row`,"aria-expanded":r,"aria-controls":o,onClick:()=>{a(),i(e=>!e)},children:[/* @__PURE__ */ (0,Z.jsx)(cN,{chips:s}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__text`,children:d}),c.kind===`finished`&&e.failed>0&&/* @__PURE__ */ (0,Z.jsx)(Ze,{className:`qa-ai-chat-acts__mark qa-ai-chat-acts__mark--error`,"aria-hidden":`true`}),c.kind===`finished`&&e.failed===0&&e.unknown>0&&/* @__PURE__ */ (0,Z.jsx)(Dr,{className:`qa-ai-chat-acts__mark`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(ve,{className:`qa-ai-chat-acts__chevron`,"aria-hidden":`true`})]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,role:`status`,children:f}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-acts__panel`,id:o,hidden:!r,children:s.map(e=>/* @__PURE__ */ (0,Z.jsx)(uN,{chip:e,copy:n},e.key))})]})}function pN(e,t,n){if(!t.has(e.id))return n?`running`:`unknown`;let r=t.get(e.id);return sm(r)?`failed`:cm(r)?`unknown`:`done`}function mN(e,t,n){let r=new Map(e.toolResults.map(e=>[e.toolCallId,e.result])),i=[],a=null;for(let o of e.toolCalls){let e=pN(o,r,t.live),s=n(o),c=e===`running`?void 0:i.find(t=>t.label===s&&t.status===e);if(c!==void 0){c.count+=1;continue}let l={key:o.id,label:s,titleAbsent:o.title===void 0,toolName:o.toolName,status:e,count:1};i.push(l),e===`running`&&(a=l)}let o=e=>i.filter(t=>t.status===e).length;return{chips:i,phase:a===null?t.live&&t.lastAndWorking?{kind:`between`}:{kind:`finished`}:{kind:`running`,chip:a},done:o(`done`),failed:o(`failed`),unknown:o(`unknown`)}}var hN=class extends R.Component{constructor(...e){super(...e),this.state={failed:!1,attempt:0}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){this.props.logger.error(`chat card group failed to render`,{group:this.props.groupKey,error:e.message,componentStack:t.componentStack===null?null:t.componentStack})}render(){if(!this.state.failed)return/* @__PURE__ */ (0,Z.jsx)(gN,{children:this.props.children},this.state.attempt);let{copy:e}=this.props;return/* @__PURE__ */ (0,Z.jsx)($O,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(ti,{}),role:`alert`,title:e.title,text:e.text,actions:/* @__PURE__ */ (0,Z.jsx)(N,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:14}),onClick:()=>this.setState(e=>({failed:!1,attempt:e.attempt+1})),children:e.retry}),testId:`ai-chat-cards-failed`})}};function gN({children:e}){return e}function _N(e,t){e.set(t.key,t)}function vN(e,t){let n=new Map((e.toolCalls===void 0?[]:e.toolCalls).map(e=>[e.id,e])),r=/* @__PURE__ */ new Map;t.forEach((e,t)=>{for(let n of e.toolCalls)r.set(n.id,t)});let i=/* @__PURE__ */ new Map;for(let t of e.toolResults===void 0?[]:e.toolResults){let e=n.get(t.toolCallId),a=r.get(t.toolCallId);if(e===void 0||a===void 0){_N(i,{kind:`unsupported`,key:`orphan:${t.toolCallId}`,placement:{kind:`after`},resultKind:lm(t.result)});continue}let o=bk(t.result);if(o===null)continue;let s=o.family,c={call:{toolCallId:e.id,toolName:e.toolName,title:e.title,args:e.args},raw:t.result},l=o.grouping===`step`?`${s}@step${String(a)}`:`${s}@turn`,u=i.get(l);if(u!==void 0&&u.kind===`family`){u.inputs.push(c);continue}_N(i,{kind:`family`,key:l,family:s,placement:o.grouping===`message`?{kind:`after`}:{kind:`step`,index:a},inputs:[c]})}let a=(e.blocks===void 0?[]:e.blocks).flatMap(e=>e.kind===`job_status`?[{call:null,raw:e.payload}]:[]);a.length>0&&_N(i,{kind:`family`,key:`job-status@turn`,family:`job-status`,placement:{kind:`after`},inputs:a});let o=(e.toolResults??[]).flatMap(e=>{let t=im(e.result);return t===void 0?[]:t});return o.length>0&&_N(i,{kind:`family`,key:`references@turn`,family:`references`,placement:{kind:`after`},inputs:[{call:null,raw:o}]}),[...i.values()]}function yN({copy:e,locale:t,logger:n}){let r=e.shell.transcript,i=e=>[e.title===void 0?r.toolCall:e.title[t],...e.operationTitles===void 0?[]:e.operationTitles.map(e=>e[t])].join(` \u00B7 `),a=e=>{let t=e.kind===`unsupported`?/* @__PURE__ */ (0,Z.jsx)(Hp,{title:r.unknownTool.title,body:r.unknownTool.body,family:`orphan`,resultKind:e.resultKind}):/* @__PURE__ */ (0,Z.jsx)(pp,{mode:aN[e.family],children:JO[e.family].group(e.inputs,e.key)});return/* @__PURE__ */ (0,Z.jsx)(hN,{groupKey:e.key,copy:r.cardsFailed,logger:n,children:t},e.key)};return{cards(e,t){let n=t.map(()=>[]),r=[];for(let o of vN(e,t)){var i;let e=a(o);o.placement.kind===`after`?r.push(e):(i=n[o.placement.index])==null||i.push(e)}return{atStep:n.map(e=>e.length===0?null:e),afterProse:r.length===0?null:r}},activityLine(e,t){let n=mN(e,t,i);return n.chips.length===0?null:/* @__PURE__ */ (0,Z.jsx)(fN,{activity:n,thinkingWord:r.thinkingPhase,copy:r.activity})}}}function bN(e){let{copy:t,locale:n,logger:r,questions:i,confirmedCalls:a,answeredGrants:o,pendingHostCallIds:s,stoppingHostCallIds:c,refusalSentence:u,onStopWaiting:d,runWaitLocked:f,decisionProgress:p,answeredToolCallIds:m,aiTaskBlockIds:h,hiddenWorkflowId:g,conversationId:_,openConversation:v}=e,y=p!==null&&p.current!==null?p.current.toolCallId:null,b=(0,R.useMemo)(()=>yN({copy:t,locale:n,logger:r}),[t,n,r]);return(0,R.useMemo)(()=>({content:(e,t)=>/* @__PURE__ */ (0,Z.jsx)(iN,{text:e,live:t}),cards:b.cards,activityLine:b.activityLine,activity:null,blocks:e=>{var t;let n=(e.blocks??[]).filter(e=>!Le(e)).filter(e=>ab(e)!==null||A(e)&&!aM(e.payload.subjects,h)||l(e)&&e.payload.workflowId!==g),r=((t=i.loadingAssistantMessageIds)==null?void 0:t.includes(e.id))===!0;return n.length===0&&!r?null:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length===0&&r&&/* @__PURE__ */ (0,Z.jsx)(Cb,{loading:!0,controller:i}),n.map(e=>{let t=ab(e);return t===null?A(e)?/* @__PURE__ */ (0,Z.jsx)(rN,{block:e,locked:f,stopping:y===e.payload.toolCallId,resolved:m.includes(e.payload.toolCallId),onStopWaiting:d},e.id):l(e)?/* @__PURE__ */ (0,Z.jsx)($M,{blockId:e.id,payload:e.payload,state:e.state},e.id):null:/* @__PURE__ */ (0,Z.jsx)(Cb,{batch:t,controller:i,placement:`transcript`},e.id)})]})},confirmedLine:e=>YO({message:e,conversationId:_,confirmedCalls:a,copy:t.cards.runStartAgent,refusalSentence:u,pendingHostCallIds:s,stoppingHostCallIds:c,waitingForBrowser:t.shell.transcript.toolCallStatus.waitingForBrowser,stoppingBrowser:t.shell.transcript.toolCallStatus.stoppingBrowser}),answersLeadGrant:e=>e.answersLeadGrant===!0||o.has(e.id),openConversation:v,attachments:e=>e.attachments===void 0?null:/* @__PURE__ */ (0,Z.jsx)(TM,{attachments:e.attachments})}),[h,g,o,m,a,_,v,s,c,t,d,i,u,b,f,y])}var xN=`[data-testid="ai-chat-dock-stack"]`,SN=`:is(input, textarea, button)`,CN=`${SN}:not([disabled])`;function wN(e){let{request:t,consoleRef:n,historyReady:r,focusComposer:i}=e,a=(0,R.useRef)(0);(0,R.useEffect)(()=>{var e;if(t===void 0||t===0||t===a.current||!r)return;a.current=t;let o=(e=n.current)==null?void 0:e.querySelector(xN),s=o==null?[]:[...o.children],c=s.find(e=>e.querySelector(CN)!==null);if(c instanceof HTMLElement){var l;c.scrollIntoView({block:`nearest`,behavior:`smooth`}),(l=c.querySelector(CN))==null||l.focus({preventScroll:!0});return}let u=s.find(e=>e.querySelector(SN)!==null);if(u instanceof HTMLElement){u.scrollIntoView({block:`nearest`,behavior:`smooth`});return}i()},[t,r,n,i])}var TN=(0,R.memo)(function({host:e,focusRequest:t}){let n=Ib(e.locale),r=mA(e);return r===null?null:/* @__PURE__ */ (0,Z.jsx)(kf,{locale:n,children:/* @__PURE__ */ (0,Z.jsx)(EN,{host:e,runtime:r,openCardFocusRequest:t})})});function EN({host:e,runtime:t,openCardFocusRequest:n}){let r=$(),i=r.shell,{session:a}=t,o=hA(t),{chat:s}=o;gA(e.leaveGuard,{unsent:o.unsentTurns.length>0,unaccepted:o.holdsUnacceptedTurns});let c=Q(),l=Ib(e.project),u=Ib(e.readiness),d=Ib(e.visibility),f=Rb(e.browser===null?null:e.browser.activeTabUrl),[p]=(0,R.useState)(aS),[m,h]=(0,R.useState)(0),[g,_]=(0,R.useState)(!1),[v,y]=(0,R.useState)(!1),[b,x]=(0,R.useState)(0),{register:S,dockEntries:C,tether:w,focusRequest:T,focusComposer:E}=lg({chat:s}),ee=ug({chat:s,decisionProgress:o.decisionProgress}),D=l===null?null:l.id;(0,R.useEffect)(()=>{a.setProject(D)},[D,a]);let O=u.kind===`ready`;(0,R.useEffect)(()=>{O&&a.reloadCapabilities()},[O,a]);let{capabilityChanges:te}=e;(0,R.useEffect)(()=>{if(O&&te!==null)return te.subscribe(()=>a.reloadCapabilities())},[O,te,a]);let k=yA({session:a,store:e.modelSelection,capabilityLoad:o.capabilityLoad}),A=QO({runtime:t,source:e.conversationContext,conversationId:o.conversationId}),j=ZS(s.messages),ne=fk({transport:e.transport,stopOutcomes:t.stopOutcomes,conversationId:o.conversationId,messages:s.messages,confirmedCalls:j.confirmedCalls,historyLoading:o.historyLoad.status===`loading`}),re=ne.pendingIds,{forgetResolvedConfirmations:M}=j;(0,R.useEffect)(()=>{M()},[o.conversationId,M]),$b({transport:e.transport,logger:e.logger,entityChanged:e.entityChanged});let N=OA({transport:e.transport,logger:e.logger,conversationId:o.conversationId,recordResolvedConfirmation:j.recordResolvedConfirmation}),ie=SM({conversationId:o.conversationId,historyLoad:o.historyLoad,launchLevels:t.launchLevels,capabilityLoad:o.capabilityLoad}),ae=e.conversationPin,oe=ae!==null,se=Rb(ae===null?null:ae.placeholder),ce=gv({http:e.http,ready:O}),le=TA({session:a,conversationId:o.conversationId,messages:s.messages,restoredBatchIds:o.restoredQuestionBatchIds,locale:c,logger:e.logger}),{forSend:ue}=ie,{send:de,prepareSend:fe,sendPrepared:pe,retryLastTurn:me}=wM({session:a,pin:ae,launchEffortForSend:ue,launchPlace:ce}),he=(0,R.useCallback)(()=>{ne.markStopping(),a.stop()},[ne.markStopping,a]),ge=(0,R.useCallback)(e=>{y(!1),a.openConversation(e)},[a]),{resetNewConversation:_e}=ie,ve=(0,R.useCallback)(()=>{y(!1),p.set(``),x(e=>e+1),_e(),a.startNewConversation()},[p,a,_e]),ye=o.decisionProgress,be=aa(s)||ye!==null,xe=s.answeredToolCallIds,Se=(0,R.useMemo)(()=>({subscribe:t=>e.transport.subscribe(e=>{e.kind===`task-card`&&t(e.event)})}),[e.transport]),Ce=vM(e.browser),we=gM({http:e.http,logger:e.logger,active:Ce!==null&&u.kind===`ready`,projectId:D,visible:d,conversationId:o.conversationId}),Te=(0,R.useMemo)(()=>({project:l,navigation:e.navigation,http:e.http,conversation:{send:e=>{de(e,`external`,[])},setDraft:p.set,changeSetDecision:{register:S,decide:(e,t)=>{t===`confirm`?a.confirmChangeSet(e):a.rejectChangeSet(e)},isLocked:ee,progress:ye,isResolved:e=>xe.includes(e),tether:w}},browser:e.browser===null||Ce===null?null:{runFailures:o.browserRunFailures,workflowHost:Ce},commandFailures:o.commandFailures,taskEvents:Se,jobStatus:t.jobStatus,viewer:t.viewer,dispatchRefusalSentence:e.dispatchRefusalSentence,logger:e.logger}),[e,l,t.jobStatus,t.viewer,ee,ye,p,xe,w,S,a,de,o.browserRunFailures,o.commandFailures,Se,Ce]),Ee=(0,R.useMemo)(()=>/* @__PURE__ */ new Set([...s.pendingConfirmations.map(e=>e.toolCallId),...s.answeredToolCallIds]),[s.answeredToolCallIds,s.pendingConfirmations]),[De]=(0,R.useState)(VA),Oe=(0,R.useMemo)(()=>De(s.messages,Ee),[De,s.messages,Ee]),ke=Fb({conversationId:o.conversationId,messages:Oe}),Ae=Fa(s).length,je=(0,R.useMemo)(()=>Ae===Oe.length?Oe:Oe.slice(Oe.length-Ae),[Oe,Ae]),Me=(0,R.useMemo)(()=>Oe.slice(0,Oe.length-Ae),[Oe,Ae]),{loadOlderHistory:Ne}=a,Pe=o.olderHistory.status,Fe=(0,R.useMemo)(()=>({status:Pe,load:Ne,copy:i.transcript.olderHistory}),[Pe,Ne,i.transcript.olderHistory]),Ie=(0,R.useCallback)(e=>a.rejectRunWait(e),[a]),Re=XO(s.pendingConfirmations,j.confirmedCalls),{aiTaskBlockIds:ze,hiddenWorkflowId:Be}=_M(s.messages,ae),Ve=bN({copy:r,locale:c,logger:e.logger,questions:le,confirmedCalls:j.confirmedCalls,answeredGrants:Re,pendingHostCallIds:re,stoppingHostCallIds:ne.stoppingIds,refusalSentence:e.dispatchRefusalSentence,onStopWaiting:Ie,runWaitLocked:be,decisionProgress:ye,answeredToolCallIds:s.answeredToolCallIds,aiTaskBlockIds:ze,hiddenWorkflowId:Be,conversationId:o.conversationId,openConversation:ge}),He=(0,R.useMemo)(()=>IA({errors:r.errors,classes:i.errors.classes}),[r.errors,i.errors.classes]),Ue=s.error===null?null:s.error.errorCode??null;(0,R.useEffect)(()=>{Ue!==null&&Pu.has(Ue)&&a.reloadCapabilities()},[Ue,a]);let We=(0,R.useMemo)(()=>{if(s.error===null)return null;let e=Fu(s.error);return e.errorCode!==null&&Nu.has(e.errorCode)||e.errorCode===`chat.busy`&&g?null:{error:e,presentation:He(e),onRetry:me}},[g,s.error,He,me]),Ge=(0,R.useMemo)(()=>({byline:i.header.title,thinking:{thinking:i.transcript.thinking,thoughtFor:i.transcript.thoughtFor},thinkingPhase:i.transcript.thinkingPhase,toolCallCancelled:i.transcript.toolCallCancelled,toolCallStatus:i.transcript.toolCallStatus,copyAnswer:i.transcript.copyAnswer,retry:i.transcript.retry,details:i.transcript.details,feedLabel:i.transcript.feedLabel,scrollToBottom:i.transcript.scrollToBottom,leadProse:{byline:oe?i.transcript.taskLeadByline:i.transcript.leadByline,formatTime:e=>zC(e,c)}}),[i,c,oe]),Ke=Oe.length===0&&!s.isStreaming&&o.historyLoad.status!==`loading`?Kb({report:A.report,copy:i,locale:c}):null,qe=(0,R.useRef)(null);wN({request:n,consoleRef:qe,historyReady:o.conversationId!==null&&o.historyLoad.status===`idle`,focusComposer:E});let Je=[...s.messages.flatMap(e=>e.blocks??[]),...Object.values(s.pendingMessageBlocks).flat()].filter(Le).flatMap(e=>{let t=ab(e);return t===null?[]:[t]}),Ye=e=>{var t,n;let r=Je.find(t=>t.origin===`agent`&&t.asker.kind===`workflow`&&t.asker.id===e&&t.assumption===null);if(r===void 0)return;let i=((t=qe.current)==null?void 0:t.querySelectorAll(`[data-testid="ai-chat-dock"] [data-asker-kind="workflow"]`))??[],a=Array.from(i).find(t=>t.dataset.askerId===e&&t.dataset.questionBatchId===r.id);a!==void 0&&(a.scrollIntoView({block:`nearest`,behavior:`smooth`}),(n=a.querySelector(`:is(input, textarea, button):not([disabled])`))==null||n.focus({preventScroll:!0}))},Xe=Iu(s.messages),Ze=!s.isStreaming&&(o.canRecoverDanglingTurn||Ue===`assistant.recover_last_message`),Qe=o.commandFailures.filter(e=>e.command===`chat-stop`),$e=Qe[Qe.length-1],P=A.report===null?null:/* @__PURE__ */ (0,Z.jsx)(ZO,{label:i.context.report.label,icon:/* @__PURE__ */ (0,Z.jsx)(wr,{}),title:Hb(A.report.context,i.context.report),tags:Ub(A.report,i.context.report),note:i.context.report.note,testId:`ai-chat-report-context`}),et=o.isComposerInteractive&&u.kind===`ready`,tt=o.conversationId===null&&o.permissionMode.kind===`unknown`,nt=et&&!tt,rt=ao(s),it=o.canSendChatTurn&&!rt,at=xA({session:a,view:o.permissionMode,ready:et,newConversation:o.conversationId===null,visible:d}),ot=o.capabilityLoad.status===`ready`?o.capabilityLoad.value:null,st=ot===null?null:qn(ot,o.modelSelectionId,N),ct=iS({host:e,projectId:D,model:st===null?null:st.model,resetKey:b,accepting:nt&&ae===null}),lt=/* @__PURE__ */ (0,Z.jsx)(ox,{capabilities:o.capabilityLoad,selectionId:o.modelSelectionId,onSelect:k,resolvedEcho:N,overrideRejected:o.modelSelectionRejected!==null,isStreaming:s.isStreaming,onManageKeys:()=>e.navigation.openPath(cx(`ai-keys`)),onUpgrade:()=>e.navigation.openPath(cx(`billing-plan`)),openRequest:ct.modelListRequest,flagged:ct.modelFlagged});return/* @__PURE__ */ (0,Z.jsx)(Xf,{value:Te,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-panel`,"data-testid":`ai-chat`,...ct.drop.handlers,children:/* @__PURE__ */ (0,Z.jsxs)(Vf,{http:e.http,logger:e.logger,conversationId:o.conversationId,children:[e.chrome===null?null:e.chrome.resizeHandle,/* @__PURE__ */ (0,Z.jsx)(ex,{projectName:l===null?null:l.name,pinned:e.conversationPin,historyOpen:v,historyAvailable:l!==null,onOpenHistory:()=>y(!0),onNewConversation:ve,hostActions:e.chrome===null?null:e.chrome.headerActions,copy:i.header}),Ce!==null&&/* @__PURE__ */ (0,Z.jsx)(lM,{launches:we.launches,messages:s.messages,workflowHost:Ce,openPath:t=>e.navigation.openPath(t),onAttachSettled:we.reread}),/* @__PURE__ */ (0,Z.jsx)(vk,{connection:{connectionStatus:o.connectionStatus,labels:{reconnecting:i.connection.reconnecting,restored:i.connection.restored,failedTitle:i.connection.failedTitle,failedText:i.connection.failedHint[e.connectionFailedHint]}},readiness:u,capabilities:Ru(o.capabilityLoad),onReloadCapabilities:()=>a.reloadCapabilities(),unsent:{turns:o.unsentTurns,canSend:it,onSend:e=>{a.sendUnsentTurn(e)},onDiscard:e=>a.discardUnsentTurn(e),cause:Ue===Mu?r.errors.byCode[Mu]:null,filesOf:Jf({models:ot,locale:c,copy:r.attachments,logger:e.logger})},interruptedTurnId:Ze?Xe:null,reportInitializing:Ue===`reports.projection_not_initialized`,onRetryLastTurn:me,historyFailed:o.historyLoad.status===`failed`&&!o.historyLoad.notFound,onRetryHistory:()=>{o.historyLoad.status===`failed`&&a.openConversation(o.historyLoad.conversationId)},stopFailure:$e===void 0?null:$e,permissionWriteFailure:at.failure,permissionReadFailure:at.readFailure,pageScan:e.browser===null?null:{status:o.pageAnalysis.status,failureReason:o.pageAnalysis.failureReason,tabUrl:f},context:P,copy:i}),/* @__PURE__ */ (0,Z.jsx)(ag,{messages:Me}),/* @__PURE__ */ (0,Z.jsx)(Nj,{messages:je,isStreaming:s.isStreaming,liveThinkingText:s.thinkingText,awaitingConfirmation:s.pendingConfirmations.length>0,error:We,empty:Ke===null?null:/* @__PURE__ */ (0,Z.jsx)(Jb,{welcome:Ke,draftStore:p,onSend:e=>{de(e,`external`,[])},onInsert:e=>{p.set(e),h(e=>e+1)}}),renderers:Ve,copy:Ge,presentError:He,shown:e.shown,olderHistory:Fe}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-console`,ref:qe,children:[/* @__PURE__ */ (0,Z.jsx)(cM,{messages:s.messages,workflowHost:Ce,onToQuestion:Ye}),/* @__PURE__ */ (0,Z.jsx)(Db,{regionLabel:i.confirmation.regionLabel,conversationId:o.conversationId,questions:Je,questionController:le,changeSets:C,isDecisionLocked:ee,decisionProgress:ye,onChangeSetDecision:(e,t)=>{t===`confirm`?a.confirmChangeSet(e):a.rejectChangeSet(e)},onConfirmAll:(e,t)=>a.confirmAll([...e,...t],t),changeSetTether:w,onFocusComposer:E,launchDraft:ke,confirmation:s.pendingConfirmations.length>0?{items:s.pendingConfirmations,onConfirm:e=>a.confirm(e),onReject:e=>a.reject(e)}:null}),/* @__PURE__ */ (0,Z.jsx)(Uf,{messages:Oe,filesBefore:s.historyWindow.filesBefore,model:st===null?null:st.model,onPickModel:ct.openModelList}),/* @__PURE__ */ (0,Z.jsx)(IS,{draftStore:p,isStreaming:rt,pendingHostAction:re.size>0,interactive:nt,placeholder:Lu(u,o,i.composer,se),errorCode:Ue,prepareSend:fe,sendPrepared:pe,stop:he,autoFocus:d,fillRequest:m,focusRequest:T,chips:ae===null?{modelPicker:lt,effortChip:/* @__PURE__ */ (0,Z.jsx)(yn,{choice:ie.choice,facts:ie.facts,onChoose:ie.choose,onAgentsChange:ie.setAgents,onOpenSettings:()=>e.navigation.openPath(cx(`ai-keys`)),copy:i.composer.effort,look:{kind:`setting`,chipMaxShort:i.composer.effort.chipMaxShort}}),placeChip:/* @__PURE__ */ (0,Z.jsx)(Ng,{place:ce.place,view:ce.view,fleet:ce.fleet,onChoose:ce.choose,onOpen:ce.reloadFleet,copy:i.composer.place,heading:!0,thisBrowserReach:e.browser===null?`tasks_only`:`opens_windows`,look:`setting`}),permission:at.composer,attachments:ct.attachments,onPickModel:ct.openModelList}:null,onBusyChainChange:_,copy:i.composer}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,"aria-live":`polite`,"data-testid":`ai-chat-permission-live`,children:at.announced===null?``:i.composer.permission.arrived(i.composer.permission[at.announced])})]}),ct.drop.active&&/* @__PURE__ */ (0,Z.jsx)(lx,{copy:i.composer.attachments.drop}),v&&l!==null&&e.conversationPin===null&&/* @__PURE__ */ (0,Z.jsx)(uk,{http:e.http,logger:e.logger,projectId:l.id,currentConversationId:o.conversationId,locale:c,copy:i.history,dismissLabel:i.notices.dismiss,onClose:()=>y(!1),onOpen:ge,onNewConversation:ve})]})})})}var DN=`scenarios.not_auto_runnable`;function ON(e,t){if(!(t instanceof He)||t.errorCode===void 0)return e(`hub.actions.runner.errors.dispatch`);if(t.errorCode===DN)return PN(t.params);if(t.errorCode===`agents.queue_full`){var n,r;let i=IN((n=t.params)==null?void 0:n.limit),a=IN((r=t.params)==null?void 0:r.queued);return i===null||a===null?e(`hub.actions.runner.errors.queueFullGeneric`):e(`hub.actions.runner.errors.queueFull`,{limit:i,queued:a})}let i=MN[t.errorCode];return e(i===void 0?`hub.actions.runner.errors.dispatch`:i)}function kN(e,t){if(t.error_code===DN)return PN(t.params);let n=NN[t.error_code];return e(n===void 0?`hub.actions.runner.rejections.unknown`:n)}function AN(e){return e.some(e=>{var t;return e.error_code===DN&&((t=FN(e.params))==null?void 0:t.status)===`needs_binding`})}function jN(e){let t={isUnassigned:!1,hasUnboundElementSteps:!1,hasUnlockedTextSteps:!1};if(e.length===0)throw Error(`a \u00AB\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E\u00BB offer was worded for no refused position`);for(let n of e){let e=n.error_code===DN?FN(n.params):null;if(e===null||e.status!==`needs_binding`)throw Error(`a \u00AB\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E\u00BB offer carries a reason that is not a needs_binding refusal: ${n.error_code}`);t.isUnassigned||=e.causes.isUnassigned,t.hasUnboundElementSteps||=e.causes.hasUnboundElementSteps,t.hasUnlockedTextSteps||=e.causes.hasUnlockedTextSteps}return mg(t,Ce())}var MN={"scenarios.not_found":`hub.actions.runner.errors.scenarioMissing`,"agents.not_found":`hub.actions.runner.errors.agentMissing`,"agents.not_owner":`hub.actions.runner.errors.notOwner`,"agents.offline":`hub.actions.runner.errors.offline`,"environments.not_found":`hub.actions.runner.errors.environmentMissing`,"targets.not_configured":`hub.actions.runner.errors.targetsNotConfigured`,"targets.cell_missing":`hub.actions.runner.errors.targetsCellMissing`,"targets.address_required":`hub.actions.runner.errors.targetsAddressRequired`,"scenarios.start_page_unresolvable":`hub.actions.runner.errors.startPage`,"agents.entry_url_override_invalid":`hub.actions.runner.errors.entryUrl`,"agents.dispatch_request_mismatch":`hub.actions.runner.errors.dispatchMismatch`},NN={"scenarios.not_found":`hub.actions.runner.rejections.scenarioMissing`,"environments.not_found":`hub.actions.runner.rejections.environmentMissing`,"targets.not_configured":`hub.actions.runner.rejections.targetsNotConfigured`,"targets.cell_missing":`hub.actions.runner.rejections.targetsCellMissing`,"targets.address_required":`hub.actions.runner.rejections.targetsAddressRequired`,"scenarios.start_page_unresolvable":`hub.actions.runner.rejections.startPage`,"agents.entry_url_override_invalid":`hub.actions.runner.rejections.entryUrl`,"agents.dispatch_request_mismatch":`hub.actions.runner.rejections.dispatchMismatch`,"agents.offline":`hub.actions.runner.rejections.offline`};function PN(e){let t=FN(e);return t===null?hg(Ce()):pg(t,`hub`,Ce())}function FN(e){let t=Jt.safeParse(e==null?void 0:e.decision);return t.success?t.data:null}function IN(e){return typeof e==`number`&&Number.isFinite(e)?e:null}var LN=Ct([`pending`,`resolved`,`dismissed`]),RN=Ct([`mapping_low_confidence`,`mapping_grey_zone`,`mapping_fallback_failed`,`mapping_has_alternatives`,`user_question`,`execution_failed`,`element_disappeared`,`element_label_changed`,`element_uncertain_match`,`description_conflict`,`duplicate_suspected`,`er_mapping_grey`,`agent_blocked`,`captcha_required`,`heal_loop_detected`,`heal_proposal_pending`,`step_intent_too_broad`,`invalid_step_text`]),zN=[`user_question`,`captcha_required`];function BN(e){return zN.includes(e)}var VN=Ct([`confirmed`,`overridden`,`dismissed`,`mark_for_rerun`]);I({scenarioId:jt(),status:LN.default(`pending`),cursor:L().optional(),limit:St().int().min(1).max(500).default(50)});var HN=I({id:jt(),runId:jt().nullable(),scenarioId:jt().nullable(),stepId:jt().nullable(),kind:RN,title:L(),detailPayload:Gt(),status:LN,resolution:VN.nullable(),resolutionPayload:Gt().nullable(),resolvedAt:L().datetime().nullable(),resolvedBy:jt().nullable(),createdAt:L().datetime(),updatedAt:L().datetime()});I({items:F(HN),nextCursor:L().nullable(),total:Wt().int().nonnegative()}),I({id:jt()});var UN=I({elementId:jt().optional(),pageId:jt().optional(),note:L().max(2e3).optional()});I({resolution:VN,resolutionPayload:UN.default({})}).refine(e=>e.resolution!==`overridden`||e.resolutionPayload.elementId!==void 0&&e.resolutionPayload.pageId!==void 0,{message:`elementId and pageId are required for resolution='overridden'`}),I({reviewItemId:jt(),status:Ct([`resolved`,`dismissed`]),resolvedAt:L().datetime(),resolvedBy:jt(),mapping:I({mappingId:jt(),pageId:jt().nullable(),elementId:jt().nullable(),source:bt(`user`)}).optional()});function WN(e){switch(e){case`element_text`:case`element_attribute`:return`element`;case`url_pathname`:case`url_href`:return`url`;case`response_body`:case`response_header`:case`response_status`:return`response`;default:throw Error(`Unknown extraction source: ${String(e)}`)}}var GN=`text_step`,KN=[`element`,`page`,`canvas`],qN=`element`,JN=`page`,YN=qN;function XN(e){return e.some(e=>WN(e.sourceType)===`element`)}function ZN(e){return e.actionType===`shared_step`||e.sharedStepRefId||e.sharedStepId||e.actionType===`api_call`?JN:e.actionType===`text_step`?YN:e.actionType===`extract_variable`&&e.extractionVariables!==void 0&&e.extractionVariables.length>0?XN(e.extractionVariables)?qN:JN:null}function QN(e){let t=ZN(e);if(t===null)throw Error(`Cannot derive targetType for ${e.actionType}: its create payload is incomplete`);return t}var $N=[`navigate`,GN,`shared_step`,`api_call`],eP=[`assert`];function tP(e){return $N.some(t=>t===e.actionType)?!1:eP.some(t=>t===e.actionType)?!0:e.targetType===qN}var nP=[`agent`,`replay`],rP=Et({id:jt(),status:dt,abortReason:yt.nullable(),abortParams:It([gt,ft()])});export{Rr as $,hg as A,Uo as B,Rg as C,mg as D,xg as E,Nh as F,oi as G,pi as H,Ah as I,ti as J,ii as K,ju as L,Fh as M,Ph as N,pg as O,zh as P,zr as Q,Ou as R,zg as S,Eg as T,ui as U,mi as V,ci as W,Ur as X,$r as Y,Br as Z,qv as _,tP as a,Dr as at,$g as b,ON as c,br as ct,TN as d,or as dt,Lr as et,Hj as f,sr as ft,vy as g,HD as h,QN as i,kr as it,Jh as j,gg as k,kN as l,gr as lt,tO as m,nP as n,Pr as nt,BN as o,Er as ot,Wj as p,tr as pt,ri as q,KN as r,Nr as rt,jN as s,xr as st,rP as t,Ir as tt,AN as u,lr as ut,Lv as v,Dg as w,Wg as x,S_ as y,gu as z};