progon-agent 1.3.1 → 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 (42) hide show
  1. package/extension-bundle.json +3 -3
  2. package/extension-dist/background/background.js +82 -82
  3. package/extension-dist/card/card.html +7 -7
  4. package/extension-dist/card/card.js +3 -3
  5. package/extension-dist/chunks/shared-9kMbf8PO.js +1 -0
  6. package/extension-dist/chunks/shared-Bi_ASAsl.js +377 -0
  7. package/extension-dist/chunks/{shared-CwW6XlwM.js → shared-Bts1WtwM.js} +1 -1
  8. package/extension-dist/chunks/shared-BvwA-cm2.css +1 -0
  9. package/extension-dist/chunks/shared-Bwk7ZjOr.js +21 -0
  10. package/extension-dist/chunks/{shared-BJIubFtc.js → shared-CInXPYm9.js} +1 -1
  11. package/extension-dist/chunks/shared-CX8XGwZc.js +1 -0
  12. package/extension-dist/chunks/shared-CZrS2BT6.js +111 -0
  13. package/extension-dist/chunks/{shared-SnJc3X_h.js → shared-C_dmgeUK.js} +12 -18
  14. package/extension-dist/chunks/shared-CeuPJn47.js +227 -0
  15. package/extension-dist/chunks/{shared-Bdgj5eQ5.js → shared-CiEEQWpw.js} +1 -1
  16. package/extension-dist/chunks/shared-Cxo909tK.js +1 -0
  17. package/extension-dist/chunks/shared-DyRhAmgo.js +51 -0
  18. package/extension-dist/chunks/shared-Xq2emDMe.js +98 -0
  19. package/extension-dist/chunks/shared-_jlBqdBD.css +1 -0
  20. package/extension-dist/content/content.css +1 -1
  21. package/extension-dist/content/content.js +211 -211
  22. package/extension-dist/manifest.json +23 -23
  23. package/extension-dist/offscreen/offscreen.html +2 -2
  24. package/extension-dist/offscreen/offscreen.js +1 -1
  25. package/extension-dist/popup/popup.html +7 -7
  26. package/extension-dist/popup/popup.js +3 -3
  27. package/extension-dist/sidepanel/sidepanel.html +10 -10
  28. package/extension-dist/sidepanel/sidepanel.js +1 -1
  29. package/extension-dist/workspace/workspace.html +11 -11
  30. package/extension-dist/workspace/workspace.js +56 -55
  31. package/package.json +1 -1
  32. package/extension-dist/chunks/shared-B3hsjAeB.js +0 -371
  33. package/extension-dist/chunks/shared-BJOAkaqO.js +0 -1
  34. package/extension-dist/chunks/shared-BUQXvbGJ.css +0 -1
  35. package/extension-dist/chunks/shared-BiDh2lEA.js +0 -1
  36. package/extension-dist/chunks/shared-Ccz3X65G.js +0 -51
  37. package/extension-dist/chunks/shared-CdkSNWvx.js +0 -21
  38. package/extension-dist/chunks/shared-DCs5uS1P.js +0 -1
  39. package/extension-dist/chunks/shared-DdJtX3_m.js +0 -105
  40. package/extension-dist/chunks/shared-O0OgUhxM.js +0 -227
  41. package/extension-dist/chunks/shared-UK_0TOj7.js +0 -98
  42. package/extension-dist/chunks/shared-c_EHmnKR.css +0 -1
@@ -0,0 +1,111 @@
1
+ import{r as e}from"./shared-hePW80VL.js";import{$ as t,$n as n,$t as r,An as i,At as a,Bt as o,Ct as s,Dt as c,E as l,Et as u,F as d,Fn as f,Ft as p,Gi as m,Gt as h,Hi as g,Hr as _,Ht as v,I as y,Ii as b,It as x,J as S,Ki as C,Lt as w,Mt as T,Nn as E,Nt as D,Ot as O,Pn as ee,Pt as te,Qn as k,Rt as A,St as ne,Tt as j,Wi as M,Xr as N,Z as re,_t as P,ai as F,ar as I,at as ie,bi as L,bn as ae,bt as oe,ci as se,ct as ce,dn as le,et as ue,fa as de,fr as R,ft as fe,gt as pe,ht as me,in as he,ji as ge,jt as _e,kt as ve,lt as ye,mn as be,mo as xe,nn as Se,oi as Ce,on as we,ot as Te,pn as Ee,pt as De,qi as Oe,rt as ke,si as z,st as Ae,tn as je,tt as Me,vt as Ne,wt as Pe,xt as Fe,yi as Ie,yt as Le,zt as Re}from"./shared-CeuPJn47.js";import{D as ze,F as Be,Jn as B,Kn as Ve,N as He,P as Ue,Qn as V,Wn as H,f as We,fr as U,ir as Ge,lr as Ke,nr as W,or as G,qt as K,tr as q,ur as qe,wt as Je}from"./shared-Xq2emDMe.js";var Ye=/\u200B/g,Xe=/\s+/g;function Ze(e){return e.replace(Ye,``).replace(Xe,` `).trim()}
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 Qe=z(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),$e=z(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),et=z(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),tt=z(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),nt=z(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),rt=z(`frame`,[[`line`,{x1:`22`,x2:`2`,y1:`6`,y2:`6`,key:`15w7dq`}],[`line`,{x1:`22`,x2:`2`,y1:`18`,y2:`18`,key:`1ip48p`}],[`line`,{x1:`6`,x2:`6`,y1:`2`,y2:`22`,key:`a2lnyx`}],[`line`,{x1:`18`,x2:`18`,y1:`2`,y2:`22`,key:`8vb6jd`}]]),it=z(`history`,[[`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`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),at=z(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),ot=z(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),st=z(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),ct=z(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),lt=z(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),ut=z(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),dt=z(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),ft=z(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),pt=z(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),mt=z(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ht=z(`variable`,[[`path`,{d:`M8 21s-4-3-4-9 4-9 4-9`,key:`uto9ud`}],[`path`,{d:`M16 3s4 3 4 9-4 9-4 9`,key:`4w2vsq`}],[`line`,{x1:`15`,x2:`9`,y1:`9`,y2:`15`,key:`f7djnv`}],[`line`,{x1:`9`,x2:`15`,y1:`9`,y2:`15`,key:`1shsy8`}]]),gt=[`text_contains`,`text_equals`,`text_free`,`element_visible`,`element_exists`,`element_not_exists`,`input_value`],_t={text_contains:{labelKey:`checkTypes.text_contains`,icon:[[`path`,{d:`M17 6.1H3`}],[`path`,{d:`M21 12.1H3`}],[`path`,{d:`M15.1 18H3`}]]},text_equals:{labelKey:`checkTypes.text_equals`,icon:[[`path`,{d:`M5 9h14`}],[`path`,{d:`M5 15h14`}]]},text_free:{labelKey:`checkTypes.text_free`,icon:[[`path`,{d:`M12 20h9`}],[`path`,{d:`M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z`}]]},element_visible:{labelKey:`checkTypes.element_visible`,icon:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]]},element_exists:{labelKey:`checkTypes.element_exists`,icon:[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`}],[`path`,{d:`M12 22V12`}]]},element_not_exists:{labelKey:`checkTypes.element_not_exists`,icon:[[`path`,{d:`M5 3a2 2 0 0 0-2 2`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`}],[`path`,{d:`M21 19a2 2 0 0 1-2 2`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`}],[`path`,{d:`M9 3h1`}],[`path`,{d:`M9 21h1`}],[`path`,{d:`M14 3h1`}],[`path`,{d:`M14 21h1`}],[`path`,{d:`M3 9v1`}],[`path`,{d:`M21 9v1`}],[`path`,{d:`M3 14v1`}],[`path`,{d:`M21 14v1`}]]},input_value:{labelKey:`checkTypes.input_value`,icon:[[`path`,{d:`M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1`}],[`path`,{d:`M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`}],[`path`,{d:`M9 7v10`}]]}},vt=`checkTypes.assert_text`
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
+ ;function yt(e){return!Be(e)}function bt(e){if(!yt(e))throw Error(`Check type "${e}" is legacy and read-only: it has no catalog entry`);let t=_t[e];if(t===void 0)throw Error(`Unknown check type: ${String(e)}`);return t}function xt(e){return yt(e)?bt(e).labelKey:vt}function St(e){return bt(e).icon}function Ct(e){return bt(e),ze[Ue(e)].filter(t=>t===e||He(e,t))}var J=/* @__PURE__ */ e(Oe(),1),wt=/*#__PURE__*/ J.createContext(void 0);function Y(e){let t=J.useContext(wt);if(t===void 0&&!e)throw Error(R(47));return t}var Tt=/* @__PURE__ */ e(M(),1),Et={...P,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Dt=class extends a{constructor(e,t,n){let r=new Ne;super(Ot(e,r,t,n),kt(r),Et),de(this,`setOpen`,(e,t)=>{var n,r;let a=t.reason===i,o=t.reason===`trigger-press`&&t.event.detail===0,c=!e&&(t.reason===`escape-key`||t.reason==null),l=Fe(t),u=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&u!=null&&(t.trigger=this.context.triggerElements.getById(u)??this.select(`activeTriggerElement`)??void 0),(n=(r=this.context).onOpenChange)==null||n.call(r,e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let d=()=>{let n=s(this.state,e,t.trigger,l());n.openChangeReason=t.reason,this.update(n)};a?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),Tt.flushSync(d)):d();let f;o?f=`click`:c?f=`dismiss`:t.reason===`focus-out`&&(f=`focus`),this.set(`instantType`,f)})}};function Ot(e,t,n,r=!1){let i={...pe(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&(e==null?void 0:e.mounted)===void 0&&(i.mounted=!0),i}function kt(e){return{popupRef:/*#__PURE__*/ J.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:/*#__PURE__*/ J.createRef(),beforeContentFocusGuardRef:/*#__PURE__*/ J.createRef(),stickIfOpenTimeout:new r,triggerElements:e}}var X=C(),At=_e(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Mt(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),O(u,d),Pe(u);let{forceUnmount:m}=j(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o}),J.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),J.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,he(ae))}),[m,u]);let h=d||f;return/*#__PURE__*/ (0,X.jsxs)(wt.Provider,{value:u,children:[s&&/*#__PURE__*/ (0,X.jsx)(oe,{handle:s,store:u}),h&&/*#__PURE__*/ (0,X.jsx)(Nt,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function jt(e){return Y(!0)?/*#__PURE__*/ (0,X.jsx)(At,{props:e}):/*#__PURE__*/ (0,X.jsx)(w,{children:/*#__PURE__*/ (0,X.jsx)(At,{props:e})})}function Mt(e,t){let n=c((e,n)=>new Dt(t,e,n));return J.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Nt({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=D(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference,a=r.floating;return u(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}var Pt=T(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:s=!0,handle:c,payload:l,openOnHover:u=!1,delay:d=300,closeDelay:p=0,id:m,...g}=e,_=Y(!0),v=me(c)??_;if(!v)throw Error(R(74));let y=we(m),b=v.useState(`isTriggerActive`,y),x=v.useState(`floatingRootContext`),C=v.useState(`isOpenedByTrigger`,y),w=v.useState(`triggerPopupId`,y),T=J.useRef(null),{registerTrigger:E,isMountedByThisTrigger:D}=ve(y,T,v,{payload:l,disabled:a,openOnHover:u,closeDelay:p}),O=v.useState(`openChangeReason`),k=v.useState(`stickIfOpen`),A=v.useState(`openMethod`),ne=v.useState(`focusManagerModal`),j=fe(x,{enabled:!a&&u&&(A!==`touch`||O!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:ye(),restMs:d,delay:{close:p},triggerElementRef:T,isActiveTrigger:b,isClosing:()=>v.select(`transitionStatus`)===`ending`}),M=te(x,{stickIfOpen:k}),N=re(()=>v.select(`open`),e=>{v.set(`openMethod`,e)}),P=v.useState(`triggerProps`,D),{getButtonProps:F,buttonRef:ie}=le({disabled:a,native:s}),L={open(e){return e&&O===`trigger-press`?ee.open(e):f.open(e)}},{preFocusGuardRef:ae,handlePreFocusGuardFocus:oe,handleFocusTargetFocus:se}=S(v,T),ce=I(`button`,e,{state:{disabled:a,open:C},ref:[ie,t,E,T],props:[M.reference,j,P,N,{[o]:``,id:y,"aria-haspopup":`dialog`,"aria-expanded":C,"aria-controls":w},g,F],stateAttributesMapping:L}),ue=/*#__PURE__*/ (0,X.jsx)(J.Fragment,{children:ce},y);return D&&!ne?/*#__PURE__*/ (0,X.jsxs)(J.Fragment,{children:[/*#__PURE__*/ (0,X.jsx)(h,{ref:ae,onFocus:oe}),ue,/*#__PURE__*/ (0,X.jsx)(h,{ref:v.context.triggerFocusTargetRef,onFocus:se})]}):ue}),Ft=/*#__PURE__*/ J.createContext(void 0);function It(){let e=J.useContext(Ft);if(e===void 0)throw Error(R(45));return e}var Lt=/*#__PURE__*/ J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Y().useState(`mounted`)||n?/*#__PURE__*/ (0,X.jsx)(Ft.Provider,{value:n,children:/*#__PURE__*/ (0,X.jsx)(Re,{ref:t,...r})}):null}),Rt=/*#__PURE__*/ J.createContext(void 0);function zt(){let e=J.useContext(Rt);if(!e)throw Error(R(46));return e}var Bt=/*#__PURE__*/ J.forwardRef(function(e,n){let{render:r,className:i,style:a,anchor:o,positionMethod:s,side:c,align:l,sideOffset:u,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m,sticky:h,disableAnchorTracking:g=!1,collisionAvoidance:_=v,...y}=e,b=Y(),S=It(),C=A(),w=b.useState(`floatingRootContext`),T=b.useState(`mounted`),E=b.useState(`open`),D=b.useState(`openChangeReason`),O=b.useState(`activeTriggerElement`),ee=b.useState(`modal`),te=b.useState(`openMethod`),k=b.useState(`positionerElement`),ne=b.useState(`instantType`),j=b.useState(`transitionStatus`),M=b.useState(`adaptiveOrigin`),N=J.useRef(null),re=Se(k),P=ke({anchor:o,floatingRootContext:w,positionMethod:s,mounted:T,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g,keepMounted:S,nodeId:C,collisionAvoidance:_,adaptiveOrigin:M}),F=w.useState(`domReferenceElement`);Ee(()=>{let e=F,t=N.current;if(e&&(N.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return re(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[F,re,b]);let I=ee===!0&&D!==`trigger-hover`;t(E&&I,te===`touch`,k,O);let L=b.useStateSetter(`positionerElement`),ae={open:E,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:ne},oe=ue(e,ae,{styles:P.positionerStyles,transitionStatus:j,props:y,refs:[n,L],hidden:!T,inert:!E});return/*#__PURE__*/ (0,X.jsxs)(Rt.Provider,{value:P,children:[T&&I&&/*#__PURE__*/ (0,X.jsx)(Me,{inert:ie(!E),cutout:O}),/*#__PURE__*/ (0,X.jsx)(x,{id:C,children:oe})]})}),Vt=/*#__PURE__*/ J.createContext(void 0);function Ht(){let[e,t]=J.useState(0),n=be(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:J.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var Ut=/*#__PURE__*/ J.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Y(),l=zt(),u=ce(!0)!=null,{context:d,hasClosePart:f}=Ht(),m=c.useState(`open`),h=c.useState(`openMethod`),g=c.useState(`instantType`),_=c.useState(`transitionStatus`),v=c.useState(`popupProps`),y=c.useState(`titleElementId`),b=c.useState(`descriptionElementId`),x=c.useState(`modal`),S=c.useState(`mounted`),C=c.useState(`openChangeReason`),w=c.useState(`activeTriggerElement`),T=c.useState(`floatingRootContext`),D=T.useState(`floatingId`),O=c.useState(`disabled`),ee=c.useState(`openOnHover`),te=c.useState(`closeDelay`);je({open:m,ref:c.context.popupRef,onComplete(){if(m){var e,t;(e=(t=c.context).onOpenChangeComplete)==null||e.call(t,!0)}}}),De(T,{enabled:ee&&!O,closeDelay:te});let k=a===void 0?ne(c.context.popupRef):a,A=x!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M={open:m,side:l.side,align:l.align,instant:g,transitionStatus:_},N=I(`div`,e,{state:M,ref:[t,c.context.popupRef,j],props:[v,{id:D,role:`dialog`,...Le,"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){u&&Ae.has(e.key)&&e.stopPropagation()}},Te(_),s],stateAttributesMapping:E});return/*#__PURE__*/ (0,X.jsx)(p,{context:T,openInteractionType:h,modal:A,disabled:!S||C===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,previousFocusableElement:Ie(w)?w:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:/*#__PURE__*/ (0,X.jsx)(Vt.Provider,{value:d,children:N})})}),Wt=/*#__PURE__*/ J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Y(),s=we(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),I(`h2`,e,{ref:t,props:[{id:s},a]})}),Gt=/*#__PURE__*/ J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Y(),s=we(a.id);return o.useSyncedValueWithCleanup(`descriptionElementId`,s),I(`p`,e,{ref:t,props:[{id:s},a]})}),Kt={fallbackAxisSide:`none`},qt=8;function Jt(e){switch(e){case`escape-key`:return`escape`;case`outside-press`:return`outside`;case`trigger-press`:return`trigger`;case`focus-out`:return`focus-out`;default:return`other`}}function Yt({title:e,description:t,footerStart:n,footerEnd:r,side:i=`bottom`,align:a=`start`,collisionAvoidance:o,titleVisible:s=!0,className:c,initialFocusRef:l,trapFocus:u=!1,"data-testid":f,children:p,trigger:m,triggerTooltip:h,positionAnchor:v,anchor:b,open:x,onOpenChange:S}){let C=g(),w=`flex flex-col p-3 ${y}`;return/* @__PURE__ */ (0,X.jsxs)(jt,{open:x,modal:u?`trap-focus`:!1,onOpenChange:S===void 0?void 0:(e,t)=>{(e||!d(b,t.reason,t.event))&&S(e,Jt(t.reason))},children:[m===void 0?null:h===void 0?/* @__PURE__ */ (0,X.jsx)(Pt,{render:m}):/* @__PURE__ */ (0,X.jsx)(se,{relationship:h.relationship,content:h.content,children:/* @__PURE__ */ (0,X.jsx)(Pt,{render:m})}),/* @__PURE__ */ (0,X.jsx)(Lt,{container:C,children:/* @__PURE__ */ (0,X.jsx)(Bt,{anchor:v===void 0?b:v,side:i,align:a,collisionAvoidance:o,sideOffset:qt,collisionPadding:8,positionMethod:`fixed`,className:`z-popover`,children:/* @__PURE__ */ (0,X.jsxs)(Ut,{initialFocus:l,finalFocus:b===void 0?void 0:()=>b,"data-testid":f,className:c===void 0?`w-[280px] ${w}`:`${w} ${c}`,children:[/* @__PURE__ */ (0,X.jsxs)(`div`,{className:s?`grid gap-0.5`:`sr-only`,children:[/* @__PURE__ */ (0,X.jsx)(Wt,{className:`m-0 text-[length:var(--text-body-sm)] leading-normal font-semibold text-fg-primary`,children:e}),t===void 0?null:/* @__PURE__ */ (0,X.jsx)(Gt,{className:`m-0 text-xs leading-normal text-fg-muted`,children:t})]}),/* @__PURE__ */ (0,X.jsx)(`div`,{className:_(`grid gap-2`,s&&`mt-2.5`),children:p}),n!==void 0||r!==void 0?/* @__PURE__ */ (0,X.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-2 border-t border-stroke-light pt-2.5`,children:[/* @__PURE__ */ (0,X.jsx)(`div`,{className:`flex items-center gap-2`,children:n}),/* @__PURE__ */ (0,X.jsx)(`div`,{className:`flex items-center gap-2`,children:r})]}):null]})})})]})}var Xt=`gap-0! rounded-lg! border-solid! border-(--color-border-strong)! bg-(--color-bg-modal)! p-1.5! shadow-(--shadow-menu)!`,Zt=`w-[320px] max-w-[calc(100vw-16px)] ${Xt}`,Qt=`w-(--anchor-width) ${Xt}`,$t=(0,J.createContext)(null);function en(){return(0,J.useContext)($t)}var tn=`grid size-7 shrink-0 place-items-center rounded-md border border-solid border-stroke bg-surface-secondary p-0 text-fg-primary transition-[border-color,background-color] duration-(--motion-short) ease-(--ease-out) enabled:hover:border-stroke-hover enabled:hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled [&>svg]:size-4`;function nn({value:e,maxAgents:t,onValueChange:n,copy:r,settingsLink:i,disabled:a=!1,className:o}){return/* @__PURE__ */ (0,X.jsxs)(`div`,{role:`group`,"aria-label":r.groupLabel,"data-testid":`effort-agents-stepper`,className:_(`flex items-center gap-3 rounded-md border border-solid border-stroke-light bg-(--color-bg-modal-inset) px-3 py-2 text-xs text-fg-primary [animation:var(--animation-slide-down)] motion-reduce:[animation:none]`,o),children:[/* @__PURE__ */ (0,X.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[r.label,/* @__PURE__ */ (0,X.jsxs)(`small`,{className:`block text-caption text-fg-muted`,children:[r.limit(t),`\u00A0`,i]})]}),/* @__PURE__ */ (0,X.jsx)(`button`,{type:`button`,className:tn,"aria-label":r.fewer,disabled:a||e<=1,onClick:()=>n(e-1),"data-testid":`effort-agents-fewer`,children:/* @__PURE__ */ (0,X.jsx)(ut,{"aria-hidden":`true`})}),/* @__PURE__ */ (0,X.jsx)(`span`,{className:`min-w-7 text-center text-lg font-semibold tracking-[-0.3px] tabular-nums`,"data-testid":`effort-agents-value`,children:/* @__PURE__ */ (0,X.jsx)(`span`,{className:`inline-block [animation:var(--animation-effort-tick)] motion-reduce:[animation:none]`,children:e},e)}),/* @__PURE__ */ (0,X.jsx)(`button`,{type:`button`,className:tn,"aria-label":r.more,disabled:a||e>=t,onClick:()=>n(e+1),"data-testid":`effort-agents-more`,children:/* @__PURE__ */ (0,X.jsx)(N,{"aria-hidden":`true`})})]})}var rn=[`h-[5px]`,`h-2`,`h-[11px]`],an=[``,`[animation-delay:40ms]`,`[animation-delay:80ms]`];function Z({level:e,look:t,rise:n=!1,className:r}){return/* @__PURE__ */ (0,X.jsx)(`span`,{"aria-hidden":`true`,className:_(`inline-flex flex-none items-end`,t===`line`?`h-3 gap-[1.5px]`:`h-[11px] gap-0.5`,r),children:rn.map((r,i)=>{let a=i<e;return/* @__PURE__ */ (0,X.jsx)(`i`,{className:_(`w-[3px] origin-bottom rounded-[1px]`,r,!a&&t!==`line`&&`bg-current opacity-25`,!a&&t===`line`&&`bg-(--color-text-disabled)`,a&&t===`line`&&`bg-(--color-primary-text)`,a&&t===`quiet`&&`bg-current opacity-70`,a&&t===`lit`&&`bg-primary`,a&&t===`lit`&&n&&`[animation:var(--animation-effort-rise)]`,a&&t===`lit`&&n&&an[i])},r)})})}var on={effort:`normal`},sn={kind:`none`};function cn(e,t){switch(t.kind){case`none`:return!0;case`place`:return e!==`max`}}function ln(e,t){return Math.min(Math.max(e,1),t)}function un(e,t){return e===`max`?{effort:`max`,maxAgents:t}:{effort:e}}function dn(e,t,n){return e.effort===`max`?{effort:`max`,maxAgents:ln(t,n)}:e}function fn(e,t){return e.effort===`max`||t.effort===`max`?e.effort===`max`&&t.effort===`max`&&e.maxAgents===t.maxAgents:e.effort===t.effort}function pn(e,t){return cn(e.effort,t.block)?e.effort===`max`?{effort:`max`,maxAgents:ln(e.maxAgents,t.maxAgents)}:e:on}var mn={kind:`chip`},hn=[`normal`,`thinking`,`max`],gn={normal:1,thinking:2,max:3},_n=`qa-ai-chat-effort inline-flex h-7 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`;function vn({choice:e,facts:t,onChoose:n,onAgentsChange:r,onOpenSettings:i,copy:a,look:o,disabled:s=!1}){let[c,l]=(0,J.useState)(!1),[u,d]=(0,J.useState)(null),f=(0,J.useRef)(null),p=en(),m=t===null||s,h=c&&!m,g=e.effort===`max`?a.long.max(e.maxAgents):a.long[e.effort],v=u!==null&&fn(u,e)?a.chipLabel(g):``,y=e=>t!==null&&cn(e,t.block),b=e=>{y(e)&&t!==null&&(n(e),d(un(e,t.maxAgents)))},x=n=>{t!==null&&(r(n),d(dn(e,n,t.maxAgents)))},S=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];if(r===void 0)return;e.preventDefault(),r.focus();let i=r.dataset.value,a=hn.find(e=>e===i);a!==void 0&&b(a)};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)}},C=e=>t!==null&&t.block.kind===`place`&&!cn(e,t.block)?a.reasonPlace:null,w=o.kind===`setting`?/* @__PURE__ */ (0,X.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-set`,"aria-label":a.chipLabel(g),disabled:m,"data-effort":e.effort,"data-testid":`ai-chat-effort-chip`,children:[/* @__PURE__ */ (0,X.jsx)(Z,{level:gn[e.effort],look:`line`}),/* @__PURE__ */ (0,X.jsxs)(`span`,{className:`qa-ai-chat-set-value`,children:[/* @__PURE__ */ (0,X.jsx)(`span`,{className:`qa-ai-chat-set-long`,children:e.effort===`max`?a.chipMax(e.maxAgents):a.levels[e.effort]}),/* @__PURE__ */ (0,X.jsx)(`span`,{className:`qa-ai-chat-set-short`,children:e.effort===`max`?o.chipMaxShort(e.maxAgents):a.levels[e.effort]})]})]}):/* @__PURE__ */ (0,X.jsxs)(`button`,{type:`button`,className:_(_n,e.effort===`max`?`border-[color-mix(in_srgb,var(--color-primary)_45%,transparent)] bg-(--color-bg-primary-tint-10) text-(--color-primary-text)`:`border-(--color-border) bg-transparent text-fg-secondary enabled:hover:border-(--color-border-hover) enabled:hover:text-fg-primary`,h&&`border-(--color-border-focus) shadow-(--glow-primary-sm)`),"aria-label":a.chipLabel(g),disabled:m,"data-effort":e.effort,"data-testid":`ai-chat-effort-chip`,children:[/* @__PURE__ */ (0,X.jsx)(Z,{level:gn[e.effort],look:`lit`,className:`w-3.5 justify-center`}),/* @__PURE__ */ (0,X.jsx)(`span`,{children:e.effort===`max`?a.chipMax(e.maxAgents):a.levels[e.effort]}),/* @__PURE__ */ (0,X.jsx)(F,{"aria-hidden":`true`,className:_(`size-3 transition-transform duration-(--motion-medium) ease-(--ease-out)`,h&&`rotate-180`)})]});return/* @__PURE__ */ (0,X.jsxs)(X.Fragment,{children:[/* @__PURE__ */ (0,X.jsx)(Yt,{title:a.name,titleVisible:!1,trigger:w,open:h,onOpenChange:e=>l(e&&!m),side:`top`,collisionAvoidance:Kt,...p===null?{}:{positionAnchor:p},initialFocusRef:f,className:p===null?Zt:Qt,"data-testid":`ai-chat-effort-popover`,children:t!==null&&/* @__PURE__ */ (0,X.jsxs)(`div`,{className:`flex flex-col`,children:[/* @__PURE__ */ (0,X.jsxs)(`div`,{"aria-hidden":`true`,className:`flex items-baseline justify-between gap-2 px-2 py-1.5`,children:[/* @__PURE__ */ (0,X.jsx)(`b`,{className:`text-xs font-semibold tracking-[-0.1px] text-fg-primary`,children:a.name}),a.note!==null&&/* @__PURE__ */ (0,X.jsx)(`small`,{className:`text-caption text-fg-muted`,children:a.note})]}),/* @__PURE__ */ (0,X.jsx)(`div`,{role:`radiogroup`,"aria-label":a.name,className:`flex flex-col gap-px`,onKeyDown:S,children:hn.map(t=>{let n=e.effort===t,r=!y(t),i=C(t);return/* @__PURE__ */ (0,X.jsxs)(`button`,{ref:n?f:void 0,type:`button`,role:`radio`,"aria-checked":n,"aria-disabled":r||void 0,tabIndex:n?0:-1,"data-value":t,"data-testid":`ai-chat-effort-${t}`,onClick:()=>b(t),className:_(`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)`,r?`cursor-not-allowed text-fg-muted opacity-55`:`hover:bg-(--color-bg-elevated-hover) focus-visible:bg-(--color-bg-elevated-hover)`),children:[/* @__PURE__ */ (0,X.jsx)(Z,{level:gn[t],look:n?`lit`:`quiet`}),/* @__PURE__ */ (0,X.jsxs)(`span`,{children:[/* @__PURE__ */ (0,X.jsx)(`b`,{className:`block text-body-sm font-medium text-fg-primary`,children:a.levels[t]}),/* @__PURE__ */ (0,X.jsx)(`small`,{className:`block text-caption leading-[1.4] text-fg-muted`,"data-testid":i===null?void 0:`ai-chat-effort-withheld`,children:i===null?a.rows[t]:i})]}),/* @__PURE__ */ (0,X.jsx)(Ce,{"aria-hidden":`true`,className:_(`size-3.5 text-(--color-primary-text)`,!n&&`invisible`)})]},t)})}),e.effort===`max`&&/* @__PURE__ */ (0,X.jsx)(nn,{className:`mx-1 mb-1`,value:e.maxAgents,maxAgents:t.maxAgents,onValueChange:x,copy:a.agents,settingsLink:/* @__PURE__ */ (0,X.jsx)(`button`,{type:`button`,className:`inline border-0 bg-transparent p-0 text-left text-caption text-fg-muted underline-offset-2 hover:text-(--color-primary-text) hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus)`,onClick:i,children:a.agents.settingsLink})}),a.footer!==null&&/* @__PURE__ */ (0,X.jsx)(`div`,{className:`mt-1 border-0 border-t border-solid border-(--color-border-light) px-2 pt-2 pb-1 text-caption text-fg-muted`,children:a.footer})]})}),/* @__PURE__ */ (0,X.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:v})]})}var yn=`text-primary hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus)`;function bn({state:e,disabled:t=!1}){let{t:r}=L(),{navigation:i}=b(),a=(0,J.useId)(),o=xn(),{refusal:s}=e;return/* @__PURE__ */ (0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,"data-effort":e.choice.effort,"data-testid":`launch-effort`,children:[/* @__PURE__ */ (0,X.jsx)(`span`,{id:a,className:`text-body-sm font-medium text-fg-secondary`,children:o.name}),/* @__PURE__ */ (0,X.jsx)(`div`,{role:`group`,"aria-labelledby":a,className:`flex items-center`,children:/* @__PURE__ */ (0,X.jsx)(vn,{choice:e.choice,facts:e.facts,onChoose:e.choose,onAgentsChange:e.setAgents,onOpenSettings:()=>i.openInWeb({kind:`ai-settings`},`new-tab`),copy:o,look:mn,disabled:t||e.locked})}),e.locked&&/* @__PURE__ */ (0,X.jsx)(`p`,{className:`m-0 text-caption leading-[1.45] text-fg-muted`,"data-testid":`launch-effort-locked`,children:r(`launchEffort.locked`)}),e.loadError!==null&&/* @__PURE__ */ (0,X.jsx)(k,{tone:`error`,title:r(`launchEffort.loadError`),actions:/* @__PURE__ */ (0,X.jsx)(n,{onClick:e.reload,children:r(`common.retry`)})}),s!==null&&/* @__PURE__ */ (0,X.jsx)(k,{tone:`error`,title:r(`launchEffort.refusal.title`),"data-testid":`launch-effort-refusal`,children:s.kind===`agentsOverMax`?r(`launchEffort.refusal.agentsOverMax`,{max:s.max}):/* @__PURE__ */ (0,X.jsxs)(X.Fragment,{children:[s.modelName===null?r(`launchEffort.refusal.leadModelNone`):r(`launchEffort.refusal.leadModelNamed`,{model:s.modelName}),` `,/* @__PURE__ */ (0,X.jsx)(ge,{target:{kind:`ai-settings`},placement:`new-tab`,className:yn,children:r(`launchEffort.refusal.chooseModel`)})]})})]})}function xn(){let{t:e}=L();return{name:e(`launchEffort.label`),note:null,levels:{normal:e(`launchEffort.levels.normal`),thinking:e(`launchEffort.levels.thinking`),max:e(`launchEffort.levels.max`)},rows:{normal:e(`launchEffort.lines.normal`),thinking:e(`launchEffort.lines.thinking`),max:e(`launchEffort.lines.max`)},footer:null,chipMax:t=>e(`launchEffort.chipMax`,{count:t}),long:{normal:e(`launchEffort.long.normal`),thinking:e(`launchEffort.long.thinking`),max:t=>e(`launchEffort.long.max`,{count:t})},chipLabel:t=>e(`launchEffort.chipLabel`,{level:t}),reasonPlace:e(`launchEffort.reasonPlace`),agents:{label:e(`launchEffort.agents.label`),limit:t=>e(`launchEffort.agents.limit`,{max:t}),settingsLink:e(`launchEffort.agents.settingsLink`),groupLabel:e(`launchEffort.agents.groupLabel`),fewer:e(`launchEffort.agents.fewer`),more:e(`launchEffort.agents.more`)}}}var Sn=`peer m-0 size-3.75 shrink-0 cursor-pointer appearance-none rounded-xs border-(length:--checkbox-border-width) border-solid border-stroke-strong bg-transparent [transition:background-color_var(--motion-short)_var(--ease-out),border-color_var(--motion-short)_var(--ease-out)] hover:not-checked:not-indeterminate:border-primary-400 group-hover/check:not-checked:not-indeterminate:border-primary-400 checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-stroke-focus disabled:cursor-not-allowed disabled:opacity-disabled`,Cn=`pointer-events-none absolute size-2.75 scale-[.6] text-fg-on-accent opacity-0 [transition:opacity_var(--motion-short)_var(--ease-out),scale_var(--motion-medium)_var(--ease-out)]`;function wn({checked:e,onChange:t,indeterminate:n=!1,disabled:r=!1,label:i,id:a,describedBy:o,...s}){let c=(0,J.useRef)(null);(0,J.useEffect)(()=>{c.current!==null&&(c.current.indeterminate=n)});let l=/* @__PURE__ */ (0,X.jsxs)(`span`,{className:`relative inline-grid size-3.75 shrink-0 place-items-center`,children:[/* @__PURE__ */ (0,X.jsx)(`input`,{ref:c,type:`checkbox`,id:a,checked:e,disabled:r,"aria-checked":n?`mixed`:void 0,"aria-label":s[`aria-label`],"aria-describedby":o,"data-testid":s[`data-testid`],onChange:e=>t(e.target.checked),className:Sn}),n?/* @__PURE__ */ (0,X.jsx)(ut,{"aria-hidden":`true`,strokeWidth:3,className:_(Cn,`peer-indeterminate:scale-100 peer-indeterminate:opacity-100`)}):/* @__PURE__ */ (0,X.jsx)(Ce,{"aria-hidden":`true`,strokeWidth:3,className:_(Cn,`peer-checked:scale-100 peer-checked:opacity-100`)})]});return i===void 0?l:/* @__PURE__ */ (0,X.jsxs)(`label`,{className:_(`group/check inline-flex select-none items-center gap-2.5 text-body-sm text-fg-primary`,r?`cursor-not-allowed`:`cursor-pointer`),children:[l,i]})}async function Tn(e,t){let[n,r]=await Promise.all([e.aiSettings.getUser({signal:t}),e.modelPreferences.get(`swarm_lead`,{signal:t})]);return{maxAgents:n.swarm.maxAgents,leadSelectionName:r.selection===null?null:r.selection.name}}var En=/* @__PURE__ */ new Set([`ai_models.selection_not_sendable`,`ai_models.no_sendable_model`]);function Dn(e=on,t=!1){let n=m(),[r,i]=(0,J.useState)(e),[a,o]=(0,J.useState)(null),[s,c]=(0,J.useState)(!1),{data:u,loading:d,error:f,reload:p,reloadAfterChange:h}=l({fetcher:e=>Tn(n,e),deps:[n]}),g=t?{kind:`place`}:{kind:`none`},_=u===void 0?null:{...u,block:g},v=_===null||s?r:pn(r,_);return{facts:_,loading:d,loadError:f,reload:p,choice:v,choose:e=>{_===null||s||(o(null),i(un(e,_.maxAgents)))},setAgents:e=>{_===null||s||(o(null),i(dn(v,e,_.maxAgents)))},input:v,refusal:a,locked:s,lock:()=>{i(v),c(!0)},releaseLock:()=>c(!1),adoptLaunchRefusal:e=>{if(!(e instanceof xe)||e.errorCode===void 0)return!1;let t=e.errorCode;if(t===`workflows.agents_over_max`){var n;let t=Je.safeParse((n=e.params)==null?void 0:n.max);return h(),t.success?(i({effort:`max`,maxAgents:t.data}),o({kind:`agentsOverMax`,max:t.data}),!0):!1}return v.effort===`max`&&En.has(t)?(h(),o({kind:`leadModel`,modelName:t===`ai_models.selection_not_sendable`&&_!==null?_.leadSelectionName:null}),!0):!1},clearRefusal:()=>o(null),reset:()=>{i(e),o(null)}}}var Q=5e3;function On(e,t,n){return G().min(1).max(n).refine(e=>e===Ze(e),{message:`${e} must be the ${t} with whitespace collapsed: no leading or trailing whitespace, no line breaks, tabs or repeated spaces, no zero-width spaces`})}var $=On(`targetName`,`element name`,200).nullable().optional(),kn=W({}),An=W({expectedText:G().min(1).max(Q),targetName:$}),jn=W({expectedText:G().min(1).max(Q),targetName:$}),Mn=W({targetName:$}),Nn=W({targetName:$}),Pn=W({targetText:On(`targetText`,`element text`,Q).nullable().optional(),targetName:$}),Fn=W({expectedValue:G().max(Q),targetName:$}),In={text_free:kn,text_contains:An,text_equals:jn,assert_text:W({mode:H([`equals`,`contains`,`matches`,`starts_with`,`ends_with`]),value:G().max(Q)}),element_visible:Mn,element_exists:Nn,element_not_exists:Pn,input_value:Fn};function Ln(e,t){return In[e].safeParse(t)}var Rn=`frame-page-path-shape-v1`,zn=[`url`,`page_text`,`screenshot`],Bn=[`content_script`,`service_worker`,`playback_runtime`],Vn=G().regex(/^[0-9a-f]{64}$/),Hn=G().min(1).max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._:-]*$/),Un=W({mode:V(Rn),originSha256:Vn,pathnameShapeSha256:Vn}).strict(),Wn=W({...K.shape,pageId:U(),sortOrder:q().int().nonnegative(),sourceType:V(`url_pathname`),kind:V(`segment`),segmentIndex:q().int().min(0).max(50),applicability:Un}).strict(),Gn=W({...K.shape,pageId:U(),sortOrder:q().int().nonnegative(),sourceType:V(`url_href`),kind:V(`regex`),regexPattern:G().min(1).max(500).refine(e=>e.trim().length>0,`regexPattern must not be blank`),regexGroup:q().int().min(0).max(20)}).strict(),Kn=B(`sourceType`,[Wn,Gn]);W({maskContractVersion:V(2),frameRevision:Hn,activeStepIndex:q().int().nonnegative(),activeStepId:U(),activePageId:U(),activeNextPageId:U().nullable(),rules:Ve(Kn),rulesDigest:Vn}).strict(),W({fieldPath:G().min(1).max(512),kind:H(zn),pageId:U(),stepId:K.shape.stepId.nullable(),occurrence:K.shape.occurrence.nullable(),urlEpoch:q().int().nonnegative().nullable(),provenance:H(Bn)}).strict().superRefine((e,t)=>{e.stepId===null!=(e.occurrence===null)&&t.addIssue({code:`custom`,path:[`occurrence`],message:`URL secret surface context occurrence must be null exactly when stepId is null`})});var qn=`WORKFLOW_LAUNCH`,Jn=`WORKFLOW_HOST_ATTACH`;W({type:V(qn),clientRequestId:U(),projectId:U(),surface:H([`extension_atlas_card`,`extension_make_auto_modal`]),launch:We,maxAgents:Je,accessHint:G().min(1).nullable()}).strict(),W({type:V(Jn),workflowId:U(),accessHint:G().min(1).nullable()}).strict();var Yn=B(`kind`,[W({kind:V(`attached`),epoch:q().int()}).strict(),W({kind:V(`pending`),detail:G()}).strict(),W({kind:V(`refused`),outcome:G(),detail:G().nullable()}).strict(),W({kind:V(`unreadable`),outcome:G(),detail:G().nullable()}).strict()]),Xn=B(`ok`,[W({ok:V(!0),result:Yn}).strict(),W({ok:V(!1),refusal:B(`kind`,[W({kind:V(`malformed_message`)}).strict(),W({kind:V(`no_launch_window`)}).strict(),W({kind:V(`attach_failed`),detail:G()}).strict()])}).strict()]),Zn=B(`ok`,[W({ok:V(!0),workflowId:U(),attach:Ke([Yn,W({kind:V(`attach_failed`),detail:G()}).strict()])}).strict(),W({ok:V(!1),refusal:B(`kind`,[W({kind:V(`malformed_message`)}).strict(),W({kind:V(`no_launch_window`)}).strict(),W({kind:V(`refused`),status:q().int(),errorCode:G(),params:Ge(G(),qe()).nullable()}).strict(),W({kind:V(`unreachable`),detail:G(),errorCode:G().nullable()}).strict(),W({kind:V(`protocol_error`),detail:G()}).strict()])}).strict()]);export{tt as $,Zt as A,mt as B,sn as C,Z as D,dn as E,St as F,lt as G,ft as H,xt as I,ot as J,ct as K,Ct as L,Kt as M,Yt as N,$t as O,gt as P,nt as Q,yt as R,on as S,pn as T,dt as U,pt as V,ut as W,it as X,at as Y,rt as Z,wn as _,Vn as a,vn as b,In as c,Mn as d,et,Fn as f,Dn as g,Ln as h,Zn as i,Qt as j,en as k,Nn as l,jn as m,qn as n,Qe as nt,Hn as o,An as p,st as q,Xn as r,Kn as s,Jn as t,$e as tt,Pn as u,bn as v,un as w,mn as x,xn as y,ht as z};