@xpert-ai/chatkit-host-automation 0.16.2 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +405 -405
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- const Qt = [
1
+ import { safeRandomUUID as ge } from "@xpert-ai/chatkit-web-shared";
2
+ const te = [
2
3
  "host_page_snapshot",
3
4
  "host_page_click",
4
5
  "host_page_fill",
@@ -12,27 +13,27 @@ const Qt = [
12
13
  "host_page_screenshot",
13
14
  "host_page_read",
14
15
  "host_page_wait_for"
15
- ];
16
- function Zt(e) {
16
+ ], ee = 80, me = 12, Z = 2, ye = 4e3, kt = 600, ne = 80, be = 80, ve = 12;
17
+ function oe(e) {
17
18
  return (e ?? "").replace(/\s+/g, " ").trim();
18
19
  }
19
- function It(e, t = 600) {
20
+ function Dt(e, t = kt) {
20
21
  return e.length > t ? `${e.slice(0, t)}... [truncated ${e.length - t} chars]` : e;
21
22
  }
22
- function ue(e, t = 600) {
23
- return e ? It(e, t) : void 0;
23
+ function we(e, t = kt) {
24
+ return e ? Dt(e, t) : void 0;
24
25
  }
25
26
  function $(e) {
26
- const t = Zt(e.textContent);
27
- return t ? It(t) : void 0;
27
+ const t = oe(e.textContent);
28
+ return t ? Dt(t) : void 0;
28
29
  }
29
- function te(e) {
30
- const t = Zt(
30
+ function ie(e) {
31
+ const t = oe(
31
32
  Array.from(e.childNodes).filter((n) => n.nodeType === Node.TEXT_NODE).map((n) => n.textContent ?? "").join(" ")
32
33
  );
33
- return t ? It(t) : void 0;
34
+ return t ? Dt(t) : void 0;
34
35
  }
35
- function ft(e) {
36
+ function pt(e) {
36
37
  var o;
37
38
  if (!(e instanceof HTMLElement || e instanceof SVGElement) || e instanceof HTMLElement && e.hidden)
38
39
  return !1;
@@ -42,7 +43,7 @@ function ft(e) {
42
43
  const n = e.getBoundingClientRect();
43
44
  return n.width > 0 && n.height > 0;
44
45
  }
45
- function nt(e) {
46
+ function ot(e) {
46
47
  const t = e.getBoundingClientRect();
47
48
  return {
48
49
  x: t.left,
@@ -51,10 +52,10 @@ function nt(e) {
51
52
  height: t.height
52
53
  };
53
54
  }
54
- function he(e) {
55
+ function Se(e) {
55
56
  return e instanceof Document ? e : e.ownerDocument;
56
57
  }
57
- function Mt(e) {
58
+ function Pt(e) {
58
59
  let t = e;
59
60
  for (; t; ) {
60
61
  let n = t.previousElementSibling;
@@ -71,29 +72,29 @@ function Mt(e) {
71
72
  t = t.parentElement;
72
73
  }
73
74
  }
74
- function Et(e) {
75
- const t = Array.from(e.children).map((n) => te(n) ?? $(n)).filter((n) => !!n);
76
- return t.length > 1 ? t : e.children.length === 1 ? Et(e.children[0]) : t;
75
+ function _t(e) {
76
+ const t = Array.from(e.children).map((n) => ie(n) ?? $(n)).filter((n) => !!n);
77
+ return t.length > 1 ? t : e.children.length === 1 ? _t(e.children[0]) : t;
77
78
  }
78
- function fe(e) {
79
+ function Ee(e) {
79
80
  if (Array.from(e.children).some(
80
- (i) => Et(i).length === 2
81
+ (i) => _t(i).length === 2
81
82
  ))
82
83
  return;
83
- const t = Et(e);
84
+ const t = _t(e);
84
85
  if (t.length !== 2)
85
86
  return;
86
87
  const [n, o] = t;
87
88
  if (!(!n || !o || n === o || n.length > 120))
88
89
  return { name: n, value: o };
89
90
  }
90
- function pe(e) {
91
- return e.fields ? e.fields.slice(0, 2).map((t) => `${t.name}: ${t.value}`) : e.items ? e.items.slice(0, 2) : e.rows ? e.rows.slice(0, 2).map((t) => t.join(" | ")) : e.text ? [e.text] : [];
91
+ function _e(e) {
92
+ return e.fields ? e.fields.slice(0, Z).map((t) => `${t.name}: ${t.value}`) : e.items ? e.items.slice(0, Z) : e.rows ? e.rows.slice(0, Z).map((t) => t.join(" | ")) : e.text ? [e.text] : [];
92
93
  }
93
- function ge(e) {
94
+ function xe(e) {
94
95
  return e.fields ? e.fields.length : e.items ? e.items.length : e.rows ? e.rows.length : e.text ? 1 : 0;
95
96
  }
96
- function me(e) {
97
+ function Re(e) {
97
98
  return [
98
99
  e.heading,
99
100
  e.text,
@@ -103,16 +104,16 @@ function me(e) {
103
104
  ...(e.rows ?? []).flat()
104
105
  ].reduce((t, n) => t + ((n == null ? void 0 : n.length) ?? 0), 0);
105
106
  }
106
- function ye(e) {
107
- return e.slice(0, 80).map((t, n) => {
108
- const o = me(t), i = `b${n + 1}`;
107
+ function Te(e) {
108
+ return e.slice(0, ee).map((t, n) => {
109
+ const o = Re(t), i = `b${n + 1}`;
109
110
  return {
110
111
  ...t,
111
112
  blockId: i,
112
- preview: pe(t),
113
- itemCount: ge(t),
113
+ preview: _e(t),
114
+ itemCount: xe(t),
114
115
  chars: o,
115
- truncated: o > 4e3,
116
+ truncated: o > ye,
116
117
  readHint: {
117
118
  tool: "host_page_read",
118
119
  args: { blockId: i }
@@ -120,7 +121,7 @@ function ye(e) {
120
121
  };
121
122
  });
122
123
  }
123
- function be(e) {
124
+ function Ae(e) {
124
125
  return e.map((t, n) => ({
125
126
  index: n,
126
127
  blockId: t.blockId,
@@ -132,32 +133,32 @@ function be(e) {
132
133
  truncated: t.truncated
133
134
  }));
134
135
  }
135
- function ve(e) {
136
- return e.truncated ? "block_truncated" : e.type === "keyValueList" ? "structured_fields" : e.type === "table" ? "structured_table" : e.itemCount > 2 ? "preview_incomplete" : "long_readable_block";
136
+ function Ce(e) {
137
+ return e.truncated ? "block_truncated" : e.type === "keyValueList" ? "structured_fields" : e.type === "table" ? "structured_table" : e.itemCount > Z ? "preview_incomplete" : "long_readable_block";
137
138
  }
138
- function we(e) {
139
+ function Ie(e) {
139
140
  return (e.type === "keyValueList" ? 100 : e.type === "table" ? 90 : e.type === "list" ? 80 : e.type === "paragraph" ? 50 : 10) + (e.truncated ? 40 : 0) + Math.min(e.itemCount, 20) + Math.min(Math.floor(e.chars / 400), 20);
140
141
  }
141
- function Se(e) {
142
+ function ke(e) {
142
143
  return e.filter(
143
- (t) => t.type !== "heading" && (t.truncated || t.itemCount > 2 || t.chars > 600)
144
+ (t) => t.type !== "heading" && (t.truncated || t.itemCount > Z || t.chars > kt)
144
145
  ).map((t, n) => ({
145
146
  block: t,
146
147
  index: n,
147
- score: we(t)
148
- })).sort((t, n) => n.score - t.score || t.index - n.index).slice(0, 12).sort((t, n) => t.index - n.index).map(({ block: t }) => ({
148
+ score: Ie(t)
149
+ })).sort((t, n) => n.score - t.score || t.index - n.index).slice(0, me).sort((t, n) => t.index - n.index).map(({ block: t }) => ({
149
150
  blockId: t.blockId,
150
151
  type: t.type,
151
152
  heading: t.heading,
152
- reason: ve(t),
153
+ reason: Ce(t),
153
154
  args: {
154
155
  blockId: t.blockId,
155
156
  pageSize: t.fields || t.items || t.rows ? Math.min(20, Math.max(1, t.itemCount)) : void 0
156
157
  }
157
158
  }));
158
159
  }
159
- function Ee(e) {
160
- const t = be(e.blocks), n = Se(e.blocks);
160
+ function De(e) {
161
+ const t = Ae(e.blocks), n = ke(e.blocks);
161
162
  return {
162
163
  ...e,
163
164
  outline: t,
@@ -176,16 +177,16 @@ function Ee(e) {
176
177
  }))
177
178
  };
178
179
  }
179
- function _e(e, t, n) {
180
- const o = [], i = he(e).createTreeWalker(
180
+ function Pe(e, t, n) {
181
+ const o = [], i = Se(e).createTreeWalker(
181
182
  e,
182
183
  NodeFilter.SHOW_ELEMENT
183
184
  );
184
185
  let r = i.nextNode();
185
186
  for (; r; ) {
186
187
  const a = r;
187
- if (ft(a)) {
188
- const s = fe(a);
188
+ if (pt(a)) {
189
+ const s = Ee(a);
189
190
  s && o.push({ ...s, element: a });
190
191
  }
191
192
  r = i.nextNode();
@@ -193,59 +194,59 @@ function _e(e, t, n) {
193
194
  if (o.length !== 0) {
194
195
  t.push({
195
196
  type: "keyValueList",
196
- heading: Mt(o[0].element),
197
- fields: o.slice(0, 80).map(({ name: a, value: s }) => ({ name: a, value: s })),
198
- rect: nt(o[0].element)
197
+ heading: Pt(o[0].element),
198
+ fields: o.slice(0, ne).map(({ name: a, value: s }) => ({ name: a, value: s })),
199
+ rect: ot(o[0].element)
199
200
  });
200
201
  for (const a of o)
201
202
  n.add(a.element);
202
203
  }
203
204
  }
204
- function xe(e, t, n) {
205
+ function Me(e, t, n) {
205
206
  for (const o of Array.from(e.querySelectorAll('ul,ol,[role="list"]'))) {
206
- if (!ft(o))
207
+ if (!pt(o))
207
208
  continue;
208
- const i = Array.from(o.children).map((r) => $(r)).filter((r) => !!r).slice(0, 80);
209
+ const i = Array.from(o.children).map((r) => $(r)).filter((r) => !!r).slice(0, ne);
209
210
  if (i.length !== 0) {
210
211
  t.push({
211
212
  type: "list",
212
- heading: Mt(o),
213
+ heading: Pt(o),
213
214
  items: i,
214
- rect: nt(o)
215
+ rect: ot(o)
215
216
  }), n.add(o);
216
217
  for (const r of Array.from(o.children))
217
218
  n.add(r);
218
219
  }
219
220
  }
220
221
  }
221
- function Re(e, t, n) {
222
+ function Ne(e, t, n) {
222
223
  var o;
223
224
  for (const i of Array.from(e.querySelectorAll('table,[role="table"],[role="grid"]'))) {
224
- if (!ft(i))
225
+ if (!pt(i))
225
226
  continue;
226
227
  const r = Array.from(i.querySelectorAll('tr,[role="row"]')).map(
227
- (s) => Array.from(s.querySelectorAll('th,td,[role="columnheader"],[role="cell"],[role="gridcell"]')).map((d) => $(d)).filter((d) => !!d).slice(0, 12)
228
- ).filter((s) => s.length > 0).slice(0, 80);
228
+ (s) => Array.from(s.querySelectorAll('th,td,[role="columnheader"],[role="cell"],[role="gridcell"]')).map((d) => $(d)).filter((d) => !!d).slice(0, ve)
229
+ ).filter((s) => s.length > 0).slice(0, be);
229
230
  if (r.length === 0)
230
231
  continue;
231
232
  const a = (o = r[0]) != null && o.every((s) => s.length <= 120) ? r[0] : void 0;
232
233
  t.push({
233
234
  type: "table",
234
- heading: Mt(i),
235
+ heading: Pt(i),
235
236
  headers: a,
236
237
  rows: a ? r.slice(1) : r,
237
- rect: nt(i)
238
+ rect: ot(i)
238
239
  }), n.add(i);
239
240
  }
240
241
  }
241
- function Te(e, t, n) {
242
+ function qe(e, t, n) {
242
243
  const o = 'h1,h2,h3,h4,h5,h6,[role="heading"],p,article,section';
243
244
  for (const i of Array.from(e.querySelectorAll(o))) {
244
- if (t.length >= 80)
245
+ if (t.length >= ee)
245
246
  break;
246
- if (n.has(i) || !ft(i))
247
+ if (n.has(i) || !pt(i))
247
248
  continue;
248
- const r = i.tagName.toLowerCase(), a = te(i) ?? $(i);
249
+ const r = i.tagName.toLowerCase(), a = ie(i) ?? $(i);
249
250
  if (a) {
250
251
  if (r.match(/^h[1-6]$/) || i.getAttribute("role") === "heading") {
251
252
  const s = r.match(/^h[1-6]$/) ? Number(r.slice(1)) : Number(i.getAttribute("aria-level") ?? 0) || 2;
@@ -253,24 +254,24 @@ function Te(e, t, n) {
253
254
  type: "heading",
254
255
  level: s,
255
256
  text: a,
256
- rect: nt(i)
257
+ rect: ot(i)
257
258
  });
258
259
  continue;
259
260
  }
260
261
  a.length >= 24 && t.push({
261
262
  type: "paragraph",
262
263
  text: a,
263
- rect: nt(i)
264
+ rect: ot(i)
264
265
  });
265
266
  }
266
267
  }
267
268
  }
268
- function Ae(e) {
269
+ function Oe(e) {
269
270
  return e.querySelectorAll(
270
271
  '[aria-expanded="false"],[data-expanded="false"],details:not([open]),[hidden]'
271
272
  ).length;
272
273
  }
273
- function Ce(e) {
274
+ function Le(e) {
274
275
  return Array.from(e.querySelectorAll("iframe")).filter((t) => {
275
276
  try {
276
277
  return !t.contentDocument;
@@ -279,7 +280,7 @@ function Ce(e) {
279
280
  }
280
281
  }).length;
281
282
  }
282
- function Nt(e) {
283
+ function Ot(e) {
283
284
  const t = e instanceof Document ? e.body ?? e.documentElement : e;
284
285
  if (!t)
285
286
  return {
@@ -297,8 +298,8 @@ function Nt(e) {
297
298
  }
298
299
  };
299
300
  const n = [], o = /* @__PURE__ */ new Set();
300
- _e(t, n, o), xe(t, n, o), Re(t, n, o), Te(t, n, o);
301
- const i = ye(n), r = i.filter((c) => c.truncated).length, a = Ae(t), s = Ce(t), d = n.length > i.length || r > 0 || a > 0 || s > 0, u = [];
301
+ Pe(t, n, o), Me(t, n, o), Ne(t, n, o), qe(t, n, o);
302
+ const i = Te(n), r = i.filter((c) => c.truncated).length, a = Oe(t), s = Le(t), d = n.length > i.length || r > 0 || a > 0 || s > 0, u = [];
302
303
  return a > 0 && u.push("Some content is inside collapsed sections."), s > 0 && u.push("Some frame content could not be read from DOM."), {
303
304
  blocks: i,
304
305
  totalBlocks: n.length,
@@ -315,7 +316,7 @@ function Nt(e) {
315
316
  ...u.length > 0 ? { warnings: u } : {}
316
317
  };
317
318
  }
318
- function rt(e, t, n) {
319
+ function st(e, t, n) {
319
320
  const o = Math.max(1, Math.min(100, Math.floor(n))), i = Math.max(1, Math.ceil(e / o)), r = Math.max(1, Math.min(i, Math.floor(t))), a = (r - 1) * o;
320
321
  return {
321
322
  page: r,
@@ -325,55 +326,55 @@ function rt(e, t, n) {
325
326
  end: Math.min(e, a + o)
326
327
  };
327
328
  }
328
- function _t(e) {
329
+ function xt(e) {
329
330
  return JSON.stringify(e).length;
330
331
  }
331
- function yt(e, t) {
332
+ function bt(e, t) {
332
333
  const n = e[t];
333
334
  return typeof n == "number" && Number.isFinite(n) ? n : void 0;
334
335
  }
335
- function st(e, t) {
336
+ function at(e, t) {
336
337
  const n = e[t];
337
338
  return typeof n == "string" && n.trim() ? n : void 0;
338
339
  }
339
- function xt(e, t, n = !1) {
340
+ function Rt(e, t, n = !1) {
340
341
  const o = {
341
342
  ...e,
342
343
  truncated: !!e.truncated || n
343
- }, i = _t(o), r = {
344
+ }, i = xt(o), r = {
344
345
  ...o,
345
346
  chars: i
346
347
  };
347
- return _t(r) <= t ? r : {
348
- blockId: st(e, "blockId"),
349
- type: st(e, "type"),
350
- heading: ue(st(e, "heading"), 120),
351
- scope: st(e, "scope"),
352
- page: yt(e, "page"),
348
+ return xt(r) <= t ? r : {
349
+ blockId: at(e, "blockId"),
350
+ type: at(e, "type"),
351
+ heading: we(at(e, "heading"), 120),
352
+ scope: at(e, "scope"),
353
+ page: bt(e, "page"),
353
354
  pageSize: 0,
354
- pageCount: yt(e, "pageCount"),
355
- nextPage: yt(e, "nextPage"),
355
+ pageCount: bt(e, "pageCount"),
356
+ nextPage: bt(e, "nextPage"),
356
357
  chars: i,
357
358
  truncated: !0,
358
359
  budgetExceeded: !0,
359
360
  warning: "Read result exceeded maxChars; retry with a smaller pageSize or a narrower blockId/query."
360
361
  };
361
362
  }
362
- function at(e, t, n) {
363
+ function ct(e, t, n) {
363
364
  let o = t;
364
365
  for (; o >= 1; ) {
365
- const i = n(o), r = xt(
366
+ const i = n(o), r = Rt(
366
367
  i,
367
368
  e,
368
369
  o < t
369
370
  );
370
- if (_t(r) <= e)
371
+ if (xt(r) <= e)
371
372
  return r;
372
373
  o = Math.floor(o / 2);
373
374
  }
374
- return xt(n(1), e, !0);
375
+ return Rt(n(1), e, !0);
375
376
  }
376
- function Ie(e, t = {}) {
377
+ function je(e, t = {}) {
377
378
  var d;
378
379
  const n = typeof t.page == "number" ? t.page : 1, o = typeof t.pageSize == "number" ? t.pageSize : 20, i = typeof t.maxChars == "number" && Number.isFinite(t.maxChars) ? Math.max(500, Math.min(12e3, Math.floor(t.maxChars))) : 4e3, r = (d = t.query) == null ? void 0 : d.trim().toLowerCase(), a = r ? e.blocks.filter(
379
380
  (u) => JSON.stringify(u).toLowerCase().includes(r)
@@ -381,8 +382,8 @@ function Ie(e, t = {}) {
381
382
  if (s) {
382
383
  if (s.fields && s.fields.length > 0) {
383
384
  const u = s.fields;
384
- return at(i, o, (c) => {
385
- const l = rt(u.length, n, c);
385
+ return ct(i, o, (c) => {
386
+ const l = st(u.length, n, c);
386
387
  return {
387
388
  ...s,
388
389
  fields: u.slice(l.start, l.end),
@@ -395,8 +396,8 @@ function Ie(e, t = {}) {
395
396
  }
396
397
  if (s.items && s.items.length > 0) {
397
398
  const u = s.items;
398
- return at(i, o, (c) => {
399
- const l = rt(u.length, n, c);
399
+ return ct(i, o, (c) => {
400
+ const l = st(u.length, n, c);
400
401
  return {
401
402
  ...s,
402
403
  items: u.slice(l.start, l.end),
@@ -409,8 +410,8 @@ function Ie(e, t = {}) {
409
410
  }
410
411
  if (s.rows && s.rows.length > 0) {
411
412
  const u = s.rows;
412
- return at(i, o, (c) => {
413
- const l = rt(u.length, n, c);
413
+ return ct(i, o, (c) => {
414
+ const l = st(u.length, n, c);
414
415
  return {
415
416
  ...s,
416
417
  rows: u.slice(l.start, l.end),
@@ -421,10 +422,10 @@ function Ie(e, t = {}) {
421
422
  };
422
423
  });
423
424
  }
424
- return xt(s, i);
425
+ return Rt(s, i);
425
426
  }
426
- return at(i, o, (u) => {
427
- const c = rt(a.length, n, u);
427
+ return ct(i, o, (u) => {
428
+ const c = st(a.length, n, u);
428
429
  return {
429
430
  scope: "visible",
430
431
  blocks: a.slice(c.start, c.end),
@@ -442,9 +443,9 @@ class W extends Error {
442
443
  super(t), this.details = n;
443
444
  }
444
445
  }
445
- const Me = new Set(
446
- Qt
447
- ), ke = [
446
+ const Be = new Set(
447
+ te
448
+ ), Ve = [
448
449
  "a[href]",
449
450
  "button",
450
451
  "input",
@@ -459,7 +460,7 @@ const Me = new Set(
459
460
  "[data-testid]",
460
461
  "[data-test-id]",
461
462
  "[data-qa]"
462
- ].join(","), Ot = 100, De = 1e4, Pe = 6e4, qt = 1e4, Ne = 100, Oe = 6e4, Lt = 2 * 6e4, qe = [
463
+ ].join(","), Lt = 100, Fe = 1e4, He = 6e4, jt = 1e4, ze = 100, $e = 6e4, Bt = 2 * 6e4, Ue = [
463
464
  "id",
464
465
  "role",
465
466
  "aria-label",
@@ -472,46 +473,45 @@ const Me = new Set(
472
473
  "aria-disabled",
473
474
  "hidden"
474
475
  ];
475
- function jt() {
476
- var e, t;
477
- return ((t = (e = globalThis.crypto) == null ? void 0 : e.randomUUID) == null ? void 0 : t.call(e)) ?? `page-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
476
+ function Vt() {
477
+ return ge();
478
478
  }
479
- function Rt(e) {
479
+ function Tt(e) {
480
480
  if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean")
481
481
  return e;
482
482
  if (Array.isArray(e))
483
- return e.map(Rt);
483
+ return e.map(Tt);
484
484
  if (typeof e == "object")
485
485
  return Object.fromEntries(
486
- Object.entries(e).filter(([t, n]) => t !== "actionToken" && n !== void 0).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => [t, Rt(n)])
486
+ Object.entries(e).filter(([t, n]) => t !== "actionToken" && n !== void 0).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => [t, Tt(n)])
487
487
  );
488
488
  }
489
- async function Bt(e) {
489
+ async function Ft(e) {
490
490
  const t = new TextEncoder().encode(
491
- JSON.stringify(Rt(e))
491
+ JSON.stringify(Tt(e))
492
492
  ), n = await globalThis.crypto.subtle.digest("SHA-256", t);
493
493
  return Array.from(
494
494
  new Uint8Array(n),
495
495
  (o) => o.toString(16).padStart(2, "0")
496
496
  ).join("");
497
497
  }
498
- function Le(e) {
499
- return Me.has(e);
498
+ function Xe(e) {
499
+ return Be.has(e);
500
500
  }
501
- function k(e) {
501
+ function D(e) {
502
502
  if (e.nodeType === 9)
503
503
  return e;
504
504
  if (!e.ownerDocument)
505
505
  throw new Error("Host automation root has no owner document.");
506
506
  return e.ownerDocument;
507
507
  }
508
- function O(e) {
509
- return k(e).defaultView ?? window;
508
+ function q(e) {
509
+ return D(e).defaultView ?? window;
510
510
  }
511
511
  function A(e) {
512
512
  return typeof e == "object" && e !== null && !Array.isArray(e) ? e : {};
513
513
  }
514
- function bt(e, t) {
514
+ function vt(e, t) {
515
515
  if (typeof e != "string" || e.trim() === "")
516
516
  throw new Error(`${t} must be a non-empty string.`);
517
517
  return e;
@@ -522,13 +522,13 @@ function m(e) {
522
522
  function Q(e) {
523
523
  return e === "viewport_normalized" ? "viewport_normalized" : "viewport-css-px";
524
524
  }
525
- function Vt(e) {
526
- return ee(e, ["move", "down", "up", "click"]) ?? "click";
525
+ function Ht(e) {
526
+ return re(e, ["move", "down", "up", "click"]) ?? "click";
527
527
  }
528
- function Ft(e, t) {
529
- const n = Ht(t.x, "x"), o = Ht(t.y, "y");
528
+ function zt(e, t) {
529
+ const n = $t(t.x, "x"), o = $t(t.y, "y");
530
530
  if (Q(t.coordinateSpace) === "viewport_normalized") {
531
- const i = O(e);
531
+ const i = q(e);
532
532
  return {
533
533
  x: Number((n * i.innerWidth).toFixed(3)),
534
534
  y: Number((o * i.innerHeight).toFixed(3))
@@ -536,21 +536,21 @@ function Ft(e, t) {
536
536
  }
537
537
  return { x: n, y: o };
538
538
  }
539
- function ct(e) {
539
+ function lt(e) {
540
540
  return typeof e == "number" && Number.isInteger(e) ? e : void 0;
541
541
  }
542
- function Ht(e, t) {
542
+ function $t(e, t) {
543
543
  if (typeof e != "number" || !Number.isFinite(e))
544
544
  throw new Error(`${t} must be a finite number.`);
545
545
  return e;
546
546
  }
547
- function G(e) {
547
+ function Y(e) {
548
548
  return typeof e == "number" && Number.isFinite(e) ? e : void 0;
549
549
  }
550
- function ee(e, t) {
550
+ function re(e, t) {
551
551
  return typeof e == "string" && t.includes(e) ? e : void 0;
552
552
  }
553
- function je(e) {
553
+ function We(e) {
554
554
  if (typeof e == "string")
555
555
  return [e];
556
556
  if (Array.isArray(e) && e.every((t) => typeof t == "string"))
@@ -561,23 +561,23 @@ function _(e) {
561
561
  const t = (e.textContent ?? "").replace(/\s+/g, " ").trim();
562
562
  return t ? t.slice(0, 160) : void 0;
563
563
  }
564
- function pt(e) {
564
+ function gt(e) {
565
565
  const t = Array.from(e.childNodes).filter((n) => n.nodeType === Node.TEXT_NODE).map((n) => n.textContent ?? "").join(" ").replace(/\s+/g, " ").trim();
566
566
  return t ? t.slice(0, 160) : void 0;
567
567
  }
568
568
  function T(e) {
569
569
  return e.tagName.toLowerCase() === "input";
570
570
  }
571
- function z(e) {
571
+ function U(e) {
572
572
  return e.tagName.toLowerCase() === "textarea";
573
573
  }
574
574
  function L(e) {
575
575
  return e.tagName.toLowerCase() === "select";
576
576
  }
577
- function ne(e) {
577
+ function se(e) {
578
578
  return e.tagName.toLowerCase() === "button";
579
579
  }
580
- function Tt(e) {
580
+ function At(e) {
581
581
  return e.tagName.toLowerCase() === "iframe";
582
582
  }
583
583
  function I(e) {
@@ -585,34 +585,34 @@ function I(e) {
585
585
  const t = (n = e.ownerDocument.defaultView) == null ? void 0 : n.HTMLElement;
586
586
  return !!(t && e instanceof t);
587
587
  }
588
- function kt(e) {
588
+ function Mt(e) {
589
589
  var n;
590
590
  const t = (n = e.ownerDocument.defaultView) == null ? void 0 : n.SVGElement;
591
591
  return !!(t && e instanceof t);
592
592
  }
593
- function ht(e) {
594
- if (T(e) || z(e) || L(e))
593
+ function ft(e) {
594
+ if (T(e) || U(e) || L(e))
595
595
  return e.value;
596
596
  }
597
- function oe(e) {
597
+ function ae(e) {
598
598
  return T(e) && (e.type === "checkbox" || e.type === "radio");
599
599
  }
600
- function Be(e) {
601
- return T(e) || L(e) || z(e) ? Array.from(e.labels ?? []) : [];
600
+ function Ye(e) {
601
+ return T(e) || L(e) || U(e) ? Array.from(e.labels ?? []) : [];
602
602
  }
603
- function Ve(e, t) {
603
+ function Ge(e, t) {
604
604
  var o;
605
605
  return (((o = e.getAttribute(t)) == null ? void 0 : o.trim().split(/\s+/)) ?? []).map((i) => e.ownerDocument.getElementById(i)).filter((i) => !!i).map((i) => _(i)).filter((i) => !!i);
606
606
  }
607
- function Fe(e) {
608
- const t = Ve(e, "aria-labelledby");
607
+ function Ke(e) {
608
+ const t = Ge(e, "aria-labelledby");
609
609
  if (t.length > 0)
610
610
  return t.join(" ").slice(0, 160);
611
- const n = Be(e).map((o) => _(o)).filter((o) => !!o);
611
+ const n = Ye(e).map((o) => _(o)).filter((o) => !!o);
612
612
  if (n.length > 0)
613
613
  return n.join(" ").slice(0, 160);
614
614
  }
615
- function He(e) {
615
+ function Je(e) {
616
616
  const t = [];
617
617
  let n = e.nextSibling;
618
618
  for (; n; ) {
@@ -640,7 +640,7 @@ function He(e) {
640
640
  const o = t.join(" ").replace(/\s+/g, " ").trim();
641
641
  return o ? o.slice(0, 160) : void 0;
642
642
  }
643
- function Xt(e, t) {
643
+ function Ut(e, t) {
644
644
  var u;
645
645
  const n = e.ownerDocument, o = n.body;
646
646
  if (!o)
@@ -652,8 +652,8 @@ function Xt(e, t) {
652
652
  let d = s.nextNode();
653
653
  for (; d; ) {
654
654
  const c = d;
655
- if (c !== e && !c.contains(e) && Dt(c)) {
656
- const l = c.getBoundingClientRect(), h = pt(c) ?? _(c);
655
+ if (c !== e && !c.contains(e) && Nt(c)) {
656
+ const l = c.getBoundingClientRect(), h = gt(c) ?? _(c);
657
657
  if (h) {
658
658
  const g = l.top + l.height / 2, f = Math.abs(g - r) <= Math.max(28, i.height * 1.25), p = t === "left" ? i.left - l.right : l.left - i.right;
659
659
  f && p >= -8 && p <= 240 && a.push({
@@ -666,39 +666,39 @@ function Xt(e, t) {
666
666
  }
667
667
  return (u = a.sort((c, l) => c.score - l.score)[0]) == null ? void 0 : u.text;
668
668
  }
669
- function ot(e) {
670
- if (!(T(e) || L(e) || z(e)))
669
+ function it(e) {
670
+ if (!(T(e) || L(e) || U(e)))
671
671
  return;
672
- const t = Fe(e);
673
- return t || (oe(e) ? Xt(e, "right") ?? He(e) ?? U(e)[0] : Xt(e, "left") ?? U(e)[0]);
672
+ const t = Ke(e);
673
+ return t || (ae(e) ? Ut(e, "right") ?? Je(e) ?? X(e)[0] : Ut(e, "left") ?? X(e)[0]);
674
674
  }
675
- function $t(e, t) {
675
+ function Xt(e, t) {
676
676
  const n = t.trim().toLowerCase();
677
677
  return T(e) && e.type === "radio" ? n === "radio" || n === "radio button" : T(e) && e.type === "checkbox" ? n === "checkbox" || n === "check box" : L(e) ? n === "select" || n === "select menu" || n === "combobox" || n === "combo box" : !1;
678
678
  }
679
679
  function R(e) {
680
- const t = ot(e), n = e.getAttribute("aria-label");
681
- if (n != null && n.trim() && !$t(e, n))
680
+ const t = it(e), n = e.getAttribute("aria-label");
681
+ if (n != null && n.trim() && !Xt(e, n))
682
682
  return n.trim();
683
683
  const o = e.getAttribute("title");
684
- if (o != null && o.trim() && !$t(e, o))
684
+ if (o != null && o.trim() && !Xt(e, o))
685
685
  return o.trim();
686
686
  if (t)
687
687
  return t;
688
- const i = U(e)[0];
688
+ const i = X(e)[0];
689
689
  return i || _(e);
690
690
  }
691
- function Dt(e) {
692
- if (!(I(e) || kt(e)) || !D(e) || e.matches(
691
+ function Nt(e) {
692
+ if (!(I(e) || Mt(e)) || !P(e) || e.matches(
693
693
  'input,textarea,select,button,a[href],[role="button"],[role="link"]'
694
694
  ))
695
695
  return !1;
696
- const t = pt(e) ?? _(e);
696
+ const t = gt(e) ?? _(e);
697
697
  return !!(t && t.length <= 120);
698
698
  }
699
- function ie(e) {
699
+ function ce(e) {
700
700
  var l;
701
- if (!oe(e))
701
+ if (!ae(e))
702
702
  return;
703
703
  const t = e.closest("fieldset"), n = t == null ? void 0 : t.querySelector("legend"), o = n ? _(n) : void 0;
704
704
  if (o)
@@ -713,8 +713,8 @@ function ie(e) {
713
713
  let c = u.nextNode();
714
714
  for (; c; ) {
715
715
  const h = c;
716
- if (h !== e && !h.contains(e) && h.matches('legend,strong,b,[role="heading"],h1,h2,h3,h4,h5,h6') && Dt(h)) {
717
- const g = h.getBoundingClientRect(), f = pt(h) ?? _(h);
716
+ if (h !== e && !h.contains(e) && h.matches('legend,strong,b,[role="heading"],h1,h2,h3,h4,h5,h6') && Nt(h)) {
717
+ const g = h.getBoundingClientRect(), f = gt(h) ?? _(h);
718
718
  if (f && g.bottom <= a.top + 8) {
719
719
  const p = a.top - g.bottom, b = g.left + g.width / 2;
720
720
  p <= 160 && b >= a.left - 120 && b <= a.right + 320 && d.push({
@@ -727,7 +727,7 @@ function ie(e) {
727
727
  }
728
728
  return (l = d.sort((h, g) => h.score - g.score)[0]) == null ? void 0 : l.text;
729
729
  }
730
- function Xe(e) {
730
+ function Qe(e) {
731
731
  if (!L(e))
732
732
  return;
733
733
  const t = Array.from(e.options).map((n) => ({
@@ -738,13 +738,13 @@ function Xe(e) {
738
738
  }));
739
739
  return t.length ? t : void 0;
740
740
  }
741
- function $e(e) {
741
+ function Ze(e) {
742
742
  if (!L(e))
743
743
  return;
744
744
  const t = e.selectedOptions[0], n = t ? (t.label || t.textContent || t.value).replace(/\s+/g, " ").trim() : void 0;
745
745
  return n ? n.slice(0, 160) : void 0;
746
746
  }
747
- function U(e) {
747
+ function X(e) {
748
748
  const t = e.ownerDocument, n = t.body;
749
749
  if (!n)
750
750
  return [];
@@ -755,8 +755,8 @@ function U(e) {
755
755
  let d = s.nextNode();
756
756
  for (; d; ) {
757
757
  const c = d;
758
- if (c !== e && !c.contains(e) && Dt(c)) {
759
- const l = c.getBoundingClientRect(), h = pt(c) ?? _(c);
758
+ if (c !== e && !c.contains(e) && Nt(c)) {
759
+ const l = c.getBoundingClientRect(), h = gt(c) ?? _(c);
760
760
  if (h) {
761
761
  const g = l.top + l.height / 2, f = l.left + l.width / 2, p = l.right <= o.left + 12 && Math.abs(g - i) <= Math.max(28, o.height * 1.25), b = l.left >= o.right - 8 && l.left - o.right <= 240 && Math.abs(g - i) <= Math.max(28, o.height * 1.25), v = l.bottom <= o.top + 8 && o.top - l.bottom <= 80 && f >= o.left - 80 && f <= o.right + 80;
762
762
  if (p || b || v) {
@@ -773,10 +773,10 @@ function U(e) {
773
773
  const u = /* @__PURE__ */ new Set();
774
774
  return a.sort((c, l) => c.score - l.score).map((c) => c.text).filter((c) => u.has(c) ? !1 : (u.add(c), !0)).slice(0, 4);
775
775
  }
776
- function Z(e) {
776
+ function tt(e) {
777
777
  return e.getAttribute("data-testid") ?? e.getAttribute("data-test-id") ?? e.getAttribute("data-qa") ?? void 0;
778
778
  }
779
- function q(e) {
779
+ function O(e) {
780
780
  const t = e.getAttribute("role");
781
781
  if (t != null && t.trim())
782
782
  return t.trim();
@@ -800,26 +800,26 @@ function q(e) {
800
800
  return "textbox";
801
801
  }
802
802
  }
803
- function At(e) {
803
+ function Ct(e) {
804
804
  return {
805
805
  tag: e.tagName.toLowerCase(),
806
- role: q(e),
806
+ role: O(e),
807
807
  name: R(e),
808
- testId: Z(e)
808
+ testId: tt(e)
809
809
  };
810
810
  }
811
- function ze(e, t) {
812
- const n = At(t);
811
+ function tn(e, t) {
812
+ const n = Ct(t);
813
813
  return n.tag !== e.tag || n.role !== e.role || S(n.name) !== S(e.name) || n.testId !== e.testId;
814
814
  }
815
- function re(e) {
816
- return ne(e) || T(e) || L(e) || z(e) ? e.disabled || void 0 : e.getAttribute("aria-disabled") === "true" || void 0;
815
+ function le(e) {
816
+ return se(e) || T(e) || L(e) || U(e) ? e.disabled || void 0 : e.getAttribute("aria-disabled") === "true" || void 0;
817
817
  }
818
- function zt(e) {
818
+ function Wt(e) {
819
819
  return T(e) && (e.type === "checkbox" || e.type === "radio") ? e.checked : void 0;
820
820
  }
821
- function Ue(e) {
822
- const t = tt(e);
821
+ function en(e) {
822
+ const t = et(e);
823
823
  if (!(t.width <= 0 || t.height <= 0))
824
824
  return {
825
825
  x: t.x + t.width / 2,
@@ -829,39 +829,39 @@ function Ue(e) {
829
829
  function H(e) {
830
830
  return {
831
831
  tag: e.tagName.toLowerCase(),
832
- role: q(e),
832
+ role: O(e),
833
833
  name: R(e),
834
- selector: Ct(e)
834
+ selector: It(e)
835
835
  };
836
836
  }
837
- function D(e) {
838
- if (!(I(e) || kt(e)) || I(e) && e.hidden)
837
+ function P(e) {
838
+ if (!(I(e) || Mt(e)) || I(e) && e.hidden)
839
839
  return !1;
840
840
  const t = e.ownerDocument.defaultView, n = t == null ? void 0 : t.getComputedStyle(e);
841
841
  return !(n && (n.display === "none" || n.visibility === "hidden" || n.opacity === "0"));
842
842
  }
843
- function se(e) {
844
- return e.matches(ke) && D(e);
843
+ function de(e) {
844
+ return e.matches(Ve) && P(e);
845
845
  }
846
- function Pt(e) {
846
+ function qt(e) {
847
847
  let t = e;
848
848
  for (; t; ) {
849
- if (re(t) === !0)
849
+ if (le(t) === !0)
850
850
  return !1;
851
851
  t = t.parentElement;
852
852
  }
853
853
  return !0;
854
854
  }
855
- function We(e) {
855
+ function nn(e) {
856
856
  var n;
857
- if (se(e))
857
+ if (de(e))
858
858
  return !0;
859
859
  if (!I(e))
860
860
  return !1;
861
861
  const t = (n = e.ownerDocument.defaultView) == null ? void 0 : n.getComputedStyle(e);
862
- return ((t == null ? void 0 : t.cursor) === "pointer" || !!e.onclick) && D(e);
862
+ return ((t == null ? void 0 : t.cursor) === "pointer" || !!e.onclick) && P(e);
863
863
  }
864
- function tt(e) {
864
+ function et(e) {
865
865
  var r, a;
866
866
  const t = e.getBoundingClientRect();
867
867
  let n = t.left, o = t.top, i = null;
@@ -886,7 +886,7 @@ function tt(e) {
886
886
  height: t.height
887
887
  };
888
888
  }
889
- function Ut(e, t) {
889
+ function Yt(e, t) {
890
890
  var r, a;
891
891
  let n = 0, o = 0, i = null;
892
892
  try {
@@ -908,7 +908,7 @@ function Ut(e, t) {
908
908
  y: t.y - o
909
909
  };
910
910
  }
911
- function Ct(e) {
911
+ function It(e) {
912
912
  const t = (i) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(i) : i.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
913
913
  if (e.getRootNode() !== e.ownerDocument)
914
914
  return;
@@ -932,7 +932,7 @@ function Ct(e) {
932
932
  `${e.tagName.toLowerCase()}[name="${t(o)}"]`
933
933
  );
934
934
  }
935
- function Ge(e) {
935
+ function on(e) {
936
936
  const t = e.getBoundingClientRect();
937
937
  if (!(t.width <= 0 || t.height <= 0))
938
938
  return {
@@ -940,7 +940,7 @@ function Ge(e) {
940
940
  y: t.top + t.height / 2
941
941
  };
942
942
  }
943
- function X(e, t) {
943
+ function z(e, t) {
944
944
  if (typeof e.elementsFromPoint == "function")
945
945
  return e.elementsFromPoint(t.x, t.y);
946
946
  if (typeof e.elementFromPoint != "function")
@@ -948,37 +948,37 @@ function X(e, t) {
948
948
  const n = e.elementFromPoint(t.x, t.y);
949
949
  return n ? [n] : [];
950
950
  }
951
- function lt(e) {
951
+ function dt(e) {
952
952
  return typeof e.elementsFromPoint == "function" || typeof e.elementFromPoint == "function";
953
953
  }
954
- function Ye(e, t) {
954
+ function rn(e, t) {
955
955
  return e === t || e.contains(t);
956
956
  }
957
- function dt(e) {
957
+ function ut(e) {
958
958
  let t = e;
959
959
  for (; t; ) {
960
- if (We(t) && Pt(t))
960
+ if (nn(t) && qt(t))
961
961
  return t;
962
962
  t = t.parentElement;
963
963
  }
964
964
  return e;
965
965
  }
966
- function vt(e) {
966
+ function wt(e) {
967
967
  const t = /* @__PURE__ */ new Set();
968
968
  let n = e;
969
969
  for (; n; ) {
970
970
  const o = n.tagName.toLowerCase();
971
- (ne(n) && n.form !== null && n.type === "submit" || T(n) && n.form !== null && (n.type === "submit" || n.type === "image")) && t.add("form_submit"), o === "a" && n.hasAttribute("download") && t.add("download"), n = n.parentElement;
971
+ (se(n) && n.form !== null && n.type === "submit" || T(n) && n.form !== null && (n.type === "submit" || n.type === "image")) && t.add("form_submit"), o === "a" && n.hasAttribute("download") && t.add("download"), n = n.parentElement;
972
972
  }
973
973
  return Array.from(t);
974
974
  }
975
975
  function S(e) {
976
976
  return (e ?? "").replace(/\s+/g, " ").trim().toLowerCase();
977
977
  }
978
- function Y(e) {
979
- return ae(e)[0];
978
+ function G(e) {
979
+ return ue(e)[0];
980
980
  }
981
- function ae(e) {
981
+ function ue(e) {
982
982
  const t = e.getBoundingClientRect();
983
983
  if (t.width <= 0 || t.height <= 0)
984
984
  return [];
@@ -1002,52 +1002,52 @@ function ae(e) {
1002
1002
  y: t.bottom - Math.min(8, t.height / 2)
1003
1003
  }
1004
1004
  ].filter((i) => {
1005
- const r = X(n, i)[0];
1006
- return r ? Ye(e, r) : !1;
1005
+ const r = z(n, i)[0];
1006
+ return r ? rn(e, r) : !1;
1007
1007
  });
1008
1008
  }
1009
- function ut(e, t) {
1010
- const n = e.getBoundingClientRect(), o = tt(e);
1009
+ function ht(e, t) {
1010
+ const n = e.getBoundingClientRect(), o = et(e);
1011
1011
  return {
1012
1012
  x: t.x + o.x - n.left,
1013
1013
  y: t.y + o.y - n.top
1014
1014
  };
1015
1015
  }
1016
1016
  function E(e) {
1017
- const t = e.ownerDocument, n = Ge(e), o = D(e) && !!n, i = Pt(e), r = n ? X(t, n) : [], a = r[0], s = ae(e).map(
1018
- (u) => ut(e, u)
1017
+ const t = e.ownerDocument, n = on(e), o = P(e) && !!n, i = qt(e), r = n ? z(t, n) : [], a = r[0], s = ue(e).map(
1018
+ (u) => ht(e, u)
1019
1019
  ), d = s.length > 0;
1020
1020
  return {
1021
1021
  visible: o,
1022
1022
  enabled: i,
1023
1023
  receivesEvents: d,
1024
1024
  actionable: o && i && d,
1025
- center: Ue(e),
1025
+ center: en(e),
1026
1026
  hitTarget: a,
1027
1027
  hitStack: r,
1028
1028
  safeClickPoints: s,
1029
1029
  occludedBy: o && i && !d ? a : void 0
1030
1030
  };
1031
1031
  }
1032
- function Wt(e, t) {
1032
+ function Gt(e, t) {
1033
1033
  var a;
1034
1034
  const n = m(t.testId);
1035
1035
  if (n)
1036
- return et(e).filter(
1037
- (s) => s.ownerDocument === e && Z(s) === n
1036
+ return nt(e).filter(
1037
+ (s) => s.ownerDocument === e && tt(s) === n
1038
1038
  );
1039
1039
  const o = (a = m(t.role)) == null ? void 0 : a.toLowerCase(), i = S(m(t.name)), r = S(m(t.text));
1040
- return !o && !i && !r ? [] : et(e).filter((s) => s.ownerDocument === e).filter((s) => {
1040
+ return !o && !i && !r ? [] : nt(e).filter((s) => s.ownerDocument === e).filter((s) => {
1041
1041
  var l;
1042
- const d = (l = q(s)) == null ? void 0 : l.toLowerCase(), u = S(R(s)), c = S(_(s));
1042
+ const d = (l = O(s)) == null ? void 0 : l.toLowerCase(), u = S(R(s)), c = S(_(s));
1043
1043
  return !(o && d !== o || i && u !== i || r && c !== r);
1044
1044
  });
1045
1045
  }
1046
- function Gt(e) {
1046
+ function Kt(e) {
1047
1047
  const t = e.trim().toLowerCase();
1048
1048
  return t === "*" || /^[a-z][a-z0-9-]*$/.test(t) || /^\[role(?:=[^\]]+)?\]$/.test(t) || /^\.[a-z_-][a-z0-9_-]*$/i.test(t);
1049
1049
  }
1050
- function Ke(e, t) {
1050
+ function sn(e, t) {
1051
1051
  const n = S(t);
1052
1052
  let o = e, i = 0;
1053
1053
  for (; o && i < 5; ) {
@@ -1056,24 +1056,24 @@ function Ke(e, t) {
1056
1056
  return !1;
1057
1057
  if ([
1058
1058
  R(o),
1059
- ot(o),
1060
- ie(o),
1059
+ it(o),
1060
+ ce(o),
1061
1061
  _(o),
1062
- ht(o)
1062
+ ft(o)
1063
1063
  ].some((a) => S(a) === n))
1064
1064
  return !0;
1065
1065
  o = o.parentElement, i += 1;
1066
1066
  }
1067
1067
  return !1;
1068
1068
  }
1069
- function Yt(e, t, n, o) {
1069
+ function Jt(e, t, n, o) {
1070
1070
  var d;
1071
- if (n && S(q(e)) !== S(n))
1071
+ if (n && S(O(e)) !== S(n))
1072
1072
  return !1;
1073
1073
  const i = S(t);
1074
1074
  if (![
1075
1075
  R(e),
1076
- ot(e),
1076
+ it(e),
1077
1077
  _(e)
1078
1078
  ].some((u) => S(u) === i))
1079
1079
  return !1;
@@ -1081,11 +1081,11 @@ function Yt(e, t, n, o) {
1081
1081
  return !0;
1082
1082
  const a = S(o);
1083
1083
  return [
1084
- ...U(e),
1084
+ ...X(e),
1085
1085
  ((d = e.parentElement) == null ? void 0 : d.textContent) ?? void 0
1086
1086
  ].map((u) => S(u)).join(" ").includes(a);
1087
1087
  }
1088
- function Je(e) {
1088
+ function an(e) {
1089
1089
  if (!e || typeof e != "object" || Array.isArray(e))
1090
1090
  return;
1091
1091
  const t = e;
@@ -1096,7 +1096,7 @@ function Je(e) {
1096
1096
  value: t.value
1097
1097
  };
1098
1098
  }
1099
- function ce(e) {
1099
+ function he(e) {
1100
1100
  if (!e || typeof e != "object" || Array.isArray(e))
1101
1101
  throw new Error("Expectation scope must be an object.");
1102
1102
  const t = Reflect.get(e, "documentScope");
@@ -1107,8 +1107,8 @@ function ce(e) {
1107
1107
  return { documentScope: t, documentRef: n };
1108
1108
  throw new Error("Expectation scope is invalid.");
1109
1109
  }
1110
- function Qe(e) {
1111
- const t = ce(e), n = Reflect.get(e, "kind");
1110
+ function cn(e) {
1111
+ const t = he(e), n = Reflect.get(e, "kind");
1112
1112
  if (n === "test_id") {
1113
1113
  const o = Reflect.get(e, "testId");
1114
1114
  if (typeof o == "string" && o.trim())
@@ -1159,12 +1159,12 @@ function V(e) {
1159
1159
  if (typeof n == "string")
1160
1160
  return {
1161
1161
  type: t,
1162
- scope: ce(Reflect.get(e, "scope")),
1162
+ scope: he(Reflect.get(e, "scope")),
1163
1163
  value: n
1164
1164
  };
1165
1165
  }
1166
1166
  if (t === "field_contains" || t === "checked_equals" || t === "element_visible" || t === "element_hidden") {
1167
- const n = Qe(Reflect.get(e, "target"));
1167
+ const n = cn(Reflect.get(e, "target"));
1168
1168
  if (t === "field_contains") {
1169
1169
  const o = Reflect.get(e, "value");
1170
1170
  if (typeof o == "string")
@@ -1178,24 +1178,24 @@ function V(e) {
1178
1178
  }
1179
1179
  throw new Error("Unsupported action expectation.");
1180
1180
  }
1181
- function Ze(e, t) {
1181
+ function ln(e, t) {
1182
1182
  const n = t.trim().toLowerCase();
1183
1183
  return Array.from(e.querySelectorAll("input,textarea,select")).find(
1184
1184
  (o) => [
1185
- ot(o),
1185
+ it(o),
1186
1186
  R(o),
1187
1187
  o.getAttribute("name") ?? void 0,
1188
1188
  o.getAttribute("placeholder") ?? void 0,
1189
- ...U(o)
1189
+ ...X(o)
1190
1190
  ].some(
1191
1191
  (r) => r == null ? void 0 : r.trim().toLowerCase().includes(n)
1192
1192
  )
1193
1193
  );
1194
1194
  }
1195
- function tn(e, t) {
1195
+ function dn(e, t) {
1196
1196
  if (!t)
1197
1197
  return;
1198
- const n = Ze(e, t.field), o = n ? ht(n) ?? "" : void 0;
1198
+ const n = ln(e, t.field), o = n ? ft(n) ?? "" : void 0;
1199
1199
  return {
1200
1200
  ...t,
1201
1201
  ok: typeof o == "string" && o.toLowerCase().includes(t.value.toLowerCase()),
@@ -1203,8 +1203,8 @@ function tn(e, t) {
1203
1203
  matchedField: n ? H(n) : void 0
1204
1204
  };
1205
1205
  }
1206
- function et(e) {
1207
- const t = e.nodeType === 1 ? e.ownerDocument : k(e), n = e.nodeType === 9 ? e.body ?? e.documentElement : e;
1206
+ function nt(e) {
1207
+ const t = e.nodeType === 1 ? e.ownerDocument : D(e), n = e.nodeType === 9 ? e.body ?? e.documentElement : e;
1208
1208
  if (!n)
1209
1209
  return [];
1210
1210
  const o = [], i = (r) => {
@@ -1212,36 +1212,36 @@ function et(e) {
1212
1212
  let s = a.nextNode();
1213
1213
  for (; s; ) {
1214
1214
  const d = s;
1215
- se(d) && o.push(d);
1215
+ de(d) && o.push(d);
1216
1216
  const u = d.shadowRoot;
1217
- if (u && i(u), Tt(d))
1217
+ if (u && i(u), At(d))
1218
1218
  try {
1219
1219
  d.contentDocument && i(d.contentDocument);
1220
1220
  } catch {
1221
1221
  }
1222
- if (o.length >= Ot)
1222
+ if (o.length >= Lt)
1223
1223
  return;
1224
1224
  s = a.nextNode();
1225
1225
  }
1226
1226
  };
1227
- return i(n), o.slice(0, Ot);
1227
+ return i(n), o.slice(0, Lt);
1228
1228
  }
1229
- function en(e, t) {
1229
+ function un(e, t) {
1230
1230
  var i;
1231
1231
  const n = Object.getPrototypeOf(e), o = Object.getOwnPropertyDescriptor(n, "value");
1232
1232
  (i = o == null ? void 0 : o.set) == null || i.call(e, t);
1233
1233
  }
1234
- function wt(e) {
1234
+ function St(e) {
1235
1235
  e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
1236
1236
  }
1237
1237
  function K(e) {
1238
1238
  var t, n;
1239
- (I(e) || kt(e)) && ((t = e.scrollIntoView) == null || t.call(e, { block: "center", inline: "center" })), I(e) && ((n = e.focus) == null || n.call(e));
1239
+ (I(e) || Mt(e)) && ((t = e.scrollIntoView) == null || t.call(e, { block: "center", inline: "center" })), I(e) && ((n = e.focus) == null || n.call(e));
1240
1240
  }
1241
1241
  function J(e, t) {
1242
1242
  return typeof PointerEvent == "function" ? new PointerEvent(e, t) : new MouseEvent(e.replace("pointer", "mouse"), t);
1243
1243
  }
1244
- class nn {
1244
+ class hn {
1245
1245
  constructor(t = {}) {
1246
1246
  this.options = t, this.refs = /* @__PURE__ */ new Map(), this.nextRef = 1, this.pageStateId = "", this.documentRefs = /* @__PURE__ */ new Map(), this.documents = [], this.pageStateInvalidated = !1, this.cachedSnapshotCreatedAt = 0, this.mutationObservers = [], this.pendingActionApprovals = /* @__PURE__ */ new Map();
1247
1247
  }
@@ -1294,7 +1294,7 @@ class nn {
1294
1294
  case "host_page_pointer":
1295
1295
  return this.executeAction(
1296
1296
  () => this.pointer(n),
1297
- Vt(n.action) === "click",
1297
+ Ht(n.action) === "click",
1298
1298
  V(n.expectation)
1299
1299
  );
1300
1300
  case "host_page_screenshot":
@@ -1309,17 +1309,17 @@ class nn {
1309
1309
  var d, u;
1310
1310
  const n = m(t.pageStateId);
1311
1311
  if (n) {
1312
- if (this.cachedSnapshot && n === this.pageStateId && !this.pageStateInvalidated && Date.now() - this.cachedSnapshotCreatedAt <= Lt && this.cachedSnapshot.url === O(this.getRoot()).location.href)
1312
+ if (this.cachedSnapshot && n === this.pageStateId && !this.pageStateInvalidated && Date.now() - this.cachedSnapshotCreatedAt <= Bt && this.cachedSnapshot.url === q(this.getRoot()).location.href)
1313
1313
  return this.cachedSnapshot;
1314
1314
  this.rejectStalePageState(n);
1315
1315
  }
1316
1316
  this.refs.clear(), this.pendingActionApprovals.clear(), this.nextRef = 1, this.disconnectMutationObservers();
1317
- const o = this.getRoot(), i = k(o), r = O(o);
1318
- this.pageStateId = jt(), this.pageStateInvalidated = !1, this.indexDocuments(i);
1319
- const a = et(o).map(
1317
+ const o = this.getRoot(), i = D(o), r = q(o);
1318
+ this.pageStateId = Vt(), this.pageStateInvalidated = !1, this.indexDocuments(i);
1319
+ const a = nt(o).map(
1320
1320
  (c) => this.snapshotElement(c)
1321
1321
  );
1322
- this.readableContent = Nt(o);
1322
+ this.readableContent = Ot(o);
1323
1323
  const s = {
1324
1324
  pageStateId: this.pageStateId,
1325
1325
  url: r.location.href,
@@ -1368,7 +1368,7 @@ class nn {
1368
1368
  focused: i.activeElement === ((l = this.refs.get(c.ref)) == null ? void 0 : l.element)
1369
1369
  };
1370
1370
  }),
1371
- readableContent: Ee(this.readableContent),
1371
+ readableContent: De(this.readableContent),
1372
1372
  elements: a
1373
1373
  };
1374
1374
  return this.cachedSnapshot = s, this.cachedSnapshotCreatedAt = Date.now(), this.observePageState(), s;
@@ -1417,7 +1417,7 @@ class nn {
1417
1417
  subtree: !0,
1418
1418
  childList: !0,
1419
1419
  attributes: !0,
1420
- attributeFilter: [...qe]
1420
+ attributeFilter: [...Ue]
1421
1421
  };
1422
1422
  r.observe(o.documentElement ?? o, a);
1423
1423
  for (const s of Array.from(o.querySelectorAll("*")))
@@ -1442,7 +1442,7 @@ class nn {
1442
1442
  getFrameState(t) {
1443
1443
  return Array.from(t.querySelectorAll("iframe")).map((n) => {
1444
1444
  var i, r;
1445
- const o = tt(n);
1445
+ const o = et(n);
1446
1446
  try {
1447
1447
  return {
1448
1448
  url: (i = n.contentWindow) == null ? void 0 : i.location.href,
@@ -1465,39 +1465,39 @@ class nn {
1465
1465
  element: t,
1466
1466
  pageStateId: this.pageStateId,
1467
1467
  documentRef: this.documentRefs.get(t.ownerDocument) ?? "d1",
1468
- fingerprint: At(t)
1468
+ fingerprint: Ct(t)
1469
1469
  }), this.createElementSnapshot(t, n);
1470
1470
  }
1471
1471
  snapshotElementWithoutRef(t) {
1472
1472
  return this.createElementSnapshot(t, "");
1473
1473
  }
1474
1474
  createElementSnapshot(t, n) {
1475
- const o = (T(t) || z(t)) && t.placeholder || void 0, i = E(t);
1475
+ const o = (T(t) || U(t)) && t.placeholder || void 0, i = E(t);
1476
1476
  return {
1477
1477
  documentRef: this.documentRefs.get(t.ownerDocument) ?? "d1",
1478
1478
  ref: n,
1479
1479
  tag: t.tagName.toLowerCase(),
1480
- role: q(t),
1480
+ role: O(t),
1481
1481
  name: R(t),
1482
- label: ot(t),
1483
- groupLabel: ie(t),
1482
+ label: it(t),
1483
+ groupLabel: ce(t),
1484
1484
  text: _(t),
1485
- nearbyText: U(t),
1486
- testId: Z(t),
1487
- value: ht(t),
1488
- selectedLabel: $e(t),
1489
- options: Xe(t),
1485
+ nearbyText: X(t),
1486
+ testId: tt(t),
1487
+ value: ft(t),
1488
+ selectedLabel: Ze(t),
1489
+ options: Qe(t),
1490
1490
  placeholder: o,
1491
- selector: Ct(t),
1492
- disabled: re(t),
1491
+ selector: It(t),
1492
+ disabled: le(t),
1493
1493
  enabled: i.enabled,
1494
- checked: zt(t),
1494
+ checked: Wt(t),
1495
1495
  visible: i.visible,
1496
1496
  actionable: i.actionable,
1497
1497
  receivesEvents: i.receivesEvents,
1498
1498
  occludedBy: i.occludedBy ? H(i.occludedBy) : void 0,
1499
1499
  safeClickPoints: i.safeClickPoints,
1500
- rect: tt(t),
1500
+ rect: et(t),
1501
1501
  center: i.center,
1502
1502
  hitTarget: i.hitTarget ? H(i.hitTarget) : void 0,
1503
1503
  hitStack: i.hitStack.slice(0, 5).map(H)
@@ -1512,7 +1512,7 @@ class nn {
1512
1512
  );
1513
1513
  const o = m(t.documentRef) ?? ((g = this.documents[0]) == null ? void 0 : g.documentRef) ?? "legacy", i = this.documents.length ? (f = Array.from(this.documentRefs.entries()).find(
1514
1514
  ([, p]) => p === o
1515
- )) == null ? void 0 : f[0] : k(this.getRoot());
1515
+ )) == null ? void 0 : f[0] : D(this.getRoot());
1516
1516
  (!o || !i) && this.rejectTarget(
1517
1517
  "unsupported_target_scope",
1518
1518
  "The requested document scope is not available."
@@ -1531,7 +1531,7 @@ class nn {
1531
1531
  const h = r ?? a;
1532
1532
  if (h) {
1533
1533
  const p = this.refs.get(h);
1534
- if (!p || p.pageStateId !== this.pageStateId || !p.element.isConnected || this.documentRefs.get(p.element.ownerDocument) !== p.documentRef || o && o !== p.documentRef || ze(p.fingerprint, p.element))
1534
+ if (!p || p.pageStateId !== this.pageStateId || !p.element.isConnected || this.documentRefs.get(p.element.ownerDocument) !== p.documentRef || o && o !== p.documentRef || tn(p.fingerprint, p.element))
1535
1535
  throw new W(
1536
1536
  `Element ref ${h} is stale. Take a new snapshot.`,
1537
1537
  {
@@ -1575,7 +1575,7 @@ class nn {
1575
1575
  strategy: "unique_selector",
1576
1576
  pageStateId: this.pageStateId
1577
1577
  };
1578
- Gt(s) && this.rejectTarget(
1578
+ Kt(s) && this.rejectTarget(
1579
1579
  "unsafe_selector",
1580
1580
  `Selector is too broad for strict targeting: ${s}.`,
1581
1581
  b
@@ -1596,7 +1596,7 @@ class nn {
1596
1596
  {
1597
1597
  ...b,
1598
1598
  candidates: v.map(
1599
- (P) => this.describeElementDescriptor(P)
1599
+ (M) => this.describeElementDescriptor(M)
1600
1600
  )
1601
1601
  }
1602
1602
  );
@@ -1623,7 +1623,7 @@ class nn {
1623
1623
  documentRef: o,
1624
1624
  match: "exact",
1625
1625
  identity: c ? { role: u, name: c } : { role: u, text: l }
1626
- }, v = p ? "test_id" : "semantic_exact", x = Wt(i, t), P = {
1626
+ }, v = p ? "test_id" : "semantic_exact", x = Gt(i, t), M = {
1627
1627
  requested: b,
1628
1628
  strategy: v,
1629
1629
  pageStateId: this.pageStateId
@@ -1631,12 +1631,12 @@ class nn {
1631
1631
  x.length === 0 && this.rejectTarget(
1632
1632
  "target_not_found",
1633
1633
  "No element matches the strict target.",
1634
- P
1634
+ M
1635
1635
  ), x.length > 1 && this.rejectTarget(
1636
1636
  "ambiguous_target",
1637
1637
  `Strict target matches ${x.length} elements.`,
1638
1638
  {
1639
- ...P,
1639
+ ...M,
1640
1640
  candidates: x.map(
1641
1641
  (w) => this.describeElementDescriptor(w)
1642
1642
  )
@@ -1644,12 +1644,12 @@ class nn {
1644
1644
  );
1645
1645
  const y = x[0];
1646
1646
  return this.lastResolution = {
1647
- ...P,
1647
+ ...M,
1648
1648
  resolved: this.describeElementDescriptor(y)
1649
1649
  }, y;
1650
1650
  }
1651
1651
  if (typeof t.x < "u" || typeof t.y < "u") {
1652
- const p = Ft(this.getRoot(), t), b = k(this.getRoot()).elementFromPoint(
1652
+ const p = zt(this.getRoot(), t), b = D(this.getRoot()).elementFromPoint(
1653
1653
  p.x,
1654
1654
  p.y
1655
1655
  );
@@ -1691,7 +1691,7 @@ class nn {
1691
1691
  var o;
1692
1692
  if (!this.pageStateId) return;
1693
1693
  const n = m(t.pageStateId);
1694
- (!n || n !== this.pageStateId || this.pageStateInvalidated || Date.now() - this.cachedSnapshotCreatedAt > Lt || ((o = this.cachedSnapshot) == null ? void 0 : o.url) !== O(this.getRoot()).location.href) && this.rejectStalePageState(n ?? this.pageStateId);
1694
+ (!n || n !== this.pageStateId || this.pageStateInvalidated || Date.now() - this.cachedSnapshotCreatedAt > Bt || ((o = this.cachedSnapshot) == null ? void 0 : o.url) !== q(this.getRoot()).location.href) && this.rejectStalePageState(n ?? this.pageStateId);
1695
1695
  }
1696
1696
  async executeAction(t, n, o) {
1697
1697
  this.lastResolution = void 0;
@@ -1711,10 +1711,10 @@ class nn {
1711
1711
  async requireActionApproval(t, n, o, i) {
1712
1712
  if (o.length === 0)
1713
1713
  return;
1714
- const r = O(this.getRoot()), a = await Bt({ action: t, params: n }), s = await Bt(
1714
+ const r = q(this.getRoot()), a = await Ft({ action: t, params: n }), s = await Ft(
1715
1715
  i ? {
1716
1716
  documentRef: this.documentRefs.get(i.ownerDocument) ?? "legacy",
1717
- ...At(i)
1717
+ ...Ct(i)
1718
1718
  } : null
1719
1719
  ), d = m(n.actionToken);
1720
1720
  let u = "approval_required";
@@ -1733,7 +1733,7 @@ class nn {
1733
1733
  }
1734
1734
  for (const [g, f] of this.pendingActionApprovals)
1735
1735
  f.expiresAt <= Date.now() && this.pendingActionApprovals.delete(g);
1736
- const c = jt(), l = Date.now() + Oe;
1736
+ const c = Vt(), l = Date.now() + $e;
1737
1737
  this.pendingActionApprovals.set(c, {
1738
1738
  action: t,
1739
1739
  actionHash: a,
@@ -1761,7 +1761,7 @@ class nn {
1761
1761
  }
1762
1762
  getObservationDocument(t) {
1763
1763
  var n;
1764
- return t.documentScope === "current_top" ? k(this.getRoot()) : ((n = Array.from(this.documentRefs.entries()).find(
1764
+ return t.documentScope === "current_top" ? D(this.getRoot()) : ((n = Array.from(this.documentRefs.entries()).find(
1765
1765
  ([, o]) => o === t.documentRef
1766
1766
  )) == null ? void 0 : n[0]) ?? null;
1767
1767
  }
@@ -1771,16 +1771,16 @@ class nn {
1771
1771
  return { status: "not_found" };
1772
1772
  let o = [];
1773
1773
  if (t.kind === "selector") {
1774
- if (Gt(t.selector))
1774
+ if (Kt(t.selector))
1775
1775
  return { status: "ambiguous" };
1776
1776
  try {
1777
1777
  o = Array.from(n.querySelectorAll(t.selector));
1778
1778
  } catch {
1779
1779
  o = [];
1780
1780
  }
1781
- } else t.kind === "test_id" ? o = et(n).filter(
1782
- (i) => i.ownerDocument === n && Z(i) === t.testId
1783
- ) : o = Wt(n, {
1781
+ } else t.kind === "test_id" ? o = nt(n).filter(
1782
+ (i) => i.ownerDocument === n && tt(i) === t.testId
1783
+ ) : o = Gt(n, {
1784
1784
  role: t.identity.role,
1785
1785
  ..."name" in t.identity ? { name: t.identity.name } : { text: t.identity.text }
1786
1786
  });
@@ -1789,7 +1789,7 @@ class nn {
1789
1789
  checkExpectation(t) {
1790
1790
  var r, a;
1791
1791
  if (t.type === "url_matches") {
1792
- const s = O(this.getRoot()).location.href;
1792
+ const s = q(this.getRoot()).location.href;
1793
1793
  return {
1794
1794
  matched: t.mode === "exact" ? s === t.value : s.startsWith(t.value),
1795
1795
  actual: s
@@ -1814,17 +1814,17 @@ class nn {
1814
1814
  };
1815
1815
  const o = n.element;
1816
1816
  if (t.type === "field_contains") {
1817
- const s = ht(o) ?? null;
1817
+ const s = ft(o) ?? null;
1818
1818
  return {
1819
1819
  matched: typeof s == "string" && s.toLowerCase().includes(t.value.toLowerCase()),
1820
1820
  actual: s
1821
1821
  };
1822
1822
  }
1823
1823
  if (t.type === "checked_equals") {
1824
- const s = zt(o) ?? null;
1824
+ const s = Wt(o) ?? null;
1825
1825
  return { matched: s === t.value, actual: s };
1826
1826
  }
1827
- const i = D(o);
1827
+ const i = P(o);
1828
1828
  return {
1829
1829
  matched: t.type === "element_visible" ? i : !i,
1830
1830
  actual: i
@@ -1833,7 +1833,7 @@ class nn {
1833
1833
  async verifyExpectation(t) {
1834
1834
  const n = Date.now();
1835
1835
  let o;
1836
- for (; Date.now() - n <= qt; ) {
1836
+ for (; Date.now() - n <= jt; ) {
1837
1837
  const i = this.checkExpectation(t);
1838
1838
  if (o = i.actual, i.matched)
1839
1839
  return {
@@ -1849,10 +1849,10 @@ class nn {
1849
1849
  elapsedMs: Date.now() - n,
1850
1850
  actual: o
1851
1851
  };
1852
- if (Date.now() - n >= qt)
1852
+ if (Date.now() - n >= jt)
1853
1853
  break;
1854
1854
  await new Promise(
1855
- (r) => setTimeout(r, Ne)
1855
+ (r) => setTimeout(r, ze)
1856
1856
  );
1857
1857
  }
1858
1858
  return {
@@ -1878,20 +1878,20 @@ class nn {
1878
1878
  documentRef: this.documentRefs.get(t.ownerDocument) ?? "d1",
1879
1879
  ...n,
1880
1880
  tag: t.tagName.toLowerCase(),
1881
- role: q(t),
1881
+ role: O(t),
1882
1882
  name: R(t),
1883
1883
  text: _(t),
1884
- testId: Z(t),
1885
- rect: tt(t)
1884
+ testId: tt(t),
1885
+ rect: et(t)
1886
1886
  };
1887
1887
  }
1888
1888
  async click(t) {
1889
- const n = A(t), o = this.resolveElement(n), i = E(o), r = dt(o), a = Y(r);
1889
+ const n = A(t), o = this.resolveElement(n), i = E(o), r = ut(o), a = G(r);
1890
1890
  if (i.enabled || this.rejectTarget(
1891
1891
  "target_disabled",
1892
1892
  `Target "${R(o) ?? o.tagName.toLowerCase()}" is disabled.`,
1893
1893
  this.lastResolution
1894
- ), !a && lt(o.ownerDocument))
1894
+ ), !a && dt(o.ownerDocument))
1895
1895
  throw this.lastResolution && (this.lastResolution = {
1896
1896
  ...this.lastResolution,
1897
1897
  adjustment: r === o ? void 0 : "actionable_ancestor",
@@ -1926,7 +1926,7 @@ class nn {
1926
1926
  ]
1927
1927
  }
1928
1928
  );
1929
- const s = Y(r), d = E(r), u = s ? ut(r, s) : lt(r.ownerDocument) ? void 0 : d.center ?? i.center;
1929
+ const s = G(r), d = E(r), u = s ? ht(r, s) : dt(r.ownerDocument) ? void 0 : d.center ?? i.center;
1930
1930
  if (this.lastResolution) {
1931
1931
  const f = this.describeElementDescriptor(r);
1932
1932
  this.lastResolution = {
@@ -1942,7 +1942,7 @@ class nn {
1942
1942
  await this.requireActionApproval(
1943
1943
  "host_page_click",
1944
1944
  n,
1945
- vt(r),
1945
+ wt(r),
1946
1946
  r
1947
1947
  ), K(r), u && await this.showVisualEffect({
1948
1948
  type: "click",
@@ -1951,8 +1951,8 @@ class nn {
1951
1951
  target: r,
1952
1952
  requested: o
1953
1953
  });
1954
- const c = Y(r), l = E(r);
1955
- !c && lt(r.ownerDocument) && (this.lastResolution && (this.lastResolution = {
1954
+ const c = G(r), l = E(r);
1955
+ !c && dt(r.ownerDocument) && (this.lastResolution && (this.lastResolution = {
1956
1956
  ...this.lastResolution,
1957
1957
  hitTarget: l.hitTarget ? this.describeElementDescriptor(
1958
1958
  l.hitTarget
@@ -1963,7 +1963,7 @@ class nn {
1963
1963
  `Target "${R(o) ?? o.tagName.toLowerCase()}" stopped receiving pointer events before dispatch.`,
1964
1964
  this.lastResolution
1965
1965
  ));
1966
- const h = c ? ut(r, c) : u, g = E(o);
1966
+ const h = c ? ht(r, c) : u, g = E(o);
1967
1967
  return this.lastResolution && (this.lastResolution = {
1968
1968
  ...this.lastResolution,
1969
1969
  point: h,
@@ -1986,25 +1986,25 @@ class nn {
1986
1986
  };
1987
1987
  }
1988
1988
  read(t) {
1989
- const n = A(t), o = this.getRoot(), i = this.readableContent ?? Nt(o);
1989
+ const n = A(t), o = this.getRoot(), i = this.readableContent ?? Ot(o);
1990
1990
  this.readableContent = i;
1991
1991
  const r = {
1992
1992
  blockId: m(n.blockId),
1993
1993
  query: m(n.query),
1994
- page: ct(n.page),
1995
- pageSize: ct(n.pageSize),
1996
- maxChars: ct(n.maxChars)
1994
+ page: lt(n.page),
1995
+ pageSize: lt(n.pageSize),
1996
+ maxChars: lt(n.maxChars)
1997
1997
  };
1998
- return Ie(i, r);
1998
+ return je(i, r);
1999
1999
  }
2000
2000
  async fill(t) {
2001
- const n = A(t), o = bt(n.value, "value"), i = this.resolveElement(n);
2001
+ const n = A(t), o = vt(n.value, "value"), i = this.resolveElement(n);
2002
2002
  if (await this.requireActionApproval(
2003
2003
  "host_page_fill",
2004
2004
  n,
2005
2005
  T(i) ? i.type === "password" ? ["password_input"] : i.type === "file" ? ["file_input"] : [] : [],
2006
2006
  i
2007
- ), K(i), T(i) || z(i))
2007
+ ), K(i), T(i) || U(i))
2008
2008
  return await this.showVisualEffect({
2009
2009
  type: "fill",
2010
2010
  target: i,
@@ -2012,7 +2012,7 @@ class nn {
2012
2012
  value: o,
2013
2013
  anchor: "target",
2014
2014
  point: E(i).center
2015
- }), en(i, o), wt(i), this.invalidateReadableContent(), { filled: this.describeElement(i), value: o };
2015
+ }), un(i, o), St(i), this.invalidateReadableContent(), { filled: this.describeElement(i), value: o };
2016
2016
  if (I(i) && i.isContentEditable)
2017
2017
  return await this.showVisualEffect({
2018
2018
  type: "fill",
@@ -2021,17 +2021,17 @@ class nn {
2021
2021
  value: o,
2022
2022
  anchor: "target",
2023
2023
  point: E(i).center
2024
- }), i.textContent = o, wt(i), this.invalidateReadableContent(), { filled: this.describeElement(i), value: o };
2024
+ }), i.textContent = o, St(i), this.invalidateReadableContent(), { filled: this.describeElement(i), value: o };
2025
2025
  throw new Error("Target element cannot be filled.");
2026
2026
  }
2027
2027
  async press(t) {
2028
- const n = A(t), o = bt(n.key, "key"), i = n.ref || n.selector || n.x !== void 0 && n.y !== void 0 ? this.resolveElement(n) : k(this.getRoot()).activeElement ?? k(this.getRoot()).body;
2028
+ const n = A(t), o = vt(n.key, "key"), i = n.ref || n.selector || n.x !== void 0 && n.y !== void 0 ? this.resolveElement(n) : D(this.getRoot()).activeElement ?? D(this.getRoot()).body;
2029
2029
  if (!i)
2030
2030
  throw new Error("No target element is available for key press.");
2031
2031
  await this.requireActionApproval(
2032
2032
  "host_page_press",
2033
2033
  n,
2034
- o === "Enter" || o === " " ? vt(i) : [],
2034
+ o === "Enter" || o === " " ? wt(i) : [],
2035
2035
  i
2036
2036
  ), K(i), await this.showVisualEffect({
2037
2037
  type: "press",
@@ -2045,7 +2045,7 @@ class nn {
2045
2045
  return i.dispatchEvent(new KeyboardEvent("keydown", r)), o.length === 1 && i.dispatchEvent(new KeyboardEvent("keypress", r)), i.dispatchEvent(new KeyboardEvent("keyup", r)), this.invalidateReadableContent(), { pressed: o, target: this.describeElement(i) };
2046
2046
  }
2047
2047
  async select(t) {
2048
- const n = A(t), o = je(n.values ?? n.value), i = this.resolveElement(n);
2048
+ const n = A(t), o = We(n.values ?? n.value), i = this.resolveElement(n);
2049
2049
  if (!L(i))
2050
2050
  throw new Error("Target element is not a select.");
2051
2051
  K(i);
@@ -2060,7 +2060,7 @@ class nn {
2060
2060
  });
2061
2061
  for (const a of Array.from(i.options))
2062
2062
  a.selected = r.has(a.value);
2063
- return wt(i), this.invalidateReadableContent(), {
2063
+ return St(i), this.invalidateReadableContent(), {
2064
2064
  selected: Array.from(i.selectedOptions).map(
2065
2065
  (a) => a.value
2066
2066
  ),
@@ -2070,9 +2070,9 @@ class nn {
2070
2070
  async scroll(t) {
2071
2071
  var d, u, c, l;
2072
2072
  const n = A(t), o = n.x !== void 0 || n.y !== void 0 ? {
2073
- x: G(n.x) ?? 0,
2074
- y: G(n.y) ?? 0
2075
- } : null, i = G(n.deltaX) ?? 0, r = G(n.deltaY) ?? 0, a = this.getRoot(), s = O(a);
2073
+ x: Y(n.x) ?? 0,
2074
+ y: Y(n.y) ?? 0
2075
+ } : null, i = Y(n.deltaX) ?? 0, r = Y(n.deltaY) ?? 0, a = this.getRoot(), s = q(a);
2076
2076
  if (n.ref || n.selector || n.role || n.name || n.text || n.testId) {
2077
2077
  const h = this.resolveElement(n);
2078
2078
  if (!I(h))
@@ -2103,7 +2103,7 @@ class nn {
2103
2103
  async navigate(t) {
2104
2104
  if (this.options.allowNavigation === !1)
2105
2105
  throw new Error("Navigation is disabled for host page automation.");
2106
- const n = A(t), o = this.getRoot(), i = O(o), r = bt(n.url, "url"), a = new URL(r, i.location.href);
2106
+ const n = A(t), o = this.getRoot(), i = q(o), r = vt(n.url, "url"), a = new URL(r, i.location.href);
2107
2107
  if (a.protocol !== "http:" && a.protocol !== "https:")
2108
2108
  throw new Error("Navigation only supports HTTP(S) URLs.");
2109
2109
  return this.refs.clear(), this.invalidateReadableContent(), i.location.assign(a.toString()), { navigated: a.toString() };
@@ -2143,13 +2143,13 @@ class nn {
2143
2143
  }), { focused: this.describeElement(o) };
2144
2144
  }
2145
2145
  async pointer(t) {
2146
- var x, P;
2147
- const n = A(t), o = Vt(n.action), i = ct(n.button) ?? 0, r = typeof n.x < "u" || typeof n.y < "u", a = m(n.targetText), s = m(n.targetRole), d = m(n.targetContext);
2146
+ var x, M;
2147
+ const n = A(t), o = Ht(n.action), i = lt(n.button) ?? 0, r = typeof n.x < "u" || typeof n.y < "u", a = m(n.targetText), s = m(n.targetRole), d = m(n.targetContext);
2148
2148
  if (o === "click" && r && !a)
2149
2149
  throw new Error(
2150
2150
  "Pointer coordinate clicks require targetText to avoid unintended navigation."
2151
2151
  );
2152
- let u = k(this.getRoot()), c = ((x = this.documents[0]) == null ? void 0 : x.documentRef) ?? "legacy";
2152
+ let u = D(this.getRoot()), c = ((x = this.documents[0]) == null ? void 0 : x.documentRef) ?? "legacy";
2153
2153
  if (r && this.pageStateId) {
2154
2154
  const y = m(n.pageStateId);
2155
2155
  (!y || y !== this.pageStateId || this.pageStateInvalidated) && this.rejectStalePageState(y ?? this.pageStateId);
@@ -2158,21 +2158,21 @@ class nn {
2158
2158
  "unsupported_target_scope",
2159
2159
  "documentRef is required for coordinate targeting."
2160
2160
  );
2161
- const N = (P = Array.from(this.documentRefs.entries()).find(
2161
+ const N = (M = Array.from(this.documentRefs.entries()).find(
2162
2162
  ([, j]) => j === w
2163
- )) == null ? void 0 : P[0];
2163
+ )) == null ? void 0 : M[0];
2164
2164
  N || this.rejectTarget(
2165
2165
  "unsupported_target_scope",
2166
2166
  "The requested coordinate document scope is not available."
2167
2167
  ), u = N, c = w;
2168
2168
  }
2169
- const l = n.ref || n.selector || n.role || n.name || n.text || n.testId ? this.resolveElement(n) : null, h = l ? E(l).center : Ft(this.getRoot(), n);
2169
+ const l = n.ref || n.selector || n.role || n.name || n.text || n.testId ? this.resolveElement(n) : null, h = l ? E(l).center : zt(this.getRoot(), n);
2170
2170
  if (!h)
2171
2171
  throw new Error("Target element has no clickable point.");
2172
- const g = r ? Ut(u, h) : h, f = l ?? X(u, g)[0];
2172
+ const g = r ? Yt(u, h) : h, f = l ?? z(u, g)[0];
2173
2173
  if (!f)
2174
2174
  throw new Error(`No element found at (${h.x}, ${h.y}).`);
2175
- if (Tt(f)) {
2175
+ if (At(f)) {
2176
2176
  const y = r ? {
2177
2177
  requested: {
2178
2178
  kind: "coordinate",
@@ -2189,7 +2189,7 @@ class nn {
2189
2189
  resolved: this.describeElementDescriptor(f),
2190
2190
  point: h,
2191
2191
  hitTarget: this.describeElementDescriptor(f),
2192
- hitStack: X(u, g).slice(0, 5).map((w) => this.describeElementDescriptor(w)),
2192
+ hitStack: z(u, g).slice(0, 5).map((w) => this.describeElementDescriptor(w)),
2193
2193
  pageStateId: this.pageStateId
2194
2194
  } : this.lastResolution;
2195
2195
  this.rejectTarget(
@@ -2198,20 +2198,20 @@ class nn {
2198
2198
  y
2199
2199
  );
2200
2200
  }
2201
- const p = a ? Ke(f, a) : void 0;
2201
+ const p = a ? sn(f, a) : void 0;
2202
2202
  if (a && !p && this.rejectTarget(
2203
2203
  "coordinate_target_mismatch",
2204
2204
  `Pointer target text mismatch: expected exact hit target "${a}".`
2205
2205
  ), s) {
2206
- const y = dt(f);
2207
- S(q(y)) !== S(s) && this.rejectTarget(
2206
+ const y = ut(f);
2207
+ S(O(y)) !== S(s) && this.rejectTarget(
2208
2208
  "coordinate_target_mismatch",
2209
2209
  `Pointer target role mismatch: expected "${s}".`
2210
2210
  );
2211
2211
  }
2212
2212
  if (a) {
2213
- const y = et(u).filter(
2214
- (w) => w.ownerDocument === u && Pt(w) && D(w) && !!Y(w) && Yt(
2213
+ const y = nt(u).filter(
2214
+ (w) => w.ownerDocument === u && qt(w) && P(w) && !!G(w) && Jt(
2215
2215
  w,
2216
2216
  a,
2217
2217
  s,
@@ -2261,15 +2261,15 @@ class nn {
2261
2261
  resolved: this.describeElementDescriptor(f),
2262
2262
  point: h,
2263
2263
  hitTarget: this.describeElementDescriptor(f),
2264
- hitStack: X(u, g).slice(0, 5).map((y) => this.describeElementDescriptor(y)),
2264
+ hitStack: z(u, g).slice(0, 5).map((y) => this.describeElementDescriptor(y)),
2265
2265
  pageStateId: this.pageStateId
2266
2266
  }), o === "click" && await this.requireActionApproval(
2267
2267
  "host_page_pointer",
2268
2268
  n,
2269
- vt(f),
2269
+ wt(f),
2270
2270
  f
2271
2271
  );
2272
- const b = r ? g : Ut(f.ownerDocument, h), v = {
2272
+ const b = r ? g : Yt(f.ownerDocument, h), v = {
2273
2273
  bubbles: !0,
2274
2274
  cancelable: !0,
2275
2275
  clientX: b.x,
@@ -2308,42 +2308,42 @@ class nn {
2308
2308
  target: f
2309
2309
  });
2310
2310
  let y = f, w = h, N = h;
2311
- if (lt(f.ownerDocument)) {
2311
+ if (dt(f.ownerDocument)) {
2312
2312
  f.isConnected || this.rejectTarget(
2313
2313
  "stale_target",
2314
2314
  "The coordinate target was replaced before pointer dispatch.",
2315
2315
  this.lastResolution
2316
2316
  );
2317
- const it = r ? g : Y(f);
2318
- if (!it) {
2317
+ const rt = r ? g : G(f);
2318
+ if (!rt) {
2319
2319
  const B = E(f);
2320
2320
  this.lastResolution && (this.lastResolution = {
2321
2321
  ...this.lastResolution,
2322
2322
  hitTarget: B.hitTarget ? this.describeElementDescriptor(B.hitTarget) : void 0,
2323
- hitStack: B.hitStack.slice(0, 5).map((de) => this.describeElementDescriptor(de))
2323
+ hitStack: B.hitStack.slice(0, 5).map((pe) => this.describeElementDescriptor(pe))
2324
2324
  }), this.rejectTarget(
2325
2325
  "target_occluded",
2326
2326
  "The coordinate target stopped receiving pointer events before dispatch.",
2327
2327
  this.lastResolution
2328
2328
  );
2329
2329
  }
2330
- const gt = X(
2330
+ const mt = z(
2331
2331
  r ? u : f.ownerDocument,
2332
- it
2333
- ), M = gt[0];
2334
- M && Tt(M) && this.rejectTarget(
2332
+ rt
2333
+ ), k = mt[0];
2334
+ k && At(k) && this.rejectTarget(
2335
2335
  "unsupported_target_scope",
2336
2336
  "The coordinate target became an inaccessible frame before pointer dispatch.",
2337
2337
  this.lastResolution
2338
2338
  );
2339
- const mt = M ? dt(M) : void 0, le = dt(f);
2339
+ const yt = k ? ut(k) : void 0, fe = ut(f);
2340
2340
  this.lastResolution && (this.lastResolution = {
2341
2341
  ...this.lastResolution,
2342
2342
  point: w,
2343
- hitTarget: M ? this.describeElementDescriptor(M) : void 0,
2344
- hitStack: gt.slice(0, 5).map((B) => this.describeElementDescriptor(B))
2345
- }), (!M || mt !== le || a && (!mt || !Yt(
2346
- mt,
2343
+ hitTarget: k ? this.describeElementDescriptor(k) : void 0,
2344
+ hitStack: mt.slice(0, 5).map((B) => this.describeElementDescriptor(B))
2345
+ }), (!k || yt !== fe || a && (!yt || !Jt(
2346
+ yt,
2347
2347
  a,
2348
2348
  s,
2349
2349
  d
@@ -2351,12 +2351,12 @@ class nn {
2351
2351
  "coordinate_target_mismatch",
2352
2352
  "The coordinate target identity changed before pointer dispatch.",
2353
2353
  this.lastResolution
2354
- ), y = M, N = it, w = r ? h : ut(f, it), this.lastResolution && (this.lastResolution = {
2354
+ ), y = k, N = rt, w = r ? h : ht(f, rt), this.lastResolution && (this.lastResolution = {
2355
2355
  ...this.lastResolution,
2356
2356
  point: w,
2357
2357
  resolved: this.describeElementDescriptor(f),
2358
- hitTarget: this.describeElementDescriptor(M),
2359
- hitStack: gt.slice(0, 5).map((B) => this.describeElementDescriptor(B))
2358
+ hitTarget: this.describeElementDescriptor(k),
2359
+ hitStack: mt.slice(0, 5).map((B) => this.describeElementDescriptor(B))
2360
2360
  });
2361
2361
  }
2362
2362
  const j = {
@@ -2380,9 +2380,9 @@ class nn {
2380
2380
  coordinateSpace: "viewport-css-px",
2381
2381
  target: this.describeElement(y),
2382
2382
  targetTextMatched: p,
2383
- expectedAfterClick: tn(
2383
+ expectedAfterClick: dn(
2384
2384
  this.getRoot(),
2385
- Je(n.expectedAfterClick)
2385
+ an(n.expectedAfterClick)
2386
2386
  )
2387
2387
  };
2388
2388
  }
@@ -2417,16 +2417,16 @@ class nn {
2417
2417
  }
2418
2418
  }
2419
2419
  async waitFor(t) {
2420
- const n = A(t), o = ee(n.state, [
2420
+ const n = A(t), o = re(n.state, [
2421
2421
  "attached",
2422
2422
  "visible",
2423
2423
  "hidden",
2424
2424
  "detached"
2425
- ]) ?? "visible", i = G(n.timeoutSeconds), r = Math.min(
2426
- Pe,
2425
+ ]) ?? "visible", i = Y(n.timeoutSeconds), r = Math.min(
2426
+ He,
2427
2427
  Math.max(
2428
2428
  0,
2429
- (i ?? De / 1e3) * 1e3
2429
+ (i ?? Fe / 1e3) * 1e3
2430
2430
  )
2431
2431
  ), a = Date.now(), s = this.tryResolveElement(n);
2432
2432
  for (await this.showVisualEffect({
@@ -2438,7 +2438,7 @@ class nn {
2438
2438
  point: s ? E(s).center : void 0
2439
2439
  }); Date.now() - a <= r; ) {
2440
2440
  const d = this.tryResolveElement(n);
2441
- if (o === "attached" ? !!d : o === "detached" ? !d : o === "hidden" ? !d || !D(d) : !!(d && D(d)))
2441
+ if (o === "attached" ? !!d : o === "detached" ? !d : o === "hidden" ? !d || !P(d) : !!(d && P(d)))
2442
2442
  return {
2443
2443
  waitedFor: o,
2444
2444
  elapsedMs: Date.now() - a,
@@ -2458,36 +2458,36 @@ class nn {
2458
2458
  describeElement(t) {
2459
2459
  return {
2460
2460
  tag: t.tagName.toLowerCase(),
2461
- role: q(t),
2461
+ role: O(t),
2462
2462
  name: R(t),
2463
- selector: Ct(t)
2463
+ selector: It(t)
2464
2464
  };
2465
2465
  }
2466
2466
  }
2467
- const on = /* @__PURE__ */ new Set([
2467
+ const fn = /* @__PURE__ */ new Set([
2468
2468
  "verified",
2469
2469
  "verification_failed",
2470
2470
  "executed_unverified",
2471
2471
  "rejected_before_execution"
2472
- ]), rn = /(?:token|secret|password|passwd|api[-_]?key|auth|session|code|signature|credential)/i;
2473
- function sn(e) {
2472
+ ]), pn = /(?:token|secret|password|passwd|api[-_]?key|auth|session|code|signature|credential)/i;
2473
+ function gn(e) {
2474
2474
  try {
2475
2475
  const t = new URL(e);
2476
2476
  for (const n of t.searchParams.keys())
2477
- rn.test(n) && t.searchParams.set(n, "[REDACTED]");
2477
+ pn.test(n) && t.searchParams.set(n, "[REDACTED]");
2478
2478
  return t.hash = "", t.toString();
2479
2479
  } catch {
2480
2480
  return "[REDACTED_URL]";
2481
2481
  }
2482
2482
  }
2483
- function Kt(e, t, n) {
2483
+ function Qt(e, t, n) {
2484
2484
  var a, s;
2485
- if (!n || typeof n != "object" || Array.isArray(n) || !Qt.includes(
2485
+ if (!n || typeof n != "object" || Array.isArray(n) || !te.includes(
2486
2486
  e
2487
2487
  ))
2488
2488
  return n;
2489
2489
  const o = n;
2490
- if (!o.outcome || !on.has(o.outcome))
2490
+ if (!o.outcome || !fn.has(o.outcome))
2491
2491
  return n;
2492
2492
  const i = ((a = o.resolution) == null ? void 0 : a.pageStateId) ?? o.invalidatedPageStateId;
2493
2493
  if (!i)
@@ -2495,7 +2495,7 @@ function Kt(e, t, n) {
2495
2495
  const r = {
2496
2496
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2497
2497
  pageStateId: i,
2498
- url: sn(t),
2498
+ url: gn(t),
2499
2499
  action: e,
2500
2500
  outcome: o.outcome,
2501
2501
  ...(s = o.resolution) != null && s.requested ? { requested: o.resolution.requested } : {},
@@ -2504,64 +2504,64 @@ function Kt(e, t, n) {
2504
2504
  };
2505
2505
  return { ...o, evidence: r };
2506
2506
  }
2507
- function an(e) {
2507
+ function mn(e) {
2508
2508
  return typeof e == "object" && e !== null && !Array.isArray(e) ? e : {};
2509
2509
  }
2510
- function cn(e) {
2510
+ function yn(e) {
2511
2511
  return JSON.stringify(e);
2512
2512
  }
2513
- function St(e, t, n) {
2513
+ function Et(e, t, n) {
2514
2514
  return {
2515
2515
  tool_call_id: e.tool_call_id ?? e.id,
2516
2516
  name: e.name,
2517
2517
  status: t,
2518
- content: cn(n)
2518
+ content: yn(n)
2519
2519
  };
2520
2520
  }
2521
- function ln(e) {
2521
+ function bn(e) {
2522
2522
  return e instanceof Error ? e.message : String(e);
2523
2523
  }
2524
- function dn(e) {
2524
+ function vn(e) {
2525
2525
  if (!e || typeof e != "object" || Array.isArray(e))
2526
2526
  return {};
2527
2527
  const t = Reflect.get(e, "details");
2528
2528
  return t && typeof t == "object" && !Array.isArray(t) ? t : {};
2529
2529
  }
2530
- function un(e) {
2530
+ function wn(e) {
2531
2531
  return e !== null && typeof e == "object" && !Array.isArray(e) && Reflect.get(e, "outcome") === "verification_failed";
2532
2532
  }
2533
- function Jt(e) {
2533
+ function Zt(e) {
2534
2534
  var n, o, i;
2535
2535
  const t = e.root && "location" in e.root ? e.root : (n = e.root) == null ? void 0 : n.ownerDocument;
2536
2536
  return ((o = t == null ? void 0 : t.location) == null ? void 0 : o.href) ?? ((i = globalThis.location) == null ? void 0 : i.href) ?? "";
2537
2537
  }
2538
- function gn(e = {}) {
2539
- const t = new nn(e);
2538
+ function Rn(e = {}) {
2539
+ const t = new hn(e);
2540
2540
  return async (n) => {
2541
- if (!Le(n.name))
2542
- return St(n, "error", {
2541
+ if (!Xe(n.name))
2542
+ return Et(n, "error", {
2543
2543
  ok: !1,
2544
2544
  error: `Unknown host page automation tool: ${n.name}`
2545
2545
  });
2546
2546
  try {
2547
- const o = Kt(
2547
+ const o = Qt(
2548
2548
  n.name,
2549
- Jt(e),
2550
- await t.execute(n.name, an(n.params))
2551
- ), i = un(o);
2552
- return St(n, i ? "error" : "success", {
2549
+ Zt(e),
2550
+ await t.execute(n.name, mn(n.params))
2551
+ ), i = wn(o);
2552
+ return Et(n, i ? "error" : "success", {
2553
2553
  ok: !i,
2554
2554
  result: o
2555
2555
  });
2556
2556
  } catch (o) {
2557
- const i = Kt(
2557
+ const i = Qt(
2558
2558
  n.name,
2559
- Jt(e),
2560
- dn(o)
2559
+ Zt(e),
2560
+ vn(o)
2561
2561
  );
2562
- return St(n, "error", {
2562
+ return Et(n, "error", {
2563
2563
  ok: !1,
2564
- error: ln(o),
2564
+ error: bn(o),
2565
2565
  ...i
2566
2566
  });
2567
2567
  }
@@ -2604,7 +2604,7 @@ const C = {
2604
2604
  type: "string",
2605
2605
  description: "Visible text to match."
2606
2606
  }
2607
- }, hn = {
2607
+ }, Sn = {
2608
2608
  x: {
2609
2609
  type: "number",
2610
2610
  description: "Viewport x coordinate."
@@ -2618,7 +2618,7 @@ const C = {
2618
2618
  enum: ["viewport-css-px", "viewport_normalized"],
2619
2619
  description: "Coordinate space for x/y. Use viewport_normalized for screenshot-derived points."
2620
2620
  }
2621
- }, fn = {
2621
+ }, En = {
2622
2622
  type: "object",
2623
2623
  properties: {
2624
2624
  documentScope: {
@@ -2660,7 +2660,7 @@ const C = {
2660
2660
  "text_visible"
2661
2661
  ]
2662
2662
  },
2663
- target: fn,
2663
+ target: En,
2664
2664
  scope: {
2665
2665
  type: "object",
2666
2666
  properties: {
@@ -2678,7 +2678,7 @@ const C = {
2678
2678
  },
2679
2679
  required: ["type"],
2680
2680
  additionalProperties: !1
2681
- }, pn = {
2681
+ }, _n = {
2682
2682
  type: "object",
2683
2683
  properties: {
2684
2684
  type: {
@@ -2696,7 +2696,7 @@ const C = {
2696
2696
  },
2697
2697
  required: ["type", "field", "value"],
2698
2698
  additionalProperties: !1
2699
- }, mn = {
2699
+ }, Tn = {
2700
2700
  host_page_snapshot: {
2701
2701
  type: "object",
2702
2702
  properties: {
@@ -2815,7 +2815,7 @@ const C = {
2815
2815
  type: "object",
2816
2816
  properties: {
2817
2817
  ...C,
2818
- ...hn,
2818
+ ...Sn,
2819
2819
  action: {
2820
2820
  type: "string",
2821
2821
  enum: ["move", "down", "up", "click"],
@@ -2842,7 +2842,7 @@ const C = {
2842
2842
  description: "Nearby exact context used to disambiguate coordinates."
2843
2843
  },
2844
2844
  expectation: F,
2845
- expectedAfterClick: pn
2845
+ expectedAfterClick: _n
2846
2846
  },
2847
2847
  additionalProperties: !1
2848
2848
  },
@@ -2915,10 +2915,10 @@ const C = {
2915
2915
  }
2916
2916
  };
2917
2917
  export {
2918
- Qt as HOST_PAGE_AUTOMATION_TOOL_NAMES,
2919
- mn as HOST_PAGE_AUTOMATION_TOOL_SCHEMAS,
2920
- nn as HostPageAutomationExecutor,
2921
- Kt as addBrowserActionEvidence,
2922
- gn as createHostPageAutomationClientToolHandler,
2923
- Le as isHostPageAutomationToolName
2918
+ te as HOST_PAGE_AUTOMATION_TOOL_NAMES,
2919
+ Tn as HOST_PAGE_AUTOMATION_TOOL_SCHEMAS,
2920
+ hn as HostPageAutomationExecutor,
2921
+ Qt as addBrowserActionEvidence,
2922
+ Rn as createHostPageAutomationClientToolHandler,
2923
+ Xe as isHostPageAutomationToolName
2924
2924
  };