appium-espresso-driver 6.3.3 → 6.3.5

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 (58) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/actions.d.ts +7 -4
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +4 -3
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/app-management.d.ts +15 -13
  7. package/build/lib/commands/app-management.d.ts.map +1 -1
  8. package/build/lib/commands/app-management.js +22 -15
  9. package/build/lib/commands/app-management.js.map +1 -1
  10. package/build/lib/commands/clipboard.d.ts +10 -12
  11. package/build/lib/commands/clipboard.d.ts.map +1 -1
  12. package/build/lib/commands/clipboard.js +9 -14
  13. package/build/lib/commands/clipboard.js.map +1 -1
  14. package/build/lib/commands/context.d.ts +9 -14
  15. package/build/lib/commands/context.d.ts.map +1 -1
  16. package/build/lib/commands/context.js +5 -6
  17. package/build/lib/commands/context.js.map +1 -1
  18. package/build/lib/commands/element.d.ts +68 -57
  19. package/build/lib/commands/element.d.ts.map +1 -1
  20. package/build/lib/commands/element.js +56 -46
  21. package/build/lib/commands/element.js.map +1 -1
  22. package/build/lib/commands/idling-resources.d.ts +11 -15
  23. package/build/lib/commands/idling-resources.d.ts.map +1 -1
  24. package/build/lib/commands/idling-resources.js +7 -11
  25. package/build/lib/commands/idling-resources.js.map +1 -1
  26. package/build/lib/commands/misc.d.ts +46 -46
  27. package/build/lib/commands/misc.d.ts.map +1 -1
  28. package/build/lib/commands/misc.js +34 -35
  29. package/build/lib/commands/misc.js.map +1 -1
  30. package/build/lib/commands/screenshot.d.ts +10 -27
  31. package/build/lib/commands/screenshot.d.ts.map +1 -1
  32. package/build/lib/commands/screenshot.js +16 -21
  33. package/build/lib/commands/screenshot.js.map +1 -1
  34. package/build/lib/commands/services.d.ts +11 -12
  35. package/build/lib/commands/services.d.ts.map +1 -1
  36. package/build/lib/commands/services.js +10 -12
  37. package/build/lib/commands/services.js.map +1 -1
  38. package/build/lib/commands/types.d.ts +17 -0
  39. package/build/lib/commands/types.d.ts.map +1 -0
  40. package/build/lib/commands/types.js +3 -0
  41. package/build/lib/commands/types.js.map +1 -0
  42. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  43. package/lib/commands/{actions.js → actions.ts} +11 -4
  44. package/lib/commands/app-management.ts +67 -0
  45. package/lib/commands/clipboard.ts +32 -0
  46. package/lib/commands/{context.js → context.ts} +14 -11
  47. package/lib/commands/element.ts +258 -0
  48. package/lib/commands/{idling-resources.js → idling-resources.ts} +19 -16
  49. package/lib/commands/{misc.js → misc.ts} +68 -58
  50. package/lib/commands/{screenshot.js → screenshot.ts} +25 -28
  51. package/lib/commands/services.ts +49 -0
  52. package/lib/commands/types.ts +16 -0
  53. package/npm-shrinkwrap.json +5 -5
  54. package/package.json +1 -1
  55. package/lib/commands/app-management.js +0 -53
  56. package/lib/commands/clipboard.js +0 -31
  57. package/lib/commands/element.js +0 -241
  58. package/lib/commands/services.js +0 -40
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [6.3.5](https://github.com/appium/appium-espresso-driver/compare/v6.3.4...v6.3.5) (2026-01-17)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * Migrate the rest of commands to typescript ([#1125](https://github.com/appium/appium-espresso-driver/issues/1125)) ([83edd51](https://github.com/appium/appium-espresso-driver/commit/83edd51b1639a560a735b17518aa29c217e826bc))
6
+
7
+ ## [6.3.4](https://github.com/appium/appium-espresso-driver/compare/v6.3.3...v6.3.4) (2026-01-17)
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * Migrate various commands to typescript (part 1) ([#1124](https://github.com/appium/appium-espresso-driver/issues/1124)) ([ed66c3b](https://github.com/appium/appium-espresso-driver/commit/ed66c3bcec7bf19dd6eceb69080ccbfd56771705))
12
+
1
13
  ## [6.3.3](https://github.com/appium/appium-espresso-driver/compare/v6.3.2...v6.3.3) (2026-01-16)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -1,7 +1,10 @@
1
+ import type { EspressoDriver } from '../driver';
2
+ import type { StringRecord } from '@appium/types';
1
3
  /**
2
- * @this {import('../driver').EspressoDriver}
3
- * @param {import('@appium/types').StringRecord[]} actions
4
- * @returns {Promise<void>}
4
+ * Performs a sequence of W3C actions (e.g., pointer, key, wheel actions).
5
+ * Automatically converts pointer actions to touch type for mobile compatibility.
6
+ * @param actions - Array of action objects following the W3C Actions protocol
7
+ * @returns Promise that resolves when all actions are performed
5
8
  */
6
- export function performActions(this: import("../driver").EspressoDriver, actions: import("@appium/types").StringRecord[]): Promise<void>;
9
+ export declare function performActions(this: EspressoDriver, actions: StringRecord[]): Promise<void>;
7
10
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,kFAHW,OAAO,eAAe,EAAE,YAAY,EAAE,GACpC,OAAO,CAAC,IAAI,CAAC,CAWzB"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CASf"}
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.performActions = performActions;
4
4
  /**
5
- * @this {import('../driver').EspressoDriver}
6
- * @param {import('@appium/types').StringRecord[]} actions
7
- * @returns {Promise<void>}
5
+ * Performs a sequence of W3C actions (e.g., pointer, key, wheel actions).
6
+ * Automatically converts pointer actions to touch type for mobile compatibility.
7
+ * @param actions - Array of action objects following the W3C Actions protocol
8
+ * @returns Promise that resolves when all actions are performed
8
9
  */
9
10
  async function performActions(actions) {
10
11
  this.log.debug(`Received the following W3C actions: ${JSON.stringify(actions, null, ' ')}`);
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";;AAKA,wCASC;AAdD;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAAC,OAAO;IAC1C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uCAAuC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7F,6EAA6E;IAC7E,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACnD,GAAG,MAAM;QACT,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAC,UAAU,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3E,CAAC,CAAC,CAAC;IACJ,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3F,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,EAAC,OAAO,EAAE,mBAAmB,EAAC,CAAC,CAAC;AAC1F,CAAC"}
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.ts"],"names":[],"mappings":";;AASA,wCAYC;AAlBD;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAElC,OAAuB;IAEvB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uCAAuC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7F,6EAA6E;IAC7E,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACnD,GAAG,MAAM;QACT,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAC,UAAU,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3E,CAAC,CAAC,CAAC;IACJ,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3F,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,EAAC,OAAO,EAAE,mBAAmB,EAAC,CAAC,CAAC;AAC1F,CAAC"}
@@ -1,22 +1,24 @@
1
+ import type { EspressoDriver } from '../driver';
1
2
  /**
2
3
  * Starts the given activity with intent options, activity options and locale.
3
4
  * Activity could only be executed in scope of the current app package.
4
5
  *
5
- * @this {import('../driver').EspressoDriver}
6
- * @param {string} appActivity
7
- * @param {string} [locale]
8
- * @param {string} [optionalIntentArguments]
9
- * @param {string} [optionalActivityArguments]
10
- * @returns {Promise<string>}
6
+ * @param appActivity - The activity name to start
7
+ * @param locale - Optional locale string (e.g., 'en_US', 'fr_FR')
8
+ * @param optionalIntentArguments - Optional intent arguments as a string
9
+ * @param optionalActivityArguments - Optional activity arguments as a string
10
+ * @returns Promise that resolves to a string when the activity is started
11
11
  */
12
- export function mobileStartActivity(this: import("../driver").EspressoDriver, appActivity: string, locale?: string, optionalIntentArguments?: string, optionalActivityArguments?: string): Promise<string>;
12
+ export declare function mobileStartActivity(this: EspressoDriver, appActivity: string, locale?: string, optionalIntentArguments?: string, optionalActivityArguments?: string): Promise<string>;
13
13
  /**
14
+ * Starts an activity with the given package and activity names.
15
+ * Waits for the activity to be ready before returning.
14
16
  *
15
- * @this {import('../driver').EspressoDriver}
16
- * @param {string} appPackage
17
- * @param {string} appActivity
18
- * @param {string} appWaitPackage
19
- * @param {string} appWaitActivity
17
+ * @param appPackage - The package name of the app to start
18
+ * @param appActivity - The activity name to start
19
+ * @param appWaitPackage - Optional package name to wait for (defaults to appPackage)
20
+ * @param appWaitActivity - Optional activity name to wait for (defaults to appActivity)
21
+ * @returns Promise that resolves when the activity is started and ready
20
22
  */
21
- export function startActivity(this: import("../driver").EspressoDriver, appPackage: string, appActivity: string, appWaitPackage: string, appWaitActivity: string): Promise<void>;
23
+ export declare function startActivity(this: EspressoDriver, appPackage?: string, appActivity?: string, appWaitPackage?: string, appWaitActivity?: string): Promise<void>;
22
24
  //# sourceMappingURL=app-management.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,2FANW,MAAM,WACN,MAAM,4BACN,MAAM,8BACN,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAgB3B;AAED;;;;;;;GAOG;AACH,oFALW,MAAM,eACN,MAAM,kBACN,MAAM,mBACN,MAAM,iBAiBhB"}
1
+ {"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,EACpB,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,EACf,uBAAuB,CAAC,EAAE,MAAM,EAChC,yBAAyB,CAAC,EAAE,MAAM,GACjC,OAAO,CAAC,MAAM,CAAC,CASjB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,cAAc,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,EACvB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
@@ -2,21 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mobileStartActivity = mobileStartActivity;
4
4
  exports.startActivity = startActivity;
5
+ const driver_1 = require("appium/driver");
5
6
  const utils_1 = require("../utils");
6
7
  /**
7
8
  * Starts the given activity with intent options, activity options and locale.
8
9
  * Activity could only be executed in scope of the current app package.
9
10
  *
10
- * @this {import('../driver').EspressoDriver}
11
- * @param {string} appActivity
12
- * @param {string} [locale]
13
- * @param {string} [optionalIntentArguments]
14
- * @param {string} [optionalActivityArguments]
15
- * @returns {Promise<string>}
11
+ * @param appActivity - The activity name to start
12
+ * @param locale - Optional locale string (e.g., 'en_US', 'fr_FR')
13
+ * @param optionalIntentArguments - Optional intent arguments as a string
14
+ * @param optionalActivityArguments - Optional activity arguments as a string
15
+ * @returns Promise that resolves to a string when the activity is started
16
16
  */
17
17
  async function mobileStartActivity(appActivity, locale, optionalIntentArguments, optionalActivityArguments) {
18
18
  const appPackage = this.caps.appPackage;
19
- return /** @type {string} */ (await this.espresso.jwproxy.command(`/appium/device/start_activity`, 'POST', {
19
+ return (await this.espresso.jwproxy.command(`/appium/device/start_activity`, 'POST', {
20
20
  appPackage,
21
21
  appActivity,
22
22
  locale,
@@ -25,18 +25,26 @@ async function mobileStartActivity(appActivity, locale, optionalIntentArguments,
25
25
  }));
26
26
  }
27
27
  /**
28
+ * Starts an activity with the given package and activity names.
29
+ * Waits for the activity to be ready before returning.
28
30
  *
29
- * @this {import('../driver').EspressoDriver}
30
- * @param {string} appPackage
31
- * @param {string} appActivity
32
- * @param {string} appWaitPackage
33
- * @param {string} appWaitActivity
31
+ * @param appPackage - The package name of the app to start
32
+ * @param appActivity - The activity name to start
33
+ * @param appWaitPackage - Optional package name to wait for (defaults to appPackage)
34
+ * @param appWaitActivity - Optional activity name to wait for (defaults to appActivity)
35
+ * @returns Promise that resolves when the activity is started and ready
34
36
  */
35
37
  async function startActivity(appPackage, appActivity, appWaitPackage, appWaitActivity) {
36
38
  // intentAction, intentCategory, intentFlags, optionalIntentArguments, dontStopAppOnReset
37
39
  // parameters are not supported by Espresso
38
- const pkg = /** @type {string} */ (appPackage || this.caps.appPackage);
39
- const appWaitPkg = /** @type {string} */ (appWaitPackage || pkg);
40
+ const pkg = appPackage || this.caps.appPackage;
41
+ if (!pkg) {
42
+ throw new driver_1.errors.InvalidArgumentError('appPackage is required');
43
+ }
44
+ const appWaitPkg = appWaitPackage || pkg;
45
+ if (!appActivity) {
46
+ throw new driver_1.errors.InvalidArgumentError('appActivity is required');
47
+ }
40
48
  const appAct = (0, utils_1.qualifyActivityName)(appActivity, pkg);
41
49
  const appWaitAct = (0, utils_1.qualifyActivityName)(appWaitActivity || appAct, appWaitPkg);
42
50
  this.log.debug(`Starting activity '${appActivity}' for package '${appPackage}'`);
@@ -46,5 +54,4 @@ async function startActivity(appPackage, appActivity, appWaitPackage, appWaitAct
46
54
  });
47
55
  await this.adb.waitForActivity(appWaitPkg, appWaitAct);
48
56
  }
49
- ;
50
57
  //# sourceMappingURL=app-management.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;AAaA,kDAcC;AAUD,sCAeC;AApDD,oCAA+C;AAE/C;;;;;;;;;;GAUG;AACI,KAAK,UAAU,mBAAmB,CACvC,WAAW,EACX,MAAM,EACN,uBAAuB,EACvB,yBAAyB;IAEzB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IACxC,OAAO,qBAAqB,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE;QACzG,UAA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AAO,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE;QACnF,UAAU;QACV,WAAW;QACX,MAAM;QACN,uBAAuB;QACvB,yBAAyB;KAC1B,CAAC,CAAW,CAAC;AAChB,CAAC;AAED;;;;;;;;;GASG;AACI,KAAK,UAAU,aAAa,CAEjC,UAAmB,EACnB,WAAoB,EACpB,cAAuB,EACvB,eAAwB;IAExB,yFAAyF;IACzF,2CAA2C;IAC3C,MAAM,GAAG,GAAG,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IAC/C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;IAClE,CAAC;IACD,MAAM,UAAU,GAAG,cAAc,IAAI,GAAG,CAAC;IACzC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,2BAAmB,EAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,IAAA,2BAAmB,EAAC,eAAe,IAAI,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9E,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,sBAAsB,WAAW,kBAAkB,UAAU,GAAG,CAAC,CAAC;IACjF,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE;QAC3E,UAAU,EAAE,GAAG;QACf,WAAW,EAAE,MAAM;KACpB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AACzD,CAAC"}
@@ -1,18 +1,16 @@
1
+ import type { EspressoDriver } from '../driver';
1
2
  /**
2
- * @this {EspressoDriver}
3
- * @returns {Promise<string>} Base64-encoded content of the clipboard
3
+ * Gets the clipboard content from the device.
4
+ * @returns Promise that resolves to base64-encoded content of the clipboard
4
5
  * or an empty string if the clipboard is empty.
5
6
  */
6
- export function getClipboard(this: import("../driver").EspressoDriver): Promise<string>;
7
+ export declare function getClipboard(this: EspressoDriver): Promise<string>;
7
8
  /**
8
- * @this {EspressoDriver}
9
- * @param {string} content Base64-encoded clipboard payload
10
- * @param {'plaintext'} [contentType] Only a single
11
- * content type is supported, which is 'plaintext'
12
- * @param {string} [label] Optional label to identify the current
13
- * clipboard payload
14
- * @returns {Promise<void>}
9
+ * Sets the clipboard content on the device.
10
+ * @param content - Base64-encoded clipboard payload
11
+ * @param contentType - Only a single content type is supported, which is 'plaintext'
12
+ * @param label - Optional label to identify the current clipboard payload
13
+ * @returns Promise that resolves when the clipboard is set
15
14
  */
16
- export function mobileSetClipboard(this: import("../driver").EspressoDriver, content: string, contentType?: "plaintext", label?: string): Promise<void>;
17
- export type EspressoDriver = import("../driver").EspressoDriver;
15
+ export declare function mobileSetClipboard(this: EspressoDriver, content: string, contentType?: 'plaintext', label?: string): Promise<void>;
18
16
  //# sourceMappingURL=clipboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wEAHa,OAAO,CAAC,MAAM,CAAC,CAO3B;AAED;;;;;;;;GAQG;AACH,sFAPW,MAAM,gBACN,WAAW,UAEX,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAQzB;6BAGY,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD;;;;GAIG;AACH,wBAAsB,YAAY,CAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAIzE;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,WAAW,EACzB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAMf"}
@@ -3,28 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getClipboard = getClipboard;
4
4
  exports.mobileSetClipboard = mobileSetClipboard;
5
5
  /**
6
- * @this {EspressoDriver}
7
- * @returns {Promise<string>} Base64-encoded content of the clipboard
6
+ * Gets the clipboard content from the device.
7
+ * @returns Promise that resolves to base64-encoded content of the clipboard
8
8
  * or an empty string if the clipboard is empty.
9
9
  */
10
10
  async function getClipboard() {
11
- return /** @type {string} */ ((await this.adb.getApiLevel() < 29)
11
+ return await this.adb.getApiLevel() < 29
12
12
  ? (await this.espresso.jwproxy.command('/appium/device/get_clipboard', 'POST', {}))
13
- : (await this.settingsApp.getClipboard()));
13
+ : await this.settingsApp.getClipboard();
14
14
  }
15
15
  /**
16
- * @this {EspressoDriver}
17
- * @param {string} content Base64-encoded clipboard payload
18
- * @param {'plaintext'} [contentType] Only a single
19
- * content type is supported, which is 'plaintext'
20
- * @param {string} [label] Optional label to identify the current
21
- * clipboard payload
22
- * @returns {Promise<void>}
16
+ * Sets the clipboard content on the device.
17
+ * @param content - Base64-encoded clipboard payload
18
+ * @param contentType - Only a single content type is supported, which is 'plaintext'
19
+ * @param label - Optional label to identify the current clipboard payload
20
+ * @returns Promise that resolves when the clipboard is set
23
21
  */
24
22
  async function mobileSetClipboard(content, contentType, label) {
25
23
  await this.espresso.jwproxy.command('/appium/device/set_clipboard', 'POST', { content, contentType, label });
26
24
  }
27
- /**
28
- * @typedef {import('../driver').EspressoDriver} EspressoDriver
29
- */
30
25
  //# sourceMappingURL=clipboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;AAKA,o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W,EAAE,KAAK,EAAC,CAC9B,CAAC;AACJ,CAAC"}
@@ -1,16 +1,11 @@
1
+ import type { EspressoDriver } from '../driver';
2
+ import type { StringRecord } from '@appium/types';
1
3
  /**
2
4
  * Stop proxying to any Chromedriver and redirect to Espresso
3
5
  *
4
- * @this {import('../driver').EspressoDriver}
5
- * @returns {void}
6
+ * @returns void
6
7
  */
7
- export function suspendChromedriverProxy(this: import("../driver").EspressoDriver): void;
8
- export class suspendChromedriverProxy {
9
- chromedriver: any;
10
- proxyReqRes: any;
11
- proxyCommand: any;
12
- jwpProxyActive: boolean;
13
- }
8
+ export declare function suspendChromedriverProxy(this: EspressoDriver): void;
14
9
  /**
15
10
  * Runs a chain of Espresso web atoms (see https://developer.android.com/training/testing/espresso/web for reference)
16
11
  *
@@ -24,11 +19,11 @@ export class suspendChromedriverProxy {
24
19
  * ...
25
20
  * ]
26
21
  * }
27
- * @this {import('../driver').EspressoDriver}
28
22
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-webatoms
29
- * @param {string} webviewEl
30
- * @param {boolean} forceJavascriptEnabled
31
- * @param {import('@appium/types').StringRecord[]} methodChain
23
+ * @param webviewEl - Optional webview element ID to operate on
24
+ * @param forceJavascriptEnabled - If webview disables javascript, webatoms won't work, this forces it
25
+ * @param methodChain - Array of method chain objects, each containing a name and atom with name and args
26
+ * @returns Promise that resolves to the result of executing the web atoms
32
27
  */
33
- export function mobileWebAtoms(this: import("../driver").EspressoDriver, webviewEl: string, forceJavascriptEnabled: boolean, methodChain: import("@appium/types").StringRecord[]): Promise<any>;
28
+ export declare function mobileWebAtoms(this: EspressoDriver, webviewEl?: string, forceJavascriptEnabled?: boolean, methodChain?: StringRecord[]): Promise<any>;
34
29
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/commands/context.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oFAFa,IAAI,CAOhB;;IAJC,kBAA6B;IAC7B,iBAAgE;IAChE,kBAAkE;IAClE,wBAA0B;;AAG5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,oFAJW,MAAM,0BACN,OAAO,eACP,OAAO,eAAe,EAAE,YAAY,EAAE,gBAYhD"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAKpE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,cAAc,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,sBAAsB,CAAC,EAAE,OAAO,EAChC,WAAW,CAAC,EAAE,YAAY,EAAE,GAC3B,OAAO,CAAC,GAAG,CAAC,CAMd"}
@@ -5,8 +5,7 @@ exports.mobileWebAtoms = mobileWebAtoms;
5
5
  /**
6
6
  * Stop proxying to any Chromedriver and redirect to Espresso
7
7
  *
8
- * @this {import('../driver').EspressoDriver}
9
- * @returns {void}
8
+ * @returns void
10
9
  */
11
10
  function suspendChromedriverProxy() {
12
11
  this.chromedriver = undefined;
@@ -27,11 +26,11 @@ function suspendChromedriverProxy() {
27
26
  * ...
28
27
  * ]
29
28
  * }
30
- * @this {import('../driver').EspressoDriver}
31
29
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-webatoms
32
- * @param {string} webviewEl
33
- * @param {boolean} forceJavascriptEnabled
34
- * @param {import('@appium/types').StringRecord[]} methodChain
30
+ * @param webviewEl - Optional webview element ID to operate on
31
+ * @param forceJavascriptEnabled - If webview disables javascript, webatoms won't work, this forces it
32
+ * @param methodChain - Array of method chain objects, each containing a name and atom with name and args
33
+ * @returns Promise that resolves to the result of executing the web atoms
35
34
  */
36
35
  async function mobileWebAtoms(webviewEl, forceJavascriptEnabled, methodChain) {
37
36
  return await this.espresso.jwproxy.command(`/appium/execute_mobile/web_atoms`, 'POST', {
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.js"],"names":[],"mappings":";;AAMA,4DAKC;AAqBD,wCAUC;AA1CD;;;;;GAKG;AACH,SAAgB,wBAAwB;IACtC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,UAAU,cAAc,CAClC,SAAS,EACT,sBAAsB,EACtB,WAAW;IAEX,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,kCAAkC,EAAE,MAAM,EAAE;QACrF,SAAS;QACT,sBAAsB;QACtB,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.ts"],"names":[],"mappings":";;AAQA,4DAKC;AAqBD,wCAWC;AA1CD;;;;GAIG;AACH,SAAgB,wBAAwB;IACtC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,UAAU,cAAc,CAElC,SAAkB,EAClB,sBAAgC,EAChC,WAA4B;IAE5B,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,kCAAkC,EAAE,MAAM,EAAE;QACrF,SAAS;QACT,sBAAsB;QACtB,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
@@ -1,94 +1,105 @@
1
+ import type { EspressoDriver } from '../driver';
1
2
  /**
2
3
  * Flash the element with given id.
3
4
  * durationMillis and repeatCount are optional
4
- * @this {import('../driver').EspressoDriver}
5
5
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-flashelement
6
- * @param {string} elementId
7
- * @param {number} durationMillis
8
- * @param {number} repeatCount
6
+ * @param elementId - The ID of the element to flash
7
+ * @param durationMillis - Optional duration in milliseconds for each flash
8
+ * @param repeatCount - Optional number of times to repeat the flash
9
+ * @returns Promise that resolves when the flash command is executed
9
10
  */
10
- export function mobileFlashElement(this: import("../driver").EspressoDriver, elementId: string, durationMillis: number, repeatCount: number): Promise<any>;
11
+ export declare function mobileFlashElement(this: EspressoDriver, elementId: string, durationMillis?: number, repeatCount?: number): Promise<any>;
11
12
  /**
12
- * @this {import('../driver').EspressoDriver}
13
+ * Dismisses the autofill UI for the given element.
13
14
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-dismissautofill
14
- * @param {string} elementId
15
+ * @param elementId - The ID of the element for which to dismiss autofill
16
+ * @returns Promise that resolves when the autofill is dismissed
15
17
  */
16
- export function mobileDismissAutofill(this: import("../driver").EspressoDriver, elementId: string): Promise<void>;
18
+ export declare function mobileDismissAutofill(this: EspressoDriver, elementId: string): Promise<void>;
17
19
  /**
18
- * @this {import('../driver').EspressoDriver}
20
+ * Performs a swipe gesture on the given element.
19
21
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-swipe
20
- * @param {string} elementId
21
- * @param {string} [direction]
22
- * @param {string} [swiper]
23
- * @param {string} [startCoordinates]
24
- * @param {string} [endCoordinates]
25
- * @param {string} [precisionDescriber]
22
+ * @param elementId - The ID of the element to swipe
23
+ * @param direction - Optional swipe direction (e.g., 'up', 'down', 'left', 'right')
24
+ * @param swiper - Optional swiper configuration
25
+ * @param startCoordinates - Optional starting coordinates for the swipe
26
+ * @param endCoordinates - Optional ending coordinates for the swipe
27
+ * @param precisionDescriber - Optional precision describer for the swipe action
28
+ * @returns Promise that resolves when the swipe is completed
26
29
  */
27
- export function mobileSwipe(this: import("../driver").EspressoDriver, elementId: string, direction?: string, swiper?: string, startCoordinates?: string, endCoordinates?: string, precisionDescriber?: string): Promise<any>;
30
+ export declare function mobileSwipe(this: EspressoDriver, elementId: string, direction?: string, swiper?: string, startCoordinates?: string, endCoordinates?: string, precisionDescriber?: string): Promise<any>;
28
31
  /**
29
- * @this {import('../driver').EspressoDriver}
32
+ * Opens a drawer element (e.g., Navigation Drawer) with the specified gravity.
30
33
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-opendrawer
31
- * @param {string} elementId
32
- * @param {number} [gravity]
34
+ * @param elementId - The ID of the drawer element to open
35
+ * @param gravity - Optional gravity value for drawer positioning (e.g., Gravity.START, Gravity.END)
36
+ * @returns Promise that resolves when the drawer is opened
33
37
  */
34
- export function mobileOpenDrawer(this: import("../driver").EspressoDriver, elementId: string, gravity?: number): Promise<any>;
38
+ export declare function mobileOpenDrawer(this: EspressoDriver, elementId: string, gravity?: number): Promise<any>;
35
39
  /**
36
- * @this {import('../driver').EspressoDriver}
40
+ * Closes a drawer element (e.g., Navigation Drawer) with the specified gravity.
37
41
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-closedrawer
38
- * @param {string} elementId
39
- * @param {number} [gravity]
42
+ * @param elementId - The ID of the drawer element to close
43
+ * @param gravity - Optional gravity value for drawer positioning (e.g., Gravity.START, Gravity.END)
44
+ * @returns Promise that resolves when the drawer is closed
40
45
  */
41
- export function mobileCloseDrawer(this: import("../driver").EspressoDriver, elementId: string, gravity?: number): Promise<any>;
46
+ export declare function mobileCloseDrawer(this: EspressoDriver, elementId: string, gravity?: number): Promise<any>;
42
47
  /**
43
- * @this {import('../driver').EspressoDriver}
48
+ * Sets the date on a date picker element.
44
49
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-setdate
45
- * @param {string} elementId
46
- * @param {number} year
47
- * @param {number} monthOfYear
48
- * @param {number} dayOfMonth
50
+ * @param elementId - The ID of the date picker element
51
+ * @param year - The year to set (e.g., 2024)
52
+ * @param monthOfYear - The month to set (0-11, where 0 is January)
53
+ * @param dayOfMonth - The day of the month to set (1-31)
54
+ * @returns Promise that resolves when the date is set
49
55
  */
50
- export function mobileSetDate(this: import("../driver").EspressoDriver, elementId: string, year: number, monthOfYear: number, dayOfMonth: number): Promise<any>;
56
+ export declare function mobileSetDate(this: EspressoDriver, elementId: string, year: number, monthOfYear: number, dayOfMonth: number): Promise<any>;
51
57
  /**
52
- * @this {import('../driver').EspressoDriver}
58
+ * Sets the time on a time picker element.
53
59
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-settime
54
- * @param {string} elementId
55
- * @param {number} hours
56
- * @param {number} minutes
60
+ * @param elementId - The ID of the time picker element
61
+ * @param hours - The hour to set (0-23)
62
+ * @param minutes - The minute to set (0-59)
63
+ * @returns Promise that resolves when the time is set
57
64
  */
58
- export function mobileSetTime(this: import("../driver").EspressoDriver, elementId: string, hours: number, minutes: number): Promise<any>;
65
+ export declare function mobileSetTime(this: EspressoDriver, elementId: string, hours: number, minutes: number): Promise<any>;
59
66
  /**
60
- * @this {import('../driver').EspressoDriver}
67
+ * Navigates to a menu item in a navigation element (e.g., BottomNavigationView).
61
68
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-navigateto
62
- * @param {string} elementId
63
- * @param {number | string} menuItemId
69
+ * @param elementId - The ID of the navigation element
70
+ * @param menuItemId - The ID of the menu item to navigate to (must be a non-negative number)
71
+ * @returns Promise that resolves when navigation is completed
72
+ * @throws {errors.InvalidArgumentError} If menuItemId is not a non-negative number
64
73
  */
65
- export function mobileNavigateTo(this: import("../driver").EspressoDriver, elementId: string, menuItemId: number | string): Promise<any>;
74
+ export declare function mobileNavigateTo(this: EspressoDriver, elementId: string, menuItemId: number | string): Promise<any>;
66
75
  /**
67
76
  * Perform a 'GeneralClickAction' (https://developer.android.com/reference/androidx/test/espresso/action/GeneralClickAction)
68
77
  *
69
78
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-clickaction
70
- * @this {import('../driver').EspressoDriver}
71
- * @param {string} elementId
72
- * @param {string} [tapper]
73
- * @param {string} [coordinatesProvider]
74
- * @param {string} [precisionDescriber]
75
- * @param {number} [inputDevice]
76
- * @param {number} [buttonState]
79
+ * @param elementId - The ID of the element to perform the click action on
80
+ * @param tapper - Optional tapper configuration for the click action
81
+ * @param coordinatesProvider - Optional coordinates provider for the click position
82
+ * @param precisionDescriber - Optional precision describer for the click action
83
+ * @param inputDevice - Optional input device identifier
84
+ * @param buttonState - Optional button state for the click action
85
+ * @returns Promise that resolves when the click action is performed
77
86
  */
78
- export function mobileClickAction(this: import("../driver").EspressoDriver, elementId: string, tapper?: string, coordinatesProvider?: string, precisionDescriber?: string, inputDevice?: number, buttonState?: number): Promise<any>;
87
+ export declare function mobileClickAction(this: EspressoDriver, elementId: string, tapper?: string, coordinatesProvider?: string, precisionDescriber?: string, inputDevice?: number, buttonState?: number): Promise<any>;
79
88
  /**
80
- * @this {import('../driver').EspressoDriver}
89
+ * Scrolls to a specific page in a ViewPager or similar scrollable element.
81
90
  * @see https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-scrolltopage
82
- * @param {string} elementId
83
- * @param {string} [scrollTo]
84
- * @param {number} [scrollToPage]
85
- * @param {boolean} [smoothScroll=false]
91
+ * @param elementId - The ID of the scrollable element (e.g., ViewPager)
92
+ * @param scrollTo - Optional direction to scroll: 'first', 'last', 'left', or 'right'
93
+ * @param scrollToPage - Optional page index to scroll to (must be non-negative)
94
+ * @param smoothScroll - Optional flag to enable smooth scrolling (default: false)
95
+ * @returns Promise that resolves when scrolling is completed
96
+ * @throws {errors.InvalidArgumentError} If scrollTo is not one of the valid values or scrollToPage is negative
86
97
  */
87
- export function mobileScrollToPage(this: import("../driver").EspressoDriver, elementId: string, scrollTo?: string, scrollToPage?: number, smoothScroll?: boolean): Promise<any>;
98
+ export declare function mobileScrollToPage(this: EspressoDriver, elementId: string, scrollTo?: string, scrollToPage?: number, smoothScroll?: boolean): Promise<any>;
88
99
  /**
89
- * @this {import('../driver').EspressoDriver}
90
- * @param {string|number} action
91
- * @returns {Promise<void>}
100
+ * Performs an editor action (e.g., IME action like DONE, SEARCH, NEXT) on the current input field.
101
+ * @param action - The editor action to perform (can be a string or numeric action code)
102
+ * @returns Promise that resolves when the editor action is performed
92
103
  */
93
- export function mobilePerformEditorAction(this: import("../driver").EspressoDriver, action: string | number): Promise<void>;
104
+ export declare function mobilePerformEditorAction(this: EspressoDriver, action: string | number): Promise<void>;
94
105
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wFAJW,MAAM,kBACN,MAAM,eACN,MAAM,gBAchB;AAED;;;;GAIG;AACH,2FAFW,MAAM,iBAQhB;AAED;;;;;;;;;GASG;AACH,iFAPW,MAAM,cACN,MAAM,WACN,MAAM,qBACN,MAAM,mBACN,MAAM,uBACN,MAAM,gBAsBhB;AAGD;;;;;GAKG;AACH,sFAHW,MAAM,YACN,MAAM,gBAQhB;AAED;;;;;GAKG;AACH,uFAHW,MAAM,YACN,MAAM,gBAQhB;AAED;;;;;;;GAOG;AACH,mFALW,MAAM,QACN,MAAM,eACN,MAAM,cACN,MAAM,gBAgBhB;AAED;;;;;;GAMG;AACH,mFAJW,MAAM,SACN,MAAM,WACN,MAAM,gBAchB;AAED;;;;;GAKG;AACH,sFAHW,MAAM,cACN,MAAM,GAAG,MAAM,gBAczB;AAED;;;;;;;;;;;GAWG;AACH,uFAPW,MAAM,WACN,MAAM,wBACN,MAAM,uBACN,MAAM,gBACN,MAAM,gBACN,MAAM,gBAgBhB;AAED;;;;;;;GAOG;AACH,wFALW,MAAM,aACN,MAAM,iBACN,MAAM,iBACN,OAAO,gBA+BjB;AAED;;;;GAIG;AACH,4FAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAIzB"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,EACvB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,GAAG,CAAC,CAQd;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMnG;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,gBAAgB,CAAC,EAAE,MAAM,EACzB,cAAc,CAAC,EAAE,MAAM,EACvB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,GAAG,CAAC,CAad;AAGD;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAE,IAAI,EAAE,cAAc,EAAE,SAAS,E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