bc-deeplib 2.4.2 → 3.0.0
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/dist/deeplib.d.ts +133 -107
- package/dist/deeplib.js +493 -596
- package/dist/deeplib.js.map +4 -4
- package/dist/index.js +2626 -0
- package/dist/public/dl_translations/en.lang +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/vendored_types/declarations.d.ts +10 -1
- package/dist/vendored_types/utility.d.ts +3 -1
- package/lib/build.js +15 -13
- package/package.json +10 -7
package/dist/index.js
ADDED
|
@@ -0,0 +1,2626 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/base/base_module.ts
|
|
5
|
+
var BaseModule = class {
|
|
6
|
+
static {
|
|
7
|
+
__name(this, "BaseModule");
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* An optional UI screen for configuring this module's settings.
|
|
11
|
+
* Subclasses can override this getter to provide a `Subscreen` instance.
|
|
12
|
+
* Modules with screens are automatically registered to the main menu.
|
|
13
|
+
*/
|
|
14
|
+
get settingsScreen() {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The storage key under which this module's settings will be saved.
|
|
19
|
+
* Defaults to the class name.
|
|
20
|
+
*
|
|
21
|
+
* Subclasses can override this if they require a custom storage key.
|
|
22
|
+
*/
|
|
23
|
+
get settingsStorage() {
|
|
24
|
+
return this.constructor.name;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the current settings for this module.
|
|
28
|
+
* If no settings exist yet, registers default settings first.
|
|
29
|
+
*/
|
|
30
|
+
get settings() {
|
|
31
|
+
const modName = ModSdkManager.ModInfo.name;
|
|
32
|
+
if (!this.settingsStorage) return null;
|
|
33
|
+
if (!modStorage.playerStorage) {
|
|
34
|
+
Player[modName] = {};
|
|
35
|
+
this.registerDefaultSettings(modStorage.playerStorage);
|
|
36
|
+
} else if (!modStorage.playerStorage[this.settingsStorage]) {
|
|
37
|
+
this.registerDefaultSettings(modStorage.playerStorage);
|
|
38
|
+
}
|
|
39
|
+
return modStorage.playerStorage[this.settingsStorage];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Persists new settings for this module.
|
|
43
|
+
* Automatically initializes storage and defaults if they don't exist.
|
|
44
|
+
*/
|
|
45
|
+
set settings(value) {
|
|
46
|
+
const modName = ModSdkManager.ModInfo.name;
|
|
47
|
+
const storage = new ModStorage(modName);
|
|
48
|
+
if (!this.settingsStorage) return;
|
|
49
|
+
if (!storage.playerStorage) {
|
|
50
|
+
Player[modName] = {};
|
|
51
|
+
this.registerDefaultSettings(modStorage.playerStorage);
|
|
52
|
+
} else if (!storage.playerStorage[this.settingsStorage]) {
|
|
53
|
+
this.registerDefaultSettings(modStorage.playerStorage);
|
|
54
|
+
}
|
|
55
|
+
storage.playerStorage[this.settingsStorage] = value;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Initializes the module.
|
|
59
|
+
* Default implementation registers default settings immediately.
|
|
60
|
+
* Subclasses can override to perform additional setup.
|
|
61
|
+
*/
|
|
62
|
+
init() {
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Registers default settings for this module in persistent storage.
|
|
66
|
+
* Only runs if a storage key and default settings are defined.
|
|
67
|
+
*
|
|
68
|
+
* If some settings already exist, they will be merged with defaults.
|
|
69
|
+
* Existing values will NOT be overwritten.
|
|
70
|
+
*/
|
|
71
|
+
registerDefaultSettings(target) {
|
|
72
|
+
const storage = this.settingsStorage;
|
|
73
|
+
const defaults = this.defaultSettings;
|
|
74
|
+
if (!storage || !defaults) return;
|
|
75
|
+
if (Object.entries(this.defaultSettings).length === 0) return;
|
|
76
|
+
target[storage] = deepMerge(this.defaultSettings, target[storage], { concatArrays: false, matchingOnly: true });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Provides default settings for this module.
|
|
80
|
+
* Subclasses should override this getter to return their defaults.
|
|
81
|
+
*/
|
|
82
|
+
get defaultSettings() {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Called when the module is loaded into the system.
|
|
87
|
+
* Subclasses should override to perform data loading or initialization.
|
|
88
|
+
*/
|
|
89
|
+
load() {
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* By default doesn't get called each frame, only once when the module is loaded.
|
|
93
|
+
* Subclasses can override to implement runtime logic.
|
|
94
|
+
*/
|
|
95
|
+
run() {
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Called when the module is being removed.
|
|
99
|
+
* Subclasses can override to perform cleanup or save final state.
|
|
100
|
+
*/
|
|
101
|
+
unload() {
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// src/base/base_subscreen.ts
|
|
106
|
+
async function setSubscreen(subscreen) {
|
|
107
|
+
if (!GUI.instance) {
|
|
108
|
+
throw new Error("Attempt to set subscreen before init");
|
|
109
|
+
}
|
|
110
|
+
const screenName = typeof subscreen === "string" ? subscreen : subscreen?.options.name;
|
|
111
|
+
const screenId = `${BaseSubscreen.id}_${screenName}`;
|
|
112
|
+
await CommonSetScreen(...["DeepLibMod", `${screenId}`]);
|
|
113
|
+
}
|
|
114
|
+
__name(setSubscreen, "setSubscreen");
|
|
115
|
+
var BaseSubscreen = class _BaseSubscreen {
|
|
116
|
+
static {
|
|
117
|
+
__name(this, "BaseSubscreen");
|
|
118
|
+
}
|
|
119
|
+
/** Global registry of currently rendered elements and their definitions. */
|
|
120
|
+
static currentElements = [];
|
|
121
|
+
/** Tracks the currently visible page number (1-based index). */
|
|
122
|
+
static currentPage = 1;
|
|
123
|
+
/** Runtime options for this subscreen. */
|
|
124
|
+
options;
|
|
125
|
+
/** Reference to the module this subscreen belongs to. */
|
|
126
|
+
module;
|
|
127
|
+
/** Identifier for internal use to avoid screen name collisions. */
|
|
128
|
+
static id = CommonGenerateUniqueID();
|
|
129
|
+
/** Optional configuration flags for a BaseSubscreen instance. */
|
|
130
|
+
static subscreenOptions = {
|
|
131
|
+
drawCharacter: true,
|
|
132
|
+
name: "UNKNOWN",
|
|
133
|
+
icon: "",
|
|
134
|
+
background: "Sheet",
|
|
135
|
+
doShowExitButton: true,
|
|
136
|
+
doShowTitle: true,
|
|
137
|
+
settingsWidth: 1e3,
|
|
138
|
+
forceUpCharacter: false
|
|
139
|
+
};
|
|
140
|
+
/** The menu at the top of the subscreen */
|
|
141
|
+
static menu = null;
|
|
142
|
+
constructor(module) {
|
|
143
|
+
if (module) this.module = module;
|
|
144
|
+
const ctor = this.constructor;
|
|
145
|
+
this.options = {
|
|
146
|
+
..._BaseSubscreen.subscreenOptions,
|
|
147
|
+
...ctor.subscreenOptions
|
|
148
|
+
};
|
|
149
|
+
const screenName = this.options.name;
|
|
150
|
+
const screenId = `${_BaseSubscreen.id}_${screenName}`;
|
|
151
|
+
exportToGlobal(`${screenId}Load`, this.load.bind(this));
|
|
152
|
+
exportToGlobal(`${screenId}Run`, this.run.bind(this));
|
|
153
|
+
exportToGlobal(`${screenId}Click`, this.click.bind(this));
|
|
154
|
+
exportToGlobal(`${screenId}Exit`, this.exit.bind(this));
|
|
155
|
+
exportToGlobal(`${screenId}Unload`, this.unload.bind(this));
|
|
156
|
+
exportToGlobal(`${screenId}Resize`, this.resize.bind(this));
|
|
157
|
+
exportToGlobal(`${screenId}Background`, this.options.background);
|
|
158
|
+
CommonCSVCache[ScreenFileGetTranslation("DeepLibMod", screenId)] = [];
|
|
159
|
+
}
|
|
160
|
+
/** Changes the currently active subscreen. */
|
|
161
|
+
async setSubscreen(screen) {
|
|
162
|
+
return await setSubscreen(screen);
|
|
163
|
+
}
|
|
164
|
+
/** Gets this subscreen's settings object from its parent module. */
|
|
165
|
+
get settings() {
|
|
166
|
+
return this.module.settings;
|
|
167
|
+
}
|
|
168
|
+
/** Updates this subscreen's settings in its parent module. */
|
|
169
|
+
set settings(value) {
|
|
170
|
+
this.module.settings = value;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Defines the paginated layout of the subscreen's settings UI.
|
|
174
|
+
* Each element in the outer array is a page; each page contains `SettingElement`s.
|
|
175
|
+
*
|
|
176
|
+
* Subclasses should override to define their actual UI structure.
|
|
177
|
+
*/
|
|
178
|
+
get pageStructure() {
|
|
179
|
+
return [[]];
|
|
180
|
+
}
|
|
181
|
+
/** Gets the currently visible page's settings elements. */
|
|
182
|
+
get currentPage() {
|
|
183
|
+
return this.pageStructure[Math.min(_BaseSubscreen.currentPage - 1, this.pageStructure.length - 1)];
|
|
184
|
+
}
|
|
185
|
+
getPageLabel() {
|
|
186
|
+
return CommonStringPartitionReplace(getText("settings.page.label"), {
|
|
187
|
+
$currentPage$: `${_BaseSubscreen.currentPage}`,
|
|
188
|
+
$totalPages$: `${this.pageStructure.length}`
|
|
189
|
+
}).join("");
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Changes the visible page in a multi-page subscreen.
|
|
193
|
+
* Automatically wraps around when going past the first or last page.
|
|
194
|
+
*/
|
|
195
|
+
changePage(page, setLabel) {
|
|
196
|
+
const totalPages = this.pageStructure.length;
|
|
197
|
+
if (page > totalPages) page = 1;
|
|
198
|
+
if (page < 1) page = totalPages;
|
|
199
|
+
_BaseSubscreen.currentPage = page;
|
|
200
|
+
this.managePageElementsVisibility();
|
|
201
|
+
setLabel(this.getPageLabel());
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Updates the DOM to show only elements belonging to the current page.
|
|
205
|
+
* All elements on other pages are hidden.
|
|
206
|
+
*/
|
|
207
|
+
managePageElementsVisibility() {
|
|
208
|
+
this.pageStructure.forEach((item, ix) => {
|
|
209
|
+
item.forEach((setting) => {
|
|
210
|
+
const element = ElementWrap(`${setting.id}-container`) ?? ElementWrap(`${setting.id}`);
|
|
211
|
+
if (ix !== _BaseSubscreen.currentPage - 1) {
|
|
212
|
+
if (element) domUtil.hide(element);
|
|
213
|
+
} else {
|
|
214
|
+
if (element) domUtil.unhide(element);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Called when this subscreen is first displayed.
|
|
221
|
+
* Builds the layout, initializes navigation, and renders all settings elements.
|
|
222
|
+
*
|
|
223
|
+
* Handles:
|
|
224
|
+
* - Ensuring each module with a settings screen has its defaults loaded
|
|
225
|
+
* - Creating navigation menus and back/next page controls
|
|
226
|
+
* - Building and appending UI elements based on `pageStructure`
|
|
227
|
+
* - Setting up exit button and tooltip
|
|
228
|
+
* - Resetting to page 1
|
|
229
|
+
*/
|
|
230
|
+
load() {
|
|
231
|
+
for (const module of modules()) {
|
|
232
|
+
if (!module.settingsScreen) continue;
|
|
233
|
+
if (!module.settings || !Object.keys(module.settings).length) module.registerDefaultSettings(modStorage.playerStorage);
|
|
234
|
+
}
|
|
235
|
+
_BaseSubscreen.currentPage = 1;
|
|
236
|
+
layout.getSubscreen();
|
|
237
|
+
const settingsElement = layout.getSettingsDiv();
|
|
238
|
+
layout.appendToSubscreen(settingsElement);
|
|
239
|
+
_BaseSubscreen.menu = ElementMenu.Create("deeplib-nav-menu", []);
|
|
240
|
+
layout.appendToSubscreen(_BaseSubscreen.menu);
|
|
241
|
+
if (this.pageStructure.length > 1) {
|
|
242
|
+
const backNext = advElement.createBackNext({
|
|
243
|
+
id: "deeplib-page-back-next",
|
|
244
|
+
next: /* @__PURE__ */ __name(({ setLabel }) => this.changePage(_BaseSubscreen.currentPage + 1, setLabel), "next"),
|
|
245
|
+
initialNextTooltip: getText("settings.button.next_button_hint"),
|
|
246
|
+
back: /* @__PURE__ */ __name(({ setLabel }) => this.changePage(_BaseSubscreen.currentPage - 1, setLabel), "back"),
|
|
247
|
+
initialPrevTooltip: getText("settings.button.prev_button_hint"),
|
|
248
|
+
initialLabel: this.getPageLabel()
|
|
249
|
+
});
|
|
250
|
+
_BaseSubscreen.menu.prepend(backNext);
|
|
251
|
+
}
|
|
252
|
+
if (this.options.help) {
|
|
253
|
+
const onClick = this.options.help.onClick;
|
|
254
|
+
let action = /* @__PURE__ */ __name(() => {
|
|
255
|
+
}, "action");
|
|
256
|
+
if (typeof onClick === "string" || onClick instanceof URL) {
|
|
257
|
+
action = /* @__PURE__ */ __name(() => window.open(onClick, "_blank"), "action");
|
|
258
|
+
} else if (typeof onClick === "function") {
|
|
259
|
+
action = onClick;
|
|
260
|
+
} else if (onClick instanceof _BaseSubscreen) {
|
|
261
|
+
action = /* @__PURE__ */ __name(async () => await this.setSubscreen(onClick), "action");
|
|
262
|
+
}
|
|
263
|
+
this.options.help.tooltip ??= getText("settings.button.help_button_hint");
|
|
264
|
+
this.options.help.icon ??= `${PUBLIC_URL}/dl_images/bookmark.svg`;
|
|
265
|
+
const helpButton = advElement.createButton({
|
|
266
|
+
id: "deeplib-help",
|
|
267
|
+
size: [90, 90],
|
|
268
|
+
onClick: action,
|
|
269
|
+
options: {
|
|
270
|
+
image: this.options.help.icon,
|
|
271
|
+
tooltip: this.options.help.tooltip
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
_BaseSubscreen.menu.append(helpButton);
|
|
275
|
+
}
|
|
276
|
+
if (this.options.doShowTitle) {
|
|
277
|
+
const subscreenTitle = advElement.createLabel({
|
|
278
|
+
id: "deeplib-subscreen-title",
|
|
279
|
+
label: getText(`${this.options.name}.title`).replace("$ModVersion", ModSdkManager.ModInfo.version)
|
|
280
|
+
});
|
|
281
|
+
layout.appendToSubscreen(subscreenTitle);
|
|
282
|
+
}
|
|
283
|
+
if (this.options.doShowExitButton) {
|
|
284
|
+
const exitButton = advElement.createButton({
|
|
285
|
+
id: "deeplib-exit",
|
|
286
|
+
size: [90, 90],
|
|
287
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
288
|
+
this.exit();
|
|
289
|
+
}, "onClick"),
|
|
290
|
+
options: {
|
|
291
|
+
image: `${PUBLIC_URL}/dl_images/exit.svg`,
|
|
292
|
+
tooltip: getText("settings.button.back_button_hint")
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
_BaseSubscreen.menu.append(exitButton);
|
|
296
|
+
}
|
|
297
|
+
const tooltip = advElement.createTooltip();
|
|
298
|
+
layout.appendToSubscreen(tooltip);
|
|
299
|
+
this.pageStructure.forEach(
|
|
300
|
+
(s) => s.forEach((item) => {
|
|
301
|
+
let element;
|
|
302
|
+
switch (item.type) {
|
|
303
|
+
case "text":
|
|
304
|
+
case "number":
|
|
305
|
+
case "color":
|
|
306
|
+
element = advElement.createInput(item);
|
|
307
|
+
break;
|
|
308
|
+
case "checkbox":
|
|
309
|
+
element = advElement.createCheckbox(item);
|
|
310
|
+
break;
|
|
311
|
+
case "button":
|
|
312
|
+
element = advElement.createButton(item);
|
|
313
|
+
break;
|
|
314
|
+
case "label":
|
|
315
|
+
element = advElement.createLabel(item);
|
|
316
|
+
break;
|
|
317
|
+
case "custom":
|
|
318
|
+
element = advElement.createCustom(item);
|
|
319
|
+
break;
|
|
320
|
+
case "dropdown":
|
|
321
|
+
element = advElement.createDropdown(item);
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
layout.appendToSettingsDiv(element);
|
|
325
|
+
})
|
|
326
|
+
);
|
|
327
|
+
this.managePageElementsVisibility();
|
|
328
|
+
if (this.options.drawCharacter && this.options.forceUpCharacter) {
|
|
329
|
+
CharacterAppearanceForceUpCharacter = Player.MemberNumber;
|
|
330
|
+
} else {
|
|
331
|
+
CharacterAppearanceForceUpCharacter = -1;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Called each frame while this subscreen is active.
|
|
336
|
+
* Default behavior draws the player's character if `drawCharacter` is enabled.
|
|
337
|
+
*/
|
|
338
|
+
run() {
|
|
339
|
+
if (this.options.drawCharacter) DrawCharacter(Player, 50, 50, 0.9, false);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Handles mouse clicks *on canvas* while the subscreen is active.
|
|
343
|
+
* Default implementation is empty — subclasses may override.
|
|
344
|
+
*/
|
|
345
|
+
click() {
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Exits this subscreen, returning to the main menu.
|
|
349
|
+
* Also saves persistent storage changes.
|
|
350
|
+
* Called after the `unload`.
|
|
351
|
+
*/
|
|
352
|
+
exit() {
|
|
353
|
+
CharacterAppearanceForceUpCharacter = -1;
|
|
354
|
+
CharacterLoadCanvas(Player);
|
|
355
|
+
const returnScreen = typeof this.options.returnScreen === "function" ? this.options.returnScreen() : this.options.returnScreen;
|
|
356
|
+
if (returnScreen instanceof _BaseSubscreen || !returnScreen) {
|
|
357
|
+
setSubscreen(returnScreen ?? "mainmenu").then(() => {
|
|
358
|
+
modStorage.save();
|
|
359
|
+
});
|
|
360
|
+
} else if (Array.isArray(returnScreen)) {
|
|
361
|
+
CommonSetScreen(...returnScreen).then(() => {
|
|
362
|
+
modStorage.save();
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Called when the window is resized.
|
|
368
|
+
* Also checks for overflow in the settings div and applies styling accordingly.
|
|
369
|
+
*/
|
|
370
|
+
resize(_onLoad = false) {
|
|
371
|
+
const offset = this.options.drawCharacter ? 0 : 380;
|
|
372
|
+
const subscreen = layout.getSubscreen();
|
|
373
|
+
const settingsDiv = layout.getSettingsDiv();
|
|
374
|
+
ElementSetPosition(subscreen, 0, 0);
|
|
375
|
+
ElementSetSize(subscreen, 2e3, 1e3);
|
|
376
|
+
ElementSetFontSize(subscreen, "auto");
|
|
377
|
+
ElementSetPosition(settingsDiv, 530 - offset, 170);
|
|
378
|
+
ElementSetSize(settingsDiv, this.options.settingsWidth ?? 1e3 + offset, 660);
|
|
379
|
+
if (this.options.doShowTitle) {
|
|
380
|
+
ElementSetPosition("deeplib-subscreen-title", 530 - offset, 75);
|
|
381
|
+
ElementSetSize("deeplib-subscreen-title", 800, 90);
|
|
382
|
+
}
|
|
383
|
+
ElementSetPosition("deeplib-nav-menu", 1905, 75, "top-right");
|
|
384
|
+
ElementSetSize("deeplib-nav-menu", null, 90);
|
|
385
|
+
ElementSetPosition(advElement.getTooltip() || "", 250, 850);
|
|
386
|
+
ElementSetSize(advElement.getTooltip() || "", 1500, 70);
|
|
387
|
+
_BaseSubscreen.currentElements.forEach((item) => {
|
|
388
|
+
const element = item[0];
|
|
389
|
+
const options = item[1];
|
|
390
|
+
domUtil.autoSetPosition(options.id ?? element.id, options.position);
|
|
391
|
+
domUtil.autoSetSize(options.id ?? element.id, options.size);
|
|
392
|
+
});
|
|
393
|
+
if (settingsDiv) {
|
|
394
|
+
if (domUtil.hasOverflow(settingsDiv)?.vertical) {
|
|
395
|
+
settingsDiv.classList.add("deeplib-overflow-box");
|
|
396
|
+
} else {
|
|
397
|
+
settingsDiv.classList.remove("deeplib-overflow-box");
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Called when this subscreen is being removed.
|
|
403
|
+
* Resets the static element registry and removes the subscreen from the layout.
|
|
404
|
+
* Called before `exit`.
|
|
405
|
+
*/
|
|
406
|
+
unload() {
|
|
407
|
+
_BaseSubscreen.currentElements = [];
|
|
408
|
+
layout.removeSubscreen();
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
// src/styles/index.scss
|
|
413
|
+
var styles_default = `.deeplib-subscreen,
|
|
414
|
+
.deeplib-modal {
|
|
415
|
+
--deeplib-background-color: var(--tmd-main, white);
|
|
416
|
+
--deeplib-element-color: var(--tmd-element, white);
|
|
417
|
+
--deeplib-element-hover-color: var(--tmd-element-hover, cyan);
|
|
418
|
+
--deeplib-accent-color: var(--tmd-accent, #FFFF88);
|
|
419
|
+
--deeplib-blocked-color: var(--tmd-blocked, red);
|
|
420
|
+
--deeplib-text-color: var(--tmd-text, black);
|
|
421
|
+
--deeplib-icon-color: var(--tmd-accent, black);
|
|
422
|
+
--deeplib-icon-hover-color: var(--tmd-accent-hover, black);
|
|
423
|
+
--deeplib-border-color: var(--tmd-accent, black);
|
|
424
|
+
--deeplib-border-width: min(0.2vh, 0.1vw);
|
|
425
|
+
--deeplib-border-width: min(0.2dvh, 0.1dvw);
|
|
426
|
+
--deeplib-border-radius: min(1vh, 0.5vw);
|
|
427
|
+
--deeplib-border-radius: min(1dvh, 0.5dvw);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.deeplib-button {
|
|
431
|
+
color: var(--deeplib-text-color);
|
|
432
|
+
width: 100%;
|
|
433
|
+
height: 100%;
|
|
434
|
+
}
|
|
435
|
+
.deeplib-button.button-styling, .deeplib-button.button-styling::before {
|
|
436
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
437
|
+
}
|
|
438
|
+
.deeplib-button img {
|
|
439
|
+
position: absolute;
|
|
440
|
+
top: 0%;
|
|
441
|
+
left: 0%;
|
|
442
|
+
width: 100%;
|
|
443
|
+
height: 100%;
|
|
444
|
+
background-position: left;
|
|
445
|
+
background-color: var(--deeplib-icon-color);
|
|
446
|
+
background-blend-mode: multiply;
|
|
447
|
+
background-size: contain;
|
|
448
|
+
mask-position: left;
|
|
449
|
+
mask-size: contain;
|
|
450
|
+
background-repeat: no-repeat;
|
|
451
|
+
mask-repeat: no-repeat;
|
|
452
|
+
color: transparent;
|
|
453
|
+
background-image: var(--image);
|
|
454
|
+
mask-image: var(--image);
|
|
455
|
+
pointer-events: none;
|
|
456
|
+
}
|
|
457
|
+
.deeplib-button:hover img {
|
|
458
|
+
background-color: var(--deeplib-icon-hover-color);
|
|
459
|
+
}
|
|
460
|
+
.deeplib-button .button-label {
|
|
461
|
+
background-color: transparent !important;
|
|
462
|
+
color: var(--deeplib-text-color);
|
|
463
|
+
font-size: min(3.6dvh, 1.8dvw);
|
|
464
|
+
display: contents;
|
|
465
|
+
}
|
|
466
|
+
.deeplib-button .button-tooltip {
|
|
467
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
#deeplib-page-label {
|
|
471
|
+
display: flex;
|
|
472
|
+
align-items: center;
|
|
473
|
+
justify-content: center;
|
|
474
|
+
pointer-events: none;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
#deeplib-subscreen-title {
|
|
478
|
+
text-align: left;
|
|
479
|
+
color: var(--deeplib-text-color);
|
|
480
|
+
user-select: none;
|
|
481
|
+
pointer-events: none;
|
|
482
|
+
display: flex;
|
|
483
|
+
align-items: center;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.deeplib-text {
|
|
487
|
+
color: var(--deeplib-text-color);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.deeplib-subscreen {
|
|
491
|
+
padding: 0;
|
|
492
|
+
margin: 0;
|
|
493
|
+
pointer-events: none;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.deeplib-subscreen * {
|
|
497
|
+
box-sizing: border-box;
|
|
498
|
+
pointer-events: all;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.deeplib-settings {
|
|
502
|
+
display: grid;
|
|
503
|
+
grid-auto-rows: min-content;
|
|
504
|
+
padding: min(1dvh, 0.5dvw);
|
|
505
|
+
gap: 0.3em;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.deeplib-misc {
|
|
509
|
+
display: flex;
|
|
510
|
+
align-items: center;
|
|
511
|
+
flex-direction: column-reverse;
|
|
512
|
+
gap: min(1vh, 0.5vw);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.deeplib-tooltip {
|
|
516
|
+
background-color: var(--deeplib-element-color);
|
|
517
|
+
color: var(--deeplib-text-color);
|
|
518
|
+
display: flex;
|
|
519
|
+
align-items: center;
|
|
520
|
+
justify-content: center;
|
|
521
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
522
|
+
padding: min(1vh, 0.5vw);
|
|
523
|
+
font-size: 0.8em;
|
|
524
|
+
border: min(0.2vh, 0.1vw) solid var(--deeplib-border-color);
|
|
525
|
+
z-index: 1;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.deeplib-overflow-box {
|
|
529
|
+
border: var(--deeplib-border-color) solid var(--deeplib-border-width);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.deeplib-prev-next {
|
|
533
|
+
display: flex;
|
|
534
|
+
align-items: center;
|
|
535
|
+
justify-content: space-between;
|
|
536
|
+
flex-direction: row;
|
|
537
|
+
gap: min(2dvh, 1dvw);
|
|
538
|
+
background-color: var(--deeplib-element-color);
|
|
539
|
+
color: var(--deeplib-text-color);
|
|
540
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
541
|
+
border: min(0.2vh, 0.1vw) solid var(--deeplib-border-color);
|
|
542
|
+
}
|
|
543
|
+
.deeplib-prev-next .deeplib-prev-next-button:hover {
|
|
544
|
+
background-color: var(--deeplib-element-hover-color);
|
|
545
|
+
border-radius: var(--deeplib-border-radius);
|
|
546
|
+
}
|
|
547
|
+
.deeplib-prev-next .deeplib-prev-next-button {
|
|
548
|
+
height: 100%;
|
|
549
|
+
aspect-ratio: 1;
|
|
550
|
+
}
|
|
551
|
+
.deeplib-prev-next .deeplib-prev-next-label {
|
|
552
|
+
white-space: nowrap;
|
|
553
|
+
user-select: none;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
#deeplib-nav-menu {
|
|
557
|
+
display: flex;
|
|
558
|
+
flex-direction: row;
|
|
559
|
+
gap: min(2dvh, 1dvw);
|
|
560
|
+
z-index: 1;
|
|
561
|
+
}
|
|
562
|
+
#deeplib-nav-menu > .deeplib-button {
|
|
563
|
+
flex: 1 0 auto;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
#deeplib-storage-meter {
|
|
567
|
+
position: absolute;
|
|
568
|
+
top: 0px;
|
|
569
|
+
left: 0px;
|
|
570
|
+
width: 100%;
|
|
571
|
+
height: 100%;
|
|
572
|
+
overflow: hidden;
|
|
573
|
+
background-color: var(--deeplib-element-color);
|
|
574
|
+
border: var(--deeplib-border-width) solid var(--deeplib-border-color);
|
|
575
|
+
border-radius: var(--deeplib-border-radius);
|
|
576
|
+
z-index: -1;
|
|
577
|
+
}
|
|
578
|
+
#deeplib-storage-meter #deeplib-storage-bar {
|
|
579
|
+
height: 100%;
|
|
580
|
+
width: 0%;
|
|
581
|
+
background: var(--deeplib-accent-color);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.deeplib-checkbox-container {
|
|
585
|
+
display: flex;
|
|
586
|
+
flex-direction: row;
|
|
587
|
+
align-items: center;
|
|
588
|
+
gap: 0.3em;
|
|
589
|
+
width: fit-content;
|
|
590
|
+
}
|
|
591
|
+
.deeplib-checkbox-container span {
|
|
592
|
+
user-select: none;
|
|
593
|
+
}
|
|
594
|
+
.deeplib-checkbox-container .deeplib-input {
|
|
595
|
+
width: min(5vh, 2.5vw);
|
|
596
|
+
height: min(5vh, 2.5vw);
|
|
597
|
+
width: min(5dvh, 2.5dvw);
|
|
598
|
+
height: min(5dvh, 2.5dvw);
|
|
599
|
+
border-radius: min(1vh, 0.5vw);
|
|
600
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
601
|
+
}
|
|
602
|
+
.deeplib-checkbox-container .deeplib-input[type=checkbox]:checked::before {
|
|
603
|
+
width: 80%;
|
|
604
|
+
height: 80%;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.deeplib-input-container {
|
|
608
|
+
display: flex;
|
|
609
|
+
flex-direction: row;
|
|
610
|
+
align-items: center;
|
|
611
|
+
gap: 0.3em;
|
|
612
|
+
width: fit-content;
|
|
613
|
+
}
|
|
614
|
+
.deeplib-input-container span {
|
|
615
|
+
user-select: none;
|
|
616
|
+
}
|
|
617
|
+
.deeplib-input-container:has(.deeplib-text) {
|
|
618
|
+
margin-top: min(1vh, 0.5vw);
|
|
619
|
+
margin-top: min(1dvh, 0.5dvw);
|
|
620
|
+
}
|
|
621
|
+
.deeplib-input-container .deeplib-input {
|
|
622
|
+
font-size: 0.6em;
|
|
623
|
+
padding: min(1vh, 0.5vw);
|
|
624
|
+
padding: min(1dvh, 0.5dvw);
|
|
625
|
+
background-color: transparent;
|
|
626
|
+
outline: none;
|
|
627
|
+
min-height: min(5vh, 2.5vw);
|
|
628
|
+
min-height: min(5dvh, 2.5dvw);
|
|
629
|
+
border-radius: min(1vh, 0.5vw);
|
|
630
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
631
|
+
}
|
|
632
|
+
.deeplib-input-container .deeplib-input[type=color] {
|
|
633
|
+
padding: 0px;
|
|
634
|
+
width: min(5vh, 2.5vw);
|
|
635
|
+
height: min(5vh, 2.5vw);
|
|
636
|
+
width: min(5dvh, 2.5dvw);
|
|
637
|
+
height: min(5dvh, 2.5dvw);
|
|
638
|
+
border-radius: 0px;
|
|
639
|
+
}
|
|
640
|
+
.deeplib-input-container .deeplib-input[type=color]:disabled {
|
|
641
|
+
border: var(--deeplib-blocked-color) solid var(--deeplib-border-width);
|
|
642
|
+
cursor: not-allowed;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.deeplib-dropdown-container {
|
|
646
|
+
display: flex;
|
|
647
|
+
flex-direction: row;
|
|
648
|
+
align-items: center;
|
|
649
|
+
gap: min(2vh, 1vw);
|
|
650
|
+
gap: min(2dvh, 1dvw);
|
|
651
|
+
color: var(--deeplib-text-color);
|
|
652
|
+
width: fit-content;
|
|
653
|
+
}
|
|
654
|
+
.deeplib-dropdown-container select {
|
|
655
|
+
padding: 0 min(1vh, 0.5vw);
|
|
656
|
+
padding: 0 min(1dvh, 0.5dvw);
|
|
657
|
+
border-radius: min(1vh, 0.5vw);
|
|
658
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
659
|
+
}
|
|
660
|
+
.deeplib-dropdown-container span {
|
|
661
|
+
user-select: none;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.deeplib-highlight-text {
|
|
665
|
+
font-weight: bold;
|
|
666
|
+
color: rgb(203, 185, 23);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
#TextAreaChatLog[data-colortheme=dark] div.ChatMessage.deeplib-message,
|
|
670
|
+
#TextAreaChatLog[data-colortheme=dark2] div.ChatMessage.deeplib-message {
|
|
671
|
+
background-color: var(--deeplib-element-color);
|
|
672
|
+
border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);
|
|
673
|
+
color: var(--deeplib-text-color);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
#TextAreaChatLog div.ChatMessage.deeplib-message {
|
|
677
|
+
background-color: #eee;
|
|
678
|
+
border: min(0.2dvh, 0.1dvw) solid #440171;
|
|
679
|
+
color: #111;
|
|
680
|
+
padding-left: min(0.6dvh, 0.3dvw);
|
|
681
|
+
display: block;
|
|
682
|
+
white-space: normal;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
#TextAreaChatLog[data-colortheme=dark] div.ChatMessage.deeplib-message a,
|
|
686
|
+
#TextAreaChatLog[data-colortheme=dark2] div.ChatMessage.deeplib-message a {
|
|
687
|
+
color: var(--deeplib-text-color);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
#TextAreaChatLog div.ChatMessage.deeplib-message a {
|
|
691
|
+
cursor: pointer;
|
|
692
|
+
font-weight: bold;
|
|
693
|
+
color: #111;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.deeplib-modal {
|
|
697
|
+
position: fixed;
|
|
698
|
+
top: 10%;
|
|
699
|
+
left: 50%;
|
|
700
|
+
transform: translateX(-50%);
|
|
701
|
+
z-index: 1001;
|
|
702
|
+
display: flex;
|
|
703
|
+
flex-direction: column;
|
|
704
|
+
justify-content: center;
|
|
705
|
+
align-items: center;
|
|
706
|
+
gap: 0.5em;
|
|
707
|
+
width: max(50dvw, 25dvh);
|
|
708
|
+
font-size: min(4dvh, 2dvw);
|
|
709
|
+
padding: min(2dvh, 1dvw);
|
|
710
|
+
background-color: var(--deeplib-element-color);
|
|
711
|
+
border-radius: min(1.2dvh, 0.6dvw);
|
|
712
|
+
border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);
|
|
713
|
+
color: var(--deeplib-text-color);
|
|
714
|
+
}
|
|
715
|
+
.deeplib-modal .deeplib-modal-input {
|
|
716
|
+
width: 100%;
|
|
717
|
+
font-size: min(2.6dvh, 1.8dvw);
|
|
718
|
+
border-radius: min(1dvh, 0.5dvw);
|
|
719
|
+
padding: min(1dvh, 0.5dvw);
|
|
720
|
+
}
|
|
721
|
+
.deeplib-modal input.deeplib-modal-input {
|
|
722
|
+
max-width: max(50dvh, 25dvw);
|
|
723
|
+
}
|
|
724
|
+
.deeplib-modal .deeplib-modal-button-container {
|
|
725
|
+
display: flex;
|
|
726
|
+
flex-direction: row;
|
|
727
|
+
justify-content: flex-end;
|
|
728
|
+
gap: 0.5em;
|
|
729
|
+
width: 100%;
|
|
730
|
+
}
|
|
731
|
+
.deeplib-modal .deeplib-modal-button-container .deeplib-button {
|
|
732
|
+
font-size: 0.8em;
|
|
733
|
+
display: flex;
|
|
734
|
+
width: auto;
|
|
735
|
+
padding: min(0.4vh, 0.2vw) min(2vh, 1vw);
|
|
736
|
+
}
|
|
737
|
+
.deeplib-modal .deeplib-modal-button-container .deeplib-button .button-label {
|
|
738
|
+
display: contents;
|
|
739
|
+
}
|
|
740
|
+
.deeplib-modal .deeplib-modal-prompt-container {
|
|
741
|
+
display: flex;
|
|
742
|
+
flex-direction: column;
|
|
743
|
+
justify-content: center;
|
|
744
|
+
align-items: center;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.deeplib-modal-blocker {
|
|
748
|
+
z-index: 1000;
|
|
749
|
+
position: fixed;
|
|
750
|
+
top: 0;
|
|
751
|
+
left: 0;
|
|
752
|
+
width: 100dvw;
|
|
753
|
+
height: 100dvh;
|
|
754
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
#deeplib-modal-import_export .deeplib-modal-checkbox-container {
|
|
758
|
+
margin-top: 0.5em;
|
|
759
|
+
display: flex;
|
|
760
|
+
flex-direction: column;
|
|
761
|
+
gap: var(--half-gap);
|
|
762
|
+
}
|
|
763
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL21udC9zaGluZG93cy9TdHVmZi9Db2RlL2JjL0JDLURlZXBMaWIvc3JjL3N0eWxlcyIsInNvdXJjZXMiOlsidmFycy5zY3NzIiwiYnV0dG9ucy5zY3NzIiwiZWxlbWVudHMuc2NzcyIsImlucHV0cy5zY3NzIiwibWVzc2FnZXMuc2NzcyIsIm1vZGFsLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtFQUVFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUNkRjtFQUNFO0VBQ0E7RUFDQTs7QUFFQTtFQUVFOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUVBO0VBQ0E7RUFDQTs7QUFHRjtFQUNFOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRTs7O0FDM0NKO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtFQUNFOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTs7O0FBR0Y7RUFDRTtFQUNBOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUF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VudDogZmxleC1lbmQ7XG4gICAgZ2FwOiAwLjVlbTtcbiAgICB3aWR0aDogMTAwJTtcblxuICAgIC5kZWVwbGliLWJ1dHRvbiB7XG4gICAgICBmb250LXNpemU6IDAuOGVtO1xuICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgIHdpZHRoOiBhdXRvO1xuICAgICAgcGFkZGluZzogbWluKDAuNHZoLCAwLjJ2dykgbWluKDJ2aCwgMXZ3KTtcblxuICAgICAgLmJ1dHRvbi1sYWJlbCB7XG4gICAgICAgIGRpc3BsYXk6IGNvbnRlbnRzO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC5kZWVwbGliLW1vZGFsLXByb21wdC1jb250YWluZXIge1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICB9XG59XG5cbi5kZWVwbGliLW1vZGFsLWJsb2NrZXIge1xuICB6LWluZGV4OiAxMDAwO1xuICBwb3NpdGlvbjogZml4ZWQ7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbiAgd2lkdGg6IDEwMGR2dztcbiAgaGVpZ2h0OiAxMDBkdmg7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC41KTtcbn1cblxuI2RlZXBsaWItbW9kYWwtaW1wb3J0X2V4cG9ydCB7XG4gIC5kZWVwbGliLW1vZGFsLWNoZWNrYm94LWNvbnRhaW5lciB7XG4gICAgbWFyZ2luLXRvcDogMC41ZW07XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAgIGdhcDogdmFyKC0taGFsZi1nYXApO1xuICB9XG59Il19 */`;
|
|
764
|
+
|
|
765
|
+
// src/screens/debug.ts
|
|
766
|
+
var GuiDebug = class extends BaseSubscreen {
|
|
767
|
+
static {
|
|
768
|
+
__name(this, "GuiDebug");
|
|
769
|
+
}
|
|
770
|
+
static subscreenOptions = {
|
|
771
|
+
name: "debug"
|
|
772
|
+
};
|
|
773
|
+
get pageStructure() {
|
|
774
|
+
return [
|
|
775
|
+
[
|
|
776
|
+
{
|
|
777
|
+
type: "button",
|
|
778
|
+
id: "test-deeplib-big-button",
|
|
779
|
+
options: {
|
|
780
|
+
label: "Big Button",
|
|
781
|
+
tooltip: "This is a big button",
|
|
782
|
+
image: "Icons/Exit.png"
|
|
783
|
+
},
|
|
784
|
+
size: [405, 80],
|
|
785
|
+
onClick() {
|
|
786
|
+
deepLibLogger.info("Big Button Clicked");
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
type: "button",
|
|
791
|
+
id: "test-deeplib-small-button",
|
|
792
|
+
options: {
|
|
793
|
+
tooltip: "This is a small button",
|
|
794
|
+
image: "Icons/Exit.png"
|
|
795
|
+
},
|
|
796
|
+
size: [90, 90],
|
|
797
|
+
onClick() {
|
|
798
|
+
deepLibLogger.info("Small Button Clicked");
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
type: "checkbox",
|
|
803
|
+
id: "test-deeplib-checkbox",
|
|
804
|
+
label: "Checkbox",
|
|
805
|
+
description: "This is a checkbox",
|
|
806
|
+
setElementValue() {
|
|
807
|
+
return true;
|
|
808
|
+
},
|
|
809
|
+
setSettingValue(val) {
|
|
810
|
+
deepLibLogger.info("Checkbox value:", val);
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
type: "text",
|
|
815
|
+
id: "test-deeplib-text-input",
|
|
816
|
+
label: "Input",
|
|
817
|
+
description: "This is a text input",
|
|
818
|
+
setElementValue() {
|
|
819
|
+
return "Input Value";
|
|
820
|
+
},
|
|
821
|
+
setSettingValue(val) {
|
|
822
|
+
deepLibLogger.info("Input value:", val);
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
type: "number",
|
|
827
|
+
id: "test-deeplib-number-input",
|
|
828
|
+
label: "Input",
|
|
829
|
+
description: "This is a number input",
|
|
830
|
+
setElementValue() {
|
|
831
|
+
return "123";
|
|
832
|
+
},
|
|
833
|
+
setSettingValue(val) {
|
|
834
|
+
deepLibLogger.info("Input value:", val);
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
type: "label",
|
|
839
|
+
id: "test-deeplib-label",
|
|
840
|
+
label: "Label",
|
|
841
|
+
description: "This is a label"
|
|
842
|
+
}
|
|
843
|
+
],
|
|
844
|
+
[
|
|
845
|
+
{
|
|
846
|
+
type: "button",
|
|
847
|
+
id: "test-deeplib-big-button2",
|
|
848
|
+
options: {
|
|
849
|
+
label: "Big Button",
|
|
850
|
+
tooltip: "This is a big button",
|
|
851
|
+
image: "Icons/Exit.png"
|
|
852
|
+
},
|
|
853
|
+
size: [405, 80],
|
|
854
|
+
onClick() {
|
|
855
|
+
deepLibLogger.info("Big Button Clicked");
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
type: "button",
|
|
860
|
+
id: "test-deeplib-small-button2",
|
|
861
|
+
options: {
|
|
862
|
+
tooltip: "This is a small button",
|
|
863
|
+
image: "Icons/Next.png"
|
|
864
|
+
},
|
|
865
|
+
size: [90, 90],
|
|
866
|
+
onClick() {
|
|
867
|
+
deepLibLogger.info("Small Button Clicked");
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
type: "checkbox",
|
|
872
|
+
id: "test-deeplib-checkbox2",
|
|
873
|
+
label: "Checkbox",
|
|
874
|
+
description: "This is a checkbox",
|
|
875
|
+
setElementValue() {
|
|
876
|
+
return true;
|
|
877
|
+
},
|
|
878
|
+
setSettingValue(val) {
|
|
879
|
+
deepLibLogger.info("Checkbox value:", val);
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
type: "text",
|
|
884
|
+
id: "test-deeplib-text-input2",
|
|
885
|
+
label: "Input",
|
|
886
|
+
description: "This is a text input",
|
|
887
|
+
setElementValue() {
|
|
888
|
+
return "Input Value";
|
|
889
|
+
},
|
|
890
|
+
setSettingValue(val) {
|
|
891
|
+
deepLibLogger.info("Input value:", val);
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
type: "number",
|
|
896
|
+
id: "test-deeplib-number-input2",
|
|
897
|
+
label: "Input",
|
|
898
|
+
description: "This is a number input",
|
|
899
|
+
setElementValue() {
|
|
900
|
+
return "123";
|
|
901
|
+
},
|
|
902
|
+
setSettingValue(val) {
|
|
903
|
+
deepLibLogger.info("Input value:", val);
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
type: "label",
|
|
908
|
+
id: "test-deeplib-label2",
|
|
909
|
+
label: "Label",
|
|
910
|
+
description: "This is a label"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
type: "dropdown",
|
|
914
|
+
id: "test-deeplib-dropdown",
|
|
915
|
+
label: "Dropdown",
|
|
916
|
+
description: "This is a dropdown",
|
|
917
|
+
optionsList: ["Option 1", "Option 2", "Option 3"],
|
|
918
|
+
setElementValue() {
|
|
919
|
+
return "Option 2";
|
|
920
|
+
},
|
|
921
|
+
setSettingValue(val) {
|
|
922
|
+
deepLibLogger.info("Dropdown value:", val);
|
|
923
|
+
},
|
|
924
|
+
options: {
|
|
925
|
+
width: 200
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
]
|
|
929
|
+
];
|
|
930
|
+
}
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
// src/utilities/common.ts
|
|
934
|
+
function isPlainObject(value) {
|
|
935
|
+
return value !== null && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype && !Array.isArray(value);
|
|
936
|
+
}
|
|
937
|
+
__name(isPlainObject, "isPlainObject");
|
|
938
|
+
function deepMerge(target, source, options = { concatArrays: true, matchingOnly: false }) {
|
|
939
|
+
if (target === void 0) return source;
|
|
940
|
+
if (source === void 0) return target;
|
|
941
|
+
if (Array.isArray(target) && Array.isArray(source) && options.concatArrays) {
|
|
942
|
+
return [...target, ...source];
|
|
943
|
+
}
|
|
944
|
+
if (isPlainObject(target) && isPlainObject(source)) {
|
|
945
|
+
const result = { ...target };
|
|
946
|
+
const keys = options.matchingOnly ? Object.keys(source).filter((k) => k in target) : Object.keys(source);
|
|
947
|
+
for (const key of keys) {
|
|
948
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") continue;
|
|
949
|
+
result[key] = key in target ? deepMerge(target[key], source[key], options) : source[key];
|
|
950
|
+
}
|
|
951
|
+
return result;
|
|
952
|
+
}
|
|
953
|
+
return source;
|
|
954
|
+
}
|
|
955
|
+
__name(deepMerge, "deepMerge");
|
|
956
|
+
function shuffleArray(array) {
|
|
957
|
+
const temp = JSON.parse(JSON.stringify(array));
|
|
958
|
+
const ret = [];
|
|
959
|
+
while (temp.length > 0) {
|
|
960
|
+
const d = Math.floor(Math.random() * temp.length);
|
|
961
|
+
ret.push(temp[d]);
|
|
962
|
+
temp.splice(d, 1);
|
|
963
|
+
}
|
|
964
|
+
return ret;
|
|
965
|
+
}
|
|
966
|
+
__name(shuffleArray, "shuffleArray");
|
|
967
|
+
function exportToGlobal(name, value) {
|
|
968
|
+
const keys = name.split(".");
|
|
969
|
+
let current = globalThis;
|
|
970
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
971
|
+
if (!current[keys[i]]) {
|
|
972
|
+
current[keys[i]] = {};
|
|
973
|
+
}
|
|
974
|
+
current = current[keys[i]];
|
|
975
|
+
}
|
|
976
|
+
current[keys[keys.length - 1]] = value;
|
|
977
|
+
}
|
|
978
|
+
__name(exportToGlobal, "exportToGlobal");
|
|
979
|
+
function hasGetter(obj, prop) {
|
|
980
|
+
while (obj && obj !== Object.prototype) {
|
|
981
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
982
|
+
if (descriptor?.get) return true;
|
|
983
|
+
obj = Object.getPrototypeOf(obj);
|
|
984
|
+
}
|
|
985
|
+
return false;
|
|
986
|
+
}
|
|
987
|
+
__name(hasGetter, "hasGetter");
|
|
988
|
+
function hasSetter(obj, prop) {
|
|
989
|
+
while (obj && obj !== Object.prototype) {
|
|
990
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
991
|
+
if (descriptor?.set) return true;
|
|
992
|
+
obj = Object.getPrototypeOf(obj);
|
|
993
|
+
}
|
|
994
|
+
return false;
|
|
995
|
+
}
|
|
996
|
+
__name(hasSetter, "hasSetter");
|
|
997
|
+
var byteToKB = /* @__PURE__ */ __name((nByte) => Math.round(nByte / 100) / 10, "byteToKB");
|
|
998
|
+
|
|
999
|
+
// src/utilities/elements/elements.ts
|
|
1000
|
+
var advElement = {
|
|
1001
|
+
createButton: elementCreateButton,
|
|
1002
|
+
createCheckbox: elementCreateCheckbox,
|
|
1003
|
+
createInput: elementCreateInput,
|
|
1004
|
+
createLabel: elementCreateLabel,
|
|
1005
|
+
createCustom: elementCreateCustom,
|
|
1006
|
+
createDropdown: elementCreateDropdown,
|
|
1007
|
+
createTooltip: elementCreateTooltip,
|
|
1008
|
+
getTooltip: elementGetTooltip,
|
|
1009
|
+
setTooltip: elementSetTooltip,
|
|
1010
|
+
createBackNext: elementPrevNext
|
|
1011
|
+
};
|
|
1012
|
+
function elementCreateButton(options) {
|
|
1013
|
+
options.id ??= ElementGenerateID();
|
|
1014
|
+
const elem = document.getElementById(options.id);
|
|
1015
|
+
if (elem) return elem;
|
|
1016
|
+
options.type = "button";
|
|
1017
|
+
let image = void 0;
|
|
1018
|
+
if (options.options?.image) {
|
|
1019
|
+
image = options.options.image;
|
|
1020
|
+
options.options.image = void 0;
|
|
1021
|
+
}
|
|
1022
|
+
const disabled = typeof options?.disabled === "function" ? options?.disabled() : options?.disabled;
|
|
1023
|
+
const button = ElementButton.Create(
|
|
1024
|
+
options.id,
|
|
1025
|
+
options?.onClick ?? (() => {
|
|
1026
|
+
}),
|
|
1027
|
+
deepMerge({
|
|
1028
|
+
labelPosition: "center"
|
|
1029
|
+
}, options.options),
|
|
1030
|
+
deepMerge({
|
|
1031
|
+
button: {
|
|
1032
|
+
classList: ["deeplib-button"],
|
|
1033
|
+
attributes: {
|
|
1034
|
+
disabled
|
|
1035
|
+
},
|
|
1036
|
+
children: [
|
|
1037
|
+
image ? deepMerge({
|
|
1038
|
+
tag: "img",
|
|
1039
|
+
attributes: {
|
|
1040
|
+
id: `${options.id}-image`,
|
|
1041
|
+
alt: "",
|
|
1042
|
+
decoding: "async",
|
|
1043
|
+
loading: "lazy",
|
|
1044
|
+
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
|
|
1045
|
+
// 1x1 transparent image to get rid of broken image
|
|
1046
|
+
},
|
|
1047
|
+
style: {
|
|
1048
|
+
"--image": `url("${image}")`
|
|
1049
|
+
}
|
|
1050
|
+
}, options.htmlOptions?.img) : void 0
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
}, options.htmlOptions ?? {})
|
|
1054
|
+
);
|
|
1055
|
+
BaseSubscreen.currentElements.push([button, options]);
|
|
1056
|
+
return button;
|
|
1057
|
+
}
|
|
1058
|
+
__name(elementCreateButton, "elementCreateButton");
|
|
1059
|
+
function elementCreateCheckbox(options) {
|
|
1060
|
+
const elem = document.getElementById(options.id);
|
|
1061
|
+
if (elem) return elem;
|
|
1062
|
+
options.type = "checkbox";
|
|
1063
|
+
const disabled = typeof options?.disabled === "function" ? options?.disabled() : options?.disabled;
|
|
1064
|
+
const retElem = ElementCreate(deepMerge({
|
|
1065
|
+
tag: "label",
|
|
1066
|
+
classList: ["deeplib-checkbox-container"],
|
|
1067
|
+
attributes: {
|
|
1068
|
+
id: `${options.id}-container`,
|
|
1069
|
+
for: options.id
|
|
1070
|
+
},
|
|
1071
|
+
children: [
|
|
1072
|
+
deepMerge({
|
|
1073
|
+
tag: "input",
|
|
1074
|
+
classList: ["checkbox", "deeplib-input"],
|
|
1075
|
+
attributes: {
|
|
1076
|
+
type: "checkbox",
|
|
1077
|
+
id: options.id,
|
|
1078
|
+
disabled,
|
|
1079
|
+
checked: options?.setElementValue?.() || void 0
|
|
1080
|
+
},
|
|
1081
|
+
eventListeners: {
|
|
1082
|
+
change: /* @__PURE__ */ __name(function() {
|
|
1083
|
+
options?.setSettingValue?.(this.checked);
|
|
1084
|
+
}, "change")
|
|
1085
|
+
}
|
|
1086
|
+
}, options.htmlOptions?.checkbox),
|
|
1087
|
+
deepMerge({
|
|
1088
|
+
tag: "span",
|
|
1089
|
+
classList: ["deeplib-text"],
|
|
1090
|
+
attributes: {
|
|
1091
|
+
id: `${options.id}-label`
|
|
1092
|
+
},
|
|
1093
|
+
children: [options.label]
|
|
1094
|
+
}, options.htmlOptions?.label)
|
|
1095
|
+
]
|
|
1096
|
+
}, options.htmlOptions?.container));
|
|
1097
|
+
if (options.description) {
|
|
1098
|
+
retElem.addEventListener("mouseover", () => {
|
|
1099
|
+
elementSetTooltip(options.description || "");
|
|
1100
|
+
});
|
|
1101
|
+
retElem.addEventListener("mouseout", () => {
|
|
1102
|
+
elementSetTooltip("");
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
BaseSubscreen.currentElements.push([retElem, options]);
|
|
1106
|
+
return retElem;
|
|
1107
|
+
}
|
|
1108
|
+
__name(elementCreateCheckbox, "elementCreateCheckbox");
|
|
1109
|
+
function elementCreateCustom(options) {
|
|
1110
|
+
options.id ??= ElementGenerateID();
|
|
1111
|
+
options.htmlOptions.attributes ??= {};
|
|
1112
|
+
options.htmlOptions.attributes.id ??= options.id;
|
|
1113
|
+
const elem = document.getElementById(options.htmlOptions.attributes.id);
|
|
1114
|
+
if (elem) return elem;
|
|
1115
|
+
options.type = "custom";
|
|
1116
|
+
const retElem = ElementCreate(options.htmlOptions);
|
|
1117
|
+
BaseSubscreen.currentElements.push([retElem, options]);
|
|
1118
|
+
return retElem;
|
|
1119
|
+
}
|
|
1120
|
+
__name(elementCreateCustom, "elementCreateCustom");
|
|
1121
|
+
function elementCreateInput(options) {
|
|
1122
|
+
const elem = document.getElementById(options.id);
|
|
1123
|
+
if (elem) return elem;
|
|
1124
|
+
const disabled = typeof options?.disabled === "function" ? options?.disabled() : options?.disabled;
|
|
1125
|
+
const retElem = ElementCreate(deepMerge({
|
|
1126
|
+
tag: "label",
|
|
1127
|
+
classList: ["deeplib-input-container"],
|
|
1128
|
+
attributes: {
|
|
1129
|
+
id: `${options.id}-container`,
|
|
1130
|
+
for: options.id
|
|
1131
|
+
},
|
|
1132
|
+
children: [
|
|
1133
|
+
deepMerge({
|
|
1134
|
+
tag: "input",
|
|
1135
|
+
classList: ["deeplib-input"],
|
|
1136
|
+
attributes: {
|
|
1137
|
+
type: options.type,
|
|
1138
|
+
id: options.id,
|
|
1139
|
+
placeholder: " ",
|
|
1140
|
+
disabled,
|
|
1141
|
+
value: options?.setElementValue?.() || void 0
|
|
1142
|
+
},
|
|
1143
|
+
eventListeners: {
|
|
1144
|
+
input: /* @__PURE__ */ __name(function() {
|
|
1145
|
+
options?.setSettingValue?.(this.value);
|
|
1146
|
+
}, "input")
|
|
1147
|
+
}
|
|
1148
|
+
}, options.htmlOptions?.input),
|
|
1149
|
+
options.label ? deepMerge({
|
|
1150
|
+
tag: "span",
|
|
1151
|
+
classList: ["deeplib-text"],
|
|
1152
|
+
attributes: {
|
|
1153
|
+
id: `${options.id}-label`
|
|
1154
|
+
},
|
|
1155
|
+
children: [options.label]
|
|
1156
|
+
}, options.htmlOptions?.label) : void 0
|
|
1157
|
+
]
|
|
1158
|
+
}, options.htmlOptions?.container));
|
|
1159
|
+
if (options.description) {
|
|
1160
|
+
retElem.addEventListener("mouseover", () => {
|
|
1161
|
+
elementSetTooltip(options.description || "");
|
|
1162
|
+
});
|
|
1163
|
+
retElem.addEventListener("mouseout", () => {
|
|
1164
|
+
elementSetTooltip("");
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
BaseSubscreen.currentElements.push([retElem, options]);
|
|
1168
|
+
return retElem;
|
|
1169
|
+
}
|
|
1170
|
+
__name(elementCreateInput, "elementCreateInput");
|
|
1171
|
+
function elementCreateLabel(options) {
|
|
1172
|
+
const elem = document.getElementById(options.id);
|
|
1173
|
+
if (elem) return elem;
|
|
1174
|
+
options.type = "label";
|
|
1175
|
+
const retElem = ElementCreate(deepMerge({
|
|
1176
|
+
tag: "label",
|
|
1177
|
+
classList: ["deeplib-label", "deeplib-text"],
|
|
1178
|
+
attributes: {
|
|
1179
|
+
id: options.id
|
|
1180
|
+
},
|
|
1181
|
+
children: [
|
|
1182
|
+
options.label
|
|
1183
|
+
]
|
|
1184
|
+
}, options.htmlOptions));
|
|
1185
|
+
if (options.description) {
|
|
1186
|
+
retElem.addEventListener("mouseover", () => {
|
|
1187
|
+
elementSetTooltip(options.description || "");
|
|
1188
|
+
});
|
|
1189
|
+
retElem.addEventListener("mouseout", () => {
|
|
1190
|
+
elementSetTooltip("");
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
BaseSubscreen.currentElements.push([retElem, options]);
|
|
1194
|
+
return retElem;
|
|
1195
|
+
}
|
|
1196
|
+
__name(elementCreateLabel, "elementCreateLabel");
|
|
1197
|
+
function elementCreateDropdown(options) {
|
|
1198
|
+
options.id ??= ElementGenerateID();
|
|
1199
|
+
const elem = document.getElementById(`${options.id}-container`);
|
|
1200
|
+
if (elem) return elem;
|
|
1201
|
+
options.type = "dropdown";
|
|
1202
|
+
const retElem = ElementCreate(deepMerge({
|
|
1203
|
+
tag: "label",
|
|
1204
|
+
classList: ["deeplib-dropdown-container"],
|
|
1205
|
+
attributes: {
|
|
1206
|
+
id: `${options.id}-container`,
|
|
1207
|
+
for: options.id
|
|
1208
|
+
},
|
|
1209
|
+
children: [
|
|
1210
|
+
options.label ? deepMerge({
|
|
1211
|
+
tag: "span",
|
|
1212
|
+
classList: ["deeplib-text"],
|
|
1213
|
+
attributes: {
|
|
1214
|
+
id: `${options.id}-label`
|
|
1215
|
+
},
|
|
1216
|
+
children: [options.label]
|
|
1217
|
+
}, options.htmlOptions?.label) : void 0,
|
|
1218
|
+
ElementCreateDropdown(
|
|
1219
|
+
options.id,
|
|
1220
|
+
options.optionsList,
|
|
1221
|
+
function() {
|
|
1222
|
+
return options.setSettingValue?.(this.value);
|
|
1223
|
+
},
|
|
1224
|
+
options.options,
|
|
1225
|
+
options.htmlOptions?.select
|
|
1226
|
+
)
|
|
1227
|
+
],
|
|
1228
|
+
eventListeners: {
|
|
1229
|
+
mouseover: /* @__PURE__ */ __name(function() {
|
|
1230
|
+
elementSetTooltip(options.description ?? "");
|
|
1231
|
+
}, "mouseover"),
|
|
1232
|
+
mouseout: /* @__PURE__ */ __name(function() {
|
|
1233
|
+
elementSetTooltip("");
|
|
1234
|
+
}, "mouseout")
|
|
1235
|
+
}
|
|
1236
|
+
}, options.htmlOptions?.container));
|
|
1237
|
+
BaseSubscreen.currentElements.push([retElem, options]);
|
|
1238
|
+
return retElem;
|
|
1239
|
+
}
|
|
1240
|
+
__name(elementCreateDropdown, "elementCreateDropdown");
|
|
1241
|
+
function elementCreateTooltip() {
|
|
1242
|
+
const element = ElementCreate({
|
|
1243
|
+
tag: "div",
|
|
1244
|
+
classList: ["deeplib-tooltip"],
|
|
1245
|
+
attributes: {
|
|
1246
|
+
id: "deeplib-tooltip"
|
|
1247
|
+
},
|
|
1248
|
+
style: {
|
|
1249
|
+
display: "none"
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
return element;
|
|
1253
|
+
}
|
|
1254
|
+
__name(elementCreateTooltip, "elementCreateTooltip");
|
|
1255
|
+
function elementGetTooltip() {
|
|
1256
|
+
return document.getElementById("deeplib-tooltip") ?? void 0;
|
|
1257
|
+
}
|
|
1258
|
+
__name(elementGetTooltip, "elementGetTooltip");
|
|
1259
|
+
function elementSetTooltip(text) {
|
|
1260
|
+
const element = document.getElementById("deeplib-tooltip");
|
|
1261
|
+
if (!element) return false;
|
|
1262
|
+
element.innerHTML = text;
|
|
1263
|
+
if (text === "") element.style.display = "none";
|
|
1264
|
+
else element.style.display = "";
|
|
1265
|
+
return true;
|
|
1266
|
+
}
|
|
1267
|
+
__name(elementSetTooltip, "elementSetTooltip");
|
|
1268
|
+
function elementPrevNext(options) {
|
|
1269
|
+
const elem = document.getElementById(options.id);
|
|
1270
|
+
if (elem) return elem;
|
|
1271
|
+
const setLabel = /* @__PURE__ */ __name((label) => {
|
|
1272
|
+
const elem2 = document.getElementById(`${options.id}-label`);
|
|
1273
|
+
if (!elem2) return false;
|
|
1274
|
+
elem2.textContent = label;
|
|
1275
|
+
}, "setLabel");
|
|
1276
|
+
const setPrevTooltip = /* @__PURE__ */ __name((tooltip) => {
|
|
1277
|
+
const elem2 = document.getElementById(`deeplib-prev-next-${options.id}-prev-button-tooltip`);
|
|
1278
|
+
if (!elem2) return false;
|
|
1279
|
+
elem2.textContent = tooltip;
|
|
1280
|
+
}, "setPrevTooltip");
|
|
1281
|
+
const setNextTooltip = /* @__PURE__ */ __name((tooltip) => {
|
|
1282
|
+
const elem2 = document.getElementById(`deeplib-prev-next-${options.id}-next-button-tooltip`);
|
|
1283
|
+
if (!elem2) return false;
|
|
1284
|
+
elem2.textContent = tooltip;
|
|
1285
|
+
}, "setNextTooltip");
|
|
1286
|
+
const retElem = ElementCreate({
|
|
1287
|
+
tag: "div",
|
|
1288
|
+
classList: ["deeplib-prev-next"],
|
|
1289
|
+
attributes: {
|
|
1290
|
+
id: options.id
|
|
1291
|
+
},
|
|
1292
|
+
children: [
|
|
1293
|
+
advElement.createButton({
|
|
1294
|
+
id: `deeplib-prev-next-${options.id}-prev-button`,
|
|
1295
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1296
|
+
options.back({
|
|
1297
|
+
setLabel,
|
|
1298
|
+
setBackTooltip: setPrevTooltip,
|
|
1299
|
+
setNextTooltip
|
|
1300
|
+
});
|
|
1301
|
+
}, "onClick"),
|
|
1302
|
+
htmlOptions: {
|
|
1303
|
+
button: {
|
|
1304
|
+
classList: ["deeplib-prev-next-button"]
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
options: {
|
|
1308
|
+
noStyling: true,
|
|
1309
|
+
image: `${PUBLIC_URL}/dl_images/arrow_left.svg`,
|
|
1310
|
+
tooltip: options.initialPrevTooltip
|
|
1311
|
+
}
|
|
1312
|
+
}),
|
|
1313
|
+
advElement.createLabel({
|
|
1314
|
+
id: `${options.id}-label`,
|
|
1315
|
+
label: options.initialLabel,
|
|
1316
|
+
htmlOptions: {
|
|
1317
|
+
classList: ["deeplib-prev-next-label"]
|
|
1318
|
+
}
|
|
1319
|
+
}),
|
|
1320
|
+
advElement.createButton({
|
|
1321
|
+
id: `deeplib-prev-next-${options.id}-next-button`,
|
|
1322
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1323
|
+
options.next({
|
|
1324
|
+
setLabel,
|
|
1325
|
+
setBackTooltip: setPrevTooltip,
|
|
1326
|
+
setNextTooltip
|
|
1327
|
+
});
|
|
1328
|
+
}, "onClick"),
|
|
1329
|
+
htmlOptions: {
|
|
1330
|
+
button: {
|
|
1331
|
+
classList: ["deeplib-prev-next-button"]
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
options: {
|
|
1335
|
+
noStyling: true,
|
|
1336
|
+
image: `${PUBLIC_URL}/dl_images/arrow_right.svg`,
|
|
1337
|
+
tooltip: options.initialNextTooltip
|
|
1338
|
+
}
|
|
1339
|
+
})
|
|
1340
|
+
]
|
|
1341
|
+
});
|
|
1342
|
+
return retElem;
|
|
1343
|
+
}
|
|
1344
|
+
__name(elementPrevNext, "elementPrevNext");
|
|
1345
|
+
|
|
1346
|
+
// src/screens/main_menu.ts
|
|
1347
|
+
var MainMenu = class _MainMenu extends BaseSubscreen {
|
|
1348
|
+
static {
|
|
1349
|
+
__name(this, "MainMenu");
|
|
1350
|
+
}
|
|
1351
|
+
subscreens = [];
|
|
1352
|
+
static options = {};
|
|
1353
|
+
static subscreenOptions = {
|
|
1354
|
+
name: "mainmenu",
|
|
1355
|
+
doShowExitButton: false,
|
|
1356
|
+
settingsWidth: 600
|
|
1357
|
+
};
|
|
1358
|
+
constructor(module) {
|
|
1359
|
+
super(module);
|
|
1360
|
+
this.subscreens = module.subscreens;
|
|
1361
|
+
}
|
|
1362
|
+
load() {
|
|
1363
|
+
if (!GUI.instance || CurrentModule !== "DeepLibMod") {
|
|
1364
|
+
this.setSubscreen(this);
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
super.load();
|
|
1368
|
+
const exitButton = advElement.createButton({
|
|
1369
|
+
id: "exit",
|
|
1370
|
+
size: [90, 90],
|
|
1371
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1372
|
+
this.exit();
|
|
1373
|
+
}, "onClick"),
|
|
1374
|
+
options: {
|
|
1375
|
+
image: `${PUBLIC_URL}/dl_images/exit.svg`,
|
|
1376
|
+
tooltip: getText("settings.button.back_button_hint")
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
const menu = document.getElementById("deeplib-nav-menu");
|
|
1380
|
+
if (menu) {
|
|
1381
|
+
ElementMenu.AppendButton(menu, exitButton);
|
|
1382
|
+
}
|
|
1383
|
+
for (const screen of this.subscreens) {
|
|
1384
|
+
if (screen.options.name === "mainmenu") continue;
|
|
1385
|
+
const button = advElement.createButton({
|
|
1386
|
+
id: `${screen.options.name}-button`,
|
|
1387
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1388
|
+
this.setSubscreen(screen);
|
|
1389
|
+
}, "onClick"),
|
|
1390
|
+
size: [null, 90],
|
|
1391
|
+
options: {
|
|
1392
|
+
image: screen.options.icon,
|
|
1393
|
+
label: getText(`mainmenu.button.${screen.options.name}`)
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
layout.appendToSettingsDiv(button);
|
|
1397
|
+
}
|
|
1398
|
+
const miscDiv = layout.getMiscDiv();
|
|
1399
|
+
layout.appendToSubscreen(miscDiv);
|
|
1400
|
+
if (_MainMenu.options.wikiLink) {
|
|
1401
|
+
const wikiButton = advElement.createButton({
|
|
1402
|
+
id: "deeplib-wiki-button",
|
|
1403
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1404
|
+
window.open(_MainMenu.options.wikiLink, "_blank");
|
|
1405
|
+
}, "onClick"),
|
|
1406
|
+
size: [null, 80],
|
|
1407
|
+
options: {
|
|
1408
|
+
image: `${PUBLIC_URL}/dl_images/notebook.svg`,
|
|
1409
|
+
label: getText("mainmenu.button.wiki")
|
|
1410
|
+
}
|
|
1411
|
+
});
|
|
1412
|
+
layout.appendToMiscDiv(wikiButton);
|
|
1413
|
+
}
|
|
1414
|
+
if (_MainMenu.options.repoLink) {
|
|
1415
|
+
const repoButton = advElement.createButton({
|
|
1416
|
+
id: "deeplib-repo-button",
|
|
1417
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1418
|
+
window.open(_MainMenu.options.repoLink, "_blank");
|
|
1419
|
+
}, "onClick"),
|
|
1420
|
+
size: [null, 80],
|
|
1421
|
+
options: {
|
|
1422
|
+
image: `${PUBLIC_URL}/dl_images/git.svg`,
|
|
1423
|
+
label: getText("mainmenu.button.repo")
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
layout.appendToMiscDiv(repoButton);
|
|
1427
|
+
}
|
|
1428
|
+
if (_MainMenu.options.resetSubscreen) {
|
|
1429
|
+
const resetButton = advElement.createButton({
|
|
1430
|
+
id: "deeplib-reset-button",
|
|
1431
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1432
|
+
this.setSubscreen(_MainMenu.options.resetSubscreen);
|
|
1433
|
+
}, "onClick"),
|
|
1434
|
+
size: [null, 80],
|
|
1435
|
+
options: {
|
|
1436
|
+
image: `${PUBLIC_URL}/dl_images/trash_bin.svg`,
|
|
1437
|
+
label: getText("mainmenu.button.reset")
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
layout.appendToMiscDiv(resetButton);
|
|
1441
|
+
}
|
|
1442
|
+
if (_MainMenu.options.importExportSubscreen) {
|
|
1443
|
+
const importExportButton = advElement.createButton({
|
|
1444
|
+
id: "deeplib-import-export-button",
|
|
1445
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1446
|
+
this.setSubscreen(_MainMenu.options.importExportSubscreen);
|
|
1447
|
+
}, "onClick"),
|
|
1448
|
+
size: [null, 80],
|
|
1449
|
+
options: {
|
|
1450
|
+
image: `${PUBLIC_URL}/dl_images/transfer.svg`,
|
|
1451
|
+
label: getText("mainmenu.button.import_export")
|
|
1452
|
+
}
|
|
1453
|
+
});
|
|
1454
|
+
layout.appendToMiscDiv(importExportButton);
|
|
1455
|
+
}
|
|
1456
|
+
if (_MainMenu.options.storageFullnessIndicator) {
|
|
1457
|
+
const maxStorageCapacityKB = 180;
|
|
1458
|
+
const currentStorageCapacityKB = byteToKB(ModStorage.measureSize(modStorage.extensionStorage));
|
|
1459
|
+
const fullness = (currentStorageCapacityKB / maxStorageCapacityKB * 100).toFixed(1);
|
|
1460
|
+
const storageFullnessWrapper = advElement.createButton({
|
|
1461
|
+
id: CommonGenerateUniqueID(),
|
|
1462
|
+
size: [null, 80],
|
|
1463
|
+
options: {
|
|
1464
|
+
tooltipPosition: "left",
|
|
1465
|
+
noStyling: true,
|
|
1466
|
+
tooltip: CommonStringPartitionReplace(getText("mainmenu.meter.storage_hint"), {
|
|
1467
|
+
$percentage$: `${fullness}`
|
|
1468
|
+
}).join(""),
|
|
1469
|
+
label: CommonStringPartitionReplace(getText("mainmenu.meter.storage_label"), {
|
|
1470
|
+
$currentCapacity$: `${currentStorageCapacityKB}`,
|
|
1471
|
+
$maxCapacity$: `${maxStorageCapacityKB}`
|
|
1472
|
+
}).join("")
|
|
1473
|
+
},
|
|
1474
|
+
htmlOptions: {
|
|
1475
|
+
button: {
|
|
1476
|
+
children: [
|
|
1477
|
+
{
|
|
1478
|
+
tag: "div",
|
|
1479
|
+
attributes: { id: "deeplib-storage-meter" },
|
|
1480
|
+
children: [
|
|
1481
|
+
{
|
|
1482
|
+
tag: "div",
|
|
1483
|
+
attributes: { id: "deeplib-storage-bar" },
|
|
1484
|
+
style: { width: `${fullness}%` }
|
|
1485
|
+
}
|
|
1486
|
+
]
|
|
1487
|
+
}
|
|
1488
|
+
]
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
layout.appendToMiscDiv(storageFullnessWrapper);
|
|
1493
|
+
}
|
|
1494
|
+
if (IS_DEBUG) {
|
|
1495
|
+
const debugButton = advElement.createButton({
|
|
1496
|
+
id: "deeplib-debug-button",
|
|
1497
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
1498
|
+
this.setSubscreen(new GuiDebug());
|
|
1499
|
+
}, "onClick"),
|
|
1500
|
+
size: [90, 90],
|
|
1501
|
+
options: {
|
|
1502
|
+
image: `${PUBLIC_URL}/dl_images/bug.svg`
|
|
1503
|
+
}
|
|
1504
|
+
});
|
|
1505
|
+
if (menu) {
|
|
1506
|
+
ElementMenu.PrependItem(menu, debugButton);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
run() {
|
|
1511
|
+
super.run();
|
|
1512
|
+
}
|
|
1513
|
+
click() {
|
|
1514
|
+
}
|
|
1515
|
+
exit() {
|
|
1516
|
+
CharacterAppearanceForceUpCharacter = -1;
|
|
1517
|
+
CharacterLoadCanvas(Player);
|
|
1518
|
+
const returnScreen = typeof this.options.returnScreen === "function" ? this.options.returnScreen() : this.options.returnScreen;
|
|
1519
|
+
if (!returnScreen) {
|
|
1520
|
+
PreferenceOpenSubscreen("Extensions").then(() => {
|
|
1521
|
+
PreferenceSubscreenExtensionsClear();
|
|
1522
|
+
});
|
|
1523
|
+
} else if (returnScreen instanceof BaseSubscreen) {
|
|
1524
|
+
setSubscreen(returnScreen).then(() => {
|
|
1525
|
+
});
|
|
1526
|
+
} else if (Array.isArray(returnScreen)) {
|
|
1527
|
+
CommonSetScreen(...returnScreen);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
resize() {
|
|
1531
|
+
super.resize();
|
|
1532
|
+
ElementSetPosition("deeplib-misc", 1905, 930, "bottom-right");
|
|
1533
|
+
ElementSetSize("deeplib-misc", 405, null);
|
|
1534
|
+
}
|
|
1535
|
+
static setOptions(mainMenuOptions) {
|
|
1536
|
+
_MainMenu.options = mainMenuOptions;
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
|
|
1540
|
+
// src/utilities/translation.ts
|
|
1541
|
+
var Localization = class _Localization {
|
|
1542
|
+
static {
|
|
1543
|
+
__name(this, "Localization");
|
|
1544
|
+
}
|
|
1545
|
+
static LibTranslation = {};
|
|
1546
|
+
static ModTranslation = {};
|
|
1547
|
+
static PathToModTranslation;
|
|
1548
|
+
static PathToLibTranslation = `${PUBLIC_URL}/dl_translations/`;
|
|
1549
|
+
static DefaultLanguage = "en";
|
|
1550
|
+
/** Flag to prevent re-initialization */
|
|
1551
|
+
static initialized = false;
|
|
1552
|
+
/** Initialize the localization system by loading translation files. */
|
|
1553
|
+
static async init(initOptions) {
|
|
1554
|
+
if (_Localization.initialized) return;
|
|
1555
|
+
_Localization.initialized = true;
|
|
1556
|
+
_Localization.PathToModTranslation = (() => {
|
|
1557
|
+
if (!initOptions?.pathToTranslationsFolder) return void 0;
|
|
1558
|
+
return initOptions.pathToTranslationsFolder.endsWith("/") ? initOptions.pathToTranslationsFolder : `${initOptions.pathToTranslationsFolder}/`;
|
|
1559
|
+
})();
|
|
1560
|
+
_Localization.DefaultLanguage = initOptions?.defaultLanguage || _Localization.DefaultLanguage;
|
|
1561
|
+
const lang = initOptions?.fixedLanguage ? _Localization.DefaultLanguage : TranslationLanguage.toLowerCase();
|
|
1562
|
+
const libTranslation = await _Localization.fetchLanguageFile(_Localization.PathToLibTranslation, lang);
|
|
1563
|
+
if (lang === _Localization.DefaultLanguage) {
|
|
1564
|
+
_Localization.LibTranslation = libTranslation;
|
|
1565
|
+
} else {
|
|
1566
|
+
const fallbackTranslation = await _Localization.fetchLanguageFile(_Localization.PathToLibTranslation, _Localization.DefaultLanguage);
|
|
1567
|
+
_Localization.LibTranslation = { ...fallbackTranslation, ...libTranslation };
|
|
1568
|
+
}
|
|
1569
|
+
if (!_Localization.PathToModTranslation) return;
|
|
1570
|
+
const modTranslation = await _Localization.fetchLanguageFile(_Localization.PathToModTranslation, lang);
|
|
1571
|
+
if (lang === _Localization.DefaultLanguage) {
|
|
1572
|
+
_Localization.ModTranslation = modTranslation;
|
|
1573
|
+
} else {
|
|
1574
|
+
const fallbackTranslation = await _Localization.fetchLanguageFile(_Localization.PathToModTranslation, _Localization.DefaultLanguage);
|
|
1575
|
+
_Localization.ModTranslation = { ...fallbackTranslation, ...modTranslation };
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
/** Get a translated string from mod translations by source tag. */
|
|
1579
|
+
static getTextMod(srcTag) {
|
|
1580
|
+
return _Localization.ModTranslation?.[srcTag] || void 0;
|
|
1581
|
+
}
|
|
1582
|
+
/** Get a translated string from library translations by source tag. */
|
|
1583
|
+
static getTextLib(srcTag) {
|
|
1584
|
+
return _Localization.LibTranslation?.[srcTag] || void 0;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Fetch and parse a language file from the given base URL and language code.
|
|
1588
|
+
* Falls back to default language if the requested language file is unavailable.
|
|
1589
|
+
*/
|
|
1590
|
+
static async fetchLanguageFile(baseUrl, lang) {
|
|
1591
|
+
const response = await fetch(`${baseUrl}${lang}.lang`);
|
|
1592
|
+
if (lang !== _Localization.DefaultLanguage && !response.ok) {
|
|
1593
|
+
return this.fetchLanguageFile(baseUrl, _Localization.DefaultLanguage);
|
|
1594
|
+
}
|
|
1595
|
+
if (!response.ok) {
|
|
1596
|
+
return {};
|
|
1597
|
+
}
|
|
1598
|
+
const langFileContent = await response.text();
|
|
1599
|
+
return this.parseLanguageFile(langFileContent);
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Parse the raw content of a language file into a TranslationDict.
|
|
1603
|
+
* Ignores empty lines and comments starting with '#'.
|
|
1604
|
+
*/
|
|
1605
|
+
static parseLanguageFile(content) {
|
|
1606
|
+
const translations = {};
|
|
1607
|
+
const lines = content.split("\n");
|
|
1608
|
+
for (const line of lines) {
|
|
1609
|
+
const trimmed = line.trim();
|
|
1610
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
1611
|
+
const [key, ...rest] = trimmed.split("=");
|
|
1612
|
+
translations[key.trim()] = rest.join("=").trim();
|
|
1613
|
+
}
|
|
1614
|
+
return translations;
|
|
1615
|
+
}
|
|
1616
|
+
};
|
|
1617
|
+
var getText = /* @__PURE__ */ __name((srcTag) => {
|
|
1618
|
+
return Localization.getTextMod(srcTag) || Localization.getTextLib(srcTag) || srcTag;
|
|
1619
|
+
}, "getText");
|
|
1620
|
+
|
|
1621
|
+
// src/utilities/elements/modal.ts
|
|
1622
|
+
var Modal = class _Modal {
|
|
1623
|
+
constructor(opts) {
|
|
1624
|
+
this.opts = opts;
|
|
1625
|
+
opts ??= {};
|
|
1626
|
+
opts.closeOnBackdrop ??= true;
|
|
1627
|
+
const promptId = `modal-prompt-${Date.now()}`;
|
|
1628
|
+
const prompt = (CommonIsArray(opts.prompt) ? opts.prompt : [opts.prompt]).filter((i) => i !== null) ?? [""];
|
|
1629
|
+
this.dialog = ElementCreate({
|
|
1630
|
+
tag: "dialog",
|
|
1631
|
+
classList: ["deeplib-modal"],
|
|
1632
|
+
attributes: {
|
|
1633
|
+
id: this.opts.modalId ?? `modal-${Date.now()}`,
|
|
1634
|
+
role: "dialog",
|
|
1635
|
+
"aria-modal": "true",
|
|
1636
|
+
"aria-labelledby": promptId
|
|
1637
|
+
},
|
|
1638
|
+
style: {
|
|
1639
|
+
fontFamily: CommonGetFontName()
|
|
1640
|
+
},
|
|
1641
|
+
children: [
|
|
1642
|
+
{
|
|
1643
|
+
tag: "div",
|
|
1644
|
+
classList: ["deeplib-modal-prompt-container"],
|
|
1645
|
+
children: [
|
|
1646
|
+
...prompt
|
|
1647
|
+
]
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
tag: "div",
|
|
1651
|
+
classList: ["deeplib-modal-prompt"],
|
|
1652
|
+
attributes: {
|
|
1653
|
+
id: promptId
|
|
1654
|
+
},
|
|
1655
|
+
children: [
|
|
1656
|
+
opts.input ? this.renderInput(opts.input) : void 0
|
|
1657
|
+
]
|
|
1658
|
+
},
|
|
1659
|
+
this.renderButtons()
|
|
1660
|
+
]
|
|
1661
|
+
});
|
|
1662
|
+
this.blocker = this.createBlocker();
|
|
1663
|
+
this.renderButtons();
|
|
1664
|
+
document.body.append(this.createBlocker(), this.dialog);
|
|
1665
|
+
this.setupFocusTrap();
|
|
1666
|
+
if (opts.timeoutMs) {
|
|
1667
|
+
this.timeoutId = window.setTimeout(() => this.close("timeout"), opts.timeoutMs);
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
static {
|
|
1671
|
+
__name(this, "Modal");
|
|
1672
|
+
}
|
|
1673
|
+
dialog;
|
|
1674
|
+
blocker;
|
|
1675
|
+
inputEl;
|
|
1676
|
+
timeoutId;
|
|
1677
|
+
/** Static modal queue. */
|
|
1678
|
+
static queue = [];
|
|
1679
|
+
/** Flag to indicate if a modal is currently being shown. */
|
|
1680
|
+
static processing = false;
|
|
1681
|
+
/**
|
|
1682
|
+
* Displays the modal and resolves with the chosen action and input value.
|
|
1683
|
+
*/
|
|
1684
|
+
show() {
|
|
1685
|
+
return _Modal.enqueue(this);
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* Shows a simple alert modal with a single "OK" button.
|
|
1689
|
+
*/
|
|
1690
|
+
static async alert(msg, opts = {}) {
|
|
1691
|
+
await new _Modal({
|
|
1692
|
+
prompt: msg,
|
|
1693
|
+
buttons: [{ action: "close", text: getText("modal.button.ok") }],
|
|
1694
|
+
timeoutMs: opts.timeoutMs,
|
|
1695
|
+
escapeAction: "close",
|
|
1696
|
+
modalId: opts.modalId
|
|
1697
|
+
}).show();
|
|
1698
|
+
}
|
|
1699
|
+
/**
|
|
1700
|
+
* Shows a confirmation modal with "Cancel" and "OK" buttons.
|
|
1701
|
+
* Returns true if "OK" is clicked.
|
|
1702
|
+
*/
|
|
1703
|
+
static async confirm(msg, opts = {}) {
|
|
1704
|
+
const [action] = await new _Modal({
|
|
1705
|
+
prompt: msg,
|
|
1706
|
+
buttons: [{ text: getText("modal.button.decline"), action: "decline" }, { text: getText("modal.button.confirm"), action: "confirm" }],
|
|
1707
|
+
escapeAction: "decline",
|
|
1708
|
+
enterAction: "confirm",
|
|
1709
|
+
modalId: opts.modalId
|
|
1710
|
+
}).show();
|
|
1711
|
+
return action === "confirm";
|
|
1712
|
+
}
|
|
1713
|
+
/**
|
|
1714
|
+
* Shows a prompt modal with an input field and "Submit"/"Cancel" buttons.
|
|
1715
|
+
* Returns the input value if submitted, otherwise null.
|
|
1716
|
+
*/
|
|
1717
|
+
static async prompt(msg, opts = {}) {
|
|
1718
|
+
const [action, value] = await new _Modal({
|
|
1719
|
+
prompt: msg,
|
|
1720
|
+
timeoutMs: 0,
|
|
1721
|
+
input: { type: "input", defaultValue: opts.defaultValue },
|
|
1722
|
+
buttons: [{ text: getText("modal.button.cancel"), action: "cancel" }, { text: getText("modal.button.submit"), action: "submit" }],
|
|
1723
|
+
escapeAction: "cancel",
|
|
1724
|
+
enterAction: "submit",
|
|
1725
|
+
modalId: opts.modalId
|
|
1726
|
+
}).show();
|
|
1727
|
+
return action === "submit" ? value : null;
|
|
1728
|
+
}
|
|
1729
|
+
/** Creates the input element for the modal, applying configuration and validation. */
|
|
1730
|
+
renderInput(cfg) {
|
|
1731
|
+
const el = document.createElement(cfg.type);
|
|
1732
|
+
el.classList.add("deeplib-modal-input");
|
|
1733
|
+
if (cfg.placeholder) el.placeholder = cfg.placeholder;
|
|
1734
|
+
if (cfg.readOnly) el.readOnly = true;
|
|
1735
|
+
if (cfg.defaultValue) el.value = cfg.defaultValue;
|
|
1736
|
+
if (cfg.type === "textarea") el.rows = 5;
|
|
1737
|
+
el.addEventListener("input", () => {
|
|
1738
|
+
const err = cfg.validate?.(el.value);
|
|
1739
|
+
el.setCustomValidity(err || "");
|
|
1740
|
+
});
|
|
1741
|
+
this.inputEl = el;
|
|
1742
|
+
return el;
|
|
1743
|
+
}
|
|
1744
|
+
/** Creates modal action buttons from configuration. */
|
|
1745
|
+
renderButtons() {
|
|
1746
|
+
const container = document.createElement("div");
|
|
1747
|
+
container.classList.add("deeplib-modal-button-container");
|
|
1748
|
+
const btns = this.opts.buttons ? [...this.opts.buttons] : [];
|
|
1749
|
+
btns.forEach((b) => {
|
|
1750
|
+
const btn = advElement.createButton({
|
|
1751
|
+
id: `deeplib-modal-${b.action}`,
|
|
1752
|
+
onClick: /* @__PURE__ */ __name(() => this.close(b.action), "onClick"),
|
|
1753
|
+
options: {
|
|
1754
|
+
disabled: b.disabled,
|
|
1755
|
+
label: b.text
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
container.append(btn);
|
|
1759
|
+
});
|
|
1760
|
+
return container;
|
|
1761
|
+
}
|
|
1762
|
+
/** Creates the modal backdrop blocker with optional click-to-close behavior. */
|
|
1763
|
+
createBlocker() {
|
|
1764
|
+
const blocker = document.createElement("div");
|
|
1765
|
+
blocker.classList.add("deeplib-modal-blocker");
|
|
1766
|
+
blocker.title = "Click to close";
|
|
1767
|
+
if (this.opts.closeOnBackdrop !== false)
|
|
1768
|
+
blocker.addEventListener("click", () => this.close("close"));
|
|
1769
|
+
return blocker;
|
|
1770
|
+
}
|
|
1771
|
+
/** Implements a focus trap to keep keyboard navigation inside the modal. */
|
|
1772
|
+
setupFocusTrap() {
|
|
1773
|
+
const focusable = 'button, [href], input, textarea, select, [tabindex]:not([tabindex="-1"])';
|
|
1774
|
+
const elements = Array.from(this.dialog.querySelectorAll(focusable));
|
|
1775
|
+
const first = elements[0];
|
|
1776
|
+
const last = elements[elements.length - 1];
|
|
1777
|
+
this.dialog.addEventListener("keydown", (e) => {
|
|
1778
|
+
if (e.key === "Tab") {
|
|
1779
|
+
if (elements.length === 0) {
|
|
1780
|
+
e.preventDefault();
|
|
1781
|
+
return;
|
|
1782
|
+
}
|
|
1783
|
+
if (e.shiftKey) {
|
|
1784
|
+
if (document.activeElement === first) {
|
|
1785
|
+
last.focus();
|
|
1786
|
+
e.preventDefault();
|
|
1787
|
+
}
|
|
1788
|
+
} else {
|
|
1789
|
+
if (document.activeElement === last) {
|
|
1790
|
+
first.focus();
|
|
1791
|
+
e.preventDefault();
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
} else if (e.key === "Escape") {
|
|
1795
|
+
e.stopPropagation();
|
|
1796
|
+
this.close(this.opts.escapeAction ?? "close");
|
|
1797
|
+
} else if (e.key === "Enter") {
|
|
1798
|
+
if (elements.some((el) => el === document.activeElement) && document.activeElement !== this.inputEl) return;
|
|
1799
|
+
e.preventDefault();
|
|
1800
|
+
e.stopPropagation();
|
|
1801
|
+
this.close(this.opts.enterAction ?? "submit");
|
|
1802
|
+
}
|
|
1803
|
+
});
|
|
1804
|
+
window.requestAnimationFrame(() => {
|
|
1805
|
+
(this.inputEl || first)?.focus();
|
|
1806
|
+
});
|
|
1807
|
+
}
|
|
1808
|
+
/** Closes the modal, cleans up DOM, resolves promise, and shows next queued modal. */
|
|
1809
|
+
close(action) {
|
|
1810
|
+
if (this.timeoutId) clearTimeout(this.timeoutId);
|
|
1811
|
+
this.dialog.close();
|
|
1812
|
+
this.dialog.remove();
|
|
1813
|
+
this.blocker.remove();
|
|
1814
|
+
document.body.querySelector(".deeplib-modal-blocker")?.remove();
|
|
1815
|
+
const value = this.inputEl?.value ?? "";
|
|
1816
|
+
this.resolve([action, value]);
|
|
1817
|
+
_Modal.dequeue();
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
* An internal function where we will save promise function.
|
|
1821
|
+
*/
|
|
1822
|
+
resolve = /* @__PURE__ */ __name(() => {
|
|
1823
|
+
}, "resolve");
|
|
1824
|
+
/** A function that adds a modal to the queue and returns a promise */
|
|
1825
|
+
static enqueue(modal) {
|
|
1826
|
+
_Modal.queue.push(modal);
|
|
1827
|
+
if (!_Modal.processing) _Modal.dequeue();
|
|
1828
|
+
return new Promise((resolve) => modal.resolve = resolve);
|
|
1829
|
+
}
|
|
1830
|
+
/** A function that processes the queue, removing the first modal */
|
|
1831
|
+
static dequeue() {
|
|
1832
|
+
const modal = _Modal.queue.shift();
|
|
1833
|
+
if (modal) {
|
|
1834
|
+
_Modal.processing = true;
|
|
1835
|
+
modal.dialog.show();
|
|
1836
|
+
} else {
|
|
1837
|
+
_Modal.processing = false;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1842
|
+
// src/base/initialization.ts
|
|
1843
|
+
var modStorage;
|
|
1844
|
+
var sdk;
|
|
1845
|
+
var logger;
|
|
1846
|
+
function initMod(options) {
|
|
1847
|
+
const url = "https://cdn.jsdelivr.net/npm/bondage-club-mod-sdk@1.2.0/+esm";
|
|
1848
|
+
import(`${url}`).then(() => {
|
|
1849
|
+
sdk = new ModSdkManager(options.modInfo.info, options.modInfo.options);
|
|
1850
|
+
const MOD_NAME = ModSdkManager.ModInfo.name;
|
|
1851
|
+
modStorage = new ModStorage(ModSdkManager.ModInfo.name);
|
|
1852
|
+
logger = new Logger(MOD_NAME);
|
|
1853
|
+
Style.injectInline("deeplib-style", styles_default);
|
|
1854
|
+
logger.debug("Init wait");
|
|
1855
|
+
if (!CurrentScreen || CurrentScreen === "Login") {
|
|
1856
|
+
options.beforeLogin?.();
|
|
1857
|
+
const removeHook = sdk.hookFunction("LoginResponse", 0, (args, next) => {
|
|
1858
|
+
logger.debug("Init! LoginResponse caught: ", args);
|
|
1859
|
+
next(args);
|
|
1860
|
+
const response = args[0];
|
|
1861
|
+
if (response === "InvalidNamePassword") return next(args);
|
|
1862
|
+
if (response && typeof response.Name === "string" && typeof response.AccountName === "string") {
|
|
1863
|
+
init(options);
|
|
1864
|
+
removeHook();
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
} else {
|
|
1868
|
+
logger.debug(`Already logged in, initing ${MOD_NAME}`);
|
|
1869
|
+
init(options);
|
|
1870
|
+
}
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
__name(initMod, "initMod");
|
|
1874
|
+
async function init(options) {
|
|
1875
|
+
const MOD_NAME = ModSdkManager.ModInfo.name;
|
|
1876
|
+
const MOD_VERSION = ModSdkManager.ModInfo.version;
|
|
1877
|
+
if (window[MOD_NAME + "Loaded"]) return;
|
|
1878
|
+
modStorage.load();
|
|
1879
|
+
await Localization.init(options.translationOptions);
|
|
1880
|
+
if (options.modules && !initModules(options.modules)) {
|
|
1881
|
+
unloadMod();
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
await options.initFunction?.();
|
|
1885
|
+
if (options.mainMenuOptions)
|
|
1886
|
+
MainMenu.setOptions(options.mainMenuOptions);
|
|
1887
|
+
window[MOD_NAME + "Loaded"] = true;
|
|
1888
|
+
logger.log(`Loaded! Version: ${MOD_VERSION}`);
|
|
1889
|
+
}
|
|
1890
|
+
__name(init, "init");
|
|
1891
|
+
function initModules(modulesToRegister) {
|
|
1892
|
+
for (const module of modulesToRegister) {
|
|
1893
|
+
registerModule(module);
|
|
1894
|
+
}
|
|
1895
|
+
for (const module of modules()) {
|
|
1896
|
+
module.init();
|
|
1897
|
+
}
|
|
1898
|
+
for (const module of modules()) {
|
|
1899
|
+
module.load();
|
|
1900
|
+
}
|
|
1901
|
+
for (const module of modules()) {
|
|
1902
|
+
module.run();
|
|
1903
|
+
}
|
|
1904
|
+
for (const module of modules()) {
|
|
1905
|
+
module.registerDefaultSettings(modStorage.playerStorage);
|
|
1906
|
+
}
|
|
1907
|
+
logger.debug("Modules Loaded.");
|
|
1908
|
+
return true;
|
|
1909
|
+
}
|
|
1910
|
+
__name(initModules, "initModules");
|
|
1911
|
+
function unloadMod() {
|
|
1912
|
+
const MOD_NAME = ModSdkManager.ModInfo.name;
|
|
1913
|
+
unloadModules();
|
|
1914
|
+
delete window[MOD_NAME + "Loaded"];
|
|
1915
|
+
logger.debug("Unloaded.");
|
|
1916
|
+
return true;
|
|
1917
|
+
}
|
|
1918
|
+
__name(unloadMod, "unloadMod");
|
|
1919
|
+
function unloadModules() {
|
|
1920
|
+
for (const module of modules()) {
|
|
1921
|
+
module.unload();
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
__name(unloadModules, "unloadModules");
|
|
1925
|
+
|
|
1926
|
+
// src/base/modules.ts
|
|
1927
|
+
var modulesMap = /* @__PURE__ */ new Map();
|
|
1928
|
+
function modules() {
|
|
1929
|
+
return [...modulesMap.values()];
|
|
1930
|
+
}
|
|
1931
|
+
__name(modules, "modules");
|
|
1932
|
+
function registerModule(module) {
|
|
1933
|
+
modulesMap.set(module.constructor.name, module);
|
|
1934
|
+
return module;
|
|
1935
|
+
}
|
|
1936
|
+
__name(registerModule, "registerModule");
|
|
1937
|
+
function getModule(moduleType) {
|
|
1938
|
+
return modulesMap.get(moduleType);
|
|
1939
|
+
}
|
|
1940
|
+
__name(getModule, "getModule");
|
|
1941
|
+
|
|
1942
|
+
// src/migrators/base_migrator.ts
|
|
1943
|
+
var BaseMigrator2 = class {
|
|
1944
|
+
static {
|
|
1945
|
+
__name(this, "BaseMigrator");
|
|
1946
|
+
}
|
|
1947
|
+
};
|
|
1948
|
+
|
|
1949
|
+
// src/modules/gui.ts
|
|
1950
|
+
var GUI = class _GUI extends BaseModule {
|
|
1951
|
+
static {
|
|
1952
|
+
__name(this, "GUI");
|
|
1953
|
+
}
|
|
1954
|
+
/** The singleton instance of the GUI controller. */
|
|
1955
|
+
static instance = null;
|
|
1956
|
+
/** All subscreens managed by this GUI, including the main menu and module settings screens. */
|
|
1957
|
+
_subscreens;
|
|
1958
|
+
/** The mod's main menu screen. */
|
|
1959
|
+
_mainMenu;
|
|
1960
|
+
/** Options defining how the mod's settings button is displayed and behaves. */
|
|
1961
|
+
_modButtonOptions;
|
|
1962
|
+
/** Returns all registered subscreens. */
|
|
1963
|
+
get subscreens() {
|
|
1964
|
+
return this._subscreens;
|
|
1965
|
+
}
|
|
1966
|
+
/** Returns the main menu subscreen instance. */
|
|
1967
|
+
get mainMenu() {
|
|
1968
|
+
return this._mainMenu;
|
|
1969
|
+
}
|
|
1970
|
+
/**
|
|
1971
|
+
* Creates the GUI instance and initializes the main menu.
|
|
1972
|
+
*
|
|
1973
|
+
* @throws If another `GUI` instance already exists.
|
|
1974
|
+
*/
|
|
1975
|
+
constructor(guiOptions = null) {
|
|
1976
|
+
super();
|
|
1977
|
+
if (_GUI.instance) {
|
|
1978
|
+
throw new Error("Duplicate initialization");
|
|
1979
|
+
}
|
|
1980
|
+
for (const module of modules()) {
|
|
1981
|
+
if (!module.settingsScreen) continue;
|
|
1982
|
+
}
|
|
1983
|
+
this._mainMenu = guiOptions?.mainMenu ? new guiOptions.mainMenu(this) : new MainMenu(this);
|
|
1984
|
+
this._subscreens = [this._mainMenu];
|
|
1985
|
+
this._modButtonOptions = guiOptions;
|
|
1986
|
+
_GUI.instance = this;
|
|
1987
|
+
}
|
|
1988
|
+
/**
|
|
1989
|
+
* Loads the GUI and registers the mod's settings button in the extensions menu.
|
|
1990
|
+
*
|
|
1991
|
+
* - Creates subscreens for each module's settings screen.
|
|
1992
|
+
* - Registers lifecycle callbacks for subscreens events.
|
|
1993
|
+
* - Sets up the main menu and its subscreens.
|
|
1994
|
+
*/
|
|
1995
|
+
load() {
|
|
1996
|
+
if (!this._modButtonOptions) return;
|
|
1997
|
+
for (const module of modules()) {
|
|
1998
|
+
if (!module.settingsScreen) continue;
|
|
1999
|
+
this._subscreens.push(new module.settingsScreen(module));
|
|
2000
|
+
}
|
|
2001
|
+
this._mainMenu.subscreens = this._subscreens;
|
|
2002
|
+
PreferenceRegisterExtensionSetting({
|
|
2003
|
+
Identifier: this._modButtonOptions.identifier,
|
|
2004
|
+
ButtonText: this._modButtonOptions.buttonText,
|
|
2005
|
+
Image: this._modButtonOptions.image,
|
|
2006
|
+
load: /* @__PURE__ */ __name(async () => {
|
|
2007
|
+
await setSubscreen(this._mainMenu);
|
|
2008
|
+
}, "load"),
|
|
2009
|
+
run: /* @__PURE__ */ __name(() => {
|
|
2010
|
+
}, "run"),
|
|
2011
|
+
click: /* @__PURE__ */ __name(() => {
|
|
2012
|
+
}, "click"),
|
|
2013
|
+
exit: /* @__PURE__ */ __name(() => {
|
|
2014
|
+
}, "exit")
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
};
|
|
2018
|
+
|
|
2019
|
+
// src/utilities/data.ts
|
|
2020
|
+
var ModStorage = class _ModStorage {
|
|
2021
|
+
static {
|
|
2022
|
+
__name(this, "ModStorage");
|
|
2023
|
+
}
|
|
2024
|
+
/** Singleton instance of ModStorage */
|
|
2025
|
+
static _instance = null;
|
|
2026
|
+
/** The unique mod identifier used as key prefix in storage */
|
|
2027
|
+
modName;
|
|
2028
|
+
constructor(modName) {
|
|
2029
|
+
if (!_ModStorage._instance) {
|
|
2030
|
+
_ModStorage._instance = this;
|
|
2031
|
+
this.modName = modName;
|
|
2032
|
+
}
|
|
2033
|
+
this.modName ??= modName;
|
|
2034
|
+
return _ModStorage._instance;
|
|
2035
|
+
}
|
|
2036
|
+
get playerStorage() {
|
|
2037
|
+
return Player[this.modName];
|
|
2038
|
+
}
|
|
2039
|
+
set playerStorage(value) {
|
|
2040
|
+
Player[this.modName] = value;
|
|
2041
|
+
}
|
|
2042
|
+
get extensionStorage() {
|
|
2043
|
+
return Player.ExtensionSettings[this.modName];
|
|
2044
|
+
}
|
|
2045
|
+
set extensionStorage(value) {
|
|
2046
|
+
Player.ExtensionSettings[this.modName] = value;
|
|
2047
|
+
}
|
|
2048
|
+
setLocalStorage(key, value) {
|
|
2049
|
+
localStorage.setItem(`${this.modName}_${key}`, _ModStorage.dataCompress(value));
|
|
2050
|
+
}
|
|
2051
|
+
getLocalStorage(key) {
|
|
2052
|
+
const data = localStorage.getItem(`${this.modName}_${key}`);
|
|
2053
|
+
if (!data) return null;
|
|
2054
|
+
return _ModStorage.dataDecompress(data);
|
|
2055
|
+
}
|
|
2056
|
+
load() {
|
|
2057
|
+
if (this.extensionStorage) {
|
|
2058
|
+
const parsed = _ModStorage.dataDecompress(this.extensionStorage || "");
|
|
2059
|
+
if (parsed === null || !Object.hasOwn(parsed, "Version")) {
|
|
2060
|
+
this.playerStorage = {
|
|
2061
|
+
Version: ModSdkManager.ModInfo.version
|
|
2062
|
+
};
|
|
2063
|
+
} else {
|
|
2064
|
+
this.playerStorage = parsed;
|
|
2065
|
+
}
|
|
2066
|
+
;
|
|
2067
|
+
} else {
|
|
2068
|
+
this.playerStorage = {};
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
save() {
|
|
2072
|
+
if (!this.extensionStorage) this.extensionStorage = "";
|
|
2073
|
+
this.extensionStorage = _ModStorage.dataCompress(this.playerStorage);
|
|
2074
|
+
ServerPlayerExtensionSettingsSync(this.modName);
|
|
2075
|
+
}
|
|
2076
|
+
static dataDecompress(string) {
|
|
2077
|
+
const d = LZString.decompressFromBase64(string);
|
|
2078
|
+
let data = null;
|
|
2079
|
+
try {
|
|
2080
|
+
const decoded = JSON.parse(d);
|
|
2081
|
+
data = decoded;
|
|
2082
|
+
} catch (error) {
|
|
2083
|
+
deepLibLogger.error(error);
|
|
2084
|
+
}
|
|
2085
|
+
return data;
|
|
2086
|
+
}
|
|
2087
|
+
static dataCompress(object) {
|
|
2088
|
+
return LZString.compressToBase64(JSON.stringify(object));
|
|
2089
|
+
}
|
|
2090
|
+
static measureSize(data) {
|
|
2091
|
+
try {
|
|
2092
|
+
if (typeof data !== "string") {
|
|
2093
|
+
data = JSON.stringify(data) || "";
|
|
2094
|
+
}
|
|
2095
|
+
if (typeof data === "string") {
|
|
2096
|
+
return new TextEncoder().encode(data).byteLength;
|
|
2097
|
+
}
|
|
2098
|
+
throw new Error();
|
|
2099
|
+
} catch {
|
|
2100
|
+
return NaN;
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
};
|
|
2104
|
+
|
|
2105
|
+
// src/utilities/elements/helpers.ts
|
|
2106
|
+
var domUtil = {
|
|
2107
|
+
/**
|
|
2108
|
+
* Automatically sets the position of the element based on the given position.
|
|
2109
|
+
* The position can be either a [x, y] tuple or a function returning such a tuple.
|
|
2110
|
+
* If both x and y are defined, the element's position is updated accordingly.
|
|
2111
|
+
*/
|
|
2112
|
+
autoSetPosition,
|
|
2113
|
+
/**
|
|
2114
|
+
* Automatically sets the size of the element based on the given size.
|
|
2115
|
+
* The size can be either a [width, height] tuple or a function returning such a tuple.
|
|
2116
|
+
* If both width and height are defined, the element's size is updated accordingly.
|
|
2117
|
+
*/
|
|
2118
|
+
autoSetSize,
|
|
2119
|
+
/**
|
|
2120
|
+
* Hides the element by setting its CSS display property to 'none'.
|
|
2121
|
+
* If the element cannot be found, the function does nothing.
|
|
2122
|
+
*/
|
|
2123
|
+
hide,
|
|
2124
|
+
/**
|
|
2125
|
+
* Unhides the element by clearing its CSS display property (sets it to '').
|
|
2126
|
+
* If the element cannot be found, the function does nothing.
|
|
2127
|
+
*/
|
|
2128
|
+
unhide,
|
|
2129
|
+
/**
|
|
2130
|
+
* Checks if the element has overflow content.
|
|
2131
|
+
* Returns an object indicating if there is any overflow,
|
|
2132
|
+
* and specifically if there is vertical or horizontal overflow.
|
|
2133
|
+
* Returns null if the element is not found.
|
|
2134
|
+
*/
|
|
2135
|
+
hasOverflow
|
|
2136
|
+
};
|
|
2137
|
+
function autoSetPosition(_, position) {
|
|
2138
|
+
let xPos = void 0;
|
|
2139
|
+
let yPos = void 0;
|
|
2140
|
+
let anchor = void 0;
|
|
2141
|
+
if (Array.isArray(position)) {
|
|
2142
|
+
xPos = position[0];
|
|
2143
|
+
yPos = position[1];
|
|
2144
|
+
anchor = position[2];
|
|
2145
|
+
} else if (typeof position === "function") {
|
|
2146
|
+
const result = position();
|
|
2147
|
+
xPos = result[0];
|
|
2148
|
+
yPos = result[1];
|
|
2149
|
+
anchor = result[2];
|
|
2150
|
+
}
|
|
2151
|
+
if (xPos !== void 0 && yPos !== void 0) ElementSetPosition(_, xPos, yPos, anchor);
|
|
2152
|
+
}
|
|
2153
|
+
__name(autoSetPosition, "autoSetPosition");
|
|
2154
|
+
function autoSetSize(_, size) {
|
|
2155
|
+
let width = void 0;
|
|
2156
|
+
let height = void 0;
|
|
2157
|
+
if (Array.isArray(size)) {
|
|
2158
|
+
width = size[0];
|
|
2159
|
+
height = size[1];
|
|
2160
|
+
} else if (typeof size === "function") {
|
|
2161
|
+
const result = size();
|
|
2162
|
+
width = result[0];
|
|
2163
|
+
height = result[1];
|
|
2164
|
+
}
|
|
2165
|
+
if (width !== void 0 && height !== void 0) ElementSetSize(_, width, height);
|
|
2166
|
+
}
|
|
2167
|
+
__name(autoSetSize, "autoSetSize");
|
|
2168
|
+
function hide(_) {
|
|
2169
|
+
const element = ElementWrap(_);
|
|
2170
|
+
if (!element) return;
|
|
2171
|
+
element.style.display = "none";
|
|
2172
|
+
}
|
|
2173
|
+
__name(hide, "hide");
|
|
2174
|
+
function unhide(_) {
|
|
2175
|
+
const element = ElementWrap(_);
|
|
2176
|
+
if (!element) return;
|
|
2177
|
+
element.style.display = "";
|
|
2178
|
+
}
|
|
2179
|
+
__name(unhide, "unhide");
|
|
2180
|
+
function hasOverflow(el) {
|
|
2181
|
+
const element = ElementWrap(el);
|
|
2182
|
+
if (!element) return null;
|
|
2183
|
+
const vertical = element.scrollHeight > element.clientHeight;
|
|
2184
|
+
const horizontal = element.scrollWidth > element.clientWidth;
|
|
2185
|
+
return {
|
|
2186
|
+
any: vertical || horizontal,
|
|
2187
|
+
vertical,
|
|
2188
|
+
horizontal
|
|
2189
|
+
};
|
|
2190
|
+
}
|
|
2191
|
+
__name(hasOverflow, "hasOverflow");
|
|
2192
|
+
|
|
2193
|
+
// src/utilities/elements/layout.ts
|
|
2194
|
+
var layout = {
|
|
2195
|
+
getSubscreen: elementGetSubscreenDiv,
|
|
2196
|
+
appendToSubscreen: elementAppendToSubscreenDiv,
|
|
2197
|
+
removeSubscreen: elementRemoveSubscreenDiv,
|
|
2198
|
+
getSettingsDiv: elementGetSettingsDiv,
|
|
2199
|
+
appendToSettingsDiv: elementAppendToSettingsDiv,
|
|
2200
|
+
removeSettingsDiv: elementRemoveSettingsDiv,
|
|
2201
|
+
getMiscDiv: elementGetMiscDiv,
|
|
2202
|
+
appendToMiscDiv: elementAppendToMiscDiv,
|
|
2203
|
+
removeMiscDiv: elementRemoveMiscDiv
|
|
2204
|
+
};
|
|
2205
|
+
function elementGetSubscreenDiv() {
|
|
2206
|
+
const subscreenDiv = ElementWrap("deeplib-subscreen");
|
|
2207
|
+
if (subscreenDiv) {
|
|
2208
|
+
return subscreenDiv;
|
|
2209
|
+
}
|
|
2210
|
+
const div = ElementCreate({
|
|
2211
|
+
tag: "div",
|
|
2212
|
+
classList: ["deeplib-subscreen", "HideOnPopup"],
|
|
2213
|
+
attributes: { id: "deeplib-subscreen" }
|
|
2214
|
+
});
|
|
2215
|
+
return document.body.appendChild(div);
|
|
2216
|
+
}
|
|
2217
|
+
__name(elementGetSubscreenDiv, "elementGetSubscreenDiv");
|
|
2218
|
+
function elementRemoveSubscreenDiv() {
|
|
2219
|
+
return elementGetSubscreenDiv()?.remove();
|
|
2220
|
+
}
|
|
2221
|
+
__name(elementRemoveSubscreenDiv, "elementRemoveSubscreenDiv");
|
|
2222
|
+
function elementAppendToSubscreenDiv(...element) {
|
|
2223
|
+
return elementGetSubscreenDiv()?.append(...element);
|
|
2224
|
+
}
|
|
2225
|
+
__name(elementAppendToSubscreenDiv, "elementAppendToSubscreenDiv");
|
|
2226
|
+
function elementGetSettingsDiv() {
|
|
2227
|
+
const settingsDiv = ElementWrap("deeplib-settings");
|
|
2228
|
+
if (settingsDiv) {
|
|
2229
|
+
return settingsDiv;
|
|
2230
|
+
}
|
|
2231
|
+
const div = ElementCreate({
|
|
2232
|
+
tag: "div",
|
|
2233
|
+
classList: ["deeplib-settings", "scroll-box"],
|
|
2234
|
+
attributes: { id: "deeplib-settings" }
|
|
2235
|
+
});
|
|
2236
|
+
return div;
|
|
2237
|
+
}
|
|
2238
|
+
__name(elementGetSettingsDiv, "elementGetSettingsDiv");
|
|
2239
|
+
function elementAppendToSettingsDiv(...element) {
|
|
2240
|
+
return elementGetSettingsDiv()?.append(...element);
|
|
2241
|
+
}
|
|
2242
|
+
__name(elementAppendToSettingsDiv, "elementAppendToSettingsDiv");
|
|
2243
|
+
function elementRemoveSettingsDiv() {
|
|
2244
|
+
return elementGetSettingsDiv()?.remove();
|
|
2245
|
+
}
|
|
2246
|
+
__name(elementRemoveSettingsDiv, "elementRemoveSettingsDiv");
|
|
2247
|
+
function elementGetMiscDiv() {
|
|
2248
|
+
const miscDiv = ElementWrap("deeplib-misc");
|
|
2249
|
+
if (miscDiv) {
|
|
2250
|
+
return miscDiv;
|
|
2251
|
+
}
|
|
2252
|
+
const div = ElementCreate({
|
|
2253
|
+
tag: "div",
|
|
2254
|
+
classList: ["deeplib-misc"],
|
|
2255
|
+
attributes: { id: "deeplib-misc" }
|
|
2256
|
+
});
|
|
2257
|
+
return div;
|
|
2258
|
+
}
|
|
2259
|
+
__name(elementGetMiscDiv, "elementGetMiscDiv");
|
|
2260
|
+
function elementAppendToMiscDiv(...element) {
|
|
2261
|
+
return elementGetMiscDiv()?.append(...element);
|
|
2262
|
+
}
|
|
2263
|
+
__name(elementAppendToMiscDiv, "elementAppendToMiscDiv");
|
|
2264
|
+
function elementRemoveMiscDiv() {
|
|
2265
|
+
return elementGetMiscDiv()?.remove();
|
|
2266
|
+
}
|
|
2267
|
+
__name(elementRemoveMiscDiv, "elementRemoveMiscDiv");
|
|
2268
|
+
|
|
2269
|
+
// src/utilities/logger.ts
|
|
2270
|
+
var Logger = class _Logger extends Array {
|
|
2271
|
+
static {
|
|
2272
|
+
__name(this, "Logger");
|
|
2273
|
+
}
|
|
2274
|
+
ModName = "DeepLib";
|
|
2275
|
+
constructor(modName) {
|
|
2276
|
+
super();
|
|
2277
|
+
if (modName) {
|
|
2278
|
+
this.ModName = modName;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
_Log(level, ...args) {
|
|
2282
|
+
const logEntry = {
|
|
2283
|
+
logLevel: level,
|
|
2284
|
+
args: [...args],
|
|
2285
|
+
// trace: arguments.callee.caller.toString().split('\n'),
|
|
2286
|
+
date: new Date(Date.now())
|
|
2287
|
+
// `[${this.ModName}] ${formattedArgs}`
|
|
2288
|
+
};
|
|
2289
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
2290
|
+
if (userAgent.includes("chrome") || userAgent.includes("firefox")) {
|
|
2291
|
+
const color = _Logger.colorizeLog(level);
|
|
2292
|
+
args.forEach((arg) => {
|
|
2293
|
+
if (typeof arg === "string") {
|
|
2294
|
+
arg = `
|
|
2295
|
+
%c${arg}`;
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2298
|
+
console.log(`%c${this.ModName}:`, color, ...args);
|
|
2299
|
+
} else {
|
|
2300
|
+
console.log(`${this.ModName}:`, ...args);
|
|
2301
|
+
}
|
|
2302
|
+
this.push(logEntry);
|
|
2303
|
+
}
|
|
2304
|
+
info(...args) {
|
|
2305
|
+
this._Log("info", ...args);
|
|
2306
|
+
}
|
|
2307
|
+
log(...args) {
|
|
2308
|
+
this._Log("log", ...args);
|
|
2309
|
+
}
|
|
2310
|
+
warn(...args) {
|
|
2311
|
+
this._Log("warn", ...args);
|
|
2312
|
+
}
|
|
2313
|
+
error(...args) {
|
|
2314
|
+
this._Log("error", ...args);
|
|
2315
|
+
}
|
|
2316
|
+
debug(...args) {
|
|
2317
|
+
this._Log("debug", ...args);
|
|
2318
|
+
}
|
|
2319
|
+
static colorizeLog(logLevel) {
|
|
2320
|
+
const colors = {
|
|
2321
|
+
info: "color: #32CCCC",
|
|
2322
|
+
log: "color: #CCCC32",
|
|
2323
|
+
warn: "color: #eec355",
|
|
2324
|
+
error: "color: #750b0b",
|
|
2325
|
+
debug: "color: #9E4BCF"
|
|
2326
|
+
};
|
|
2327
|
+
return colors[logLevel];
|
|
2328
|
+
}
|
|
2329
|
+
};
|
|
2330
|
+
var deepLibLogger = new Logger();
|
|
2331
|
+
|
|
2332
|
+
// src/utilities/messages.ts
|
|
2333
|
+
function sendLocalMessage(id, message, timeoutInSeconds) {
|
|
2334
|
+
const element = ElementCreate({
|
|
2335
|
+
tag: "div",
|
|
2336
|
+
classList: ["ChatMessage", "deeplib-message", "ChatMessageNonDialogue"],
|
|
2337
|
+
attributes: {
|
|
2338
|
+
id: id ?? `DEEPLIB_LOCAL_MESSAGE_${Date.now()}`,
|
|
2339
|
+
"data-time": ChatRoomCurrentTime(),
|
|
2340
|
+
"data-sender": Player.MemberNumber?.toString()
|
|
2341
|
+
},
|
|
2342
|
+
children: [
|
|
2343
|
+
{
|
|
2344
|
+
tag: "span",
|
|
2345
|
+
classList: ["deeplib-text"],
|
|
2346
|
+
innerHTML: message.replaceAll("\n ", "")
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
tag: "br"
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
tag: "a",
|
|
2353
|
+
classList: ["deeplib-text"],
|
|
2354
|
+
attributes: {
|
|
2355
|
+
href: "#"
|
|
2356
|
+
},
|
|
2357
|
+
innerHTML: "<b>Close (Click)</b>",
|
|
2358
|
+
eventListeners: {
|
|
2359
|
+
click: /* @__PURE__ */ __name(() => {
|
|
2360
|
+
element.remove();
|
|
2361
|
+
}, "click")
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
]
|
|
2365
|
+
});
|
|
2366
|
+
ChatRoomAppendChat(element);
|
|
2367
|
+
if (!timeoutInSeconds) return;
|
|
2368
|
+
setTimeout(() => element.remove(), timeoutInSeconds * 1e3);
|
|
2369
|
+
}
|
|
2370
|
+
__name(sendLocalMessage, "sendLocalMessage");
|
|
2371
|
+
function sendActionMessage(msg, target = void 0, dictionary = []) {
|
|
2372
|
+
if (!msg) return;
|
|
2373
|
+
ServerSend("ChatRoomChat", {
|
|
2374
|
+
Content: "DEEPLIB_CUSTOM_ACTION",
|
|
2375
|
+
Type: "Action",
|
|
2376
|
+
Target: target ?? void 0,
|
|
2377
|
+
Dictionary: [
|
|
2378
|
+
{ Tag: 'MISSING TEXT IN "Interface.csv": DEEPLIB_CUSTOM_ACTION', Text: msg },
|
|
2379
|
+
...dictionary
|
|
2380
|
+
]
|
|
2381
|
+
});
|
|
2382
|
+
}
|
|
2383
|
+
__name(sendActionMessage, "sendActionMessage");
|
|
2384
|
+
|
|
2385
|
+
// src/utilities/sdk.ts
|
|
2386
|
+
var HookPriority = {
|
|
2387
|
+
Observe: 0,
|
|
2388
|
+
AddBehavior: 1,
|
|
2389
|
+
ModifyBehavior: 5,
|
|
2390
|
+
OverrideBehavior: 10,
|
|
2391
|
+
Top: 100
|
|
2392
|
+
};
|
|
2393
|
+
var ModSdkManager = class _ModSdkManager {
|
|
2394
|
+
static {
|
|
2395
|
+
__name(this, "ModSdkManager");
|
|
2396
|
+
}
|
|
2397
|
+
static SDK;
|
|
2398
|
+
static patchedFunctions = /* @__PURE__ */ new Map();
|
|
2399
|
+
static ModInfo;
|
|
2400
|
+
/** Registers a mod with the SDK and stores mod information. */
|
|
2401
|
+
constructor(info, options) {
|
|
2402
|
+
_ModSdkManager.SDK = bcModSdk.registerMod(info, options);
|
|
2403
|
+
_ModSdkManager.ModInfo = info;
|
|
2404
|
+
}
|
|
2405
|
+
/** Retrieves or initializes patch data for a given target function. */
|
|
2406
|
+
initPatchableFunction(target) {
|
|
2407
|
+
let result = _ModSdkManager.patchedFunctions.get(target);
|
|
2408
|
+
if (!result) {
|
|
2409
|
+
result = {
|
|
2410
|
+
name: target,
|
|
2411
|
+
hooks: []
|
|
2412
|
+
};
|
|
2413
|
+
_ModSdkManager.patchedFunctions.set(target, result);
|
|
2414
|
+
}
|
|
2415
|
+
return result;
|
|
2416
|
+
}
|
|
2417
|
+
/**
|
|
2418
|
+
* Hooks a function with a callback at a given priority.
|
|
2419
|
+
*
|
|
2420
|
+
* Prevents duplicate hooks.
|
|
2421
|
+
*/
|
|
2422
|
+
hookFunction(target, priority, hook, module = null) {
|
|
2423
|
+
const data = this.initPatchableFunction(target);
|
|
2424
|
+
if (data.hooks.some((h) => h.hook === hook)) {
|
|
2425
|
+
return () => null;
|
|
2426
|
+
}
|
|
2427
|
+
const removeCallback = _ModSdkManager.SDK?.hookFunction(target, priority, hook);
|
|
2428
|
+
data.hooks.push({
|
|
2429
|
+
hook,
|
|
2430
|
+
priority,
|
|
2431
|
+
module,
|
|
2432
|
+
removeCallback
|
|
2433
|
+
});
|
|
2434
|
+
data.hooks.sort((a, b) => b.priority - a.priority);
|
|
2435
|
+
return removeCallback;
|
|
2436
|
+
}
|
|
2437
|
+
/**
|
|
2438
|
+
* Applies patches to a target function.
|
|
2439
|
+
*
|
|
2440
|
+
* **This method is DANGEROUS** to use and has high potential to conflict with other mods.
|
|
2441
|
+
*/
|
|
2442
|
+
patchFunction(target, patches) {
|
|
2443
|
+
_ModSdkManager.SDK?.patchFunction(target, patches);
|
|
2444
|
+
}
|
|
2445
|
+
/**
|
|
2446
|
+
* Removes all patches from a target function.
|
|
2447
|
+
*/
|
|
2448
|
+
unpatchFunction(target) {
|
|
2449
|
+
_ModSdkManager.SDK?.removePatches(target);
|
|
2450
|
+
}
|
|
2451
|
+
/**
|
|
2452
|
+
* Removes all hooks associated with a specific module from a target function.
|
|
2453
|
+
*/
|
|
2454
|
+
removeHookByModule(target, module) {
|
|
2455
|
+
const data = this.initPatchableFunction(target);
|
|
2456
|
+
for (let i = data.hooks.length - 1; i >= 0; i--) {
|
|
2457
|
+
if (data.hooks[i].module === module) {
|
|
2458
|
+
data.hooks[i].removeCallback();
|
|
2459
|
+
data.hooks.splice(i, 1);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
return true;
|
|
2463
|
+
}
|
|
2464
|
+
/**
|
|
2465
|
+
* Removes all hooks associated with a specific module across all patched functions.
|
|
2466
|
+
*/
|
|
2467
|
+
removeAllHooksByModule(module) {
|
|
2468
|
+
for (const data of _ModSdkManager.patchedFunctions.values()) {
|
|
2469
|
+
for (let i = data.hooks.length - 1; i >= 0; i--) {
|
|
2470
|
+
if (data.hooks[i].module === module) {
|
|
2471
|
+
data.hooks[i].removeCallback();
|
|
2472
|
+
data.hooks.splice(i, 1);
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
return true;
|
|
2477
|
+
}
|
|
2478
|
+
};
|
|
2479
|
+
|
|
2480
|
+
// src/utilities/style.ts
|
|
2481
|
+
var Style = {
|
|
2482
|
+
/**
|
|
2483
|
+
* Injects a CSS style block directly into the document head using a <style> tag.
|
|
2484
|
+
* If a style element with the same `styleId` already exists, it won't inject again.
|
|
2485
|
+
*/
|
|
2486
|
+
injectInline(styleId, styleSource) {
|
|
2487
|
+
const isStyleLoaded = document.getElementById(styleId);
|
|
2488
|
+
if (isStyleLoaded) return;
|
|
2489
|
+
const styleElement = document.createElement("style");
|
|
2490
|
+
styleElement.id = styleId;
|
|
2491
|
+
styleElement.appendChild(document.createTextNode(styleSource));
|
|
2492
|
+
document.head.appendChild(styleElement);
|
|
2493
|
+
},
|
|
2494
|
+
/**
|
|
2495
|
+
* Injects a CSS stylesheet link into the document head using a <link> tag.
|
|
2496
|
+
* If a link element with the same `styleId` already exists, it won't inject again.
|
|
2497
|
+
*/
|
|
2498
|
+
injectEmbed(styleId, styleLink) {
|
|
2499
|
+
const isStyleLoaded = document.getElementById(styleId);
|
|
2500
|
+
if (isStyleLoaded) return;
|
|
2501
|
+
const styleElement = document.createElement("link");
|
|
2502
|
+
styleElement.id = styleId;
|
|
2503
|
+
styleElement.rel = "stylesheet";
|
|
2504
|
+
styleElement.href = styleLink;
|
|
2505
|
+
document.head.appendChild(styleElement);
|
|
2506
|
+
},
|
|
2507
|
+
/**
|
|
2508
|
+
* Removes a style element from the document head by its ID.
|
|
2509
|
+
* Does nothing if the element is not found.
|
|
2510
|
+
*/
|
|
2511
|
+
eject(id) {
|
|
2512
|
+
const style = document.getElementById(id);
|
|
2513
|
+
if (!style) return;
|
|
2514
|
+
style.remove();
|
|
2515
|
+
},
|
|
2516
|
+
/**
|
|
2517
|
+
* Reloads an inline style by removing the existing style element (if any)
|
|
2518
|
+
* and injecting the new styles inline again.
|
|
2519
|
+
*/
|
|
2520
|
+
reload(styleId, styleSource) {
|
|
2521
|
+
Style.eject(styleId);
|
|
2522
|
+
Style.injectInline(styleId, styleSource);
|
|
2523
|
+
},
|
|
2524
|
+
/** Fetches the text content of a stylesheet or any resource at the given link. */
|
|
2525
|
+
async fetch(link) {
|
|
2526
|
+
return fetch(link).then((res) => res.text());
|
|
2527
|
+
}
|
|
2528
|
+
};
|
|
2529
|
+
|
|
2530
|
+
// src/utilities/event_channel.ts
|
|
2531
|
+
var EventChannel = class {
|
|
2532
|
+
constructor(channelName) {
|
|
2533
|
+
this.channelName = channelName;
|
|
2534
|
+
ModSdkManager.prototype.hookFunction("ChatRoomMessageProcessHidden", 0, (args, next) => {
|
|
2535
|
+
if (!this.isChannelMessage(args[0])) {
|
|
2536
|
+
return next(args);
|
|
2537
|
+
}
|
|
2538
|
+
const [message, sender] = args;
|
|
2539
|
+
const { type, data } = message.Dictionary[0];
|
|
2540
|
+
const listeners = this.listeners[type];
|
|
2541
|
+
if (listeners) {
|
|
2542
|
+
listeners.forEach((listener) => listener(data, sender));
|
|
2543
|
+
}
|
|
2544
|
+
return next(args);
|
|
2545
|
+
}, `EventChannel-${channelName}`);
|
|
2546
|
+
}
|
|
2547
|
+
static {
|
|
2548
|
+
__name(this, "EventChannel");
|
|
2549
|
+
}
|
|
2550
|
+
listeners = {};
|
|
2551
|
+
unload() {
|
|
2552
|
+
Object.keys(this.listeners).forEach((key) => delete this.listeners[key]);
|
|
2553
|
+
ModSdkManager.prototype.removeHookByModule("ChatRoomMessageProcessHidden", `EventChannel-${this.channelName}`);
|
|
2554
|
+
}
|
|
2555
|
+
sendEvent(type, data, target = null) {
|
|
2556
|
+
const packet = {
|
|
2557
|
+
Type: "Hidden",
|
|
2558
|
+
Content: this.channelName,
|
|
2559
|
+
Sender: Player.MemberNumber,
|
|
2560
|
+
...target ? { Target: target } : {},
|
|
2561
|
+
Dictionary: [
|
|
2562
|
+
{
|
|
2563
|
+
type,
|
|
2564
|
+
data
|
|
2565
|
+
}
|
|
2566
|
+
]
|
|
2567
|
+
};
|
|
2568
|
+
ServerSend("ChatRoomChat", packet);
|
|
2569
|
+
}
|
|
2570
|
+
registerListener(event, listener) {
|
|
2571
|
+
const listeners = this.listeners[event] ?? [];
|
|
2572
|
+
listeners.push(listener);
|
|
2573
|
+
this.listeners[event] = listeners;
|
|
2574
|
+
return () => this.unregisterListener(event, listener);
|
|
2575
|
+
}
|
|
2576
|
+
unregisterListener(event, listener) {
|
|
2577
|
+
const listeners = this.listeners[event];
|
|
2578
|
+
if (listeners) {
|
|
2579
|
+
const index = listeners.indexOf(listener);
|
|
2580
|
+
if (index !== -1) {
|
|
2581
|
+
listeners.splice(index, 1);
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
isChannelMessage(message) {
|
|
2586
|
+
return message && message.Type === "Hidden" && message.Content === this.channelName && message.Sender && message.Sender !== Player.MemberNumber && message.Dictionary && !!message.Dictionary[0]?.data && !!message.Dictionary[0]?.type || false;
|
|
2587
|
+
}
|
|
2588
|
+
};
|
|
2589
|
+
export {
|
|
2590
|
+
BaseMigrator2 as BaseMigrator,
|
|
2591
|
+
BaseModule,
|
|
2592
|
+
BaseSubscreen,
|
|
2593
|
+
EventChannel,
|
|
2594
|
+
GUI,
|
|
2595
|
+
HookPriority,
|
|
2596
|
+
Localization,
|
|
2597
|
+
Logger,
|
|
2598
|
+
ModSdkManager,
|
|
2599
|
+
ModStorage,
|
|
2600
|
+
Modal,
|
|
2601
|
+
Style,
|
|
2602
|
+
advElement,
|
|
2603
|
+
byteToKB,
|
|
2604
|
+
deepLibLogger,
|
|
2605
|
+
deepMerge,
|
|
2606
|
+
domUtil,
|
|
2607
|
+
exportToGlobal,
|
|
2608
|
+
getModule,
|
|
2609
|
+
getText,
|
|
2610
|
+
hasGetter,
|
|
2611
|
+
hasSetter,
|
|
2612
|
+
initMod,
|
|
2613
|
+
layout,
|
|
2614
|
+
logger,
|
|
2615
|
+
modStorage,
|
|
2616
|
+
modules,
|
|
2617
|
+
modulesMap,
|
|
2618
|
+
registerModule,
|
|
2619
|
+
sdk,
|
|
2620
|
+
sendActionMessage,
|
|
2621
|
+
sendLocalMessage,
|
|
2622
|
+
setSubscreen,
|
|
2623
|
+
shuffleArray,
|
|
2624
|
+
unloadMod
|
|
2625
|
+
};
|
|
2626
|
+
//# sourceMappingURL=deeplib.js.map
|