bc-deeplib 1.0.4 → 1.0.6
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/{main.js → deeplib.js} +200 -189
- package/dist/deeplib.js.map +1 -0
- package/package.json +2 -2
- package/dist/main.js.map +0 -1
- package/src/DeepLib.ts +0 -33
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
/******/
|
|
3
|
-
/******/ var __webpack_modules__ = ({
|
|
2
|
+
/******/ var __webpack_modules__ = ({
|
|
4
3
|
|
|
5
4
|
/***/ 734:
|
|
6
5
|
/***/ ((__unused_webpack_module, exports) => {
|
|
@@ -14,9 +13,11 @@ var bcModSdk=function(){"use strict";const o="1.2.0";function e(o){alert("Mod ER
|
|
|
14
13
|
/***/ }),
|
|
15
14
|
|
|
16
15
|
/***/ 63:
|
|
17
|
-
/***/ ((module,
|
|
16
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20
|
+
/* harmony export */ });
|
|
20
21
|
/* harmony import */ var _node_modules_pnpm_css_loader_7_1_2_webpack_5_97_1_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(973);
|
|
21
22
|
/* harmony import */ var _node_modules_pnpm_css_loader_7_1_2_webpack_5_97_1_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_pnpm_css_loader_7_1_2_webpack_5_97_1_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
22
23
|
/* harmony import */ var _node_modules_pnpm_css_loader_7_1_2_webpack_5_97_1_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(163);
|
|
@@ -234,7 +235,7 @@ input[type=number] {
|
|
|
234
235
|
}
|
|
235
236
|
`, "",{"version":3,"sources":["webpack://./public/styles/DeepLib.css"],"names":[],"mappings":"AAAA;EACE,8CAA8C;EAC9C,8CAA8C;EAC9C,uDAAuD;EACvD,wCAAwC;EACxC,0CAA0C;EAC1C,4CAA4C;AAC9C;;AAEA,aAAa;AACb,aAAa;AACb,aAAa;;AAEb;EACE,gCAAgC;AAClC;;AAEA;EACE,UAAU;EACV,SAAS;AACX;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,4BAA4B;EAC5B,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,8BAA8B;AAChC;;AAEA;EACE,kCAAkC;EAClC,gCAAgC;AAClC;;AAEA;EACE,kBAAkB;EAClB,OAAO;EACP,QAAQ;EACR,WAAW;EACX,YAAY;EACZ,yBAAyB;EACzB,2CAA2C;EAC3C,+BAA+B;EAC/B,wBAAwB;EACxB,mBAAmB;EACnB,kBAAkB;EAClB,4BAA4B;EAC5B,sBAAsB;EACtB,kBAAkB;;EAElB,8BAA8B;EAC9B,wBAAwB;AAC1B;;AAEA;EACE,WAAW;EACX,6BAA6B;EAC7B,gCAAgC;EAChC,8BAA8B;AAChC;;AAEA;EACE,kBAAkB;EAClB,gCAAgC;AAClC;;AAEA;EACE,2BAA2B;AAC7B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,UAAU;AACZ;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,kBAAkB;EAClB,2BAA2B;AAC7B;;AAEA;EACE,eAAe;EACf,WAAW;EACX,cAAc;EACd,6BAA6B;EAC7B,aAAa;EACb,6BAA6B;EAC7B,8BAA8B;AAChC;;AAEA;EACE,kBAAkB;EAClB,sBAAsB;EACtB,uBAAuB;EACvB,yBAAyB;EACzB,oBAAoB;AACtB;;AAEA;;EAEE,gBAAgB;EAChB,+BAA+B;EAC/B,iDAAiD;EACjD,4BAA4B;AAC9B;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,WAAW;EACX,WAAW;EACX,oDAAoD;EACpD,oBAAoB;EACpB,yBAAyB;AAC3B;;AAEA;;EAEE,uBAAuB;AACzB;;AAEA;EACE,8CAA8C;EAC9C,gCAAgC;EAChC,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,kCAAkC;EAClC,wBAAwB;EACxB,gBAAgB;EAChB,2DAA2D;AAC7D;;AAEA;;EAEE,wBAAwB;EACxB,SAAS;AACX;;AAEA;EACE,qBAAqB;EACrB,0BAA0B;AAC5B;;AAEA,cAAc;AACd,aAAa;AACb,cAAc;;AAEd;EACE,iBAAiB;EACjB,wBAAwB;AAC1B;;AAEA;;EAEE,8CAA8C;EAC9C,6DAA6D;EAC7D,gCAAgC;AAClC;;AAEA;EACE,sBAAsB;EACtB,yCAAyC;EACzC,WAAW;EACX,iCAAiC;EACjC,cAAc;EACd,mBAAmB;AACrB;;AAEA;;EAEE,gCAAgC;AAClC;;AAEA;EACE,eAAe;EACf,iBAAiB;EACjB,WAAW;AACb","sourcesContent":[".deeplib-subscreen {\n --deeplib-background-color: var(--main, white);\n --deeplib-element-color: var(--element, white);\n --deeplib-element-hover-color: var(--accentHover, cyan);\n --deeplib-text-color: var(--text, black);\n --deeplib-icon-color: var(--accent, white);\n --deeplib-border-color: var(--accent, black);\n}\n\n/************/\n/* ELEMENTS */\n/************/\n\n.deeplib-text {\n color: var(--deeplib-text-color);\n}\n\n.deeplib-subscreen {\n padding: 0;\n margin: 0;\n}\n\n.deeplib-subscreen * {\n box-sizing: border-box;\n}\n\n.deeplib-settings {\n display: flex;\n flex-direction: column;\n padding: min(1.0dvh, 0.5dvw);\n gap: 0.3em;\n overflow-y: auto;\n}\n\n.deeplib-misc {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column-reverse;\n}\n\n.deeplib-button.button-styling {\n border-radius: min(1.0dvh, 0.5dvw);\n color: var(--deeplib-text-color);\n}\n\n.deeplib-button.button-styling img {\n position: absolute;\n top: 0%;\n left: 0%;\n width: 100%;\n height: 100%;\n background-position: left;\n background-color: var(--deeplib-icon-color);\n background-blend-mode: multiply;\n background-size: contain;\n mask-position: left;\n mask-size: contain;\n background-repeat: no-repeat;\n mask-repeat: no-repeat;\n color: transparent;\n\n background-image: var(--image);\n mask-image: var(--image);\n}\n\n.deeplib-button.button-styling .button-label {\n width: 100%;\n background-color: transparent;\n color: var(--deeplib-text-color);\n font-size: min(3.6dvh, 1.8dvw);\n}\n\n#deeplib-subscreen-title {\n text-align: center;\n color: var(--deeplib-text-color);\n}\n\n#deeplib-reset-button {\n background-color: indianred;\n}\n\n#deeplib-wiki-button {\n background-color: #BDA203;\n}\n\n#deeplib-support-button {\n background-color: #5e4969;\n}\n\n.deeplib-checkbox-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.3em;\n}\n\n.deeplib-input {\n border-radius: min(1.0dvh, 0.5dvw);\n}\n\n.deeplib-input-container {\n position: relative;\n margin-top: min(1vh, 0.5vw);\n}\n\n.deeplib-input-container input.deeplib-input {\n font-size: 20px;\n width: 100%;\n padding: 5px 0;\n background-color: transparent;\n outline: none;\n padding-left: min(1vh, 0.5vw);\n padding-right: min(1vh, 0.5vw);\n}\n\n.deeplib-input-container label.deeplib-text {\n position: absolute;\n top: min(0.6vh, 0.3vw);\n left: min(0.6vh, 0.3vw);\n transition: all 0.3s ease;\n pointer-events: none;\n}\n\n.deeplib-input-container input.deeplib-input:focus~label,\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~label {\n font-size: 0.7em;\n transform: translate(20%, -70%);\n background-color: var(--deeplib-background-color);\n padding: 0px min(1vh, 0.5vw);\n}\n\n.deeplib-input-container .deeplib-underline {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 2px;\n width: 100%;\n background-color: var(--deeplib-element-hover-color);\n transform: scaleX(0);\n transition: all 0.3s ease;\n}\n\n.deeplib-input-container input.deeplib-input:focus~.deeplib-underline,\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~.deeplib-underline {\n transform: scaleX(0.98);\n}\n\n.deeplib-tooltip {\n background-color: var(--deeplib-element-color);\n color: var(--deeplib-text-color);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: min(1.0dvh, 0.5dvw);\n padding: min(1vh, 0.5vw);\n font-size: 0.8em;\n border: min(0.2vh, 0.1vw) solid var(--deeplib-border-color);\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type=number] {\n appearance: textfield;\n -moz-appearance: textfield;\n}\n\n/*************/\n/* MESSAGES */\n/*************/\n\n.deeplib-highlight-text {\n font-weight: bold;\n color: rgb(203, 185, 23);\n}\n\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message,\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message {\n background-color: var(--deeplib-element-color);\n border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);\n color: var(--deeplib-text-color);\n}\n\n#TextAreaChatLog div.ChatMessage.deeplib-message {\n background-color: #eee;\n border: min(0.2dvh, 0.1dvw) solid #440171;\n color: #111;\n padding-left: min(0.6dvh, 0.3dvw);\n display: block;\n white-space: normal;\n}\n\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message a,\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message a {\n color: var(--deeplib-text-color);\n}\n\n#TextAreaChatLog div.ChatMessage.deeplib-message a {\n cursor: pointer;\n font-weight: bold;\n color: #111;\n}\n"],"sourceRoot":""}]);
|
|
236
237
|
// Exports
|
|
237
|
-
/*
|
|
238
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
238
239
|
|
|
239
240
|
|
|
240
241
|
/***/ }),
|
|
@@ -242,7 +243,6 @@ input[type=number] {
|
|
|
242
243
|
/***/ 163:
|
|
243
244
|
/***/ ((module) => {
|
|
244
245
|
|
|
245
|
-
"use strict";
|
|
246
246
|
|
|
247
247
|
|
|
248
248
|
/*
|
|
@@ -334,7 +334,6 @@ module.exports = function (cssWithMappingToString) {
|
|
|
334
334
|
/***/ 973:
|
|
335
335
|
/***/ ((module) => {
|
|
336
336
|
|
|
337
|
-
"use strict";
|
|
338
337
|
|
|
339
338
|
|
|
340
339
|
module.exports = function (item) {
|
|
@@ -354,117 +353,68 @@ module.exports = function (item) {
|
|
|
354
353
|
|
|
355
354
|
/***/ })
|
|
356
355
|
|
|
357
|
-
/******/
|
|
356
|
+
/******/ });
|
|
358
357
|
/************************************************************************/
|
|
359
|
-
/******/
|
|
360
|
-
/******/
|
|
361
|
-
/******/
|
|
362
|
-
/******/
|
|
363
|
-
/******/
|
|
364
|
-
/******/
|
|
365
|
-
/******/
|
|
366
|
-
/******/
|
|
367
|
-
/******/
|
|
368
|
-
/******/ }
|
|
369
|
-
/******/ // Create a new module (and put it into the cache)
|
|
370
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
371
|
-
/******/ id: moduleId,
|
|
372
|
-
/******/ // no module.loaded needed
|
|
373
|
-
/******/ exports: {}
|
|
374
|
-
/******/ };
|
|
375
|
-
/******/
|
|
376
|
-
/******/ // Execute the module function
|
|
377
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
378
|
-
/******/
|
|
379
|
-
/******/ // Return the exports of the module
|
|
380
|
-
/******/ return module.exports;
|
|
358
|
+
/******/ // The module cache
|
|
359
|
+
/******/ var __webpack_module_cache__ = {};
|
|
360
|
+
/******/
|
|
361
|
+
/******/ // The require function
|
|
362
|
+
/******/ function __webpack_require__(moduleId) {
|
|
363
|
+
/******/ // Check if module is in cache
|
|
364
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
365
|
+
/******/ if (cachedModule !== undefined) {
|
|
366
|
+
/******/ return cachedModule.exports;
|
|
381
367
|
/******/ }
|
|
382
|
-
/******/
|
|
368
|
+
/******/ // Create a new module (and put it into the cache)
|
|
369
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
370
|
+
/******/ id: moduleId,
|
|
371
|
+
/******/ // no module.loaded needed
|
|
372
|
+
/******/ exports: {}
|
|
373
|
+
/******/ };
|
|
374
|
+
/******/
|
|
375
|
+
/******/ // Execute the module function
|
|
376
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
377
|
+
/******/
|
|
378
|
+
/******/ // Return the exports of the module
|
|
379
|
+
/******/ return module.exports;
|
|
380
|
+
/******/ }
|
|
381
|
+
/******/
|
|
383
382
|
/************************************************************************/
|
|
384
|
-
/******/
|
|
385
|
-
/******/
|
|
386
|
-
/******/
|
|
387
|
-
/******/
|
|
388
|
-
/******/
|
|
389
|
-
/******/
|
|
390
|
-
/******/
|
|
391
|
-
/******/
|
|
392
|
-
/******/
|
|
393
|
-
/******/
|
|
394
|
-
/******/
|
|
395
|
-
/******/
|
|
396
|
-
/******/
|
|
397
|
-
/******/
|
|
398
|
-
/******/
|
|
399
|
-
/******/
|
|
400
|
-
/******/
|
|
401
|
-
/******/
|
|
402
|
-
/******/
|
|
403
|
-
/******/ }
|
|
383
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
384
|
+
/******/ (() => {
|
|
385
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
386
|
+
/******/ __webpack_require__.n = (module) => {
|
|
387
|
+
/******/ var getter = module && module.__esModule ?
|
|
388
|
+
/******/ () => (module['default']) :
|
|
389
|
+
/******/ () => (module);
|
|
390
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
391
|
+
/******/ return getter;
|
|
392
|
+
/******/ };
|
|
393
|
+
/******/ })();
|
|
394
|
+
/******/
|
|
395
|
+
/******/ /* webpack/runtime/define property getters */
|
|
396
|
+
/******/ (() => {
|
|
397
|
+
/******/ // define getter functions for harmony exports
|
|
398
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
399
|
+
/******/ for(var key in definition) {
|
|
400
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
401
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
404
402
|
/******/ }
|
|
405
|
-
/******/ }
|
|
406
|
-
/******/ }
|
|
407
|
-
/******/
|
|
408
|
-
/******/
|
|
409
|
-
/******/
|
|
410
|
-
/******/
|
|
411
|
-
/******/
|
|
412
|
-
/******/
|
|
403
|
+
/******/ }
|
|
404
|
+
/******/ };
|
|
405
|
+
/******/ })();
|
|
406
|
+
/******/
|
|
407
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
408
|
+
/******/ (() => {
|
|
409
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
410
|
+
/******/ })();
|
|
411
|
+
/******/
|
|
413
412
|
/************************************************************************/
|
|
414
413
|
var __webpack_exports__ = {};
|
|
415
|
-
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
416
|
-
(() => {
|
|
417
|
-
"use strict";
|
|
418
|
-
|
|
419
|
-
// EXPORTS
|
|
420
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
421
|
-
WO: () => (/* reexport */ BaseModule_BaseModule),
|
|
422
|
-
Ms: () => (/* reexport */ BaseSubscreen),
|
|
423
|
-
cL: () => (/* reexport */ GUI_GUI),
|
|
424
|
-
vG: () => (/* reexport */ GuiDebug),
|
|
425
|
-
bo: () => (/* reexport */ GuiSupport),
|
|
426
|
-
zU: () => (/* reexport */ MainMenu),
|
|
427
|
-
r7: () => (/* reexport */ Data_PlayerStorage),
|
|
428
|
-
yG: () => (/* reexport */ SupportHelper),
|
|
429
|
-
Lu: () => (/* reexport */ _String),
|
|
430
|
-
Q: () => (/* reexport */ SDK_bcSdkMod),
|
|
431
|
-
c0: () => (/* reexport */ Data_dataStore),
|
|
432
|
-
eh: () => (/* reexport */ Logger_deepLibLogger),
|
|
433
|
-
ys: () => (/* reexport */ elementAdjustFontSize),
|
|
434
|
-
XD: () => (/* reexport */ elementAppendToMiscDiv),
|
|
435
|
-
wu: () => (/* reexport */ elementAppendToSettingsDiv),
|
|
436
|
-
Xc: () => (/* reexport */ elementAppendToSubscreenDiv),
|
|
437
|
-
RZ: () => (/* reexport */ elementCreateButton),
|
|
438
|
-
mn: () => (/* reexport */ elementCreateCheckbox),
|
|
439
|
-
lQ: () => (/* reexport */ elementCreateInput),
|
|
440
|
-
l$: () => (/* reexport */ elementCreateLabel),
|
|
441
|
-
g_: () => (/* reexport */ elementCreateMiscDiv),
|
|
442
|
-
vx: () => (/* reexport */ elementCreateSettingsDiv),
|
|
443
|
-
m7: () => (/* reexport */ elementCreateSubscreenDiv),
|
|
444
|
-
kq: () => (/* reexport */ elementCreateTooltip),
|
|
445
|
-
Rd: () => (/* reexport */ elementGetSettingsDiv),
|
|
446
|
-
cb: () => (/* reexport */ elementGetSubscreenDiv),
|
|
447
|
-
GU: () => (/* reexport */ elementGetTooltip),
|
|
448
|
-
hv: () => (/* reexport */ elementHide),
|
|
449
|
-
Y: () => (/* reexport */ elementRemoveSubscreenDiv),
|
|
450
|
-
Jg: () => (/* reexport */ elementSetPosSizeFont),
|
|
451
|
-
_Z: () => (/* reexport */ elementSetPosition),
|
|
452
|
-
Ql: () => (/* reexport */ elementSetSize),
|
|
453
|
-
ox: () => (/* reexport */ elementSetTooltip),
|
|
454
|
-
Ck: () => (/* reexport */ getRelativeHeight),
|
|
455
|
-
rF: () => (/* reexport */ getRelativeWidth),
|
|
456
|
-
Pn: () => (/* reexport */ getRelativeX),
|
|
457
|
-
W1: () => (/* reexport */ getRelativeY),
|
|
458
|
-
q4: () => (/* reexport */ getText),
|
|
459
|
-
av: () => (/* reexport */ Modules_modules),
|
|
460
|
-
hN: () => (/* reexport */ setSubscreen)
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
// UNUSED EXPORTS: BaseMigrator, ExtensionStorage, HookPriority, Localization, Logger, Style, VersionModule, dataTake, elementGetMiscDiv, elementUnhide, getCurrentSubscreen, getModule, init, initMod, modulesMap, registerModule, sendActionMessage, sendLocalMessage, setMainMenuOptions, unloadMod
|
|
464
414
|
|
|
465
415
|
;// ./src/Base/BaseModule.ts
|
|
466
416
|
|
|
467
|
-
class
|
|
417
|
+
class BaseModule {
|
|
468
418
|
get settingsScreen() {
|
|
469
419
|
return null;
|
|
470
420
|
}
|
|
@@ -472,16 +422,16 @@ class BaseModule_BaseModule {
|
|
|
472
422
|
return this.constructor.name;
|
|
473
423
|
}
|
|
474
424
|
get settings() {
|
|
475
|
-
const modName =
|
|
425
|
+
const modName = bcSdkMod.ModInfo.name;
|
|
476
426
|
if (!this.settingsStorage)
|
|
477
427
|
return {};
|
|
478
|
-
if (!
|
|
428
|
+
if (!PlayerStorage()) {
|
|
479
429
|
Player[modName] = {};
|
|
480
430
|
this.registerDefaultSettings();
|
|
481
431
|
}
|
|
482
|
-
else if (!
|
|
432
|
+
else if (!PlayerStorage()[this.settingsStorage])
|
|
483
433
|
this.registerDefaultSettings();
|
|
484
|
-
return
|
|
434
|
+
return PlayerStorage()[this.settingsStorage];
|
|
485
435
|
}
|
|
486
436
|
init() {
|
|
487
437
|
this.registerDefaultSettings();
|
|
@@ -491,7 +441,7 @@ class BaseModule_BaseModule {
|
|
|
491
441
|
const defaults = this.defaultSettings;
|
|
492
442
|
if (!storage || !defaults)
|
|
493
443
|
return;
|
|
494
|
-
Player[
|
|
444
|
+
Player[bcSdkMod.ModInfo.name][storage] = Object.assign(defaults, Player[bcSdkMod.ModInfo.name][storage] ?? {});
|
|
495
445
|
}
|
|
496
446
|
get defaultSettings() {
|
|
497
447
|
return null;
|
|
@@ -542,7 +492,7 @@ class BaseSubscreen {
|
|
|
542
492
|
});
|
|
543
493
|
}
|
|
544
494
|
load() {
|
|
545
|
-
for (const module of
|
|
495
|
+
for (const module of modules()) {
|
|
546
496
|
if (!module.settingsScreen)
|
|
547
497
|
continue;
|
|
548
498
|
if (!module.settings || !Object.keys(module.settings).length)
|
|
@@ -554,7 +504,7 @@ class BaseSubscreen {
|
|
|
554
504
|
const subscreenTitle = elementCreateLabel({
|
|
555
505
|
type: 'label',
|
|
556
506
|
id: 'deeplib-subscreen-title',
|
|
557
|
-
label: getText('mainmenu.title').replace('$ModVersion',
|
|
507
|
+
label: getText('mainmenu.title').replace('$ModVersion', bcSdkMod.ModInfo.version) + ' ' + SupportHelper.getSupporter(),
|
|
558
508
|
});
|
|
559
509
|
elementAppendToSubscreenDiv(subscreenTitle);
|
|
560
510
|
if (this.name !== 'mainmenu') {
|
|
@@ -595,7 +545,7 @@ class BaseSubscreen {
|
|
|
595
545
|
CharacterAppearanceForceUpCharacter = Player.MemberNumber ?? -1;
|
|
596
546
|
}
|
|
597
547
|
run() {
|
|
598
|
-
const newTitle = getText('mainmenu.title').replace('$ModVersion',
|
|
548
|
+
const newTitle = getText('mainmenu.title').replace('$ModVersion', bcSdkMod.ModInfo.version) + ' ' + SupportHelper.getSupporter();
|
|
599
549
|
const oldTitle = ElementContent('deeplib-subscreen-title');
|
|
600
550
|
if (newTitle !== oldTitle) {
|
|
601
551
|
ElementContent('deeplib-subscreen-title', newTitle);
|
|
@@ -616,7 +566,7 @@ class BaseSubscreen {
|
|
|
616
566
|
CharacterAppearanceForceUpCharacter = -1;
|
|
617
567
|
CharacterLoadCanvas(Player);
|
|
618
568
|
setSubscreen('mainmenu');
|
|
619
|
-
|
|
569
|
+
dataStore();
|
|
620
570
|
}
|
|
621
571
|
resize(onLoad = false) {
|
|
622
572
|
elementSetPosSizeFont({ element: elementGetSubscreenDiv() }, 0, 0, 2000, 1000);
|
|
@@ -697,7 +647,7 @@ async function init(initFunction, modules, pathToTranslationsFolder) {
|
|
|
697
647
|
if (window[MOD_NAME + 'Loaded'])
|
|
698
648
|
return;
|
|
699
649
|
dataTake();
|
|
700
|
-
Style.inject('deeplib-style',
|
|
650
|
+
Style.inject('deeplib-style', DeepLib/* default */.A);
|
|
701
651
|
new Localization({ pathToTranslationsFolder: pathToTranslationsFolder });
|
|
702
652
|
await Localization.init();
|
|
703
653
|
if (!initModules(modules)) {
|
|
@@ -742,10 +692,10 @@ function unloadModules() {
|
|
|
742
692
|
|
|
743
693
|
;// ./src/Base/Modules.ts
|
|
744
694
|
const modulesMap = new Map();
|
|
745
|
-
function
|
|
695
|
+
function modules() {
|
|
746
696
|
return [...modulesMap.values()];
|
|
747
697
|
}
|
|
748
|
-
function
|
|
698
|
+
function registerModule(module) {
|
|
749
699
|
modulesMap.set(module.constructor.name, module);
|
|
750
700
|
return module;
|
|
751
701
|
}
|
|
@@ -759,16 +709,20 @@ function getCurrentSubscreen() {
|
|
|
759
709
|
return GUI.instance && GUI.instance.currentSubscreen;
|
|
760
710
|
}
|
|
761
711
|
function setSubscreen(subscreen) {
|
|
762
|
-
if (!
|
|
712
|
+
if (!GUI.instance) {
|
|
763
713
|
throw new Error('Attempt to set subscreen before init');
|
|
764
714
|
}
|
|
765
|
-
|
|
766
|
-
return
|
|
715
|
+
GUI.instance.currentSubscreen = subscreen;
|
|
716
|
+
return GUI.instance.currentSubscreen;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
;// ./src/Migrators/BaseMigrator.ts
|
|
720
|
+
class BaseMigrator {
|
|
767
721
|
}
|
|
768
722
|
|
|
769
723
|
;// ./src/Modules/GUI.ts
|
|
770
724
|
|
|
771
|
-
class
|
|
725
|
+
class GUI extends BaseModule {
|
|
772
726
|
static instance = null;
|
|
773
727
|
_subscreens;
|
|
774
728
|
_mainMenu;
|
|
@@ -805,23 +759,23 @@ class GUI_GUI extends BaseModule_BaseModule {
|
|
|
805
759
|
}
|
|
806
760
|
constructor(modButtonOptions) {
|
|
807
761
|
super();
|
|
808
|
-
if (
|
|
762
|
+
if (GUI.instance) {
|
|
809
763
|
throw new Error('Duplicate initialization');
|
|
810
764
|
}
|
|
811
|
-
for (const module of
|
|
765
|
+
for (const module of modules()) {
|
|
812
766
|
if (!module.settingsScreen)
|
|
813
767
|
continue;
|
|
814
768
|
}
|
|
815
769
|
this._mainMenu = new MainMenu(this);
|
|
816
770
|
this._subscreens = [this._mainMenu];
|
|
817
771
|
this._modButtonOptions = modButtonOptions;
|
|
818
|
-
|
|
772
|
+
GUI.instance = this;
|
|
819
773
|
}
|
|
820
774
|
get defaultSettings() {
|
|
821
775
|
return null;
|
|
822
776
|
}
|
|
823
777
|
load() {
|
|
824
|
-
for (const module of
|
|
778
|
+
for (const module of modules()) {
|
|
825
779
|
if (!module.settingsScreen)
|
|
826
780
|
continue;
|
|
827
781
|
this._subscreens.push(new module.settingsScreen(module));
|
|
@@ -867,33 +821,33 @@ class GUI_GUI extends BaseModule_BaseModule {
|
|
|
867
821
|
|
|
868
822
|
;// ./src/Modules/Version.ts
|
|
869
823
|
|
|
870
|
-
class
|
|
871
|
-
static isItNewVersion =
|
|
824
|
+
class VersionModule extends BaseModule {
|
|
825
|
+
static isItNewVersion = false;
|
|
872
826
|
static Version;
|
|
873
|
-
static NewVersionMessage =
|
|
874
|
-
static Migrators =
|
|
827
|
+
static NewVersionMessage = '';
|
|
828
|
+
static Migrators = [];
|
|
875
829
|
load() {
|
|
876
|
-
|
|
830
|
+
VersionModule.Version = bcSdkMod.ModInfo.version;
|
|
877
831
|
bcSdkMod.prototype.hookFunction('ChatRoomSync', HookPriority.Observe, (args, next) => {
|
|
878
832
|
next(args);
|
|
879
|
-
if (PlayerStorage().GlobalModule.doShowNewVersionMessage &&
|
|
880
|
-
|
|
833
|
+
if (PlayerStorage().GlobalModule.doShowNewVersionMessage && VersionModule.isItNewVersion) {
|
|
834
|
+
VersionModule.sendNewVersionMessage();
|
|
881
835
|
}
|
|
882
836
|
}, 999);
|
|
883
837
|
}
|
|
884
838
|
static checkVersionUpdate() {
|
|
885
|
-
const PreviousVersion =
|
|
886
|
-
const CurrentVersion =
|
|
887
|
-
if (
|
|
888
|
-
|
|
889
|
-
|
|
839
|
+
const PreviousVersion = VersionModule.loadVersion();
|
|
840
|
+
const CurrentVersion = VersionModule.Version;
|
|
841
|
+
if (VersionModule.isNewVersion(PreviousVersion, CurrentVersion)) {
|
|
842
|
+
VersionModule.isItNewVersion = true;
|
|
843
|
+
VersionModule.saveVersion();
|
|
890
844
|
}
|
|
891
845
|
}
|
|
892
846
|
static checkVersionMigration() {
|
|
893
|
-
const PreviousVersion =
|
|
847
|
+
const PreviousVersion = VersionModule.loadVersion();
|
|
894
848
|
let saveRequired = false;
|
|
895
|
-
for (const migrator of
|
|
896
|
-
if (
|
|
849
|
+
for (const migrator of VersionModule.Migrators) {
|
|
850
|
+
if (VersionModule.isNewVersion(PreviousVersion, migrator.MigrationVersion)) {
|
|
897
851
|
saveRequired = saveRequired || migrator.Migrate();
|
|
898
852
|
deepLibLogger.info(`Migrating ${bcSdkMod.ModInfo.name} from ${PreviousVersion} to ${migrator.MigrationVersion} with ${migrator.constructor.name}`);
|
|
899
853
|
}
|
|
@@ -903,13 +857,13 @@ class Version_VersionModule extends (/* unused pure expression or super */ null
|
|
|
903
857
|
}
|
|
904
858
|
}
|
|
905
859
|
static registerMigrator(migrator) {
|
|
906
|
-
|
|
860
|
+
VersionModule.Migrators.push(migrator);
|
|
907
861
|
}
|
|
908
862
|
static setNewVersionMessage(newVersionMessage) {
|
|
909
|
-
|
|
863
|
+
VersionModule.NewVersionMessage = newVersionMessage;
|
|
910
864
|
}
|
|
911
865
|
static sendNewVersionMessage() {
|
|
912
|
-
sendLocalMessage('deeplib-new-version',
|
|
866
|
+
sendLocalMessage('deeplib-new-version', VersionModule.NewVersionMessage);
|
|
913
867
|
}
|
|
914
868
|
static isNewVersion(current, candidate) {
|
|
915
869
|
if (current !== undefined) {
|
|
@@ -928,7 +882,7 @@ class Version_VersionModule extends (/* unused pure expression or super */ null
|
|
|
928
882
|
}
|
|
929
883
|
static saveVersion() {
|
|
930
884
|
if (PlayerStorage()) {
|
|
931
|
-
Player[bcSdkMod.ModInfo.name].Version =
|
|
885
|
+
Player[bcSdkMod.ModInfo.name].Version = VersionModule.Version;
|
|
932
886
|
}
|
|
933
887
|
}
|
|
934
888
|
static loadVersion() {
|
|
@@ -953,7 +907,7 @@ class GuiDebug extends BaseSubscreen {
|
|
|
953
907
|
tooltip: 'This is a big button',
|
|
954
908
|
image: 'Icons/Exit.png',
|
|
955
909
|
onClick() {
|
|
956
|
-
|
|
910
|
+
deepLibLogger.info('Big Button Clicked');
|
|
957
911
|
}
|
|
958
912
|
},
|
|
959
913
|
{
|
|
@@ -964,7 +918,7 @@ class GuiDebug extends BaseSubscreen {
|
|
|
964
918
|
tooltip: 'This is a small button',
|
|
965
919
|
image: 'Icons/Exit.png',
|
|
966
920
|
onClick() {
|
|
967
|
-
|
|
921
|
+
deepLibLogger.info('Small Button Clicked');
|
|
968
922
|
}
|
|
969
923
|
},
|
|
970
924
|
{
|
|
@@ -977,7 +931,7 @@ class GuiDebug extends BaseSubscreen {
|
|
|
977
931
|
return true;
|
|
978
932
|
},
|
|
979
933
|
setSettingValue(val) {
|
|
980
|
-
|
|
934
|
+
deepLibLogger.info('Checkbox value:', val);
|
|
981
935
|
},
|
|
982
936
|
},
|
|
983
937
|
{
|
|
@@ -989,7 +943,7 @@ class GuiDebug extends BaseSubscreen {
|
|
|
989
943
|
return 'Input Value';
|
|
990
944
|
},
|
|
991
945
|
setSettingValue(val) {
|
|
992
|
-
|
|
946
|
+
deepLibLogger.info('Input value:', val);
|
|
993
947
|
},
|
|
994
948
|
},
|
|
995
949
|
{
|
|
@@ -1001,7 +955,7 @@ class GuiDebug extends BaseSubscreen {
|
|
|
1001
955
|
return '123';
|
|
1002
956
|
},
|
|
1003
957
|
setSettingValue(val) {
|
|
1004
|
-
|
|
958
|
+
deepLibLogger.info('Input value:', val);
|
|
1005
959
|
},
|
|
1006
960
|
},
|
|
1007
961
|
{
|
|
@@ -1041,7 +995,7 @@ class MainMenu extends BaseSubscreen {
|
|
|
1041
995
|
this.subscreens = module.subscreens;
|
|
1042
996
|
}
|
|
1043
997
|
load() {
|
|
1044
|
-
if (!
|
|
998
|
+
if (!GUI.instance?.currentSubscreen) {
|
|
1045
999
|
this.setSubscreen(this);
|
|
1046
1000
|
return;
|
|
1047
1001
|
}
|
|
@@ -1236,11 +1190,11 @@ const gratitudeHtml = `
|
|
|
1236
1190
|
|
|
1237
1191
|
;// ./src/Utilities/Data.ts
|
|
1238
1192
|
|
|
1239
|
-
const
|
|
1240
|
-
CommonCloneDeep(Player?.[
|
|
1193
|
+
const PlayerStorage = () => (typeof Player?.[bcSdkMod.ModInfo.name] === 'object' ?
|
|
1194
|
+
CommonCloneDeep(Player?.[bcSdkMod.ModInfo.name]) :
|
|
1241
1195
|
undefined);
|
|
1242
|
-
const ExtensionStorage = () => Player.ExtensionSettings[
|
|
1243
|
-
function
|
|
1196
|
+
const ExtensionStorage = () => Player.ExtensionSettings[bcSdkMod.ModInfo.name];
|
|
1197
|
+
function dataTake(modName = bcSdkMod.ModInfo.name) {
|
|
1244
1198
|
if (ExtensionStorage()) {
|
|
1245
1199
|
const parsed = JSON.parse(LZString.decompressFromBase64(ExtensionStorage()) || '');
|
|
1246
1200
|
Player[modName] = Object.hasOwn(parsed, 'Version') ? parsed : undefined;
|
|
@@ -1249,9 +1203,9 @@ function Data_dataTake(modName = bcSdkMod.ModInfo.name) {
|
|
|
1249
1203
|
Player[modName] = {};
|
|
1250
1204
|
}
|
|
1251
1205
|
}
|
|
1252
|
-
function
|
|
1253
|
-
const modName =
|
|
1254
|
-
const modVersion =
|
|
1206
|
+
function dataStore() {
|
|
1207
|
+
const modName = bcSdkMod.ModInfo.name;
|
|
1208
|
+
const modVersion = bcSdkMod.ModInfo.version;
|
|
1255
1209
|
if (!ExtensionStorage())
|
|
1256
1210
|
Player.ExtensionSettings[modName] = '';
|
|
1257
1211
|
const Data = {
|
|
@@ -1261,10 +1215,10 @@ function Data_dataStore() {
|
|
|
1261
1215
|
},
|
|
1262
1216
|
Version: modVersion
|
|
1263
1217
|
};
|
|
1264
|
-
for (const module of
|
|
1218
|
+
for (const module of modules()) {
|
|
1265
1219
|
if (!module.settingsStorage)
|
|
1266
1220
|
continue;
|
|
1267
|
-
Data[module.settingsStorage] =
|
|
1221
|
+
Data[module.settingsStorage] = PlayerStorage()[module.settingsStorage];
|
|
1268
1222
|
}
|
|
1269
1223
|
Player.ExtensionSettings[modName] = _String.encode(Data);
|
|
1270
1224
|
ServerPlayerExtensionSettingsSync(modName);
|
|
@@ -1396,13 +1350,13 @@ function elementUnhide(_) {
|
|
|
1396
1350
|
}
|
|
1397
1351
|
function elementGet(_, funcName) {
|
|
1398
1352
|
if (!_) {
|
|
1399
|
-
|
|
1353
|
+
deepLibLogger.warn(`${funcName} called without an elementId or element`);
|
|
1400
1354
|
return null;
|
|
1401
1355
|
}
|
|
1402
1356
|
const elementId = _.elementId ?? _.element?.id;
|
|
1403
1357
|
const element = _.element ?? document.getElementById(_.elementId);
|
|
1404
1358
|
if (!element) {
|
|
1405
|
-
|
|
1359
|
+
deepLibLogger.warn(`A call to ${funcName} was made on non-existent element with id ${elementId}`);
|
|
1406
1360
|
return null;
|
|
1407
1361
|
}
|
|
1408
1362
|
return element;
|
|
@@ -1708,37 +1662,73 @@ class Logger extends Array {
|
|
|
1708
1662
|
return colors[logLevel];
|
|
1709
1663
|
}
|
|
1710
1664
|
}
|
|
1711
|
-
const
|
|
1665
|
+
const deepLibLogger = new Logger();
|
|
1666
|
+
|
|
1667
|
+
;// ./src/Utilities/Messages.ts
|
|
1668
|
+
function sendLocalMessage(id, message, timeoutInSeconds) {
|
|
1669
|
+
const div = document.createElement('div');
|
|
1670
|
+
div.id = id;
|
|
1671
|
+
const specialId = id + Date.now();
|
|
1672
|
+
div.classList.add('ChatMessage', 'deeplib-message', specialId);
|
|
1673
|
+
div.setAttribute('data-time', ChatRoomCurrentTime());
|
|
1674
|
+
div.setAttribute('data-sender', Player?.MemberNumber + '');
|
|
1675
|
+
const messageContent = message.replaceAll('\n\t', '') + '<br>';
|
|
1676
|
+
const closeButton = document.createElement('a');
|
|
1677
|
+
closeButton.classList.add('deeplib-text');
|
|
1678
|
+
closeButton.addEventListener('click', () => {
|
|
1679
|
+
div?.remove();
|
|
1680
|
+
});
|
|
1681
|
+
closeButton.innerHTML = '<b>Close (Click)</b>';
|
|
1682
|
+
div.innerHTML = messageContent;
|
|
1683
|
+
div.append(closeButton);
|
|
1684
|
+
ChatRoomAppendChat(div);
|
|
1685
|
+
if (!timeoutInSeconds)
|
|
1686
|
+
return;
|
|
1687
|
+
setTimeout(() => div?.remove(), timeoutInSeconds * 1000);
|
|
1688
|
+
}
|
|
1689
|
+
function sendActionMessage(msg, target = undefined, dictionary = []) {
|
|
1690
|
+
if (!msg)
|
|
1691
|
+
return;
|
|
1692
|
+
ServerSend('ChatRoomChat', {
|
|
1693
|
+
Content: 'DEEPLIB_CUSTOM_ACTION',
|
|
1694
|
+
Type: 'Action',
|
|
1695
|
+
Target: target ?? undefined,
|
|
1696
|
+
Dictionary: [
|
|
1697
|
+
{ Tag: 'MISSING TEXT IN "Interface.csv": DEEPLIB_CUSTOM_ACTION', Text: msg },
|
|
1698
|
+
...dictionary,
|
|
1699
|
+
],
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1712
1702
|
|
|
1713
1703
|
// EXTERNAL MODULE: ./node_modules/.pnpm/bondage-club-mod-sdk@1.2.0/node_modules/bondage-club-mod-sdk/dist/bcmodsdk.js
|
|
1714
1704
|
var bcmodsdk = __webpack_require__(734);
|
|
1715
1705
|
var bcmodsdk_default = /*#__PURE__*/__webpack_require__.n(bcmodsdk);
|
|
1716
1706
|
;// ./src/Utilities/SDK.ts
|
|
1717
1707
|
|
|
1718
|
-
var
|
|
1708
|
+
var HookPriority;
|
|
1719
1709
|
(function (HookPriority) {
|
|
1720
1710
|
HookPriority[HookPriority["Observe"] = 0] = "Observe";
|
|
1721
1711
|
HookPriority[HookPriority["AddBehavior"] = 1] = "AddBehavior";
|
|
1722
1712
|
HookPriority[HookPriority["ModifyBehavior"] = 5] = "ModifyBehavior";
|
|
1723
1713
|
HookPriority[HookPriority["OverrideBehavior"] = 10] = "OverrideBehavior";
|
|
1724
1714
|
HookPriority[HookPriority["Top"] = 100] = "Top";
|
|
1725
|
-
})(
|
|
1726
|
-
class
|
|
1715
|
+
})(HookPriority || (HookPriority = {}));
|
|
1716
|
+
class bcSdkMod {
|
|
1727
1717
|
static SDK;
|
|
1728
1718
|
static patchedFunctions = new Map();
|
|
1729
1719
|
static ModInfo;
|
|
1730
1720
|
constructor(info, options) {
|
|
1731
|
-
|
|
1732
|
-
|
|
1721
|
+
bcSdkMod.SDK = bcmodsdk_default().registerMod(info, options);
|
|
1722
|
+
bcSdkMod.ModInfo = info;
|
|
1733
1723
|
}
|
|
1734
1724
|
initPatchableFunction(target) {
|
|
1735
|
-
let result =
|
|
1725
|
+
let result = bcSdkMod.patchedFunctions.get(target);
|
|
1736
1726
|
if (!result) {
|
|
1737
1727
|
result = {
|
|
1738
1728
|
name: target,
|
|
1739
1729
|
hooks: []
|
|
1740
1730
|
};
|
|
1741
|
-
|
|
1731
|
+
bcSdkMod.patchedFunctions.set(target, result);
|
|
1742
1732
|
}
|
|
1743
1733
|
return result;
|
|
1744
1734
|
}
|
|
@@ -1747,7 +1737,7 @@ class SDK_bcSdkMod {
|
|
|
1747
1737
|
if (data.hooks.some((h) => h.hook === hook)) {
|
|
1748
1738
|
return () => null;
|
|
1749
1739
|
}
|
|
1750
|
-
const removeCallback =
|
|
1740
|
+
const removeCallback = bcSdkMod.SDK?.hookFunction(target, priority, hook);
|
|
1751
1741
|
data.hooks.push({
|
|
1752
1742
|
hook,
|
|
1753
1743
|
priority,
|
|
@@ -1771,7 +1761,7 @@ class SDK_bcSdkMod {
|
|
|
1771
1761
|
return true;
|
|
1772
1762
|
}
|
|
1773
1763
|
removeAllHooksByModule(module) {
|
|
1774
|
-
for (const data of
|
|
1764
|
+
for (const data of bcSdkMod.patchedFunctions.values()) {
|
|
1775
1765
|
for (let i = data.hooks.length - 1; i >= 0; i--) {
|
|
1776
1766
|
if (data.hooks[i].module === module) {
|
|
1777
1767
|
data.hooks[i].removeCallback();
|
|
@@ -1797,7 +1787,7 @@ class _String {
|
|
|
1797
1787
|
data = decoded;
|
|
1798
1788
|
}
|
|
1799
1789
|
catch (error) {
|
|
1800
|
-
|
|
1790
|
+
deepLibLogger.error(error);
|
|
1801
1791
|
}
|
|
1802
1792
|
if (data)
|
|
1803
1793
|
return data;
|
|
@@ -1814,29 +1804,52 @@ class _String {
|
|
|
1814
1804
|
}
|
|
1815
1805
|
}
|
|
1816
1806
|
|
|
1807
|
+
;// ./src/Utilities/Style.ts
|
|
1808
|
+
class Style {
|
|
1809
|
+
static inject(id, styleSource) {
|
|
1810
|
+
const isStyleLoaded = !!document.getElementById(id);
|
|
1811
|
+
if (isStyleLoaded)
|
|
1812
|
+
return;
|
|
1813
|
+
const styleElement = document.createElement('style');
|
|
1814
|
+
styleElement.id = id;
|
|
1815
|
+
styleElement.appendChild(document.createTextNode(styleSource));
|
|
1816
|
+
document.head.appendChild(styleElement);
|
|
1817
|
+
}
|
|
1818
|
+
static eject(id) {
|
|
1819
|
+
const style = document.getElementById(id);
|
|
1820
|
+
if (!style)
|
|
1821
|
+
return;
|
|
1822
|
+
style.remove();
|
|
1823
|
+
}
|
|
1824
|
+
static reload(id, styleSource) {
|
|
1825
|
+
Style.eject(id);
|
|
1826
|
+
Style.inject(id, styleSource);
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1817
1830
|
;// ./src/Utilities/Translation.ts
|
|
1818
|
-
class
|
|
1831
|
+
class Localization {
|
|
1819
1832
|
Translation = {};
|
|
1820
1833
|
static PathToTranslation;
|
|
1821
1834
|
constructor(options) {
|
|
1822
|
-
|
|
1835
|
+
Localization.PathToTranslation = options.pathToTranslationsFolder.endsWith('/') ? options.pathToTranslationsFolder : options.pathToTranslationsFolder + '/';
|
|
1823
1836
|
}
|
|
1824
1837
|
static async init() {
|
|
1825
1838
|
const lang = TranslationLanguage.toLowerCase();
|
|
1826
|
-
const translation = await
|
|
1839
|
+
const translation = await Localization.fetchLanguageFile(lang);
|
|
1827
1840
|
if (lang === 'en') {
|
|
1828
|
-
|
|
1841
|
+
Localization.prototype.Translation = translation;
|
|
1829
1842
|
}
|
|
1830
1843
|
else {
|
|
1831
|
-
const fallbackTranslation = await
|
|
1832
|
-
|
|
1844
|
+
const fallbackTranslation = await Localization.fetchLanguageFile('en');
|
|
1845
|
+
Localization.prototype.Translation = { ...fallbackTranslation, ...translation };
|
|
1833
1846
|
}
|
|
1834
1847
|
}
|
|
1835
1848
|
static getText(srcTag) {
|
|
1836
|
-
return
|
|
1849
|
+
return Localization.prototype.Translation?.[srcTag] || srcTag || '';
|
|
1837
1850
|
}
|
|
1838
1851
|
static async fetchLanguageFile(lang) {
|
|
1839
|
-
const response = await fetch(`${
|
|
1852
|
+
const response = await fetch(`${Localization.PathToTranslation}${lang}.lang`);
|
|
1840
1853
|
if (lang !== 'en' && !response.ok) {
|
|
1841
1854
|
return this.fetchLanguageFile('en');
|
|
1842
1855
|
}
|
|
@@ -1856,7 +1869,7 @@ class Translation_Localization {
|
|
|
1856
1869
|
return translations;
|
|
1857
1870
|
}
|
|
1858
1871
|
}
|
|
1859
|
-
const getText = (string) =>
|
|
1872
|
+
const getText = (string) => Localization.getText(string);
|
|
1860
1873
|
|
|
1861
1874
|
;// ./src/DeepLib.ts
|
|
1862
1875
|
|
|
@@ -1887,8 +1900,6 @@ const getText = (string) => Translation_Localization.getText(string);
|
|
|
1887
1900
|
|
|
1888
1901
|
|
|
1889
1902
|
|
|
1890
|
-
}
|
|
1903
|
+
export { BaseMigrator, BaseModule, BaseSubscreen, ExtensionStorage, GUI, GuiDebug, GuiSupport, HookPriority, Localization, Logger, MainMenu, PlayerStorage, Style, SupportHelper, VersionModule, _String, bcSdkMod, dataStore, dataTake, deepLibLogger, elementAdjustFontSize, elementAppendToMiscDiv, elementAppendToSettingsDiv, elementAppendToSubscreenDiv, elementCreateButton, elementCreateCheckbox, elementCreateInput, elementCreateLabel, elementCreateMiscDiv, elementCreateSettingsDiv, elementCreateSubscreenDiv, elementCreateTooltip, elementGetMiscDiv, elementGetSettingsDiv, elementGetSubscreenDiv, elementGetTooltip, elementHide, elementRemoveSubscreenDiv, elementSetPosSizeFont, elementSetPosition, elementSetSize, elementSetTooltip, elementUnhide, getCurrentSubscreen, getModule, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY, getText, init, initMod, modules, modulesMap, registerModule, sendActionMessage, sendLocalMessage, setMainMenuOptions, setSubscreen, unloadMod };
|
|
1891
1904
|
|
|
1892
|
-
|
|
1893
|
-
;
|
|
1894
|
-
//# sourceMappingURL=main.js.map
|
|
1905
|
+
//# sourceMappingURL=deeplib.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deeplib.js","mappings":"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AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;;;;;;SCfA;SACA;;SAEA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;;SAEA;SACA;;SAEA;SACA;SACA;;;;;UCtBA;UACA;UACA;UACA;UACA;UACA,iCAAiC,WAAW;UAC5C;UACA;;;;;UCPA;UACA;UACA;UACA;UACA,yCAAyC,wCAAwC;UACjF;UACA;UACA;;;;;UCPA;;;;;;;ACAqD;AAC9C;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ,yDAAyD,QAAQ,6BAA6B;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpCof;AAC7e;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW,GAAG,uBAAuB;AACzD,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA,QAAQ,yBAAyB;AACjC,gCAAgC,wBAAwB;AACxD,QAAQ,2BAA2B;AACnC,+BAA+B,kBAAkB;AACjD;AACA;AACA,mBAAmB,OAAO,0CAA0C,QAAQ,2BAA2B,aAAa;AACpH,SAAS;AACT,QAAQ,2BAA2B;AACnC;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,iBAAiB;AACjB,yBAAyB,OAAO;AAChC,aAAa;AACb,YAAY,2BAA2B;AACvC;AACA,wBAAwB,oBAAoB;AAC5C,QAAQ,2BAA2B;AACnC;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA,YAAY,0BAA0B;AACtC,SAAS;AACT;AACA;AACA;AACA,yBAAyB,OAAO,0CAA0C,QAAQ,2BAA2B,aAAa;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY;AACpB,QAAQ,SAAS;AACjB;AACA;AACA,QAAQ,qBAAqB,GAAG,SAAS,sBAAsB,IAAI;AACnE;AACA,YAAY,qBAAqB,GAAG,SAAS,qBAAqB,IAAI;AACtE;AACA;AACA,YAAY,qBAAqB,GAAG,SAAS,qBAAqB,IAAI;AACtE;AACA,QAAQ,qBAAqB,GAAG,sCAAsC;AACtE,QAAQ,kBAAkB,GAAG,SAAS,iBAAiB,IAAI;AAC3D,QAAQ,cAAc,GAAG,SAAS,iBAAiB,IAAI;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB,GAAG,uBAAuB;AAC5D;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc,GAAG,uBAAuB;AACxD;AACA,YAAY,qBAAqB,GAAG,uBAAuB;AAC3D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ,yBAAyB;AACjC;AACA;;;;;AClK4D;AACgE;AACrH;AACP,qBAAqB,QAAQ;AAC7B,IAAI,aAAa,wBAAwB,SAAS;AAClD;AACA,QAAQ,QAAQ;AAChB,YAAY,aAAa,mBAAmB,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,QAAQ,aAAa,qCAAqC,SAAS;AACnE;AACA;AACA;AACO;AACP,qBAAqB,QAAQ;AAC7B,wBAAwB,QAAQ;AAChC;AACA;AACA,IAAI,QAAQ;AACZ,IAAI,KAAK,yBAAyB,sBAAa;AAC/C,QAAQ,YAAY,GAAG,oDAAoD;AAC3E,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB;AACA,IAAI,aAAa,eAAe,SAAS,aAAa,YAAY;AAClE;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA,QAAQ,cAAc;AACtB;AACA,yBAAyB,OAAO;AAChC;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA,IAAI,aAAa,6BAA6B,SAAS;AACvD;AACA;AACO;AACP,qBAAqB,QAAQ;AAC7B;AACA;AACA,IAAI,aAAa,mBAAmB,SAAS;AAC7C;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;;;ACrEO;AACA;AACP;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;;;ACViC;AAC1B;AACP,WAAW,GAAG,aAAa,GAAG;AAC9B;AACO;AACP,SAAS,GAAG;AACZ;AACA;AACA,IAAI,GAAG;AACP,WAAW,GAAG;AACd;;;ACVO;AACP;;;ACDyE;AAClE,kBAAkB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,UAAU;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY,KAAK,QAAQ;AACzC,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;;;AChG2H;AACpH,4BAA4B,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC,QAAQ,QAAQ,wCAAwC,YAAY;AACpE;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa,mBAAmB,QAAQ,eAAe,OAAO,iBAAiB,KAAK,2BAA2B,OAAO,0BAA0B;AAChK;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAgB;AACxB;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;;;ACpE0D;AACnD,uBAAuB,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,aAAa;AACrC;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,aAAa;AACrC;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB,aAAa;AACrC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB,aAAa;AACrC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB,aAAa;AACrC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxFkO;AAC3N,uBAAuB,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,qBAAqB,OAAO;AAC5B,SAAS;AACT,QAAQ,2BAA2B;AACnC;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,uBAAuB,YAAY;AACnC;AACA,uBAAuB,OAAO,oBAAoB,YAAY;AAC9D;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb,YAAY,0BAA0B;AACtC;AACA,wBAAwB,oBAAoB;AAC5C,QAAQ,2BAA2B;AACnC;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb,YAAY,sBAAsB;AAClC;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb,YAAY,sBAAsB;AAClC;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD,aAAa;AACb;AACA,SAAS;AACT,QAAQ,sBAAsB;AAC9B,QAAQ,qBAAqB,GAAG,2BAA2B;AAC3D,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C,aAAa;AACb;AACA;AACA,SAAS;AACT,QAAQ,sBAAsB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB,GAAG,2BAA2B;AAC3D;AACA;AACO;AACP;AACA;AACA;;;ACnH2E;AACpE;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO,2BAA2B,IAAI,uBAAuB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,yBAAyB,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB,GAAG,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB,GAAG,gCAAgC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtFwD;AACjD,6CAA6C,QAAQ;AAC5D,6BAA6B,QAAQ;AACrC;AACO,wDAAwD,QAAQ;AAChE,4BAA4B,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,oBAAoB,QAAQ;AAC5B,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;;;ACjCO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;;;ACrD8C;AAC9C;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,aAAa,SAAS,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA,QAAQ,aAAa,mBAAmB,UAAU,2CAA2C,UAAU;AACvG;AACA;AACA;AACA;;;AC/E+G;AACxG;AACP,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2CAA2C,cAAc;AACzD;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL,IAAI,aAAa;AACjB;AACA;;;AC7CkI;AAC3H;AACP;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,IAAI,aAAa;AACjB;AACA;;;ACtDkI;AAC3H;AACP;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,IAAI,aAAa;AACjB;AACA;;;AC/DkI;AAC3H;AACP;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,IAAI,aAAa;AACjB;AACA;;;ACzCO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1BO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,IAAI;AACrC;AACA,aAAa;AACb,6BAA6B,aAAa;AAC1C;AACA;AACA,2BAA2B,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;;;ACvDA;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0EAA0E;AACxF;AACA;AACA,KAAK;AACL;;;;;;ACjC+C;AACxC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AAC9B;AACP;AACA;AACA;AACA;AACA,uBAAuB,8BAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnEyC;AAClC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5BO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpBO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B,EAAE,KAAK;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;;;ACzC2B;AACG;AACC;AACP;AACW;AACD;AACX;AACI;AACJ;AACI;AACF;AACG;AACD;AACD;AACsB;AACF;AACT;AACE;AACH;AACA;AACE;AACV;AACE;AACL;AACG;AACD;AACM","sources":["webpack://bc-deeplib/./node_modules/.pnpm/bondage-club-mod-sdk@1.2.0/node_modules/bondage-club-mod-sdk/dist/bcmodsdk.js","webpack://bc-deeplib/./public/styles/DeepLib.css","webpack://bc-deeplib/./node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/api.js","webpack://bc-deeplib/./node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://bc-deeplib/webpack/bootstrap","webpack://bc-deeplib/webpack/runtime/compat get default export","webpack://bc-deeplib/webpack/runtime/define property getters","webpack://bc-deeplib/webpack/runtime/hasOwnProperty shorthand","webpack://bc-deeplib/./src/Base/BaseModule.ts","webpack://bc-deeplib/./src/Base/BaseSubscreen.ts","webpack://bc-deeplib/./src/Base/Initialization.ts","webpack://bc-deeplib/./src/Base/Modules.ts","webpack://bc-deeplib/./src/Base/SettingDefinitions.ts","webpack://bc-deeplib/./src/Migrators/BaseMigrator.ts","webpack://bc-deeplib/./src/Modules/GUI.ts","webpack://bc-deeplib/./src/Modules/Version.ts","webpack://bc-deeplib/./src/Screens/Debug.ts","webpack://bc-deeplib/./src/Screens/MainMenu.ts","webpack://bc-deeplib/./src/Screens/Support.ts","webpack://bc-deeplib/./src/Utilities/Data.ts","webpack://bc-deeplib/./src/Utilities/Elements/.AdvancedElements.ts","webpack://bc-deeplib/./src/Utilities/Elements/.ElementHelpers.ts","webpack://bc-deeplib/./src/Utilities/Elements/Button.ts","webpack://bc-deeplib/./src/Utilities/Elements/Checkbox.ts","webpack://bc-deeplib/./src/Utilities/Elements/Input.ts","webpack://bc-deeplib/./src/Utilities/Elements/Label.ts","webpack://bc-deeplib/./src/Utilities/Elements/Tooltip.ts","webpack://bc-deeplib/./src/Utilities/Logger.ts","webpack://bc-deeplib/./src/Utilities/Messages.ts","webpack://bc-deeplib/./src/Utilities/SDK.ts","webpack://bc-deeplib/./src/Utilities/String.ts","webpack://bc-deeplib/./src/Utilities/Style.ts","webpack://bc-deeplib/./src/Utilities/Translation.ts","webpack://bc-deeplib/./src/DeepLib.ts"],"sourcesContent":["// Bondage Club Mod Development Kit (1.2.0)\n// For more info see: https://github.com/Jomshir98/bondage-club-mod-sdk\n/** @type {ModSDKGlobalAPI} */\nvar bcModSdk=function(){\"use strict\";const o=\"1.2.0\";function e(o){alert(\"Mod ERROR:\\n\"+o);const e=new Error(o);throw console.error(e),e}const t=new TextEncoder;function n(o){return!!o&&\"object\"==typeof o&&!Array.isArray(o)}function r(o){const e=new Set;return o.filter((o=>!e.has(o)&&e.add(o)))}const i=new Map,a=new Set;function c(o){a.has(o)||(a.add(o),console.warn(o))}function s(o){const e=[],t=new Map,n=new Set;for(const r of f.values()){const i=r.patching.get(o.name);if(i){e.push(...i.hooks);for(const[e,a]of i.patches.entries())t.has(e)&&t.get(e)!==a&&c(`ModSDK: Mod '${r.name}' is patching function ${o.name} with same pattern that is already applied by different mod, but with different pattern:\\nPattern:\\n${e}\\nPatch1:\\n${t.get(e)||\"\"}\\nPatch2:\\n${a}`),t.set(e,a),n.add(r.name)}}e.sort(((o,e)=>e.priority-o.priority));const r=function(o,e){if(0===e.size)return o;let t=o.toString().replaceAll(\"\\r\\n\",\"\\n\");for(const[n,r]of e.entries())t.includes(n)||c(`ModSDK: Patching ${o.name}: Patch ${n} not applied`),t=t.replaceAll(n,r);return(0,eval)(`(${t})`)}(o.original,t);let i=function(e){var t,i;const a=null===(i=(t=m.errorReporterHooks).hookChainExit)||void 0===i?void 0:i.call(t,o.name,n),c=r.apply(this,e);return null==a||a(),c};for(let t=e.length-1;t>=0;t--){const n=e[t],r=i;i=function(e){var t,i;const a=null===(i=(t=m.errorReporterHooks).hookEnter)||void 0===i?void 0:i.call(t,o.name,n.mod),c=n.hook.apply(this,[e,o=>{if(1!==arguments.length||!Array.isArray(e))throw new Error(`Mod ${n.mod} failed to call next hook: Expected args to be array, got ${typeof o}`);return r.call(this,o)}]);return null==a||a(),c}}return{hooks:e,patches:t,patchesSources:n,enter:i,final:r}}function l(o,e=!1){let r=i.get(o);if(r)e&&(r.precomputed=s(r));else{let e=window;const a=o.split(\".\");for(let t=0;t<a.length-1;t++)if(e=e[a[t]],!n(e))throw new Error(`ModSDK: Function ${o} to be patched not found; ${a.slice(0,t+1).join(\".\")} is not object`);const c=e[a[a.length-1]];if(\"function\"!=typeof c)throw new Error(`ModSDK: Function ${o} to be patched not found`);const l=function(o){let e=-1;for(const n of t.encode(o)){let o=255&(e^n);for(let e=0;e<8;e++)o=1&o?-306674912^o>>>1:o>>>1;e=e>>>8^o}return((-1^e)>>>0).toString(16).padStart(8,\"0\").toUpperCase()}(c.toString().replaceAll(\"\\r\\n\",\"\\n\")),d={name:o,original:c,originalHash:l};r=Object.assign(Object.assign({},d),{precomputed:s(d),router:()=>{},context:e,contextProperty:a[a.length-1]}),r.router=function(o){return function(...e){return o.precomputed.enter.apply(this,[e])}}(r),i.set(o,r),e[r.contextProperty]=r.router}return r}function d(){for(const o of i.values())o.precomputed=s(o)}function p(){const o=new Map;for(const[e,t]of i)o.set(e,{name:e,original:t.original,originalHash:t.originalHash,sdkEntrypoint:t.router,currentEntrypoint:t.context[t.contextProperty],hookedByMods:r(t.precomputed.hooks.map((o=>o.mod))),patchedByMods:Array.from(t.precomputed.patchesSources)});return o}const f=new Map;function u(o){f.get(o.name)!==o&&e(`Failed to unload mod '${o.name}': Not registered`),f.delete(o.name),o.loaded=!1,d()}function g(o,t){o&&\"object\"==typeof o||e(\"Failed to register mod: Expected info object, got \"+typeof o),\"string\"==typeof o.name&&o.name||e(\"Failed to register mod: Expected name to be non-empty string, got \"+typeof o.name);let r=`'${o.name}'`;\"string\"==typeof o.fullName&&o.fullName||e(`Failed to register mod ${r}: Expected fullName to be non-empty string, got ${typeof o.fullName}`),r=`'${o.fullName} (${o.name})'`,\"string\"!=typeof o.version&&e(`Failed to register mod ${r}: Expected version to be string, got ${typeof o.version}`),o.repository||(o.repository=void 0),void 0!==o.repository&&\"string\"!=typeof o.repository&&e(`Failed to register mod ${r}: Expected repository to be undefined or string, got ${typeof o.version}`),null==t&&(t={}),t&&\"object\"==typeof t||e(`Failed to register mod ${r}: Expected options to be undefined or object, got ${typeof t}`);const i=!0===t.allowReplace,a=f.get(o.name);a&&(a.allowReplace&&i||e(`Refusing to load mod ${r}: it is already loaded and doesn't allow being replaced.\\nWas the mod loaded multiple times?`),u(a));const c=o=>{let e=g.patching.get(o.name);return e||(e={hooks:[],patches:new Map},g.patching.set(o.name,e)),e},s=(o,t)=>(...n)=>{var i,a;const c=null===(a=(i=m.errorReporterHooks).apiEndpointEnter)||void 0===a?void 0:a.call(i,o,g.name);g.loaded||e(`Mod ${r} attempted to call SDK function after being unloaded`);const s=t(...n);return null==c||c(),s},p={unload:s(\"unload\",(()=>u(g))),hookFunction:s(\"hookFunction\",((o,t,n)=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to patch a function: Expected function name string, got ${typeof o}`);const i=l(o),a=c(i);\"number\"!=typeof t&&e(`Mod ${r} failed to hook function '${o}': Expected priority number, got ${typeof t}`),\"function\"!=typeof n&&e(`Mod ${r} failed to hook function '${o}': Expected hook function, got ${typeof n}`);const s={mod:g.name,priority:t,hook:n};return a.hooks.push(s),d(),()=>{const o=a.hooks.indexOf(s);o>=0&&(a.hooks.splice(o,1),d())}})),patchFunction:s(\"patchFunction\",((o,t)=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to patch a function: Expected function name string, got ${typeof o}`);const i=l(o),a=c(i);n(t)||e(`Mod ${r} failed to patch function '${o}': Expected patches object, got ${typeof t}`);for(const[n,i]of Object.entries(t))\"string\"==typeof i?a.patches.set(n,i):null===i?a.patches.delete(n):e(`Mod ${r} failed to patch function '${o}': Invalid format of patch '${n}'`);d()})),removePatches:s(\"removePatches\",(o=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to patch a function: Expected function name string, got ${typeof o}`);const t=l(o);c(t).patches.clear(),d()})),callOriginal:s(\"callOriginal\",((o,t,n)=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to call a function: Expected function name string, got ${typeof o}`);const i=l(o);return Array.isArray(t)||e(`Mod ${r} failed to call a function: Expected args array, got ${typeof t}`),i.original.apply(null!=n?n:globalThis,t)})),getOriginalHash:s(\"getOriginalHash\",(o=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to get hash: Expected function name string, got ${typeof o}`);return l(o).originalHash}))},g={name:o.name,fullName:o.fullName,version:o.version,repository:o.repository,allowReplace:i,api:p,loaded:!0,patching:new Map};return f.set(o.name,g),Object.freeze(p)}function h(){const o=[];for(const e of f.values())o.push({name:e.name,fullName:e.fullName,version:e.version,repository:e.repository});return o}let m;const y=void 0===window.bcModSdk?window.bcModSdk=function(){const e={version:o,apiVersion:1,registerMod:g,getModsInfo:h,getPatchingInfo:p,errorReporterHooks:Object.seal({apiEndpointEnter:null,hookEnter:null,hookChainExit:null})};return m=e,Object.freeze(e)}():(n(window.bcModSdk)||e(\"Failed to init Mod SDK: Name already in use\"),1!==window.bcModSdk.apiVersion&&e(`Failed to init Mod SDK: Different version already loaded ('1.2.0' vs '${window.bcModSdk.version}')`),window.bcModSdk.version!==o&&alert(`Mod SDK warning: Loading different but compatible versions ('1.2.0' vs '${window.bcModSdk.version}')\\nOne of mods you are using is using an old version of SDK. It will work for now but please inform author to update`),window.bcModSdk);return\"undefined\"!=typeof exports&&(Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.default=y),y}();\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.deeplib-subscreen {\n --deeplib-background-color: var(--main, white);\n --deeplib-element-color: var(--element, white);\n --deeplib-element-hover-color: var(--accentHover, cyan);\n --deeplib-text-color: var(--text, black);\n --deeplib-icon-color: var(--accent, white);\n --deeplib-border-color: var(--accent, black);\n}\n\n/************/\n/* ELEMENTS */\n/************/\n\n.deeplib-text {\n color: var(--deeplib-text-color);\n}\n\n.deeplib-subscreen {\n padding: 0;\n margin: 0;\n}\n\n.deeplib-subscreen * {\n box-sizing: border-box;\n}\n\n.deeplib-settings {\n display: flex;\n flex-direction: column;\n padding: min(1.0dvh, 0.5dvw);\n gap: 0.3em;\n overflow-y: auto;\n}\n\n.deeplib-misc {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column-reverse;\n}\n\n.deeplib-button.button-styling {\n border-radius: min(1.0dvh, 0.5dvw);\n color: var(--deeplib-text-color);\n}\n\n.deeplib-button.button-styling img {\n position: absolute;\n top: 0%;\n left: 0%;\n width: 100%;\n height: 100%;\n background-position: left;\n background-color: var(--deeplib-icon-color);\n background-blend-mode: multiply;\n background-size: contain;\n mask-position: left;\n mask-size: contain;\n background-repeat: no-repeat;\n mask-repeat: no-repeat;\n color: transparent;\n\n background-image: var(--image);\n mask-image: var(--image);\n}\n\n.deeplib-button.button-styling .button-label {\n width: 100%;\n background-color: transparent;\n color: var(--deeplib-text-color);\n font-size: min(3.6dvh, 1.8dvw);\n}\n\n#deeplib-subscreen-title {\n text-align: center;\n color: var(--deeplib-text-color);\n}\n\n#deeplib-reset-button {\n background-color: indianred;\n}\n\n#deeplib-wiki-button {\n background-color: #BDA203;\n}\n\n#deeplib-support-button {\n background-color: #5e4969;\n}\n\n.deeplib-checkbox-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.3em;\n}\n\n.deeplib-input {\n border-radius: min(1.0dvh, 0.5dvw);\n}\n\n.deeplib-input-container {\n position: relative;\n margin-top: min(1vh, 0.5vw);\n}\n\n.deeplib-input-container input.deeplib-input {\n font-size: 20px;\n width: 100%;\n padding: 5px 0;\n background-color: transparent;\n outline: none;\n padding-left: min(1vh, 0.5vw);\n padding-right: min(1vh, 0.5vw);\n}\n\n.deeplib-input-container label.deeplib-text {\n position: absolute;\n top: min(0.6vh, 0.3vw);\n left: min(0.6vh, 0.3vw);\n transition: all 0.3s ease;\n pointer-events: none;\n}\n\n.deeplib-input-container input.deeplib-input:focus~label,\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~label {\n font-size: 0.7em;\n transform: translate(20%, -70%);\n background-color: var(--deeplib-background-color);\n padding: 0px min(1vh, 0.5vw);\n}\n\n.deeplib-input-container .deeplib-underline {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 2px;\n width: 100%;\n background-color: var(--deeplib-element-hover-color);\n transform: scaleX(0);\n transition: all 0.3s ease;\n}\n\n.deeplib-input-container input.deeplib-input:focus~.deeplib-underline,\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~.deeplib-underline {\n transform: scaleX(0.98);\n}\n\n.deeplib-tooltip {\n background-color: var(--deeplib-element-color);\n color: var(--deeplib-text-color);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: min(1.0dvh, 0.5dvw);\n padding: min(1vh, 0.5vw);\n font-size: 0.8em;\n border: min(0.2vh, 0.1vw) solid var(--deeplib-border-color);\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type=number] {\n appearance: textfield;\n -moz-appearance: textfield;\n}\n\n/*************/\n/* MESSAGES */\n/*************/\n\n.deeplib-highlight-text {\n font-weight: bold;\n color: rgb(203, 185, 23);\n}\n\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message,\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message {\n background-color: var(--deeplib-element-color);\n border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);\n color: var(--deeplib-text-color);\n}\n\n#TextAreaChatLog div.ChatMessage.deeplib-message {\n background-color: #eee;\n border: min(0.2dvh, 0.1dvw) solid #440171;\n color: #111;\n padding-left: min(0.6dvh, 0.3dvw);\n display: block;\n white-space: normal;\n}\n\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message a,\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message a {\n color: var(--deeplib-text-color);\n}\n\n#TextAreaChatLog div.ChatMessage.deeplib-message a {\n cursor: pointer;\n font-weight: bold;\n color: #111;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./public/styles/DeepLib.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,8CAA8C;EAC9C,8CAA8C;EAC9C,uDAAuD;EACvD,wCAAwC;EACxC,0CAA0C;EAC1C,4CAA4C;AAC9C;;AAEA,aAAa;AACb,aAAa;AACb,aAAa;;AAEb;EACE,gCAAgC;AAClC;;AAEA;EACE,UAAU;EACV,SAAS;AACX;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,4BAA4B;EAC5B,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,8BAA8B;AAChC;;AAEA;EACE,kCAAkC;EAClC,gCAAgC;AAClC;;AAEA;EACE,kBAAkB;EAClB,OAAO;EACP,QAAQ;EACR,WAAW;EACX,YAAY;EACZ,yBAAyB;EACzB,2CAA2C;EAC3C,+BAA+B;EAC/B,wBAAwB;EACxB,mBAAmB;EACnB,kBAAkB;EAClB,4BAA4B;EAC5B,sBAAsB;EACtB,kBAAkB;;EAElB,8BAA8B;EAC9B,wBAAwB;AAC1B;;AAEA;EACE,WAAW;EACX,6BAA6B;EAC7B,gCAAgC;EAChC,8BAA8B;AAChC;;AAEA;EACE,kBAAkB;EAClB,gCAAgC;AAClC;;AAEA;EACE,2BAA2B;AAC7B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,UAAU;AACZ;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,kBAAkB;EAClB,2BAA2B;AAC7B;;AAEA;EACE,eAAe;EACf,WAAW;EACX,cAAc;EACd,6BAA6B;EAC7B,aAAa;EACb,6BAA6B;EAC7B,8BAA8B;AAChC;;AAEA;EACE,kBAAkB;EAClB,sBAAsB;EACtB,uBAAuB;EACvB,yBAAyB;EACzB,oBAAoB;AACtB;;AAEA;;EAEE,gBAAgB;EAChB,+BAA+B;EAC/B,iDAAiD;EACjD,4BAA4B;AAC9B;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,WAAW;EACX,WAAW;EACX,oDAAoD;EACpD,oBAAoB;EACpB,yBAAyB;AAC3B;;AAEA;;EAEE,uBAAuB;AACzB;;AAEA;EACE,8CAA8C;EAC9C,gCAAgC;EAChC,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,kCAAkC;EAClC,wBAAwB;EACxB,gBAAgB;EAChB,2DAA2D;AAC7D;;AAEA;;EAEE,wBAAwB;EACxB,SAAS;AACX;;AAEA;EACE,qBAAqB;EACrB,0BAA0B;AAC5B;;AAEA,cAAc;AACd,aAAa;AACb,cAAc;;AAEd;EACE,iBAAiB;EACjB,wBAAwB;AAC1B;;AAEA;;EAEE,8CAA8C;EAC9C,6DAA6D;EAC7D,gCAAgC;AAClC;;AAEA;EACE,sBAAsB;EACtB,yCAAyC;EACzC,WAAW;EACX,iCAAiC;EACjC,cAAc;EACd,mBAAmB;AACrB;;AAEA;;EAEE,gCAAgC;AAClC;;AAEA;EACE,eAAe;EACf,iBAAiB;EACjB,WAAW;AACb\",\"sourcesContent\":[\".deeplib-subscreen {\\n --deeplib-background-color: var(--main, white);\\n --deeplib-element-color: var(--element, white);\\n --deeplib-element-hover-color: var(--accentHover, cyan);\\n --deeplib-text-color: var(--text, black);\\n --deeplib-icon-color: var(--accent, white);\\n --deeplib-border-color: var(--accent, black);\\n}\\n\\n/************/\\n/* ELEMENTS */\\n/************/\\n\\n.deeplib-text {\\n color: var(--deeplib-text-color);\\n}\\n\\n.deeplib-subscreen {\\n padding: 0;\\n margin: 0;\\n}\\n\\n.deeplib-subscreen * {\\n box-sizing: border-box;\\n}\\n\\n.deeplib-settings {\\n display: flex;\\n flex-direction: column;\\n padding: min(1.0dvh, 0.5dvw);\\n gap: 0.3em;\\n overflow-y: auto;\\n}\\n\\n.deeplib-misc {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n flex-direction: column-reverse;\\n}\\n\\n.deeplib-button.button-styling {\\n border-radius: min(1.0dvh, 0.5dvw);\\n color: var(--deeplib-text-color);\\n}\\n\\n.deeplib-button.button-styling img {\\n position: absolute;\\n top: 0%;\\n left: 0%;\\n width: 100%;\\n height: 100%;\\n background-position: left;\\n background-color: var(--deeplib-icon-color);\\n background-blend-mode: multiply;\\n background-size: contain;\\n mask-position: left;\\n mask-size: contain;\\n background-repeat: no-repeat;\\n mask-repeat: no-repeat;\\n color: transparent;\\n\\n background-image: var(--image);\\n mask-image: var(--image);\\n}\\n\\n.deeplib-button.button-styling .button-label {\\n width: 100%;\\n background-color: transparent;\\n color: var(--deeplib-text-color);\\n font-size: min(3.6dvh, 1.8dvw);\\n}\\n\\n#deeplib-subscreen-title {\\n text-align: center;\\n color: var(--deeplib-text-color);\\n}\\n\\n#deeplib-reset-button {\\n background-color: indianred;\\n}\\n\\n#deeplib-wiki-button {\\n background-color: #BDA203;\\n}\\n\\n#deeplib-support-button {\\n background-color: #5e4969;\\n}\\n\\n.deeplib-checkbox-container {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: 0.3em;\\n}\\n\\n.deeplib-input {\\n border-radius: min(1.0dvh, 0.5dvw);\\n}\\n\\n.deeplib-input-container {\\n position: relative;\\n margin-top: min(1vh, 0.5vw);\\n}\\n\\n.deeplib-input-container input.deeplib-input {\\n font-size: 20px;\\n width: 100%;\\n padding: 5px 0;\\n background-color: transparent;\\n outline: none;\\n padding-left: min(1vh, 0.5vw);\\n padding-right: min(1vh, 0.5vw);\\n}\\n\\n.deeplib-input-container label.deeplib-text {\\n position: absolute;\\n top: min(0.6vh, 0.3vw);\\n left: min(0.6vh, 0.3vw);\\n transition: all 0.3s ease;\\n pointer-events: none;\\n}\\n\\n.deeplib-input-container input.deeplib-input:focus~label,\\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~label {\\n font-size: 0.7em;\\n transform: translate(20%, -70%);\\n background-color: var(--deeplib-background-color);\\n padding: 0px min(1vh, 0.5vw);\\n}\\n\\n.deeplib-input-container .deeplib-underline {\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n height: 2px;\\n width: 100%;\\n background-color: var(--deeplib-element-hover-color);\\n transform: scaleX(0);\\n transition: all 0.3s ease;\\n}\\n\\n.deeplib-input-container input.deeplib-input:focus~.deeplib-underline,\\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~.deeplib-underline {\\n transform: scaleX(0.98);\\n}\\n\\n.deeplib-tooltip {\\n background-color: var(--deeplib-element-color);\\n color: var(--deeplib-text-color);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n border-radius: min(1.0dvh, 0.5dvw);\\n padding: min(1vh, 0.5vw);\\n font-size: 0.8em;\\n border: min(0.2vh, 0.1vw) solid var(--deeplib-border-color);\\n}\\n\\ninput::-webkit-outer-spin-button,\\ninput::-webkit-inner-spin-button {\\n -webkit-appearance: none;\\n margin: 0;\\n}\\n\\ninput[type=number] {\\n appearance: textfield;\\n -moz-appearance: textfield;\\n}\\n\\n/*************/\\n/* MESSAGES */\\n/*************/\\n\\n.deeplib-highlight-text {\\n font-weight: bold;\\n color: rgb(203, 185, 23);\\n}\\n\\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message,\\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message {\\n background-color: var(--deeplib-element-color);\\n border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);\\n color: var(--deeplib-text-color);\\n}\\n\\n#TextAreaChatLog div.ChatMessage.deeplib-message {\\n background-color: #eee;\\n border: min(0.2dvh, 0.1dvw) solid #440171;\\n color: #111;\\n padding-left: min(0.6dvh, 0.3dvw);\\n display: block;\\n white-space: normal;\\n}\\n\\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message a,\\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message a {\\n color: var(--deeplib-text-color);\\n}\\n\\n#TextAreaChatLog div.ChatMessage.deeplib-message a {\\n cursor: pointer;\\n font-weight: bold;\\n color: #111;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { PlayerStorage, bcSdkMod } from '../DeepLib';\nexport class BaseModule {\n get settingsScreen() {\n return null;\n }\n get settingsStorage() {\n return this.constructor.name;\n }\n get settings() {\n const modName = bcSdkMod.ModInfo.name;\n if (!this.settingsStorage)\n return {};\n if (!PlayerStorage()) {\n Player[modName] = {};\n this.registerDefaultSettings();\n }\n else if (!PlayerStorage()[this.settingsStorage])\n this.registerDefaultSettings();\n return PlayerStorage()[this.settingsStorage];\n }\n init() {\n this.registerDefaultSettings();\n }\n registerDefaultSettings() {\n const storage = this.settingsStorage;\n const defaults = this.defaultSettings;\n if (!storage || !defaults)\n return;\n Player[bcSdkMod.ModInfo.name][storage] = Object.assign(defaults, Player[bcSdkMod.ModInfo.name][storage] ?? {});\n }\n get defaultSettings() {\n return null;\n }\n load() { }\n run() { }\n unload() { }\n}\n","import { SupportHelper, bcSdkMod, dataStore, elementAdjustFontSize, elementAppendToSettingsDiv, elementAppendToSubscreenDiv, elementCreateButton, elementCreateCheckbox, elementCreateInput, elementCreateLabel, elementCreateSettingsDiv, elementCreateSubscreenDiv, elementCreateTooltip, elementGetSettingsDiv, elementGetSubscreenDiv, elementGetTooltip, elementHide, elementRemoveSubscreenDiv, elementSetPosSizeFont, elementSetPosition, elementSetSize, getText, modules, setSubscreen } from '../DeepLib';\nexport class BaseSubscreen {\n static currentElements = [];\n static currentPage = 1;\n module;\n constructor(module) {\n if (module)\n this.module = module;\n }\n get name() {\n return 'UNKNOWN';\n }\n get icon() {\n return '';\n }\n get subscreenName() {\n return this.constructor.name;\n }\n setSubscreen(screen) {\n return setSubscreen(screen);\n }\n get settings() {\n return this.module.settings;\n }\n get pageStructure() {\n return [[]];\n }\n get currentPage() {\n return this.pageStructure[Math.min(PreferencePageCurrent - 1, this.pageStructure.length - 1)];\n }\n hideElements() {\n this.pageStructure.forEach((item, ix) => {\n if (ix != PreferencePageCurrent - 1) {\n item.forEach((setting) => {\n elementHide({ elementId: setting.id });\n });\n }\n });\n }\n load() {\n for (const module of modules()) {\n if (!module.settingsScreen)\n continue;\n if (!module.settings || !Object.keys(module.settings).length)\n module.registerDefaultSettings();\n }\n elementCreateSubscreenDiv();\n const settingsElement = elementCreateSettingsDiv();\n elementAppendToSubscreenDiv(settingsElement);\n const subscreenTitle = elementCreateLabel({\n type: 'label',\n id: 'deeplib-subscreen-title',\n label: getText('mainmenu.title').replace('$ModVersion', bcSdkMod.ModInfo.version) + ' ' + SupportHelper.getSupporter(),\n });\n elementAppendToSubscreenDiv(subscreenTitle);\n if (this.name !== 'mainmenu') {\n const exitButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-exit',\n position: [1815, 75],\n size: [90, 90],\n image: 'Icons/Exit.png',\n onClick: () => {\n setSubscreen('mainmenu');\n },\n tooltip: getText('settings.button.back_button_hint')\n });\n elementAppendToSubscreenDiv(exitButton);\n }\n const tooltip = elementCreateTooltip();\n elementAppendToSubscreenDiv(tooltip);\n this.pageStructure.forEach((s) => s.forEach((item) => {\n let element;\n switch (item.type) {\n case 'text':\n case 'number':\n element = elementCreateInput(item);\n break;\n case 'checkbox':\n element = elementCreateCheckbox(item);\n break;\n case 'button':\n element = elementCreateButton(item);\n break;\n case 'label':\n element = elementCreateLabel(item);\n break;\n }\n elementAppendToSettingsDiv(element);\n }));\n CharacterAppearanceForceUpCharacter = Player.MemberNumber ?? -1;\n }\n run() {\n const newTitle = getText('mainmenu.title').replace('$ModVersion', bcSdkMod.ModInfo.version) + ' ' + SupportHelper.getSupporter();\n const oldTitle = ElementContent('deeplib-subscreen-title');\n if (newTitle !== oldTitle) {\n ElementContent('deeplib-subscreen-title', newTitle);\n }\n DrawCharacter(Player, 50, 50, 0.9, false);\n if (this.pageStructure.length > 1) {\n MainCanvas.textAlign = 'center';\n PreferencePageChangeDraw(1595, 75, this.pageStructure.length);\n MainCanvas.textAlign = 'left';\n }\n this.hideElements();\n }\n click() {\n if (this.pageStructure.length > 1)\n PreferencePageChangeClick(1595, 75, this.pageStructure.length);\n }\n exit() {\n CharacterAppearanceForceUpCharacter = -1;\n CharacterLoadCanvas(Player);\n setSubscreen('mainmenu');\n dataStore();\n }\n resize(onLoad = false) {\n elementSetPosSizeFont({ element: elementGetSubscreenDiv() }, 0, 0, 2000, 1000);\n if (this.name === 'mainmenu') {\n elementSetPosSizeFont({ element: elementGetSettingsDiv() }, 530, 170, 800, 660);\n }\n else {\n elementSetPosSizeFont({ element: elementGetSettingsDiv() }, 530, 170, 1000, 660);\n }\n elementSetPosSizeFont({ elementId: 'deeplib-subscreen-title' }, 530, 75, 800, 60);\n elementSetPosition({ element: elementGetTooltip() }, 250, 850);\n elementSetSize({ element: elementGetTooltip() }, 1500, 60);\n BaseSubscreen.currentElements.forEach((item) => {\n const options = item[1];\n const elementDataAttrs = item[0].dataset;\n if (options.position || elementDataAttrs.position) {\n const position = elementDataAttrs?.position?.split('x');\n const xPos = options?.position?.[0] || parseInt(position?.[0] || 0);\n const yPos = options?.position?.[1] || parseInt(position?.[1] || 0);\n elementSetPosition({ elementId: options.id }, xPos, yPos);\n }\n if (options.size || elementDataAttrs.size) {\n const size = elementDataAttrs?.size?.split('x');\n const width = options?.size?.[0] || parseInt(size?.[0] || 0);\n const height = options?.size?.[1] || parseInt(size?.[1] || 0);\n elementSetSize({ elementId: options.id }, width, height);\n }\n elementAdjustFontSize({ elementId: options.id });\n });\n }\n unload() {\n this.pageStructure.forEach((s) => s.forEach((item) => {\n switch (item.type) {\n case 'text':\n item.setSettingValue(ElementValue(item.id));\n break;\n case 'checkbox': {\n const elem = document.getElementById(item.id);\n const checked = elem.checked;\n item.setSettingValue(checked);\n break;\n }\n }\n }));\n BaseSubscreen.currentElements = [];\n elementRemoveSubscreenDiv();\n }\n}\n","import deeplib_style from '../../public/styles/DeepLib.css';\nimport { bcSdkMod, dataTake, deepLibLogger, Localization, modules, registerModule, Style, VersionModule } from '../DeepLib';\nexport function initMod(initFunction, modules, pathToTranslationsFolder) {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n deepLibLogger.debug(`Init wait for ${MOD_NAME}`);\n if (CurrentScreen == null || CurrentScreen === 'Login') {\n bcSdkMod.prototype.hookFunction('LoginResponse', 0, (args, next) => {\n deepLibLogger.debug(`Init for ${MOD_NAME}! LoginResponse caught: `, args);\n next(args);\n const response = args[0];\n if (response === 'InvalidNamePassword')\n return next(args);\n if (response && typeof response.Name === 'string' && typeof response.AccountName === 'string') {\n init(initFunction, modules, pathToTranslationsFolder);\n }\n });\n }\n else {\n deepLibLogger.debug(`Already logged in, initing ${MOD_NAME}`);\n init(initFunction, modules, pathToTranslationsFolder);\n }\n}\nexport async function init(initFunction, modules, pathToTranslationsFolder) {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n const MOD_VERSION = bcSdkMod.ModInfo.version;\n if (window[MOD_NAME + 'Loaded'])\n return;\n dataTake();\n Style.inject('deeplib-style', deeplib_style);\n new Localization({ pathToTranslationsFolder: pathToTranslationsFolder });\n await Localization.init();\n if (!initModules(modules)) {\n unloadMod();\n return;\n }\n await initFunction();\n VersionModule.checkVersionUpdate();\n VersionModule.checkVersionMigration();\n window[MOD_NAME + 'Loaded'] = true;\n deepLibLogger.log(`Loaded ${MOD_NAME}! Version: ${MOD_VERSION}`);\n}\nfunction initModules(modulesToRegister) {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n for (const module of modulesToRegister) {\n registerModule(module);\n }\n for (const module of modules()) {\n module.init();\n }\n for (const module of modules()) {\n module.load();\n }\n for (const module of modules()) {\n module.run();\n }\n deepLibLogger.debug(`Modules Loaded for ${MOD_NAME}.`);\n return true;\n}\nexport function unloadMod() {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n unloadModules();\n delete window[MOD_NAME + 'Loaded'];\n deepLibLogger.debug(`Unloaded ${MOD_NAME}.`);\n return true;\n}\nfunction unloadModules() {\n for (const module of modules()) {\n module.unload();\n }\n}\n","export const modulesMap = new Map();\nexport function modules() {\n return [...modulesMap.values()];\n}\nexport function registerModule(module) {\n modulesMap.set(module.constructor.name, module);\n return module;\n}\nexport function getModule(moduleType) {\n return modulesMap.get(moduleType);\n}\n","import { GUI } from '../DeepLib';\nexport function getCurrentSubscreen() {\n return GUI.instance && GUI.instance.currentSubscreen;\n}\nexport function setSubscreen(subscreen) {\n if (!GUI.instance) {\n throw new Error('Attempt to set subscreen before init');\n }\n GUI.instance.currentSubscreen = subscreen;\n return GUI.instance.currentSubscreen;\n}\n","export class BaseMigrator {\n}\n","import { BaseModule, MainMenu, modules, setSubscreen } from '../DeepLib';\nexport class GUI extends BaseModule {\n static instance = null;\n _subscreens;\n _mainMenu;\n _currentSubscreen = null;\n _modButtonOptions;\n get subscreens() {\n return this._subscreens;\n }\n get mainMenu() {\n return this._mainMenu;\n }\n get currentSubscreen() {\n return this._currentSubscreen;\n }\n set currentSubscreen(subscreen) {\n if (this._currentSubscreen) {\n this._currentSubscreen.unload();\n }\n if (typeof subscreen === 'string') {\n const scr = this._subscreens?.find((s) => s.name === subscreen);\n if (!scr)\n throw `Failed to find screen name ${subscreen}`;\n this._currentSubscreen = scr;\n }\n else {\n this._currentSubscreen = subscreen;\n }\n PreferenceMessage = '';\n PreferencePageCurrent = 1;\n if (this._currentSubscreen) {\n this._currentSubscreen.load();\n this._currentSubscreen.resize(true);\n }\n }\n constructor(modButtonOptions) {\n super();\n if (GUI.instance) {\n throw new Error('Duplicate initialization');\n }\n for (const module of modules()) {\n if (!module.settingsScreen)\n continue;\n }\n this._mainMenu = new MainMenu(this);\n this._subscreens = [this._mainMenu];\n this._modButtonOptions = modButtonOptions;\n GUI.instance = this;\n }\n get defaultSettings() {\n return null;\n }\n load() {\n for (const module of modules()) {\n if (!module.settingsScreen)\n continue;\n this._subscreens.push(new module.settingsScreen(module));\n }\n this._mainMenu.subscreens = this._subscreens;\n PreferenceRegisterExtensionSetting({\n Identifier: this._modButtonOptions.Identifier,\n ButtonText: this._modButtonOptions.ButtonText,\n Image: this._modButtonOptions.Image,\n load: this._modButtonOptions.load || (() => {\n setSubscreen(new MainMenu(this));\n }),\n run: this._modButtonOptions.run || (() => {\n if (this._currentSubscreen) {\n MainCanvas.textAlign = 'left';\n this._currentSubscreen.run();\n MainCanvas.textAlign = 'center';\n const newCanvasPosition = [MainCanvas.canvas.offsetLeft, MainCanvas.canvas.offsetTop, MainCanvas.canvas.clientWidth, MainCanvas.canvas.clientHeight];\n if (!CommonArraysEqual(newCanvasPosition, DrawCanvasPosition)) {\n DrawCanvasPosition = newCanvasPosition;\n this._currentSubscreen.resize(false);\n }\n }\n }),\n click: this._modButtonOptions.click || (() => {\n if (this._currentSubscreen) {\n this._currentSubscreen.click();\n }\n }),\n exit: this._modButtonOptions.exit || (() => {\n if (this._currentSubscreen) {\n this._currentSubscreen.exit();\n }\n }),\n unload: this._modButtonOptions.unload || (() => {\n if (this._currentSubscreen) {\n this._currentSubscreen.unload();\n }\n })\n });\n }\n}\n","import { BaseModule, HookPriority, PlayerStorage, bcSdkMod, dataStore, deepLibLogger, sendLocalMessage } from '../DeepLib';\nexport class VersionModule extends BaseModule {\n static isItNewVersion = false;\n static Version;\n static NewVersionMessage = '';\n static Migrators = [];\n load() {\n VersionModule.Version = bcSdkMod.ModInfo.version;\n bcSdkMod.prototype.hookFunction('ChatRoomSync', HookPriority.Observe, (args, next) => {\n next(args);\n if (PlayerStorage().GlobalModule.doShowNewVersionMessage && VersionModule.isItNewVersion) {\n VersionModule.sendNewVersionMessage();\n }\n }, 999);\n }\n static checkVersionUpdate() {\n const PreviousVersion = VersionModule.loadVersion();\n const CurrentVersion = VersionModule.Version;\n if (VersionModule.isNewVersion(PreviousVersion, CurrentVersion)) {\n VersionModule.isItNewVersion = true;\n VersionModule.saveVersion();\n }\n }\n static checkVersionMigration() {\n const PreviousVersion = VersionModule.loadVersion();\n let saveRequired = false;\n for (const migrator of VersionModule.Migrators) {\n if (VersionModule.isNewVersion(PreviousVersion, migrator.MigrationVersion)) {\n saveRequired = saveRequired || migrator.Migrate();\n deepLibLogger.info(`Migrating ${bcSdkMod.ModInfo.name} from ${PreviousVersion} to ${migrator.MigrationVersion} with ${migrator.constructor.name}`);\n }\n }\n if (saveRequired) {\n dataStore();\n }\n }\n static registerMigrator(migrator) {\n VersionModule.Migrators.push(migrator);\n }\n static setNewVersionMessage(newVersionMessage) {\n VersionModule.NewVersionMessage = newVersionMessage;\n }\n static sendNewVersionMessage() {\n sendLocalMessage('deeplib-new-version', VersionModule.NewVersionMessage);\n }\n static isNewVersion(current, candidate) {\n if (current !== undefined) {\n const CURRENT_ = current.split('.'), CANDIDATE_ = candidate.split('.');\n for (let i = 0; i < 3; i++) {\n if (CURRENT_[i] === CANDIDATE_[i]) {\n continue;\n }\n return CANDIDATE_[i] > CURRENT_[i];\n }\n }\n if (current === undefined || current === '' || !current) {\n return true;\n }\n return false;\n }\n static saveVersion() {\n if (PlayerStorage()) {\n Player[bcSdkMod.ModInfo.name].Version = VersionModule.Version;\n }\n }\n static loadVersion() {\n return PlayerStorage()?.Version;\n }\n}\n","import { BaseSubscreen, deepLibLogger } from '../DeepLib';\nexport class GuiDebug extends BaseSubscreen {\n get name() {\n return 'debug';\n }\n get pageStructure() {\n return [[\n {\n type: 'button',\n roundness: 50,\n id: 'test-deeplib-big-button',\n size: [405, 80],\n label: 'Big Button',\n tooltip: 'This is a big button',\n image: 'Icons/Exit.png',\n onClick() {\n deepLibLogger.info('Big Button Clicked');\n }\n },\n {\n type: 'button',\n roundness: 5,\n id: 'test-deeplib-small-button',\n size: [90, 90],\n tooltip: 'This is a small button',\n image: 'Icons/Exit.png',\n onClick() {\n deepLibLogger.info('Small Button Clicked');\n }\n },\n {\n type: 'checkbox',\n id: 'test-deeplib-checkbox',\n label: 'Checkbox',\n description: 'This is a checkbox',\n checked: false,\n getSettingValue() {\n return true;\n },\n setSettingValue(val) {\n deepLibLogger.info('Checkbox value:', val);\n },\n },\n {\n type: 'text',\n id: 'test-deeplib-text-input',\n label: 'Input',\n description: 'This is a text input',\n getElementValue() {\n return 'Input Value';\n },\n setSettingValue(val) {\n deepLibLogger.info('Input value:', val);\n },\n },\n {\n type: 'number',\n id: 'test-deeplib-number-input',\n label: 'Input',\n description: 'This is a number input',\n getElementValue() {\n return '123';\n },\n setSettingValue(val) {\n deepLibLogger.info('Input value:', val);\n },\n },\n {\n type: 'label',\n id: 'test-deeplib-label',\n label: 'Label',\n description: 'This is a label',\n }\n ]];\n }\n load() {\n super.load();\n }\n run() {\n super.run();\n }\n click() { }\n exit() {\n super.exit();\n }\n resize() {\n super.resize();\n }\n}\n","import { BaseSubscreen, GUI, GuiDebug, GuiSupport, elementAppendToMiscDiv, elementAppendToSettingsDiv, elementAppendToSubscreenDiv, elementCreateButton, elementCreateMiscDiv, elementSetPosSizeFont, getText } from '../DeepLib';\nexport class MainMenu extends BaseSubscreen {\n subscreens = [];\n static wikiLink = '';\n static resetSubscreen = null;\n get name() {\n return 'mainmenu';\n }\n constructor(module) {\n super(module);\n this.subscreens = module.subscreens;\n }\n load() {\n if (!GUI.instance?.currentSubscreen) {\n this.setSubscreen(this);\n return;\n }\n super.load();\n const exitButton = elementCreateButton({\n type: 'button',\n id: 'exit',\n position: [1815, 75],\n size: [90, 90],\n image: 'Icons/Exit.png',\n onClick: () => {\n this.exit();\n },\n tooltip: getText('settings.button.back_button_hint')\n });\n elementAppendToSubscreenDiv(exitButton);\n for (const screen of this.subscreens) {\n if (screen.name == 'mainmenu')\n continue;\n const button = elementCreateButton({\n type: 'button',\n id: `${screen.name}-button`,\n image: screen.icon,\n label: getText(`mainmenu.button.${screen.name}`),\n onClick: () => {\n this.setSubscreen(screen);\n },\n size: [450, 90],\n });\n elementAppendToSettingsDiv(button);\n }\n const miscDiv = elementCreateMiscDiv();\n elementAppendToSubscreenDiv(miscDiv);\n if (MainMenu.resetSubscreen) {\n const resetButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-reset-button',\n image: 'Icons/ServiceBell.png',\n label: 'Reset',\n onClick: () => {\n this.setSubscreen(MainMenu.resetSubscreen);\n },\n size: [405, 80],\n });\n elementAppendToMiscDiv(resetButton);\n }\n if (MainMenu.wikiLink) {\n const wikiButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-wiki-button',\n image: 'Icons/Introduction.png',\n label: 'Wiki',\n onClick: () => {\n window.open(MainMenu.wikiLink, '_blank');\n },\n size: [405, 80],\n });\n elementAppendToMiscDiv(wikiButton);\n }\n const supportButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-support-button',\n image: 'Assets/Female3DCG/Emoticon/Coffee/Icon.png',\n label: 'Support',\n onClick: () => {\n this.setSubscreen(new GuiSupport());\n },\n size: [405, 80],\n });\n elementAppendToMiscDiv(supportButton);\n elementSetPosSizeFont({ elementId: 'deeplib-misc' }, 1500, 670, 405, 260);\n const debugButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-debug-button',\n image: 'Assets/Female3DCG/Emoticon/Coffee/Icon.png',\n onClick: () => {\n this.setSubscreen(new GuiDebug());\n },\n size: [90, 90],\n position: [75, 75],\n });\n elementAppendToMiscDiv(debugButton);\n }\n run() {\n super.run();\n }\n click() { }\n exit() {\n CharacterAppearanceForceUpCharacter = -1;\n CharacterLoadCanvas(Player);\n this.setSubscreen(null);\n PreferenceSubscreenExtensionsClear();\n }\n resize() {\n super.resize();\n elementSetPosSizeFont({ elementId: 'deeplib-misc' }, 1500, 670, 405, 260);\n }\n}\nexport function setMainMenuOptions(wikiLink, resetSubscreen) {\n MainMenu.wikiLink = wikiLink;\n MainMenu.resetSubscreen = resetSubscreen;\n}\n","import { BaseSubscreen, elementSetPosSizeFont, getText } from '../DeepLib';\nexport class SupportHelper {\n static thankYouList = ['Ellena', 'weboos', 'Jamie'];\n static thankYouNext = 0;\n static thankYou = '';\n static getSupporter() {\n if (SupportHelper.thankYouNext < CommonTime())\n SupportHelper.doNextThankYou();\n return `${getText('support.other.thankyou')}, ${SupportHelper.thankYou}`;\n }\n static doNextThankYou() {\n if (SupportHelper.thankYou && SupportHelper.thankYouList.length < 2)\n return;\n SupportHelper.thankYou = CommonRandomItemFromList(SupportHelper.thankYou, SupportHelper.thankYouList);\n SupportHelper.thankYouNext = CommonTime() + 5000;\n }\n}\nexport class GuiSupport extends BaseSubscreen {\n get name() {\n return 'Support';\n }\n get currentPage() {\n return [\n {\n type: 'button',\n id: 'deeplib-support-kofi',\n size: [405, 80],\n label: getText('support.button.ko-fi'),\n image: 'https://storage.ko-fi.com/cdn/nav-logo-stroke.png',\n onClick() {\n window.open('https://ko-fi.com/monikka_bc', '_blank');\n }\n },\n {\n type: 'button',\n id: 'deeplib-support-patreon',\n size: [405, 80],\n label: getText('support.button.patreon'),\n image: 'https://c5.patreon.com/external/favicon/rebrand/favicon-32.png?v=af5597c2ef',\n onClick() {\n window.open('https://patreon.com/monikka_bc', '_blank');\n }\n }\n ];\n }\n load() {\n SupportHelper.doNextThankYou();\n super.load();\n ElementRemove('deeplib-settngs');\n ElementCreateDiv('deeplib-gratitude');\n const elm = document.getElementById('deeplib-gratitude');\n ElementContent('deeplib-gratitude', gratitudeHtml);\n elementSetPosSizeFont({ element: elm }, 1000, 250, 400, 400);\n }\n run() {\n super.run();\n }\n click() {\n super.click();\n }\n exit() {\n ElementRemove('deeplib-gratitude');\n super.exit();\n }\n resize() {\n super.resize();\n elementSetPosSizeFont({ elementId: 'deeplib-gratitude' }, 1000, 250, 400, 400);\n }\n}\nconst gratitudeHtml = `\n<h1>Dear Supporters!</h1>\n<p>\n I want to take a moment to express my heartfelt gratitude for considering supporting me. Your willingness to stand by\n my side in this creative journey means the world to me, and I am truly humbled by your generosity.\n</p>\n<p>\n Your support goes far beyond the financial contributions; it represents belief in my work and a shared passion for\n what I do. Your encouragement inspires me to continue developing.\n</p>\n<p>\n Your support not only helps me sustain and grow as a developer, but also enables me to dedicate more time and\n resources to producing high-quality mods. It allows me to explore new ideas, enhance my skills, and bring even more\n meaningful and enjoyable content to you.\n</p>\n<p>Thank you all~</p>\n<p>With love, Monikka♥</p>\n`;\n","import { _String, bcSdkMod, modules } from '../DeepLib';\nexport const PlayerStorage = () => (typeof Player?.[bcSdkMod.ModInfo.name] === 'object' ?\n CommonCloneDeep(Player?.[bcSdkMod.ModInfo.name]) :\n undefined);\nexport const ExtensionStorage = () => Player.ExtensionSettings[bcSdkMod.ModInfo.name];\nexport function dataTake(modName = bcSdkMod.ModInfo.name) {\n if (ExtensionStorage()) {\n const parsed = JSON.parse(LZString.decompressFromBase64(ExtensionStorage()) || '');\n Player[modName] = Object.hasOwn(parsed, 'Version') ? parsed : undefined;\n }\n else {\n Player[modName] = {};\n }\n}\nexport function dataStore() {\n const modName = bcSdkMod.ModInfo.name;\n const modVersion = bcSdkMod.ModInfo.version;\n if (!ExtensionStorage())\n Player.ExtensionSettings[modName] = '';\n const Data = {\n GlobalModule: {\n modEnabled: false,\n doShowNewVersionMessage: false\n },\n Version: modVersion\n };\n for (const module of modules()) {\n if (!module.settingsStorage)\n continue;\n Data[module.settingsStorage] = PlayerStorage()[module.settingsStorage];\n }\n Player.ExtensionSettings[modName] = _String.encode(Data);\n ServerPlayerExtensionSettingsSync(modName);\n}\n","export function elementCreateSubscreenDiv() {\n const subscreenDiv = elementGetSubscreenDiv();\n if (subscreenDiv) {\n console.error('Subscreen already exists');\n return subscreenDiv;\n }\n const div = document.createElement('div');\n div.id = 'deeplib-subscreen';\n div.classList.add('deeplib-subscreen', 'HideOnPopup');\n return document.body.appendChild(div);\n}\nexport function elementGetSubscreenDiv() {\n return document.getElementById('deeplib-subscreen') ?? undefined;\n}\nexport function elementRemoveSubscreenDiv() {\n return elementGetSubscreenDiv()?.remove();\n}\nexport function elementAppendToSubscreenDiv(element) {\n return elementGetSubscreenDiv()?.appendChild(element);\n}\nexport function elementCreateSettingsDiv() {\n const settingsDiv = elementGetSettingsDiv();\n if (settingsDiv) {\n console.error('Settings screen already exists');\n return settingsDiv;\n }\n const div = document.createElement('div');\n div.id = 'deeplib-settings';\n div.classList.add('deeplib-settings');\n return div;\n}\nexport function elementGetSettingsDiv() {\n return document.getElementById('deeplib-settings') ?? undefined;\n}\nexport function elementAppendToSettingsDiv(element) {\n return elementGetSettingsDiv()?.appendChild(element);\n}\nexport function elementCreateMiscDiv() {\n const miscDiv = elementGetMiscDiv();\n if (miscDiv) {\n console.error('Settings screen already exists');\n return miscDiv;\n }\n const div = document.createElement('div');\n div.id = 'deeplib-misc';\n div.classList.add('deeplib-misc');\n return div;\n}\nexport function elementGetMiscDiv() {\n return document.getElementById('deeplib-misc');\n}\nexport function elementAppendToMiscDiv(element) {\n return elementGetMiscDiv()?.appendChild(element);\n}\n","import { deepLibLogger } from '../../DeepLib';\nconst mainCanvasHeight = 1000;\nconst mainCanvasWidth = 2000;\nexport function getRelativeHeight(height) {\n return height * (MainCanvas.canvas.clientHeight / mainCanvasHeight);\n}\nexport function getRelativeWidth(width) {\n return width * (MainCanvas.canvas.clientWidth / mainCanvasWidth);\n}\nexport function getRelativeY(yPos) {\n return MainCanvas.canvas.offsetTop + yPos * (MainCanvas.canvas.clientHeight / mainCanvasHeight);\n}\nexport function getRelativeX(xPos) {\n return MainCanvas.canvas.offsetLeft + xPos * (MainCanvas.canvas.clientWidth / mainCanvasWidth);\n}\nexport function elementSetPosition(_, xPos, yPos) {\n const element = elementGet(_, 'elementSetPosition');\n if (!element)\n return;\n const Top = getRelativeY(yPos);\n const Left = getRelativeX(xPos);\n Object.assign(element.style, {\n position: 'fixed',\n left: Left + 'px',\n top: Top + 'px'\n });\n}\nexport function elementSetSize(_, width, height) {\n const element = elementGet(_, 'elementSetSize');\n if (!element)\n return;\n const Height = getRelativeHeight(height);\n const Width = getRelativeWidth(width);\n Object.assign(element.style, {\n width: Width + 'px',\n height: Height + 'px',\n });\n}\nexport function elementAdjustFontSize(_) {\n const element = elementGet(_, 'elementAdjustFontSize');\n if (!element)\n return;\n const Font = MainCanvas.canvas.clientWidth <= MainCanvas.canvas.clientHeight * 2 ? MainCanvas.canvas.clientWidth / 50 : MainCanvas.canvas.clientHeight / 25;\n Object.assign(element.style, {\n fontSize: Font + 'px',\n fontFamily: CommonGetFontName()\n });\n}\nexport function elementSetPosSizeFont(_, xPos, yPos, width, height) {\n if (elementGet(_, 'elementSetPosSizeFont') === null)\n return;\n elementSetPosition(_, xPos, yPos);\n elementSetSize(_, width, height);\n elementAdjustFontSize(_);\n}\nexport function elementHide(_) {\n const element = elementGet(_, 'elementHide');\n if (!element)\n return;\n element.style.display = 'none';\n}\nexport function elementUnhide(_) {\n const element = elementGet(_, 'elementUnhide');\n if (!element)\n return;\n element.style.display = '';\n}\nfunction elementGet(_, funcName) {\n if (!_) {\n deepLibLogger.warn(`${funcName} called without an elementId or element`);\n return null;\n }\n const elementId = _.elementId ?? _.element?.id;\n const element = _.element ?? document.getElementById(_.elementId);\n if (!element) {\n deepLibLogger.warn(`A call to ${funcName} was made on non-existent element with id ${elementId}`);\n return null;\n }\n return element;\n}\n","import { BaseSubscreen, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateButton(options) {\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const button = ElementButton.Create(options.id, () => options.onClick(), {\n tooltip: options.tooltip,\n label: options.label,\n labelPosition: 'center',\n }, {\n button: {\n classList: ['deeplib-button'],\n children: [\n {\n tag: 'img',\n attributes: {\n id: `${options.id}-image`,\n alt: '',\n disabled: options.disabled,\n decoding: 'async',\n loading: 'lazy',\n src: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n style: {\n '--image': `url(\"${options.image}\")`,\n }\n },\n ],\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n }\n },\n });\n BaseSubscreen.currentElements.push([button, options]);\n return button;\n}\n","import { BaseSubscreen, elementSetTooltip, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateCheckbox(options) {\n const elem = document.getElementById(options.id);\n if (elem)\n return elem;\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const retElem = ElementCreate({\n tag: 'div',\n classList: ['deeplib-checkbox-container'],\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n children: [\n {\n tag: 'input',\n classList: ['deeplib-input'],\n attributes: {\n type: 'checkbox',\n id: options.id,\n checked: options.getSettingValue() || undefined,\n },\n },\n {\n tag: 'label',\n classList: ['deeplib-text'],\n attributes: {\n for: options.id,\n },\n children: [options.label]\n },\n ]\n });\n if (options.description) {\n retElem.addEventListener('mouseover', () => {\n elementSetTooltip(options.description);\n });\n retElem.addEventListener('mouseout', () => {\n elementSetTooltip('');\n });\n }\n BaseSubscreen.currentElements.push([retElem, options]);\n return retElem;\n}\n","import { BaseSubscreen, elementSetTooltip, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateInput(options) {\n const elem = document.getElementById(options.id);\n if (elem)\n return elem;\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const retElem = ElementCreate({\n tag: 'div',\n classList: ['deeplib-input-container'],\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n children: [\n {\n tag: 'input',\n classList: ['deeplib-input'],\n attributes: {\n type: options.type,\n id: options.id,\n placeholder: ' ',\n },\n },\n {\n tag: 'label',\n classList: ['deeplib-text'],\n attributes: {\n for: options.id,\n },\n children: [options.label]\n },\n {\n tag: 'div',\n classList: ['deeplib-underline'],\n }\n ]\n });\n if (options.getElementValue?.()) {\n const input = document.getElementById(options.id);\n if (input)\n input.value = options.getElementValue();\n }\n if (options.description) {\n retElem.addEventListener('mouseover', () => {\n elementSetTooltip(options.description);\n });\n retElem.addEventListener('mouseout', () => {\n elementSetTooltip('');\n });\n }\n BaseSubscreen.currentElements.push([retElem, options]);\n return retElem;\n}\n","import { BaseSubscreen, elementSetTooltip, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateLabel(options) {\n const elem = document.getElementById(options.id);\n if (elem)\n return elem;\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const retElem = ElementCreate({\n tag: 'span',\n classList: ['deeplib-label', 'deeplib-text'],\n attributes: {\n id: options.id\n },\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n children: [\n options.label,\n ],\n });\n if (options.description) {\n retElem.addEventListener('mouseover', () => {\n elementSetTooltip(options.description);\n });\n retElem.addEventListener('mouseout', () => {\n elementSetTooltip('');\n });\n }\n BaseSubscreen.currentElements.push([retElem, options]);\n return retElem;\n}\n","export function elementCreateTooltip() {\n const element = ElementCreate({\n tag: 'div',\n classList: ['deeplib-tooltip'],\n attributes: {\n id: 'deeplib-tooltip'\n },\n style: {\n display: 'none'\n }\n });\n return element;\n}\nexport function elementGetTooltip() {\n return document.getElementById('deeplib-tooltip') ?? undefined;\n}\nexport function elementSetTooltip(text) {\n const element = document.getElementById('deeplib-tooltip');\n if (!element)\n return false;\n element.innerHTML = text;\n if (text === '')\n element.style.display = 'none';\n else\n element.style.display = '';\n return true;\n}\n","export class Logger extends Array {\n ModName = 'DeepLib';\n constructor(modName) {\n super();\n if (modName) {\n this.ModName = modName;\n }\n }\n _Log(level, ...args) {\n const logEntry = {\n logLevel: level,\n args: [...args],\n date: new Date(Date.now())\n };\n const userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes('chrome') || userAgent.includes('firefox')) {\n const color = Logger.colorizeLog(level);\n args.forEach(arg => {\n if (typeof arg === 'string') {\n arg = `\\n%c${arg}`;\n }\n });\n console.log(`%c${this.ModName}:`, color, ...args);\n }\n else {\n console.log(`${this.ModName}:`, ...args);\n }\n this.push(logEntry);\n }\n info(...args) {\n this._Log('info', ...args);\n }\n log(...args) {\n this._Log('log', ...args);\n }\n warn(...args) {\n this._Log('warn', ...args);\n }\n error(...args) {\n this._Log('error', ...args);\n }\n debug(...args) {\n this._Log('debug', ...args);\n }\n static colorizeLog(logLevel) {\n const colors = {\n info: 'color: #32CCCC',\n log: 'color: #CCCC32',\n warn: 'color: #eec355',\n error: 'color: #750b0b',\n debug: 'color: #9E4BCF',\n };\n return colors[logLevel];\n }\n}\nexport const deepLibLogger = new Logger();\n","export function sendLocalMessage(id, message, timeoutInSeconds) {\n const div = document.createElement('div');\n div.id = id;\n const specialId = id + Date.now();\n div.classList.add('ChatMessage', 'deeplib-message', specialId);\n div.setAttribute('data-time', ChatRoomCurrentTime());\n div.setAttribute('data-sender', Player?.MemberNumber + '');\n const messageContent = message.replaceAll('\\n\\t', '') + '<br>';\n const closeButton = document.createElement('a');\n closeButton.classList.add('deeplib-text');\n closeButton.addEventListener('click', () => {\n div?.remove();\n });\n closeButton.innerHTML = '<b>Close (Click)</b>';\n div.innerHTML = messageContent;\n div.append(closeButton);\n ChatRoomAppendChat(div);\n if (!timeoutInSeconds)\n return;\n setTimeout(() => div?.remove(), timeoutInSeconds * 1000);\n}\nexport function sendActionMessage(msg, target = undefined, dictionary = []) {\n if (!msg)\n return;\n ServerSend('ChatRoomChat', {\n Content: 'DEEPLIB_CUSTOM_ACTION',\n Type: 'Action',\n Target: target ?? undefined,\n Dictionary: [\n { Tag: 'MISSING TEXT IN \"Interface.csv\": DEEPLIB_CUSTOM_ACTION', Text: msg },\n ...dictionary,\n ],\n });\n}\n","import bcModSdkRef from 'bondage-club-mod-sdk';\nexport var HookPriority;\n(function (HookPriority) {\n HookPriority[HookPriority[\"Observe\"] = 0] = \"Observe\";\n HookPriority[HookPriority[\"AddBehavior\"] = 1] = \"AddBehavior\";\n HookPriority[HookPriority[\"ModifyBehavior\"] = 5] = \"ModifyBehavior\";\n HookPriority[HookPriority[\"OverrideBehavior\"] = 10] = \"OverrideBehavior\";\n HookPriority[HookPriority[\"Top\"] = 100] = \"Top\";\n})(HookPriority || (HookPriority = {}));\nexport class bcSdkMod {\n static SDK;\n static patchedFunctions = new Map();\n static ModInfo;\n constructor(info, options) {\n bcSdkMod.SDK = bcModSdkRef.registerMod(info, options);\n bcSdkMod.ModInfo = info;\n }\n initPatchableFunction(target) {\n let result = bcSdkMod.patchedFunctions.get(target);\n if (!result) {\n result = {\n name: target,\n hooks: []\n };\n bcSdkMod.patchedFunctions.set(target, result);\n }\n return result;\n }\n hookFunction(target, priority, hook, module = null) {\n const data = this.initPatchableFunction(target);\n if (data.hooks.some((h) => h.hook === hook)) {\n return () => null;\n }\n const removeCallback = bcSdkMod.SDK?.hookFunction(target, priority, hook);\n data.hooks.push({\n hook,\n priority,\n module,\n removeCallback\n });\n data.hooks.sort((a, b) => b.priority - a.priority);\n return removeCallback;\n }\n patchFunction(target, patches) {\n this.patchFunction(target, patches);\n }\n removeHookByModule(target, module) {\n const data = this.initPatchableFunction(target);\n for (let i = data.hooks.length - 1; i >= 0; i--) {\n if (data.hooks[i].module === module) {\n data.hooks[i].removeCallback();\n data.hooks.splice(i, 1);\n }\n }\n return true;\n }\n removeAllHooksByModule(module) {\n for (const data of bcSdkMod.patchedFunctions.values()) {\n for (let i = data.hooks.length - 1; i >= 0; i--) {\n if (data.hooks[i].module === module) {\n data.hooks[i].removeCallback();\n data.hooks.splice(i, 1);\n }\n }\n }\n return true;\n }\n}\n","import { deepLibLogger } from './Logger';\nexport class _String {\n static encode(string) {\n return LZString.compressToBase64(JSON.stringify(string));\n }\n static decode(string) {\n const d = LZString.decompressFromBase64(string);\n let data = {};\n try {\n const decoded = JSON.parse(d);\n data = decoded;\n }\n catch (error) {\n deepLibLogger.error(error);\n }\n if (data)\n return data;\n }\n static shuffle(string) {\n const temp = JSON.parse(JSON.stringify(string));\n const ret = [];\n while (temp.length > 0) {\n const d = Math.floor(Math.random() * temp.length);\n ret.push(temp[d]);\n temp.splice(d, 1);\n }\n return ret;\n }\n}\n","export class Style {\n static inject(id, styleSource) {\n const isStyleLoaded = !!document.getElementById(id);\n if (isStyleLoaded)\n return;\n const styleElement = document.createElement('style');\n styleElement.id = id;\n styleElement.appendChild(document.createTextNode(styleSource));\n document.head.appendChild(styleElement);\n }\n static eject(id) {\n const style = document.getElementById(id);\n if (!style)\n return;\n style.remove();\n }\n static reload(id, styleSource) {\n Style.eject(id);\n Style.inject(id, styleSource);\n }\n}\n","export class Localization {\n Translation = {};\n static PathToTranslation;\n constructor(options) {\n Localization.PathToTranslation = options.pathToTranslationsFolder.endsWith('/') ? options.pathToTranslationsFolder : options.pathToTranslationsFolder + '/';\n }\n static async init() {\n const lang = TranslationLanguage.toLowerCase();\n const translation = await Localization.fetchLanguageFile(lang);\n if (lang === 'en') {\n Localization.prototype.Translation = translation;\n }\n else {\n const fallbackTranslation = await Localization.fetchLanguageFile('en');\n Localization.prototype.Translation = { ...fallbackTranslation, ...translation };\n }\n }\n static getText(srcTag) {\n return Localization.prototype.Translation?.[srcTag] || srcTag || '';\n }\n static async fetchLanguageFile(lang) {\n const response = await fetch(`${Localization.PathToTranslation}${lang}.lang`);\n if (lang !== 'en' && !response.ok) {\n return this.fetchLanguageFile('en');\n }\n const langFileContent = await response.text();\n return this.parseLanguageFile(langFileContent);\n }\n static parseLanguageFile(content) {\n const translations = {};\n const lines = content.split('\\n');\n for (const line of lines) {\n if (line.trim() === '' || line.trim().startsWith('#')) {\n continue;\n }\n const [key, value] = line.split('=');\n translations[key.trim()] = value.trim();\n }\n return translations;\n }\n}\nexport const getText = (string) => Localization.getText(string);\n","export * from './Base/BaseModule';\nexport * from './Base/BaseSubscreen';\nexport * from './Base/Initialization';\nexport * from './Base/Modules';\nexport * from './Base/SettingDefinitions';\nexport * from './Migrators/BaseMigrator';\nexport * from './Models/Base';\nexport * from './Models/Settings';\nexport * from './Modules/GUI';\nexport * from './Modules/Version';\nexport * from './Screens/Debug';\nexport * from './Screens/MainMenu';\nexport * from './Screens/Support';\nexport * from './Utilities/Data';\nexport * from './Utilities/Elements/.AdvancedElements';\nexport * from './Utilities/Elements/.ElementHelpers';\nexport * from './Utilities/Elements/Button';\nexport * from './Utilities/Elements/Checkbox';\nexport * from './Utilities/Elements/Input';\nexport * from './Utilities/Elements/Label';\nexport * from './Utilities/Elements/Tooltip';\nexport * from './Utilities/Logger';\nexport * from './Utilities/Messages';\nexport * from './Utilities/SDK';\nexport * from './Utilities/String';\nexport * from './Utilities/Style';\nexport * from './Utilities/Translation';\n"],"names":[],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bc-deeplib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"author": "dDeepLb",
|
|
5
5
|
"description": "Package for easier development of BC mods without need to repeat myself in every mod",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"public",
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
|
-
"main": "./
|
|
13
|
+
"main": "./dist/deeplib.js",
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@eslint/js": "^9.16.0",
|
|
16
16
|
"@stylistic/eslint-plugin": "^2.11.0",
|
package/dist/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","mappings":";;;;;;;AAAA;AACA;AACA,WAAW,iBAAiB;AAC5B,wBAAwB,aAAa,gBAAgB,cAAc,wBAAwB,qBAAqB,yBAAyB,wBAAwB,cAAc,iDAAiD,cAAc,gBAAgB,0CAA0C,0BAA0B,cAAc,qCAAqC,cAAc,+BAA+B,2BAA2B,+BAA+B,MAAM,mBAAmB,+EAA+E,OAAO,yBAAyB,QAAQ,qGAAqG,EAAE,aAAa,aAAa,aAAa,EAAE,6BAA6B,uCAAuC,sBAAsB,uBAAuB,2CAA2C,kEAAkE,OAAO,UAAU,GAAG,kCAAkC,mBAAmB,EAAE,IAAI,eAAe,kBAAkB,QAAQ,kHAAkH,uBAAuB,qBAAqB,KAAK,KAAK,iBAAiB,cAAc,QAAQ,2HAA2H,kEAAkE,OAAO,2DAA2D,SAAS,GAAG,sBAAsB,GAAG,uBAAuB,OAAO,oDAAoD,mBAAmB,eAAe,6BAA6B,KAAK,aAAa,qBAAqB,YAAY,aAAa,2DAA2D,GAAG,yBAAyB,EAAE,0BAA0B,gBAAgB,yBAAyB,4DAA4D,GAAG,0BAA0B,oBAAoB,SAAS,4BAA4B,gBAAgB,YAAY,IAAI,iCAAiC,UAAU,8DAA8D,0CAA0C,kCAAkC,gCAAgC,KAAK,8BAA8B,yCAAyC,uBAAuB,sBAAsB,4CAA4C,6CAA6C,SAAS,aAAa,6CAA6C,aAAa,gBAAgB,4BAA4B,wOAAwO,EAAE,SAAS,gBAAgB,cAAc,8CAA8C,OAAO,qDAAqD,gBAAgB,+MAA+M,UAAU,OAAO,GAAG,qEAAqE,EAAE,kDAAkD,kBAAkB,SAAS,YAAY,GAAG,OAAO,4DAA4D,EAAE,uCAAuC,iBAAiB,yHAAyH,EAAE,uDAAuD,iBAAiB,iBAAiB,qDAAqD,EAAE,oDAAoD,SAAS,GAAG,4CAA4C,iDAAiD,EAAE,qGAAqG,YAAY,6BAA6B,cAAc,yBAAyB,6BAA6B,mBAAmB,QAAQ,mGAAmG,mBAAmB,GAAG,sDAAsD,gBAAgB,sBAAsB,IAAI,uEAAuE,gCAAgC,GAAG,iEAAiE,SAAS,GAAG,oBAAoB,6BAA6B,GAAG,2BAA2B,EAAE,mCAAmC,SAAS,kCAAkC,GAAG,2BAA2B,EAAE,iCAAiC,SAAS,GAAG,SAAS,8BAA8B,gCAAgC,2BAA2B,iCAAiC,4CAA4C,gCAAgC,GAAG,iEAAiE,SAAS,GAAG,oBAAoB,eAAe,GAAG,4BAA4B,EAAE,kCAAkC,SAAS,GAAG,+GAA+G,GAAG,4BAA4B,EAAE,8BAA8B,EAAE,IAAI,IAAI,wCAAwC,gCAAgC,GAAG,iEAAiE,SAAS,GAAG,aAAa,yBAAyB,4CAA4C,gCAAgC,GAAG,gEAAgE,SAAS,GAAG,aAAa,kCAAkC,GAAG,sDAAsD,SAAS,4CAA4C,4CAA4C,gCAAgC,GAAG,yDAAyD,SAAS,GAAG,yBAAyB,GAAG,IAAI,2HAA2H,wCAAwC,aAAa,WAAW,kCAAkC,0EAA0E,EAAE,SAAS,MAAM,4DAA4D,SAAS,qGAAqG,wDAAwD,GAAG,4BAA4B,oLAAoL,wBAAwB,mHAAmH,wBAAwB,yIAAyI,MAAM,KAA2B,+CAA+C,SAAS,EAAE,kBAAe,MAAM;;;;;;;;;;;;;ACHpqO;AACgK;AACjB;AAC/I,8BAA8B,qIAA2B,CAAC,8IAAqC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,4FAA4F,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,OAAO,UAAU,UAAU,WAAW,KAAK,YAAY,OAAO,KAAK,UAAU,UAAU,MAAM,KAAK,YAAY,OAAO,KAAK,UAAU,YAAY,aAAa,WAAW,YAAY,OAAO,KAAK,UAAU,YAAY,aAAa,aAAa,OAAO,KAAK,YAAY,aAAa,OAAO,KAAK,YAAY,WAAW,UAAU,UAAU,UAAU,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,aAAa,cAAc,aAAa,aAAa,OAAO,KAAK,UAAU,YAAY,aAAa,aAAa,OAAO,KAAK,YAAY,aAAa,OAAO,KAAK,YAAY,OAAO,KAAK,YAAY,OAAO,KAAK,YAAY,OAAO,KAAK,UAAU,YAAY,aAAa,WAAW,MAAM,KAAK,YAAY,OAAO,KAAK,YAAY,aAAa,OAAO,KAAK,UAAU,UAAU,UAAU,YAAY,WAAW,YAAY,aAAa,OAAO,KAAK,YAAY,aAAa,aAAa,aAAa,aAAa,OAAO,MAAM,YAAY,aAAa,aAAa,aAAa,OAAO,KAAK,YAAY,WAAW,UAAU,UAAU,UAAU,YAAY,aAAa,aAAa,OAAO,MAAM,YAAY,OAAO,KAAK,YAAY,aAAa,WAAW,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,OAAO,MAAM,YAAY,WAAW,MAAM,KAAK,YAAY,aAAa,OAAO,UAAU,UAAU,WAAW,KAAK,YAAY,aAAa,OAAO,MAAM,YAAY,aAAa,aAAa,OAAO,KAAK,YAAY,aAAa,WAAW,YAAY,WAAW,YAAY,OAAO,MAAM,YAAY,OAAO,KAAK,UAAU,YAAY,WAAW,6CAA6C,mDAAmD,mDAAmD,4DAA4D,6CAA6C,+CAA+C,iDAAiD,GAAG,qEAAqE,qCAAqC,GAAG,wBAAwB,eAAe,cAAc,GAAG,0BAA0B,2BAA2B,GAAG,uBAAuB,kBAAkB,2BAA2B,iCAAiC,eAAe,qBAAqB,GAAG,mBAAmB,kBAAkB,wBAAwB,mCAAmC,mCAAmC,GAAG,oCAAoC,uCAAuC,qCAAqC,GAAG,wCAAwC,uBAAuB,YAAY,aAAa,gBAAgB,iBAAiB,8BAA8B,gDAAgD,oCAAoC,6BAA6B,wBAAwB,uBAAuB,iCAAiC,2BAA2B,uBAAuB,qCAAqC,6BAA6B,GAAG,kDAAkD,gBAAgB,kCAAkC,qCAAqC,mCAAmC,GAAG,8BAA8B,uBAAuB,qCAAqC,GAAG,2BAA2B,gCAAgC,GAAG,0BAA0B,8BAA8B,GAAG,6BAA6B,8BAA8B,GAAG,iCAAiC,kBAAkB,wBAAwB,wBAAwB,eAAe,GAAG,oBAAoB,uCAAuC,GAAG,8BAA8B,uBAAuB,gCAAgC,GAAG,kDAAkD,oBAAoB,gBAAgB,mBAAmB,kCAAkC,kBAAkB,kCAAkC,mCAAmC,GAAG,iDAAiD,uBAAuB,2BAA2B,4BAA4B,8BAA8B,yBAAyB,GAAG,2IAA2I,qBAAqB,oCAAoC,sDAAsD,iCAAiC,GAAG,iDAAiD,uBAAuB,cAAc,YAAY,gBAAgB,gBAAgB,yDAAyD,yBAAyB,8BAA8B,GAAG,qKAAqK,4BAA4B,GAAG,sBAAsB,mDAAmD,qCAAqC,kBAAkB,wBAAwB,4BAA4B,uCAAuC,6BAA6B,qBAAqB,gEAAgE,GAAG,yEAAyE,6BAA6B,cAAc,GAAG,wBAAwB,0BAA0B,+BAA+B,GAAG,iFAAiF,sBAAsB,6BAA6B,GAAG,0JAA0J,mDAAmD,kEAAkE,qCAAqC,GAAG,sDAAsD,2BAA2B,8CAA8C,gBAAgB,sCAAsC,mBAAmB,wBAAwB,GAAG,8JAA8J,qCAAqC,GAAG,wDAAwD,oBAAoB,sBAAsB,gBAAgB,GAAG,qBAAqB;AAC98M;AACA,sEAAe,uEAAuB,IAAC;;;;;;;;;ACrN1B;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;;;;;;UCfA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAqD;AAC9C,MAAM,qBAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAQ;AAChC;AACA;AACA,aAAa,kBAAa;AAC1B;AACA;AACA;AACA,kBAAkB,kBAAa;AAC/B;AACA,eAAe,kBAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAQ,yDAAyD,YAAQ,6BAA6B;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpCof;AAC7e;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW,GAAG,uBAAuB;AACzD,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,6BAA6B,eAAO;AACpC;AACA;AACA;AACA;AACA;AACA,QAAQ,yBAAyB;AACjC,gCAAgC,wBAAwB;AACxD,QAAQ,2BAA2B;AACnC,+BAA+B,kBAAkB;AACjD;AACA;AACA,mBAAmB,OAAO,0CAA0C,YAAQ,2BAA2B,aAAa;AACpH,SAAS;AACT,QAAQ,2BAA2B;AACnC;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,iBAAiB;AACjB,yBAAyB,OAAO;AAChC,aAAa;AACb,YAAY,2BAA2B;AACvC;AACA,wBAAwB,oBAAoB;AAC5C,QAAQ,2BAA2B;AACnC;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA,YAAY,0BAA0B;AACtC,SAAS;AACT;AACA;AACA;AACA,yBAAyB,OAAO,0CAA0C,YAAQ,2BAA2B,aAAa;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY;AACpB,QAAQ,cAAS;AACjB;AACA;AACA,QAAQ,qBAAqB,GAAG,SAAS,sBAAsB,IAAI;AACnE;AACA,YAAY,qBAAqB,GAAG,SAAS,qBAAqB,IAAI;AACtE;AACA;AACA,YAAY,qBAAqB,GAAG,SAAS,qBAAqB,IAAI;AACtE;AACA,QAAQ,qBAAqB,GAAG,sCAAsC;AACtE,QAAQ,kBAAkB,GAAG,SAAS,iBAAiB,IAAI;AAC3D,QAAQ,cAAc,GAAG,SAAS,iBAAiB,IAAI;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB,GAAG,uBAAuB;AAC5D;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc,GAAG,uBAAuB;AACxD;AACA,YAAY,qBAAqB,GAAG,uBAAuB;AAC3D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ,yBAAyB;AACjC;AACA;;;;;AClK4D;AACgE;AACrH;AACP;AACA,yCAAyC,SAAS;AAClD;AACA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS,aAAa,YAAY;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACO;AACP;AACA;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;;ACrEO;AACA,SAAS,eAAO;AACvB;AACA;AACO,SAAS,sBAAc;AAC9B;AACA;AACA;AACO;AACP;AACA;;;ACViC;AAC1B;AACP;AACA;AACO;AACP,SAAS,OAAG;AACZ;AACA;AACA,IAAI,OAAG;AACP,WAAW,OAAG;AACd;;;ACVyE;AAClE,MAAM,OAAG,SAAS,qBAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,UAAU;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAG;AACf;AACA;AACA,6BAA6B,eAAO;AACpC;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA,QAAQ,OAAG;AACX;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY,KAAK,QAAQ;AACzC,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;;;AChG2H;AACpH,MAAM,qBAAa,SAAS,0DAAU;AAC7C,4BAA4B,qDAAK;AACjC;AACA,+BAA+B,kDAAE;AACjC,uBAAuB,kDAAE;AACzB;AACA,QAAQ,qBAAa;AACrB;AACA;AACA,wEAAwE,qBAAa;AACrF,gBAAgB,qBAAa;AAC7B;AACA,SAAS;AACT;AACA;AACA,gCAAgC,qBAAa;AAC7C,+BAA+B,qBAAa;AAC5C,YAAY,qBAAa;AACzB,YAAY,qBAAa;AACzB,YAAY,qBAAa;AACzB;AACA;AACA;AACA,gCAAgC,qBAAa;AAC7C;AACA,+BAA+B,qBAAa;AAC5C,gBAAgB,qBAAa;AAC7B;AACA,gDAAgD,uBAAuB,OAAO,iBAAiB,KAAK,2BAA2B,OAAO,0BAA0B;AAChK;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAa;AACrB;AACA;AACA,QAAQ,qBAAa;AACrB;AACA;AACA,gDAAgD,qBAAa;AAC7D;AACA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,qBAAa;AACjE;AACA;AACA;AACA;AACA;AACA;;;ACpE0D;AACnD,uBAAuB,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAa;AACrC;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAa;AACrC;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB,oBAAa;AACrC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB,oBAAa;AACrC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB,oBAAa;AACrC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxFkO;AAC3N,uBAAuB,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAG;AAChB;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,qBAAqB,OAAO;AAC5B,SAAS;AACT,QAAQ,2BAA2B;AACnC;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,uBAAuB,YAAY;AACnC;AACA,uBAAuB,OAAO,oBAAoB,YAAY;AAC9D;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb,YAAY,0BAA0B;AACtC;AACA,wBAAwB,oBAAoB;AAC5C,QAAQ,2BAA2B;AACnC;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb,YAAY,sBAAsB;AAClC;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb,YAAY,sBAAsB;AAClC;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD,aAAa;AACb;AACA,SAAS;AACT,QAAQ,sBAAsB;AAC9B,QAAQ,qBAAqB,GAAG,2BAA2B;AAC3D,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C,aAAa;AACb;AACA;AACA,SAAS;AACT,QAAQ,sBAAsB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB,GAAG,2BAA2B;AAC3D;AACA;AACO;AACP;AACA;AACA;;;ACnH2E;AACpE;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO,2BAA2B,IAAI,uBAAuB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,yBAAyB,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB,GAAG,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB,GAAG,gCAAgC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtFwD;AACjD,MAAM,kBAAa,0BAA0B,YAAQ;AAC5D,6BAA6B,YAAQ;AACrC;AACO,wDAAwD,YAAQ;AAChE,SAAS,aAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAS;AACzB,oBAAoB,YAAQ;AAC5B,uBAAuB,YAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yBAAyB,eAAO;AAChC;AACA;AACA,uCAAuC,kBAAa;AACpD;AACA,wCAAwC,OAAO;AAC/C;AACA;;;ACjCO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;;;ACrD8C;AAC9C;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,oBAAa,SAAS,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA,QAAQ,oBAAa,mBAAmB,UAAU,2CAA2C,UAAU;AACvG;AACA;AACA;AACA;;;AC/E+G;AACxG;AACP,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2CAA2C,cAAc;AACzD;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL,IAAI,aAAa;AACjB;AACA;;;AC7CkI;AAC3H;AACP;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,IAAI,aAAa;AACjB;AACA;;;ACtDkI;AAC3H;AACP;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,IAAI,aAAa;AACjB;AACA;;;AC/DkI;AAC3H;AACP;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD,kCAAkC,iBAAiB;AACnD,oCAAoC,YAAY;AAChD,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,YAAY,iBAAiB;AAC7B,SAAS;AACT;AACA,IAAI,aAAa;AACjB;AACA;;;ACzCO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1BO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,IAAI;AACrC;AACA,aAAa;AACb,6BAA6B,aAAa;AAC1C;AACA;AACA,2BAA2B,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,oBAAa;;;;;;ACvDqB;AACxC,IAAI,gBAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,gBAAY,KAAK,gBAAY,KAAK;AAC9B,MAAM,YAAQ;AACrB;AACA;AACA;AACA;AACA,QAAQ,YAAQ,OAAO,8BAAuB;AAC9C,QAAQ,YAAQ;AAChB;AACA;AACA,qBAAqB,YAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA,YAAY,YAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAQ;AACvC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,YAAQ;AACnC,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnEyC;AAClC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5BO,MAAM,wBAAY;AACzB;AACA;AACA;AACA,QAAQ,wBAAY;AACpB;AACA;AACA;AACA,kCAAkC,wBAAY;AAC9C;AACA,YAAY,wBAAY;AACxB;AACA;AACA,8CAA8C,wBAAY;AAC1D,YAAY,wBAAY,2BAA2B;AACnD;AACA;AACA;AACA,eAAe,wBAAY;AAC3B;AACA;AACA,wCAAwC,wBAAY,mBAAmB,EAAE,KAAK;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,4BAA4B,wBAAY;;;ACzCb;AACG;AACC;AACP;AACW;AACD;AACX;AACI;AACJ;AACI;AACF;AACG;AACD;AACD;AACsB;AACF;AACT;AACE;AACH;AACA;AACE;AACV;AACE;AACL;AACG;AACD;AACM","sources":["webpack://bc-deeplib/./node_modules/.pnpm/bondage-club-mod-sdk@1.2.0/node_modules/bondage-club-mod-sdk/dist/bcmodsdk.js","webpack://bc-deeplib/./public/styles/DeepLib.css","webpack://bc-deeplib/./node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/api.js","webpack://bc-deeplib/./node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://bc-deeplib/webpack/bootstrap","webpack://bc-deeplib/webpack/runtime/compat get default export","webpack://bc-deeplib/webpack/runtime/define property getters","webpack://bc-deeplib/webpack/runtime/hasOwnProperty shorthand","webpack://bc-deeplib/./src/Base/BaseModule.ts","webpack://bc-deeplib/./src/Base/BaseSubscreen.ts","webpack://bc-deeplib/./src/Base/Initialization.ts","webpack://bc-deeplib/./src/Base/Modules.ts","webpack://bc-deeplib/./src/Base/SettingDefinitions.ts","webpack://bc-deeplib/./src/Modules/GUI.ts","webpack://bc-deeplib/./src/Modules/Version.ts","webpack://bc-deeplib/./src/Screens/Debug.ts","webpack://bc-deeplib/./src/Screens/MainMenu.ts","webpack://bc-deeplib/./src/Screens/Support.ts","webpack://bc-deeplib/./src/Utilities/Data.ts","webpack://bc-deeplib/./src/Utilities/Elements/.AdvancedElements.ts","webpack://bc-deeplib/./src/Utilities/Elements/.ElementHelpers.ts","webpack://bc-deeplib/./src/Utilities/Elements/Button.ts","webpack://bc-deeplib/./src/Utilities/Elements/Checkbox.ts","webpack://bc-deeplib/./src/Utilities/Elements/Input.ts","webpack://bc-deeplib/./src/Utilities/Elements/Label.ts","webpack://bc-deeplib/./src/Utilities/Elements/Tooltip.ts","webpack://bc-deeplib/./src/Utilities/Logger.ts","webpack://bc-deeplib/./src/Utilities/SDK.ts","webpack://bc-deeplib/./src/Utilities/String.ts","webpack://bc-deeplib/./src/Utilities/Translation.ts","webpack://bc-deeplib/./src/DeepLib.ts"],"sourcesContent":["// Bondage Club Mod Development Kit (1.2.0)\n// For more info see: https://github.com/Jomshir98/bondage-club-mod-sdk\n/** @type {ModSDKGlobalAPI} */\nvar bcModSdk=function(){\"use strict\";const o=\"1.2.0\";function e(o){alert(\"Mod ERROR:\\n\"+o);const e=new Error(o);throw console.error(e),e}const t=new TextEncoder;function n(o){return!!o&&\"object\"==typeof o&&!Array.isArray(o)}function r(o){const e=new Set;return o.filter((o=>!e.has(o)&&e.add(o)))}const i=new Map,a=new Set;function c(o){a.has(o)||(a.add(o),console.warn(o))}function s(o){const e=[],t=new Map,n=new Set;for(const r of f.values()){const i=r.patching.get(o.name);if(i){e.push(...i.hooks);for(const[e,a]of i.patches.entries())t.has(e)&&t.get(e)!==a&&c(`ModSDK: Mod '${r.name}' is patching function ${o.name} with same pattern that is already applied by different mod, but with different pattern:\\nPattern:\\n${e}\\nPatch1:\\n${t.get(e)||\"\"}\\nPatch2:\\n${a}`),t.set(e,a),n.add(r.name)}}e.sort(((o,e)=>e.priority-o.priority));const r=function(o,e){if(0===e.size)return o;let t=o.toString().replaceAll(\"\\r\\n\",\"\\n\");for(const[n,r]of e.entries())t.includes(n)||c(`ModSDK: Patching ${o.name}: Patch ${n} not applied`),t=t.replaceAll(n,r);return(0,eval)(`(${t})`)}(o.original,t);let i=function(e){var t,i;const a=null===(i=(t=m.errorReporterHooks).hookChainExit)||void 0===i?void 0:i.call(t,o.name,n),c=r.apply(this,e);return null==a||a(),c};for(let t=e.length-1;t>=0;t--){const n=e[t],r=i;i=function(e){var t,i;const a=null===(i=(t=m.errorReporterHooks).hookEnter)||void 0===i?void 0:i.call(t,o.name,n.mod),c=n.hook.apply(this,[e,o=>{if(1!==arguments.length||!Array.isArray(e))throw new Error(`Mod ${n.mod} failed to call next hook: Expected args to be array, got ${typeof o}`);return r.call(this,o)}]);return null==a||a(),c}}return{hooks:e,patches:t,patchesSources:n,enter:i,final:r}}function l(o,e=!1){let r=i.get(o);if(r)e&&(r.precomputed=s(r));else{let e=window;const a=o.split(\".\");for(let t=0;t<a.length-1;t++)if(e=e[a[t]],!n(e))throw new Error(`ModSDK: Function ${o} to be patched not found; ${a.slice(0,t+1).join(\".\")} is not object`);const c=e[a[a.length-1]];if(\"function\"!=typeof c)throw new Error(`ModSDK: Function ${o} to be patched not found`);const l=function(o){let e=-1;for(const n of t.encode(o)){let o=255&(e^n);for(let e=0;e<8;e++)o=1&o?-306674912^o>>>1:o>>>1;e=e>>>8^o}return((-1^e)>>>0).toString(16).padStart(8,\"0\").toUpperCase()}(c.toString().replaceAll(\"\\r\\n\",\"\\n\")),d={name:o,original:c,originalHash:l};r=Object.assign(Object.assign({},d),{precomputed:s(d),router:()=>{},context:e,contextProperty:a[a.length-1]}),r.router=function(o){return function(...e){return o.precomputed.enter.apply(this,[e])}}(r),i.set(o,r),e[r.contextProperty]=r.router}return r}function d(){for(const o of i.values())o.precomputed=s(o)}function p(){const o=new Map;for(const[e,t]of i)o.set(e,{name:e,original:t.original,originalHash:t.originalHash,sdkEntrypoint:t.router,currentEntrypoint:t.context[t.contextProperty],hookedByMods:r(t.precomputed.hooks.map((o=>o.mod))),patchedByMods:Array.from(t.precomputed.patchesSources)});return o}const f=new Map;function u(o){f.get(o.name)!==o&&e(`Failed to unload mod '${o.name}': Not registered`),f.delete(o.name),o.loaded=!1,d()}function g(o,t){o&&\"object\"==typeof o||e(\"Failed to register mod: Expected info object, got \"+typeof o),\"string\"==typeof o.name&&o.name||e(\"Failed to register mod: Expected name to be non-empty string, got \"+typeof o.name);let r=`'${o.name}'`;\"string\"==typeof o.fullName&&o.fullName||e(`Failed to register mod ${r}: Expected fullName to be non-empty string, got ${typeof o.fullName}`),r=`'${o.fullName} (${o.name})'`,\"string\"!=typeof o.version&&e(`Failed to register mod ${r}: Expected version to be string, got ${typeof o.version}`),o.repository||(o.repository=void 0),void 0!==o.repository&&\"string\"!=typeof o.repository&&e(`Failed to register mod ${r}: Expected repository to be undefined or string, got ${typeof o.version}`),null==t&&(t={}),t&&\"object\"==typeof t||e(`Failed to register mod ${r}: Expected options to be undefined or object, got ${typeof t}`);const i=!0===t.allowReplace,a=f.get(o.name);a&&(a.allowReplace&&i||e(`Refusing to load mod ${r}: it is already loaded and doesn't allow being replaced.\\nWas the mod loaded multiple times?`),u(a));const c=o=>{let e=g.patching.get(o.name);return e||(e={hooks:[],patches:new Map},g.patching.set(o.name,e)),e},s=(o,t)=>(...n)=>{var i,a;const c=null===(a=(i=m.errorReporterHooks).apiEndpointEnter)||void 0===a?void 0:a.call(i,o,g.name);g.loaded||e(`Mod ${r} attempted to call SDK function after being unloaded`);const s=t(...n);return null==c||c(),s},p={unload:s(\"unload\",(()=>u(g))),hookFunction:s(\"hookFunction\",((o,t,n)=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to patch a function: Expected function name string, got ${typeof o}`);const i=l(o),a=c(i);\"number\"!=typeof t&&e(`Mod ${r} failed to hook function '${o}': Expected priority number, got ${typeof t}`),\"function\"!=typeof n&&e(`Mod ${r} failed to hook function '${o}': Expected hook function, got ${typeof n}`);const s={mod:g.name,priority:t,hook:n};return a.hooks.push(s),d(),()=>{const o=a.hooks.indexOf(s);o>=0&&(a.hooks.splice(o,1),d())}})),patchFunction:s(\"patchFunction\",((o,t)=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to patch a function: Expected function name string, got ${typeof o}`);const i=l(o),a=c(i);n(t)||e(`Mod ${r} failed to patch function '${o}': Expected patches object, got ${typeof t}`);for(const[n,i]of Object.entries(t))\"string\"==typeof i?a.patches.set(n,i):null===i?a.patches.delete(n):e(`Mod ${r} failed to patch function '${o}': Invalid format of patch '${n}'`);d()})),removePatches:s(\"removePatches\",(o=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to patch a function: Expected function name string, got ${typeof o}`);const t=l(o);c(t).patches.clear(),d()})),callOriginal:s(\"callOriginal\",((o,t,n)=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to call a function: Expected function name string, got ${typeof o}`);const i=l(o);return Array.isArray(t)||e(`Mod ${r} failed to call a function: Expected args array, got ${typeof t}`),i.original.apply(null!=n?n:globalThis,t)})),getOriginalHash:s(\"getOriginalHash\",(o=>{\"string\"==typeof o&&o||e(`Mod ${r} failed to get hash: Expected function name string, got ${typeof o}`);return l(o).originalHash}))},g={name:o.name,fullName:o.fullName,version:o.version,repository:o.repository,allowReplace:i,api:p,loaded:!0,patching:new Map};return f.set(o.name,g),Object.freeze(p)}function h(){const o=[];for(const e of f.values())o.push({name:e.name,fullName:e.fullName,version:e.version,repository:e.repository});return o}let m;const y=void 0===window.bcModSdk?window.bcModSdk=function(){const e={version:o,apiVersion:1,registerMod:g,getModsInfo:h,getPatchingInfo:p,errorReporterHooks:Object.seal({apiEndpointEnter:null,hookEnter:null,hookChainExit:null})};return m=e,Object.freeze(e)}():(n(window.bcModSdk)||e(\"Failed to init Mod SDK: Name already in use\"),1!==window.bcModSdk.apiVersion&&e(`Failed to init Mod SDK: Different version already loaded ('1.2.0' vs '${window.bcModSdk.version}')`),window.bcModSdk.version!==o&&alert(`Mod SDK warning: Loading different but compatible versions ('1.2.0' vs '${window.bcModSdk.version}')\\nOne of mods you are using is using an old version of SDK. It will work for now but please inform author to update`),window.bcModSdk);return\"undefined\"!=typeof exports&&(Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.default=y),y}();\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/.pnpm/css-loader@7.1.2_webpack@5.97.1/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.deeplib-subscreen {\n --deeplib-background-color: var(--main, white);\n --deeplib-element-color: var(--element, white);\n --deeplib-element-hover-color: var(--accentHover, cyan);\n --deeplib-text-color: var(--text, black);\n --deeplib-icon-color: var(--accent, white);\n --deeplib-border-color: var(--accent, black);\n}\n\n/************/\n/* ELEMENTS */\n/************/\n\n.deeplib-text {\n color: var(--deeplib-text-color);\n}\n\n.deeplib-subscreen {\n padding: 0;\n margin: 0;\n}\n\n.deeplib-subscreen * {\n box-sizing: border-box;\n}\n\n.deeplib-settings {\n display: flex;\n flex-direction: column;\n padding: min(1.0dvh, 0.5dvw);\n gap: 0.3em;\n overflow-y: auto;\n}\n\n.deeplib-misc {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column-reverse;\n}\n\n.deeplib-button.button-styling {\n border-radius: min(1.0dvh, 0.5dvw);\n color: var(--deeplib-text-color);\n}\n\n.deeplib-button.button-styling img {\n position: absolute;\n top: 0%;\n left: 0%;\n width: 100%;\n height: 100%;\n background-position: left;\n background-color: var(--deeplib-icon-color);\n background-blend-mode: multiply;\n background-size: contain;\n mask-position: left;\n mask-size: contain;\n background-repeat: no-repeat;\n mask-repeat: no-repeat;\n color: transparent;\n\n background-image: var(--image);\n mask-image: var(--image);\n}\n\n.deeplib-button.button-styling .button-label {\n width: 100%;\n background-color: transparent;\n color: var(--deeplib-text-color);\n font-size: min(3.6dvh, 1.8dvw);\n}\n\n#deeplib-subscreen-title {\n text-align: center;\n color: var(--deeplib-text-color);\n}\n\n#deeplib-reset-button {\n background-color: indianred;\n}\n\n#deeplib-wiki-button {\n background-color: #BDA203;\n}\n\n#deeplib-support-button {\n background-color: #5e4969;\n}\n\n.deeplib-checkbox-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.3em;\n}\n\n.deeplib-input {\n border-radius: min(1.0dvh, 0.5dvw);\n}\n\n.deeplib-input-container {\n position: relative;\n margin-top: min(1vh, 0.5vw);\n}\n\n.deeplib-input-container input.deeplib-input {\n font-size: 20px;\n width: 100%;\n padding: 5px 0;\n background-color: transparent;\n outline: none;\n padding-left: min(1vh, 0.5vw);\n padding-right: min(1vh, 0.5vw);\n}\n\n.deeplib-input-container label.deeplib-text {\n position: absolute;\n top: min(0.6vh, 0.3vw);\n left: min(0.6vh, 0.3vw);\n transition: all 0.3s ease;\n pointer-events: none;\n}\n\n.deeplib-input-container input.deeplib-input:focus~label,\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~label {\n font-size: 0.7em;\n transform: translate(20%, -70%);\n background-color: var(--deeplib-background-color);\n padding: 0px min(1vh, 0.5vw);\n}\n\n.deeplib-input-container .deeplib-underline {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 2px;\n width: 100%;\n background-color: var(--deeplib-element-hover-color);\n transform: scaleX(0);\n transition: all 0.3s ease;\n}\n\n.deeplib-input-container input.deeplib-input:focus~.deeplib-underline,\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~.deeplib-underline {\n transform: scaleX(0.98);\n}\n\n.deeplib-tooltip {\n background-color: var(--deeplib-element-color);\n color: var(--deeplib-text-color);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: min(1.0dvh, 0.5dvw);\n padding: min(1vh, 0.5vw);\n font-size: 0.8em;\n border: min(0.2vh, 0.1vw) solid var(--deeplib-border-color);\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type=number] {\n appearance: textfield;\n -moz-appearance: textfield;\n}\n\n/*************/\n/* MESSAGES */\n/*************/\n\n.deeplib-highlight-text {\n font-weight: bold;\n color: rgb(203, 185, 23);\n}\n\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message,\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message {\n background-color: var(--deeplib-element-color);\n border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);\n color: var(--deeplib-text-color);\n}\n\n#TextAreaChatLog div.ChatMessage.deeplib-message {\n background-color: #eee;\n border: min(0.2dvh, 0.1dvw) solid #440171;\n color: #111;\n padding-left: min(0.6dvh, 0.3dvw);\n display: block;\n white-space: normal;\n}\n\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message a,\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message a {\n color: var(--deeplib-text-color);\n}\n\n#TextAreaChatLog div.ChatMessage.deeplib-message a {\n cursor: pointer;\n font-weight: bold;\n color: #111;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./public/styles/DeepLib.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,8CAA8C;EAC9C,8CAA8C;EAC9C,uDAAuD;EACvD,wCAAwC;EACxC,0CAA0C;EAC1C,4CAA4C;AAC9C;;AAEA,aAAa;AACb,aAAa;AACb,aAAa;;AAEb;EACE,gCAAgC;AAClC;;AAEA;EACE,UAAU;EACV,SAAS;AACX;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,4BAA4B;EAC5B,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,8BAA8B;AAChC;;AAEA;EACE,kCAAkC;EAClC,gCAAgC;AAClC;;AAEA;EACE,kBAAkB;EAClB,OAAO;EACP,QAAQ;EACR,WAAW;EACX,YAAY;EACZ,yBAAyB;EACzB,2CAA2C;EAC3C,+BAA+B;EAC/B,wBAAwB;EACxB,mBAAmB;EACnB,kBAAkB;EAClB,4BAA4B;EAC5B,sBAAsB;EACtB,kBAAkB;;EAElB,8BAA8B;EAC9B,wBAAwB;AAC1B;;AAEA;EACE,WAAW;EACX,6BAA6B;EAC7B,gCAAgC;EAChC,8BAA8B;AAChC;;AAEA;EACE,kBAAkB;EAClB,gCAAgC;AAClC;;AAEA;EACE,2BAA2B;AAC7B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,UAAU;AACZ;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,kBAAkB;EAClB,2BAA2B;AAC7B;;AAEA;EACE,eAAe;EACf,WAAW;EACX,cAAc;EACd,6BAA6B;EAC7B,aAAa;EACb,6BAA6B;EAC7B,8BAA8B;AAChC;;AAEA;EACE,kBAAkB;EAClB,sBAAsB;EACtB,uBAAuB;EACvB,yBAAyB;EACzB,oBAAoB;AACtB;;AAEA;;EAEE,gBAAgB;EAChB,+BAA+B;EAC/B,iDAAiD;EACjD,4BAA4B;AAC9B;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,WAAW;EACX,WAAW;EACX,oDAAoD;EACpD,oBAAoB;EACpB,yBAAyB;AAC3B;;AAEA;;EAEE,uBAAuB;AACzB;;AAEA;EACE,8CAA8C;EAC9C,gCAAgC;EAChC,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,kCAAkC;EAClC,wBAAwB;EACxB,gBAAgB;EAChB,2DAA2D;AAC7D;;AAEA;;EAEE,wBAAwB;EACxB,SAAS;AACX;;AAEA;EACE,qBAAqB;EACrB,0BAA0B;AAC5B;;AAEA,cAAc;AACd,aAAa;AACb,cAAc;;AAEd;EACE,iBAAiB;EACjB,wBAAwB;AAC1B;;AAEA;;EAEE,8CAA8C;EAC9C,6DAA6D;EAC7D,gCAAgC;AAClC;;AAEA;EACE,sBAAsB;EACtB,yCAAyC;EACzC,WAAW;EACX,iCAAiC;EACjC,cAAc;EACd,mBAAmB;AACrB;;AAEA;;EAEE,gCAAgC;AAClC;;AAEA;EACE,eAAe;EACf,iBAAiB;EACjB,WAAW;AACb\",\"sourcesContent\":[\".deeplib-subscreen {\\n --deeplib-background-color: var(--main, white);\\n --deeplib-element-color: var(--element, white);\\n --deeplib-element-hover-color: var(--accentHover, cyan);\\n --deeplib-text-color: var(--text, black);\\n --deeplib-icon-color: var(--accent, white);\\n --deeplib-border-color: var(--accent, black);\\n}\\n\\n/************/\\n/* ELEMENTS */\\n/************/\\n\\n.deeplib-text {\\n color: var(--deeplib-text-color);\\n}\\n\\n.deeplib-subscreen {\\n padding: 0;\\n margin: 0;\\n}\\n\\n.deeplib-subscreen * {\\n box-sizing: border-box;\\n}\\n\\n.deeplib-settings {\\n display: flex;\\n flex-direction: column;\\n padding: min(1.0dvh, 0.5dvw);\\n gap: 0.3em;\\n overflow-y: auto;\\n}\\n\\n.deeplib-misc {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n flex-direction: column-reverse;\\n}\\n\\n.deeplib-button.button-styling {\\n border-radius: min(1.0dvh, 0.5dvw);\\n color: var(--deeplib-text-color);\\n}\\n\\n.deeplib-button.button-styling img {\\n position: absolute;\\n top: 0%;\\n left: 0%;\\n width: 100%;\\n height: 100%;\\n background-position: left;\\n background-color: var(--deeplib-icon-color);\\n background-blend-mode: multiply;\\n background-size: contain;\\n mask-position: left;\\n mask-size: contain;\\n background-repeat: no-repeat;\\n mask-repeat: no-repeat;\\n color: transparent;\\n\\n background-image: var(--image);\\n mask-image: var(--image);\\n}\\n\\n.deeplib-button.button-styling .button-label {\\n width: 100%;\\n background-color: transparent;\\n color: var(--deeplib-text-color);\\n font-size: min(3.6dvh, 1.8dvw);\\n}\\n\\n#deeplib-subscreen-title {\\n text-align: center;\\n color: var(--deeplib-text-color);\\n}\\n\\n#deeplib-reset-button {\\n background-color: indianred;\\n}\\n\\n#deeplib-wiki-button {\\n background-color: #BDA203;\\n}\\n\\n#deeplib-support-button {\\n background-color: #5e4969;\\n}\\n\\n.deeplib-checkbox-container {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: 0.3em;\\n}\\n\\n.deeplib-input {\\n border-radius: min(1.0dvh, 0.5dvw);\\n}\\n\\n.deeplib-input-container {\\n position: relative;\\n margin-top: min(1vh, 0.5vw);\\n}\\n\\n.deeplib-input-container input.deeplib-input {\\n font-size: 20px;\\n width: 100%;\\n padding: 5px 0;\\n background-color: transparent;\\n outline: none;\\n padding-left: min(1vh, 0.5vw);\\n padding-right: min(1vh, 0.5vw);\\n}\\n\\n.deeplib-input-container label.deeplib-text {\\n position: absolute;\\n top: min(0.6vh, 0.3vw);\\n left: min(0.6vh, 0.3vw);\\n transition: all 0.3s ease;\\n pointer-events: none;\\n}\\n\\n.deeplib-input-container input.deeplib-input:focus~label,\\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~label {\\n font-size: 0.7em;\\n transform: translate(20%, -70%);\\n background-color: var(--deeplib-background-color);\\n padding: 0px min(1vh, 0.5vw);\\n}\\n\\n.deeplib-input-container .deeplib-underline {\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n height: 2px;\\n width: 100%;\\n background-color: var(--deeplib-element-hover-color);\\n transform: scaleX(0);\\n transition: all 0.3s ease;\\n}\\n\\n.deeplib-input-container input.deeplib-input:focus~.deeplib-underline,\\n.deeplib-input-container input.deeplib-input:not(:placeholder-shown)~.deeplib-underline {\\n transform: scaleX(0.98);\\n}\\n\\n.deeplib-tooltip {\\n background-color: var(--deeplib-element-color);\\n color: var(--deeplib-text-color);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n border-radius: min(1.0dvh, 0.5dvw);\\n padding: min(1vh, 0.5vw);\\n font-size: 0.8em;\\n border: min(0.2vh, 0.1vw) solid var(--deeplib-border-color);\\n}\\n\\ninput::-webkit-outer-spin-button,\\ninput::-webkit-inner-spin-button {\\n -webkit-appearance: none;\\n margin: 0;\\n}\\n\\ninput[type=number] {\\n appearance: textfield;\\n -moz-appearance: textfield;\\n}\\n\\n/*************/\\n/* MESSAGES */\\n/*************/\\n\\n.deeplib-highlight-text {\\n font-weight: bold;\\n color: rgb(203, 185, 23);\\n}\\n\\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message,\\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message {\\n background-color: var(--deeplib-element-color);\\n border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);\\n color: var(--deeplib-text-color);\\n}\\n\\n#TextAreaChatLog div.ChatMessage.deeplib-message {\\n background-color: #eee;\\n border: min(0.2dvh, 0.1dvw) solid #440171;\\n color: #111;\\n padding-left: min(0.6dvh, 0.3dvw);\\n display: block;\\n white-space: normal;\\n}\\n\\n#TextAreaChatLog[data-colortheme='dark'] div.ChatMessage.deeplib-message a,\\n#TextAreaChatLog[data-colortheme='dark2'] div.ChatMessage.deeplib-message a {\\n color: var(--deeplib-text-color);\\n}\\n\\n#TextAreaChatLog div.ChatMessage.deeplib-message a {\\n cursor: pointer;\\n font-weight: bold;\\n color: #111;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { PlayerStorage, bcSdkMod } from '../DeepLib';\nexport class BaseModule {\n get settingsScreen() {\n return null;\n }\n get settingsStorage() {\n return this.constructor.name;\n }\n get settings() {\n const modName = bcSdkMod.ModInfo.name;\n if (!this.settingsStorage)\n return {};\n if (!PlayerStorage()) {\n Player[modName] = {};\n this.registerDefaultSettings();\n }\n else if (!PlayerStorage()[this.settingsStorage])\n this.registerDefaultSettings();\n return PlayerStorage()[this.settingsStorage];\n }\n init() {\n this.registerDefaultSettings();\n }\n registerDefaultSettings() {\n const storage = this.settingsStorage;\n const defaults = this.defaultSettings;\n if (!storage || !defaults)\n return;\n Player[bcSdkMod.ModInfo.name][storage] = Object.assign(defaults, Player[bcSdkMod.ModInfo.name][storage] ?? {});\n }\n get defaultSettings() {\n return null;\n }\n load() { }\n run() { }\n unload() { }\n}\n","import { SupportHelper, bcSdkMod, dataStore, elementAdjustFontSize, elementAppendToSettingsDiv, elementAppendToSubscreenDiv, elementCreateButton, elementCreateCheckbox, elementCreateInput, elementCreateLabel, elementCreateSettingsDiv, elementCreateSubscreenDiv, elementCreateTooltip, elementGetSettingsDiv, elementGetSubscreenDiv, elementGetTooltip, elementHide, elementRemoveSubscreenDiv, elementSetPosSizeFont, elementSetPosition, elementSetSize, getText, modules, setSubscreen } from '../DeepLib';\nexport class BaseSubscreen {\n static currentElements = [];\n static currentPage = 1;\n module;\n constructor(module) {\n if (module)\n this.module = module;\n }\n get name() {\n return 'UNKNOWN';\n }\n get icon() {\n return '';\n }\n get subscreenName() {\n return this.constructor.name;\n }\n setSubscreen(screen) {\n return setSubscreen(screen);\n }\n get settings() {\n return this.module.settings;\n }\n get pageStructure() {\n return [[]];\n }\n get currentPage() {\n return this.pageStructure[Math.min(PreferencePageCurrent - 1, this.pageStructure.length - 1)];\n }\n hideElements() {\n this.pageStructure.forEach((item, ix) => {\n if (ix != PreferencePageCurrent - 1) {\n item.forEach((setting) => {\n elementHide({ elementId: setting.id });\n });\n }\n });\n }\n load() {\n for (const module of modules()) {\n if (!module.settingsScreen)\n continue;\n if (!module.settings || !Object.keys(module.settings).length)\n module.registerDefaultSettings();\n }\n elementCreateSubscreenDiv();\n const settingsElement = elementCreateSettingsDiv();\n elementAppendToSubscreenDiv(settingsElement);\n const subscreenTitle = elementCreateLabel({\n type: 'label',\n id: 'deeplib-subscreen-title',\n label: getText('mainmenu.title').replace('$ModVersion', bcSdkMod.ModInfo.version) + ' ' + SupportHelper.getSupporter(),\n });\n elementAppendToSubscreenDiv(subscreenTitle);\n if (this.name !== 'mainmenu') {\n const exitButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-exit',\n position: [1815, 75],\n size: [90, 90],\n image: 'Icons/Exit.png',\n onClick: () => {\n setSubscreen('mainmenu');\n },\n tooltip: getText('settings.button.back_button_hint')\n });\n elementAppendToSubscreenDiv(exitButton);\n }\n const tooltip = elementCreateTooltip();\n elementAppendToSubscreenDiv(tooltip);\n this.pageStructure.forEach((s) => s.forEach((item) => {\n let element;\n switch (item.type) {\n case 'text':\n case 'number':\n element = elementCreateInput(item);\n break;\n case 'checkbox':\n element = elementCreateCheckbox(item);\n break;\n case 'button':\n element = elementCreateButton(item);\n break;\n case 'label':\n element = elementCreateLabel(item);\n break;\n }\n elementAppendToSettingsDiv(element);\n }));\n CharacterAppearanceForceUpCharacter = Player.MemberNumber ?? -1;\n }\n run() {\n const newTitle = getText('mainmenu.title').replace('$ModVersion', bcSdkMod.ModInfo.version) + ' ' + SupportHelper.getSupporter();\n const oldTitle = ElementContent('deeplib-subscreen-title');\n if (newTitle !== oldTitle) {\n ElementContent('deeplib-subscreen-title', newTitle);\n }\n DrawCharacter(Player, 50, 50, 0.9, false);\n if (this.pageStructure.length > 1) {\n MainCanvas.textAlign = 'center';\n PreferencePageChangeDraw(1595, 75, this.pageStructure.length);\n MainCanvas.textAlign = 'left';\n }\n this.hideElements();\n }\n click() {\n if (this.pageStructure.length > 1)\n PreferencePageChangeClick(1595, 75, this.pageStructure.length);\n }\n exit() {\n CharacterAppearanceForceUpCharacter = -1;\n CharacterLoadCanvas(Player);\n setSubscreen('mainmenu');\n dataStore();\n }\n resize(onLoad = false) {\n elementSetPosSizeFont({ element: elementGetSubscreenDiv() }, 0, 0, 2000, 1000);\n if (this.name === 'mainmenu') {\n elementSetPosSizeFont({ element: elementGetSettingsDiv() }, 530, 170, 800, 660);\n }\n else {\n elementSetPosSizeFont({ element: elementGetSettingsDiv() }, 530, 170, 1000, 660);\n }\n elementSetPosSizeFont({ elementId: 'deeplib-subscreen-title' }, 530, 75, 800, 60);\n elementSetPosition({ element: elementGetTooltip() }, 250, 850);\n elementSetSize({ element: elementGetTooltip() }, 1500, 60);\n BaseSubscreen.currentElements.forEach((item) => {\n const options = item[1];\n const elementDataAttrs = item[0].dataset;\n if (options.position || elementDataAttrs.position) {\n const position = elementDataAttrs?.position?.split('x');\n const xPos = options?.position?.[0] || parseInt(position?.[0] || 0);\n const yPos = options?.position?.[1] || parseInt(position?.[1] || 0);\n elementSetPosition({ elementId: options.id }, xPos, yPos);\n }\n if (options.size || elementDataAttrs.size) {\n const size = elementDataAttrs?.size?.split('x');\n const width = options?.size?.[0] || parseInt(size?.[0] || 0);\n const height = options?.size?.[1] || parseInt(size?.[1] || 0);\n elementSetSize({ elementId: options.id }, width, height);\n }\n elementAdjustFontSize({ elementId: options.id });\n });\n }\n unload() {\n this.pageStructure.forEach((s) => s.forEach((item) => {\n switch (item.type) {\n case 'text':\n item.setSettingValue(ElementValue(item.id));\n break;\n case 'checkbox': {\n const elem = document.getElementById(item.id);\n const checked = elem.checked;\n item.setSettingValue(checked);\n break;\n }\n }\n }));\n BaseSubscreen.currentElements = [];\n elementRemoveSubscreenDiv();\n }\n}\n","import deeplib_style from '../../public/styles/DeepLib.css';\nimport { bcSdkMod, dataTake, deepLibLogger, Localization, modules, registerModule, Style, VersionModule } from '../DeepLib';\nexport function initMod(initFunction, modules, pathToTranslationsFolder) {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n deepLibLogger.debug(`Init wait for ${MOD_NAME}`);\n if (CurrentScreen == null || CurrentScreen === 'Login') {\n bcSdkMod.prototype.hookFunction('LoginResponse', 0, (args, next) => {\n deepLibLogger.debug(`Init for ${MOD_NAME}! LoginResponse caught: `, args);\n next(args);\n const response = args[0];\n if (response === 'InvalidNamePassword')\n return next(args);\n if (response && typeof response.Name === 'string' && typeof response.AccountName === 'string') {\n init(initFunction, modules, pathToTranslationsFolder);\n }\n });\n }\n else {\n deepLibLogger.debug(`Already logged in, initing ${MOD_NAME}`);\n init(initFunction, modules, pathToTranslationsFolder);\n }\n}\nexport async function init(initFunction, modules, pathToTranslationsFolder) {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n const MOD_VERSION = bcSdkMod.ModInfo.version;\n if (window[MOD_NAME + 'Loaded'])\n return;\n dataTake();\n Style.inject('deeplib-style', deeplib_style);\n new Localization({ pathToTranslationsFolder: pathToTranslationsFolder });\n await Localization.init();\n if (!initModules(modules)) {\n unloadMod();\n return;\n }\n await initFunction();\n VersionModule.checkVersionUpdate();\n VersionModule.checkVersionMigration();\n window[MOD_NAME + 'Loaded'] = true;\n deepLibLogger.log(`Loaded ${MOD_NAME}! Version: ${MOD_VERSION}`);\n}\nfunction initModules(modulesToRegister) {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n for (const module of modulesToRegister) {\n registerModule(module);\n }\n for (const module of modules()) {\n module.init();\n }\n for (const module of modules()) {\n module.load();\n }\n for (const module of modules()) {\n module.run();\n }\n deepLibLogger.debug(`Modules Loaded for ${MOD_NAME}.`);\n return true;\n}\nexport function unloadMod() {\n const MOD_NAME = bcSdkMod.ModInfo.name;\n unloadModules();\n delete window[MOD_NAME + 'Loaded'];\n deepLibLogger.debug(`Unloaded ${MOD_NAME}.`);\n return true;\n}\nfunction unloadModules() {\n for (const module of modules()) {\n module.unload();\n }\n}\n","export const modulesMap = new Map();\nexport function modules() {\n return [...modulesMap.values()];\n}\nexport function registerModule(module) {\n modulesMap.set(module.constructor.name, module);\n return module;\n}\nexport function getModule(moduleType) {\n return modulesMap.get(moduleType);\n}\n","import { GUI } from '../DeepLib';\nexport function getCurrentSubscreen() {\n return GUI.instance && GUI.instance.currentSubscreen;\n}\nexport function setSubscreen(subscreen) {\n if (!GUI.instance) {\n throw new Error('Attempt to set subscreen before init');\n }\n GUI.instance.currentSubscreen = subscreen;\n return GUI.instance.currentSubscreen;\n}\n","import { BaseModule, MainMenu, modules, setSubscreen } from '../DeepLib';\nexport class GUI extends BaseModule {\n static instance = null;\n _subscreens;\n _mainMenu;\n _currentSubscreen = null;\n _modButtonOptions;\n get subscreens() {\n return this._subscreens;\n }\n get mainMenu() {\n return this._mainMenu;\n }\n get currentSubscreen() {\n return this._currentSubscreen;\n }\n set currentSubscreen(subscreen) {\n if (this._currentSubscreen) {\n this._currentSubscreen.unload();\n }\n if (typeof subscreen === 'string') {\n const scr = this._subscreens?.find((s) => s.name === subscreen);\n if (!scr)\n throw `Failed to find screen name ${subscreen}`;\n this._currentSubscreen = scr;\n }\n else {\n this._currentSubscreen = subscreen;\n }\n PreferenceMessage = '';\n PreferencePageCurrent = 1;\n if (this._currentSubscreen) {\n this._currentSubscreen.load();\n this._currentSubscreen.resize(true);\n }\n }\n constructor(modButtonOptions) {\n super();\n if (GUI.instance) {\n throw new Error('Duplicate initialization');\n }\n for (const module of modules()) {\n if (!module.settingsScreen)\n continue;\n }\n this._mainMenu = new MainMenu(this);\n this._subscreens = [this._mainMenu];\n this._modButtonOptions = modButtonOptions;\n GUI.instance = this;\n }\n get defaultSettings() {\n return null;\n }\n load() {\n for (const module of modules()) {\n if (!module.settingsScreen)\n continue;\n this._subscreens.push(new module.settingsScreen(module));\n }\n this._mainMenu.subscreens = this._subscreens;\n PreferenceRegisterExtensionSetting({\n Identifier: this._modButtonOptions.Identifier,\n ButtonText: this._modButtonOptions.ButtonText,\n Image: this._modButtonOptions.Image,\n load: this._modButtonOptions.load || (() => {\n setSubscreen(new MainMenu(this));\n }),\n run: this._modButtonOptions.run || (() => {\n if (this._currentSubscreen) {\n MainCanvas.textAlign = 'left';\n this._currentSubscreen.run();\n MainCanvas.textAlign = 'center';\n const newCanvasPosition = [MainCanvas.canvas.offsetLeft, MainCanvas.canvas.offsetTop, MainCanvas.canvas.clientWidth, MainCanvas.canvas.clientHeight];\n if (!CommonArraysEqual(newCanvasPosition, DrawCanvasPosition)) {\n DrawCanvasPosition = newCanvasPosition;\n this._currentSubscreen.resize(false);\n }\n }\n }),\n click: this._modButtonOptions.click || (() => {\n if (this._currentSubscreen) {\n this._currentSubscreen.click();\n }\n }),\n exit: this._modButtonOptions.exit || (() => {\n if (this._currentSubscreen) {\n this._currentSubscreen.exit();\n }\n }),\n unload: this._modButtonOptions.unload || (() => {\n if (this._currentSubscreen) {\n this._currentSubscreen.unload();\n }\n })\n });\n }\n}\n","import { BaseModule, HookPriority, PlayerStorage, bcSdkMod, dataStore, deepLibLogger, sendLocalMessage } from '../DeepLib';\nexport class VersionModule extends BaseModule {\n static isItNewVersion = false;\n static Version;\n static NewVersionMessage = '';\n static Migrators = [];\n load() {\n VersionModule.Version = bcSdkMod.ModInfo.version;\n bcSdkMod.prototype.hookFunction('ChatRoomSync', HookPriority.Observe, (args, next) => {\n next(args);\n if (PlayerStorage().GlobalModule.doShowNewVersionMessage && VersionModule.isItNewVersion) {\n VersionModule.sendNewVersionMessage();\n }\n }, 999);\n }\n static checkVersionUpdate() {\n const PreviousVersion = VersionModule.loadVersion();\n const CurrentVersion = VersionModule.Version;\n if (VersionModule.isNewVersion(PreviousVersion, CurrentVersion)) {\n VersionModule.isItNewVersion = true;\n VersionModule.saveVersion();\n }\n }\n static checkVersionMigration() {\n const PreviousVersion = VersionModule.loadVersion();\n let saveRequired = false;\n for (const migrator of VersionModule.Migrators) {\n if (VersionModule.isNewVersion(PreviousVersion, migrator.MigrationVersion)) {\n saveRequired = saveRequired || migrator.Migrate();\n deepLibLogger.info(`Migrating ${bcSdkMod.ModInfo.name} from ${PreviousVersion} to ${migrator.MigrationVersion} with ${migrator.constructor.name}`);\n }\n }\n if (saveRequired) {\n dataStore();\n }\n }\n static registerMigrator(migrator) {\n VersionModule.Migrators.push(migrator);\n }\n static setNewVersionMessage(newVersionMessage) {\n VersionModule.NewVersionMessage = newVersionMessage;\n }\n static sendNewVersionMessage() {\n sendLocalMessage('deeplib-new-version', VersionModule.NewVersionMessage);\n }\n static isNewVersion(current, candidate) {\n if (current !== undefined) {\n const CURRENT_ = current.split('.'), CANDIDATE_ = candidate.split('.');\n for (let i = 0; i < 3; i++) {\n if (CURRENT_[i] === CANDIDATE_[i]) {\n continue;\n }\n return CANDIDATE_[i] > CURRENT_[i];\n }\n }\n if (current === undefined || current === '' || !current) {\n return true;\n }\n return false;\n }\n static saveVersion() {\n if (PlayerStorage()) {\n Player[bcSdkMod.ModInfo.name].Version = VersionModule.Version;\n }\n }\n static loadVersion() {\n return PlayerStorage()?.Version;\n }\n}\n","import { BaseSubscreen, deepLibLogger } from '../DeepLib';\nexport class GuiDebug extends BaseSubscreen {\n get name() {\n return 'debug';\n }\n get pageStructure() {\n return [[\n {\n type: 'button',\n roundness: 50,\n id: 'test-deeplib-big-button',\n size: [405, 80],\n label: 'Big Button',\n tooltip: 'This is a big button',\n image: 'Icons/Exit.png',\n onClick() {\n deepLibLogger.info('Big Button Clicked');\n }\n },\n {\n type: 'button',\n roundness: 5,\n id: 'test-deeplib-small-button',\n size: [90, 90],\n tooltip: 'This is a small button',\n image: 'Icons/Exit.png',\n onClick() {\n deepLibLogger.info('Small Button Clicked');\n }\n },\n {\n type: 'checkbox',\n id: 'test-deeplib-checkbox',\n label: 'Checkbox',\n description: 'This is a checkbox',\n checked: false,\n getSettingValue() {\n return true;\n },\n setSettingValue(val) {\n deepLibLogger.info('Checkbox value:', val);\n },\n },\n {\n type: 'text',\n id: 'test-deeplib-text-input',\n label: 'Input',\n description: 'This is a text input',\n getElementValue() {\n return 'Input Value';\n },\n setSettingValue(val) {\n deepLibLogger.info('Input value:', val);\n },\n },\n {\n type: 'number',\n id: 'test-deeplib-number-input',\n label: 'Input',\n description: 'This is a number input',\n getElementValue() {\n return '123';\n },\n setSettingValue(val) {\n deepLibLogger.info('Input value:', val);\n },\n },\n {\n type: 'label',\n id: 'test-deeplib-label',\n label: 'Label',\n description: 'This is a label',\n }\n ]];\n }\n load() {\n super.load();\n }\n run() {\n super.run();\n }\n click() { }\n exit() {\n super.exit();\n }\n resize() {\n super.resize();\n }\n}\n","import { BaseSubscreen, GUI, GuiDebug, GuiSupport, elementAppendToMiscDiv, elementAppendToSettingsDiv, elementAppendToSubscreenDiv, elementCreateButton, elementCreateMiscDiv, elementSetPosSizeFont, getText } from '../DeepLib';\nexport class MainMenu extends BaseSubscreen {\n subscreens = [];\n static wikiLink = '';\n static resetSubscreen = null;\n get name() {\n return 'mainmenu';\n }\n constructor(module) {\n super(module);\n this.subscreens = module.subscreens;\n }\n load() {\n if (!GUI.instance?.currentSubscreen) {\n this.setSubscreen(this);\n return;\n }\n super.load();\n const exitButton = elementCreateButton({\n type: 'button',\n id: 'exit',\n position: [1815, 75],\n size: [90, 90],\n image: 'Icons/Exit.png',\n onClick: () => {\n this.exit();\n },\n tooltip: getText('settings.button.back_button_hint')\n });\n elementAppendToSubscreenDiv(exitButton);\n for (const screen of this.subscreens) {\n if (screen.name == 'mainmenu')\n continue;\n const button = elementCreateButton({\n type: 'button',\n id: `${screen.name}-button`,\n image: screen.icon,\n label: getText(`mainmenu.button.${screen.name}`),\n onClick: () => {\n this.setSubscreen(screen);\n },\n size: [450, 90],\n });\n elementAppendToSettingsDiv(button);\n }\n const miscDiv = elementCreateMiscDiv();\n elementAppendToSubscreenDiv(miscDiv);\n if (MainMenu.resetSubscreen) {\n const resetButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-reset-button',\n image: 'Icons/ServiceBell.png',\n label: 'Reset',\n onClick: () => {\n this.setSubscreen(MainMenu.resetSubscreen);\n },\n size: [405, 80],\n });\n elementAppendToMiscDiv(resetButton);\n }\n if (MainMenu.wikiLink) {\n const wikiButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-wiki-button',\n image: 'Icons/Introduction.png',\n label: 'Wiki',\n onClick: () => {\n window.open(MainMenu.wikiLink, '_blank');\n },\n size: [405, 80],\n });\n elementAppendToMiscDiv(wikiButton);\n }\n const supportButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-support-button',\n image: 'Assets/Female3DCG/Emoticon/Coffee/Icon.png',\n label: 'Support',\n onClick: () => {\n this.setSubscreen(new GuiSupport());\n },\n size: [405, 80],\n });\n elementAppendToMiscDiv(supportButton);\n elementSetPosSizeFont({ elementId: 'deeplib-misc' }, 1500, 670, 405, 260);\n const debugButton = elementCreateButton({\n type: 'button',\n id: 'deeplib-debug-button',\n image: 'Assets/Female3DCG/Emoticon/Coffee/Icon.png',\n onClick: () => {\n this.setSubscreen(new GuiDebug());\n },\n size: [90, 90],\n position: [75, 75],\n });\n elementAppendToMiscDiv(debugButton);\n }\n run() {\n super.run();\n }\n click() { }\n exit() {\n CharacterAppearanceForceUpCharacter = -1;\n CharacterLoadCanvas(Player);\n this.setSubscreen(null);\n PreferenceSubscreenExtensionsClear();\n }\n resize() {\n super.resize();\n elementSetPosSizeFont({ elementId: 'deeplib-misc' }, 1500, 670, 405, 260);\n }\n}\nexport function setMainMenuOptions(wikiLink, resetSubscreen) {\n MainMenu.wikiLink = wikiLink;\n MainMenu.resetSubscreen = resetSubscreen;\n}\n","import { BaseSubscreen, elementSetPosSizeFont, getText } from '../DeepLib';\nexport class SupportHelper {\n static thankYouList = ['Ellena', 'weboos', 'Jamie'];\n static thankYouNext = 0;\n static thankYou = '';\n static getSupporter() {\n if (SupportHelper.thankYouNext < CommonTime())\n SupportHelper.doNextThankYou();\n return `${getText('support.other.thankyou')}, ${SupportHelper.thankYou}`;\n }\n static doNextThankYou() {\n if (SupportHelper.thankYou && SupportHelper.thankYouList.length < 2)\n return;\n SupportHelper.thankYou = CommonRandomItemFromList(SupportHelper.thankYou, SupportHelper.thankYouList);\n SupportHelper.thankYouNext = CommonTime() + 5000;\n }\n}\nexport class GuiSupport extends BaseSubscreen {\n get name() {\n return 'Support';\n }\n get currentPage() {\n return [\n {\n type: 'button',\n id: 'deeplib-support-kofi',\n size: [405, 80],\n label: getText('support.button.ko-fi'),\n image: 'https://storage.ko-fi.com/cdn/nav-logo-stroke.png',\n onClick() {\n window.open('https://ko-fi.com/monikka_bc', '_blank');\n }\n },\n {\n type: 'button',\n id: 'deeplib-support-patreon',\n size: [405, 80],\n label: getText('support.button.patreon'),\n image: 'https://c5.patreon.com/external/favicon/rebrand/favicon-32.png?v=af5597c2ef',\n onClick() {\n window.open('https://patreon.com/monikka_bc', '_blank');\n }\n }\n ];\n }\n load() {\n SupportHelper.doNextThankYou();\n super.load();\n ElementRemove('deeplib-settngs');\n ElementCreateDiv('deeplib-gratitude');\n const elm = document.getElementById('deeplib-gratitude');\n ElementContent('deeplib-gratitude', gratitudeHtml);\n elementSetPosSizeFont({ element: elm }, 1000, 250, 400, 400);\n }\n run() {\n super.run();\n }\n click() {\n super.click();\n }\n exit() {\n ElementRemove('deeplib-gratitude');\n super.exit();\n }\n resize() {\n super.resize();\n elementSetPosSizeFont({ elementId: 'deeplib-gratitude' }, 1000, 250, 400, 400);\n }\n}\nconst gratitudeHtml = `\n<h1>Dear Supporters!</h1>\n<p>\n I want to take a moment to express my heartfelt gratitude for considering supporting me. Your willingness to stand by\n my side in this creative journey means the world to me, and I am truly humbled by your generosity.\n</p>\n<p>\n Your support goes far beyond the financial contributions; it represents belief in my work and a shared passion for\n what I do. Your encouragement inspires me to continue developing.\n</p>\n<p>\n Your support not only helps me sustain and grow as a developer, but also enables me to dedicate more time and\n resources to producing high-quality mods. It allows me to explore new ideas, enhance my skills, and bring even more\n meaningful and enjoyable content to you.\n</p>\n<p>Thank you all~</p>\n<p>With love, Monikka♥</p>\n`;\n","import { _String, bcSdkMod, modules } from '../DeepLib';\nexport const PlayerStorage = () => (typeof Player?.[bcSdkMod.ModInfo.name] === 'object' ?\n CommonCloneDeep(Player?.[bcSdkMod.ModInfo.name]) :\n undefined);\nexport const ExtensionStorage = () => Player.ExtensionSettings[bcSdkMod.ModInfo.name];\nexport function dataTake(modName = bcSdkMod.ModInfo.name) {\n if (ExtensionStorage()) {\n const parsed = JSON.parse(LZString.decompressFromBase64(ExtensionStorage()) || '');\n Player[modName] = Object.hasOwn(parsed, 'Version') ? parsed : undefined;\n }\n else {\n Player[modName] = {};\n }\n}\nexport function dataStore() {\n const modName = bcSdkMod.ModInfo.name;\n const modVersion = bcSdkMod.ModInfo.version;\n if (!ExtensionStorage())\n Player.ExtensionSettings[modName] = '';\n const Data = {\n GlobalModule: {\n modEnabled: false,\n doShowNewVersionMessage: false\n },\n Version: modVersion\n };\n for (const module of modules()) {\n if (!module.settingsStorage)\n continue;\n Data[module.settingsStorage] = PlayerStorage()[module.settingsStorage];\n }\n Player.ExtensionSettings[modName] = _String.encode(Data);\n ServerPlayerExtensionSettingsSync(modName);\n}\n","export function elementCreateSubscreenDiv() {\n const subscreenDiv = elementGetSubscreenDiv();\n if (subscreenDiv) {\n console.error('Subscreen already exists');\n return subscreenDiv;\n }\n const div = document.createElement('div');\n div.id = 'deeplib-subscreen';\n div.classList.add('deeplib-subscreen', 'HideOnPopup');\n return document.body.appendChild(div);\n}\nexport function elementGetSubscreenDiv() {\n return document.getElementById('deeplib-subscreen') ?? undefined;\n}\nexport function elementRemoveSubscreenDiv() {\n return elementGetSubscreenDiv()?.remove();\n}\nexport function elementAppendToSubscreenDiv(element) {\n return elementGetSubscreenDiv()?.appendChild(element);\n}\nexport function elementCreateSettingsDiv() {\n const settingsDiv = elementGetSettingsDiv();\n if (settingsDiv) {\n console.error('Settings screen already exists');\n return settingsDiv;\n }\n const div = document.createElement('div');\n div.id = 'deeplib-settings';\n div.classList.add('deeplib-settings');\n return div;\n}\nexport function elementGetSettingsDiv() {\n return document.getElementById('deeplib-settings') ?? undefined;\n}\nexport function elementAppendToSettingsDiv(element) {\n return elementGetSettingsDiv()?.appendChild(element);\n}\nexport function elementCreateMiscDiv() {\n const miscDiv = elementGetMiscDiv();\n if (miscDiv) {\n console.error('Settings screen already exists');\n return miscDiv;\n }\n const div = document.createElement('div');\n div.id = 'deeplib-misc';\n div.classList.add('deeplib-misc');\n return div;\n}\nexport function elementGetMiscDiv() {\n return document.getElementById('deeplib-misc');\n}\nexport function elementAppendToMiscDiv(element) {\n return elementGetMiscDiv()?.appendChild(element);\n}\n","import { deepLibLogger } from '../../DeepLib';\nconst mainCanvasHeight = 1000;\nconst mainCanvasWidth = 2000;\nexport function getRelativeHeight(height) {\n return height * (MainCanvas.canvas.clientHeight / mainCanvasHeight);\n}\nexport function getRelativeWidth(width) {\n return width * (MainCanvas.canvas.clientWidth / mainCanvasWidth);\n}\nexport function getRelativeY(yPos) {\n return MainCanvas.canvas.offsetTop + yPos * (MainCanvas.canvas.clientHeight / mainCanvasHeight);\n}\nexport function getRelativeX(xPos) {\n return MainCanvas.canvas.offsetLeft + xPos * (MainCanvas.canvas.clientWidth / mainCanvasWidth);\n}\nexport function elementSetPosition(_, xPos, yPos) {\n const element = elementGet(_, 'elementSetPosition');\n if (!element)\n return;\n const Top = getRelativeY(yPos);\n const Left = getRelativeX(xPos);\n Object.assign(element.style, {\n position: 'fixed',\n left: Left + 'px',\n top: Top + 'px'\n });\n}\nexport function elementSetSize(_, width, height) {\n const element = elementGet(_, 'elementSetSize');\n if (!element)\n return;\n const Height = getRelativeHeight(height);\n const Width = getRelativeWidth(width);\n Object.assign(element.style, {\n width: Width + 'px',\n height: Height + 'px',\n });\n}\nexport function elementAdjustFontSize(_) {\n const element = elementGet(_, 'elementAdjustFontSize');\n if (!element)\n return;\n const Font = MainCanvas.canvas.clientWidth <= MainCanvas.canvas.clientHeight * 2 ? MainCanvas.canvas.clientWidth / 50 : MainCanvas.canvas.clientHeight / 25;\n Object.assign(element.style, {\n fontSize: Font + 'px',\n fontFamily: CommonGetFontName()\n });\n}\nexport function elementSetPosSizeFont(_, xPos, yPos, width, height) {\n if (elementGet(_, 'elementSetPosSizeFont') === null)\n return;\n elementSetPosition(_, xPos, yPos);\n elementSetSize(_, width, height);\n elementAdjustFontSize(_);\n}\nexport function elementHide(_) {\n const element = elementGet(_, 'elementHide');\n if (!element)\n return;\n element.style.display = 'none';\n}\nexport function elementUnhide(_) {\n const element = elementGet(_, 'elementUnhide');\n if (!element)\n return;\n element.style.display = '';\n}\nfunction elementGet(_, funcName) {\n if (!_) {\n deepLibLogger.warn(`${funcName} called without an elementId or element`);\n return null;\n }\n const elementId = _.elementId ?? _.element?.id;\n const element = _.element ?? document.getElementById(_.elementId);\n if (!element) {\n deepLibLogger.warn(`A call to ${funcName} was made on non-existent element with id ${elementId}`);\n return null;\n }\n return element;\n}\n","import { BaseSubscreen, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateButton(options) {\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const button = ElementButton.Create(options.id, () => options.onClick(), {\n tooltip: options.tooltip,\n label: options.label,\n labelPosition: 'center',\n }, {\n button: {\n classList: ['deeplib-button'],\n children: [\n {\n tag: 'img',\n attributes: {\n id: `${options.id}-image`,\n alt: '',\n disabled: options.disabled,\n decoding: 'async',\n loading: 'lazy',\n src: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n style: {\n '--image': `url(\"${options.image}\")`,\n }\n },\n ],\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n }\n },\n });\n BaseSubscreen.currentElements.push([button, options]);\n return button;\n}\n","import { BaseSubscreen, elementSetTooltip, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateCheckbox(options) {\n const elem = document.getElementById(options.id);\n if (elem)\n return elem;\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const retElem = ElementCreate({\n tag: 'div',\n classList: ['deeplib-checkbox-container'],\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n children: [\n {\n tag: 'input',\n classList: ['deeplib-input'],\n attributes: {\n type: 'checkbox',\n id: options.id,\n checked: options.getSettingValue() || undefined,\n },\n },\n {\n tag: 'label',\n classList: ['deeplib-text'],\n attributes: {\n for: options.id,\n },\n children: [options.label]\n },\n ]\n });\n if (options.description) {\n retElem.addEventListener('mouseover', () => {\n elementSetTooltip(options.description);\n });\n retElem.addEventListener('mouseout', () => {\n elementSetTooltip('');\n });\n }\n BaseSubscreen.currentElements.push([retElem, options]);\n return retElem;\n}\n","import { BaseSubscreen, elementSetTooltip, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateInput(options) {\n const elem = document.getElementById(options.id);\n if (elem)\n return elem;\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const retElem = ElementCreate({\n tag: 'div',\n classList: ['deeplib-input-container'],\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n children: [\n {\n tag: 'input',\n classList: ['deeplib-input'],\n attributes: {\n type: options.type,\n id: options.id,\n placeholder: ' ',\n },\n },\n {\n tag: 'label',\n classList: ['deeplib-text'],\n attributes: {\n for: options.id,\n },\n children: [options.label]\n },\n {\n tag: 'div',\n classList: ['deeplib-underline'],\n }\n ]\n });\n if (options.getElementValue?.()) {\n const input = document.getElementById(options.id);\n if (input)\n input.value = options.getElementValue();\n }\n if (options.description) {\n retElem.addEventListener('mouseover', () => {\n elementSetTooltip(options.description);\n });\n retElem.addEventListener('mouseout', () => {\n elementSetTooltip('');\n });\n }\n BaseSubscreen.currentElements.push([retElem, options]);\n return retElem;\n}\n","import { BaseSubscreen, elementSetTooltip, getRelativeHeight, getRelativeWidth, getRelativeX, getRelativeY } from '../../DeepLib';\nexport function elementCreateLabel(options) {\n const elem = document.getElementById(options.id);\n if (elem)\n return elem;\n const width = options.size ? getRelativeWidth(options.size[0]) + 'px' : '';\n const height = options.size ? getRelativeHeight(options.size[1]) + 'px' : '';\n const left = options.position ? getRelativeX(options.position[0]) + 'px' : '';\n const top = options.position ? getRelativeY(options.position[1]) + 'px' : '';\n const position = options.position ? 'fixed' : '';\n const retElem = ElementCreate({\n tag: 'span',\n classList: ['deeplib-label', 'deeplib-text'],\n attributes: {\n id: options.id\n },\n style: {\n width: width,\n height: height,\n left: left,\n top: top,\n position: position,\n },\n dataAttributes: {\n 'size': options.size?.join('x'),\n 'position': options.position?.join('x'),\n },\n children: [\n options.label,\n ],\n });\n if (options.description) {\n retElem.addEventListener('mouseover', () => {\n elementSetTooltip(options.description);\n });\n retElem.addEventListener('mouseout', () => {\n elementSetTooltip('');\n });\n }\n BaseSubscreen.currentElements.push([retElem, options]);\n return retElem;\n}\n","export function elementCreateTooltip() {\n const element = ElementCreate({\n tag: 'div',\n classList: ['deeplib-tooltip'],\n attributes: {\n id: 'deeplib-tooltip'\n },\n style: {\n display: 'none'\n }\n });\n return element;\n}\nexport function elementGetTooltip() {\n return document.getElementById('deeplib-tooltip') ?? undefined;\n}\nexport function elementSetTooltip(text) {\n const element = document.getElementById('deeplib-tooltip');\n if (!element)\n return false;\n element.innerHTML = text;\n if (text === '')\n element.style.display = 'none';\n else\n element.style.display = '';\n return true;\n}\n","export class Logger extends Array {\n ModName = 'DeepLib';\n constructor(modName) {\n super();\n if (modName) {\n this.ModName = modName;\n }\n }\n _Log(level, ...args) {\n const logEntry = {\n logLevel: level,\n args: [...args],\n date: new Date(Date.now())\n };\n const userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes('chrome') || userAgent.includes('firefox')) {\n const color = Logger.colorizeLog(level);\n args.forEach(arg => {\n if (typeof arg === 'string') {\n arg = `\\n%c${arg}`;\n }\n });\n console.log(`%c${this.ModName}:`, color, ...args);\n }\n else {\n console.log(`${this.ModName}:`, ...args);\n }\n this.push(logEntry);\n }\n info(...args) {\n this._Log('info', ...args);\n }\n log(...args) {\n this._Log('log', ...args);\n }\n warn(...args) {\n this._Log('warn', ...args);\n }\n error(...args) {\n this._Log('error', ...args);\n }\n debug(...args) {\n this._Log('debug', ...args);\n }\n static colorizeLog(logLevel) {\n const colors = {\n info: 'color: #32CCCC',\n log: 'color: #CCCC32',\n warn: 'color: #eec355',\n error: 'color: #750b0b',\n debug: 'color: #9E4BCF',\n };\n return colors[logLevel];\n }\n}\nexport const deepLibLogger = new Logger();\n","import bcModSdkRef from 'bondage-club-mod-sdk';\nexport var HookPriority;\n(function (HookPriority) {\n HookPriority[HookPriority[\"Observe\"] = 0] = \"Observe\";\n HookPriority[HookPriority[\"AddBehavior\"] = 1] = \"AddBehavior\";\n HookPriority[HookPriority[\"ModifyBehavior\"] = 5] = \"ModifyBehavior\";\n HookPriority[HookPriority[\"OverrideBehavior\"] = 10] = \"OverrideBehavior\";\n HookPriority[HookPriority[\"Top\"] = 100] = \"Top\";\n})(HookPriority || (HookPriority = {}));\nexport class bcSdkMod {\n static SDK;\n static patchedFunctions = new Map();\n static ModInfo;\n constructor(info, options) {\n bcSdkMod.SDK = bcModSdkRef.registerMod(info, options);\n bcSdkMod.ModInfo = info;\n }\n initPatchableFunction(target) {\n let result = bcSdkMod.patchedFunctions.get(target);\n if (!result) {\n result = {\n name: target,\n hooks: []\n };\n bcSdkMod.patchedFunctions.set(target, result);\n }\n return result;\n }\n hookFunction(target, priority, hook, module = null) {\n const data = this.initPatchableFunction(target);\n if (data.hooks.some((h) => h.hook === hook)) {\n return () => null;\n }\n const removeCallback = bcSdkMod.SDK?.hookFunction(target, priority, hook);\n data.hooks.push({\n hook,\n priority,\n module,\n removeCallback\n });\n data.hooks.sort((a, b) => b.priority - a.priority);\n return removeCallback;\n }\n patchFunction(target, patches) {\n this.patchFunction(target, patches);\n }\n removeHookByModule(target, module) {\n const data = this.initPatchableFunction(target);\n for (let i = data.hooks.length - 1; i >= 0; i--) {\n if (data.hooks[i].module === module) {\n data.hooks[i].removeCallback();\n data.hooks.splice(i, 1);\n }\n }\n return true;\n }\n removeAllHooksByModule(module) {\n for (const data of bcSdkMod.patchedFunctions.values()) {\n for (let i = data.hooks.length - 1; i >= 0; i--) {\n if (data.hooks[i].module === module) {\n data.hooks[i].removeCallback();\n data.hooks.splice(i, 1);\n }\n }\n }\n return true;\n }\n}\n","import { deepLibLogger } from './Logger';\nexport class _String {\n static encode(string) {\n return LZString.compressToBase64(JSON.stringify(string));\n }\n static decode(string) {\n const d = LZString.decompressFromBase64(string);\n let data = {};\n try {\n const decoded = JSON.parse(d);\n data = decoded;\n }\n catch (error) {\n deepLibLogger.error(error);\n }\n if (data)\n return data;\n }\n static shuffle(string) {\n const temp = JSON.parse(JSON.stringify(string));\n const ret = [];\n while (temp.length > 0) {\n const d = Math.floor(Math.random() * temp.length);\n ret.push(temp[d]);\n temp.splice(d, 1);\n }\n return ret;\n }\n}\n","export class Localization {\n Translation = {};\n static PathToTranslation;\n constructor(options) {\n Localization.PathToTranslation = options.pathToTranslationsFolder.endsWith('/') ? options.pathToTranslationsFolder : options.pathToTranslationsFolder + '/';\n }\n static async init() {\n const lang = TranslationLanguage.toLowerCase();\n const translation = await Localization.fetchLanguageFile(lang);\n if (lang === 'en') {\n Localization.prototype.Translation = translation;\n }\n else {\n const fallbackTranslation = await Localization.fetchLanguageFile('en');\n Localization.prototype.Translation = { ...fallbackTranslation, ...translation };\n }\n }\n static getText(srcTag) {\n return Localization.prototype.Translation?.[srcTag] || srcTag || '';\n }\n static async fetchLanguageFile(lang) {\n const response = await fetch(`${Localization.PathToTranslation}${lang}.lang`);\n if (lang !== 'en' && !response.ok) {\n return this.fetchLanguageFile('en');\n }\n const langFileContent = await response.text();\n return this.parseLanguageFile(langFileContent);\n }\n static parseLanguageFile(content) {\n const translations = {};\n const lines = content.split('\\n');\n for (const line of lines) {\n if (line.trim() === '' || line.trim().startsWith('#')) {\n continue;\n }\n const [key, value] = line.split('=');\n translations[key.trim()] = value.trim();\n }\n return translations;\n }\n}\nexport const getText = (string) => Localization.getText(string);\n","export * from './Base/BaseModule';\nexport * from './Base/BaseSubscreen';\nexport * from './Base/Initialization';\nexport * from './Base/Modules';\nexport * from './Base/SettingDefinitions';\nexport * from './Migrators/BaseMigrator';\nexport * from './Models/Base';\nexport * from './Models/Settings';\nexport * from './Modules/GUI';\nexport * from './Modules/Version';\nexport * from './Screens/Debug';\nexport * from './Screens/MainMenu';\nexport * from './Screens/Support';\nexport * from './Utilities/Data';\nexport * from './Utilities/Elements/.AdvancedElements';\nexport * from './Utilities/Elements/.ElementHelpers';\nexport * from './Utilities/Elements/Button';\nexport * from './Utilities/Elements/Checkbox';\nexport * from './Utilities/Elements/Input';\nexport * from './Utilities/Elements/Label';\nexport * from './Utilities/Elements/Tooltip';\nexport * from './Utilities/Logger';\nexport * from './Utilities/Messages';\nexport * from './Utilities/SDK';\nexport * from './Utilities/String';\nexport * from './Utilities/Style';\nexport * from './Utilities/Translation';\n"],"names":[],"sourceRoot":""}
|
package/src/DeepLib.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export * from './Base/BaseModule';
|
|
2
|
-
export * from './Base/BaseSubscreen';
|
|
3
|
-
export * from './Base/Initialization';
|
|
4
|
-
export * from './Base/Modules';
|
|
5
|
-
export * from './Base/SettingDefinitions';
|
|
6
|
-
|
|
7
|
-
export * from './Migrators/BaseMigrator';
|
|
8
|
-
|
|
9
|
-
export * from './Models/Base';
|
|
10
|
-
export * from './Models/Settings';
|
|
11
|
-
|
|
12
|
-
export * from './Modules/GUI';
|
|
13
|
-
export * from './Modules/Version';
|
|
14
|
-
|
|
15
|
-
export * from './Screens/Debug';
|
|
16
|
-
export * from './Screens/MainMenu';
|
|
17
|
-
export * from './Screens/Support';
|
|
18
|
-
|
|
19
|
-
export * from './Utilities/Data';
|
|
20
|
-
export * from './Utilities/Elements/.AdvancedElements';
|
|
21
|
-
export * from './Utilities/Elements/.ElementHelpers';
|
|
22
|
-
export * from './Utilities/Elements/Button';
|
|
23
|
-
export * from './Utilities/Elements/Checkbox';
|
|
24
|
-
export * from './Utilities/Elements/Input';
|
|
25
|
-
export * from './Utilities/Elements/Label';
|
|
26
|
-
export * from './Utilities/Elements/Tooltip';
|
|
27
|
-
export * from './Utilities/Logger';
|
|
28
|
-
export * from './Utilities/Messages';
|
|
29
|
-
export * from './Utilities/SDK';
|
|
30
|
-
export * from './Utilities/String';
|
|
31
|
-
export * from './Utilities/Style';
|
|
32
|
-
export * from './Utilities/Translation';
|
|
33
|
-
|