@o3r/testing 13.0.0-next.1 → 13.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/package.json +10 -27
  2. package/tools/index.d.ts +0 -1
  3. package/tools/index.d.ts.map +1 -1
  4. package/tools/index.js +0 -1
  5. package/tools/index.js.map +1 -1
  6. package/tools/path-replacement/path-replacement.d.ts +2 -2
  7. package/tools/path-replacement/path-replacement.d.ts.map +1 -1
  8. package/tools/path-replacement/path-replacement.js +2 -1
  9. package/tools/path-replacement/path-replacement.js.map +1 -1
  10. package/core/protractor/angular-materials/autocomplete-material.d.ts +0 -13
  11. package/core/protractor/angular-materials/autocomplete-material.d.ts.map +0 -1
  12. package/core/protractor/angular-materials/autocomplete-material.js +0 -37
  13. package/core/protractor/angular-materials/autocomplete-material.js.map +0 -1
  14. package/core/protractor/angular-materials/index.d.ts +0 -3
  15. package/core/protractor/angular-materials/index.d.ts.map +0 -1
  16. package/core/protractor/angular-materials/index.js +0 -6
  17. package/core/protractor/angular-materials/index.js.map +0 -1
  18. package/core/protractor/angular-materials/select-material.d.ts +0 -19
  19. package/core/protractor/angular-materials/select-material.d.ts.map +0 -1
  20. package/core/protractor/angular-materials/select-material.js +0 -113
  21. package/core/protractor/angular-materials/select-material.js.map +0 -1
  22. package/core/protractor/component-fixture.d.ts +0 -126
  23. package/core/protractor/component-fixture.d.ts.map +0 -1
  24. package/core/protractor/component-fixture.js +0 -274
  25. package/core/protractor/component-fixture.js.map +0 -1
  26. package/core/protractor/element.d.ts +0 -38
  27. package/core/protractor/element.d.ts.map +0 -1
  28. package/core/protractor/element.js +0 -145
  29. package/core/protractor/element.js.map +0 -1
  30. package/core/protractor/elements/checkbox-element.d.ts +0 -17
  31. package/core/protractor/elements/checkbox-element.d.ts.map +0 -1
  32. package/core/protractor/elements/checkbox-element.js +0 -54
  33. package/core/protractor/elements/checkbox-element.js.map +0 -1
  34. package/core/protractor/elements/index.d.ts +0 -4
  35. package/core/protractor/elements/index.d.ts.map +0 -1
  36. package/core/protractor/elements/index.js +0 -7
  37. package/core/protractor/elements/index.js.map +0 -1
  38. package/core/protractor/elements/radio-element.d.ts +0 -17
  39. package/core/protractor/elements/radio-element.d.ts.map +0 -1
  40. package/core/protractor/elements/radio-element.js +0 -56
  41. package/core/protractor/elements/radio-element.js.map +0 -1
  42. package/core/protractor/elements/select-element.d.ts +0 -15
  43. package/core/protractor/elements/select-element.d.ts.map +0 -1
  44. package/core/protractor/elements/select-element.js +0 -49
  45. package/core/protractor/elements/select-element.js.map +0 -1
  46. package/core/protractor/group.d.ts +0 -21
  47. package/core/protractor/group.d.ts.map +0 -1
  48. package/core/protractor/group.js +0 -27
  49. package/core/protractor/group.js.map +0 -1
  50. package/core/protractor/groups/index.d.ts +0 -2
  51. package/core/protractor/groups/index.d.ts.map +0 -1
  52. package/core/protractor/groups/index.js +0 -5
  53. package/core/protractor/groups/index.js.map +0 -1
  54. package/core/protractor/groups/radio-group.d.ts +0 -17
  55. package/core/protractor/groups/radio-group.d.ts.map +0 -1
  56. package/core/protractor/groups/radio-group.js +0 -80
  57. package/core/protractor/groups/radio-group.js.map +0 -1
  58. package/core/protractor/index.d.ts +0 -9
  59. package/core/protractor/index.d.ts.map +0 -1
  60. package/core/protractor/index.js +0 -11
  61. package/core/protractor/index.js.map +0 -1
  62. package/core/protractor/page-fixture.d.ts +0 -13
  63. package/core/protractor/page-fixture.d.ts.map +0 -1
  64. package/core/protractor/page-fixture.js +0 -23
  65. package/core/protractor/page-fixture.js.map +0 -1
  66. package/core/protractor/utils.d.ts +0 -8
  67. package/core/protractor/utils.d.ts.map +0 -1
  68. package/core/protractor/utils.js +0 -12
  69. package/core/protractor/utils.js.map +0 -1
  70. package/tools/protractor/fetch-manager/_fetch-manager.d.ts +0 -1
  71. package/tools/protractor/fetch-manager/_fetch-manager.d.ts.map +0 -1
  72. package/tools/protractor/fetch-manager/_fetch-manager.js +0 -127
  73. package/tools/protractor/fetch-manager/_fetch-manager.js.map +0 -1
  74. package/tools/protractor/fetch-manager/index.d.ts +0 -2
  75. package/tools/protractor/fetch-manager/index.d.ts.map +0 -1
  76. package/tools/protractor/fetch-manager/index.js +0 -5
  77. package/tools/protractor/fetch-manager/index.js.map +0 -1
  78. package/tools/protractor/fetch-manager/utils.d.ts +0 -25
  79. package/tools/protractor/fetch-manager/utils.d.ts.map +0 -1
  80. package/tools/protractor/fetch-manager/utils.js +0 -81
  81. package/tools/protractor/fetch-manager/utils.js.map +0 -1
  82. package/tools/protractor/index.d.ts +0 -3
  83. package/tools/protractor/index.d.ts.map +0 -1
  84. package/tools/protractor/index.js +0 -6
  85. package/tools/protractor/index.js.map +0 -1
  86. package/tools/protractor/post-message-interceptor/_post-message-interceptor.d.ts +0 -5
  87. package/tools/protractor/post-message-interceptor/_post-message-interceptor.d.ts.map +0 -1
  88. package/tools/protractor/post-message-interceptor/_post-message-interceptor.js +0 -157
  89. package/tools/protractor/post-message-interceptor/_post-message-interceptor.js.map +0 -1
  90. package/tools/protractor/post-message-interceptor/core.d.ts +0 -17
  91. package/tools/protractor/post-message-interceptor/core.d.ts.map +0 -1
  92. package/tools/protractor/post-message-interceptor/core.js +0 -3
  93. package/tools/protractor/post-message-interceptor/core.js.map +0 -1
  94. package/tools/protractor/post-message-interceptor/index.d.ts +0 -3
  95. package/tools/protractor/post-message-interceptor/index.d.ts.map +0 -1
  96. package/tools/protractor/post-message-interceptor/index.js +0 -6
  97. package/tools/protractor/post-message-interceptor/index.js.map +0 -1
  98. package/tools/protractor/post-message-interceptor/post-message-interceptor.d.ts +0 -45
  99. package/tools/protractor/post-message-interceptor/post-message-interceptor.d.ts.map +0 -1
  100. package/tools/protractor/post-message-interceptor/post-message-interceptor.js +0 -144
  101. package/tools/protractor/post-message-interceptor/post-message-interceptor.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/testing",
3
- "version": "13.0.0-next.1",
3
+ "version": "13.0.0-next.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -49,14 +49,6 @@
49
49
  "types": "./core/playwright/component-fixture.d.ts",
50
50
  "default": "./core/playwright/component-fixture.js"
51
51
  },
52
- "./core/protractor": {
53
- "types": "./core/protractor/index.d.ts",
54
- "default": "./core/protractor/index.js"
55
- },
56
- "./core/protractor/component-fixture": {
57
- "types": "./core/protractor/component-fixture.d.ts",
58
- "default": "./core/protractor/component-fixture.js"
59
- },
60
52
  "./kassette": {
61
53
  "types": "./kassette/index.d.ts",
62
54
  "default": "./kassette/index.js"
@@ -81,10 +73,6 @@
81
73
  "types": "./tools/path-replacement/index.d.ts",
82
74
  "default": "./tools/path-replacement/index.js"
83
75
  },
84
- "./tools/protractor": {
85
- "types": "./tools/protractor/index.d.ts",
86
- "default": "./tools/protractor/index.js"
87
- },
88
76
  "./visual-test": {
89
77
  "types": "./visual-test/index.d.ts",
90
78
  "default": "./visual-test/index.js"
@@ -112,14 +100,13 @@
112
100
  "@material/slider": "^14.0.0",
113
101
  "@ngrx/store": "^19.0.0",
114
102
  "@ngx-translate/core": "~16.0.4",
115
- "@o3r/core": "^13.0.0-next.1",
116
- "@o3r/localization": "^13.0.0-next.1",
117
- "@o3r/schematics": "^13.0.0-next.1",
103
+ "@o3r/core": "^13.0.0-next.2",
104
+ "@o3r/localization": "^13.0.0-next.2",
105
+ "@o3r/schematics": "^13.0.0-next.2",
118
106
  "@playwright/test": "^1.49.0",
119
107
  "@schematics/angular": "^19.0.0",
120
108
  "pixelmatch": "^6.0.0",
121
109
  "pngjs": "^7.0.0",
122
- "protractor": "^7.0.0",
123
110
  "rxjs": "^7.8.1",
124
111
  "temporal-polyfill": "^0.3.0",
125
112
  "ts-node": "~10.9.2",
@@ -166,9 +153,6 @@
166
153
  "pngjs": {
167
154
  "optional": true
168
155
  },
169
- "protractor": {
170
- "optional": true
171
- },
172
156
  "temporal-polyfill": {
173
157
  "optional": true
174
158
  },
@@ -177,7 +161,7 @@
177
161
  }
178
162
  },
179
163
  "dependencies": {
180
- "@o3r/schematics": "^13.0.0-next.1",
164
+ "@o3r/schematics": "^13.0.0-next.2",
181
165
  "esbuild": "~0.25.1",
182
166
  "module-from-string": "^3.2.0",
183
167
  "tslib": "^2.6.2"
@@ -204,11 +188,11 @@
204
188
  "@ngx-translate/core": "~16.0.4",
205
189
  "@nx/eslint-plugin": "~20.8.0",
206
190
  "@nx/jest": "~20.8.0",
207
- "@o3r/build-helpers": "^13.0.0-next.1",
208
- "@o3r/core": "^13.0.0-next.1",
209
- "@o3r/eslint-plugin": "^13.0.0-next.1",
210
- "@o3r/localization": "^13.0.0-next.1",
211
- "@o3r/test-helpers": "^13.0.0-next.1",
191
+ "@o3r/build-helpers": "^13.0.0-next.2",
192
+ "@o3r/core": "^13.0.0-next.2",
193
+ "@o3r/eslint-plugin": "^13.0.0-next.2",
194
+ "@o3r/localization": "^13.0.0-next.2",
195
+ "@o3r/test-helpers": "^13.0.0-next.2",
212
196
  "@playwright/test": "~1.51.0",
213
197
  "@schematics/angular": "~19.2.0",
214
198
  "@stylistic/eslint-plugin": "~3.1.0",
@@ -242,7 +226,6 @@
242
226
  "pid-from-port": "^1.1.3",
243
227
  "pixelmatch": "^6.0.0",
244
228
  "pngjs": "^7.0.0",
245
- "protractor": "^7.0.0",
246
229
  "rxjs": "^7.8.1",
247
230
  "semver": "^7.5.2",
248
231
  "temporal-polyfill": "^0.3.0",
package/tools/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export * from './path-replacement';
2
- export * from './protractor';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
package/tools/index.js CHANGED
@@ -2,5 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./path-replacement"), exports);
5
- tslib_1.__exportStar(require("./protractor"), exports);
6
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,uDAA6B","sourcesContent":["export * from './path-replacement';\nexport * from './protractor';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC","sourcesContent":["export * from './path-replacement';\n"]}
@@ -2,8 +2,8 @@ import { TransformOptions } from 'esbuild';
2
2
  /**
3
3
  * Switch to the needed implementation of core testing, when running e2e tests
4
4
  * transforms ESM into CJS when needed
5
- * @param frameworkName Name of the framework used for e2e testing (playwright|protractor)
5
+ * @param frameworkName Name of the framework used for e2e testing (playwright)
6
6
  * @param customTransformOptions
7
7
  */
8
- export declare function adjustPath(frameworkName: 'playwright' | 'protractor', customTransformOptions?: TransformOptions): void;
8
+ export declare function adjustPath(frameworkName?: 'playwright', customTransformOptions?: TransformOptions): void;
9
9
  //# sourceMappingURL=path-replacement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"path-replacement.d.ts","sourceRoot":"","sources":["../../../src/tools/path-replacement/path-replacement.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAIjB;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,YAAY,GAAG,YAAY,EAAE,sBAAsB,GAAE,gBAAqB,QAiDnH"}
1
+ {"version":3,"file":"path-replacement.d.ts","sourceRoot":"","sources":["../../../src/tools/path-replacement/path-replacement.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAIjB;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,aAAa,GAAE,YAA2B,EAAE,sBAAsB,GAAE,gBAAqB,QAiDnH"}
@@ -10,10 +10,11 @@ var module_from_string_1 = require("module-from-string");
10
10
  /**
11
11
  * Switch to the needed implementation of core testing, when running e2e tests
12
12
  * transforms ESM into CJS when needed
13
- * @param frameworkName Name of the framework used for e2e testing (playwright|protractor)
13
+ * @param frameworkName Name of the framework used for e2e testing (playwright)
14
14
  * @param customTransformOptions
15
15
  */
16
16
  function adjustPath(frameworkName, customTransformOptions) {
17
+ if (frameworkName === void 0) { frameworkName = 'playwright'; }
17
18
  if (customTransformOptions === void 0) { customTransformOptions = {}; }
18
19
  var modulesCache = {};
19
20
  // eslint-disable-next-line @typescript-eslint/unbound-method -- No need to bind the method, we are using `apply`
@@ -1 +1 @@
1
- {"version":3,"file":"path-replacement.js","sourceRoot":"","sources":["../../../src/tools/path-replacement/path-replacement.ts"],"names":[],"mappings":";;AAkBA,gCAiDC;;AAnED,4BAA8B;AAC9B,2CAEqB;AACrB,gCAAkC;AAClC,mCAGiB;AACjB,yDAE4B;AAC5B;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,aAA0C,EAAE,sBAA6C;IAA7C,uCAAA,EAAA,2BAA6C;IAClH,IAAM,YAAY,GAAwB,EAAE,CAAC;IAC7C,iHAAiH;IACjH,IAAM,eAAe,GAAG,oBAAM,CAAC,SAAS,CAAC,OAAO,CAAC;IACjD,IAAM,KAAK,GAAG,IAAI,MAAM,CAAC,+BAAwB,aAAa,UAAO,CAAC,CAAC;IACvE,oBAAM,CAAC,SAAS,CAAC,OAAO,GAAG,UAA+B,EAAU;QAClE,IAAM,KAAK,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,4BAAqB,aAAa,OAAI,CAAC,CAAC;QAExE,IAAI,CAAC;YACH,OAAO,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAA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AC;AACtB,CAAC","sourcesContent":["import * as fs from 'node:fs';\nimport {\n Module,\n} from 'node:module';\nimport * as path from 'node:path';\nimport {\n TransformOptions,\n transformSync,\n} from 'esbuild';\nimport {\n requireFromString,\n} from 'module-from-string';\n/**\n * Switch to the needed implementation of core testing, when running e2e tests\n * transforms ESM into CJS when needed\n * @param frameworkName Name of the framework used for e2e testing (playwright|protractor)\n * @param customTransformOptions\n */\nexport function adjustPath(frameworkName: 'playwright' | 'protractor', customTransformOptions: TransformOptions = {}) {\n const modulesCache: Record<string, any> = {};\n // eslint-disable-next-line @typescript-eslint/unbound-method -- No need to bind the method, we are using `apply`\n const originalRequire = Module.prototype.require;\n const regex = new RegExp(`@o3r/testing/core(?!/${frameworkName})(.*)`);\n Module.prototype.require = function (this: NodeJS.Module, id: string) {\n const newId = id.replace(regex, `@o3r/testing/core/${frameworkName}$1`);\n\n try {\n return Reflect.apply(originalRequire, this, [newId]);\n } catch {\n const paths = ([] as string[])\n .concat(this.paths, this.paths.map((i) => i.replace(/[/\\\\]node_modules$/, '')));\n\n const filePath = require.resolve(newId, { paths });\n if (!modulesCache[filePath]) {\n const fileContent = fs.readFileSync(filePath);\n const cwd = path.resolve(process.cwd(), 'src');\n // we use ESBUILD to transform it into CJS\n const trans = transformSync(fileContent.toString(), {\n loader: 'js',\n format: 'cjs',\n target: 'es2016',\n sourcesContent: true,\n sourceRoot: cwd,\n ...customTransformOptions\n });\n\n /**\n * requireFromString will execute the file apart from just returning a module\n * It can throw an exception which will prevent stop the execution\n *\n * That main blocker includes IVY-compatible libraries which have\n * no compiler facade in a global scope.\n */\n try {\n modulesCache[filePath] = requireFromString(trans.code, {\n dirname: path.dirname(filePath),\n useCurrentGlobal: true\n });\n } catch (ex) {\n // eslint-disable-next-line no-console -- no other logger available\n console.error(ex);\n }\n }\n\n return modulesCache[filePath];\n }\n } as NodeJS.Require;\n}\n"]}
1
+ {"version":3,"file":"path-replacement.js","sourceRoot":"","sources":["../../../src/tools/path-replacement/path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AAK,CAAC,CAAC;gBAC/C,0CAA0C;gBAC1C,IAAM,KAAK,GAAG,IAAA,uBAAa,EAAC,WAAW,CAAC,QAAQ,EAAE,qBAChD,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,QAAQ,EAChB,cAAc,EAAE,IAAI,EACpB,UAAU,EAAE,GAAG,IACZ,sBAAsB,EACzB,CAAC;gBAEH;;;;;;mBAMG;gBACH,IAAI,CAAC;oBACH,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAA,sCAAiB,EAAC,KAAK,CAAC,IAAI,EAAE;wBACrD,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;wBAC/B,gBAAgB,EAAE,IAAI;qBACvB,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,EAAE,EAAE,CAAC;oBACZ,mEAAmE;oBACnE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACpB,CAAC;YACH,CAAC;YAED,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;IACH,CAAmB,CAAC;AACtB,CAAC","sourcesContent":["import * as fs from 'node:fs';\nimport {\n Module,\n} from 'node:module';\nimport * as path from 'node:path';\nimport {\n TransformOptions,\n transformSync,\n} from 'esbuild';\nimport {\n requireFromString,\n} from 'module-from-string';\n/**\n * Switch to the needed implementation of core testing, when running e2e tests\n * transforms ESM into CJS when needed\n * @param frameworkName Name of the framework used for e2e testing (playwright)\n * @param customTransformOptions\n */\nexport function adjustPath(frameworkName: 'playwright' = 'playwright', customTransformOptions: TransformOptions = {}) {\n const modulesCache: Record<string, any> = {};\n // eslint-disable-next-line @typescript-eslint/unbound-method -- No need to bind the method, we are using `apply`\n const originalRequire = Module.prototype.require;\n const regex = new RegExp(`@o3r/testing/core(?!/${frameworkName})(.*)`);\n Module.prototype.require = function (this: NodeJS.Module, id: string) {\n const newId = id.replace(regex, `@o3r/testing/core/${frameworkName}$1`);\n\n try {\n return Reflect.apply(originalRequire, this, [newId]);\n } catch {\n const paths = ([] as string[])\n .concat(this.paths, this.paths.map((i) => i.replace(/[/\\\\]node_modules$/, '')));\n\n const filePath = require.resolve(newId, { paths });\n if (!modulesCache[filePath]) {\n const fileContent = fs.readFileSync(filePath);\n const cwd = path.resolve(process.cwd(), 'src');\n // we use ESBUILD to transform it into CJS\n const trans = transformSync(fileContent.toString(), {\n loader: 'js',\n format: 'cjs',\n target: 'es2016',\n sourcesContent: true,\n sourceRoot: cwd,\n ...customTransformOptions\n });\n\n /**\n * requireFromString will execute the file apart from just returning a module\n * It can throw an exception which will prevent stop the execution\n *\n * That main blocker includes IVY-compatible libraries which have\n * no compiler facade in a global scope.\n */\n try {\n modulesCache[filePath] = requireFromString(trans.code, {\n dirname: path.dirname(filePath),\n useCurrentGlobal: true\n });\n } catch (ex) {\n // eslint-disable-next-line no-console -- no other logger available\n console.error(ex);\n }\n }\n\n return modulesCache[filePath];\n }\n } as NodeJS.Require;\n}\n"]}
@@ -1,13 +0,0 @@
1
- import { ElementFinder } from 'protractor';
2
- import { MatAutocompleteProfile } from '../../angular-materials';
3
- import { O3rElement } from '../element';
4
- /**
5
- * Implementation dedicated to Protractor.
6
- * @deprecated Will be removed in v13, please use Playwright instead
7
- */
8
- export declare class MatAutocomplete extends O3rElement implements MatAutocompleteProfile {
9
- constructor(sourceElement: ElementFinder | O3rElement);
10
- /** @inheritdoc */
11
- selectByValue(value: string, _timeout?: number): Promise<void>;
12
- }
13
- //# sourceMappingURL=autocomplete-material.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autocomplete-material.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/autocomplete-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,UAAW,YAAW,sBAAsB;gBACnE,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAM5D"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MatAutocomplete = void 0;
4
- var tslib_1 = require("tslib");
5
- var protractor_1 = require("protractor");
6
- var element_1 = require("../element");
7
- /**
8
- * Implementation dedicated to Protractor.
9
- * @deprecated Will be removed in v13, please use Playwright instead
10
- */
11
- var MatAutocomplete = /** @class */ (function (_super) {
12
- tslib_1.__extends(MatAutocomplete, _super);
13
- function MatAutocomplete(sourceElement) {
14
- return _super.call(this, sourceElement) || this;
15
- }
16
- /** @inheritdoc */
17
- MatAutocomplete.prototype.selectByValue = function (value, _timeout) {
18
- return tslib_1.__awaiter(this, void 0, void 0, function () {
19
- var matOption;
20
- return tslib_1.__generator(this, function (_a) {
21
- switch (_a.label) {
22
- case 0: return [4 /*yield*/, this.setValue(value)];
23
- case 1:
24
- _a.sent();
25
- return [4 /*yield*/, this.click()];
26
- case 2:
27
- _a.sent();
28
- matOption = (0, protractor_1.element)(protractor_1.By.css('.mat-option, mat-option'));
29
- return [2 /*return*/, new element_1.O3rElement(matOption).click()];
30
- }
31
- });
32
- });
33
- };
34
- return MatAutocomplete;
35
- }(element_1.O3rElement));
36
- exports.MatAutocomplete = MatAutocomplete;
37
- //# sourceMappingURL=autocomplete-material.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autocomplete-material.js","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/autocomplete-material.ts"],"names":[],"mappings":";;;;AAAA,yCAIoB;AAIpB,sCAEoB;AAEpB;;;GAGG;AACH;IAAqC,2CAAU;IAC7C,yBAAY,aAAyC;QACnD,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,uCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAA;;wBAA1B,SAA0B,CAAC;wBAC3B,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBACb,SAAS,GAAG,IAAA,oBAAO,EAAC,eAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,CAAC;wBAC7D,sBAAO,IAAI,oBAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAC;;;;KAC1C;IACH,sBAAC;AAAD,CAAC,AAZD,CAAqC,oBAAU,GAY9C;AAZY,0CAAe","sourcesContent":["import {\n By,\n element,\n ElementFinder,\n} from 'protractor';\nimport {\n MatAutocompleteProfile,\n} from '../../angular-materials';\nimport {\n O3rElement,\n} from '../element';\n\n/**\n * Implementation dedicated to Protractor.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class MatAutocomplete extends O3rElement implements MatAutocompleteProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.setValue(value);\n await this.click();\n const matOption = element(By.css('.mat-option, mat-option'));\n return new O3rElement(matOption).click();\n }\n}\n"]}
@@ -1,3 +0,0 @@
1
- export * from './autocomplete-material';
2
- export * from './select-material';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./autocomplete-material"), exports);
5
- tslib_1.__exportStar(require("./select-material"), exports);
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/index.ts"],"names":[],"mappings":";;;AAAA,kEAAwC;AACxC,4DAAkC","sourcesContent":["export * from './autocomplete-material';\nexport * from './select-material';\n"]}
@@ -1,19 +0,0 @@
1
- import { ElementFinder } from 'protractor';
2
- import { MatSelectProfile } from '../../angular-materials';
3
- import { O3rElement } from '../element';
4
- /**
5
- * Implementation dedicated to Protractor.
6
- * @deprecated Will be removed in v13, please use Playwright instead
7
- */
8
- export declare class MatSelect extends O3rElement implements MatSelectProfile {
9
- constructor(sourceElement: ElementFinder | O3rElement);
10
- /** @inheritdoc */
11
- selectByIndex(index: number, _timeout?: number): Promise<void>;
12
- /** @inheritdoc */
13
- selectByValue(value: string, _timeout?: number): Promise<void>;
14
- /** @inheritdoc */
15
- selectByLabel(label: string, _timeout?: number): Promise<void>;
16
- /** @inheritDoc */
17
- getValue(): Promise<string | undefined>;
18
- }
19
- //# sourceMappingURL=select-material.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select-material.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/select-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,qBAAa,SAAU,SAAQ,UAAW,YAAW,gBAAgB;gBACvD,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAY3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAe3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAe3D,kBAAkB;IACX,QAAQ;CAKhB"}
@@ -1,113 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MatSelect = void 0;
4
- var tslib_1 = require("tslib");
5
- var protractor_1 = require("protractor");
6
- var element_1 = require("../element");
7
- /**
8
- * Implementation dedicated to Protractor.
9
- * @deprecated Will be removed in v13, please use Playwright instead
10
- */
11
- var MatSelect = /** @class */ (function (_super) {
12
- tslib_1.__extends(MatSelect, _super);
13
- function MatSelect(sourceElement) {
14
- return _super.call(this, sourceElement) || this;
15
- }
16
- /** @inheritdoc */
17
- MatSelect.prototype.selectByIndex = function (index, _timeout) {
18
- return tslib_1.__awaiter(this, void 0, void 0, function () {
19
- var options, option;
20
- return tslib_1.__generator(this, function (_a) {
21
- switch (_a.label) {
22
- case 0: return [4 /*yield*/, this.click()];
23
- case 1:
24
- _a.sent();
25
- return [4 /*yield*/, protractor_1.element.all(protractor_1.By.css('mat-option')).asElementFinders_()];
26
- case 2:
27
- options = _a.sent();
28
- if (typeof options[index] === 'undefined') {
29
- return [2 /*return*/, Promise.reject(new Error("Option with index ".concat(index, " not found in select element.")))];
30
- }
31
- else {
32
- option = new element_1.O3rElement(options[index]);
33
- return [2 /*return*/, option.click()];
34
- }
35
- return [2 /*return*/];
36
- }
37
- });
38
- });
39
- };
40
- /** @inheritdoc */
41
- MatSelect.prototype.selectByValue = function (value, _timeout) {
42
- return tslib_1.__awaiter(this, void 0, void 0, function () {
43
- var options, _i, options_1, opt, option;
44
- return tslib_1.__generator(this, function (_a) {
45
- switch (_a.label) {
46
- case 0: return [4 /*yield*/, this.click()];
47
- case 1:
48
- _a.sent();
49
- return [4 /*yield*/, protractor_1.element.all(protractor_1.By.css('mat-option')).asElementFinders_()];
50
- case 2:
51
- options = _a.sent();
52
- _i = 0, options_1 = options;
53
- _a.label = 3;
54
- case 3:
55
- if (!(_i < options_1.length)) return [3 /*break*/, 6];
56
- opt = options_1[_i];
57
- option = new element_1.O3rElement(opt);
58
- return [4 /*yield*/, option.getAttribute('ng-reflect-value')];
59
- case 4:
60
- if ((_a.sent()) === value) {
61
- return [2 /*return*/, option.click()];
62
- }
63
- _a.label = 5;
64
- case 5:
65
- _i++;
66
- return [3 /*break*/, 3];
67
- case 6: return [2 /*return*/, Promise.reject(new Error("Option with value ".concat(value, " not found in select element.")))];
68
- }
69
- });
70
- });
71
- };
72
- /** @inheritdoc */
73
- MatSelect.prototype.selectByLabel = function (label, _timeout) {
74
- return tslib_1.__awaiter(this, void 0, void 0, function () {
75
- var options, _i, options_2, opt, option;
76
- return tslib_1.__generator(this, function (_a) {
77
- switch (_a.label) {
78
- case 0: return [4 /*yield*/, this.click()];
79
- case 1:
80
- _a.sent();
81
- return [4 /*yield*/, protractor_1.element.all(protractor_1.By.css('mat-option')).asElementFinders_()];
82
- case 2:
83
- options = _a.sent();
84
- _i = 0, options_2 = options;
85
- _a.label = 3;
86
- case 3:
87
- if (!(_i < options_2.length)) return [3 /*break*/, 6];
88
- opt = options_2[_i];
89
- option = new element_1.O3rElement(opt);
90
- return [4 /*yield*/, option.getText()];
91
- case 4:
92
- if ((_a.sent()) === label) {
93
- return [2 /*return*/, option.click()];
94
- }
95
- _a.label = 5;
96
- case 5:
97
- _i++;
98
- return [3 /*break*/, 3];
99
- case 6: return [2 /*return*/, Promise.reject(new Error("Option with label ".concat(label, " not found in select element.")))];
100
- }
101
- });
102
- });
103
- };
104
- /** @inheritDoc */
105
- MatSelect.prototype.getValue = function () {
106
- // eslint-disable-next-line no-console -- no other logger available
107
- console.warn('Usage of "getValue" is not recommended on Material Select elements. Use "getPlainText()" instead.');
108
- return _super.prototype.getValue.call(this);
109
- };
110
- return MatSelect;
111
- }(element_1.O3rElement));
112
- exports.MatSelect = MatSelect;
113
- //# sourceMappingURL=select-material.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select-material.js","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/select-material.ts"],"names":[],"mappings":";;;;AAAA,yC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,CAAC;4BAC5D,sBAAO,MAAM,CAAC,KAAK,EAAE,EAAC;wBACxB,CAAC;;;wBAJe,IAAO,CAAA;;4BAOzB,sBAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,4BAAqB,KAAK,kCAA+B,CAAC,CAAC,EAAC;;;;KAC7F;IAED,kBAAkB;IACL,iCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBAEc,qBAAM,oBAAO,CAAC,GAAG,CAAC,eAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,EAAE,EAAA;;wBAAtF,OAAO,GAAoB,SAA2D;8BAEnE,EAAP,mBAAO;;;6BAAP,CAAA,qBAAO,CAAA;wBAAd,GAAG;wBACN,MAAM,GAAG,IAAI,oBAAU,CAAC,GAAG,CAAC,CAAC;wBAC/B,qBAAM,MAAM,CAAC,OAAO,EAAE,EAAA;;wBAA1B,IAAI,CAAA,SAAsB,MAAK,KAAK,EAAE,CAAC;4BACrC,sBAAO,MAAM,CAAC,KAAK,EAAE,EAAC;wBACxB,CAAC;;;wBAJe,IAAO,CAAA;;4BAOzB,sBAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,4BAAqB,KAAK,kCAA+B,CAAC,CAAC,EAAC;;;;KAC7F;IAED,kBAAkB;IACX,4BAAQ,GAAf;QACE,mEAAmE;QACnE,OAAO,CAAC,IAAI,CAAC,mGAAmG,CAAC,CAAC;QAClH,OAAO,gBAAK,CAAC,QAAQ,WAAE,CAAC;IAC1B,CAAC;IACH,gBAAC;AAAD,CAAC,AAxDD,CAA+B,oBAAU,GAwDxC;AAxDY,8BAAS","sourcesContent":["import {\n By,\n element,\n ElementFinder,\n} from 'protractor';\nimport {\n MatSelectProfile,\n} from '../../angular-materials';\nimport {\n O3rElement,\n} from '../element';\n\n/**\n * Implementation dedicated to Protractor.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class MatSelect extends O3rElement implements MatSelectProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByIndex(index: number, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle -- naming convention imposed by Playwright\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n if (typeof options[index] === 'undefined') {\n return Promise.reject(new Error(`Option with index ${index} not found in select element.`));\n } else {\n const option = new O3rElement(options[index]);\n return option.click();\n }\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle -- naming convention imposed by Playwright\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n\n for (const opt of options) {\n const option = new O3rElement(opt);\n if (await option.getAttribute('ng-reflect-value') === value) {\n return option.click();\n }\n }\n\n return Promise.reject(new Error(`Option with value ${value} not found in select element.`));\n }\n\n /** @inheritdoc */\n public async selectByLabel(label: string, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle -- naming convention imposed by Playwright\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n\n for (const opt of options) {\n const option = new O3rElement(opt);\n if (await option.getText() === label) {\n return option.click();\n }\n }\n\n return Promise.reject(new Error(`Option with label ${label} not found in select element.`));\n }\n\n /** @inheritDoc */\n public getValue() {\n // eslint-disable-next-line no-console -- no other logger available\n console.warn('Usage of \"getValue\" is not recommended on Material Select elements. Use \"getPlainText()\" instead.');\n return super.getValue();\n }\n}\n"]}
@@ -1,126 +0,0 @@
1
- import type { ComponentFixtureProfile as ComponentFixtureProfileCore, Constructable as ConstructableCore, FixtureWithCustom as FixtureWithCustomCore } from '../component-fixture';
2
- import { ElementProfile, O3rElement, O3rElementConstructor } from './element';
3
- import { O3rGroup, O3rGroupConstructor } from './group';
4
- /**
5
- * @deprecated Will be removed in v13, please use Playwright instead
6
- */
7
- export interface ComponentFixtureProfile<V extends ElementProfile = ElementProfile> extends ComponentFixtureProfileCore<V> {
8
- }
9
- /**
10
- * @deprecated Will be removed in v13, please use Playwright instead
11
- */
12
- export interface FixtureWithCustom extends FixtureWithCustomCore {
13
- }
14
- /**
15
- * @deprecated Will be removed in v13, please use Playwright instead
16
- */
17
- export interface Constructable<T extends ComponentFixtureProfile, U extends FixtureWithCustom = FixtureWithCustom> extends ConstructableCore<T, U> {
18
- }
19
- /**
20
- * Implementation of the fixture dedicated to protractor, hence using the webdriver to interact with the dom.
21
- * @deprecated Will be removed in v13, please use Playwright instead
22
- */
23
- export declare class O3rComponentFixture<V extends O3rElement = O3rElement> implements ComponentFixtureProfile<V> {
24
- /**
25
- * DOM element linked to the fixture.
26
- */
27
- protected rootElement?: V;
28
- /**
29
- * Root element of this fixture. Optional in a Protractor.
30
- * All further queries will be applied to the element tree if any, otherwise they will be applied to the whole DOM.
31
- * @param rootElement
32
- */
33
- constructor(rootElement?: V);
34
- /**
35
- * Throws an exception if the element is undefined.
36
- * Otherwise returns the element.
37
- * @param elemnt ElementProfile to test
38
- * @param _timeout specific timeout that will throw when reach
39
- */
40
- protected throwOnUndefinedElement<T extends O3rElement>(elemnt?: T, _timeout?: number): Promise<T>;
41
- /**
42
- * Throws an exception if the element is undefined.
43
- * Otherwise returns the element.
44
- * @param elemnt ElementProfile to test
45
- * @param timeout specific timeout that will throw when reach
46
- */
47
- protected throwOnUndefined<T extends O3rElement>(elemnt: Promise<T | undefined>, timeout?: number): Promise<T>;
48
- /**
49
- * Get the element associated to the selector if present
50
- * @param selector Selector to access the element
51
- * @param elementConstructor Constructor that will be used to create the Element, defaults to O3rElement
52
- * @param options Options supported
53
- * @param options.index index Select the element associated to the index
54
- * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present
55
- * @param options.timeout Duration to wait for the element to be present before it throws
56
- */
57
- protected queryWithOptions(selector: string, elementConstructor?: O3rElementConstructor<O3rElement>, options?: {
58
- index?: number;
59
- shouldThrowIfNotPresent?: boolean;
60
- timeout?: number;
61
- }): Promise<O3rElement | undefined>;
62
- /**
63
- * Get text from the element associated to the given selector, or undefined if the element is not found or not visible
64
- * @param selector Selector to access the element
65
- * @param options Options supported
66
- * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement
67
- * @param options.index index Select the element associated to the index
68
- * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present
69
- * @param options.timeout Duration to wait for the element to be present before it throws
70
- */
71
- protected getText<T extends O3rElement>(selector: string, options?: {
72
- elementConstructor?: O3rElementConstructor<T> | undefined;
73
- index?: number;
74
- shouldThrowIfNotPresent?: boolean;
75
- timeout?: number;
76
- }): Promise<string | undefined>;
77
- /**
78
- * Check if the element associated to the given selector is visible
79
- * @param selector Selector to access the element
80
- * @param options Options supported
81
- * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement
82
- * @param options.index index Select the element associated to the index
83
- * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present
84
- * @param options.timeout Duration to wait for the element to be present before it throws
85
- */
86
- protected isVisible<T extends O3rElement>(selector: string, options?: {
87
- elementConstructor?: O3rElementConstructor<T> | undefined;
88
- index?: number;
89
- shouldThrowIfNotPresent?: boolean;
90
- timeout?: number;
91
- }): Promise<boolean>;
92
- /**
93
- * Click on the element associated to the given selector if it exists and is visible
94
- * @param selector Selector to access the element
95
- * @param options Options supported
96
- * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement
97
- * @param options.index index Select the element associated to the index
98
- * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present
99
- * @param options.timeout Duration to wait for the element to be present before it throws
100
- */
101
- protected click<T extends O3rElement>(selector: string, options?: {
102
- elementConstructor?: O3rElementConstructor<T> | undefined;
103
- index?: number;
104
- shouldThrowIfNotPresent?: boolean;
105
- timeout?: number;
106
- }): Promise<void>;
107
- /** @inheritdoc */
108
- query(selector: string, returnType?: undefined): Promise<O3rElement | undefined>;
109
- query<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T>): Promise<T | undefined>;
110
- /** @inheritdoc */
111
- queryNth(selector: string, index: number, returnType?: undefined): Promise<O3rElement | undefined>;
112
- queryNth<T extends O3rElement>(selector: string, index: number, returnType: O3rElementConstructor<T>): Promise<T | undefined>;
113
- /** @inheritdoc */
114
- queryAll(_selector: string, _returnType?: undefined, groupType?: undefined, timeout?: number): Promise<O3rElement[]>;
115
- queryAll<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T>, groupType?: undefined, timeout?: number): Promise<T[]>;
116
- queryAll<T extends O3rElement, K extends O3rGroup<T>>(selector: string, returnType: O3rElementConstructor<T>, groupType: O3rGroupConstructor<K, T>, timeout?: number): Promise<K>;
117
- /** @inheritdoc */
118
- getElement(): V | undefined;
119
- /** @inheritdoc */
120
- getSubComponents(): Promise<{
121
- [componentName: string]: ComponentFixtureProfile[];
122
- }>;
123
- /** @inheritDoc */
124
- queryNotPresent(selector: string, _timeout?: number): Promise<boolean>;
125
- }
126
- //# sourceMappingURL=component-fixture.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-fixture.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/component-fixture.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,uBAAuB,IAAI,2BAA2B,EACtD,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,IAAI,qBAAqB,EAC3C,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,cAAc,EACd,UAAU,EACV,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,QAAQ,EACR,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAKjB;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,2BAA2B,CAAC,CAAC,CAAC;CAAG;AAE7H;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;CAAG;AAEnE;;GAEG;AACH,MAAM,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