@famibee/skynovel 1.48.6 → 1.48.8
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/app.js +1729 -1736
- package/dist/app.js.map +1 -1
- package/dist/sn/CmnLib.d.ts +1 -0
- package/dist/sn/CmnLib.d.ts.map +1 -1
- package/dist/sn/CmnTween.d.ts +1 -2
- package/dist/sn/CmnTween.d.ts.map +1 -1
- package/dist/sn/EventMng.d.ts +1 -0
- package/dist/sn/EventMng.d.ts.map +1 -1
- package/dist/sn/GrpLayer.d.ts +1 -1
- package/dist/sn/GrpLayer.d.ts.map +1 -1
- package/dist/sn/ReadState.d.ts +3 -3
- package/dist/sn/ReadState.d.ts.map +1 -1
- package/dist/sn/ScriptIterator.d.ts.map +1 -1
- package/dist/web.js +507 -514
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
package/dist/web.js
CHANGED
|
@@ -17276,7 +17276,7 @@ extensions.add(
|
|
|
17276
17276
|
);
|
|
17277
17277
|
class EventListenerCtn {
|
|
17278
17278
|
// リソースリーク対策
|
|
17279
|
-
#
|
|
17279
|
+
#t = [];
|
|
17280
17280
|
add(t, e, r, N = {}) {
|
|
17281
17281
|
if (t instanceof BaseTexture) {
|
|
17282
17282
|
switch (e) {
|
|
@@ -17284,24 +17284,24 @@ class EventListenerCtn {
|
|
|
17284
17284
|
case "update":
|
|
17285
17285
|
case "error":
|
|
17286
17286
|
case "dispose":
|
|
17287
|
-
t.on(e, r, N), this.#
|
|
17287
|
+
t.on(e, r, N), this.#t.push(() => t.off(e, r, N));
|
|
17288
17288
|
break;
|
|
17289
17289
|
}
|
|
17290
17290
|
return;
|
|
17291
17291
|
}
|
|
17292
17292
|
if (t instanceof i$1) {
|
|
17293
|
-
t.on(e, r, N), this.#
|
|
17293
|
+
t.on(e, r, N), this.#t.push(() => t.off(e, r, N));
|
|
17294
17294
|
return;
|
|
17295
17295
|
}
|
|
17296
|
-
t.addEventListener(e, r, N), this.#
|
|
17296
|
+
t.addEventListener(e, r, N), this.#t.push(() => t.removeEventListener(e, r, { capture: N.capture ?? !1 }));
|
|
17297
17297
|
}
|
|
17298
17298
|
clear() {
|
|
17299
|
-
for (const t of this.#
|
|
17299
|
+
for (const t of this.#t)
|
|
17300
17300
|
t();
|
|
17301
|
-
this.#
|
|
17301
|
+
this.#t = [];
|
|
17302
17302
|
}
|
|
17303
17303
|
get isEmpty() {
|
|
17304
|
-
return this.#
|
|
17304
|
+
return this.#t.length === 0;
|
|
17305
17305
|
}
|
|
17306
17306
|
}
|
|
17307
17307
|
var SEARCH_PATH_ARG_EXT = /* @__PURE__ */ ((o) => (o.DEFAULT = "", o.SP_GSM = "png|jpg|jpeg|json|svg|webp|mp4|webm", o.SCRIPT = "sn|ssn", o.FONT = "woff2|woff|otf|ttf", o.SOUND = "mp3|m4a|ogg|aac|flac|wav", o.HTML = "htm|html", o.CSS = "css", o.SN = "sn", o.PSD = "psd", o.TST_PNGPNG_ = "png|png_", o.TST_HH = "hh", o.TST_EEE = "eee", o.TST_GGG = "ggg", o.TST_PNGXML = "png|xml", o))(SEARCH_PATH_ARG_EXT || {});
|
|
@@ -17365,11 +17365,11 @@ class ConfigBase {
|
|
|
17365
17365
|
// 4tst public
|
|
17366
17366
|
hPathFn2Exts = {};
|
|
17367
17367
|
async load(t) {
|
|
17368
|
-
if (this.oCfg.save_ns = t?.save_ns ?? this.oCfg.save_ns, this.oCfg.window.width = Number(t?.window?.width ?? this.oCfg.window.width), this.oCfg.window.height = Number(t?.window?.height ?? this.oCfg.window.height), this.oCfg.book = { ...this.oCfg.book, ...t.book }, this.oCfg.log.max_len = t.log?.max_len?.max_len ?? this.oCfg.log.max_len, this.oCfg.init = { ...this.oCfg.init, ...t.init }, this.oCfg.debug = { ...this.oCfg.debug, ...t.debug }, this.oCfg.debuger_token = t.debuger_token, await this.sys.loadPath(this.hPathFn2Exts, this), this.#
|
|
17368
|
+
if (this.oCfg.save_ns = t?.save_ns ?? this.oCfg.save_ns, this.oCfg.window.width = Number(t?.window?.width ?? this.oCfg.window.width), this.oCfg.window.height = Number(t?.window?.height ?? this.oCfg.window.height), this.oCfg.book = { ...this.oCfg.book, ...t.book }, this.oCfg.log.max_len = t.log?.max_len?.max_len ?? this.oCfg.log.max_len, this.oCfg.init = { ...this.oCfg.init, ...t.init }, this.oCfg.debug = { ...this.oCfg.debug, ...t.debug }, this.oCfg.debuger_token = t.debuger_token, await this.sys.loadPath(this.hPathFn2Exts, this), this.#t = this.matchPath(
|
|
17369
17369
|
"^breakline$",
|
|
17370
17370
|
"png|jpg|jpeg|json|svg|webp|mp4|webm"
|
|
17371
17371
|
/* SP_GSM */
|
|
17372
|
-
).length > 0, this.#
|
|
17372
|
+
).length > 0, this.#e = this.matchPath(
|
|
17373
17373
|
"^breakpage$",
|
|
17374
17374
|
"png|jpg|jpeg|json|svg|webp|mp4|webm"
|
|
17375
17375
|
/* SP_GSM */
|
|
@@ -17383,13 +17383,13 @@ class ConfigBase {
|
|
|
17383
17383
|
throw `ファイル改竄エラーです fn:${D}`;
|
|
17384
17384
|
}
|
|
17385
17385
|
}
|
|
17386
|
-
#
|
|
17386
|
+
#t = !1;
|
|
17387
17387
|
get existsBreakline() {
|
|
17388
|
-
return this.#
|
|
17388
|
+
return this.#t;
|
|
17389
17389
|
}
|
|
17390
|
-
#
|
|
17390
|
+
#e = !1;
|
|
17391
17391
|
get existsBreakpage() {
|
|
17392
|
-
return this.#
|
|
17392
|
+
return this.#e;
|
|
17393
17393
|
}
|
|
17394
17394
|
getNs() {
|
|
17395
17395
|
return `skynovel.${this.oCfg.save_ns} - `;
|
|
@@ -17515,16 +17515,16 @@ class Grammar {
|
|
|
17515
17515
|
constructor() {
|
|
17516
17516
|
this.setEscape("");
|
|
17517
17517
|
}
|
|
17518
|
-
#
|
|
17518
|
+
#t;
|
|
17519
17519
|
setEscape(t) {
|
|
17520
17520
|
if (this.#o && t in this.#o)
|
|
17521
17521
|
throw "[エスケープ文字] char【" + t + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17522
|
-
this.#
|
|
17522
|
+
this.#t = new RegExp(
|
|
17523
17523
|
(t ? `\\${t}\\S|` : "") + // エスケープシーケンス
|
|
17524
17524
|
`\\n+|\\t+|\\[let_ml\\s+[^\\]]+\\].+?(?=\\[endlet_ml[\\]\\s])|\\[(?:(?=([^"'#;\\]]+))\\1|(["'#]).*?\\2|;[^\\n]*)*?]|;[^\\n]*|&[^&\\n]+&|&&?[^&;\\n\\t]+|^\\*[^\\s\\[&;\\\\]+|[^\\n\\t\\[;${t ? `\\${t}` : ""}]+`,
|
|
17525
17525
|
// 本文
|
|
17526
17526
|
"gs"
|
|
17527
|
-
), this.#
|
|
17527
|
+
), this.#e = new RegExp(`[\\w\\s;[\\]*=&|《》${t ? `\\${t}` : ""}]`), this.#l = new RegExp(`[\\n\\t;\\[*&${t ? `\\${t}` : ""}]`);
|
|
17528
17528
|
}
|
|
17529
17529
|
// 括弧マクロの定義
|
|
17530
17530
|
bracket2macro(t, e, r, N) {
|
|
@@ -17546,11 +17546,11 @@ class Grammar {
|
|
|
17546
17546
|
throw "[bracket2macro] text【" + B + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17547
17547
|
if ($ in this.#o)
|
|
17548
17548
|
throw "[bracket2macro] text【" + $ + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17549
|
-
if (this.#
|
|
17549
|
+
if (this.#e.test(B))
|
|
17550
17550
|
throw "[bracket2macro] text【" + B + "】は括弧マクロに使用できない文字です";
|
|
17551
|
-
if (this.#
|
|
17551
|
+
if (this.#e.test($))
|
|
17552
17552
|
throw "[bracket2macro] text【" + $ + "】は括弧マクロに使用できない文字です";
|
|
17553
|
-
this.#o[$] = "0", this.#o[B] = `[${k} text=`, this.addC2M(`\\${B}[^\\${$}]*\\${$}`, `\\${B}\\${$}`), this.#
|
|
17553
|
+
this.#o[$] = "0", this.#o[B] = `[${k} text=`, this.addC2M(`\\${B}[^\\${$}]*\\${$}`, `\\${B}\\${$}`), this.#h(r, N);
|
|
17554
17554
|
}
|
|
17555
17555
|
// 一文字マクロの定義
|
|
17556
17556
|
char2macro(t, e, r, N) {
|
|
@@ -17559,15 +17559,15 @@ class Grammar {
|
|
|
17559
17559
|
throw "[char2macro] charは必須です";
|
|
17560
17560
|
if (this.#o ??= {}, k in this.#o)
|
|
17561
17561
|
throw "[char2macro] char【" + k + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17562
|
-
if (this.#
|
|
17562
|
+
if (this.#e.test(k))
|
|
17563
17563
|
throw "[char2macro] char【" + k + "】は一文字マクロに使用できない文字です";
|
|
17564
17564
|
if (!D)
|
|
17565
17565
|
throw "[char2macro] nameは必須です";
|
|
17566
17566
|
if (!(D in e))
|
|
17567
17567
|
throw `[char2macro] 未定義のタグ又はマクロ[${D}]です`;
|
|
17568
|
-
this.#o[k] = `[${D}]`, this.addC2M(`\\${k}`, `\\${k}`), this.#
|
|
17568
|
+
this.#o[k] = `[${D}]`, this.addC2M(`\\${k}`, `\\${k}`), this.#h(r, N);
|
|
17569
17569
|
}
|
|
17570
|
-
#
|
|
17570
|
+
#e;
|
|
17571
17571
|
#r = new RegExp("");
|
|
17572
17572
|
#i = "";
|
|
17573
17573
|
#n = "";
|
|
@@ -17579,7 +17579,7 @@ class Grammar {
|
|
|
17579
17579
|
}
|
|
17580
17580
|
resolveScript(t) {
|
|
17581
17581
|
const e = t.replaceAll(/(\r\n|\r)/g, `
|
|
17582
|
-
`).match(this.#
|
|
17582
|
+
`).match(this.#t)?.flatMap((N) => {
|
|
17583
17583
|
if (!this.testTagLetml(N))
|
|
17584
17584
|
return N;
|
|
17585
17585
|
const k = /^([^\]]+?])(.*)$/s.exec(N);
|
|
@@ -17588,7 +17588,7 @@ class Grammar {
|
|
|
17588
17588
|
const [, D, B] = k;
|
|
17589
17589
|
return [D, B];
|
|
17590
17590
|
}) ?? [], r = { aToken: e, len: e.length, aLNum: [] };
|
|
17591
|
-
return this.#
|
|
17591
|
+
return this.#h(r), r;
|
|
17592
17592
|
}
|
|
17593
17593
|
testTagLetml(t) {
|
|
17594
17594
|
return /^\[let_ml\s/.test(t);
|
|
@@ -17597,11 +17597,11 @@ class Grammar {
|
|
|
17597
17597
|
return /^\[endlet_ml\s*]/.test(t);
|
|
17598
17598
|
}
|
|
17599
17599
|
analyzToken(t) {
|
|
17600
|
-
return this.#
|
|
17600
|
+
return this.#t.lastIndex = 0, this.#t.exec(t);
|
|
17601
17601
|
}
|
|
17602
17602
|
#o;
|
|
17603
|
-
#
|
|
17604
|
-
#
|
|
17603
|
+
#l;
|
|
17604
|
+
#h(t, e = 0) {
|
|
17605
17605
|
if (this.#o) {
|
|
17606
17606
|
for (let r = t.len - 1; r >= e; --r) {
|
|
17607
17607
|
const N = t.aToken[r];
|
|
@@ -17622,7 +17622,7 @@ class Grammar {
|
|
|
17622
17622
|
}
|
|
17623
17623
|
}
|
|
17624
17624
|
testNoTxt(t) {
|
|
17625
|
-
return this.#
|
|
17625
|
+
return this.#l.test(t);
|
|
17626
17626
|
}
|
|
17627
17627
|
//4tst
|
|
17628
17628
|
}
|
|
@@ -17641,11 +17641,11 @@ class AnalyzeTagArg {
|
|
|
17641
17641
|
| (["'#]) (?<def2>.*?) \6 ) )?
|
|
17642
17642
|
| (?<literal>[^\s;]+)
|
|
17643
17643
|
*/
|
|
17644
|
-
#
|
|
17644
|
+
#t = /;[^\n]*|(?<key>[^\s="'#|;]+)(?:\s|;[^\n]*\n)*=(?:\s|;[^\n]*\n)*(?:(?<val>[^\s"'#|;]+)|(["'#])(?<val2>.*?)\3)(?:\|(?:(?<def>[^\s"'#;]+)|(["'#])(?<def2>.*?)\6))?|(?<literal>[^\s;]+)/g;
|
|
17645
17645
|
// 【属性 = 値 | 省略値】の分析
|
|
17646
17646
|
parse(t) {
|
|
17647
17647
|
this.#r = {}, this.#i = !1;
|
|
17648
|
-
for (const { groups: e } of t.matchAll(this.#
|
|
17648
|
+
for (const { groups: e } of t.matchAll(this.#t)) {
|
|
17649
17649
|
const { key: r, val: N, val2: k, def: D, def2: B, literal: $ } = e;
|
|
17650
17650
|
r ? this.#r[r] = {
|
|
17651
17651
|
val: N ?? k,
|
|
@@ -17656,13 +17656,13 @@ class AnalyzeTagArg {
|
|
|
17656
17656
|
// 属性と値の位置をまとめて返す
|
|
17657
17657
|
parseinDetail(t, e, r, N) {
|
|
17658
17658
|
const k = {}, D = t.slice(1 + e, -1);
|
|
17659
|
-
for (const { groups: B, index: $, 0: U } of D.matchAll(this.#
|
|
17659
|
+
for (const { groups: B, index: $, 0: U } of D.matchAll(this.#t)) {
|
|
17660
17660
|
if ($ === void 0)
|
|
17661
17661
|
continue;
|
|
17662
17662
|
const { key: H, val: z, val2: V, literal: X } = B;
|
|
17663
17663
|
if (X) {
|
|
17664
17664
|
if (X.at(-1) === "=") {
|
|
17665
|
-
const Z = X.length - 1, { ch: J } = this.#
|
|
17665
|
+
const Z = X.length - 1, { ch: J } = this.#e(e, r, N, D, $ + Z);
|
|
17666
17666
|
k[X.slice(0, -1)] = {
|
|
17667
17667
|
k_ln: r,
|
|
17668
17668
|
k_ch: J - Z,
|
|
@@ -17676,12 +17676,12 @@ class AnalyzeTagArg {
|
|
|
17676
17676
|
}
|
|
17677
17677
|
if (!H)
|
|
17678
17678
|
continue;
|
|
17679
|
-
const { ln: q, ch: W } = this.#
|
|
17679
|
+
const { ln: q, ch: W } = this.#e(e, r, N, D, $), { ln: Y, ch: K } = this.#e(e, r, N, D, $ + U.lastIndexOf(z ?? V) - (z ? 0 : 1));
|
|
17680
17680
|
k[H] = { k_ln: q, k_ch: W, v_ln: Y, v_ch: K, v_len: z ? z.length : V.length + 2 };
|
|
17681
17681
|
}
|
|
17682
17682
|
return k;
|
|
17683
17683
|
}
|
|
17684
|
-
#
|
|
17684
|
+
#e(t, e, r, N, k) {
|
|
17685
17685
|
const B = N.slice(0, k).split(`
|
|
17686
17686
|
`), $ = B.length;
|
|
17687
17687
|
return {
|
|
@@ -18394,7 +18394,7 @@ class PropParser {
|
|
|
18394
18394
|
), tt = this.val.getVal(J);
|
|
18395
18395
|
return tt == null ? ["!str!", tt] : typeof tt == "boolean" ? ["!bool!", tt] : Object.prototype.toString.call(tt) === "[object String]" ? ["!str!", String(tt)] : ["!num!", Number(tt)];
|
|
18396
18396
|
}).desc("string"), W = parsimmon_umd_minExports.lazy(
|
|
18397
|
-
() => parsimmon_umd_minExports.string("(").then(this.#
|
|
18397
|
+
() => parsimmon_umd_minExports.string("(").then(this.#t).skip(parsimmon_umd_minExports.string(")")).or(U).or(H).or(z).or(V).or(q)
|
|
18398
18398
|
), K = [
|
|
18399
18399
|
// 演算子の優先順位 - JavaScript | MDN https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Operator_precedence
|
|
18400
18400
|
// 優先順位:18(メンバーへのアクセス、計算値によるメンバーへのアクセス)
|
|
@@ -18431,20 +18431,20 @@ class PropParser {
|
|
|
18431
18431
|
(Z, J) => J.type(J.ops, Z),
|
|
18432
18432
|
W
|
|
18433
18433
|
);
|
|
18434
|
-
this.#
|
|
18434
|
+
this.#t = K.trim(parsimmon_umd_minExports.optWhitespace);
|
|
18435
18435
|
}
|
|
18436
|
-
#
|
|
18436
|
+
#t = null;
|
|
18437
18437
|
parse(t) {
|
|
18438
|
-
const e = this.#
|
|
18438
|
+
const e = this.#t.parse(t);
|
|
18439
18439
|
if (!e.status)
|
|
18440
18440
|
throw Error("(PropParser)文法エラー【" + t + "】");
|
|
18441
18441
|
const r = e.value;
|
|
18442
|
-
return r[0] === "!str!" ? this.#o(r[1]) : this.#
|
|
18442
|
+
return r[0] === "!str!" ? this.#o(r[1]) : this.#e(r);
|
|
18443
18443
|
}
|
|
18444
|
-
#
|
|
18444
|
+
#e(t) {
|
|
18445
18445
|
const e = t.shift();
|
|
18446
18446
|
if (e instanceof Array)
|
|
18447
|
-
return this.#
|
|
18447
|
+
return this.#e(e);
|
|
18448
18448
|
const r = this.#r[e];
|
|
18449
18449
|
return r ? r(t) : Object(null);
|
|
18450
18450
|
}
|
|
@@ -18467,77 +18467,77 @@ class PropParser {
|
|
|
18467
18467
|
// 論理 NOT
|
|
18468
18468
|
"!": (t) => !this.#r.Boolean(t),
|
|
18469
18469
|
// チルダ演算子(ビット反転)
|
|
18470
|
-
"~": (t) => ~Number(this.#
|
|
18470
|
+
"~": (t) => ~Number(this.#e(t.shift())),
|
|
18471
18471
|
// UnaryNegate: a=> - Number(this.#calc(a.shift())),
|
|
18472
18472
|
UnaryNegate: (t) => -this.#r.Number(t),
|
|
18473
18473
|
// Unaryplus: a=> this.#hFnc['Number'](a),
|
|
18474
18474
|
// 乗算、除算、剰余
|
|
18475
|
-
"**": (t) => Number(this.#
|
|
18476
|
-
"*": (t) => Number(this.#
|
|
18477
|
-
"/": (t) => Number(this.#
|
|
18475
|
+
"**": (t) => Number(this.#e(t.shift())) ** Number(this.#e(t.shift())),
|
|
18476
|
+
"*": (t) => Number(this.#e(t.shift())) * Number(this.#e(t.shift())),
|
|
18477
|
+
"/": (t) => Number(this.#e(t.shift())) / Number(this.#e(t.shift())),
|
|
18478
18478
|
"¥": (t) => Math.floor(this.#r["/"](t)),
|
|
18479
|
-
"%": (t) => Number(this.#
|
|
18479
|
+
"%": (t) => Number(this.#e(t.shift())) % Number(this.#e(t.shift())),
|
|
18480
18480
|
// 加算、減算、文字列の連結
|
|
18481
18481
|
"+": (t) => {
|
|
18482
|
-
const e = this.#
|
|
18482
|
+
const e = this.#e(t.shift()), r = this.#e(t.shift());
|
|
18483
18483
|
return Object.prototype.toString.call(e) === "[object String]" || Object.prototype.toString.call(r) === "[object String]" ? String(e) + String(r) : Number(e) + Number(r);
|
|
18484
18484
|
},
|
|
18485
|
-
"-": (t) => Number(this.#
|
|
18485
|
+
"-": (t) => Number(this.#e(t.shift())) - Number(this.#e(t.shift())),
|
|
18486
18486
|
// 関数
|
|
18487
18487
|
int: (t) => int(this.#i(t.shift())),
|
|
18488
18488
|
parseInt: (t) => int(this.#r.Number(t)),
|
|
18489
18489
|
Number: (t) => {
|
|
18490
|
-
const e = this.#
|
|
18491
|
-
return Object.prototype.toString.call(e) === "[object String]" ? this.#i(this.#
|
|
18490
|
+
const e = this.#e(t.shift());
|
|
18491
|
+
return Object.prototype.toString.call(e) === "[object String]" ? this.#i(this.#t.parse(String(e)).value) : Number(e);
|
|
18492
18492
|
},
|
|
18493
18493
|
Boolean: (t) => {
|
|
18494
18494
|
const e = t.shift();
|
|
18495
|
-
return e[0] === "!bool!" ? !!e[1] : !!this.#
|
|
18495
|
+
return e[0] === "!bool!" ? !!e[1] : !!this.#e(e);
|
|
18496
18496
|
},
|
|
18497
18497
|
ceil: (t) => Math.ceil(this.#i(t.shift())),
|
|
18498
18498
|
floor: (t) => Math.floor(this.#i(t.shift())),
|
|
18499
18499
|
round: (t) => Math.round(this.#i(t.shift())),
|
|
18500
18500
|
isNaN: (t) => Number.isNaN(this.#i(t.shift())),
|
|
18501
18501
|
// ビットシフト
|
|
18502
|
-
"<<": (t) => Number(this.#
|
|
18503
|
-
">>": (t) => Number(this.#
|
|
18504
|
-
">>>": (t) => Number(this.#
|
|
18502
|
+
"<<": (t) => Number(this.#e(t.shift())) << Number(this.#e(t.shift())),
|
|
18503
|
+
">>": (t) => Number(this.#e(t.shift())) >> Number(this.#e(t.shift())),
|
|
18504
|
+
">>>": (t) => Number(this.#e(t.shift())) >>> Number(this.#e(t.shift())),
|
|
18505
18505
|
// 等値、非等値、厳密等価、厳密非等価
|
|
18506
|
-
"<": (t) => Number(this.#
|
|
18507
|
-
"<=": (t) => Number(this.#
|
|
18508
|
-
">": (t) => Number(this.#
|
|
18509
|
-
">=": (t) => Number(this.#
|
|
18506
|
+
"<": (t) => Number(this.#e(t.shift())) < Number(this.#e(t.shift())),
|
|
18507
|
+
"<=": (t) => Number(this.#e(t.shift())) <= Number(this.#e(t.shift())),
|
|
18508
|
+
">": (t) => Number(this.#e(t.shift())) > Number(this.#e(t.shift())),
|
|
18509
|
+
">=": (t) => Number(this.#e(t.shift())) >= Number(this.#e(t.shift())),
|
|
18510
18510
|
// 小なり、以下、大なり、以上
|
|
18511
18511
|
"==": (t) => {
|
|
18512
|
-
const e = this.#
|
|
18512
|
+
const e = this.#e(t.shift()), r = this.#e(t.shift());
|
|
18513
18513
|
return e == null && r == null && (!e || !r) ? e == r : String(e) === String(r);
|
|
18514
18514
|
},
|
|
18515
18515
|
"!=": (t) => !this.#r["=="](t),
|
|
18516
18516
|
"===": (t) => {
|
|
18517
|
-
const e = this.#
|
|
18517
|
+
const e = this.#e(t.shift()), r = this.#e(t.shift());
|
|
18518
18518
|
return Object.prototype.toString.call(e) != Object.prototype.toString.call(r) ? !1 : String(e) === String(r);
|
|
18519
18519
|
},
|
|
18520
18520
|
"!==": (t) => !this.#r["==="](t),
|
|
18521
18521
|
// ビット演算子
|
|
18522
|
-
"&": (t) => Number(this.#
|
|
18523
|
-
"^": (t) => Number(this.#
|
|
18524
|
-
"|": (t) => Number(this.#
|
|
18522
|
+
"&": (t) => Number(this.#e(t.shift())) & Number(this.#e(t.shift())),
|
|
18523
|
+
"^": (t) => Number(this.#e(t.shift())) ^ Number(this.#e(t.shift())),
|
|
18524
|
+
"|": (t) => Number(this.#e(t.shift())) | Number(this.#e(t.shift())),
|
|
18525
18525
|
// 論理 AND,OR
|
|
18526
|
-
"&&": (t) => String(this.#
|
|
18527
|
-
"||": (t) => String(this.#
|
|
18526
|
+
"&&": (t) => String(this.#e(t.shift())) === "true" && String(this.#e(t.shift())) === "true",
|
|
18527
|
+
"||": (t) => String(this.#e(t.shift())) === "true" || String(this.#e(t.shift())) === "true",
|
|
18528
18528
|
// 条件
|
|
18529
18529
|
"?": (t) => {
|
|
18530
18530
|
const e = this.#r.Boolean(t), r = t.shift();
|
|
18531
18531
|
if (r[0] !== ":")
|
|
18532
18532
|
throw Error("(PropParser)三項演算子の文法エラーです。: が見つかりません");
|
|
18533
|
-
return this.#
|
|
18533
|
+
return this.#e(r[e ? 1 : 2]);
|
|
18534
18534
|
},
|
|
18535
18535
|
":": () => {
|
|
18536
18536
|
throw Error("(PropParser)三項演算子の文法エラーです。? が見つかりません");
|
|
18537
18537
|
}
|
|
18538
18538
|
};
|
|
18539
18539
|
#i(t) {
|
|
18540
|
-
const e = this.#
|
|
18540
|
+
const e = this.#e(t);
|
|
18541
18541
|
if (Object.prototype.toString.call(e) !== "[object Number]")
|
|
18542
18542
|
throw Error("(PropParser)引数【" + e + "】が数値ではありません");
|
|
18543
18543
|
return Number(e);
|
|
@@ -18550,21 +18550,21 @@ class PropParser {
|
|
|
18550
18550
|
);
|
|
18551
18551
|
}
|
|
18552
18552
|
getValAmpersand = (t) => t.at(0) === "&" ? String(this.parse(t.slice(1))) : t;
|
|
18553
|
-
static #
|
|
18553
|
+
static #l = /^((?<scope>\w+?):)?(?<name>[^\s :@]+)(?<at>\@str)?$/;
|
|
18554
18554
|
// 522 match 18413 step(~10ms) https://regex101.com/r/tmCKuE/1
|
|
18555
18555
|
// →これは改良しようがない。いい意味で改善の余地なし
|
|
18556
18556
|
static getValName(t) {
|
|
18557
|
-
const r = this.#
|
|
18557
|
+
const r = this.#l.exec(t.trim())?.groups;
|
|
18558
18558
|
if (!r)
|
|
18559
18559
|
return null;
|
|
18560
18560
|
const { scope: N = "tmp", name: k, at: D = "" } = r;
|
|
18561
18561
|
return {
|
|
18562
18562
|
scope: N,
|
|
18563
|
-
name: PropParser.#
|
|
18563
|
+
name: PropParser.#h(k),
|
|
18564
18564
|
at: D
|
|
18565
18565
|
};
|
|
18566
18566
|
}
|
|
18567
|
-
static #
|
|
18567
|
+
static #h(t) {
|
|
18568
18568
|
let e = 0, r = 0;
|
|
18569
18569
|
for (; ; ) {
|
|
18570
18570
|
if (e = t.indexOf('["'), e < 0) {
|
|
@@ -18582,13 +18582,13 @@ class PropParser {
|
|
|
18582
18582
|
}
|
|
18583
18583
|
class DebugMng {
|
|
18584
18584
|
constructor(t, e, r) {
|
|
18585
|
-
this.sys = t, DebugMng.#
|
|
18585
|
+
this.sys = t, DebugMng.#t = r, DebugMng.#e = e, DebugMng.#r = e.title, DebugMng.myTrace = DebugMng.#h, e.log = (N) => this.#o(N), e.trace = (N) => this.#l(N), DebugMng.#i = document.createElement("span"), DebugMng.#i.hidden = !0, DebugMng.#i.textContent = "", DebugMng.#i.style.cssText = ` z-index: ${Number.MAX_SAFE_INTEGER};
|
|
18586
18586
|
position: absolute; left: 0; top: 0;
|
|
18587
18587
|
color: black;
|
|
18588
18588
|
background-color: rgba(255, 255, 255, 0.7);`, document.body.appendChild(DebugMng.#i);
|
|
18589
18589
|
}
|
|
18590
|
-
static #e;
|
|
18591
18590
|
static #t;
|
|
18591
|
+
static #e;
|
|
18592
18592
|
static #r;
|
|
18593
18593
|
static #i;
|
|
18594
18594
|
destroy() {
|
|
@@ -18601,7 +18601,7 @@ class DebugMng {
|
|
|
18601
18601
|
return this.#n && (this.#n = !1, e = `== ${platform.description} ==
|
|
18602
18602
|
`), this.sys.appendFile(
|
|
18603
18603
|
this.sys.path_downloads + "log.txt",
|
|
18604
|
-
`${e}--- ${getDateStr("-", "_", "")} [fn:${DebugMng.#
|
|
18604
|
+
`${e}--- ${getDateStr("-", "_", "")} [fn:${DebugMng.#t.scriptFn} line:${DebugMng.#t.lineNum}] prj:${this.sys.cur}
|
|
18605
18605
|
${t.text || `(text is ${t.text})`}
|
|
18606
18606
|
`,
|
|
18607
18607
|
(r) => {
|
|
@@ -18609,7 +18609,7 @@ ${t.text || `(text is ${t.text})`}
|
|
|
18609
18609
|
}
|
|
18610
18610
|
), !1;
|
|
18611
18611
|
}
|
|
18612
|
-
#
|
|
18612
|
+
#l(t) {
|
|
18613
18613
|
return DebugMng.myTrace(t.text || `(text is ${t.text})`, "I"), !1;
|
|
18614
18614
|
}
|
|
18615
18615
|
// private禁止、galleryでエラーになる
|
|
@@ -18636,8 +18636,8 @@ ${t.text || `(text is ${t.text})`}
|
|
|
18636
18636
|
console.info("%c" + r, N);
|
|
18637
18637
|
}
|
|
18638
18638
|
static myTrace = DebugMng.trace_beforeNew;
|
|
18639
|
-
static strPos = () => DebugMng.#
|
|
18640
|
-
static #
|
|
18639
|
+
static strPos = () => DebugMng.#t && DebugMng.#t.lineNum > 0 ? `(fn:${DebugMng.#t.scriptFn} line:${DebugMng.#t.lineNum}) ` : "";
|
|
18640
|
+
static #h(t, e = "E") {
|
|
18641
18641
|
let r = `{${e}} ` + DebugMng.strPos() + t;
|
|
18642
18642
|
DebugMng.#p(r, e);
|
|
18643
18643
|
let N = "";
|
|
@@ -18653,7 +18653,7 @@ ${t.text || `(text is ${t.text})`}
|
|
|
18653
18653
|
break;
|
|
18654
18654
|
case "ET":
|
|
18655
18655
|
case "E":
|
|
18656
|
-
if (DebugMng.#r({ text: t }), this.#
|
|
18656
|
+
if (DebugMng.#r({ text: t }), this.#e.dump_lay({}), this.#e.dump_val({}), DebugMng.#t.dumpErrForeLine(), this.#e.dump_stack({}), e === "ET")
|
|
18657
18657
|
throw r;
|
|
18658
18658
|
console.error("%c" + r, "color:#F30;");
|
|
18659
18659
|
return;
|
|
@@ -18736,7 +18736,7 @@ class Areas {
|
|
|
18736
18736
|
}
|
|
18737
18737
|
class Variable {
|
|
18738
18738
|
constructor(t, e) {
|
|
18739
|
-
if (this.cfg = t, e.let = (k) => this.#v(k), e.let_abs = (k) => this.#u(k), e.let_char_at = (k) => this.#b(k), e.let_index_of = (k) => this.#a(k), e.let_length = (k) => this.#m(k), e.let_replace = (k) => this.#y(k), e.let_round = (k) => this.#_(k), e.let_search = (k) => this.#T(k), e.let_substr = (k) => this.#I(k), e.clearsysvar = () => this.#S(), e.clearvar = () => this.#E(), e.dump_val = () => this.#O(), e.copybookmark = (k) => this.#f(k), e.erasebookmark = (k) => this.#d(k), this.#
|
|
18739
|
+
if (this.cfg = t, e.let = (k) => this.#v(k), e.let_abs = (k) => this.#u(k), e.let_char_at = (k) => this.#b(k), e.let_index_of = (k) => this.#a(k), e.let_length = (k) => this.#m(k), e.let_replace = (k) => this.#y(k), e.let_round = (k) => this.#_(k), e.let_search = (k) => this.#T(k), e.let_substr = (k) => this.#I(k), e.clearsysvar = () => this.#S(), e.clearvar = () => this.#E(), e.dump_val = () => this.#O(), e.copybookmark = (k) => this.#f(k), e.erasebookmark = (k) => this.#d(k), this.#e["sn.userFnTail"] = "", this.defTmp("const.sn.bookmark.json", () => {
|
|
18740
18740
|
const k = [];
|
|
18741
18741
|
for (const D of Object.keys(this.#n.mark).sort()) {
|
|
18742
18742
|
const B = { ...this.#n.mark[D].json };
|
|
@@ -18748,14 +18748,14 @@ class Variable {
|
|
|
18748
18748
|
const r = window, N = r.AudioContext ?? r.webkitAudioContext;
|
|
18749
18749
|
this.#r["const.sn.needClick2Play"] = () => new N().state === "suspended";
|
|
18750
18750
|
}
|
|
18751
|
-
#
|
|
18752
|
-
#
|
|
18753
|
-
#r = this.#
|
|
18751
|
+
#t = { sys: {}, save: {}, tmp: {}, mp: {} };
|
|
18752
|
+
#e = this.#t.save;
|
|
18753
|
+
#r = this.#t.tmp;
|
|
18754
18754
|
#i;
|
|
18755
18755
|
#n = { sys: {}, mark: {}, kidoku: {} };
|
|
18756
18756
|
#o;
|
|
18757
|
-
#
|
|
18758
|
-
#
|
|
18757
|
+
#l = {};
|
|
18758
|
+
#h;
|
|
18759
18759
|
setSys(t) {
|
|
18760
18760
|
this.#i = t, t.initVal(this.#n, this.#r, (e) => {
|
|
18761
18761
|
this.updateData(e), sessionStorage.clear();
|
|
@@ -18766,7 +18766,7 @@ class Variable {
|
|
|
18766
18766
|
k["sys:" + z] = V instanceof Function ? V() : V;
|
|
18767
18767
|
sessionStorage[r + "sys"] = JSON.stringify(k);
|
|
18768
18768
|
const D = {};
|
|
18769
|
-
for (const [z, V] of Object.entries(this.#
|
|
18769
|
+
for (const [z, V] of Object.entries(this.#e))
|
|
18770
18770
|
D["save:" + z] = V instanceof Function ? V() : V;
|
|
18771
18771
|
sessionStorage[r + "save"] = JSON.stringify(D);
|
|
18772
18772
|
const B = {};
|
|
@@ -18774,7 +18774,7 @@ class Variable {
|
|
|
18774
18774
|
B[z] = V instanceof Function ? V() : V;
|
|
18775
18775
|
sessionStorage[r + "tmp"] = JSON.stringify(B);
|
|
18776
18776
|
const $ = {};
|
|
18777
|
-
for (const [z, V] of Object.entries(this.#
|
|
18777
|
+
for (const [z, V] of Object.entries(this.#t.mp))
|
|
18778
18778
|
$[z] = V instanceof Function ? V() : V;
|
|
18779
18779
|
sessionStorage[r + "mp"] = JSON.stringify($);
|
|
18780
18780
|
const U = {};
|
|
@@ -18785,14 +18785,14 @@ class Variable {
|
|
|
18785
18785
|
for (const [z, V] of Object.entries(this.#n.kidoku))
|
|
18786
18786
|
H[z] = V instanceof Function ? V() : V;
|
|
18787
18787
|
sessionStorage[r + "kidoku"] = JSON.stringify(H), t.flush();
|
|
18788
|
-
} : () => t.flush(), this.#
|
|
18788
|
+
} : () => t.flush(), this.#h = (k, D) => t.callHook(k, D), t.addHook((k, D) => this.#p[k]?.(k, D));
|
|
18789
18789
|
const N = this.getVal("sys:sn.tagCh.msecWait", -1);
|
|
18790
18790
|
(this.#r["const.sn.isFirstBoot"] || N === -1) && this.#S();
|
|
18791
18791
|
});
|
|
18792
18792
|
}
|
|
18793
18793
|
#p = {
|
|
18794
18794
|
auth: (t, e) => this.#s(e.hBreakpoint.aData),
|
|
18795
|
-
var: (t, e) => this.#i.send2Dbg(e.ri, { v: this.#
|
|
18795
|
+
var: (t, e) => this.#i.send2Dbg(e.ri, { v: this.#t[e.scope] ?? {} }),
|
|
18796
18796
|
set_var: (t, e) => {
|
|
18797
18797
|
try {
|
|
18798
18798
|
this.#B(e.nm, e.val), this.#i.send2Dbg(e.ri, {});
|
|
@@ -18810,10 +18810,10 @@ class Variable {
|
|
|
18810
18810
|
Variable.#N[e.dataId] = 1;
|
|
18811
18811
|
}
|
|
18812
18812
|
updateData(t) {
|
|
18813
|
-
this.#n = t, this.#o = this.#
|
|
18813
|
+
this.#n = t, this.#o = this.#t.sys = this.#n.sys, this.#l = {};
|
|
18814
18814
|
for (const [e, r] of Object.entries(this.#n.kidoku)) {
|
|
18815
18815
|
const N = new Areas();
|
|
18816
|
-
N.hAreas = { ...r }, this.#
|
|
18816
|
+
N.hAreas = { ...r }, this.#l[e] = N;
|
|
18817
18817
|
}
|
|
18818
18818
|
}
|
|
18819
18819
|
#c = () => {
|
|
@@ -18831,28 +18831,28 @@ class Variable {
|
|
|
18831
18831
|
this.#r[t] = e;
|
|
18832
18832
|
}
|
|
18833
18833
|
cloneMp() {
|
|
18834
|
-
return { ...this.#
|
|
18834
|
+
return { ...this.#t.mp };
|
|
18835
18835
|
}
|
|
18836
18836
|
setMp(t) {
|
|
18837
|
-
this.#
|
|
18837
|
+
this.#t.mp = t;
|
|
18838
18838
|
}
|
|
18839
18839
|
setMark(t, e) {
|
|
18840
18840
|
this.#n.mark[t] = e, this.flush();
|
|
18841
18841
|
}
|
|
18842
18842
|
getMark = (t) => this.#n.mark[t];
|
|
18843
18843
|
cloneSave() {
|
|
18844
|
-
return { ...this.#
|
|
18844
|
+
return { ...this.#t.save };
|
|
18845
18845
|
}
|
|
18846
18846
|
mark2save(t) {
|
|
18847
|
-
this.#
|
|
18847
|
+
this.#e = this.#t.save = { ...t.hSave }, this.#x = this.#e["sn.doRecLog"] ?? !1;
|
|
18848
18848
|
}
|
|
18849
18849
|
// 既読系
|
|
18850
18850
|
loadScrWork(t) {
|
|
18851
|
-
t in this.#
|
|
18851
|
+
t in this.#l || (this.#l[t] = new Areas());
|
|
18852
18852
|
}
|
|
18853
|
-
getAreaKidoku = (t) => this.#
|
|
18853
|
+
getAreaKidoku = (t) => this.#l[t];
|
|
18854
18854
|
saveKidoku() {
|
|
18855
|
-
for (const [t, { hAreas: e }] of Object.entries(this.#
|
|
18855
|
+
for (const [t, { hAreas: e }] of Object.entries(this.#l))
|
|
18856
18856
|
this.#n.kidoku[t] = { ...e };
|
|
18857
18857
|
this.flush();
|
|
18858
18858
|
}
|
|
@@ -18953,16 +18953,16 @@ class Variable {
|
|
|
18953
18953
|
// // デバッグ・その他
|
|
18954
18954
|
// システム変数の全消去
|
|
18955
18955
|
#S() {
|
|
18956
|
-
const t = this.#o = this.#
|
|
18956
|
+
const t = this.#o = this.#t.sys = this.#n.sys = {};
|
|
18957
18957
|
typeof process < "u" || (this.setVal_Nochk("sys", "const.sn.window.x", 0), this.setVal_Nochk("sys", "const.sn.window.y", 0)), this.setVal_Nochk("sys", "sn.tagCh.doWait", !0), this.setVal_Nochk("sys", "sn.tagCh.doWait_Kidoku", !0), this.setVal_Nochk("sys", "sn.tagCh.msecWait", this.cfg.oCfg.init.tagch_msecwait), this.setVal_Nochk("sys", "sn.tagCh.msecWait_Kidoku", this.cfg.oCfg.init.tagch_msecwait), this.setVal_Nochk("sys", "sn.tagCh.canskip", !0), this.setVal_Nochk("sys", "sn.skip.mode", "s"), this.setVal_Nochk("sys", "sn.auto.msecPageWait", argChk_Num(t, "sn.auto.msecPageWait", this.cfg.oCfg.init.auto_msecpagewait ?? 3500)), this.setVal_Nochk("sys", "sn.auto.msecPageWait_Kidoku", argChk_Num(t, "sn.auto.msecPageWait", this.cfg.oCfg.init.auto_msecpagewait ?? 3500)), this.setVal_Nochk("sys", "sn.auto.msecLineWait", 500), this.setVal_Nochk("sys", "sn.auto.msecLineWait_Kidoku", 500), this.setVal_Nochk("sys", "const.sn.sound.BGM.volume", 1), this.setVal_Nochk("sys", "const.sn.sound.SE.volume", 1), this.setVal_Nochk("sys", "const.sn.sound.SYS.volume", 1);
|
|
18958
18958
|
for (const [r, N] of Object.entries(this.#n.kidoku))
|
|
18959
|
-
N.hAreas = {}, this.#
|
|
18960
|
-
return this.setVal_Nochk("sys", "TextLayer.Back.Alpha", 0.5), this.#
|
|
18959
|
+
N.hAreas = {}, this.#l[r].clear();
|
|
18960
|
+
return this.setVal_Nochk("sys", "TextLayer.Back.Alpha", 0.5), this.#t.mark = this.#n.mark = {}, this.setVal_Nochk("sys", "const.sn.save.place", 1), this.flush(), !1;
|
|
18961
18961
|
}
|
|
18962
18962
|
// ゲーム変数の全消去
|
|
18963
18963
|
#E() {
|
|
18964
|
-
const t = this.#
|
|
18965
|
-
return this.#
|
|
18964
|
+
const t = this.#e["const.sn.mesLayer"] ?? "", e = this.#e["sn.doRecLog"] ?? !1, r = this.#e["const.sn.sLog"] ?? "[]";
|
|
18965
|
+
return this.#e = this.#t.save = {}, this.setVal_Nochk("save", "const.sn.mesLayer", t), this.setVal_Nochk("save", "sn.doRecLog", e), this.setVal_Nochk("save", "const.sn.sLog", r), !1;
|
|
18966
18966
|
}
|
|
18967
18967
|
#B = (t, e, r = !0) => {
|
|
18968
18968
|
if (!t)
|
|
@@ -18972,7 +18972,7 @@ class Variable {
|
|
|
18972
18972
|
const N = PropParser.getValName(t);
|
|
18973
18973
|
if (N === null)
|
|
18974
18974
|
throw "[変数参照] name(" + t + ")が変数名として異常です";
|
|
18975
|
-
const k = this.#
|
|
18975
|
+
const k = this.#t[N.scope];
|
|
18976
18976
|
if (!k)
|
|
18977
18977
|
throw "[変数に値セット] scopeが異常【" + N.scope + "】です";
|
|
18978
18978
|
const D = N.name;
|
|
@@ -18981,12 +18981,12 @@ class Variable {
|
|
|
18981
18981
|
this.setVal_Nochk(N.scope, D, e, r);
|
|
18982
18982
|
};
|
|
18983
18983
|
setVal_Nochk(t, e, r, N = !1) {
|
|
18984
|
-
const k = this.#
|
|
18984
|
+
const k = this.#t[t];
|
|
18985
18985
|
N && (r = this.#P(r));
|
|
18986
18986
|
const D = t + ":" + e;
|
|
18987
18987
|
if (D in Variable.#N) {
|
|
18988
18988
|
const B = k[e], $ = r;
|
|
18989
|
-
B != $ && this.#
|
|
18989
|
+
B != $ && this.#h("data_break", {
|
|
18990
18990
|
dataId: D,
|
|
18991
18991
|
old_v: B,
|
|
18992
18992
|
new_v: $
|
|
@@ -19002,7 +19002,7 @@ class Variable {
|
|
|
19002
19002
|
const r = PropParser.getValName(t);
|
|
19003
19003
|
if (r === null)
|
|
19004
19004
|
throw "[変数参照] name(" + t + ")が変数名として異常です";
|
|
19005
|
-
const N = this.#
|
|
19005
|
+
const N = this.#t[r.scope];
|
|
19006
19006
|
if (!N)
|
|
19007
19007
|
throw "[変数参照] scopeが異常【" + r.scope + "】です";
|
|
19008
19008
|
const k = r.name;
|
|
@@ -19055,7 +19055,7 @@ class Variable {
|
|
|
19055
19055
|
#O = () => {
|
|
19056
19056
|
const t = { tmp: {}, sys: {}, save: {}, mp: {} };
|
|
19057
19057
|
for (let e in t) {
|
|
19058
|
-
const r = this.#
|
|
19058
|
+
const r = this.#t[e], N = t[e];
|
|
19059
19059
|
for (let [k, D] of Object.entries(r))
|
|
19060
19060
|
N[k] = Object.prototype.toString.call(D) === "[object Function]" ? D() : D;
|
|
19061
19061
|
}
|
|
@@ -19118,7 +19118,7 @@ class Variable {
|
|
|
19118
19118
|
argChk_Num(this.#o, t, 500);
|
|
19119
19119
|
}
|
|
19120
19120
|
#k(t) {
|
|
19121
|
-
return argChk_Boolean(this.#
|
|
19121
|
+
return argChk_Boolean(this.#e, t, !0);
|
|
19122
19122
|
}
|
|
19123
19123
|
}
|
|
19124
19124
|
var Easing = Object.freeze({
|
|
@@ -19509,22 +19509,21 @@ var removeAll = TWEEN.removeAll.bind(TWEEN);
|
|
|
19509
19509
|
TWEEN.add.bind(TWEEN);
|
|
19510
19510
|
var remove$6 = TWEEN.remove.bind(TWEEN), update = TWEEN.update.bind(TWEEN);
|
|
19511
19511
|
class CmnTween {
|
|
19512
|
-
static #
|
|
19513
|
-
static #
|
|
19512
|
+
static #t = {};
|
|
19513
|
+
static #e;
|
|
19514
19514
|
static #r;
|
|
19515
|
-
static
|
|
19516
|
-
|
|
19517
|
-
CmnTween.#e = {}, CmnTween.#t = t, CmnTween.#r = e, CmnTween.#i = r, CmnTween.#i.ticker.add(CmnTween.#n);
|
|
19515
|
+
static init(t, e) {
|
|
19516
|
+
CmnTween.#t = {}, CmnTween.#e = t, CmnTween.#r = e, CmnTween.#r.ticker.add(CmnTween.#i);
|
|
19518
19517
|
}
|
|
19519
|
-
static #
|
|
19518
|
+
static #i = () => update();
|
|
19520
19519
|
static destroy() {
|
|
19521
|
-
CmnTween.stopAllTw(), CmnTween.#
|
|
19520
|
+
CmnTween.stopAllTw(), CmnTween.#r.ticker.remove(CmnTween.#i);
|
|
19522
19521
|
}
|
|
19523
19522
|
static setTwProp(t, e) {
|
|
19524
19523
|
const r = argChk_Num(e, "repeat", 1);
|
|
19525
19524
|
return t.delay(argChk_Num(e, "delay", 0)).easing(CmnTween.ease(e.ease)).repeat(r > 0 ? r - 1 : 1 / 0).yoyo(argChk_Boolean(e, "yoyo", !1));
|
|
19526
19525
|
}
|
|
19527
|
-
static #
|
|
19526
|
+
static #n = {
|
|
19528
19527
|
"Back.In": (t) => Easing.Back.In(t),
|
|
19529
19528
|
"Back.InOut": (t) => Easing.Back.InOut(t),
|
|
19530
19529
|
"Back.Out": (t) => Easing.Back.Out(t),
|
|
@@ -19560,9 +19559,9 @@ class CmnTween {
|
|
|
19560
19559
|
static ease(t) {
|
|
19561
19560
|
if (!t)
|
|
19562
19561
|
return (e) => Easing.Linear.None(e);
|
|
19563
|
-
if (!(t in CmnTween.#
|
|
19562
|
+
if (!(t in CmnTween.#n))
|
|
19564
19563
|
throw "異常なease指定です";
|
|
19565
|
-
return CmnTween.#
|
|
19564
|
+
return CmnTween.#n[t];
|
|
19566
19565
|
}
|
|
19567
19566
|
static hMemberCnt = {
|
|
19568
19567
|
alpha: 0,
|
|
@@ -19591,20 +19590,20 @@ class CmnTween {
|
|
|
19591
19590
|
}
|
|
19592
19591
|
// トゥイーン全停止
|
|
19593
19592
|
static stopAllTw() {
|
|
19594
|
-
CmnTween.#
|
|
19593
|
+
CmnTween.#t = {}, removeAll();
|
|
19595
19594
|
}
|
|
19596
19595
|
static tween(t, e, r, N, k, D, B) {
|
|
19597
19596
|
const $ = CmnTween.tweenA(t, e, r, N, k, D, B);
|
|
19598
19597
|
CmnTween.tweenB(e.chain, $);
|
|
19599
19598
|
}
|
|
19600
19599
|
static tweenA(t, e, r, N, k, D, B) {
|
|
19601
|
-
const $ = this.#
|
|
19602
|
-
CmnTween.setTwProp(U, e), CmnTween.#
|
|
19600
|
+
const $ = this.#e.isSkipping() ? 0 : argChk_Num(e, "time", NaN), U = new Tween(r).to(N, $).onUpdate(k);
|
|
19601
|
+
CmnTween.setTwProp(U, e), CmnTween.#t[t] = { tw: U, onEnd: B };
|
|
19603
19602
|
const { path: H } = e;
|
|
19604
19603
|
let z = U;
|
|
19605
19604
|
if (H) {
|
|
19606
19605
|
CmnLib.debugLog && console.group(`🍝 [${e[":タグ名"]}] path=${H}= start(${r.x},${r.y},${r.alpha})`);
|
|
19607
|
-
for (const { groups: V } of H.matchAll(CmnTween.#
|
|
19606
|
+
for (const { groups: V } of H.matchAll(CmnTween.#o)) {
|
|
19608
19607
|
const { x: X, x2: q, y: W, y2: Y, o: K, o2: Z, json: J } = V;
|
|
19609
19608
|
let tt = {};
|
|
19610
19609
|
if (J)
|
|
@@ -19624,13 +19623,13 @@ class CmnTween {
|
|
|
19624
19623
|
CmnLib.debugLog && console.groupEnd();
|
|
19625
19624
|
}
|
|
19626
19625
|
return z.onComplete(() => {
|
|
19627
|
-
const V = CmnTween.#
|
|
19628
|
-
V && (delete CmnTween.#
|
|
19626
|
+
const V = CmnTween.#t[t];
|
|
19627
|
+
V && (delete CmnTween.#t[t], V.tw = void 0, U.stop(), CmnTween.#e.breakLimitedEvent(), V.onEnd?.(), D());
|
|
19629
19628
|
}), U;
|
|
19630
19629
|
}
|
|
19631
19630
|
static tweenB(t, e) {
|
|
19632
19631
|
if (t) {
|
|
19633
|
-
const r = CmnTween.#
|
|
19632
|
+
const r = CmnTween.#t[t];
|
|
19634
19633
|
if (!r?.tw)
|
|
19635
19634
|
throw `${t}は存在しない・または終了したトゥイーンです`;
|
|
19636
19635
|
delete r.onEnd, r.tw.chain(e);
|
|
@@ -19654,20 +19653,19 @@ class CmnTween {
|
|
|
19654
19653
|
|
|
|
19655
19654
|
(?<json>\{[^{}]*})
|
|
19656
19655
|
*/
|
|
19657
|
-
static #
|
|
19656
|
+
static #o = /\(\s*(?:(?<x>[-=\d\.]+)|(['"])(?<x2>.*?)\2)?(?:\s*,\s*(?:(?<y>[-=\d\.]+)|(['"])(?<y2>.*?)\5)?(?:\s*,\s*(?:(?<o>[-=\d\.]+)|(['"])(?<o2>.*?)\8))?)?|(?<json>\{[^{}]*})/g;
|
|
19658
19657
|
// トランス終了待ち
|
|
19659
19658
|
static wt(t) {
|
|
19660
|
-
|
|
19661
|
-
return e?.tw ? e.resume = CmnTween.#t.waitEvent(t, () => CmnTween.finish_trans()) : !1;
|
|
19659
|
+
return CmnTween.#t[CmnTween.TW_INT_TRANS]?.tw ? CmnTween.#e.waitEvent(t, () => CmnTween.finish_trans()) : !1;
|
|
19662
19660
|
}
|
|
19663
19661
|
static TW_INT_TRANS = `trans
|
|
19664
19662
|
`;
|
|
19665
19663
|
static get isTrans() {
|
|
19666
|
-
return CmnTween.#
|
|
19664
|
+
return CmnTween.#t[CmnTween.TW_INT_TRANS]?.tw !== void 0;
|
|
19667
19665
|
}
|
|
19668
19666
|
// レイヤのトランジションの停止
|
|
19669
19667
|
static finish_trans() {
|
|
19670
|
-
return CmnTween.#
|
|
19668
|
+
return CmnTween.#t[CmnTween.TW_INT_TRANS]?.tw?.end(), !1;
|
|
19671
19669
|
}
|
|
19672
19670
|
// トゥイーン終了待ち
|
|
19673
19671
|
static wait_tsy(t) {
|
|
@@ -19675,8 +19673,8 @@ class CmnTween {
|
|
|
19675
19673
|
${r}` : N ?? e;
|
|
19676
19674
|
if (!k)
|
|
19677
19675
|
throw "トゥイーンが指定されていません";
|
|
19678
|
-
const D = CmnTween.#
|
|
19679
|
-
return D?.tw ?
|
|
19676
|
+
const D = CmnTween.#t[k];
|
|
19677
|
+
return D?.tw ? CmnTween.#e.waitEvent(t, () => D.tw?.end()) : !1;
|
|
19680
19678
|
}
|
|
19681
19679
|
// トゥイーン中断
|
|
19682
19680
|
static stop_tsy(t) {
|
|
@@ -19684,7 +19682,7 @@ ${r}` : N ?? e;
|
|
|
19684
19682
|
${r}` : N ?? e;
|
|
19685
19683
|
if (!k)
|
|
19686
19684
|
throw "トゥイーンが指定されていません";
|
|
19687
|
-
return CmnTween.#
|
|
19685
|
+
return CmnTween.#t[k]?.tw?.end(), !1;
|
|
19688
19686
|
}
|
|
19689
19687
|
// 一時停止
|
|
19690
19688
|
static pause_tsy(t) {
|
|
@@ -19692,7 +19690,7 @@ ${r}` : N ?? e;
|
|
|
19692
19690
|
${r}` : N ?? e;
|
|
19693
19691
|
if (!k)
|
|
19694
19692
|
throw "トゥイーンが指定されていません";
|
|
19695
|
-
return CmnTween.#
|
|
19693
|
+
return CmnTween.#t[k]?.tw?.pause(), !1;
|
|
19696
19694
|
}
|
|
19697
19695
|
// 一時停止再開
|
|
19698
19696
|
static resume_tsy(t) {
|
|
@@ -19700,7 +19698,7 @@ ${r}` : N ?? e;
|
|
|
19700
19698
|
${r}` : N ?? e;
|
|
19701
19699
|
if (!k)
|
|
19702
19700
|
throw "トゥイーンが指定されていません";
|
|
19703
|
-
return CmnTween.#
|
|
19701
|
+
return CmnTween.#t[k]?.tw?.resume(), !1;
|
|
19704
19702
|
}
|
|
19705
19703
|
}
|
|
19706
19704
|
/*!
|
|
@@ -20675,17 +20673,17 @@ var y = p.filter(function(o) {
|
|
|
20675
20673
|
"extensions" in n ? extensions.add(m) : Loader.registerPlugin(m);
|
|
20676
20674
|
let cfg$1, val$1, main$3, sys, evtMng;
|
|
20677
20675
|
class SndBuf {
|
|
20678
|
-
static #
|
|
20676
|
+
static #t = {};
|
|
20679
20677
|
static init(t, e, r, N) {
|
|
20680
|
-
SndBuf.#
|
|
20678
|
+
SndBuf.#t = {}, cfg$1 = t, val$1 = e, main$3 = r, sys = N;
|
|
20681
20679
|
}
|
|
20682
20680
|
static setEvtMng(t) {
|
|
20683
20681
|
evtMng = t;
|
|
20684
20682
|
}
|
|
20685
20683
|
static delLoopPlay(t) {
|
|
20686
|
-
delete SndBuf.#
|
|
20684
|
+
delete SndBuf.#t[t];
|
|
20687
20685
|
const e = "const.sn.sound." + t + ".";
|
|
20688
|
-
val$1.setVal_Nochk("save", e + "fn", ""), val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#
|
|
20686
|
+
val$1.setVal_Nochk("save", e + "fn", ""), val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#t)), val$1.flush();
|
|
20689
20687
|
}
|
|
20690
20688
|
static getVol(t, e) {
|
|
20691
20689
|
const r = argChk_Num(t, "volume", e);
|
|
@@ -20696,9 +20694,9 @@ class SndBuf {
|
|
|
20696
20694
|
if (e === r)
|
|
20697
20695
|
return;
|
|
20698
20696
|
const N = "const.sn.sound." + e + ".", k = Number(val$1.getVal("save:" + N + "volume")), D = String(val$1.getVal("save:" + N + "fn")), B = "const.sn.sound." + r + ".", $ = Number(val$1.getVal("save:" + B + "volume")), U = String(val$1.getVal("save:" + B + "fn"));
|
|
20699
|
-
val$1.setVal_Nochk("save", N + "volume", $), val$1.setVal_Nochk("save", B + "volume", k), val$1.setVal_Nochk("save", N + "fn", U), val$1.setVal_Nochk("save", B + "fn", D), e in SndBuf.#
|
|
20697
|
+
val$1.setVal_Nochk("save", N + "volume", $), val$1.setVal_Nochk("save", B + "volume", k), val$1.setVal_Nochk("save", N + "fn", U), val$1.setVal_Nochk("save", B + "fn", D), e in SndBuf.#t != r in SndBuf.#t && (e in SndBuf.#t ? (delete SndBuf.#t[e], SndBuf.#t[r] = 0) : (delete SndBuf.#t[r], SndBuf.#t[e] = 0), val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#t))), val$1.flush();
|
|
20700
20698
|
}
|
|
20701
|
-
#
|
|
20699
|
+
#e;
|
|
20702
20700
|
static #r = 999e3;
|
|
20703
20701
|
init(t) {
|
|
20704
20702
|
const { buf: e = "SE", fn: r = "" } = t, N = argChk_Num(t, "start_ms", 0), k = argChk_Num(t, "end_ms", SndBuf.#r), D = argChk_Num(t, "ret_ms", 0), B = argChk_Num(t, "pan", 0), $ = argChk_Num(t, "speed", 1);
|
|
@@ -20717,9 +20715,9 @@ class SndBuf {
|
|
|
20717
20715
|
const H = SndBuf.getVol(t, 1);
|
|
20718
20716
|
val$1.setVal_Nochk("save", U + "volume", H);
|
|
20719
20717
|
const z = H * Number(val$1.getVal("sys:" + U + "volume", 1)), V = argChk_Boolean(t, "loop", !1);
|
|
20720
|
-
V ? (SndBuf.#
|
|
20718
|
+
V ? (SndBuf.#t[e] = 0, val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#t))) : SndBuf.delLoopPlay(e), val$1.setVal_Nochk("save", U + "start_ms", N), val$1.setVal_Nochk("save", U + "end_ms", k), val$1.setVal_Nochk("save", U + "ret_ms", D), val$1.setVal_Nochk("tmp", U + "playing", !0), val$1.flush();
|
|
20721
20719
|
const X = R.find(r);
|
|
20722
|
-
this.#
|
|
20720
|
+
this.#e = {
|
|
20723
20721
|
fn: r,
|
|
20724
20722
|
stt: X ? new SsPlaying() : new SsLoading(),
|
|
20725
20723
|
snd: X,
|
|
@@ -20738,7 +20736,7 @@ class SndBuf {
|
|
|
20738
20736
|
main$3.errScript(`Sound ロード失敗ですa fn:${r} ${K}`, !1);
|
|
20739
20737
|
return;
|
|
20740
20738
|
}
|
|
20741
|
-
Z && (this.#
|
|
20739
|
+
Z && (this.#e.snd = Z, this.#e.stt.onLoad(this.#e), B !== 0 && (Z.filters = [new T.StereoFilter(B)]));
|
|
20742
20740
|
}
|
|
20743
20741
|
};
|
|
20744
20742
|
let W = "";
|
|
@@ -20754,7 +20752,7 @@ class SndBuf {
|
|
|
20754
20752
|
Z(J, tt);
|
|
20755
20753
|
const et = tt, it = et.duration;
|
|
20756
20754
|
K.end < 0 && (K.end += it, et.removeSprites(W), et.addSprites(W, K)), K.end <= K.start && main$3.errScript(`[playse] end_ms:${k}(${K.end * 1e3}) >= start_ms:${N} は異常値です`), K.end * 1e3 <= D && main$3.errScript(`[playse] end_ms:${k}(${K.end * 1e3}) <= ret_ms:${D} は異常値です`), it <= K.start && main$3.errScript(`[playse] 音声ファイル再生時間:${it * 1e3} <= start_ms:${N} は異常値です`), k !== SndBuf.#r && it <= K.end && main$3.errScript(`[playse] 音声ファイル再生時間:${it * 1e3} <= end_ms:${k} は異常値です`), et.play(W, (st) => {
|
|
20757
|
-
q.complete?.(st), V || this.#
|
|
20755
|
+
q.complete?.(st), V || this.#e.stt.onPlayEnd();
|
|
20758
20756
|
});
|
|
20759
20757
|
};
|
|
20760
20758
|
} else
|
|
@@ -20777,13 +20775,13 @@ class SndBuf {
|
|
|
20777
20775
|
//- singleInstance?: boolean;
|
|
20778
20776
|
});
|
|
20779
20777
|
}) : q.complete = () => {
|
|
20780
|
-
stop2var(this.#
|
|
20778
|
+
stop2var(this.#e, e), this.#e.stt.onPlayEnd();
|
|
20781
20779
|
}, this.#i(), X) {
|
|
20782
20780
|
if (X.volume = z, W)
|
|
20783
20781
|
this.#n(r, q);
|
|
20784
20782
|
else if (X.isPlayable) {
|
|
20785
20783
|
const K = X.options.source;
|
|
20786
|
-
!(K instanceof ArrayBuffer) || K.byteLength === 0 ? X.play(q) : this.#
|
|
20784
|
+
!(K instanceof ArrayBuffer) || K.byteLength === 0 ? X.play(q) : this.#e.snd = E.from({
|
|
20787
20785
|
...q,
|
|
20788
20786
|
url: X.options.url,
|
|
20789
20787
|
source: K
|
|
@@ -20818,16 +20816,16 @@ class SndBuf {
|
|
|
20818
20816
|
e.source = k[t]?.data, E.from(e);
|
|
20819
20817
|
});
|
|
20820
20818
|
}
|
|
20821
|
-
ws = (t) => this.#
|
|
20819
|
+
ws = (t) => this.#e.stt.ws(this.#e, t);
|
|
20822
20820
|
stopse(t) {
|
|
20823
20821
|
const { buf: e = "SE" } = t;
|
|
20824
|
-
stop2var(this.#
|
|
20822
|
+
stop2var(this.#e, e), this.#e.stt.stopse(this.#e);
|
|
20825
20823
|
}
|
|
20826
20824
|
fade(t) {
|
|
20827
|
-
this.#
|
|
20825
|
+
this.#e.stt.fade(this.#e, t);
|
|
20828
20826
|
}
|
|
20829
|
-
wf = (t) => this.#
|
|
20830
|
-
stopfadese = (t) => this.#
|
|
20827
|
+
wf = (t) => this.#e.stt.wf(this.#e, t);
|
|
20828
|
+
stopfadese = (t) => this.#e.stt.stopfadese(this.#e, t);
|
|
20831
20829
|
}
|
|
20832
20830
|
function stop2var(o, t) {
|
|
20833
20831
|
if (o.loop)
|
|
@@ -20873,11 +20871,10 @@ class SsPlaying {
|
|
|
20873
20871
|
ws(t, e) {
|
|
20874
20872
|
if (t.loop)
|
|
20875
20873
|
return !1;
|
|
20876
|
-
if (!argChk_Boolean(e, "canskip", !1))
|
|
20877
|
-
return !0;
|
|
20878
20874
|
const { buf: r = "SE" } = e, N = argChk_Boolean(e, "stop", !0);
|
|
20879
20875
|
return argChk_Boolean(e, "canskip", !1), evtMng.waitEvent(e, () => {
|
|
20880
|
-
stop2var(t, r), t.stt.onPlayEnd(), N
|
|
20876
|
+
stop2var(t, r), t.stt.onPlayEnd(), N ? t.stt.stopse(t) : t.stt.onPlayEnd = () => {
|
|
20877
|
+
};
|
|
20881
20878
|
}) ? (t.stt = new SsWaitingStop(), !0) : !1;
|
|
20882
20879
|
}
|
|
20883
20880
|
onPlayEnd() {
|
|
@@ -20917,7 +20914,7 @@ class SsWaitingStop {
|
|
|
20917
20914
|
ws = () => !1;
|
|
20918
20915
|
// ok
|
|
20919
20916
|
onPlayEnd() {
|
|
20920
|
-
|
|
20917
|
+
evtMng.breakLimitedEvent();
|
|
20921
20918
|
}
|
|
20922
20919
|
fade() {
|
|
20923
20920
|
}
|
|
@@ -20955,6 +20952,7 @@ class SsFade {
|
|
|
20955
20952
|
}
|
|
20956
20953
|
compFade() {
|
|
20957
20954
|
}
|
|
20955
|
+
// ok
|
|
20958
20956
|
stopfadese = () => stopfadese(this.tw);
|
|
20959
20957
|
}
|
|
20960
20958
|
class SsWaitingFade {
|
|
@@ -20978,7 +20976,7 @@ class SsWaitingFade {
|
|
|
20978
20976
|
wf = () => !1;
|
|
20979
20977
|
// ok
|
|
20980
20978
|
compFade() {
|
|
20981
|
-
|
|
20979
|
+
evtMng.breakLimitedEvent();
|
|
20982
20980
|
}
|
|
20983
20981
|
stopfadese = () => stopfadese(this.tw);
|
|
20984
20982
|
}
|
|
@@ -21012,10 +21010,10 @@ class SsStop {
|
|
|
21012
21010
|
}
|
|
21013
21011
|
class SoundMng {
|
|
21014
21012
|
constructor(t, e, r, N, k) {
|
|
21015
|
-
this.val = r, e.volume = (D) => this.#i(D), e.fadebgm = (D) => this.#
|
|
21013
|
+
this.val = r, e.volume = (D) => this.#i(D), e.fadebgm = (D) => this.#h(D), e.fadeoutbgm = (D) => this.#o(D), e.fadeoutse = (D) => this.#l(D), e.fadese = (D) => this.#p(D), e.playbgm = (D) => this.#s(D), e.playse = (D) => this.#c(D), e.stop_allse = () => this.#g(), e.stopbgm = (D) => this.#f(D), e.stopse = (D) => this.#d(D), e.wb = (D) => this.#v(D), e.wf = (D) => this.#u(D), e.stopfadese = (D) => this.#b(D), e.wl = (D) => this.#a(D), e.ws = (D) => this.#m(D), e.xchgbuf = (D) => this.#y(D), r.setVal_Nochk("save", "const.sn.loopPlaying", "{}"), r.setVal_Nochk("tmp", "const.sn.sound.codecs", JSON.stringify(I.supported)), SndBuf.init(t, r, N, k), R.disableAutoPause = !0;
|
|
21016
21014
|
}
|
|
21017
|
-
#e = {};
|
|
21018
21015
|
#t = {};
|
|
21016
|
+
#e = {};
|
|
21019
21017
|
#r;
|
|
21020
21018
|
setEvtMng(t) {
|
|
21021
21019
|
this.#r = t, SndBuf.setEvtMng(t);
|
|
@@ -21034,20 +21032,20 @@ class SoundMng {
|
|
|
21034
21032
|
}
|
|
21035
21033
|
// BGM/効果音のフェードアウト(loadから使うのでマクロ化禁止)
|
|
21036
21034
|
#o(t) {
|
|
21037
|
-
return t.volume = 0, this.#
|
|
21035
|
+
return t.volume = 0, this.#h(t);
|
|
21038
21036
|
}
|
|
21039
21037
|
// 効果音のフェードアウト(loadから使うのでマクロ化禁止)
|
|
21040
|
-
#
|
|
21038
|
+
#l(t) {
|
|
21041
21039
|
return t.volume = 0, this.#p(t);
|
|
21042
21040
|
}
|
|
21043
21041
|
// BGMのフェード(loadから使うのでマクロ化禁止)
|
|
21044
|
-
#
|
|
21042
|
+
#h(t) {
|
|
21045
21043
|
return t.buf = "BGM", this.#p(t);
|
|
21046
21044
|
}
|
|
21047
21045
|
// 効果音のフェード
|
|
21048
21046
|
#p(t) {
|
|
21049
21047
|
const { buf: e = "SE" } = t;
|
|
21050
|
-
return this.#b(t), this.#
|
|
21048
|
+
return this.#b(t), this.#t[e]?.fade(t), !1;
|
|
21051
21049
|
}
|
|
21052
21050
|
// BGM の演奏
|
|
21053
21051
|
#s(t) {
|
|
@@ -21058,16 +21056,16 @@ class SoundMng {
|
|
|
21058
21056
|
const { buf: e = "SE", fn: r } = t;
|
|
21059
21057
|
if (this.#d({ buf: e }), !r)
|
|
21060
21058
|
throw `[playse] fnは必須です buf:${e}`;
|
|
21061
|
-
return argChk_Boolean(t, "canskip", !0) && this.#r.isSkipping() ? !1 : (this.#
|
|
21059
|
+
return argChk_Boolean(t, "canskip", !0) && this.#r.isSkipping() ? !1 : (this.#t[e] = new SndBuf()).init(t);
|
|
21062
21060
|
}
|
|
21063
21061
|
clearCache() {
|
|
21064
21062
|
R.removeAll();
|
|
21065
21063
|
}
|
|
21066
21064
|
// 全効果音再生の停止
|
|
21067
21065
|
#g() {
|
|
21068
|
-
for (const t of Object.keys(this.#
|
|
21066
|
+
for (const t of Object.keys(this.#t))
|
|
21069
21067
|
this.#d({ buf: t });
|
|
21070
|
-
return this.#
|
|
21068
|
+
return this.#t = {}, R.stopAll(), !1;
|
|
21071
21069
|
}
|
|
21072
21070
|
// BGM 演奏の停止(loadから使うのでマクロ化禁止)
|
|
21073
21071
|
#f(t) {
|
|
@@ -21076,7 +21074,7 @@ class SoundMng {
|
|
|
21076
21074
|
// 効果音再生の停止
|
|
21077
21075
|
#d(t) {
|
|
21078
21076
|
const { buf: e = "SE" } = t;
|
|
21079
|
-
return this.#
|
|
21077
|
+
return this.#t[e]?.stopse(t), !1;
|
|
21080
21078
|
}
|
|
21081
21079
|
// BGM フェードの終了待ち
|
|
21082
21080
|
#v(t) {
|
|
@@ -21085,12 +21083,12 @@ class SoundMng {
|
|
|
21085
21083
|
// 効果音フェードの終了待ち
|
|
21086
21084
|
#u(t) {
|
|
21087
21085
|
const { buf: e = "SE" } = t;
|
|
21088
|
-
return this.#
|
|
21086
|
+
return this.#t[e]?.wf(t);
|
|
21089
21087
|
}
|
|
21090
21088
|
// 音声フェードの停止
|
|
21091
21089
|
#b(t) {
|
|
21092
21090
|
const { buf: e = "SE" } = t;
|
|
21093
|
-
return this.#
|
|
21091
|
+
return this.#t[e]?.stopfadese(t), !1;
|
|
21094
21092
|
}
|
|
21095
21093
|
// BGM 再生の終了待ち
|
|
21096
21094
|
#a(t) {
|
|
@@ -21099,12 +21097,12 @@ class SoundMng {
|
|
|
21099
21097
|
// 効果音再生の終了待ち
|
|
21100
21098
|
#m(t) {
|
|
21101
21099
|
const { buf: e = "SE" } = t;
|
|
21102
|
-
return this.#
|
|
21100
|
+
return this.#t[e]?.ws(t);
|
|
21103
21101
|
}
|
|
21104
21102
|
// 再生トラックの交換
|
|
21105
21103
|
#y(t) {
|
|
21106
21104
|
const { buf: e = "SE", buf2: r = "SE" } = t;
|
|
21107
|
-
return e === r || ([this.#
|
|
21105
|
+
return e === r || ([this.#t[e], this.#t[r]] = [this.#t[r], this.#t[e]], SndBuf.xchgbuf(t)), !1;
|
|
21108
21106
|
}
|
|
21109
21107
|
// しおりの読込(BGM状態復元)
|
|
21110
21108
|
playLoopFromSaveObj() {
|
|
@@ -21112,8 +21110,8 @@ class SoundMng {
|
|
|
21112
21110
|
const t = String(this.val.getVal("save:const.sn.loopPlaying", "{}"));
|
|
21113
21111
|
if (t === "{}")
|
|
21114
21112
|
return;
|
|
21115
|
-
this.#
|
|
21116
|
-
const e = Object.keys(this.#
|
|
21113
|
+
this.#e = JSON.parse(t);
|
|
21114
|
+
const e = Object.keys(this.#e).map((r) => () => {
|
|
21117
21115
|
const N = "save:const.sn.sound." + r + ".";
|
|
21118
21116
|
if (this.val.getVal(N + "start_ms") === void 0)
|
|
21119
21117
|
return;
|
|
@@ -21142,16 +21140,16 @@ class Pages {
|
|
|
21142
21140
|
const H = U(), z = U();
|
|
21143
21141
|
H.layname = z.layname = t;
|
|
21144
21142
|
const V = k[":id_tag"] = `layer:${t} cls:${e} page:`;
|
|
21145
|
-
H.spLay.name = H.name = V + "A", H.spLay.name = z.name = V + "B", r.addChild(H.spLay), N.addChild(z.spLay), argChk_Boolean(k, "visible", !0), argChk_Boolean(k, "visible", !0), $.isWait = H.lay(k) || z.lay(k), this.#
|
|
21143
|
+
H.spLay.name = H.name = V + "A", H.spLay.name = z.name = V + "B", r.addChild(H.spLay), N.addChild(z.spLay), argChk_Boolean(k, "visible", !0), argChk_Boolean(k, "visible", !0), $.isWait = H.lay(k) || z.lay(k), this.#t = { fore: H, back: z };
|
|
21146
21144
|
const X = `const.sn.lay.${t}`;
|
|
21147
|
-
B.setVal_Nochk("tmp", X, !0), B.defTmp(X + ".fore.alpha", () => this.#
|
|
21145
|
+
B.setVal_Nochk("tmp", X, !0), B.defTmp(X + ".fore.alpha", () => this.#t.fore.alpha), B.defTmp(X + ".back.alpha", () => this.#t.back.alpha), B.defTmp(X + ".fore.height", () => this.#t.fore.height), B.defTmp(X + ".back.height", () => this.#t.back.height), B.defTmp(X + ".fore.visible", () => this.#t.fore.spLay.visible), B.defTmp(X + ".back.visible", () => this.#t.back.spLay.visible), B.defTmp(X + ".fore.width", () => this.#t.fore.width), B.defTmp(X + ".back.width", () => this.#t.back.width), B.defTmp(X + ".fore.x", () => this.#t.fore.x), B.defTmp(X + ".back.x", () => this.#t.back.x), B.defTmp(X + ".fore.y", () => this.#t.fore.y), B.defTmp(X + ".back.y", () => this.#t.back.y);
|
|
21148
21146
|
}
|
|
21149
|
-
#
|
|
21147
|
+
#t;
|
|
21150
21148
|
destroy() {
|
|
21151
|
-
this.#
|
|
21149
|
+
this.#t.fore.destroy(), this.#t.back.destroy();
|
|
21152
21150
|
}
|
|
21153
21151
|
lay = (t) => this.getPage(t).lay(t);
|
|
21154
|
-
getPage = (t) => Pages.argChk_page(t, "fore") !== "back" ? this.#
|
|
21152
|
+
getPage = (t) => Pages.argChk_page(t, "fore") !== "back" ? this.#t.fore : this.#t.back;
|
|
21155
21153
|
static argChk_page(t, e) {
|
|
21156
21154
|
const r = t.page ?? e;
|
|
21157
21155
|
if (r === "fore" || r === "back")
|
|
@@ -21159,13 +21157,13 @@ class Pages {
|
|
|
21159
21157
|
throw Error("属性 page【" + r + "】が不正です");
|
|
21160
21158
|
}
|
|
21161
21159
|
get fore() {
|
|
21162
|
-
return this.#
|
|
21160
|
+
return this.#t.fore;
|
|
21163
21161
|
}
|
|
21164
21162
|
get back() {
|
|
21165
|
-
return this.#
|
|
21163
|
+
return this.#t.back;
|
|
21166
21164
|
}
|
|
21167
21165
|
transPage(t) {
|
|
21168
|
-
[this.#
|
|
21166
|
+
[this.#t.back, this.#t.fore] = [this.#t.fore, this.#t.back], this.#t.back.copy(this.#t.fore, t);
|
|
21169
21167
|
}
|
|
21170
21168
|
}
|
|
21171
21169
|
class Layer {
|
|
@@ -21257,12 +21255,12 @@ class Layer {
|
|
|
21257
21255
|
static getBlendmodeNum(t) {
|
|
21258
21256
|
if (!t)
|
|
21259
21257
|
return BLEND_MODES.NORMAL;
|
|
21260
|
-
const e = Layer.#
|
|
21258
|
+
const e = Layer.#t[t];
|
|
21261
21259
|
if (e !== void 0)
|
|
21262
21260
|
return e;
|
|
21263
21261
|
throw `${t} はサポートされない blendmode です`;
|
|
21264
21262
|
}
|
|
21265
|
-
static #
|
|
21263
|
+
static #t = {
|
|
21266
21264
|
normal: BLEND_MODES.NORMAL,
|
|
21267
21265
|
add: BLEND_MODES.ADD,
|
|
21268
21266
|
multiply: BLEND_MODES.MULTIPLY,
|
|
@@ -21300,9 +21298,9 @@ class Layer {
|
|
|
21300
21298
|
*/
|
|
21301
21299
|
};
|
|
21302
21300
|
static getNum2Blendmode(t) {
|
|
21303
|
-
return Layer.#
|
|
21301
|
+
return Layer.#e[t] ?? "normal";
|
|
21304
21302
|
}
|
|
21305
|
-
static #
|
|
21303
|
+
static #e = {
|
|
21306
21304
|
0: "normal",
|
|
21307
21305
|
1: "add",
|
|
21308
21306
|
2: "multiply",
|
|
@@ -21460,25 +21458,25 @@ class PicBtnDesignCast extends BtnDesignCast {
|
|
|
21460
21458
|
}
|
|
21461
21459
|
}
|
|
21462
21460
|
class GrpLayer extends Layer {
|
|
21463
|
-
static #
|
|
21464
|
-
static #
|
|
21461
|
+
static #t = new EventListenerCtn();
|
|
21462
|
+
static #e = {};
|
|
21465
21463
|
static #r;
|
|
21466
21464
|
static #i;
|
|
21467
21465
|
static #n;
|
|
21468
21466
|
static #o;
|
|
21469
|
-
static #
|
|
21470
|
-
static #
|
|
21467
|
+
static #l;
|
|
21468
|
+
static #h = 1;
|
|
21471
21469
|
static #p = 1;
|
|
21472
21470
|
static init(t, e, r, N, k, D) {
|
|
21473
|
-
GrpLayer.#r = t, GrpLayer.#i = e, GrpLayer.#n = r, GrpLayer.#o = N, GrpLayer.#
|
|
21471
|
+
GrpLayer.#r = t, GrpLayer.#i = e, GrpLayer.#n = r, GrpLayer.#o = N, GrpLayer.#l = D;
|
|
21474
21472
|
const B = () => {
|
|
21475
|
-
const $ = GrpLayer.#
|
|
21473
|
+
const $ = GrpLayer.#h * GrpLayer.#p;
|
|
21476
21474
|
for (const U of Object.values(GrpLayer.hFn2VElm))
|
|
21477
21475
|
U.volume = $;
|
|
21478
21476
|
};
|
|
21479
21477
|
k.setNoticeChgVolume(
|
|
21480
21478
|
($) => {
|
|
21481
|
-
GrpLayer.#
|
|
21479
|
+
GrpLayer.#h = $, B();
|
|
21482
21480
|
},
|
|
21483
21481
|
($) => {
|
|
21484
21482
|
GrpLayer.#p = $, B();
|
|
@@ -21490,7 +21488,7 @@ class GrpLayer extends Layer {
|
|
|
21490
21488
|
GrpLayer.#s = t;
|
|
21491
21489
|
}
|
|
21492
21490
|
static destroy() {
|
|
21493
|
-
GrpLayer.#
|
|
21491
|
+
GrpLayer.#t.clear(), GrpLayer.#e = {}, GrpLayer.hFn2ResAniSpr = {}, GrpLayer.hFn2VElm = {};
|
|
21494
21492
|
}
|
|
21495
21493
|
#c = new GrpLayDesignCast(this.spLay, this);
|
|
21496
21494
|
constructor() {
|
|
@@ -21547,7 +21545,7 @@ class GrpLayer extends Layer {
|
|
|
21547
21545
|
t.split(",").forEach((U, H) => {
|
|
21548
21546
|
if (!U)
|
|
21549
21547
|
throw "face属性に空要素が含まれます";
|
|
21550
|
-
const { dx: z, dy: V, blendmode: X, fn: q } = GrpLayer.#
|
|
21548
|
+
const { dx: z, dy: V, blendmode: X, fn: q } = GrpLayer.#e[U] || {
|
|
21551
21549
|
fn: U,
|
|
21552
21550
|
dx: 0,
|
|
21553
21551
|
dy: 0,
|
|
@@ -21583,7 +21581,7 @@ class GrpLayer extends Layer {
|
|
|
21583
21581
|
break;
|
|
21584
21582
|
case LoaderResource.TYPE.VIDEO:
|
|
21585
21583
|
const k = e.data;
|
|
21586
|
-
k.volume = GrpLayer.#
|
|
21584
|
+
k.volume = GrpLayer.#h, GrpLayer.hFn2VElm[e.name] = GrpLayer.#y(k);
|
|
21587
21585
|
}
|
|
21588
21586
|
r();
|
|
21589
21587
|
};
|
|
@@ -21597,7 +21595,7 @@ class GrpLayer extends Layer {
|
|
|
21597
21595
|
);
|
|
21598
21596
|
}
|
|
21599
21597
|
static #m(t, e, r) {
|
|
21600
|
-
if (e.data = t, e.extension === "bin" && (t instanceof HTMLImageElement ? (e.texture = Texture.fromLoader(t, e.url, e.name), e.type = LoaderResource.TYPE.IMAGE) : t instanceof HTMLVideoElement && (t.volume = GrpLayer.#
|
|
21598
|
+
if (e.data = t, e.extension === "bin" && (t instanceof HTMLImageElement ? (e.texture = Texture.fromLoader(t, e.url, e.name), e.type = LoaderResource.TYPE.IMAGE) : t instanceof HTMLVideoElement && (t.volume = GrpLayer.#h, GrpLayer.hFn2VElm[e.name] = GrpLayer.#y(t), e.type = LoaderResource.TYPE.VIDEO)), e.extension !== "json") {
|
|
21601
21599
|
r();
|
|
21602
21600
|
return;
|
|
21603
21601
|
}
|
|
@@ -21630,7 +21628,7 @@ class GrpLayer extends Layer {
|
|
|
21630
21628
|
});
|
|
21631
21629
|
}
|
|
21632
21630
|
static #y(t) {
|
|
21633
|
-
return GrpLayer.#
|
|
21631
|
+
return GrpLayer.#l.getVal("const.sn.needClick2Play") && (DebugMng.trace_beforeNew(`[lay系] ${DebugMng.strPos()}未クリック状態で動画を自動再生します。音声はミュートされます`, "W"), t.muted = !0), t.setAttribute("playsinline", ""), t;
|
|
21634
21632
|
}
|
|
21635
21633
|
static #_(t, e) {
|
|
21636
21634
|
const r = GrpLayer.hFn2ResAniSpr[t];
|
|
@@ -21650,15 +21648,12 @@ class GrpLayer extends Layer {
|
|
|
21650
21648
|
return !1;
|
|
21651
21649
|
if (this.#s.isSkipping() || r.ended)
|
|
21652
21650
|
return GrpLayer.#T(e), !1;
|
|
21653
|
-
const N = () =>
|
|
21654
|
-
|
|
21655
|
-
|
|
21656
|
-
return
|
|
21657
|
-
|
|
21658
|
-
|
|
21659
|
-
r.removeEventListener("ended", N), N();
|
|
21660
|
-
}
|
|
21661
|
-
);
|
|
21651
|
+
const N = () => this.#s.breakLimitedEvent();
|
|
21652
|
+
r.addEventListener("ended", N, { once: !0, passive: !0 });
|
|
21653
|
+
const k = argChk_Boolean(t, "stop", !0);
|
|
21654
|
+
return GrpLayer.#s.waitEvent(t, () => {
|
|
21655
|
+
r.removeEventListener("ended", N), k && GrpLayer.#T(e), N();
|
|
21656
|
+
});
|
|
21662
21657
|
}
|
|
21663
21658
|
static #T(t) {
|
|
21664
21659
|
const e = GrpLayer.hFn2VElm[t];
|
|
@@ -21745,10 +21740,10 @@ class GrpLayer extends Layer {
|
|
|
21745
21740
|
const { name: e } = t;
|
|
21746
21741
|
if (!e)
|
|
21747
21742
|
throw "nameは必須です";
|
|
21748
|
-
if (e in GrpLayer.#
|
|
21743
|
+
if (e in GrpLayer.#e)
|
|
21749
21744
|
throw "一つのname(" + e + ")に対して同じ画像を複数割り当てられません";
|
|
21750
21745
|
const { fn: r = e } = t;
|
|
21751
|
-
return GrpLayer.#
|
|
21746
|
+
return GrpLayer.#e[e] = {
|
|
21752
21747
|
fn: r,
|
|
21753
21748
|
dx: argChk_Num(t, "dx", 0),
|
|
21754
21749
|
dy: argChk_Num(t, "dy", 0),
|
|
@@ -21756,7 +21751,7 @@ class GrpLayer extends Layer {
|
|
|
21756
21751
|
}, !1;
|
|
21757
21752
|
}
|
|
21758
21753
|
static clearFace2Name() {
|
|
21759
|
-
GrpLayer.#
|
|
21754
|
+
GrpLayer.#e = {};
|
|
21760
21755
|
}
|
|
21761
21756
|
// アニメ・動画を含むか
|
|
21762
21757
|
get containMovement() {
|
|
@@ -21807,12 +21802,12 @@ class GrpLayer extends Layer {
|
|
|
21807
21802
|
}
|
|
21808
21803
|
class TxtStage extends Container {
|
|
21809
21804
|
constructor(t, e, r) {
|
|
21810
|
-
super(), this.spLay = t, this.canFocus = e, this.sys = r, this.#i.classList.add("sn_tx"), this.#i.style.position = "absolute", TxtStage.#
|
|
21805
|
+
super(), this.spLay = t, this.canFocus = e, this.sys = r, this.#i.classList.add("sn_tx"), this.#i.style.position = "absolute", TxtStage.#e.view.parentElement.appendChild(this.#i), this.addChild(this.#n), this.addChild(this.#o), this.#o.name = "grpDbgMasume", this.#h = new TxtLayDesignCast(this.spLay, this), this.#h.adopt(this.#p);
|
|
21811
21806
|
}
|
|
21812
|
-
static #e;
|
|
21813
21807
|
static #t;
|
|
21808
|
+
static #e;
|
|
21814
21809
|
static init(t, e) {
|
|
21815
|
-
TxtStage.#
|
|
21810
|
+
TxtStage.#t = t, TxtStage.#e = e, TxtStage.#S = /[、。,.)]}〉」』】〕”〟ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ!?!?‼⁉・ーゝゞヽヾ々]/, TxtStage.#E = /[[({〈「『【〔“〝]/, TxtStage.#B = /[─‥…]/;
|
|
21816
21811
|
}
|
|
21817
21812
|
static #r;
|
|
21818
21813
|
static setEvtMng(t) {
|
|
@@ -21826,7 +21821,7 @@ class TxtStage extends Container {
|
|
|
21826
21821
|
#n = new Container();
|
|
21827
21822
|
// サンプリング先
|
|
21828
21823
|
#o = new Graphics();
|
|
21829
|
-
static #
|
|
21824
|
+
static #l = {
|
|
21830
21825
|
"background-color": 0,
|
|
21831
21826
|
"border-bottom-width": 0,
|
|
21832
21827
|
"border-left-width": 0,
|
|
@@ -21837,7 +21832,7 @@ class TxtStage extends Container {
|
|
|
21837
21832
|
"margin-right": 0,
|
|
21838
21833
|
"margin-top": 0
|
|
21839
21834
|
};
|
|
21840
|
-
#
|
|
21835
|
+
#h;
|
|
21841
21836
|
#p = new TxtLayPadDesignCast(this);
|
|
21842
21837
|
#s = {
|
|
21843
21838
|
fontsize: 24,
|
|
@@ -21862,7 +21857,7 @@ class TxtStage extends Container {
|
|
|
21862
21857
|
const N = r.style.length;
|
|
21863
21858
|
for (let k = 0; k < N; ++k) {
|
|
21864
21859
|
const D = r.style[k];
|
|
21865
|
-
if (D in TxtStage.#
|
|
21860
|
+
if (D in TxtStage.#l) {
|
|
21866
21861
|
DebugMng.myTrace(`${D}は指定できません`, "W");
|
|
21867
21862
|
continue;
|
|
21868
21863
|
}
|
|
@@ -21873,7 +21868,7 @@ class TxtStage extends Container {
|
|
|
21873
21868
|
this.#i.style.cssText = "";
|
|
21874
21869
|
else
|
|
21875
21870
|
"alpha" in t && (e.opacity = String(this.spLay.alpha));
|
|
21876
|
-
if ("width" in t && (e.width = (t.width ?? "0") + "px"), "height" in t && (e.height = (t.height ?? "0") + "px"), "pl" in t && (e.paddingLeft = (t.pl ?? "0") + "px"), "pr" in t && (e.paddingRight = (t.pr ?? "0") + "px"), "pt" in t && (e.paddingTop = (t.pt ?? "0") + "px"), "pb" in t && (e.paddingBottom = (t.pb ?? "0") + "px"), "kinsoku_sol" in t && (TxtStage.#S = new RegExp(`[${t.kinsoku_sol}]`)), "kinsoku_eol" in t && (TxtStage.#E = new RegExp(`[${t.kinsoku_eol}]`)), "kinsoku_dns" in t && (TxtStage.#B = new RegExp(`[${t.kinsoku_dns}]`)), this.#d(), this.#
|
|
21871
|
+
if ("width" in t && (e.width = (t.width ?? "0") + "px"), "height" in t && (e.height = (t.height ?? "0") + "px"), "pl" in t && (e.paddingLeft = (t.pl ?? "0") + "px"), "pr" in t && (e.paddingRight = (t.pr ?? "0") + "px"), "pt" in t && (e.paddingTop = (t.pt ?? "0") + "px"), "pb" in t && (e.paddingBottom = (t.pb ?? "0") + "px"), "kinsoku_sol" in t && (TxtStage.#S = new RegExp(`[${t.kinsoku_sol}]`)), "kinsoku_eol" in t && (TxtStage.#E = new RegExp(`[${t.kinsoku_eol}]`)), "kinsoku_dns" in t && (TxtStage.#B = new RegExp(`[${t.kinsoku_dns}]`)), this.#d(), this.#h.sethArg(t), this.#v = this.spLay.position.x, e.transformOrigin = `${this.spLay.pivot.x}px ${this.spLay.pivot.y}px`, this.cvsResize(), e.display = this.spLay.visible ? "inline" : "none", e.textShadow = t.filter ?? e.textShadow ?? "", this.#c = argChk_Boolean(t, "break_fixed", this.#c), this.#g = argChk_Num(t, "break_fixed_left", this.#g), this.#f = argChk_Num(t, "break_fixed_top", this.#f), ":redraw" in t && this.#I > 0) {
|
|
21877
21872
|
const r = [
|
|
21878
21873
|
this.#i.innerHTML.replaceAll(/(animation-delay: )\d+ms/g, "$10ms"),
|
|
21879
21874
|
`<span class='sn_ch' data-add='{"ch_in_style":"default"}'> </span>`
|
|
@@ -21892,7 +21887,7 @@ class TxtStage extends Container {
|
|
|
21892
21887
|
}
|
|
21893
21888
|
cvsResize() {
|
|
21894
21889
|
const t = this.#i.style, e = this.sys.cvsScale;
|
|
21895
|
-
t.left = `${this.sys.ofsLeft4elm + this.#v * e}px`, t.top = `${this.sys.ofsTop4elm + this.spLay.position.y * e}px`, t.transform = `rotate(${this.spLay.angle}deg) scale(${this.spLay.scale.x * e}, ${this.spLay.scale.y * e})`, this.#
|
|
21890
|
+
t.left = `${this.sys.ofsLeft4elm + this.#v * e}px`, t.top = `${this.sys.ofsTop4elm + this.spLay.position.y * e}px`, t.transform = `rotate(${this.spLay.angle}deg) scale(${this.spLay.scale.x * e}, ${this.spLay.scale.y * e})`, this.#h.cvsResize(), this.#p.cvsResize();
|
|
21896
21891
|
}
|
|
21897
21892
|
#v = 0;
|
|
21898
21893
|
#u = !1;
|
|
@@ -22106,7 +22101,7 @@ class TxtStage extends Container {
|
|
|
22106
22101
|
TxtStage.#$.visible = !1;
|
|
22107
22102
|
let r = this.#T.length, N = "";
|
|
22108
22103
|
if (r === 0) {
|
|
22109
|
-
if (TxtStage.#
|
|
22104
|
+
if (TxtStage.#t.oCfg.debug.masume && (CmnLib.debugLog && console.log(`🍌 masume ${this.name} v:${this.visible} l:${this.x} t:${this.y} a:${this.alpha} pl:${this.#s.pad_left} pr:${this.#s.pad_right} pt:${this.#s.pad_top} pb:${this.#s.pad_bottom} w:${this.#s.$width} h:${this.#s.$height}`), this.#o.clear().beginFill(3407616, 0.2).lineStyle(1, 3407616, 1).drawRect(-this.#s.pad_left, -this.#s.pad_top, this.#s.$width, this.#s.$height).endFill().beginFill(13311, 0.2).lineStyle(2, 13311, 1).drawRect(
|
|
22110
22105
|
0,
|
|
22111
22106
|
0,
|
|
22112
22107
|
this.#s.$width - this.#s.pad_left - this.#s.pad_right,
|
|
@@ -22196,7 +22191,7 @@ class TxtStage extends Container {
|
|
|
22196
22191
|
}
|
|
22197
22192
|
} while (H < 0);
|
|
22198
22193
|
const X = CmnLib.debugLog ? (Z, J) => console.log(`🍌 masume ch:${Z.ch} x:${J.x} y:${J.y} w:${J.width} h:${J.height}`) : () => {
|
|
22199
|
-
}, q = TxtStage.#
|
|
22194
|
+
}, q = TxtStage.#t.oCfg.debug.masume ? (Z, J) => {
|
|
22200
22195
|
X(Z, J), this.#o.beginFill(6737151, 0.5).lineStyle(2, 16724736, 1).drawRect(J.x, J.y, J.width, J.height).endFill();
|
|
22201
22196
|
} : () => {
|
|
22202
22197
|
}, W = CmnTween.ease(this.#R);
|
|
@@ -22415,14 +22410,14 @@ class TxtStage extends Container {
|
|
|
22415
22410
|
reNew() {
|
|
22416
22411
|
this.#k();
|
|
22417
22412
|
const t = new TxtStage(this.spLay, () => this.canFocus(), this.sys);
|
|
22418
|
-
return t.#s = this.#s, t.#i.style.cssText = this.#i.style.cssText, t.#v = this.#v, t.name = this.name, t.#d(), t.#
|
|
22413
|
+
return t.#s = this.#s, t.#i.style.cssText = this.#i.style.cssText, t.#v = this.#v, t.name = this.name, t.#d(), t.#h.sethArg(this.#h.gethArg()), t.#y = this.#y, t.#R = this.#R, t.#X = this.#X, t.#c = this.#c, t.#g = this.#g, t.#f = this.#f, this.destroy(), t;
|
|
22419
22414
|
}
|
|
22420
22415
|
record() {
|
|
22421
22416
|
return {
|
|
22422
22417
|
infTL: this.#s,
|
|
22423
22418
|
cssText: this.#i.style.cssText,
|
|
22424
22419
|
left: this.#v,
|
|
22425
|
-
idc_hArg: this.#
|
|
22420
|
+
idc_hArg: this.#h.gethArg(),
|
|
22426
22421
|
ch_filter: this.#y,
|
|
22427
22422
|
fi_easing: this.#R,
|
|
22428
22423
|
fo_easing: this.#X,
|
|
@@ -22432,7 +22427,7 @@ class TxtStage extends Container {
|
|
|
22432
22427
|
};
|
|
22433
22428
|
}
|
|
22434
22429
|
playback(t) {
|
|
22435
|
-
this.#s = t.infTL, this.position.set(this.#s.pad_left, this.#s.pad_top), this.#i.style.cssText = t.cssText, this.#v = t.left, this.#d(), this.#
|
|
22430
|
+
this.#s = t.infTL, this.position.set(this.#s.pad_left, this.#s.pad_top), this.#i.style.cssText = t.cssText, this.#v = t.left, this.#d(), this.#h.sethArg(t.idc_hArg), this.#y = t.ch_filter, this.#R = t.fi_easing, this.#X = t.fo_easing, this.#c = t.break_fixed ?? !1, this.#g = t.break_fixed_left ?? 0, this.#f = t.break_fixed_top ?? 0;
|
|
22436
22431
|
}
|
|
22437
22432
|
#M = void 0;
|
|
22438
22433
|
snapshot(t, e) {
|
|
@@ -22449,12 +22444,12 @@ class TxtStage extends Container {
|
|
|
22449
22444
|
this.#M && (this.#n.removeChild(this.#M), this.#M = void 0);
|
|
22450
22445
|
}
|
|
22451
22446
|
makeDesignCast(t) {
|
|
22452
|
-
t(this.#
|
|
22453
|
-
const e = this.#
|
|
22447
|
+
t(this.#h);
|
|
22448
|
+
const e = this.#h.gethArg();
|
|
22454
22449
|
this.#p.sethArg({ ...e, ":id_dc": e[":id_tag"] + "_pad" }), t(this.#p);
|
|
22455
22450
|
}
|
|
22456
22451
|
showDesignCast() {
|
|
22457
|
-
this.#
|
|
22452
|
+
this.#h.visible = !0, this.#p.visible = !0;
|
|
22458
22453
|
}
|
|
22459
22454
|
dump() {
|
|
22460
22455
|
const t = [], e = this.#i.style, r = e.length;
|
|
@@ -22469,20 +22464,20 @@ class TxtStage extends Container {
|
|
|
22469
22464
|
}
|
|
22470
22465
|
}
|
|
22471
22466
|
class RubySpliter {
|
|
22472
|
-
static #
|
|
22467
|
+
static #t = "ヽ";
|
|
22473
22468
|
static setting(t) {
|
|
22474
|
-
t.sesame && (RubySpliter.#
|
|
22469
|
+
t.sesame && (RubySpliter.#t = t.sesame);
|
|
22475
22470
|
}
|
|
22476
22471
|
static getSesame() {
|
|
22477
|
-
return RubySpliter.#
|
|
22472
|
+
return RubySpliter.#t;
|
|
22478
22473
|
}
|
|
22479
22474
|
static destroy() {
|
|
22480
|
-
RubySpliter.#
|
|
22475
|
+
RubySpliter.#t = "ヽ";
|
|
22481
22476
|
}
|
|
22482
|
-
#
|
|
22477
|
+
#e = () => {
|
|
22483
22478
|
};
|
|
22484
22479
|
init(t) {
|
|
22485
|
-
this.#
|
|
22480
|
+
this.#e = t;
|
|
22486
22481
|
}
|
|
22487
22482
|
/*
|
|
22488
22483
|
★Unicodeで「漢字」の正規表現 – ものかの http://tama-san.com/kanji-regex/
|
|
@@ -22526,32 +22521,32 @@ class RubySpliter {
|
|
|
22526
22521
|
continue;
|
|
22527
22522
|
}
|
|
22528
22523
|
if (D) {
|
|
22529
|
-
this.#
|
|
22524
|
+
this.#e(D.slice(1), "");
|
|
22530
22525
|
continue;
|
|
22531
22526
|
}
|
|
22532
22527
|
for (const U of Array.from(B))
|
|
22533
|
-
this.#
|
|
22528
|
+
this.#e(U, "");
|
|
22534
22529
|
}
|
|
22535
22530
|
}
|
|
22536
22531
|
putTxtRb(t, e) {
|
|
22537
22532
|
if (/^\w+|{"/.test(e)) {
|
|
22538
|
-
this.#
|
|
22533
|
+
this.#e(t, e);
|
|
22539
22534
|
return;
|
|
22540
22535
|
}
|
|
22541
22536
|
const r = Array.from(t), N = r.length;
|
|
22542
22537
|
if (/^\*.?$/.test(e)) {
|
|
22543
|
-
const $ = "center|" + (e === "*" ? RubySpliter.#
|
|
22538
|
+
const $ = "center|" + (e === "*" ? RubySpliter.#t : e.charAt(1));
|
|
22544
22539
|
for (let U = 0; U < N; ++U)
|
|
22545
|
-
this.#
|
|
22540
|
+
this.#e(r[U], $);
|
|
22546
22541
|
return;
|
|
22547
22542
|
}
|
|
22548
22543
|
if (N === 1 || e.indexOf(" ") === -1) {
|
|
22549
|
-
this.#
|
|
22544
|
+
this.#e(t, decodeURIComponent(e));
|
|
22550
22545
|
return;
|
|
22551
22546
|
}
|
|
22552
22547
|
const k = e.split(" "), D = k.length, B = D > N ? D : N;
|
|
22553
22548
|
for (let $ = 0; $ < B; ++$)
|
|
22554
|
-
this.#
|
|
22549
|
+
this.#e(
|
|
22555
22550
|
$ < N ? r[$] : "",
|
|
22556
22551
|
$ < D ? decodeURIComponent(k[$]) : ""
|
|
22557
22552
|
);
|
|
@@ -22576,7 +22571,7 @@ class Button extends Container {
|
|
|
22576
22571
|
b_pic: "",
|
|
22577
22572
|
width: 0,
|
|
22578
22573
|
height: 0
|
|
22579
|
-
}, this.getBtnBounds = () => (this.#r.x = this.#n.x, this.#r.y = this.#n.y, this.#r), this.#n.enabled && e.button(this.hArg, this, () => this.normal(), () => this.#
|
|
22574
|
+
}, this.getBtnBounds = () => (this.#r.x = this.#n.x, this.#r.y = this.#n.y, this.#r), this.#n.enabled && e.button(this.hArg, this, () => this.normal(), () => this.#l(), () => this.#h()), t.pic) {
|
|
22580
22575
|
this.#n.type = "pic", this.#i = new PicBtnDesignCast(this, t), GrpLayer.csv2Sprites(
|
|
22581
22576
|
t.pic,
|
|
22582
22577
|
this,
|
|
@@ -22621,7 +22616,7 @@ class Button extends Container {
|
|
|
22621
22616
|
(z) => {
|
|
22622
22617
|
Layer.setBlendmode(this, t), z && r();
|
|
22623
22618
|
}
|
|
22624
|
-
)), B.name = JSON.stringify(this.#n), this.addChild(B), this.#r.width = B.width, this.#r.height = B.height, t.b_pic || Layer.setBlendmode(this, t), Button.#
|
|
22619
|
+
)), B.name = JSON.stringify(this.#n), this.addChild(B), this.#r.width = B.width, this.#r.height = B.height, t.b_pic || Layer.setBlendmode(this, t), Button.#t(this, B), !this.#n.enabled) {
|
|
22625
22620
|
$ || r();
|
|
22626
22621
|
return;
|
|
22627
22622
|
}
|
|
@@ -22647,17 +22642,17 @@ class Button extends Container {
|
|
|
22647
22642
|
}
|
|
22648
22643
|
else
|
|
22649
22644
|
H.dropShadow = !1;
|
|
22650
|
-
this.normal = () => B.style = D, this.#
|
|
22645
|
+
this.normal = () => B.style = D, this.#l = () => N() ? (B.style = U, !0) : !1, this.#h = () => B.style = H, $ || r();
|
|
22651
22646
|
}
|
|
22652
22647
|
static fontFamily = "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif";
|
|
22653
|
-
static #
|
|
22648
|
+
static #t = (t, e) => {
|
|
22654
22649
|
};
|
|
22655
|
-
static #
|
|
22650
|
+
static #e = (t, e, r, N) => {
|
|
22656
22651
|
};
|
|
22657
22652
|
static init(t) {
|
|
22658
|
-
t.oCfg.debug.masume && (Button.#
|
|
22653
|
+
t.oCfg.debug.masume && (Button.#t = (e, r) => e.addChild(
|
|
22659
22654
|
new Graphics().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(r.x, r.y, r.width, r.height).endFill()
|
|
22660
|
-
), Button.#
|
|
22655
|
+
), Button.#e = (e, r, N, k) => e.addChild(
|
|
22661
22656
|
new Graphics().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(r.x, r.y, N, k).endFill()
|
|
22662
22657
|
));
|
|
22663
22658
|
}
|
|
@@ -22693,26 +22688,26 @@ class Button extends Container {
|
|
|
22693
22688
|
}
|
|
22694
22689
|
normal = () => {
|
|
22695
22690
|
};
|
|
22696
|
-
#
|
|
22697
|
-
#
|
|
22691
|
+
#l = () => !1;
|
|
22692
|
+
#h = () => {
|
|
22698
22693
|
};
|
|
22699
22694
|
#p(t) {
|
|
22700
22695
|
this.#n.alpha = t.alpha = argChk_Num(this.hArg, "alpha", t.alpha), this.#i.setSp(t);
|
|
22701
22696
|
const e = t.width / 3, r = this.#n.enabled ? e : t.width, N = t.height, k = t.texture.baseTexture, D = new Texture(k, new Rectangle(0, 0, e, N)), B = new Texture(k, new Rectangle(e, 0, e, N)), $ = new Texture(k, new Rectangle(e * 2, 0, e, N)), U = () => t.texture = D;
|
|
22702
|
-
this.#n.enabled && U(), this.normal = U, this.#
|
|
22697
|
+
this.#n.enabled && U(), this.normal = U, this.#l = () => this.canFocus() ? (t.texture = $, !0) : !1, this.#h = () => t.texture = B, "width" in this.hArg ? (this.#n.width = uint(this.hArg.width), this.scale.x *= this.#n.width / r) : this.#n.width = r, "height" in this.hArg ? (this.#n.height = uint(this.hArg.height), this.scale.y *= this.#n.height / N) : this.#n.height = N, t.name = JSON.stringify(this.#n), Button.#e(this, t, r, N);
|
|
22703
22698
|
}
|
|
22704
22699
|
}
|
|
22705
22700
|
class TxtLayer extends Layer {
|
|
22706
|
-
static #e;
|
|
22707
22701
|
static #t;
|
|
22702
|
+
static #e;
|
|
22708
22703
|
static #r;
|
|
22709
22704
|
static #i;
|
|
22710
22705
|
static init(t, e, r, N, k, D) {
|
|
22711
|
-
TxtLayer.#
|
|
22706
|
+
TxtLayer.#t = t, TxtStage.init(t, D), TxtLayer.#e = r, TxtLayer.#i = N, TxtLayer.#r = k, r.setDoRecProc(TxtLayer.chgDoRec), e.autowc = (B) => TxtLayer.#g(B), e.autowc({ enabled: !1, text: "", time: 0 }), e.ch_in_style = (B) => TxtLayer.#n(B), e.ch_out_style = (B) => TxtLayer.#o(B), TxtStage.initChStyle(), initStyle(), addStyle(
|
|
22712
22707
|
t.matchPath(".+", SEARCH_PATH_ARG_EXT.FONT).flatMap((B) => Object.values(B).map(($) => `
|
|
22713
22708
|
@font-face {
|
|
22714
22709
|
font-family: '${$}';
|
|
22715
|
-
src: url('${this.#
|
|
22710
|
+
src: url('${this.#t.searchPath($, SEARCH_PATH_ARG_EXT.FONT)}');
|
|
22716
22711
|
}
|
|
22717
22712
|
`)).join("") + `
|
|
22718
22713
|
.sn_tx {
|
|
@@ -22787,29 +22782,29 @@ class TxtLayer extends Layer {
|
|
|
22787
22782
|
}
|
|
22788
22783
|
`), !1;
|
|
22789
22784
|
}
|
|
22790
|
-
static #h;
|
|
22791
22785
|
static #l;
|
|
22786
|
+
static #h;
|
|
22792
22787
|
static #p;
|
|
22793
22788
|
static setEvtMng(t, e, r) {
|
|
22794
|
-
TxtLayer.#
|
|
22789
|
+
TxtLayer.#l = t, TxtLayer.#h = e, TxtLayer.#p = r, TxtStage.setEvtMng(e);
|
|
22795
22790
|
}
|
|
22796
22791
|
// 文字ごとのウェイト
|
|
22797
22792
|
static #s = !1;
|
|
22798
22793
|
static #c = {};
|
|
22799
22794
|
static #g(t) {
|
|
22800
|
-
TxtLayer.#s = argChk_Boolean(t, "enabled", TxtLayer.#s), TxtLayer.#
|
|
22795
|
+
TxtLayer.#s = argChk_Boolean(t, "enabled", TxtLayer.#s), TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.enabled", TxtLayer.#s);
|
|
22801
22796
|
const { text: e } = t;
|
|
22802
22797
|
if ("text" in t != "time" in t)
|
|
22803
22798
|
throw "[autowc] textとtimeは同時指定必須です";
|
|
22804
|
-
if (TxtLayer.#
|
|
22805
|
-
return TxtLayer.#
|
|
22799
|
+
if (TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.text", e), !e)
|
|
22800
|
+
return TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.time", ""), !1;
|
|
22806
22801
|
const r = e.length;
|
|
22807
22802
|
if (TxtLayer.#s && r === 0)
|
|
22808
22803
|
throw '[autowc] enabled === false かつ text === "" は許されません';
|
|
22809
22804
|
const N = String(t.time).split(",");
|
|
22810
22805
|
if (N.length !== r)
|
|
22811
22806
|
throw "[autowc] text文字数とtimeに記述された待ち時間(コンマ区切り)は同数にして下さい";
|
|
22812
|
-
return TxtLayer.#c = {}, N.forEach((k, D) => TxtLayer.#c[e[D]] = uint(k)), TxtLayer.#
|
|
22807
|
+
return TxtLayer.#c = {}, N.forEach((k, D) => TxtLayer.#c[e[D]] = uint(k)), TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.time", t.time), !1;
|
|
22813
22808
|
}
|
|
22814
22809
|
// バック
|
|
22815
22810
|
#f = 0;
|
|
@@ -22885,7 +22880,7 @@ class TxtLayer extends Layer {
|
|
|
22885
22880
|
for (const e of this.#T.children)
|
|
22886
22881
|
e.alpha = this.spLay.alpha;
|
|
22887
22882
|
return this.#I(t), this.#B(t), this.#P(t, (e) => {
|
|
22888
|
-
e && TxtLayer.#
|
|
22883
|
+
e && TxtLayer.#l.resume();
|
|
22889
22884
|
});
|
|
22890
22885
|
}
|
|
22891
22886
|
#I(t) {
|
|
@@ -22918,7 +22913,7 @@ class TxtLayer extends Layer {
|
|
|
22918
22913
|
if ("back_clear" in t)
|
|
22919
22914
|
return argChk_Boolean(t, "back_clear", !1) && (this.#f = 0, this.#d = 0, this.#v = !1, this.#b = ""), e(!1), !1;
|
|
22920
22915
|
this.#d = argChk_Num(t, "b_alpha", this.#d), this.#v = argChk_Boolean(t, "b_alpha_isfixed", this.#v);
|
|
22921
|
-
const r = (this.#v ? 1 : Number(TxtLayer.#
|
|
22916
|
+
const r = (this.#v ? 1 : Number(TxtLayer.#e.getVal("sys:TextLayer.Back.Alpha"))) * this.#d;
|
|
22922
22917
|
if (t.b_pic) {
|
|
22923
22918
|
if (this.#b !== t.b_pic)
|
|
22924
22919
|
return this.#b = t.b_pic, this.#u && (this.spLay.removeChild(this.#u), this.#u.destroy()), GrpLayer.csv2Sprites(this.#b, this.spLay, (N) => {
|
|
@@ -23018,7 +23013,7 @@ class TxtLayer extends Layer {
|
|
|
23018
23013
|
}
|
|
23019
23014
|
#k = !1;
|
|
23020
23015
|
#M = (t, e) => {
|
|
23021
|
-
TxtLayer.#
|
|
23016
|
+
TxtLayer.#t.oCfg.debug.putCh && console.log(`🖊 文字表示 text:\`${t}\` ruby:\`${e}\` name:\`${this.name_}\``);
|
|
23022
23017
|
const r = e.split("|");
|
|
23023
23018
|
let N = "";
|
|
23024
23019
|
const [k, ...D] = r, B = D.join("|");
|
|
@@ -23047,7 +23042,7 @@ class TxtLayer extends Layer {
|
|
|
23047
23042
|
this.#Y(), this.#k ? (this.isCur && TxtLayer.#i.recText(
|
|
23048
23043
|
this.#U.join("").replace(/^<ruby> <rt> <\/rt><\/ruby>(<br\/>)+/, "").replaceAll(/style='(anim\S+ \S+?;\s*)+/g, "style='").replaceAll(/( style=''| data-(add|arg|cmd)='.+?'|\n+|\t+)/g, "").replaceAll(/class='sn_ch .+?'/g, "class='sn_ch'").replaceAll("display: none;", "").replaceAll("class='offrec'", "style='display: none;'")
|
|
23049
23044
|
// 囲んだ領域は履歴で非表示
|
|
23050
|
-
), this.#a.goTxt(this.#U, this.#W === 0), this.#k = !1, this.#W = 0) : this.isCur && TxtLayer.#
|
|
23045
|
+
), this.#a.goTxt(this.#U, this.#W === 0), this.#k = !1, this.#W = 0) : this.isCur && TxtLayer.#h.noticeCompTxt();
|
|
23051
23046
|
return;
|
|
23052
23047
|
case "add":
|
|
23053
23048
|
{
|
|
@@ -23080,7 +23075,7 @@ class TxtLayer extends Layer {
|
|
|
23080
23075
|
this.#V = !1, this.#k = !0;
|
|
23081
23076
|
{
|
|
23082
23077
|
const { t: $, r: U = "", wait: H = null, style: z = "", r_style: V = "" } = JSON.parse(B);
|
|
23083
|
-
TxtLayer.#
|
|
23078
|
+
TxtLayer.#e.doRecLog() && (this.#H += t + (e ? `《${e}》` : ""), this.#K += $);
|
|
23084
23079
|
const X = CmnLib.isSafari ? U.replaceAll(/[A-Za-z0-9]/g, (K) => String.fromCharCode(K.charCodeAt(0) + 65248)) : U, { cl: q, sty: W, lnk: Y } = this.#D(!0, H);
|
|
23085
23080
|
N = `<span${q} style='${W}${this.#x($)} ${z}'><ruby><span${Y} style='${W} display: inline;
|
|
23086
23081
|
text-combine-upright: all;
|
|
@@ -23119,7 +23114,7 @@ text-combine-upright: all;
|
|
|
23119
23114
|
};
|
|
23120
23115
|
#q(t, e, r) {
|
|
23121
23116
|
const N = t === " " ? " " : t;
|
|
23122
|
-
TxtLayer.#
|
|
23117
|
+
TxtLayer.#e.doRecLog() && (this.#H += N + (e ? `《${e}》` : ""), t !== " " && (this.#K += t));
|
|
23123
23118
|
const { cl: k, sty: D, lnk: B } = this.#D(!0, null, t);
|
|
23124
23119
|
return e ? `<span${k} style='${D} ${this.#x(t)}'><ruby>${// 文字個別に出現させるため以下にも ${cl} が必要
|
|
23125
23120
|
Array.from(t).map(($, U) => `<span${k}${B} style='${U > 0 ? this.#D(!0, null, t).sty : D} display: inline;'>${$ === " " ? " " : $}</span>`).join("")}<rt${B}${this.mkStyle_r_align(
|
|
@@ -23132,7 +23127,7 @@ text-combine-upright: all;
|
|
|
23132
23127
|
#D(t, e, r = `
|
|
23133
23128
|
`) {
|
|
23134
23129
|
const N = this.#E ? e ?? this.#A.at(0)?.o.wait ?? (TxtLayer.#s ? TxtLayer.#c[r.at(0) ?? ""] ?? 0 : LayerMng.msecChWait) : 0;
|
|
23135
|
-
TxtLayer.#
|
|
23130
|
+
TxtLayer.#h.isSkipping() ? this.#W = 0 : t && this.#E && (this.#W += Number(N));
|
|
23136
23131
|
const k = `data-add='{"ch_in_style":"${this.#S}", "ch_out_style":"${this.#N}"}'`;
|
|
23137
23132
|
return {
|
|
23138
23133
|
cl: ` class='sn_ch${N > 0 ? ` sn_ch_in_${this.#S}` : ""}'`,
|
|
@@ -23187,7 +23182,7 @@ text-combine-upright: all;
|
|
|
23187
23182
|
}
|
|
23188
23183
|
addButton = (t) => new Promise((e) => {
|
|
23189
23184
|
t.key = `btn=[${this.#T.children.length}] ` + this.name_, t[":id_tag"] = t.key.slice(0, -7), argChk_Boolean(t, "hint_tate", this.#a.tategaki);
|
|
23190
|
-
const r = new Button(t, TxtLayer.#
|
|
23185
|
+
const r = new Button(t, TxtLayer.#h, () => e(), () => this.canFocus());
|
|
23191
23186
|
r.name = JSON.stringify(t).replaceAll('"', "'"), this.#T.addChild(r);
|
|
23192
23187
|
});
|
|
23193
23188
|
canFocus() {
|
|
@@ -23251,17 +23246,17 @@ text-combine-upright: all;
|
|
|
23251
23246
|
}
|
|
23252
23247
|
class FrameMng {
|
|
23253
23248
|
constructor(t, e, r, N, k, D) {
|
|
23254
|
-
this.cfg = t, this.appPixi = r, this.val = N, this.main = k, this.sys = D, e.add_frame = (B) => this.#r(B), e.let_frame = (B) => this.#o(B), e.set_frame = (B) => this.#
|
|
23249
|
+
this.cfg = t, this.appPixi = r, this.val = N, this.main = k, this.sys = D, e.add_frame = (B) => this.#r(B), e.let_frame = (B) => this.#o(B), e.set_frame = (B) => this.#l(B), e.frame = (B) => this.#p(B), e.tsy_frame = (B) => this.#s(B);
|
|
23255
23250
|
}
|
|
23256
|
-
#
|
|
23251
|
+
#t;
|
|
23257
23252
|
setEvtMng(t) {
|
|
23258
|
-
this.#
|
|
23253
|
+
this.#t = t;
|
|
23259
23254
|
}
|
|
23260
|
-
#
|
|
23255
|
+
#e = /* @__PURE__ */ Object.create(null);
|
|
23261
23256
|
destroy() {
|
|
23262
|
-
for (const t of Object.values(this.#
|
|
23257
|
+
for (const t of Object.values(this.#e))
|
|
23263
23258
|
t.parentElement.removeChild(t);
|
|
23264
|
-
this.#
|
|
23259
|
+
this.#e = /* @__PURE__ */ Object.create(null);
|
|
23265
23260
|
}
|
|
23266
23261
|
// HTMLフレーム
|
|
23267
23262
|
// フレーム追加
|
|
@@ -23286,13 +23281,13 @@ class FrameMng {
|
|
|
23286
23281
|
W?.();
|
|
23287
23282
|
}), X.load((q, W) => {
|
|
23288
23283
|
const Y = document.getElementById(e);
|
|
23289
|
-
this.#
|
|
23284
|
+
this.#e[e] = Y, this.#i[e] = !1, Y.srcdoc = String(W[r]?.data).replace("sn_repRes();", "").replaceAll(
|
|
23290
23285
|
/\s(?:src|href)=(["'])(\S+)\1/g,
|
|
23291
23286
|
(K, Z, J) => J.slice(0, 3) === "../" ? this.sys.cur + J.slice(4) : K.replace(Z, Z + V.slice(0, V.lastIndexOf("/") + 1))
|
|
23292
23287
|
), Y.onload = () => {
|
|
23293
23288
|
this.val.setVal_Nochk("tmp", $, !0), this.val.setVal_Nochk("tmp", $ + ".alpha", N), this.val.setVal_Nochk("tmp", $ + ".x", z.x), this.val.setVal_Nochk("tmp", $ + ".y", z.y), this.val.setVal_Nochk("tmp", $ + ".scale_x", k), this.val.setVal_Nochk("tmp", $ + ".scale_y", D), this.val.setVal_Nochk("tmp", $ + ".rotate", B), this.val.setVal_Nochk("tmp", $ + ".width", z.width), this.val.setVal_Nochk("tmp", $ + ".height", z.height), this.val.setVal_Nochk("tmp", $ + ".visible", U);
|
|
23294
23289
|
const K = Y.contentWindow;
|
|
23295
|
-
this.#
|
|
23290
|
+
this.#t.resvFlameEvent(K), K.sn_repRes?.((Z) => GrpLayer.loadPic2Img(Z.dataset.src ?? "", Z)), this.main.resume();
|
|
23296
23291
|
};
|
|
23297
23292
|
}), !0;
|
|
23298
23293
|
}
|
|
@@ -23310,7 +23305,7 @@ class FrameMng {
|
|
|
23310
23305
|
);
|
|
23311
23306
|
}
|
|
23312
23307
|
cvsResize() {
|
|
23313
|
-
for (const [t, e] of Object.entries(this.#
|
|
23308
|
+
for (const [t, e] of Object.entries(this.#e)) {
|
|
23314
23309
|
const r = "const.sn.frm." + t, N = Number(this.val.getVal(r + ".x")), k = Number(this.val.getVal(r + ".y")), D = Number(this.val.getVal(r + ".width")), B = Number(this.val.getVal(r + ".height"));
|
|
23315
23310
|
e.style.left = `${this.sys.ofsLeft4elm + N * this.sys.cvsScale}px`, e.style.top = `${this.sys.ofsTop4elm + k * this.sys.cvsScale}px`, e.width = String(D * this.sys.cvsScale), e.height = String(B * this.sys.cvsScale);
|
|
23316
23311
|
}
|
|
@@ -23339,7 +23334,7 @@ class FrameMng {
|
|
|
23339
23334
|
), !1;
|
|
23340
23335
|
}
|
|
23341
23336
|
// フレーム変数に設定
|
|
23342
|
-
#
|
|
23337
|
+
#l(t) {
|
|
23343
23338
|
const { id: e, var_name: r, text: N } = t;
|
|
23344
23339
|
if (!e)
|
|
23345
23340
|
throw "idは必須です";
|
|
@@ -23358,7 +23353,7 @@ class FrameMng {
|
|
|
23358
23353
|
return B[r] = N, !1;
|
|
23359
23354
|
}
|
|
23360
23355
|
// フレームに設定
|
|
23361
|
-
#
|
|
23356
|
+
#h = 1;
|
|
23362
23357
|
#p(t) {
|
|
23363
23358
|
const { id: e } = t;
|
|
23364
23359
|
if (!e)
|
|
@@ -23370,7 +23365,7 @@ class FrameMng {
|
|
|
23370
23365
|
if (!this.val.getVal("tmp:" + N))
|
|
23371
23366
|
throw `frame【${e}】が読み込まれていません`;
|
|
23372
23367
|
const k = r.style;
|
|
23373
|
-
if (argChk_Boolean(t, "float", !1) ? k.zIndex = `${++this.#
|
|
23368
|
+
if (argChk_Boolean(t, "float", !1) ? k.zIndex = `${++this.#h}` : "index" in t ? k.zIndex = `${argChk_Num(t, "index", 0)}` : t.dive && (k.zIndex = `-${++this.#h}`), "alpha" in t) {
|
|
23374
23369
|
const B = k.opacity = String(t.alpha);
|
|
23375
23370
|
this.val.setVal_Nochk("tmp", N + ".alpha", B);
|
|
23376
23371
|
}
|
|
@@ -23462,7 +23457,7 @@ class LayerMng {
|
|
|
23462
23457
|
this.#d("grp|" + Y);
|
|
23463
23458
|
}), this.#n = parseColor(String(t.oCfg.init.bg_color));
|
|
23464
23459
|
const V = new Graphics();
|
|
23465
|
-
V.beginFill(this.#n, 1).lineStyle(0, this.#n).drawRect(0, 0, CmnLib.stageW, CmnLib.stageH).endFill(), this.#
|
|
23460
|
+
V.beginFill(this.#n, 1).lineStyle(0, this.#n).drawRect(0, 0, CmnLib.stageW, CmnLib.stageH).endFill(), this.#e.addChild(V.clone()), this.#r.addChild(V), this.#r.visible = !1, this.#e.name = "page:A", this.#r.name = "page:B", this.#t = r.stage, this.#t.addChild(this.#r), this.#t.addChild(this.#e), this.#t.addChild(this.#z), this.#t.addChild(this.#x), this.#t.name = "stage";
|
|
23466
23461
|
const X = (W, Y) => {
|
|
23467
23462
|
this.#f(Number(Y));
|
|
23468
23463
|
};
|
|
@@ -23471,18 +23466,18 @@ class LayerMng {
|
|
|
23471
23466
|
q("", N.getVal("tmp:sn.button.fontFamily", Button.fontFamily)), N.defValTrg("tmp:sn.button.fontFamily", q), N.defTmp("const.sn.log.json", () => JSON.stringify(
|
|
23472
23467
|
(this.#F.text = this.#F.text?.replaceAll("</span><span class='sn_ch'>", "") ?? "") ? [...this.#H, this.#F] : this.#H
|
|
23473
23468
|
)), N.defTmp("const.sn.last_page_text", () => this.currentTxtlayFore?.pageText ?? ""), N.defTmp("const.sn.last_page_plain_text", () => this.currentTxtlayFore?.pagePlainText ?? ""), CmnLib.isDbg && (DesignCast.init(r, B, D, H, U, t, this.#a), this.cvsResizeDesign = () => DesignCast.cvsResizeDesign(), B.addHook((W, Y) => {
|
|
23474
|
-
this.#
|
|
23469
|
+
this.#l[W]?.(W, Y) && delete this.#l[W];
|
|
23475
23470
|
}));
|
|
23476
23471
|
}
|
|
23477
|
-
#
|
|
23478
|
-
#
|
|
23472
|
+
#t;
|
|
23473
|
+
#e = new Container();
|
|
23479
23474
|
#r = new Container();
|
|
23480
23475
|
#i;
|
|
23481
23476
|
#n;
|
|
23482
23477
|
#o = new EventListenerCtn();
|
|
23483
23478
|
cvsResizeDesign() {
|
|
23484
23479
|
}
|
|
23485
|
-
#
|
|
23480
|
+
#l = {
|
|
23486
23481
|
attach: (t) => !1,
|
|
23487
23482
|
continue: (t) => !1,
|
|
23488
23483
|
disconnect: (t) => !1,
|
|
@@ -23496,23 +23491,23 @@ class LayerMng {
|
|
|
23496
23491
|
_replaceToken: (t, e) => !1,
|
|
23497
23492
|
_selectNode: (t, e) => (this.#s(e.node), !1)
|
|
23498
23493
|
};
|
|
23499
|
-
#
|
|
23494
|
+
#h = "";
|
|
23500
23495
|
#p = "";
|
|
23501
23496
|
#s(t) {
|
|
23502
|
-
[this.#
|
|
23503
|
-
const e = this.#a[this.#
|
|
23497
|
+
[this.#h, this.#p = ""] = t.split("/");
|
|
23498
|
+
const e = this.#a[this.#h];
|
|
23504
23499
|
e && (this.#p ? e.fore.showDesignCastChildren() : e.fore.showDesignCast());
|
|
23505
23500
|
}
|
|
23506
23501
|
getFrmDisabled = (t) => this.#i.getFrmDisabled(t);
|
|
23507
23502
|
#c = void 0;
|
|
23508
23503
|
cover(t, e = 0) {
|
|
23509
|
-
this.#c && (this.#
|
|
23504
|
+
this.#c && (this.#t.removeChild(this.#c), this.#c.destroy(), this.#c = void 0), t && this.#t.addChild(
|
|
23510
23505
|
(this.#c = new Graphics()).beginFill(e).lineStyle(0, e).drawRect(0, 0, CmnLib.stageW, CmnLib.stageH).endFill()
|
|
23511
23506
|
);
|
|
23512
23507
|
}
|
|
23513
23508
|
#g;
|
|
23514
23509
|
setEvtMng(t) {
|
|
23515
|
-
this.#g = t, this.#i.setEvtMng(t), GrpLayer.setEvtMng(t), CmnTween.init(t, this.
|
|
23510
|
+
this.#g = t, this.#i.setEvtMng(t), GrpLayer.setEvtMng(t), CmnTween.init(t, this.appPixi);
|
|
23516
23511
|
}
|
|
23517
23512
|
before_destroy() {
|
|
23518
23513
|
for (const t of Object.values(this.#a))
|
|
@@ -23564,7 +23559,7 @@ class LayerMng {
|
|
|
23564
23559
|
this.#r.visible = !0;
|
|
23565
23560
|
for (const H of this.#L)
|
|
23566
23561
|
D.render(H, { clear: !1 });
|
|
23567
|
-
this.#r.visible = !1, this.#z.visible = !0, this.#
|
|
23562
|
+
this.#r.visible = !1, this.#z.visible = !0, this.#e.filters = this.#x.filters, this.#e.visible = !0, D.render(this.#e, { clear: !1 }), this.#e.visible = !1, this.#e.filters = [], U();
|
|
23568
23563
|
}));
|
|
23569
23564
|
else
|
|
23570
23565
|
for (const U of this.#C(t.layer))
|
|
@@ -23573,7 +23568,7 @@ class LayerMng {
|
|
|
23573
23568
|
);
|
|
23574
23569
|
return Promise.allSettled(B).then(async () => {
|
|
23575
23570
|
const U = RenderTexture.create({ width: D.width, height: D.height });
|
|
23576
|
-
if (D.render(this.#
|
|
23571
|
+
if (D.render(this.#t, { renderTexture: U }), await this.sys.savePic(
|
|
23577
23572
|
r,
|
|
23578
23573
|
D.plugins.extract.base64(Sprite.from(U))
|
|
23579
23574
|
), !CmnTween.isTrans)
|
|
@@ -23615,7 +23610,7 @@ class LayerMng {
|
|
|
23615
23610
|
if (!r)
|
|
23616
23611
|
throw "clsは必須です";
|
|
23617
23612
|
const N = { isWait: !1 };
|
|
23618
|
-
switch (this.#a[e] = new Pages(e, r, this.#
|
|
23613
|
+
switch (this.#a[e] = new Pages(e, r, this.#e, this.#r, t, this.sys, this.val, N), this.#m.push(e), r) {
|
|
23619
23614
|
case "txt":
|
|
23620
23615
|
this.#y || (this.#j = () => {
|
|
23621
23616
|
}, this.#D = this.#W, this.#V = this.#U, this.hTag.current({ layer: e }), this.goTxt = () => {
|
|
@@ -23647,9 +23642,9 @@ class LayerMng {
|
|
|
23647
23642
|
#T(t) {
|
|
23648
23643
|
const e = this.#Y(t), r = this.#a[e], N = r.back.spLay, k = r.fore.spLay;
|
|
23649
23644
|
if (argChk_Boolean(t, "float", !1))
|
|
23650
|
-
this.#r.setChildIndex(N, this.#r.children.length - 1), this.#
|
|
23645
|
+
this.#r.setChildIndex(N, this.#r.children.length - 1), this.#e.setChildIndex(k, this.#e.children.length - 1), this.#I();
|
|
23651
23646
|
else if (t.index)
|
|
23652
|
-
argChk_Num(t, "index", 0) && (this.#r.setChildIndex(N, t.index), this.#
|
|
23647
|
+
argChk_Num(t, "index", 0) && (this.#r.setChildIndex(N, t.index), this.#e.setChildIndex(k, t.index), this.#I());
|
|
23653
23648
|
else if (t.dive) {
|
|
23654
23649
|
const { dive: D } = t;
|
|
23655
23650
|
let B = 0;
|
|
@@ -23658,8 +23653,8 @@ class LayerMng {
|
|
|
23658
23653
|
const $ = this.#a[D];
|
|
23659
23654
|
if (!$)
|
|
23660
23655
|
throw "[lay] 属性 dive【" + D + "】が不正です。レイヤーがありません";
|
|
23661
|
-
const U = $.back, H = $.fore, z = this.#r.getChildIndex(U.spLay), V = this.#
|
|
23662
|
-
B = z < V ? z : V, B > this.#r.getChildIndex(N) && --B, this.#
|
|
23656
|
+
const U = $.back, H = $.fore, z = this.#r.getChildIndex(U.spLay), V = this.#e.getChildIndex(H.spLay);
|
|
23657
|
+
B = z < V ? z : V, B > this.#r.getChildIndex(N) && --B, this.#e.setChildIndex(k, B), this.#r.setChildIndex(N, B), this.#I();
|
|
23663
23658
|
}
|
|
23664
23659
|
return t[":id_tag"] = r.fore.name.slice(0, -7), this.scrItr.recodeDesign(t), r.lay(t);
|
|
23665
23660
|
}
|
|
@@ -23748,9 +23743,9 @@ void main(void) {
|
|
|
23748
23743
|
}, Y();
|
|
23749
23744
|
};
|
|
23750
23745
|
}
|
|
23751
|
-
this.#O.resize(CmnLib.stageW, CmnLib.stageH), this.appPixi.renderer.render(this.#
|
|
23746
|
+
this.#O.resize(CmnLib.stageW, CmnLib.stageH), this.appPixi.renderer.render(this.#e, { renderTexture: this.#O });
|
|
23752
23747
|
let B = () => {
|
|
23753
|
-
this.#
|
|
23748
|
+
this.#e.visible = !0, this.appPixi.renderer.render(this.#e, { renderTexture: this.#O }), this.#e.visible = !1;
|
|
23754
23749
|
};
|
|
23755
23750
|
if (!N.some((Y) => Y.containMovement)) {
|
|
23756
23751
|
let Y = B;
|
|
@@ -23764,17 +23759,17 @@ void main(void) {
|
|
|
23764
23759
|
};
|
|
23765
23760
|
this.#x.alpha = 1;
|
|
23766
23761
|
const U = () => {
|
|
23767
|
-
this.appPixi.ticker?.remove($), [this.#
|
|
23762
|
+
this.appPixi.ticker?.remove($), [this.#e, this.#r] = [this.#r, this.#e];
|
|
23768
23763
|
const Y = [];
|
|
23769
23764
|
for (const [K, Z] of Object.entries(this.#a)) {
|
|
23770
23765
|
if (r[K]) {
|
|
23771
23766
|
Z.transPage(Y);
|
|
23772
23767
|
continue;
|
|
23773
23768
|
}
|
|
23774
|
-
const { fore: { spLay: J }, back: { spLay: tt } } = Z, et = this.#
|
|
23775
|
-
this.#
|
|
23769
|
+
const { fore: { spLay: J }, back: { spLay: tt } } = Z, et = this.#e.getChildIndex(tt);
|
|
23770
|
+
this.#e.removeChild(tt), this.#r.removeChild(J), this.#e.addChildAt(J, et), this.#r.addChildAt(tt, et);
|
|
23776
23771
|
}
|
|
23777
|
-
Promise.allSettled(Y), this.#
|
|
23772
|
+
Promise.allSettled(Y), this.#e.visible = !0, this.#r.visible = !1, this.#z.visible = !1, this.#x.visible = !1;
|
|
23778
23773
|
};
|
|
23779
23774
|
if (argChk_Num(t, "time", 0) === 0 || this.#g.isSkipping())
|
|
23780
23775
|
return U(), !1;
|
|
@@ -23814,7 +23809,7 @@ void main(void) {
|
|
|
23814
23809
|
}
|
|
23815
23810
|
#R(t = "") {
|
|
23816
23811
|
return this.#C(t).sort((e, r) => {
|
|
23817
|
-
const N = this.#
|
|
23812
|
+
const N = this.#e.getChildIndex(this.#a[e].fore.spLay), k = this.#e.getChildIndex(this.#a[r].fore.spLay);
|
|
23818
23813
|
return N < k ? -1 : N > k ? 1 : 0;
|
|
23819
23814
|
});
|
|
23820
23815
|
}
|
|
@@ -23827,13 +23822,13 @@ void main(void) {
|
|
|
23827
23822
|
N.push(this.#a[H].fore.spLay);
|
|
23828
23823
|
this.#O.resize(CmnLib.stageW, CmnLib.stageH);
|
|
23829
23824
|
const k = () => {
|
|
23830
|
-
this.#
|
|
23825
|
+
this.#e.visible = !0;
|
|
23831
23826
|
for (const H of N)
|
|
23832
23827
|
this.appPixi.renderer.render(
|
|
23833
23828
|
H,
|
|
23834
23829
|
{ renderTexture: this.#O, clear: !1 }
|
|
23835
23830
|
);
|
|
23836
|
-
this.#
|
|
23831
|
+
this.#e.visible = !1;
|
|
23837
23832
|
};
|
|
23838
23833
|
this.#x.visible = !0, this.#x.alpha = 1;
|
|
23839
23834
|
const D = uint(argChk_Num(t, "hmax", 10)), B = uint(argChk_Num(t, "vmax", 10)), $ = D === 0 ? () => {
|
|
@@ -23842,7 +23837,7 @@ void main(void) {
|
|
|
23842
23837
|
return this.#x.filters = [], CmnTween.tween(CmnTween.TW_INT_TRANS, t, this.#x, { x: 0, y: 0 }, () => {
|
|
23843
23838
|
$(), U();
|
|
23844
23839
|
}, () => {
|
|
23845
|
-
this.appPixi.ticker?.remove(k), this.#
|
|
23840
|
+
this.appPixi.ticker?.remove(k), this.#e.visible = !0, this.#x.visible = !1, this.#x.x = 0, this.#x.y = 0;
|
|
23846
23841
|
}, () => {
|
|
23847
23842
|
}), this.appPixi.ticker.add(k), !1;
|
|
23848
23843
|
}
|
|
@@ -24057,50 +24052,50 @@ void main(void) {
|
|
|
24057
24052
|
const r = [], N = [];
|
|
24058
24053
|
for (const [D, { fore: B, fore: { idx: $ }, back: U, cls: H }] of Object.entries(t)) {
|
|
24059
24054
|
N.push({ layer: D, idx: $ });
|
|
24060
|
-
const z = this.#a[D] ??= new Pages(D, H, this.#
|
|
24055
|
+
const z = this.#a[D] ??= new Pages(D, H, this.#e, this.#r, {}, this.sys, this.val, { isWait: !1 });
|
|
24061
24056
|
z.fore.playback(B, r), z.back.playback(U, r);
|
|
24062
24057
|
}
|
|
24063
|
-
const k = this.#
|
|
24058
|
+
const k = this.#e.children.length;
|
|
24064
24059
|
Promise.allSettled(r).then(() => {
|
|
24065
24060
|
for (const { layer: D, idx: B } of N.sort(({ idx: $ }, { idx: U }) => $ === U ? 0 : $ < U ? -1 : 1)) {
|
|
24066
24061
|
const { fore: $, back: U } = this.#a[D];
|
|
24067
24062
|
if (!$)
|
|
24068
24063
|
return;
|
|
24069
24064
|
const H = k > B ? B : k - 1;
|
|
24070
|
-
this.#
|
|
24065
|
+
this.#e.setChildIndex($.spLay, H), this.#r.setChildIndex(U.spLay, H);
|
|
24071
24066
|
}
|
|
24072
24067
|
e();
|
|
24073
24068
|
}).catch((D) => console.error("fn:LayerMng.ts playback e:%o", D));
|
|
24074
24069
|
}
|
|
24075
24070
|
}
|
|
24076
24071
|
class FocusMng {
|
|
24077
|
-
#
|
|
24078
|
-
#
|
|
24072
|
+
#t = [];
|
|
24073
|
+
#e = -1;
|
|
24079
24074
|
#r = new EventListenerCtn();
|
|
24080
24075
|
destroy() {
|
|
24081
|
-
this.#
|
|
24076
|
+
this.#t = [], this.#e = -1, this.#r.clear();
|
|
24082
24077
|
}
|
|
24083
24078
|
add(t, e, r) {
|
|
24084
|
-
if (this.#
|
|
24079
|
+
if (this.#t.findIndex((B) => B.btn === t) >= 0)
|
|
24085
24080
|
return;
|
|
24086
24081
|
if (t instanceof Container) {
|
|
24087
24082
|
t.on("pointerdown", () => {
|
|
24088
|
-
for (let B = this.#
|
|
24089
|
-
if (this.#
|
|
24090
|
-
this.#
|
|
24083
|
+
for (let B = this.#t.length - 1; B >= 0; --B)
|
|
24084
|
+
if (this.#t[B].btn === t) {
|
|
24085
|
+
this.#e = B;
|
|
24091
24086
|
return;
|
|
24092
24087
|
}
|
|
24093
|
-
this.#
|
|
24094
|
-
}), this.#
|
|
24088
|
+
this.#e = -1;
|
|
24089
|
+
}), this.#t.push({ btn: t, on: e, off: r });
|
|
24095
24090
|
return;
|
|
24096
24091
|
}
|
|
24097
24092
|
this.#r.add(t, "focus", () => {
|
|
24098
|
-
for (let B = this.#
|
|
24099
|
-
if (this.#
|
|
24100
|
-
this.#
|
|
24093
|
+
for (let B = this.#t.length - 1; B >= 0; --B)
|
|
24094
|
+
if (this.#t[B].btn === t) {
|
|
24095
|
+
this.#e = B;
|
|
24101
24096
|
return;
|
|
24102
24097
|
}
|
|
24103
|
-
this.#
|
|
24098
|
+
this.#e = -1;
|
|
24104
24099
|
});
|
|
24105
24100
|
let N = (B) => {
|
|
24106
24101
|
}, k = t.localName === "button" || t.localName === "a" ? (B) => !B.isTrusted && B.key === "Enter" : (B) => B.key === "Enter";
|
|
@@ -24135,11 +24130,11 @@ class FocusMng {
|
|
|
24135
24130
|
}
|
|
24136
24131
|
N(B);
|
|
24137
24132
|
}
|
|
24138
|
-
}, { passive: !0 }), t.hasAttribute("tabindex") || (t.tabIndex = 0), this.#
|
|
24133
|
+
}, { passive: !0 }), t.hasAttribute("tabindex") || (t.tabIndex = 0), this.#t.push({ btn: t, on: e, off: r });
|
|
24139
24134
|
}
|
|
24140
24135
|
remove(t) {
|
|
24141
|
-
const e = this.#
|
|
24142
|
-
e < 0 || (this.#
|
|
24136
|
+
const e = this.#t.findIndex((r) => r.btn === t);
|
|
24137
|
+
e < 0 || (this.#t.splice(e, 1), this.#t.length === 0 ? this.#e = -1 : e <= this.#e && --this.#e);
|
|
24143
24138
|
}
|
|
24144
24139
|
#i(t, e) {
|
|
24145
24140
|
const r = t.querySelectorAll("input[type]"), N = r.length;
|
|
@@ -24150,54 +24145,54 @@ class FocusMng {
|
|
|
24150
24145
|
}
|
|
24151
24146
|
}
|
|
24152
24147
|
isFocus(t) {
|
|
24153
|
-
return this.#
|
|
24148
|
+
return this.#e < 0 ? !1 : this.#t[this.#e].btn === t;
|
|
24154
24149
|
}
|
|
24155
24150
|
prev() {
|
|
24156
24151
|
this.#o();
|
|
24157
|
-
const t = this.#
|
|
24152
|
+
const t = this.#t.length;
|
|
24158
24153
|
if (t !== 0) {
|
|
24159
|
-
--this.#
|
|
24154
|
+
--this.#e < 0 && (this.#e = t - 1);
|
|
24160
24155
|
for (let e = t; e >= 1; --e) {
|
|
24161
|
-
const r = (this.#
|
|
24162
|
-
if (this.#
|
|
24163
|
-
this.#
|
|
24156
|
+
const r = (this.#e + e) % t;
|
|
24157
|
+
if (this.#t[r].on()) {
|
|
24158
|
+
this.#e = r, this.#n(r);
|
|
24164
24159
|
return;
|
|
24165
24160
|
}
|
|
24166
24161
|
}
|
|
24167
|
-
this.#
|
|
24162
|
+
this.#e = -1;
|
|
24168
24163
|
}
|
|
24169
24164
|
}
|
|
24170
24165
|
next() {
|
|
24171
24166
|
this.#o();
|
|
24172
|
-
const t = this.#
|
|
24167
|
+
const t = this.#t.length;
|
|
24173
24168
|
if (t !== 0) {
|
|
24174
|
-
++this.#
|
|
24169
|
+
++this.#e >= t && (this.#e = 0);
|
|
24175
24170
|
for (let e = 0; e < t; ++e) {
|
|
24176
|
-
const r = (this.#
|
|
24177
|
-
if (this.#
|
|
24178
|
-
this.#
|
|
24171
|
+
const r = (this.#e + e) % t;
|
|
24172
|
+
if (this.#t[r].on()) {
|
|
24173
|
+
this.#e = r, this.#n(r);
|
|
24179
24174
|
return;
|
|
24180
24175
|
}
|
|
24181
24176
|
}
|
|
24182
|
-
this.#
|
|
24177
|
+
this.#e = -1;
|
|
24183
24178
|
}
|
|
24184
24179
|
}
|
|
24185
|
-
#n = CmnLib.debugLog ? (t) => console.log(`👾 <FocusMng idx:${t} btn:%o`, this.#
|
|
24180
|
+
#n = CmnLib.debugLog ? (t) => console.log(`👾 <FocusMng idx:${t} btn:%o`, this.#t[t].btn) : () => {
|
|
24186
24181
|
};
|
|
24187
24182
|
getFocus() {
|
|
24188
|
-
if (this.#
|
|
24183
|
+
if (this.#e < 0)
|
|
24189
24184
|
return null;
|
|
24190
|
-
this.#o(), this.#
|
|
24191
|
-
const t = this.#
|
|
24185
|
+
this.#o(), this.#e >= this.#t.length && (this.#e = 0);
|
|
24186
|
+
const t = this.#t[this.#e];
|
|
24192
24187
|
return t.on() ? t.btn : null;
|
|
24193
24188
|
}
|
|
24194
24189
|
blur() {
|
|
24195
|
-
this.#o(), this.#
|
|
24190
|
+
this.#o(), this.#e = -1, globalThis.focus();
|
|
24196
24191
|
}
|
|
24197
24192
|
#o() {
|
|
24198
|
-
for (let t = this.#
|
|
24199
|
-
const e = this.#
|
|
24200
|
-
!(e.btn instanceof Container) || e.btn.parent ? e.off() : this.#
|
|
24193
|
+
for (let t = this.#t.length - 1; t >= 0; --t) {
|
|
24194
|
+
const e = this.#t[t];
|
|
24195
|
+
!(e.btn instanceof Container) || e.btn.parent ? e.off() : this.#t.splice(t, 1);
|
|
24201
24196
|
}
|
|
24202
24197
|
}
|
|
24203
24198
|
}
|
|
@@ -24207,21 +24202,21 @@ function cancelAutoSkip() {
|
|
|
24207
24202
|
tagL_enabled || (tagL_enabled = !0, val.setVal_Nochk("tmp", "sn.tagL.enabled", !0)), skip_enabled && (skip_enabled = !1, val.setVal_Nochk("tmp", "sn.skip.enabled", !1)), auto_enabled && (auto_enabled = !1, val.setVal_Nochk("tmp", "sn.auto.enabled", !1));
|
|
24208
24203
|
}
|
|
24209
24204
|
class WaitLimitedEventer {
|
|
24210
|
-
#
|
|
24211
|
-
#t = () => {
|
|
24212
|
-
};
|
|
24205
|
+
#t = new EventListenerCtn();
|
|
24213
24206
|
constructor(t, e) {
|
|
24214
|
-
|
|
24215
|
-
|
|
24216
|
-
|
|
24217
|
-
|
|
24218
|
-
|
|
24219
|
-
|
|
24220
|
-
|
|
24207
|
+
if (skip_enabled && !skip_all && !scrItr.isNextKidoku && cancelAutoSkip(), argChk_Boolean(t, "canskip", !0)) {
|
|
24208
|
+
const r = () => {
|
|
24209
|
+
this.destroy(), cancelAutoSkip(), e();
|
|
24210
|
+
};
|
|
24211
|
+
this.#t.add(window, "pointerdown", (N) => {
|
|
24212
|
+
N.stopPropagation(), r();
|
|
24213
|
+
}), this.#t.add(window, "keydown", (N) => {
|
|
24214
|
+
N.isComposing || (N.stopPropagation(), r());
|
|
24215
|
+
}), procWheel4wle(this.#t, r);
|
|
24216
|
+
}
|
|
24221
24217
|
}
|
|
24222
24218
|
destroy() {
|
|
24223
|
-
this.#t
|
|
24224
|
-
}, this.#e.clear();
|
|
24219
|
+
this.#t.clear();
|
|
24225
24220
|
}
|
|
24226
24221
|
}
|
|
24227
24222
|
class ReadState {
|
|
@@ -24268,27 +24263,27 @@ class ReadState {
|
|
|
24268
24263
|
wait = (t) => skip_enabled ? (!skip_all && !scrItr.isNextKidoku && cancelAutoSkip(), !1) : Rs_Wait.go(t);
|
|
24269
24264
|
waitclick = (t) => Rs_WaitClick.go(t);
|
|
24270
24265
|
waitTxtAndTimer(t, e) {
|
|
24271
|
-
return ReadState.#
|
|
24272
|
-
if (this.
|
|
24266
|
+
return ReadState.#t.once(ReadState.#e, () => {
|
|
24267
|
+
if (this.#r.destroy(), t === 0) {
|
|
24273
24268
|
this.onFinish();
|
|
24274
24269
|
return;
|
|
24275
24270
|
}
|
|
24276
24271
|
const r = new Tween({}).to({}, t).onComplete(() => {
|
|
24277
|
-
this.
|
|
24272
|
+
this.#r.destroy(), remove$6(r), this.onFinish();
|
|
24278
24273
|
}).start();
|
|
24279
24274
|
this.waitLimitedEvent(e, () => {
|
|
24280
24275
|
r.stop(), remove$6(r), this.onUserAct();
|
|
24281
24276
|
});
|
|
24282
|
-
}), this.waitLimitedEvent(e, () => {
|
|
24283
|
-
ReadState.#
|
|
24277
|
+
}), goTxt(), val.saveKidoku(), this.waitLimitedEvent(e, () => {
|
|
24278
|
+
ReadState.#t.removeAllListeners(), this.onUserAct();
|
|
24284
24279
|
});
|
|
24285
24280
|
}
|
|
24286
24281
|
static noticeCompTxt() {
|
|
24287
|
-
ReadState.#
|
|
24282
|
+
ReadState.#t.emit(ReadState.#e);
|
|
24288
24283
|
}
|
|
24289
|
-
static #
|
|
24284
|
+
static #t = new i$1();
|
|
24290
24285
|
// static必須
|
|
24291
|
-
static #
|
|
24286
|
+
static #e = "sn:notice_comp_txt";
|
|
24292
24287
|
static popLocalEvts() {
|
|
24293
24288
|
const t = hLocalEvt2Fnc;
|
|
24294
24289
|
return hLocalEvt2Fnc = {}, t;
|
|
@@ -24309,15 +24304,16 @@ class ReadState {
|
|
|
24309
24304
|
}
|
|
24310
24305
|
}
|
|
24311
24306
|
// 予約イベントの発生待ちしない waitRsvEvent()
|
|
24312
|
-
// 使う場合、外部要因でキャンセルした際は
|
|
24307
|
+
// 使う場合、外部要因でキャンセルした際は breakLimitedEvent() で後始末を忘れないこと
|
|
24313
24308
|
waitLimitedEvent(t, e) {
|
|
24314
|
-
return this.#r.destroy(), this.#r = new WaitLimitedEventer(t, e),
|
|
24309
|
+
return this.#r.destroy(), this.#r = new WaitLimitedEventer(t, e), !0;
|
|
24315
24310
|
}
|
|
24316
|
-
|
|
24317
|
-
this.#r.destroy();
|
|
24311
|
+
breakLimitedEvent() {
|
|
24312
|
+
this.#r.destroy(), main$2.resume();
|
|
24318
24313
|
}
|
|
24319
24314
|
#r = new WaitLimitedEventer({}, () => {
|
|
24320
24315
|
});
|
|
24316
|
+
// ':タグ名' は未定義、デバッグ時に無視を
|
|
24321
24317
|
l(t) {
|
|
24322
24318
|
if (!tagL_enabled)
|
|
24323
24319
|
return !1;
|
|
@@ -24347,7 +24343,7 @@ class ReadState {
|
|
|
24347
24343
|
return Rs_P.go(t);
|
|
24348
24344
|
}
|
|
24349
24345
|
waitEvent(t, e) {
|
|
24350
|
-
return skip_enabled && !skip_all && !scrItr.isNextKidoku ?
|
|
24346
|
+
return skip_enabled && !skip_all && !scrItr.isNextKidoku ? Rs_Any_Wait.go(t, e) : Rs_Any.go(t, e);
|
|
24351
24347
|
}
|
|
24352
24348
|
onFinish() {
|
|
24353
24349
|
}
|
|
@@ -24396,7 +24392,7 @@ class RsEvtRsv extends ReadState {
|
|
|
24396
24392
|
super({}), main$2.resume(), elmHint.hidden = !0;
|
|
24397
24393
|
}
|
|
24398
24394
|
}
|
|
24399
|
-
class
|
|
24395
|
+
class Rs_S_fire extends ReadState {
|
|
24400
24396
|
isWait = !0;
|
|
24401
24397
|
// 予約イベントの発生待ち中か
|
|
24402
24398
|
fire(t, e) {
|
|
@@ -24419,7 +24415,7 @@ class Rs_S_base extends ReadState {
|
|
|
24419
24415
|
r.slice(-5) !== "wheel" && e.preventDefault?.(), e.stopPropagation(), !(r.slice(0, 4) !== "dom=" && layMng.clickTxtLay()) && N(e);
|
|
24420
24416
|
}
|
|
24421
24417
|
}
|
|
24422
|
-
class Rs_S extends
|
|
24418
|
+
class Rs_S extends Rs_S_fire {
|
|
24423
24419
|
static go = (t) => new Rs_S(t).waitTxtAndTimer(0, {});
|
|
24424
24420
|
onFinish() {
|
|
24425
24421
|
cancelAutoSkip();
|
|
@@ -24436,7 +24432,6 @@ class Rs_Wait extends ReadState {
|
|
|
24436
24432
|
const e = argChk_Num(t, "time", NaN);
|
|
24437
24433
|
return new Rs_Wait(t).waitTxtAndTimer(e, t);
|
|
24438
24434
|
};
|
|
24439
|
-
// 魔法数字、見えるぐらい少し待つ
|
|
24440
24435
|
onFinish() {
|
|
24441
24436
|
new RsEvtRsv();
|
|
24442
24437
|
}
|
|
@@ -24464,8 +24459,8 @@ class Rs_L_AutoSkip extends ReadState {
|
|
|
24464
24459
|
Rs_L_Wait.go(this.hArg);
|
|
24465
24460
|
}
|
|
24466
24461
|
}
|
|
24467
|
-
class Rs_L_Wait extends
|
|
24468
|
-
// [
|
|
24462
|
+
class Rs_L_Wait extends Rs_S_fire {
|
|
24463
|
+
// [l] クリック待ち
|
|
24469
24464
|
static go = (t) => {
|
|
24470
24465
|
argChk_Boolean(t, "visible", !0) && (layMng.breakLine(t), goTxt());
|
|
24471
24466
|
const e = argChk_Boolean(t, "global", !0);
|
|
@@ -24498,7 +24493,7 @@ class Rs_P_AutoSkip extends ReadState {
|
|
|
24498
24493
|
Rs_P_Wait.go(this.hArg);
|
|
24499
24494
|
}
|
|
24500
24495
|
}
|
|
24501
|
-
class Rs_P_Wait extends
|
|
24496
|
+
class Rs_P_Wait extends Rs_S_fire {
|
|
24502
24497
|
// [p] クリック待ち
|
|
24503
24498
|
static go = (t) => {
|
|
24504
24499
|
argChk_Boolean(t, "visible", !0) && (layMng.breakPage(t), goTxt());
|
|
@@ -24512,7 +24507,7 @@ class Rs_P_Wait extends Rs_S {
|
|
|
24512
24507
|
this.onFinish();
|
|
24513
24508
|
}
|
|
24514
24509
|
}
|
|
24515
|
-
class Rs_WaitClick extends
|
|
24510
|
+
class Rs_WaitClick extends Rs_S_fire {
|
|
24516
24511
|
static go = (t) => new Rs_WaitClick(t).waitTxtAndTimer(0, t);
|
|
24517
24512
|
onFinish() {
|
|
24518
24513
|
cancelAutoSkip();
|
|
@@ -24523,27 +24518,26 @@ class Rs_WaitClick extends Rs_S {
|
|
|
24523
24518
|
new RsEvtRsv();
|
|
24524
24519
|
}
|
|
24525
24520
|
}
|
|
24526
|
-
class
|
|
24521
|
+
class Rs_Any extends ReadState {
|
|
24527
24522
|
// 文字表示終了待ち(そして[*])
|
|
24528
24523
|
constructor(t, e) {
|
|
24529
24524
|
super(t), this.onIntr = e;
|
|
24530
24525
|
}
|
|
24531
|
-
static go = (t, e) => new
|
|
24526
|
+
static go = (t, e) => new Rs_Any(t, e).waitTxtAndTimer(0, t);
|
|
24532
24527
|
onFinish() {
|
|
24533
|
-
|
|
24528
|
+
Rs_Any_Wait.go(this.hArg, this.onIntr);
|
|
24534
24529
|
}
|
|
24535
24530
|
onUserAct() {
|
|
24536
24531
|
this.onFinish();
|
|
24537
24532
|
}
|
|
24538
24533
|
}
|
|
24539
|
-
class
|
|
24534
|
+
class Rs_Any_Wait extends Rs_S_fire {
|
|
24535
|
+
// fireがある → イベント受付する
|
|
24536
|
+
//class Rs_Any_Wait extends ReadState { // fireがない → イベント受付しない
|
|
24540
24537
|
constructor(t, e) {
|
|
24541
24538
|
super(t), this.onIntr = e;
|
|
24542
24539
|
}
|
|
24543
|
-
static go(t, e)
|
|
24544
|
-
const r = argChk_Boolean(t, "global", !0);
|
|
24545
|
-
return new Rs_WaitAny_Wait(t, e).waitRsvEvent(!0, r), !0;
|
|
24546
|
-
}
|
|
24540
|
+
static go = (t, e) => new Rs_Any_Wait(t, e).waitLimitedEvent(t, e);
|
|
24547
24541
|
onFinish() {
|
|
24548
24542
|
new RsEvtRsv();
|
|
24549
24543
|
}
|
|
@@ -24553,7 +24547,7 @@ class Rs_WaitAny_Wait extends Rs_S_base {
|
|
|
24553
24547
|
}
|
|
24554
24548
|
class RsPagination extends Rs_S {
|
|
24555
24549
|
get isSkipping() {
|
|
24556
|
-
return !ReadState.aPage[this.#
|
|
24550
|
+
return !ReadState.aPage[this.#t].week;
|
|
24557
24551
|
}
|
|
24558
24552
|
// return true で良いのだが、[l]でページ移動モードになったあと、[l]に戻ってモード終了してから、[p]に至る文字表示が瞬時表示になる対策
|
|
24559
24553
|
s = (t) => Rs_S.go(t);
|
|
@@ -24561,17 +24555,17 @@ class RsPagination extends Rs_S {
|
|
|
24561
24555
|
waitclick = () => !1;
|
|
24562
24556
|
waitTxtAndTimer = () => !1;
|
|
24563
24557
|
l(t) {
|
|
24564
|
-
if (!ReadState.aPage[this.#
|
|
24558
|
+
if (!ReadState.aPage[this.#t].week)
|
|
24565
24559
|
return !1;
|
|
24566
24560
|
const e = ReadState.aPage.length;
|
|
24567
|
-
return this.#
|
|
24561
|
+
return this.#t === e - 1 ? Rs_L_Wait.go(t) : (argChk_Boolean(t, "visible", !0) && (layMng.breakLine(t), goTxt()), this.waitRsvEvent(!1, !0), !0);
|
|
24568
24562
|
}
|
|
24569
24563
|
p(t) {
|
|
24570
24564
|
const e = ReadState.aPage.length;
|
|
24571
|
-
return this.#
|
|
24565
|
+
return this.#t === e - 1 ? Rs_P_Wait.go(t) : (argChk_Boolean(t, "visible", !0) && (layMng.breakPage(t), goTxt()), this.waitRsvEvent(!1, !0), !0);
|
|
24572
24566
|
}
|
|
24573
24567
|
static go = (t) => new RsPagination(t).page(t);
|
|
24574
|
-
#
|
|
24568
|
+
#t = ReadState.aPage.length - 1;
|
|
24575
24569
|
page(t) {
|
|
24576
24570
|
const { to: e } = t;
|
|
24577
24571
|
if (!e)
|
|
@@ -24579,23 +24573,23 @@ class RsPagination extends Rs_S {
|
|
|
24579
24573
|
const r = ReadState.aPage.length;
|
|
24580
24574
|
switch (e) {
|
|
24581
24575
|
case "prev":
|
|
24582
|
-
if (this.#
|
|
24576
|
+
if (this.#t === 0)
|
|
24583
24577
|
return !1;
|
|
24584
|
-
--this.#
|
|
24578
|
+
--this.#t;
|
|
24585
24579
|
break;
|
|
24586
24580
|
case "next":
|
|
24587
|
-
if (this.#
|
|
24581
|
+
if (this.#t === r - 1)
|
|
24588
24582
|
return !1;
|
|
24589
|
-
++this.#
|
|
24583
|
+
++this.#t;
|
|
24590
24584
|
break;
|
|
24591
24585
|
default:
|
|
24592
24586
|
throw `属性to「${e}」は異常です`;
|
|
24593
24587
|
}
|
|
24594
|
-
const { fn: N, index: k, mark: D } = ReadState.aPage[this.#
|
|
24588
|
+
const { fn: N, index: k, mark: D } = ReadState.aPage[this.#t];
|
|
24595
24589
|
return scrItr.loadFromMark({
|
|
24596
24590
|
fn: N,
|
|
24597
24591
|
index: k,
|
|
24598
|
-
style: this.#
|
|
24592
|
+
style: this.#t === r - 1 ? void 0 : ReadState.stylePage
|
|
24599
24593
|
//r_style までは不要か
|
|
24600
24594
|
}, D);
|
|
24601
24595
|
}
|
|
@@ -25565,7 +25559,7 @@ class EventMng {
|
|
|
25565
25559
|
<div class="sn_hint" role="tooltip">
|
|
25566
25560
|
<span>Dummy</span>
|
|
25567
25561
|
<div class="sn_hint_ar" data-popper-arrow></div>
|
|
25568
|
-
</div>`), this.#f = document.querySelector(".sn_hint"), this.#d = this.#f.querySelector("span"), this.#v = createPopper(this.#g, this.#f), this.#f.hidden = !0, r.stage.interactive = !0, CmnLib.isMobile ? r.stage.on("pointerdown", (Y) => this.fire("click", Y)) : this.#
|
|
25562
|
+
</div>`), this.#f = document.querySelector(".sn_hint"), this.#d = this.#f.querySelector("span"), this.#v = createPopper(this.#g, this.#f), this.#f.hidden = !0, r.stage.interactive = !0, CmnLib.isMobile ? r.stage.on("pointerdown", (Y) => this.fire("click", Y)) : this.#t.add(r.stage, "pointerdown", (Y) => {
|
|
25569
25563
|
switch (Y.data.button) {
|
|
25570
25564
|
case 0:
|
|
25571
25565
|
this.fire("click", Y);
|
|
@@ -25574,22 +25568,22 @@ class EventMng {
|
|
|
25574
25568
|
this.fire("middleclick", Y);
|
|
25575
25569
|
break;
|
|
25576
25570
|
}
|
|
25577
|
-
}), this.#
|
|
25571
|
+
}), this.#t.add(window, "keydown", (Y) => this.#o(Y)), this.#t.add(Main.cvs, "contextmenu", (Y) => this.#l(Y));
|
|
25578
25572
|
const H = () => D.setVal_Nochk("tmp", "const.sn.navigator.language", navigator.language);
|
|
25579
|
-
this.#
|
|
25573
|
+
this.#t.add(window, "languagechange", (Y) => {
|
|
25580
25574
|
H(), this.fire("sn:chgNavLang", Y), clearTextureCache();
|
|
25581
25575
|
}), H();
|
|
25582
25576
|
const z = (Y) => {
|
|
25583
25577
|
CmnLib.isDarkMode = Y.matches, D.setVal_Nochk("tmp", "const.sn.isDarkMode", CmnLib.isDarkMode);
|
|
25584
25578
|
}, V = globalThis.matchMedia("(prefers-color-scheme: dark)");
|
|
25585
|
-
z(V), this.#
|
|
25579
|
+
z(V), this.#t.add(V, "change", (Y) => {
|
|
25586
25580
|
z(Y), this.fire("sn:chgDarkMode", Y);
|
|
25587
25581
|
});
|
|
25588
25582
|
let X = (Y, K) => {
|
|
25589
25583
|
};
|
|
25590
|
-
"WheelEvent" in window && (this.#
|
|
25584
|
+
"WheelEvent" in window && (this.#t.add(Main.cvs, "wheel", (Y) => this.#h(Y), { passive: !0 }), this.#n = (Y) => this.#t.add(Y, "wheel", (K) => this.#h(K), { passive: !0 }), X = (Y, K) => Y.add(Main.cvs, "wheel", (Z) => {
|
|
25591
25585
|
Z.isComposing || Z.deltaY <= 0 || (Z.stopPropagation(), K());
|
|
25592
|
-
})), ReadState.init((Y) => this.#i = Y, N, D, k, $, B, e, this.#r, X, this.#f, t), CmnLib.debugLog && (this.#
|
|
25586
|
+
})), ReadState.init((Y) => this.#i = Y, N, D, k, $, B, e, this.#r, X, this.#f, t), CmnLib.debugLog && (this.#e.on("gamepad:connected", (Y) => console.log(`👺<'gamepad:connected' index:${Y.detail.index} id:${Y.detail.gamepad.id}`)), this.#e.on("gamepad:disconnected", (Y) => console.log(`👺<'gamepad:disconnected' index:${Y.detail.index} id:${Y.detail.gamepad.id}`)));
|
|
25593
25587
|
const q = [
|
|
25594
25588
|
"",
|
|
25595
25589
|
"ArrowUp",
|
|
@@ -25604,7 +25598,7 @@ class EventMng {
|
|
|
25604
25598
|
""
|
|
25605
25599
|
// '1', '2', '3',
|
|
25606
25600
|
], W = [0, 0];
|
|
25607
|
-
this.#
|
|
25601
|
+
this.#e.on("gamepad:axis", (Y) => {
|
|
25608
25602
|
if (!document.hasFocus() || Y.detail.stick !== 0)
|
|
25609
25603
|
return;
|
|
25610
25604
|
W[Y.detail.axis] = Y.detail.value;
|
|
@@ -25613,26 +25607,26 @@ class EventMng {
|
|
|
25613
25607
|
return;
|
|
25614
25608
|
const J = this.#r.getFocus();
|
|
25615
25609
|
(!J || J instanceof Container ? globalThis : J).dispatchEvent(new KeyboardEvent("keydown", { key: Z, bubbles: !0 })), !(!J || J instanceof Container) && J.getAttribute("type") === "range" && J.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
|
|
25616
|
-
}), this.#
|
|
25610
|
+
}), this.#e.on("gamepad:button", (Y) => {
|
|
25617
25611
|
if (document.hasFocus())
|
|
25618
25612
|
if (Y.detail.button % 2 === 0) {
|
|
25619
25613
|
const K = this.#r.getFocus();
|
|
25620
25614
|
(!K || K instanceof Container ? globalThis : K).dispatchEvent(new KeyboardEvent("keydown", { key: "Enter", bubbles: !0 }));
|
|
25621
25615
|
} else
|
|
25622
25616
|
Main.cvs.dispatchEvent(new Event("contextmenu"));
|
|
25623
|
-
}), this.#
|
|
25617
|
+
}), this.#e.start(), this.#t.add(window, "keyup", (Y) => {
|
|
25624
25618
|
Y.isComposing || Y.key in this.#_ && (this.#_[Y.key] = 0);
|
|
25625
25619
|
}), D.defTmp("const.sn.key.alternate", () => this.#_.Alt > 0), D.defTmp("const.sn.key.command", () => this.#_.Meta > 0), D.defTmp("const.sn.key.control", () => this.#_.Control > 0), D.defTmp("const.sn.key.end", () => this.#_.End > 0), D.defTmp("const.sn.key.escape", () => this.#_.Escape > 0), D.defTmp("const.sn.key.back", () => this.#_.GoBack > 0);
|
|
25626
25620
|
}
|
|
25627
|
-
#
|
|
25628
|
-
#
|
|
25621
|
+
#t = new EventListenerCtn();
|
|
25622
|
+
#e = new GamepadListener({
|
|
25629
25623
|
analog: !1,
|
|
25630
25624
|
deadZone: 0.3
|
|
25631
25625
|
});
|
|
25632
25626
|
#r = new FocusMng();
|
|
25633
25627
|
#i;
|
|
25634
25628
|
resvFlameEvent(t) {
|
|
25635
|
-
this.#
|
|
25629
|
+
this.#t.add(t, "keydown", (e) => this.#o(e)), this.#t.add(t, "contextmenu", (e) => this.#l(e)), this.#n(t);
|
|
25636
25630
|
}
|
|
25637
25631
|
#n = (t) => {
|
|
25638
25632
|
};
|
|
@@ -25643,11 +25637,11 @@ class EventMng {
|
|
|
25643
25637
|
const e = (t.altKey ? t.key === "Alt" ? "" : "alt+" : "") + (t.ctrlKey ? t.key === "Control" ? "" : "ctrl+" : "") + (t.shiftKey ? t.key === "Shift" ? "" : "shift+" : "") + t.key;
|
|
25644
25638
|
this.fire(e, t);
|
|
25645
25639
|
}
|
|
25646
|
-
#
|
|
25640
|
+
#l(t) {
|
|
25647
25641
|
const e = (t.altKey ? t.key === "Alt" ? "" : "alt+" : "") + (t.ctrlKey ? t.key === "Control" ? "" : "ctrl+" : "") + (t.shiftKey ? t.key === "Shift" ? "" : "shift+" : "") + "rightclick";
|
|
25648
25642
|
this.fire(e, t), t.preventDefault();
|
|
25649
25643
|
}
|
|
25650
|
-
#
|
|
25644
|
+
#h(t) {
|
|
25651
25645
|
if (t.isComposing)
|
|
25652
25646
|
return;
|
|
25653
25647
|
if (this.#p) {
|
|
@@ -25670,7 +25664,7 @@ class EventMng {
|
|
|
25670
25664
|
}, 250);
|
|
25671
25665
|
}
|
|
25672
25666
|
destroy() {
|
|
25673
|
-
this.#r.destroy(), this.#
|
|
25667
|
+
this.#r.destroy(), this.#t.clear();
|
|
25674
25668
|
}
|
|
25675
25669
|
fire(t, e) {
|
|
25676
25670
|
this.#i.fire(t, e);
|
|
@@ -25799,7 +25793,7 @@ class EventMng {
|
|
|
25799
25793
|
break;
|
|
25800
25794
|
}
|
|
25801
25795
|
B.forEach((U, H) => D.el.forEach((z) => {
|
|
25802
|
-
this.#
|
|
25796
|
+
this.#t.add(z, U, (V) => {
|
|
25803
25797
|
if (!this.#i.isWait || this.layMng.getFrmDisabled(D.id) || U === "keydown" && V.key !== "Enter")
|
|
25804
25798
|
return;
|
|
25805
25799
|
const X = z.dataset;
|
|
@@ -25862,13 +25856,12 @@ class EventMng {
|
|
|
25862
25856
|
}
|
|
25863
25857
|
return !1;
|
|
25864
25858
|
}
|
|
25865
|
-
//
|
|
25859
|
+
// テキスト表示待ちと処理終了待ち(予約イベント受付しない)
|
|
25860
|
+
// waitEvent を使用する場合、通常 break 時は breakLimitedEvent() すること
|
|
25866
25861
|
waitEvent = (t, e) => this.#i.waitEvent(t, e);
|
|
25867
|
-
|
|
25868
|
-
|
|
25869
|
-
|
|
25870
|
-
// }
|
|
25871
|
-
// finishLimitedEvent() {this.#rs.finishLimitedEvent()}
|
|
25862
|
+
breakLimitedEvent() {
|
|
25863
|
+
this.#i.breakLimitedEvent();
|
|
25864
|
+
}
|
|
25872
25865
|
noticeCompTxt() {
|
|
25873
25866
|
ReadState.noticeCompTxt();
|
|
25874
25867
|
}
|
|
@@ -25901,18 +25894,18 @@ class ScriptIterator {
|
|
|
25901
25894
|
constructor(t, e, r, N, k, D, B, $, U) {
|
|
25902
25895
|
this.cfg = t, this.hTag = e, this.main = r, this.val = N, this.alzTagArg = k, this.runAnalyze = D, this.prpPrs = B, this.sndMng = $, this.sys = U, e.let_ml = (z) => this.#B(z), e.endlet_ml = () => !1, e.dump_stack = () => this.#N(), e.dump_script = (z) => this.#z(z), e.else = // その他ifブロック開始
|
|
25903
25896
|
e.elsif = // 別条件のifブロック開始
|
|
25904
|
-
e.endif = () => this.#R(), e.if = (z) => this.#X(z), e.call = (z) => this.#k(z), e.jump = (z) => this.#q(z), e.pop_stack = (z) => this.#D(z), e.return = (z) => this.#W(z), e.bracket2macro = (z) => this.#lt(z), e.char2macro = (z) => this.#ut(z), e.endmacro = (z) => this.#W(z), e.macro = (z) => this.#pt(z), e.load = (z) => this.#vt(z), e.reload_script = (z) => this.#mt(z), e.record_place = () => this.#gt(), e.save = (z) => this.#yt(z), t.oCfg.debug.token && (this.#F = (z) => console.log(`🌱 トークン fn:${this.#
|
|
25897
|
+
e.endif = () => this.#R(), e.if = (z) => this.#X(z), e.call = (z) => this.#k(z), e.jump = (z) => this.#q(z), e.pop_stack = (z) => this.#D(z), e.return = (z) => this.#W(z), e.bracket2macro = (z) => this.#lt(z), e.char2macro = (z) => this.#ut(z), e.endmacro = (z) => this.#W(z), e.macro = (z) => this.#pt(z), e.load = (z) => this.#vt(z), e.reload_script = (z) => this.#mt(z), e.record_place = () => this.#gt(), e.save = (z) => this.#yt(z), t.oCfg.debug.token && (this.#F = (z) => console.log(`🌱 トークン fn:${this.#e} idx:${this.#r} ln:${this.#i} token【${z}】`)), N.defTmp("const.sn.aIfStk.length", () => this.#w.length), N.defTmp("const.sn.vctCallStk.length", () => this.#n.length);
|
|
25905
25898
|
const H = t.oCfg.init.escape;
|
|
25906
25899
|
if (this.#o.setEscape(H), RubySpliter.setEscape(H), CmnLib.isDbg) {
|
|
25907
|
-
U.addHook((V, X) => this.#
|
|
25900
|
+
U.addHook((V, X) => this.#h[V]?.(X)), this.isBreak = this.#y;
|
|
25908
25901
|
const z = this.analyzeInit;
|
|
25909
25902
|
this.analyzeInit = () => {
|
|
25910
25903
|
this.analyzeInit = () => {
|
|
25911
25904
|
}, this.sys.send2Dbg("hi", {});
|
|
25912
|
-
}, this.#
|
|
25905
|
+
}, this.#h.auth = (V) => {
|
|
25913
25906
|
const X = V.hBreakpoint.hFn2hLineBP;
|
|
25914
25907
|
for (const [q, W] of Object.entries(X))
|
|
25915
|
-
this.#
|
|
25908
|
+
this.#l(q, W);
|
|
25916
25909
|
ScriptIterator.#a = {};
|
|
25917
25910
|
for (const q of V.hBreakpoint.aFunc)
|
|
25918
25911
|
ScriptIterator.#a[q.name] = 1;
|
|
@@ -25936,12 +25929,12 @@ class ScriptIterator {
|
|
|
25936
25929
|
} else
|
|
25937
25930
|
this.recodeDesign = () => {
|
|
25938
25931
|
};
|
|
25939
|
-
t.oCfg.debug.tag && (this.#I = (z) => console.log(`🌲 タグ解析 fn:${this.#
|
|
25932
|
+
t.oCfg.debug.tag && (this.#I = (z) => console.log(`🌲 タグ解析 fn:${this.#e} idx:${this.#r} ln:${this.#i} [${z} %o]`, this.alzTagArg.hPrm));
|
|
25940
25933
|
}
|
|
25941
|
-
#
|
|
25942
|
-
#
|
|
25934
|
+
#t = { aToken: [""], len: 1, aLNum: [1] };
|
|
25935
|
+
#e = "";
|
|
25943
25936
|
get scriptFn() {
|
|
25944
|
-
return this.#
|
|
25937
|
+
return this.#e;
|
|
25945
25938
|
}
|
|
25946
25939
|
#r = 0;
|
|
25947
25940
|
subIdxToken() {
|
|
@@ -25953,7 +25946,7 @@ class ScriptIterator {
|
|
|
25953
25946
|
}
|
|
25954
25947
|
addLineNum = (t) => this.#i += t;
|
|
25955
25948
|
jumpJustBefore() {
|
|
25956
|
-
this.#j(this.#
|
|
25949
|
+
this.#j(this.#e, "", --this.#r);
|
|
25957
25950
|
}
|
|
25958
25951
|
// 直前にジャンプ
|
|
25959
25952
|
#n = [];
|
|
@@ -25961,21 +25954,21 @@ class ScriptIterator {
|
|
|
25961
25954
|
#o = new Grammar();
|
|
25962
25955
|
noticeWait = () => {
|
|
25963
25956
|
};
|
|
25964
|
-
#
|
|
25957
|
+
#l(t, e) {
|
|
25965
25958
|
ScriptIterator.#b[this.#c(t)] = e;
|
|
25966
25959
|
}
|
|
25967
25960
|
destroy() {
|
|
25968
25961
|
this.isBreak = () => !1;
|
|
25969
25962
|
}
|
|
25970
|
-
#
|
|
25963
|
+
#h = {
|
|
25971
25964
|
//auth: // constructorで
|
|
25972
25965
|
//launch: // ここでは冒頭停止に間に合わないのでanalyzeInit()で
|
|
25973
25966
|
disconnect: () => {
|
|
25974
|
-
ScriptIterator.#b = {}, ScriptIterator.#a = {}, this.isBreak = () => !1, this.#
|
|
25967
|
+
ScriptIterator.#b = {}, ScriptIterator.#a = {}, this.isBreak = () => !1, this.#h.continue({}), this.#m = 0;
|
|
25975
25968
|
},
|
|
25976
25969
|
restart: () => this.isBreak = () => !1,
|
|
25977
25970
|
// ブレークポイント登録
|
|
25978
|
-
add_break: (t) => this.#
|
|
25971
|
+
add_break: (t) => this.#l(t.fn, t.o),
|
|
25979
25972
|
data_break: (t) => {
|
|
25980
25973
|
this.#m === 0 && (this.#m = 1, this.main.setLoop(!1, `変数 ${t.dataId}【${t.old_v}】→【${t.new_v}】データブレーク`), this.sys.callHook("stopOnDataBreakpoint", {}), this.sys.send2Dbg("stopOnDataBreakpoint", {}));
|
|
25981
25974
|
},
|
|
@@ -25998,7 +25991,7 @@ class ScriptIterator {
|
|
|
25998
25991
|
stepin: () => {
|
|
25999
25992
|
if (this.#u())
|
|
26000
25993
|
return;
|
|
26001
|
-
const t = this.#
|
|
25994
|
+
const t = this.#t.aToken[this.#r - this.#v];
|
|
26002
25995
|
this.sys.callHook(`stopOnStep${this.#ct.test(t) ? "In" : ""}`, {}), this.#r -= this.#v, this.#m = this.#m === 1 ? 4 : 5, this.main.setLoop(!0), this.main.resume();
|
|
26003
25996
|
},
|
|
26004
25997
|
stepout: (t) => {
|
|
@@ -26014,13 +26007,13 @@ class ScriptIterator {
|
|
|
26014
26007
|
#p = (t) => this.cfg.searchPath(t, SEARCH_PATH_ARG_EXT.SCRIPT);
|
|
26015
26008
|
static #s = /(.+)\/crypto_prj\/([^\/]+)\/[^\.]+(\.\w+)/;
|
|
26016
26009
|
// https://regex101.com/r/Km54EK/1 141 steps (~0ms)
|
|
26017
|
-
#c = (t) => (this.sys.pathBaseCnvSnPath4Dbg + this.#p(t)).replace(ScriptIterator.#s, `$1/prj/$2/${this.#
|
|
26010
|
+
#c = (t) => (this.sys.pathBaseCnvSnPath4Dbg + this.#p(t)).replace(ScriptIterator.#s, `$1/prj/$2/${this.#e}$3`);
|
|
26018
26011
|
cnvPath4Dbg = (t) => this.sys.pathBaseCnvSnPath4Dbg + t.replace("/crypto_prj/", "/prj/");
|
|
26019
26012
|
#g(t) {
|
|
26020
26013
|
if (this.#u())
|
|
26021
26014
|
return;
|
|
26022
|
-
const e = this.#
|
|
26023
|
-
this.#ct.test(e) ? this.#f(!1) : (this.sys.callHook("stopOnStep", {}), this.#
|
|
26015
|
+
const e = this.#t.aToken[this.#r - this.#v];
|
|
26016
|
+
this.#ct.test(e) ? this.#f(!1) : (this.sys.callHook("stopOnStep", {}), this.#h.stepin(t));
|
|
26024
26017
|
}
|
|
26025
26018
|
#f(t) {
|
|
26026
26019
|
this.sys.callHook(`stopOnStep${t ? "Out" : ""}`, {}), this.#d = this.#n.length - (t ? 1 : 0), this.#r -= this.#v, this.#m = t ? 7 : 6, this.main.setLoop(!0), this.main.resume();
|
|
@@ -26030,7 +26023,7 @@ class ScriptIterator {
|
|
|
26030
26023
|
return this.#m === 2 || this.#m === 4 ? 1 : 0;
|
|
26031
26024
|
}
|
|
26032
26025
|
#u() {
|
|
26033
|
-
return this.#r < this.#
|
|
26026
|
+
return this.#r < this.#t.len ? !1 : (this.sys.callHook("stopOnEntry", {}), this.main.setLoop(!1, "スクリプト終端です"), !0);
|
|
26034
26027
|
}
|
|
26035
26028
|
// reload 再生成 Main に受け渡すため static
|
|
26036
26029
|
static #b = {};
|
|
@@ -26059,7 +26052,7 @@ class ScriptIterator {
|
|
|
26059
26052
|
if (tagToken2Name(t) in ScriptIterator.#a)
|
|
26060
26053
|
return this.#m = 2, this.main.setLoop(!1, `関数 ${t} ブレーク`), this.sys.callHook("stopOnBreakpoint", {}), this.sys.send2Dbg("stopOnBreakpoint", {}), !0;
|
|
26061
26054
|
{
|
|
26062
|
-
const e = ScriptIterator.#b[this.#c(this.#
|
|
26055
|
+
const e = ScriptIterator.#b[this.#c(this.#e)];
|
|
26063
26056
|
if (!e)
|
|
26064
26057
|
break;
|
|
26065
26058
|
const r = e[this.#i];
|
|
@@ -26080,14 +26073,14 @@ class ScriptIterator {
|
|
|
26080
26073
|
return !1;
|
|
26081
26074
|
}
|
|
26082
26075
|
#_() {
|
|
26083
|
-
const t = ScriptIterator.#b[getFn(this.#
|
|
26076
|
+
const t = ScriptIterator.#b[getFn(this.#e)]?.[this.#i];
|
|
26084
26077
|
t?.hitCondition && --t.hitCondition;
|
|
26085
26078
|
}
|
|
26086
26079
|
#T() {
|
|
26087
|
-
const t = this.#m === 3 ? 1 : 0, e = this.#
|
|
26080
|
+
const t = this.#m === 3 ? 1 : 0, e = this.#t.aToken[this.#r - 1 + t], r = this.#c(this.#e), N = tagToken2Name(e), k = N ? `[${N}]` : e, D = this.val.getVal("mp:const.sn.macro") ?? "{}";
|
|
26088
26081
|
if (this.#r === 0)
|
|
26089
26082
|
return [{ fn: r, ln: 1, col: 1, nm: k, ma: D }];
|
|
26090
|
-
const B = this.#P(this.#
|
|
26083
|
+
const B = this.#P(this.#t, this.#r), $ = [{ fn: r, ln: B.ln, col: B.col_s + 1, nm: k, ma: D }], U = this.#n.length;
|
|
26091
26084
|
if (U === 0)
|
|
26092
26085
|
return $;
|
|
26093
26086
|
for (let H = U - 1; H >= 0; --H) {
|
|
@@ -26161,8 +26154,8 @@ class ScriptIterator {
|
|
|
26161
26154
|
if (!e)
|
|
26162
26155
|
throw "nameは必須です";
|
|
26163
26156
|
let r = "";
|
|
26164
|
-
const N = this.#
|
|
26165
|
-
for (; this.#r < N && (r = this.#
|
|
26157
|
+
const N = this.#t.len;
|
|
26158
|
+
for (; this.#r < N && (r = this.#t.aToken[this.#r], r === ""); ++this.#r)
|
|
26166
26159
|
;
|
|
26167
26160
|
return t.text = r, t.cast = "str", this.hTag.let(t), this.#r += 2, this.#i += (r.match(/\n/g) ?? []).length, !1;
|
|
26168
26161
|
}
|
|
@@ -26170,8 +26163,8 @@ class ScriptIterator {
|
|
|
26170
26163
|
// スタックのダンプ
|
|
26171
26164
|
#N() {
|
|
26172
26165
|
if (this.#r === 0)
|
|
26173
|
-
return console.group(`🥟 [dump_stack] スクリプト現在地 fn:${this.#
|
|
26174
|
-
const t = this.#P(this.#
|
|
26166
|
+
return console.group(`🥟 [dump_stack] スクリプト現在地 fn:${this.#e} line:1 col:0`), console.groupEnd(), !1;
|
|
26167
|
+
const t = this.#P(this.#t, this.#r), e = `スクリプト現在地 fn:${this.#e} line:${t.ln} col:${t.col_s + 1}`;
|
|
26175
26168
|
console.group(`🥟 [dump_stack] ${e}`);
|
|
26176
26169
|
const r = this.#n.length;
|
|
26177
26170
|
if (r > 0) {
|
|
@@ -26214,8 +26207,8 @@ class ScriptIterator {
|
|
|
26214
26207
|
}, !1;
|
|
26215
26208
|
}
|
|
26216
26209
|
if (this.noticeBreak = (N) => {
|
|
26217
|
-
this.#L !== this.#
|
|
26218
|
-
this.#$[this.#
|
|
26210
|
+
this.#L !== this.#e && (this.#L = this.#e, this.#O(
|
|
26211
|
+
this.#$[this.#e] ??= this.#t.aToken.join("")
|
|
26219
26212
|
)), this.#x(this.#i, N);
|
|
26220
26213
|
}, this.noticeBreak(!0), !r)
|
|
26221
26214
|
return !1;
|
|
@@ -26238,16 +26231,16 @@ class ScriptIterator {
|
|
|
26238
26231
|
#C = 5;
|
|
26239
26232
|
dumpErrForeLine() {
|
|
26240
26233
|
if (this.#r === 0) {
|
|
26241
|
-
console.group(`🥟 Error line (from 0 rows before) fn:${this.#
|
|
26234
|
+
console.group(`🥟 Error line (from 0 rows before) fn:${this.#e}`), console.groupEnd();
|
|
26242
26235
|
return;
|
|
26243
26236
|
}
|
|
26244
26237
|
let t = "";
|
|
26245
|
-
for (let D = this.#r - 1; D >= 0 && (t = this.#
|
|
26238
|
+
for (let D = this.#r - 1; D >= 0 && (t = this.#t.aToken[D] + t, !((t.match(/\n/g) ?? []).length >= this.#C)); --D)
|
|
26246
26239
|
;
|
|
26247
26240
|
const e = t.split(`
|
|
26248
26241
|
`).slice(-this.#C), r = e.length;
|
|
26249
|
-
console.group(`🥟 Error line (from ${r} rows before) fn:${this.#
|
|
26250
|
-
const N = String(this.#i).length, k = this.#P(this.#
|
|
26242
|
+
console.group(`🥟 Error line (from ${r} rows before) fn:${this.#e}`);
|
|
26243
|
+
const N = String(this.#i).length, k = this.#P(this.#t, this.#r);
|
|
26251
26244
|
for (let D = 0; D < r; ++D) {
|
|
26252
26245
|
const B = this.#i - r + D + 1, $ = `${String(B).padStart(N, " ")}: %c`, U = e[D], H = U.length > 75 ? U.slice(0, 75) + "…" : U;
|
|
26253
26246
|
D === r - 1 ? console.info(
|
|
@@ -26273,13 +26266,13 @@ class ScriptIterator {
|
|
|
26273
26266
|
if (e.at(0) === "&")
|
|
26274
26267
|
throw "属性expは「&」が不要です";
|
|
26275
26268
|
let r = 0, N = this.prpPrs.parse(e) ? this.#r : -1;
|
|
26276
|
-
const k = this.#
|
|
26269
|
+
const k = this.#t.aLNum[this.#r];
|
|
26277
26270
|
let D = this.#i - (k || 0);
|
|
26278
|
-
const B = this.#
|
|
26271
|
+
const B = this.#t.len;
|
|
26279
26272
|
for (; this.#r < B; ++this.#r) {
|
|
26280
|
-
const $ = this.#
|
|
26281
|
-
this.#
|
|
26282
|
-
const U = this.#
|
|
26273
|
+
const $ = this.#t.aLNum[this.#r];
|
|
26274
|
+
this.#t.aLNum[this.#r] = ($ || 0) + D;
|
|
26275
|
+
const U = this.#t.aToken[this.#r];
|
|
26283
26276
|
if (!U)
|
|
26284
26277
|
continue;
|
|
26285
26278
|
const H = U.charCodeAt(0);
|
|
@@ -26314,7 +26307,7 @@ class ScriptIterator {
|
|
|
26314
26307
|
--r;
|
|
26315
26308
|
break;
|
|
26316
26309
|
}
|
|
26317
|
-
return N === -1 ? (++this.#r, this.#
|
|
26310
|
+
return N === -1 ? (++this.#r, this.#t.aLNum[this.#r] += D) : (this.#w.unshift(this.#r + 1), this.#r = N, this.#i = this.#t.aLNum[this.#r]), !1;
|
|
26318
26311
|
}
|
|
26319
26312
|
}
|
|
26320
26313
|
throw "[endif]がないままスクリプト終端です";
|
|
@@ -26327,7 +26320,7 @@ class ScriptIterator {
|
|
|
26327
26320
|
return e && this.#p(e), this.#M({ ":hEvt1Time": this.#S.popLocalEvts(), ":hMp": this.val.cloneMp(), ":lenIfStk": this.#w.length }), argChk_Boolean(t, "clear_local_event", !1) && this.hTag.clear_event({}), this.#j(e, t.label), !0;
|
|
26328
26321
|
}
|
|
26329
26322
|
#M(t) {
|
|
26330
|
-
this.#
|
|
26323
|
+
this.#t.aLNum[this.#r] = this.#i, this.#V || (t[":resvToken"] = "", this.#U()), this.#n.push(new CallStack(this.#e, this.#r, t)), this.#w.unshift(-1);
|
|
26331
26324
|
}
|
|
26332
26325
|
// シナリオジャンプ
|
|
26333
26326
|
#q(t) {
|
|
@@ -26368,14 +26361,14 @@ class ScriptIterator {
|
|
|
26368
26361
|
if (t.includes("@"))
|
|
26369
26362
|
throw "[jump系] fn には文字「@」は禁止です";
|
|
26370
26363
|
const N = this.#p(t);
|
|
26371
|
-
if (t === this.#
|
|
26364
|
+
if (t === this.#e) {
|
|
26372
26365
|
this.analyzeInit();
|
|
26373
26366
|
return;
|
|
26374
26367
|
}
|
|
26375
|
-
this.#
|
|
26368
|
+
this.#e = t;
|
|
26376
26369
|
const k = this.#G[t];
|
|
26377
26370
|
if (k) {
|
|
26378
|
-
this.#
|
|
26371
|
+
this.#t = k, this.analyzeInit();
|
|
26379
26372
|
return;
|
|
26380
26373
|
}
|
|
26381
26374
|
const D = new Loader();
|
|
@@ -26406,7 +26399,7 @@ class ScriptIterator {
|
|
|
26406
26399
|
}), this.main.stop();
|
|
26407
26400
|
}
|
|
26408
26401
|
analyzeInit() {
|
|
26409
|
-
const t = this.#nt(this.#
|
|
26402
|
+
const t = this.#nt(this.#t, !!this.val.getVal("mp:const.sn.macro.name"), this.#i, this.#A, this.#r);
|
|
26410
26403
|
this.#r = t.idx, this.#i = t.ln, this.runAnalyze();
|
|
26411
26404
|
}
|
|
26412
26405
|
// シナリオ解析処理ループ・冒頭処理
|
|
@@ -26415,14 +26408,14 @@ class ScriptIterator {
|
|
|
26415
26408
|
#Y() {
|
|
26416
26409
|
if (this.#H())
|
|
26417
26410
|
return "";
|
|
26418
|
-
this.#ht(), this.#
|
|
26419
|
-
const t = this.#
|
|
26411
|
+
this.#ht(), this.#t.aLNum[this.#r] ||= this.#i;
|
|
26412
|
+
const t = this.#t.aToken[this.#r];
|
|
26420
26413
|
return this.#F(t), ++this.#r, t;
|
|
26421
26414
|
}
|
|
26422
26415
|
#F = (t) => {
|
|
26423
26416
|
};
|
|
26424
26417
|
#H() {
|
|
26425
|
-
return this.#r < this.#
|
|
26418
|
+
return this.#r < this.#t.len ? !1 : (this.main.errScript("スクリプト終端です"), !0);
|
|
26426
26419
|
}
|
|
26427
26420
|
#K = /(\*{2,})([^\|]*)/;
|
|
26428
26421
|
#it = /^\[macro\s/;
|
|
@@ -26496,16 +26489,16 @@ class ScriptIterator {
|
|
|
26496
26489
|
try {
|
|
26497
26490
|
e = "ScriptIterator.resolveScript";
|
|
26498
26491
|
const r = this.#o.resolveScript(t);
|
|
26499
|
-
e = "ScriptIterator.replaceScript_Wildcard", this.#ot(r), this.#G[this.#
|
|
26492
|
+
e = "ScriptIterator.replaceScript_Wildcard", this.#ot(r), this.#G[this.#e] = this.#t = r;
|
|
26500
26493
|
} catch (r) {
|
|
26501
26494
|
r instanceof Error ? e += `例外 mes=${r.message}(${r.name})` : e = r, this.main.errScript(e, !1);
|
|
26502
26495
|
}
|
|
26503
|
-
this.val.loadScrWork(this.#
|
|
26496
|
+
this.val.loadScrWork(this.#e);
|
|
26504
26497
|
}
|
|
26505
26498
|
#tt(t) {
|
|
26506
|
-
this.#
|
|
26507
|
-
const e = this.#G[this.#
|
|
26508
|
-
e && (this.#
|
|
26499
|
+
this.#e = t.fn, this.#r = t.idx;
|
|
26500
|
+
const e = this.#G[this.#e];
|
|
26501
|
+
e && (this.#t = e), this.#i = this.#t.aLNum[t.idx];
|
|
26509
26502
|
}
|
|
26510
26503
|
#et = /^\[(call|loadplugin)\s/;
|
|
26511
26504
|
#at = /\bfn\s*=\s*[^\s\]]+/;
|
|
@@ -26535,9 +26528,9 @@ class ScriptIterator {
|
|
|
26535
26528
|
t.len = t.aToken.length;
|
|
26536
26529
|
}
|
|
26537
26530
|
#ht() {
|
|
26538
|
-
const t = this.val.getAreaKidoku(this.#
|
|
26531
|
+
const t = this.val.getAreaKidoku(this.#e);
|
|
26539
26532
|
if (!t)
|
|
26540
|
-
throw `recordKidoku fn:'${this.#
|
|
26533
|
+
throw `recordKidoku fn:'${this.#e}' (areas === null)`;
|
|
26541
26534
|
if (this.#n.length > 0) {
|
|
26542
26535
|
t.record(this.#r);
|
|
26543
26536
|
return;
|
|
@@ -26549,10 +26542,10 @@ class ScriptIterator {
|
|
|
26549
26542
|
return this.#Z;
|
|
26550
26543
|
}
|
|
26551
26544
|
#rt() {
|
|
26552
|
-
this.val.getAreaKidoku(this.#
|
|
26545
|
+
this.val.getAreaKidoku(this.#e)?.erase(this.#r), this.#Z = !1;
|
|
26553
26546
|
}
|
|
26554
26547
|
get isNextKidoku() {
|
|
26555
|
-
let t = this.#
|
|
26548
|
+
let t = this.#e, e = this.#r, r = this.#t.len;
|
|
26556
26549
|
if (this.#n.length > 0) {
|
|
26557
26550
|
const k = this.#n[0];
|
|
26558
26551
|
t = k.fn, e = k.idx;
|
|
@@ -26568,11 +26561,11 @@ class ScriptIterator {
|
|
|
26568
26561
|
// // マクロ
|
|
26569
26562
|
// 括弧マクロの定義
|
|
26570
26563
|
#lt(t) {
|
|
26571
|
-
return this.#o.bracket2macro(t, this.hTag, this.#
|
|
26564
|
+
return this.#o.bracket2macro(t, this.hTag, this.#t, this.#r), !1;
|
|
26572
26565
|
}
|
|
26573
26566
|
// 一文字マクロの定義
|
|
26574
26567
|
#ut(t) {
|
|
26575
|
-
return this.#o.char2macro(t, this.hTag, this.#
|
|
26568
|
+
return this.#o.char2macro(t, this.hTag, this.#t, this.#r), !1;
|
|
26576
26569
|
}
|
|
26577
26570
|
// マクロ定義の開始
|
|
26578
26571
|
#dt = new RegExp(`["'#;\\] ]+`);
|
|
@@ -26584,12 +26577,12 @@ class ScriptIterator {
|
|
|
26584
26577
|
throw `[${e}]はタグかすでに定義済みのマクロです`;
|
|
26585
26578
|
if (this.#dt.test(e))
|
|
26586
26579
|
throw `[${e}]はマクロ名として異常です`;
|
|
26587
|
-
const r = this.#i, N = new CallStack(this.#
|
|
26580
|
+
const r = this.#i, N = new CallStack(this.#e, this.#r);
|
|
26588
26581
|
for (this.#ft += "|" + e, this.#ct = new RegExp(`\\[(${this.#ft})\\b`), this.hTag[e] = (k) => (k.design_unit = t.design_unit, this.#M({ ...k, ":hMp": this.val.cloneMp(), ":lenIfStk": this.#w.length }), this.val.setMp(k), this.val.setVal_Nochk("mp", "const.sn.macro", JSON.stringify({
|
|
26589
26582
|
name: t.name
|
|
26590
|
-
})), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#
|
|
26591
|
-
this.#
|
|
26592
|
-
const k = this.#
|
|
26583
|
+
})), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#e), this.#i = r, this.#tt(N), !1); this.#r < this.#t.len; ++this.#r) {
|
|
26584
|
+
this.#t.aLNum[this.#r] ||= this.#i;
|
|
26585
|
+
const k = this.#t.aToken[this.#r];
|
|
26593
26586
|
if (k.search(this.#Q) > -1)
|
|
26594
26587
|
return ++this.#r, !1;
|
|
26595
26588
|
const D = k.charCodeAt(0);
|
|
@@ -26632,7 +26625,7 @@ class ScriptIterator {
|
|
|
26632
26625
|
}), !0) : (delete this.#G[k], this.#E.playback(
|
|
26633
26626
|
this.#J.hPages,
|
|
26634
26627
|
"label" in t ? () => {
|
|
26635
|
-
this.#E.cover(!1), this.#
|
|
26628
|
+
this.#E.cover(!1), this.#e = k, this.#r = D, this.hTag.call({ fn: t.fn, label: t.label });
|
|
26636
26629
|
} : () => {
|
|
26637
26630
|
this.#E.cover(!1), this.#j(k, "", D);
|
|
26638
26631
|
}
|
|
@@ -26670,7 +26663,7 @@ class ScriptIterator {
|
|
|
26670
26663
|
nowScrIdx() {
|
|
26671
26664
|
if (this.#n.length === 0)
|
|
26672
26665
|
return {
|
|
26673
|
-
fn: this.#
|
|
26666
|
+
fn: this.#e,
|
|
26674
26667
|
idx: this.#r
|
|
26675
26668
|
};
|
|
26676
26669
|
const e = this.#n[0];
|
|
@@ -26698,7 +26691,7 @@ class ScriptIterator {
|
|
|
26698
26691
|
const B = this.#n[0];
|
|
26699
26692
|
e = B.fn, r = B.idx;
|
|
26700
26693
|
} else
|
|
26701
|
-
e = this.#
|
|
26694
|
+
e = this.#e, r = this.#r;
|
|
26702
26695
|
t[":path"] = this.#c(e);
|
|
26703
26696
|
const k = this.#P(this.#G[e], r);
|
|
26704
26697
|
t[":ln"] = k.ln, t[":col_s"] = k.col_s, t[":col_e"] = k.col_e;
|
|
@@ -26706,23 +26699,23 @@ class ScriptIterator {
|
|
|
26706
26699
|
t[":idx_tkn"] = D, t[":token"] = this.#G[e].aToken[D], this.sys.send2Dbg("_recodeDesign", t);
|
|
26707
26700
|
}
|
|
26708
26701
|
replace(t, e) {
|
|
26709
|
-
this.#
|
|
26702
|
+
this.#t.aToken[t] = e;
|
|
26710
26703
|
}
|
|
26711
26704
|
}
|
|
26712
26705
|
class Main {
|
|
26713
26706
|
constructor(t) {
|
|
26714
|
-
this.sys = t, skipHello(), Config.generate(t).then((e) => this.#
|
|
26707
|
+
this.sys = t, skipHello(), Config.generate(t).then((e) => this.#t = e).then(() => this.#v()).catch((e) => console.error("load err fn:prj.json e:%o", e));
|
|
26715
26708
|
}
|
|
26716
|
-
#e;
|
|
26717
26709
|
#t;
|
|
26710
|
+
#e;
|
|
26718
26711
|
static cvs;
|
|
26719
26712
|
#r = /* @__PURE__ */ Object.create(null);
|
|
26720
26713
|
// タグ処理辞書
|
|
26721
26714
|
#i;
|
|
26722
26715
|
#n;
|
|
26723
26716
|
#o;
|
|
26724
|
-
#h;
|
|
26725
26717
|
#l;
|
|
26718
|
+
#h;
|
|
26726
26719
|
#p;
|
|
26727
26720
|
#s;
|
|
26728
26721
|
#c = () => {
|
|
@@ -26736,15 +26729,15 @@ class Main {
|
|
|
26736
26729
|
throw "argChk_Color err";
|
|
26737
26730
|
CmnLib.cc4ColorName = t;
|
|
26738
26731
|
const e = {
|
|
26739
|
-
width: this.#
|
|
26740
|
-
height: this.#
|
|
26741
|
-
backgroundColor: parseColor(String(this.#
|
|
26732
|
+
width: this.#t.oCfg.window.width,
|
|
26733
|
+
height: this.#t.oCfg.window.height,
|
|
26734
|
+
backgroundColor: parseColor(String(this.#t.oCfg.init.bg_color)),
|
|
26742
26735
|
// このString()は後方互換性のため必須
|
|
26743
26736
|
// resolution : sys.resolution,
|
|
26744
26737
|
resolution: globalThis.devicePixelRatio ?? 1
|
|
26745
26738
|
// 理想
|
|
26746
26739
|
}, r = document.getElementById(this.#d);
|
|
26747
|
-
r && (this.#_ = r.cloneNode(!0), this.#_.id = this.#d, e.view = r), this.#
|
|
26740
|
+
r && (this.#_ = r.cloneNode(!0), this.#_.id = this.#d, e.view = r), this.#e = new Application(e), Main.cvs = this.#e.view, r || (document.body.appendChild(Main.cvs), Main.cvs.id = this.#d), this.#i = new Variable(this.#t, this.#r), this.#n = new PropParser(this.#i, this.#t.oCfg.init.escape ?? "\\"), await Promise.allSettled(this.sys.init(this.#r, this.#e, this.#i, this)), this.#r.title({ text: this.#t.oCfg.book.title || "SKYNovel" }), this.#o = new SoundMng(this.#t, this.#r, this.#i, this, this.sys), this.#l = new ScriptIterator(this.#t, this.#r, this, this.#i, this.#g, () => this.#m(), this.#n, this.#o, this.sys), this.#h = new DebugMng(this.sys, this.#r, this.#l), this.#p = new LayerMng(this.#t, this.#r, this.#e, this.#i, this, this.#l, this.sys, this.#o, this.#g, this.#n), this.#s = new EventMng(this.#t, this.#r, this.#e, this, this.#p, this.#i, this.#o, this.#l, this.sys), this.#e.ticker.add(this.#u), this.resumeByJumpOrCall({ fn: "main" }), this.#f = !0;
|
|
26748
26741
|
}
|
|
26749
26742
|
#u = () => this.#c();
|
|
26750
26743
|
// thisの扱いによりメソッド代入はダメ
|
|
@@ -26756,19 +26749,19 @@ class Main {
|
|
|
26756
26749
|
#b = (t = this.#m) => {
|
|
26757
26750
|
this.#y || (this.#p.clearBreak(), this.#c = t, this.resume = (e = this.#m) => {
|
|
26758
26751
|
this.#c = e;
|
|
26759
|
-
}, this.#
|
|
26752
|
+
}, this.#l.noticeBreak(!1));
|
|
26760
26753
|
};
|
|
26761
26754
|
resume = this.#b;
|
|
26762
26755
|
resumeByJumpOrCall(t) {
|
|
26763
26756
|
if (t.url) {
|
|
26764
|
-
this.#r.navigate_to(t), this.#
|
|
26757
|
+
this.#r.navigate_to(t), this.#l.jumpJustBefore();
|
|
26765
26758
|
return;
|
|
26766
26759
|
}
|
|
26767
|
-
this.#i.setVal_Nochk("tmp", "sn.eventArg", t.arg ?? ""), this.#i.setVal_Nochk("tmp", "sn.eventLabel", t.label ?? ""), argChk_Boolean(t, "call", !1) ? (this.#
|
|
26760
|
+
this.#i.setVal_Nochk("tmp", "sn.eventArg", t.arg ?? ""), this.#i.setVal_Nochk("tmp", "sn.eventLabel", t.label ?? ""), argChk_Boolean(t, "call", !1) ? (this.#l.subIdxToken(), this.resume(() => this.#r.call(t))) : (this.#r.clear_event({}), this.resume(() => this.#r.jump(t)));
|
|
26768
26761
|
}
|
|
26769
26762
|
stop = () => {
|
|
26770
26763
|
this.#c = () => {
|
|
26771
|
-
}, this.resume = this.#b, this.#
|
|
26764
|
+
}, this.resume = this.#b, this.#l.noticeBreak(!0);
|
|
26772
26765
|
};
|
|
26773
26766
|
setLoop(t, e = "") {
|
|
26774
26767
|
(this.#a = t) ? this.resume() : this.stop(), this.sys.setTitleInfo(e ? ` -- ${e}中` : "");
|
|
@@ -26776,21 +26769,21 @@ class Main {
|
|
|
26776
26769
|
#a = !0;
|
|
26777
26770
|
#m() {
|
|
26778
26771
|
for (; this.#a; ) {
|
|
26779
|
-
let t = this.#
|
|
26772
|
+
let t = this.#l.nextToken();
|
|
26780
26773
|
if (!t)
|
|
26781
26774
|
break;
|
|
26782
26775
|
const e = t.charCodeAt(0);
|
|
26783
26776
|
if (e !== 9) {
|
|
26784
26777
|
if (e === 10) {
|
|
26785
|
-
this.#
|
|
26778
|
+
this.#l.addLineNum(t.length);
|
|
26786
26779
|
continue;
|
|
26787
26780
|
}
|
|
26788
26781
|
if (e === 91) {
|
|
26789
|
-
if (this.#
|
|
26782
|
+
if (this.#l.isBreak(t))
|
|
26790
26783
|
return;
|
|
26791
26784
|
try {
|
|
26792
26785
|
const r = (t.match(/\n/g) ?? []).length;
|
|
26793
|
-
if (r > 0 && this.#
|
|
26786
|
+
if (r > 0 && this.#l.addLineNum(r), this.#l.タグ解析(t)) {
|
|
26794
26787
|
this.stop();
|
|
26795
26788
|
break;
|
|
26796
26789
|
}
|
|
@@ -26803,7 +26796,7 @@ class Main {
|
|
|
26803
26796
|
if (e === 38)
|
|
26804
26797
|
try {
|
|
26805
26798
|
if (t.at(-1) !== "&") {
|
|
26806
|
-
if (this.#
|
|
26799
|
+
if (this.#l.isBreak(t))
|
|
26807
26800
|
return;
|
|
26808
26801
|
const r = splitAmpersand(t.slice(1));
|
|
26809
26802
|
r.name = this.#n.getValAmpersand(r.name), r.text = String(this.#n.parse(r.text)), this.#r.let(r);
|
|
@@ -26841,7 +26834,7 @@ class Main {
|
|
|
26841
26834
|
this.#s.fire(t, e);
|
|
26842
26835
|
}
|
|
26843
26836
|
async destroy(t = 0) {
|
|
26844
|
-
this.#y || (this.#y = !0, this.#f && (this.stop(), this.#a = !1, this.#p.before_destroy(), t > 0 && await new Promise((e) => setTimeout(e, t)), this.#r = {}, this.#s.destroy(), this.#
|
|
26837
|
+
this.#y || (this.#y = !0, this.#f && (this.stop(), this.#a = !1, this.#p.before_destroy(), t > 0 && await new Promise((e) => setTimeout(e, t)), this.#r = {}, this.#s.destroy(), this.#l.destroy(), this.#p.destroy(), this.#h.destroy(), this.#e.ticker.remove(this.#u), this.#_ && this.#e && Main.cvs.parentNode.appendChild(this.#_), clearTextureCache(), this.#e.destroy(!0), this.sys.destroy()));
|
|
26845
26838
|
}
|
|
26846
26839
|
#y = !1;
|
|
26847
26840
|
isDestroyed = () => this.#y;
|
|
@@ -28975,16 +28968,16 @@ class SysBase {
|
|
|
28975
28968
|
initVal(t, e, r) {
|
|
28976
28969
|
}
|
|
28977
28970
|
flush() {
|
|
28978
|
-
if (this.#
|
|
28979
|
-
this.#
|
|
28971
|
+
if (this.#t) {
|
|
28972
|
+
this.#e = !0;
|
|
28980
28973
|
return;
|
|
28981
28974
|
}
|
|
28982
|
-
this.flushSub(), this.#
|
|
28983
|
-
this.#
|
|
28975
|
+
this.flushSub(), this.#t = setTimeout(() => {
|
|
28976
|
+
this.#t = void 0, this.#e && (this.#e = !1, this.flush());
|
|
28984
28977
|
}, 500);
|
|
28985
28978
|
}
|
|
28986
|
-
#
|
|
28987
|
-
#
|
|
28979
|
+
#t = void 0;
|
|
28980
|
+
#e = !1;
|
|
28988
28981
|
flushSub() {
|
|
28989
28982
|
}
|
|
28990
28983
|
async run() {
|
|
@@ -29030,8 +29023,8 @@ class SysBase {
|
|
|
29030
29023
|
#i = 0;
|
|
29031
29024
|
#n = 0;
|
|
29032
29025
|
#o = 1;
|
|
29033
|
-
#h = 0;
|
|
29034
29026
|
#l = 0;
|
|
29027
|
+
#h = 0;
|
|
29035
29028
|
#p = 0;
|
|
29036
29029
|
#s = 0;
|
|
29037
29030
|
get cvsWidth() {
|
|
@@ -29044,10 +29037,10 @@ class SysBase {
|
|
|
29044
29037
|
return this.#o;
|
|
29045
29038
|
}
|
|
29046
29039
|
get ofsLeft4elm() {
|
|
29047
|
-
return this.#
|
|
29040
|
+
return this.#l;
|
|
29048
29041
|
}
|
|
29049
29042
|
get ofsTop4elm() {
|
|
29050
|
-
return this.#
|
|
29043
|
+
return this.#h;
|
|
29051
29044
|
}
|
|
29052
29045
|
get ofsPadLeft_Dom2PIXI() {
|
|
29053
29046
|
return this.#p;
|
|
@@ -29080,7 +29073,7 @@ class SysBase {
|
|
|
29080
29073
|
const D = r.parentElement.style;
|
|
29081
29074
|
N || (D.position = "relative", D.width = `${this.#i}px`, D.height = `${this.#n}px`);
|
|
29082
29075
|
const B = r.style;
|
|
29083
|
-
B.width = D.width, B.height = D.height, N ? (this.#
|
|
29076
|
+
B.width = D.width, B.height = D.height, N ? (this.#l = k.left, this.#h = k.top) : (this.#l = 0, this.#h = 0), this.isFullScr && (this.#l += (t - this.#i) / 2, this.#h += (e - this.#n) / 2);
|
|
29084
29077
|
}
|
|
29085
29078
|
// デバッガ接続
|
|
29086
29079
|
attach_debug(t) {
|
|
@@ -29838,11 +29831,11 @@ const devtools = {
|
|
|
29838
29831
|
main({ emitEvents: !1 });
|
|
29839
29832
|
setInterval(main, 500);
|
|
29840
29833
|
class SysWeb extends SysBase {
|
|
29841
|
-
#
|
|
29834
|
+
#t = "";
|
|
29842
29835
|
constructor(t = {}, e = { cur: "prj/", crypto: !1, dip: "" }) {
|
|
29843
29836
|
super(t, e);
|
|
29844
29837
|
const r = e.cur.split("/");
|
|
29845
|
-
this.#
|
|
29838
|
+
this.#t = r.length > 2 ? r.slice(0, -2).join("/") + "/" : "", globalThis.onload = async () => this.loaded(t, e);
|
|
29846
29839
|
}
|
|
29847
29840
|
async loaded(t, e) {
|
|
29848
29841
|
await super.loaded(t, e), document.querySelectorAll("[data-prj]").forEach((D) => {
|
|
@@ -29858,11 +29851,11 @@ class SysWeb extends SysBase {
|
|
|
29858
29851
|
return;
|
|
29859
29852
|
argChk_Boolean(CmnLib.hDip, "dbg", !1) && (CmnLib.isDbg = !0, this.fetch = (D) => fetch(D, { mode: "cors" })), this.extPort = argChk_Num(CmnLib.hDip, "port", this.extPort);
|
|
29860
29853
|
const k = r.get("cur");
|
|
29861
|
-
k && (e.cur = this.#
|
|
29854
|
+
k && (e.cur = this.#t + k + "/"), this.run();
|
|
29862
29855
|
}
|
|
29863
|
-
#
|
|
29856
|
+
#e = ":";
|
|
29864
29857
|
runSN(t) {
|
|
29865
|
-
this.arg.cur = this.#
|
|
29858
|
+
this.arg.cur = this.#t + t + "/", this.#e !== this.arg.cur && (this.#e = this.arg.cur, this.run());
|
|
29866
29859
|
}
|
|
29867
29860
|
run = async () => {
|
|
29868
29861
|
this.#r && (this.#r.destroy(10), await new Promise((e) => setTimeout(e, 10))), this.#r = new Main(this);
|