@godscene/web 1.7.11
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.
- package/README.md +7 -0
- package/bin/midscene-playground +3 -0
- package/bin/midscene-web +2 -0
- package/dist/es/bin.mjs +14 -0
- package/dist/es/bridge-mode/agent-cli-side.mjs +135 -0
- package/dist/es/bridge-mode/browser.mjs +2 -0
- package/dist/es/bridge-mode/common.mjs +41 -0
- package/dist/es/bridge-mode/index.mjs +4 -0
- package/dist/es/bridge-mode/io-client.mjs +99 -0
- package/dist/es/bridge-mode/io-server.mjs +218 -0
- package/dist/es/bridge-mode/page-browser-side.mjs +119 -0
- package/dist/es/cdp-proxy-constants.mjs +7 -0
- package/dist/es/cdp-proxy-manager.mjs +217 -0
- package/dist/es/cdp-proxy.mjs +151 -0
- package/dist/es/cdp-target-store.mjs +26 -0
- package/dist/es/chrome-extension/agent.mjs +8 -0
- package/dist/es/chrome-extension/cdpInput.mjs +172 -0
- package/dist/es/chrome-extension/cdpInput.mjs.LICENSE.txt +5 -0
- package/dist/es/chrome-extension/dynamic-scripts.mjs +36 -0
- package/dist/es/chrome-extension/index.mjs +5 -0
- package/dist/es/chrome-extension/page.mjs +733 -0
- package/dist/es/cli-options.mjs +97 -0
- package/dist/es/cli.mjs +26 -0
- package/dist/es/common/cache-helper.mjs +26 -0
- package/dist/es/common/viewport.mjs +36 -0
- package/dist/es/index.mjs +8 -0
- package/dist/es/mcp-server.mjs +33 -0
- package/dist/es/mcp-tools-cdp.mjs +164 -0
- package/dist/es/mcp-tools-puppeteer.mjs +246 -0
- package/dist/es/mcp-tools.mjs +81 -0
- package/dist/es/platform.mjs +37 -0
- package/dist/es/playwright/ai-fixture.mjs +364 -0
- package/dist/es/playwright/index.mjs +36 -0
- package/dist/es/playwright/page.mjs +42 -0
- package/dist/es/playwright/reporter/index.mjs +178 -0
- package/dist/es/puppeteer/agent-launcher.mjs +172 -0
- package/dist/es/puppeteer/base-page.mjs +830 -0
- package/dist/es/puppeteer/index.mjs +35 -0
- package/dist/es/puppeteer/page.mjs +7 -0
- package/dist/es/static/index.mjs +3 -0
- package/dist/es/static/static-agent.mjs +10 -0
- package/dist/es/static/static-page.mjs +123 -0
- package/dist/es/utils.mjs +6 -0
- package/dist/es/web-element.mjs +57 -0
- package/dist/es/web-page.mjs +272 -0
- package/dist/lib/bin.js +20 -0
- package/dist/lib/bridge-mode/agent-cli-side.js +172 -0
- package/dist/lib/bridge-mode/browser.js +36 -0
- package/dist/lib/bridge-mode/common.js +105 -0
- package/dist/lib/bridge-mode/index.js +44 -0
- package/dist/lib/bridge-mode/io-client.js +133 -0
- package/dist/lib/bridge-mode/io-server.js +255 -0
- package/dist/lib/bridge-mode/page-browser-side.js +163 -0
- package/dist/lib/cdp-proxy-constants.js +50 -0
- package/dist/lib/cdp-proxy-manager.js +273 -0
- package/dist/lib/cdp-proxy.js +179 -0
- package/dist/lib/cdp-target-store.js +66 -0
- package/dist/lib/chrome-extension/agent.js +42 -0
- package/dist/lib/chrome-extension/cdpInput.js +206 -0
- package/dist/lib/chrome-extension/cdpInput.js.LICENSE.txt +5 -0
- package/dist/lib/chrome-extension/dynamic-scripts.js +86 -0
- package/dist/lib/chrome-extension/index.js +58 -0
- package/dist/lib/chrome-extension/page.js +767 -0
- package/dist/lib/cli-options.js +131 -0
- package/dist/lib/cli.js +54 -0
- package/dist/lib/common/cache-helper.js +66 -0
- package/dist/lib/common/viewport.js +88 -0
- package/dist/lib/index.js +66 -0
- package/dist/lib/mcp-server.js +73 -0
- package/dist/lib/mcp-tools-cdp.js +208 -0
- package/dist/lib/mcp-tools-puppeteer.js +296 -0
- package/dist/lib/mcp-tools.js +115 -0
- package/dist/lib/platform.js +71 -0
- package/dist/lib/playwright/ai-fixture.js +401 -0
- package/dist/lib/playwright/index.js +89 -0
- package/dist/lib/playwright/page.js +76 -0
- package/dist/lib/playwright/reporter/index.js +212 -0
- package/dist/lib/puppeteer/agent-launcher.js +240 -0
- package/dist/lib/puppeteer/base-page.js +876 -0
- package/dist/lib/puppeteer/index.js +85 -0
- package/dist/lib/puppeteer/page.js +41 -0
- package/dist/lib/static/index.js +50 -0
- package/dist/lib/static/static-agent.js +44 -0
- package/dist/lib/static/static-page.js +157 -0
- package/dist/lib/utils.js +38 -0
- package/dist/lib/web-element.js +94 -0
- package/dist/lib/web-page.js +322 -0
- package/dist/types/bin.d.ts +1 -0
- package/dist/types/bridge-mode/agent-cli-side.d.ts +49 -0
- package/dist/types/bridge-mode/browser.d.ts +2 -0
- package/dist/types/bridge-mode/common.d.ts +74 -0
- package/dist/types/bridge-mode/index.d.ts +4 -0
- package/dist/types/bridge-mode/io-client.d.ts +10 -0
- package/dist/types/bridge-mode/io-server.d.ts +27 -0
- package/dist/types/bridge-mode/page-browser-side.d.ts +21 -0
- package/dist/types/cdp-proxy-constants.d.ts +4 -0
- package/dist/types/cdp-proxy-manager.d.ts +53 -0
- package/dist/types/cdp-proxy.d.ts +37 -0
- package/dist/types/cdp-target-store.d.ts +26 -0
- package/dist/types/chrome-extension/agent.d.ts +4 -0
- package/dist/types/chrome-extension/cdpInput.d.ts +52 -0
- package/dist/types/chrome-extension/dynamic-scripts.d.ts +3 -0
- package/dist/types/chrome-extension/index.d.ts +5 -0
- package/dist/types/chrome-extension/page.d.ts +120 -0
- package/dist/types/cli-options.d.ts +8 -0
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/common/cache-helper.d.ts +20 -0
- package/dist/types/common/viewport.d.ts +17 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/mcp-server.d.ts +26 -0
- package/dist/types/mcp-tools-cdp.d.ts +23 -0
- package/dist/types/mcp-tools-puppeteer.d.ts +23 -0
- package/dist/types/mcp-tools.d.ts +14 -0
- package/dist/types/platform.d.ts +10 -0
- package/dist/types/playwright/ai-fixture.d.ts +133 -0
- package/dist/types/playwright/index.d.ts +13 -0
- package/dist/types/playwright/page.d.ts +11 -0
- package/dist/types/playwright/reporter/index.d.ts +28 -0
- package/dist/types/puppeteer/agent-launcher.d.ts +59 -0
- package/dist/types/puppeteer/base-page.d.ts +123 -0
- package/dist/types/puppeteer/index.d.ts +11 -0
- package/dist/types/puppeteer/page.d.ts +6 -0
- package/dist/types/static/index.d.ts +2 -0
- package/dist/types/static/static-agent.d.ts +5 -0
- package/dist/types/static/static-page.d.ts +46 -0
- package/dist/types/utils.d.ts +6 -0
- package/dist/types/web-element.d.ts +48 -0
- package/dist/types/web-page.d.ts +69 -0
- package/package.json +173 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*! For license information please see cdpInput.js.LICENSE.txt */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
CdpKeyboard: ()=>CdpKeyboard
|
|
29
|
+
});
|
|
30
|
+
const us_keyboard_layout_namespaceObject = require("@godscene/shared/us-keyboard-layout");
|
|
31
|
+
const utils_namespaceObject = require("@godscene/shared/utils");
|
|
32
|
+
function _check_private_redeclaration(obj, privateCollection) {
|
|
33
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
34
|
+
}
|
|
35
|
+
function _class_apply_descriptor_get(receiver, descriptor) {
|
|
36
|
+
if (descriptor.get) return descriptor.get.call(receiver);
|
|
37
|
+
return descriptor.value;
|
|
38
|
+
}
|
|
39
|
+
function _class_apply_descriptor_set(receiver, descriptor, value) {
|
|
40
|
+
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
41
|
+
else {
|
|
42
|
+
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
43
|
+
descriptor.value = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function _class_extract_field_descriptor(receiver, privateMap, action) {
|
|
47
|
+
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
48
|
+
return privateMap.get(receiver);
|
|
49
|
+
}
|
|
50
|
+
function _class_private_field_get(receiver, privateMap) {
|
|
51
|
+
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
|
|
52
|
+
return _class_apply_descriptor_get(receiver, descriptor);
|
|
53
|
+
}
|
|
54
|
+
function _class_private_field_init(obj, privateMap, value) {
|
|
55
|
+
_check_private_redeclaration(obj, privateMap);
|
|
56
|
+
privateMap.set(obj, value);
|
|
57
|
+
}
|
|
58
|
+
function _class_private_field_set(receiver, privateMap, value) {
|
|
59
|
+
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set");
|
|
60
|
+
_class_apply_descriptor_set(receiver, descriptor, value);
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
function _class_private_method_get(receiver, privateSet, fn) {
|
|
64
|
+
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
65
|
+
return fn;
|
|
66
|
+
}
|
|
67
|
+
function _class_private_method_init(obj, privateSet) {
|
|
68
|
+
_check_private_redeclaration(obj, privateSet);
|
|
69
|
+
privateSet.add(obj);
|
|
70
|
+
}
|
|
71
|
+
function _define_property(obj, key, value) {
|
|
72
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
73
|
+
value: value,
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true
|
|
77
|
+
});
|
|
78
|
+
else obj[key] = value;
|
|
79
|
+
return obj;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @license
|
|
83
|
+
* Copyright 2017 Google Inc.
|
|
84
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
85
|
+
*/ var _pressedKeys = /*#__PURE__*/ new WeakMap(), _client = /*#__PURE__*/ new WeakMap(), _modifierBit = /*#__PURE__*/ new WeakSet(), _keyDescriptionForString = /*#__PURE__*/ new WeakSet();
|
|
86
|
+
class CdpKeyboard {
|
|
87
|
+
updateClient(client) {
|
|
88
|
+
_class_private_field_set(this, _client, client);
|
|
89
|
+
}
|
|
90
|
+
async down(key, options = {
|
|
91
|
+
text: void 0,
|
|
92
|
+
commands: []
|
|
93
|
+
}) {
|
|
94
|
+
const description = _class_private_method_get(this, _keyDescriptionForString, keyDescriptionForString).call(this, key);
|
|
95
|
+
const autoRepeat = _class_private_field_get(this, _pressedKeys).has(description.code);
|
|
96
|
+
_class_private_field_get(this, _pressedKeys).add(description.code);
|
|
97
|
+
this._modifiers |= _class_private_method_get(this, _modifierBit, modifierBit).call(this, description.key);
|
|
98
|
+
const text = void 0 === options.text ? description.text : options.text;
|
|
99
|
+
await _class_private_field_get(this, _client).send('Input.dispatchKeyEvent', {
|
|
100
|
+
type: text ? 'keyDown' : 'rawKeyDown',
|
|
101
|
+
modifiers: this._modifiers,
|
|
102
|
+
windowsVirtualKeyCode: description.keyCode,
|
|
103
|
+
code: description.code,
|
|
104
|
+
key: description.key,
|
|
105
|
+
text: text,
|
|
106
|
+
unmodifiedText: text,
|
|
107
|
+
autoRepeat,
|
|
108
|
+
location: description.location,
|
|
109
|
+
isKeypad: 3 === description.location,
|
|
110
|
+
commands: options.commands
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async up(key) {
|
|
114
|
+
const description = _class_private_method_get(this, _keyDescriptionForString, keyDescriptionForString).call(this, key);
|
|
115
|
+
this._modifiers &= ~_class_private_method_get(this, _modifierBit, modifierBit).call(this, description.key);
|
|
116
|
+
_class_private_field_get(this, _pressedKeys).delete(description.code);
|
|
117
|
+
await _class_private_field_get(this, _client).send('Input.dispatchKeyEvent', {
|
|
118
|
+
type: 'keyUp',
|
|
119
|
+
modifiers: this._modifiers,
|
|
120
|
+
key: description.key,
|
|
121
|
+
windowsVirtualKeyCode: description.keyCode,
|
|
122
|
+
code: description.code,
|
|
123
|
+
location: description.location
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
async sendCharacter(char) {
|
|
127
|
+
await _class_private_field_get(this, _client).send('Input.insertText', {
|
|
128
|
+
text: char
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
charIsKey(char) {
|
|
132
|
+
return !!us_keyboard_layout_namespaceObject._keyDefinitions[char];
|
|
133
|
+
}
|
|
134
|
+
async type(text, options = {}) {
|
|
135
|
+
const delay = options.delay || void 0;
|
|
136
|
+
for (const char of text)if (this.charIsKey(char)) await this.press(char, {
|
|
137
|
+
delay
|
|
138
|
+
});
|
|
139
|
+
else {
|
|
140
|
+
if (delay) await new Promise((f)=>setTimeout(f, delay));
|
|
141
|
+
await this.sendCharacter(char);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async press(key, options = {}) {
|
|
145
|
+
const { delay = null } = options;
|
|
146
|
+
const keys = Array.isArray(key) ? key : [
|
|
147
|
+
key
|
|
148
|
+
];
|
|
149
|
+
for (const k of keys)await this.down(k, options);
|
|
150
|
+
if (delay) await new Promise((f)=>setTimeout(f, options.delay));
|
|
151
|
+
for (const k of [
|
|
152
|
+
...keys
|
|
153
|
+
].reverse())await this.up(k);
|
|
154
|
+
}
|
|
155
|
+
constructor(client){
|
|
156
|
+
_class_private_method_init(this, _modifierBit);
|
|
157
|
+
_class_private_method_init(this, _keyDescriptionForString);
|
|
158
|
+
_class_private_field_init(this, _pressedKeys, {
|
|
159
|
+
writable: true,
|
|
160
|
+
value: new Set()
|
|
161
|
+
});
|
|
162
|
+
_class_private_field_init(this, _client, {
|
|
163
|
+
writable: true,
|
|
164
|
+
value: void 0
|
|
165
|
+
});
|
|
166
|
+
_define_property(this, "_modifiers", 0);
|
|
167
|
+
_class_private_field_set(this, _client, client);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function modifierBit(key) {
|
|
171
|
+
if ('Alt' === key) return 1;
|
|
172
|
+
if ('Control' === key) return 2;
|
|
173
|
+
if ('Meta' === key) return 4;
|
|
174
|
+
if ('Shift' === key) return 8;
|
|
175
|
+
return 0;
|
|
176
|
+
}
|
|
177
|
+
function keyDescriptionForString(keyString) {
|
|
178
|
+
const shift = 8 & this._modifiers;
|
|
179
|
+
const description = {
|
|
180
|
+
key: '',
|
|
181
|
+
keyCode: 0,
|
|
182
|
+
code: '',
|
|
183
|
+
text: '',
|
|
184
|
+
location: 0
|
|
185
|
+
};
|
|
186
|
+
const definition = us_keyboard_layout_namespaceObject._keyDefinitions[keyString];
|
|
187
|
+
(0, utils_namespaceObject.assert)(definition, `Unknown key: "${keyString}"`);
|
|
188
|
+
if (definition.key) description.key = definition.key;
|
|
189
|
+
if (shift && definition.shiftKey) description.key = definition.shiftKey;
|
|
190
|
+
if (definition.keyCode) description.keyCode = definition.keyCode;
|
|
191
|
+
if (shift && definition.shiftKeyCode) description.keyCode = definition.shiftKeyCode;
|
|
192
|
+
if (definition.code) description.code = definition.code;
|
|
193
|
+
if (definition.location) description.location = definition.location;
|
|
194
|
+
if (1 === description.key.length) description.text = description.key;
|
|
195
|
+
if (definition.text) description.text = definition.text;
|
|
196
|
+
if (shift && definition.shiftText) description.text = definition.shiftText;
|
|
197
|
+
if (-9 & this._modifiers) description.text = '';
|
|
198
|
+
return description;
|
|
199
|
+
}
|
|
200
|
+
exports.CdpKeyboard = __webpack_exports__.CdpKeyboard;
|
|
201
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
202
|
+
"CdpKeyboard"
|
|
203
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
204
|
+
Object.defineProperty(exports, '__esModule', {
|
|
205
|
+
value: true
|
|
206
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
injectWaterFlowAnimation: ()=>injectWaterFlowAnimation,
|
|
37
|
+
getHtmlElementScript: ()=>getHtmlElementScript,
|
|
38
|
+
injectStopWaterFlowAnimation: ()=>injectStopWaterFlowAnimation
|
|
39
|
+
});
|
|
40
|
+
const external_node_fs_namespaceObject = require("node:fs");
|
|
41
|
+
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
42
|
+
const utils_namespaceObject = require("@godscene/shared/utils");
|
|
43
|
+
let scriptFileContentCache = null;
|
|
44
|
+
const getHtmlElementScript = async ()=>{
|
|
45
|
+
const scriptFileToRetrieve = chrome.runtime.getURL("scripts/htmlElement.js");
|
|
46
|
+
if (scriptFileContentCache) return scriptFileContentCache;
|
|
47
|
+
if (utils_namespaceObject.ifInBrowser || utils_namespaceObject.ifInWorker) {
|
|
48
|
+
const script = await fetch(scriptFileToRetrieve);
|
|
49
|
+
scriptFileContentCache = await script.text();
|
|
50
|
+
return scriptFileContentCache;
|
|
51
|
+
}
|
|
52
|
+
return external_node_fs_default().readFileSync(scriptFileToRetrieve, 'utf8');
|
|
53
|
+
};
|
|
54
|
+
let waterFlowScriptFileContentCache = null;
|
|
55
|
+
const injectWaterFlowAnimation = async ()=>{
|
|
56
|
+
const waterFlowScriptFileToRetrieve = chrome.runtime.getURL("scripts/water-flow.js");
|
|
57
|
+
if (waterFlowScriptFileContentCache) return waterFlowScriptFileContentCache;
|
|
58
|
+
if (utils_namespaceObject.ifInBrowser || utils_namespaceObject.ifInWorker) {
|
|
59
|
+
const script = await fetch(waterFlowScriptFileToRetrieve);
|
|
60
|
+
waterFlowScriptFileContentCache = await script.text();
|
|
61
|
+
return waterFlowScriptFileContentCache;
|
|
62
|
+
}
|
|
63
|
+
return external_node_fs_default().readFileSync(waterFlowScriptFileToRetrieve, 'utf8');
|
|
64
|
+
};
|
|
65
|
+
let stopWaterFlowScriptFileContentCache = null;
|
|
66
|
+
const injectStopWaterFlowAnimation = async ()=>{
|
|
67
|
+
const stopWaterFlowScriptFileToRetrieve = chrome.runtime.getURL("scripts/stop-water-flow.js");
|
|
68
|
+
if (stopWaterFlowScriptFileContentCache) return stopWaterFlowScriptFileContentCache;
|
|
69
|
+
if (utils_namespaceObject.ifInBrowser || utils_namespaceObject.ifInWorker) {
|
|
70
|
+
const script = await fetch(stopWaterFlowScriptFileToRetrieve);
|
|
71
|
+
stopWaterFlowScriptFileContentCache = await script.text();
|
|
72
|
+
return stopWaterFlowScriptFileContentCache;
|
|
73
|
+
}
|
|
74
|
+
return external_node_fs_default().readFileSync(stopWaterFlowScriptFileToRetrieve, 'utf8');
|
|
75
|
+
};
|
|
76
|
+
exports.getHtmlElementScript = __webpack_exports__.getHtmlElementScript;
|
|
77
|
+
exports.injectStopWaterFlowAnimation = __webpack_exports__.injectStopWaterFlowAnimation;
|
|
78
|
+
exports.injectWaterFlowAnimation = __webpack_exports__.injectWaterFlowAnimation;
|
|
79
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
80
|
+
"getHtmlElementScript",
|
|
81
|
+
"injectStopWaterFlowAnimation",
|
|
82
|
+
"injectWaterFlowAnimation"
|
|
83
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
84
|
+
Object.defineProperty(exports, '__esModule', {
|
|
85
|
+
value: true
|
|
86
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
ChromeExtensionProxyPage: ()=>external_page_js_default(),
|
|
37
|
+
overrideAIConfig: ()=>env_namespaceObject.overrideAIConfig,
|
|
38
|
+
ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED: ()=>common_namespaceObject.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED,
|
|
39
|
+
ChromeExtensionProxyPageAgent: ()=>external_agent_js_namespaceObject.ChromeExtensionProxyPageAgent
|
|
40
|
+
});
|
|
41
|
+
const common_namespaceObject = require("@godscene/shared/common");
|
|
42
|
+
const external_agent_js_namespaceObject = require("./agent.js");
|
|
43
|
+
const external_page_js_namespaceObject = require("./page.js");
|
|
44
|
+
var external_page_js_default = /*#__PURE__*/ __webpack_require__.n(external_page_js_namespaceObject);
|
|
45
|
+
const env_namespaceObject = require("@godscene/shared/env");
|
|
46
|
+
exports.ChromeExtensionProxyPage = __webpack_exports__.ChromeExtensionProxyPage;
|
|
47
|
+
exports.ChromeExtensionProxyPageAgent = __webpack_exports__.ChromeExtensionProxyPageAgent;
|
|
48
|
+
exports.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED = __webpack_exports__.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED;
|
|
49
|
+
exports.overrideAIConfig = __webpack_exports__.overrideAIConfig;
|
|
50
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
51
|
+
"ChromeExtensionProxyPage",
|
|
52
|
+
"ChromeExtensionProxyPageAgent",
|
|
53
|
+
"ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED",
|
|
54
|
+
"overrideAIConfig"
|
|
55
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
56
|
+
Object.defineProperty(exports, '__esModule', {
|
|
57
|
+
value: true
|
|
58
|
+
});
|