@famibee/skynovel 1.64.13 → 1.64.15

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.
@@ -1,4 +1,4 @@
1
- import { l as R, m as w, T as M, n as ue, k as F, e as A, S as ae, L as le } from "./app2.js";
1
+ import { l as R, m as O, T as M, n as ue, k as j, e as A, S as ae, L as le } from "./app2.js";
2
2
  import { C as ce } from "./CmnTween.js";
3
3
  import { a as L, T as pe, r as he } from "./Reading.js";
4
4
  var ee;
@@ -27,9 +27,9 @@ var V = function() {
27
27
  }, se = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], K = {};
28
28
  function fe(n) {
29
29
  var e = V({ m4a: "audio/mp4", oga: "audio/ogg", opus: 'audio/ogg; codecs="opus"', caf: 'audio/x-caf; codecs="opus"' }, n || {}), t = document.createElement("audio"), s = {}, o = /^no$/;
30
- se.forEach(function(r) {
31
- var i = t.canPlayType("audio/".concat(r)).replace(o, ""), u = e[r] ? t.canPlayType(e[r]).replace(o, "") : "";
32
- s[r] = !!i || !!u;
30
+ se.forEach(function(i) {
31
+ var r = t.canPlayType("audio/".concat(i)).replace(o, ""), u = e[i] ? t.canPlayType(e[i]).replace(o, "") : "";
32
+ s[i] = !!r || !!u;
33
33
  }), Object.assign(K, s);
34
34
  }
35
35
  fe();
@@ -37,17 +37,17 @@ var de = /\.(\{([^\}]+)\})(\?.*)?$/;
37
37
  function ne(n) {
38
38
  var e = de, t = typeof n == "string" ? n : n.url;
39
39
  if (!e.test(t)) return t;
40
- for (var s = e.exec(t), o = s[2].split(","), r = o[o.length - 1], i = 0, u = o.length; i < u; i++) {
41
- var a = o[i];
40
+ for (var s = e.exec(t), o = s[2].split(","), i = o[o.length - 1], r = 0, u = o.length; r < u; r++) {
41
+ var a = o[r];
42
42
  if (K[a]) {
43
- r = a;
43
+ i = a;
44
44
  break;
45
45
  }
46
46
  }
47
- var l = t.replace(s[1], r);
47
+ var l = t.replace(s[1], i);
48
48
  if (typeof n != "string") {
49
49
  var h = n;
50
- h.extension = r, h.url = l;
50
+ h.extension = i, h.url = l;
51
51
  }
52
52
  return l;
53
53
  }
@@ -60,9 +60,9 @@ var q = se.filter(function(n) {
60
60
  n.setLegacy(_().useLegacy);
61
61
  }, n.setLegacy = function(e) {
62
62
  e ? q.forEach(function(t) {
63
- w.setExtensionXhrType(t, w.XHR_RESPONSE_TYPE.DEFAULT), w.setExtensionLoadType(t, w.LOAD_TYPE.AUDIO);
63
+ O.setExtensionXhrType(t, O.XHR_RESPONSE_TYPE.DEFAULT), O.setExtensionLoadType(t, O.LOAD_TYPE.AUDIO);
64
64
  }) : q.forEach(function(t) {
65
- w.setExtensionXhrType(t, w.XHR_RESPONSE_TYPE.BUFFER), w.setExtensionLoadType(t, w.LOAD_TYPE.XHR);
65
+ O.setExtensionXhrType(t, O.XHR_RESPONSE_TYPE.BUFFER), O.setExtensionLoadType(t, O.LOAD_TYPE.XHR);
66
66
  });
67
67
  }, n.pre = function(e, t) {
68
68
  ne(e), t();
@@ -133,14 +133,14 @@ var q = se.filter(function(n) {
133
133
  }, enumerable: !1, configurable: !0 }), e.prototype.refresh = function() {
134
134
  var t = this._media.context, s = this._media.parent;
135
135
  this._source.loop = this._loop || s.loop;
136
- var o = t.volume * (t.muted ? 0 : 1), r = s.volume * (s.muted ? 0 : 1), i = this._volume * (this._muted ? 0 : 1);
137
- this._source.volume = i * o * r, this._source.playbackRate = this._speed * t.speed * s.speed;
136
+ var o = t.volume * (t.muted ? 0 : 1), i = s.volume * (s.muted ? 0 : 1), r = this._volume * (this._muted ? 0 : 1);
137
+ this._source.volume = r * o * i, this._source.playbackRate = this._speed * t.speed * s.speed;
138
138
  }, e.prototype.refreshPaused = function() {
139
139
  var t = this._media.context, s = this._media.parent, o = this._paused || s.paused || t.paused;
140
140
  o !== this._pausedReal && (this._pausedReal = o, o ? (this._internalStop(), this.emit("paused")) : (this.emit("resumed"), this.play({ start: this._source.currentTime, end: this._end, volume: this._volume, speed: this._speed, loop: this._loop })), this.emit("pause", o));
141
141
  }, e.prototype.play = function(t) {
142
- var s = this, o = t.start, r = t.end, i = t.speed, u = t.loop, a = t.volume, l = t.muted;
143
- this._speed = i, this._volume = a, this._loop = !!u, this._muted = l, this.refresh(), this.loop && r !== null && (this.loop = !1), this._start = o, this._end = r || this._duration, this._start = Math.max(0, this._start - e.PADDING), this._end = Math.min(this._end + e.PADDING, this._duration), this._source.onloadedmetadata = function() {
142
+ var s = this, o = t.start, i = t.end, r = t.speed, u = t.loop, a = t.volume, l = t.muted;
143
+ this._speed = r, this._volume = a, this._loop = !!u, this._muted = l, this.refresh(), this.loop && i !== null && (this.loop = !1), this._start = o, this._end = i || this._duration, this._start = Math.max(0, this._start - e.PADDING), this._end = Math.min(this._end + e.PADDING, this._duration), this._source.onloadedmetadata = function() {
144
144
  s._source && (s._source.currentTime = o, s._source.onloadedmetadata = null, s.emit("progress", o, s._duration), M.shared.add(s._onUpdate, s));
145
145
  }, this._source.onended = this._onComplete.bind(this), this._source.play(), this.emit("start");
146
146
  }, e.prototype._onUpdate = function() {
@@ -179,20 +179,20 @@ var q = se.filter(function(n) {
179
179
  var s = this._source, o = this.parent;
180
180
  if (s.readyState !== 4) if (o.url) {
181
181
  s.src = o.url;
182
- var r = function() {
182
+ var i = function() {
183
183
  a(), o.isLoaded = !0;
184
184
  var h = o.autoPlayStart();
185
185
  t && t(null, o, h);
186
- }, i = function() {
186
+ }, r = function() {
187
187
  a(), t && t(new Error("Sound loading has been aborted"));
188
188
  }, u = function() {
189
189
  a();
190
190
  var h = "Failed to load audio element (code: ".concat(s.error.code, ")");
191
191
  t && t(new Error(h));
192
192
  }, a = function() {
193
- s.removeEventListener("canplaythrough", r), s.removeEventListener("load", r), s.removeEventListener("abort", i), s.removeEventListener("error", u);
193
+ s.removeEventListener("canplaythrough", i), s.removeEventListener("load", i), s.removeEventListener("abort", r), s.removeEventListener("error", u);
194
194
  };
195
- s.addEventListener("canplaythrough", r, !1), s.addEventListener("load", r, !1), s.addEventListener("abort", i, !1), s.addEventListener("error", u, !1), s.load();
195
+ s.addEventListener("canplaythrough", i, !1), s.addEventListener("load", i, !1), s.addEventListener("abort", r, !1), s.addEventListener("error", u, !1), s.load();
196
196
  } else t(new Error("sound.url or sound.source must be set"));
197
197
  else {
198
198
  o.isLoaded = !0;
@@ -276,8 +276,8 @@ var q = se.filter(function(n) {
276
276
  if (this._source) {
277
277
  var t = this._media.context, s = this._media.parent;
278
278
  this._source.loop = this._loop || s.loop;
279
- var o = t.volume * (t.muted ? 0 : 1), r = s.volume * (s.muted ? 0 : 1), i = this._volume * (this._muted ? 0 : 1);
280
- v.setParamValue(this._gain.gain, i * r * o), v.setParamValue(this._source.playbackRate, this._speed * s.speed * t.speed), this.applyFilters();
279
+ var o = t.volume * (t.muted ? 0 : 1), i = s.volume * (s.muted ? 0 : 1), r = this._volume * (this._muted ? 0 : 1);
280
+ v.setParamValue(this._gain.gain, r * i * o), v.setParamValue(this._source.playbackRate, this._speed * s.speed * t.speed), this.applyFilters();
281
281
  }
282
282
  }, e.prototype.applyFilters = function() {
283
283
  var t;
@@ -292,10 +292,10 @@ var q = se.filter(function(n) {
292
292
  var t = this._media.context, s = this._media.parent, o = this._paused || s.paused || t.paused;
293
293
  o !== this._pausedReal && (this._pausedReal = o, o ? (this._internalStop(), this.emit("paused")) : (this.emit("resumed"), this.play({ start: this._elapsed % this._duration, end: this._end, speed: this._speed, loop: this._loop, volume: this._volume })), this.emit("pause", o));
294
294
  }, e.prototype.play = function(t) {
295
- var s = t.start, o = t.end, r = t.speed, i = t.loop, u = t.volume, a = t.muted, l = t.filters;
295
+ var s = t.start, o = t.end, i = t.speed, r = t.loop, u = t.volume, a = t.muted, l = t.filters;
296
296
  this._paused = !1;
297
297
  var h = this._media.nodes.cloneBufferSource(), y = h.source, m = h.gain;
298
- this._source = y, this._gain = m, this._speed = r, this._volume = u, this._loop = !!i, this._muted = a, this._filters = l, this.refresh();
298
+ this._source = y, this._gain = m, this._speed = i, this._volume = u, this._loop = !!r, this._muted = a, this._filters = l, this.refresh();
299
299
  var g = this._source.buffer.duration;
300
300
  this._duration = g, this._end = o, this._lastUpdate = this._now(), this._elapsed = s, this._source.onended = this._onComplete.bind(this), this._loop ? (this._source.loopEnd = o, this._source.loopStart = s, this._source.start(0, s)) : o ? this._source.start(0, s, o - s) : this._source.start(0, s), this.emit("start"), this._update(!0), this.enableTicker(!0);
301
301
  }, e.prototype.enableTicker = function(t) {
@@ -321,14 +321,14 @@ var q = se.filter(function(n) {
321
321
  if (t === void 0 && (t = !1), this._source) {
322
322
  var s = this._now(), o = s - this._lastUpdate;
323
323
  if (o > 0 || t) {
324
- var r = this._source.playbackRate.value;
325
- this._elapsed += o * r, this._lastUpdate = s;
326
- var i = this._duration, u = void 0;
324
+ var i = this._source.playbackRate.value;
325
+ this._elapsed += o * i, this._lastUpdate = s;
326
+ var r = this._duration, u = void 0;
327
327
  if (this._source.loopStart) {
328
328
  var a = this._source.loopEnd - this._source.loopStart;
329
- u = (this._source.loopStart + this._elapsed % a) / i;
330
- } else u = this._elapsed % i / i;
331
- this._progress = u, this.emit("progress", this._progress, i);
329
+ u = (this._source.loopStart + this._elapsed % a) / r;
330
+ } else u = this._elapsed % r / r;
331
+ this._progress = u, this.emit("progress", this._progress, r);
332
332
  }
333
333
  }
334
334
  }, e.prototype.init = function(t) {
@@ -352,7 +352,7 @@ var q = se.filter(function(n) {
352
352
  }
353
353
  this._source = null, this._progress = 1, this.emit("progress", 1, this._duration), this.emit("end", this);
354
354
  }, e;
355
- }(R), re = function() {
355
+ }(R), ie = function() {
356
356
  function n(e, t) {
357
357
  this._output = t, this._input = e;
358
358
  }
@@ -376,8 +376,8 @@ var q = se.filter(function(n) {
376
376
  }, n;
377
377
  }(), Pe = function(n) {
378
378
  function e(t) {
379
- var s = this, o = t.audioContext, r = o.createBufferSource(), i = o.createGain(), u = o.createAnalyser();
380
- return r.connect(u), u.connect(i), i.connect(t.destination), (s = n.call(this, u, i) || this).context = t, s.bufferSource = r, s.gain = i, s.analyser = u, s;
379
+ var s = this, o = t.audioContext, i = o.createBufferSource(), r = o.createGain(), u = o.createAnalyser();
380
+ return i.connect(u), u.connect(r), r.connect(t.destination), (s = n.call(this, u, r) || this).context = t, s.bufferSource = i, s.gain = r, s.analyser = u, s;
381
381
  }
382
382
  return b(e, n), Object.defineProperty(e.prototype, "script", { get: function() {
383
383
  return this._script || (this._script = this.context.audioContext.createScriptProcessor(e.BUFFER_SIZE), this._script.connect(this.context.destination)), this._script;
@@ -391,7 +391,7 @@ var q = se.filter(function(n) {
391
391
  }, Object.defineProperty(e.prototype, "bufferSize", { get: function() {
392
392
  return this.script.bufferSize;
393
393
  }, enumerable: !1, configurable: !0 }), e.BUFFER_SIZE = 0, e;
394
- }(re), xe = function() {
394
+ }(ie), xe = function() {
395
395
  function n() {
396
396
  }
397
397
  return n.prototype.init = function(e) {
@@ -429,10 +429,10 @@ var q = se.filter(function(n) {
429
429
  t.source = s.response, t._decode(s.response, e);
430
430
  }, s.send();
431
431
  }, n.prototype._decode = function(e, t) {
432
- var s = this, o = function(r, i) {
433
- if (r) t && t(r);
432
+ var s = this, o = function(i, r) {
433
+ if (i) t && t(i);
434
434
  else {
435
- s.parent.isLoaded = !0, s.buffer = i;
435
+ s.parent.isLoaded = !0, s.buffer = r;
436
436
  var u = s.parent.autoPlayStart();
437
437
  t && t(null, s.parent, u);
438
438
  }
@@ -472,8 +472,8 @@ var q = se.filter(function(n) {
472
472
  for (var o in e) s[o] = this.addSprites(o, e[o]);
473
473
  return s;
474
474
  }
475
- var r = new ge(this, t);
476
- return this._sprites[e] = r, r;
475
+ var i = new ge(this, t);
476
+ return this._sprites[e] = i, i;
477
477
  }, n.prototype.destroy = function() {
478
478
  this._removeInstances(), this.removeSprites(), this.media.destroy(), this.media = null, this._sprites = null, this._instances = null;
479
479
  }, n.prototype.removeSprites = function(e) {
@@ -491,9 +491,9 @@ var q = se.filter(function(n) {
491
491
  return this;
492
492
  }, n.prototype.play = function(e, t) {
493
493
  var s, o = this;
494
- if (typeof e == "string" ? s = { sprite: i = e, loop: this.loop, complete: t } : typeof e == "function" ? (s = {}).complete = e : s = e, (s = V({ complete: null, loaded: null, sprite: null, end: null, start: 0, volume: 1, speed: 1, muted: !1, loop: !1 }, s || {})).sprite) {
495
- var r = s.sprite, i = this._sprites[r];
496
- s.start = i.start + (s.start || 0), s.end = i.end, s.speed = i.speed || 1, s.loop = i.loop || s.loop, delete s.sprite;
494
+ if (typeof e == "string" ? s = { sprite: r = e, loop: this.loop, complete: t } : typeof e == "function" ? (s = {}).complete = e : s = e, (s = V({ complete: null, loaded: null, sprite: null, end: null, start: 0, volume: 1, speed: 1, muted: !1, loop: !1 }, s || {})).sprite) {
495
+ var i = s.sprite, r = this._sprites[i];
496
+ s.start = r.start + (s.start || 0), s.end = r.end, s.speed = r.speed || 1, s.loop = r.loop || s.loop, delete s.sprite;
497
497
  }
498
498
  if (s.offset && (s.start = s.offset), !this.isLoaded) return new Promise(function(a, l) {
499
499
  o.autoPlay = !0, o._autoPlayOptions = s, o._preload(function(h, y, m) {
@@ -577,8 +577,8 @@ var q = se.filter(function(n) {
577
577
  function e() {
578
578
  var t = n.call(this, null, null) || this;
579
579
  t.autoPause = !0;
580
- var s = window, o = new e.AudioContext(), r = o.createDynamicsCompressor(), i = o.createAnalyser();
581
- return i.connect(r), r.connect(o.destination), t._input = i, t._output = o.destination, t._ctx = o, t._offlineCtx = new e.OfflineAudioContext(1, 2, s.OfflineAudioContext ? Math.max(8e3, Math.min(96e3, o.sampleRate)) : 44100), t.compressor = r, t.analyser = i, t.events = new R(), t.volume = 1, t.speed = 1, t.muted = !1, t.paused = !1, t._locked = o.state === "suspended" && ("ontouchstart" in globalThis || "onclick" in globalThis), t._locked && (t._unlock(), t._unlock = t._unlock.bind(t), document.addEventListener("mousedown", t._unlock, !0), document.addEventListener("touchstart", t._unlock, !0), document.addEventListener("touchend", t._unlock, !0)), t.onFocus = t.onFocus.bind(t), t.onBlur = t.onBlur.bind(t), globalThis.addEventListener("focus", t.onFocus), globalThis.addEventListener("blur", t.onBlur), t;
580
+ var s = window, o = new e.AudioContext(), i = o.createDynamicsCompressor(), r = o.createAnalyser();
581
+ return r.connect(i), i.connect(o.destination), t._input = r, t._output = o.destination, t._ctx = o, t._offlineCtx = new e.OfflineAudioContext(1, 2, s.OfflineAudioContext ? Math.max(8e3, Math.min(96e3, o.sampleRate)) : 44100), t.compressor = i, t.analyser = r, t.events = new R(), t.volume = 1, t.speed = 1, t.muted = !1, t.paused = !1, t._locked = o.state === "suspended" && ("ontouchstart" in globalThis || "onclick" in globalThis), t._locked && (t._unlock(), t._unlock = t._unlock.bind(t), document.addEventListener("mousedown", t._unlock, !0), document.addEventListener("touchstart", t._unlock, !0), document.addEventListener("touchend", t._unlock, !0)), t.onFocus = t.onFocus.bind(t), t.onBlur = t.onBlur.bind(t), globalThis.addEventListener("focus", t.onFocus), globalThis.addEventListener("blur", t.onBlur), t;
582
582
  }
583
583
  return b(e, n), e.prototype.onFocus = function() {
584
584
  if (this.autoPause) {
@@ -619,14 +619,14 @@ var q = se.filter(function(n) {
619
619
  }, e.prototype.togglePause = function() {
620
620
  return this.paused = !this.paused, this.refreshPaused(), this._paused;
621
621
  }, e.prototype.decode = function(t, s) {
622
- var o = function(i) {
623
- s(new Error(i?.message || "Unable to decode file"));
624
- }, r = this._offlineCtx.decodeAudioData(t, function(i) {
625
- s(null, i);
622
+ var o = function(r) {
623
+ s(new Error(r?.message || "Unable to decode file"));
624
+ }, i = this._offlineCtx.decodeAudioData(t, function(r) {
625
+ s(null, r);
626
626
  }, o);
627
- r && r.catch(o);
627
+ i && i.catch(o);
628
628
  }, e;
629
- }(re), Oe = function() {
629
+ }(ie), Oe = function() {
630
630
  function n() {
631
631
  this.init();
632
632
  }
@@ -644,13 +644,13 @@ var q = se.filter(function(n) {
644
644
  if (typeof e == "object") {
645
645
  var s = {};
646
646
  for (var o in e) {
647
- var r = this._getOptions(e[o], t);
648
- s[o] = this.add(o, r);
647
+ var i = this._getOptions(e[o], t);
648
+ s[o] = this.add(o, i);
649
649
  }
650
650
  return s;
651
651
  }
652
652
  if (t instanceof N) return this._sounds[e] = t, t;
653
- var i = this._getOptions(t), u = N.from(i);
653
+ var r = this._getOptions(t), u = N.from(r);
654
654
  return this._sounds[e] = u, u;
655
655
  }, n.prototype._getOptions = function(e, t) {
656
656
  var s;
@@ -714,7 +714,7 @@ var q = se.filter(function(n) {
714
714
  }, n.prototype.close = function() {
715
715
  return this.removeAll(), this._sounds = null, this._webAudioContext && (this._webAudioContext.destroy(), this._webAudioContext = null), this._htmlAudioContext && (this._htmlAudioContext.destroy(), this._htmlAudioContext = null), this._context = null, this;
716
716
  }, n;
717
- }(), S = function() {
717
+ }(), k = function() {
718
718
  function n(e, t) {
719
719
  this.init(e, t);
720
720
  }
@@ -728,18 +728,18 @@ var q = se.filter(function(n) {
728
728
  this.disconnect(), this.destination = null, this.source = null;
729
729
  }, n;
730
730
  }(), B = { __proto__: null, EqualizerFilter: function(n) {
731
- function e(t, s, o, r, i, u, a, l, h, y) {
732
- t === void 0 && (t = 0), s === void 0 && (s = 0), o === void 0 && (o = 0), r === void 0 && (r = 0), i === void 0 && (i = 0), u === void 0 && (u = 0), a === void 0 && (a = 0), l === void 0 && (l = 0), h === void 0 && (h = 0), y === void 0 && (y = 0);
731
+ function e(t, s, o, i, r, u, a, l, h, y) {
732
+ t === void 0 && (t = 0), s === void 0 && (s = 0), o === void 0 && (o = 0), i === void 0 && (i = 0), r === void 0 && (r = 0), u === void 0 && (u = 0), a === void 0 && (a = 0), l === void 0 && (l = 0), h === void 0 && (h = 0), y === void 0 && (y = 0);
733
733
  var m = this;
734
734
  if (!_().useLegacy) {
735
- var g = [{ f: e.F32, type: "lowshelf", gain: t }, { f: e.F64, type: "peaking", gain: s }, { f: e.F125, type: "peaking", gain: o }, { f: e.F250, type: "peaking", gain: r }, { f: e.F500, type: "peaking", gain: i }, { f: e.F1K, type: "peaking", gain: u }, { f: e.F2K, type: "peaking", gain: a }, { f: e.F4K, type: "peaking", gain: l }, { f: e.F8K, type: "peaking", gain: h }, { f: e.F16K, type: "highshelf", gain: y }].map(function($) {
735
+ var g = [{ f: e.F32, type: "lowshelf", gain: t }, { f: e.F64, type: "peaking", gain: s }, { f: e.F125, type: "peaking", gain: o }, { f: e.F250, type: "peaking", gain: i }, { f: e.F500, type: "peaking", gain: r }, { f: e.F1K, type: "peaking", gain: u }, { f: e.F2K, type: "peaking", gain: a }, { f: e.F4K, type: "peaking", gain: l }, { f: e.F8K, type: "peaking", gain: h }, { f: e.F16K, type: "highshelf", gain: y }].map(function($) {
736
736
  var p = _().context.audioContext.createBiquadFilter();
737
737
  return p.type = $.type, v.setParamValue(p.Q, 1), p.frequency.value = $.f, v.setParamValue(p.gain, $.gain), p;
738
738
  });
739
739
  (m = n.call(this, g[0], g[g.length - 1]) || this).bands = g, m.bandsMap = {};
740
740
  for (var f = 0; f < m.bands.length; f++) {
741
- var x = m.bands[f];
742
- f > 0 && m.bands[f - 1].connect(x), m.bandsMap[x.frequency.value] = x;
741
+ var w = m.bands[f];
742
+ f > 0 && m.bands[f - 1].connect(w), m.bandsMap[w.frequency.value] = w;
743
743
  }
744
744
  return m;
745
745
  }
@@ -800,7 +800,7 @@ var q = se.filter(function(n) {
800
800
  t.disconnect();
801
801
  }), this.bands = null, this.bandsMap = null;
802
802
  }, e.F32 = 32, e.F64 = 64, e.F125 = 125, e.F250 = 250, e.F500 = 500, e.F1K = 1e3, e.F2K = 2e3, e.F4K = 4e3, e.F8K = 8e3, e.F16K = 16e3, e;
803
- }(S), DistortionFilter: function(n) {
803
+ }(k), DistortionFilter: function(n) {
804
804
  function e(t) {
805
805
  t === void 0 && (t = 0);
806
806
  var s = this;
@@ -814,18 +814,18 @@ var q = se.filter(function(n) {
814
814
  return this._amount;
815
815
  }, set: function(t) {
816
816
  this._amount = t;
817
- for (var s, o = 1e3 * t, r = 44100, i = new Float32Array(r), u = Math.PI / 180, a = 0; a < r; ++a) s = 2 * a / r - 1, i[a] = (3 + o) * s * 20 * u / (Math.PI + o * Math.abs(s));
818
- this._distortion.curve = i, this._distortion.oversample = "4x";
817
+ for (var s, o = 1e3 * t, i = 44100, r = new Float32Array(i), u = Math.PI / 180, a = 0; a < i; ++a) s = 2 * a / i - 1, r[a] = (3 + o) * s * 20 * u / (Math.PI + o * Math.abs(s));
818
+ this._distortion.curve = r, this._distortion.oversample = "4x";
819
819
  }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
820
820
  this._distortion = null, n.prototype.destroy.call(this);
821
821
  }, e;
822
- }(S), StereoFilter: function(n) {
822
+ }(k), StereoFilter: function(n) {
823
823
  function e(t) {
824
824
  t === void 0 && (t = 0);
825
825
  var s = this;
826
826
  if (!_().useLegacy) {
827
- var o, r, i, u = _().context.audioContext;
828
- return u.createStereoPanner ? i = o = u.createStereoPanner() : ((r = u.createPanner()).panningModel = "equalpower", i = r), (s = n.call(this, i) || this)._stereo = o, s._panner = r, s.pan = t, s;
827
+ var o, i, r, u = _().context.audioContext;
828
+ return u.createStereoPanner ? r = o = u.createStereoPanner() : ((i = u.createPanner()).panningModel = "equalpower", r = i), (s = n.call(this, r) || this)._stereo = o, s._panner = i, s.pan = t, s;
829
829
  }
830
830
  s = n.call(this, null) || this;
831
831
  }
@@ -836,12 +836,12 @@ var q = se.filter(function(n) {
836
836
  }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
837
837
  n.prototype.destroy.call(this), this._stereo = null, this._panner = null;
838
838
  }, e;
839
- }(S), ReverbFilter: function(n) {
839
+ }(k), ReverbFilter: function(n) {
840
840
  function e(t, s, o) {
841
841
  t === void 0 && (t = 3), s === void 0 && (s = 2), o === void 0 && (o = !1);
842
- var r = this;
843
- if (!_().useLegacy) return (r = n.call(this, null) || this)._seconds = r._clamp(t, 1, 50), r._decay = r._clamp(s, 0, 100), r._reverse = o, r._rebuild(), r;
844
- r = n.call(this, null) || this;
842
+ var i = this;
843
+ if (!_().useLegacy) return (i = n.call(this, null) || this)._seconds = i._clamp(t, 1, 50), i._decay = i._clamp(s, 0, 100), i._reverse = o, i._rebuild(), i;
844
+ i = n.call(this, null) || this;
845
845
  }
846
846
  return b(e, n), e.prototype._clamp = function(t, s, o) {
847
847
  return Math.min(o, Math.max(s, t));
@@ -858,28 +858,28 @@ var q = se.filter(function(n) {
858
858
  }, set: function(t) {
859
859
  this._reverse = t, this._rebuild();
860
860
  }, enumerable: !1, configurable: !0 }), e.prototype._rebuild = function() {
861
- for (var t, s = _().context.audioContext, o = s.sampleRate, r = o * this._seconds, i = s.createBuffer(2, r, o), u = i.getChannelData(0), a = i.getChannelData(1), l = 0; l < r; l++) t = this._reverse ? r - l : l, u[l] = (2 * Math.random() - 1) * Math.pow(1 - t / r, this._decay), a[l] = (2 * Math.random() - 1) * Math.pow(1 - t / r, this._decay);
861
+ for (var t, s = _().context.audioContext, o = s.sampleRate, i = o * this._seconds, r = s.createBuffer(2, i, o), u = r.getChannelData(0), a = r.getChannelData(1), l = 0; l < i; l++) t = this._reverse ? i - l : l, u[l] = (2 * Math.random() - 1) * Math.pow(1 - t / i, this._decay), a[l] = (2 * Math.random() - 1) * Math.pow(1 - t / i, this._decay);
862
862
  var h = _().context.audioContext.createConvolver();
863
- h.buffer = i, this.init(h);
863
+ h.buffer = r, this.init(h);
864
864
  }, e;
865
- }(S), MonoFilter: function(n) {
865
+ }(k), MonoFilter: function(n) {
866
866
  function e() {
867
867
  var t = this;
868
868
  if (!_().useLegacy) {
869
- var s = _().context.audioContext, o = s.createChannelSplitter(), r = s.createChannelMerger();
870
- return r.connect(o), (t = n.call(this, r, o) || this)._merger = r, t;
869
+ var s = _().context.audioContext, o = s.createChannelSplitter(), i = s.createChannelMerger();
870
+ return i.connect(o), (t = n.call(this, i, o) || this)._merger = i, t;
871
871
  }
872
872
  t = n.call(this, null) || this;
873
873
  }
874
874
  return b(e, n), e.prototype.destroy = function() {
875
875
  this._merger.disconnect(), this._merger = null, n.prototype.destroy.call(this);
876
876
  }, e;
877
- }(S), StreamFilter: function(n) {
877
+ }(k), StreamFilter: function(n) {
878
878
  function e() {
879
879
  var t = this;
880
880
  if (!_().useLegacy) {
881
- var s = _().context.audioContext, o = s.createMediaStreamDestination(), r = s.createMediaStreamSource(o.stream);
882
- return (t = n.call(this, o, r) || this)._stream = o.stream, t;
881
+ var s = _().context.audioContext, o = s.createMediaStreamDestination(), i = s.createMediaStreamSource(o.stream);
882
+ return (t = n.call(this, o, i) || this)._stream = o.stream, t;
883
883
  }
884
884
  t = n.call(this, null) || this;
885
885
  }
@@ -888,22 +888,22 @@ var q = se.filter(function(n) {
888
888
  }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
889
889
  this._stream = null, n.prototype.destroy.call(this);
890
890
  }, e;
891
- }(S), TelephoneFilter: function(n) {
891
+ }(k), TelephoneFilter: function(n) {
892
892
  function e() {
893
893
  if (!_().useLegacy) {
894
- var t = _().context.audioContext, s = t.createBiquadFilter(), o = t.createBiquadFilter(), r = t.createBiquadFilter(), i = t.createBiquadFilter();
895
- return s.type = "lowpass", v.setParamValue(s.frequency, 2e3), o.type = "lowpass", v.setParamValue(o.frequency, 2e3), r.type = "highpass", v.setParamValue(r.frequency, 500), i.type = "highpass", v.setParamValue(i.frequency, 500), s.connect(o), o.connect(r), r.connect(i), n.call(this, s, i) || this;
894
+ var t = _().context.audioContext, s = t.createBiquadFilter(), o = t.createBiquadFilter(), i = t.createBiquadFilter(), r = t.createBiquadFilter();
895
+ return s.type = "lowpass", v.setParamValue(s.frequency, 2e3), o.type = "lowpass", v.setParamValue(o.frequency, 2e3), i.type = "highpass", v.setParamValue(i.frequency, 500), r.type = "highpass", v.setParamValue(r.frequency, 500), s.connect(o), o.connect(i), i.connect(r), n.call(this, s, r) || this;
896
896
  }
897
897
  n.call(this, null);
898
898
  }
899
899
  return b(e, n), e;
900
- }(S) }, Ae = { __proto__: null, supported: K }, z = function(n) {
900
+ }(k) }, Ae = { __proto__: null, supported: K }, z = function(n) {
901
901
  return ee = n, n;
902
902
  }(new Oe());
903
903
  ue.add(oe);
904
- class j {
905
- constructor(e, t, s, o, r, i, u, a) {
906
- this.fn = e, this.buf = t, this.start_ms = s, this.end_ms = o, this.ret_ms = r, this.volume = i, this.pan = u, this.snd = a, this.stt = a ? new G(this) : new Ee(), this.#s = L.procID, a && this.addSnd(a);
904
+ class S {
905
+ constructor(e, t, s, o, i, r, u, a) {
906
+ this.fn = e, this.buf = t, this.start_ms = s, this.end_ms = o, this.ret_ms = i, this.volume = r, this.pan = u, this.snd = a, this.stt = a ? new G(this) : new Ee(this), this.#s = L.procID, a && this.addSnd(a);
907
907
  }
908
908
  static #t = 1;
909
909
  stt;
@@ -925,22 +925,22 @@ class j {
925
925
  {
926
926
  const t = Number(c.getVal("sys:sn.sound.BGM.vol_mul_talking") ?? 1);
927
927
  if (t === 1) break;
928
- j.#t = t;
928
+ S.#t = t;
929
929
  const s = X[H];
930
- s && s.setVol(this.volume * j.#t);
930
+ s && s.setVol(this.volume * S.#t);
931
931
  }
932
932
  break;
933
933
  case H:
934
- e.volume = this.volume * j.#t;
934
+ e.volume = this.volume * S.#t;
935
935
  break;
936
936
  }
937
937
  }
938
938
  #e = () => {
939
939
  if (this.#e = () => {
940
- }, j.#t === 1 || this.buf !== Q) return;
941
- j.#t = 1;
940
+ }, S.#t === 1 || this.buf !== Q) return;
941
+ S.#t = 1;
942
942
  const e = X[H];
943
- e && e.setVol(this.volume * j.#t);
943
+ e && e.setVol(this.volume * S.#t);
944
944
  };
945
945
  setVol(e) {
946
946
  }
@@ -953,31 +953,31 @@ class j {
953
953
  destroy() {
954
954
  }
955
955
  }
956
- let J, c, E, Z, X, U;
956
+ let J, c, F, Z, X, U;
957
957
  const H = "BGM", D = "SE", Q = "VOICE";
958
958
  class d {
959
959
  constructor(e, t, s) {
960
960
  this.hArg = e, this.buf = t, this.fn = s;
961
- const o = F(e, "start_ms", 0), r = F(e, "end_ms", d.#s), i = F(e, "ret_ms", 0), u = F(e, "pan", 0), a = F(e, "speed", 1);
961
+ const o = j(e, "start_ms", 0), i = j(e, "end_ms", d.#s), r = j(e, "ret_ms", 0), u = j(e, "pan", 0), a = j(e, "speed", 1);
962
962
  if (o < 0) throw `[playse] start_ms:${o} が負の値です`;
963
- if (i < 0) throw `[playse] ret_ms:${i} が負の値です`;
964
- if (0 < r) {
965
- if (r <= o) throw `[playse] start_ms:${o} >= end_ms:${r} は異常値です`;
966
- if (r <= i) throw `[playse] ret_ms:${i} >= end_ms:${r} は異常値です`;
963
+ if (r < 0) throw `[playse] ret_ms:${r} が負の値です`;
964
+ if (0 < i) {
965
+ if (i <= o) throw `[playse] start_ms:${o} >= end_ms:${i} は異常値です`;
966
+ if (i <= r) throw `[playse] ret_ms:${r} >= end_ms:${i} は異常値です`;
967
967
  }
968
968
  const l = "const.sn.sound." + t + ".";
969
969
  c.setVal_Nochk("save", l + "fn", s);
970
970
  const h = d.getVol(e, 1);
971
971
  c.setVal_Nochk("save", l + "volume", h);
972
972
  const y = h * Number(c.getVal("sys:" + l + "volume", 1, !0)), m = A(e, "loop", !1);
973
- m ? (d.#t[t] = s, c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t))) : d.delLoopPlay(t), c.setVal_Nochk("save", l + "start_ms", o), c.setVal_Nochk("save", l + "end_ms", r), c.setVal_Nochk("save", l + "ret_ms", i), c.setVal_Nochk("tmp", l + "playing", !0), c.flush();
973
+ m ? (d.#t[t] = s, c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t))) : d.delLoopPlay(t), c.setVal_Nochk("save", l + "start_ms", o), c.setVal_Nochk("save", l + "end_ms", i), c.setVal_Nochk("save", l + "ret_ms", r), c.setVal_Nochk("tmp", l + "playing", !0), c.flush();
974
974
  const g = z.find(s);
975
- this.#e = new j(
975
+ this.#e = new S(
976
976
  s,
977
977
  t,
978
978
  o,
979
- r,
980
979
  i,
980
+ r,
981
981
  y,
982
982
  u,
983
983
  g
@@ -986,39 +986,39 @@ class d {
986
986
  loop: m,
987
987
  speed: a,
988
988
  volume: y,
989
- loaded: (p, P) => {
989
+ loaded: (p, x) => {
990
990
  if (!this.#e.stt.isDestroy) {
991
991
  if (p) {
992
- E.errScript(`ロード失敗です SndBuf fn:${s} ${String(p)}`, !1);
992
+ F.errScript(`ロード失敗です SndBuf fn:${s} ${String(p)}`, !1);
993
993
  return;
994
994
  }
995
- P && (this.#e.addSnd(P), u !== 0 && (P.filters = [new B.StereoFilter(u)]), e.fnc?.());
995
+ x && (this.#e.addSnd(x), u !== 0 && (x.filters = [new B.StereoFilter(u)]), e.fnc?.());
996
996
  }
997
997
  }
998
998
  };
999
- let x = "";
1000
- if (0 < o || r < d.#s) {
1001
- x = `${s};${o};${r};${i}`;
1002
- const p = (f.sprites ??= {})[x] = {
999
+ let w = "";
1000
+ if (0 < o || i < d.#s) {
1001
+ w = `${s};${o};${i};${r}`;
1002
+ const p = (f.sprites ??= {})[w] = {
1003
1003
  start: o / 1e3,
1004
- end: r / 1e3
1004
+ end: i / 1e3
1005
1005
  };
1006
1006
  f.preload = !0;
1007
- const P = f.loaded;
1008
- f.loaded = (C, O) => {
1007
+ const x = f.loaded;
1008
+ f.loaded = (C, E) => {
1009
1009
  if (this.#e.stt.isDestroy) return;
1010
- P(C, O);
1011
- const I = O, T = I.duration;
1012
- p.end < 0 && (p.end += T, I.removeSprites(x), I.addSprites(x, p)), p.end <= p.start && E.errScript(`[playse] end_ms:${r}(${p.end * 1e3}) >= start_ms:${o} は異常値です`), p.end * 1e3 <= i && E.errScript(`[playse] end_ms:${r}(${p.end * 1e3}) <= ret_ms:${i} は異常値です`), T <= p.start && E.errScript(`[playse] 音声ファイル再生時間:${T * 1e3} <= start_ms:${o} は異常値です`), r !== d.#s && T <= p.end && E.errScript(`[playse] 音声ファイル再生時間:${T * 1e3} <= end_ms:${r} は異常値です`), I.play(x, (ie) => f.complete?.(ie));
1010
+ x(C, E);
1011
+ const I = E, T = I.duration;
1012
+ p.end < 0 && (p.end += T, I.removeSprites(w), I.addSprites(w, p)), p.end <= p.start && F.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) >= start_ms:${o} は異常値です`), p.end * 1e3 <= r && F.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) <= ret_ms:${r} は異常値です`), T <= p.start && F.errScript(`[playse] 音声ファイル再生時間:${T * 1e3} <= start_ms:${o} は異常値です`), i !== d.#s && T <= p.end && F.errScript(`[playse] 音声ファイル再生時間:${T * 1e3} <= end_ms:${i} は異常値です`), I.play(w, (re) => f.complete?.(re));
1013
1013
  };
1014
1014
  } else f.autoPlay = !0;
1015
- if (m ? i !== 0 && (f.loop = !1, f.complete = (p) => {
1016
- const P = p.duration, C = i / 1e3, O = r / 1e3;
1017
- P <= C && E.errScript(`[playse] 音声ファイル再生時間:${P * 1e3} <= ret_ms:${i} は異常値です`), p.play({
1015
+ if (m ? r !== 0 && (f.loop = !1, f.complete = (p) => {
1016
+ const x = p.duration, C = r / 1e3, E = i / 1e3;
1017
+ x <= C && F.errScript(`[playse] 音声ファイル再生時間:${x * 1e3} <= ret_ms:${r} は異常値です`), p.play({
1018
1018
  // 一周目はループなし、なのでキャッシュされてる
1019
1019
  ...f,
1020
1020
  start: C,
1021
- end: O < 0 ? O + P : O,
1021
+ end: E < 0 ? E + x : E,
1022
1022
  // 負の値は末尾から
1023
1023
  // speed, // 重複
1024
1024
  loop: !0,
@@ -1032,7 +1032,7 @@ class d {
1032
1032
  }) : f.complete = () => {
1033
1033
  W(this.#e, t), this.#e.onPlayEnd();
1034
1034
  }, this.#n(), g) {
1035
- if (g.volume = y, x) this.#o(s, f);
1035
+ if (g.volume = y, w) this.#o(s, f);
1036
1036
  else if (g.isPlayable) {
1037
1037
  const p = g.options.source;
1038
1038
  !(p instanceof ArrayBuffer) || p.byteLength === 0 ? g.play(f) : this.#e.addSnd(N.from({
@@ -1047,16 +1047,16 @@ class d {
1047
1047
  if (this.needLoad = A(e, "join", !0)) {
1048
1048
  const p = this.#e.procID + `loaded buf:${t} fn:${s}`;
1049
1049
  L.beginProc(p);
1050
- const P = f.loaded;
1051
- f.loaded = (C, O) => {
1052
- P(C, O), L.endProc(p);
1050
+ const x = f.loaded;
1051
+ f.loaded = (C, E) => {
1052
+ x(C, E), L.endProc(p);
1053
1053
  };
1054
1054
  }
1055
1055
  this.#o(s, f);
1056
1056
  }
1057
1057
  static #t = {};
1058
- static init(e, t, s, o, r) {
1059
- d.#t = {}, J = e, c = t, E = s, Z = o, X = r;
1058
+ static init(e, t, s, o, i) {
1059
+ d.#t = {}, J = e, c = t, F = s, Z = o, X = i;
1060
1060
  }
1061
1061
  static setEvtMng(e) {
1062
1062
  U = e;
@@ -1067,13 +1067,13 @@ class d {
1067
1067
  c.setVal_Nochk("save", t + "fn", ""), c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t)), c.flush();
1068
1068
  }
1069
1069
  static getVol(e, t) {
1070
- const s = F(e, "volume", t);
1070
+ const s = j(e, "volume", t);
1071
1071
  return s < 0 ? 0 : s > 1 ? 1 : s;
1072
1072
  }
1073
1073
  static xchgbuf({ buf: e = D, buf2: t = D }) {
1074
1074
  if (e === t) throw `[xchgbuf] buf:${e} が同じ値です`;
1075
- const s = "const.sn.sound." + e + ".", o = Number(c.getVal("save:" + s + "volume")), r = String(c.getVal("save:" + s + "fn")), i = "const.sn.sound." + t + ".", u = Number(c.getVal("save:" + i + "volume")), a = String(c.getVal("save:" + i + "fn"));
1076
- c.setVal_Nochk("save", s + "volume", u), c.setVal_Nochk("save", i + "volume", o), c.setVal_Nochk("save", s + "fn", a), c.setVal_Nochk("save", i + "fn", r), e in d.#t != t in d.#t && (e in d.#t ? (delete d.#t[e], d.#t[t] = r) : (delete d.#t[t], d.#t[e] = a), c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t))), c.flush();
1075
+ const s = "const.sn.sound." + e + ".", o = Number(c.getVal("save:" + s + "volume")), i = String(c.getVal("save:" + s + "fn")), r = "const.sn.sound." + t + ".", u = Number(c.getVal("save:" + r + "volume")), a = String(c.getVal("save:" + r + "fn"));
1076
+ c.setVal_Nochk("save", s + "volume", u), c.setVal_Nochk("save", r + "volume", o), c.setVal_Nochk("save", s + "fn", a), c.setVal_Nochk("save", r + "fn", i), e in d.#t != t in d.#t && (e in d.#t ? (delete d.#t[e], d.#t[t] = i) : (delete d.#t[t], d.#t[e] = a), c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t))), c.flush();
1077
1077
  }
1078
1078
  static #s = 999e3;
1079
1079
  #e;
@@ -1088,12 +1088,12 @@ class d {
1088
1088
  t.url = s, N.from(t);
1089
1089
  return;
1090
1090
  }
1091
- new le().add({ name: e, url: s, xhrType: w.XHR_RESPONSE_TYPE.BUFFER }).use((o, r) => {
1092
- Z.decAB(o.data).then((i) => {
1093
- o.data = i;
1094
- }).catch((i) => E.errScript(`Sound ロード失敗ですc fn:${o.name} ${i}`, !1)).finally(() => r());
1095
- }).load((o, r) => {
1096
- t.source = r[e]?.data, N.from(t);
1091
+ new le().add({ name: e, url: s, xhrType: O.XHR_RESPONSE_TYPE.BUFFER }).use((o, i) => {
1092
+ Z.decAB(o.data).then((r) => {
1093
+ o.data = r;
1094
+ }).catch((r) => F.errScript(`Sound ロード失敗ですc fn:${o.name} ${r}`, !1)).finally(() => i());
1095
+ }).load((o, i) => {
1096
+ t.source = i[e]?.data, N.from(t);
1097
1097
  });
1098
1098
  }
1099
1099
  setVol(e) {
@@ -1116,14 +1116,18 @@ function W({ loop: n }, e) {
1116
1116
  c.setVal_Nochk("tmp", t + "playing", !1), c.flush();
1117
1117
  }
1118
1118
  class Ee {
1119
+ constructor(e) {
1120
+ this.si = e;
1121
+ }
1119
1122
  onLoad(e) {
1120
1123
  e.stt = new G(e);
1121
1124
  }
1122
1125
  stopse(e) {
1123
- e.stt = new k(e, !1);
1126
+ e.stt = new P(e, !1);
1124
1127
  }
1125
1128
  ws = () => !1;
1126
1129
  onPlayEnd() {
1130
+ this.si.stt = new P(this.si, !1);
1127
1131
  }
1128
1132
  // ok
1129
1133
  fade() {
@@ -1147,7 +1151,7 @@ class G {
1147
1151
  }
1148
1152
  // ok
1149
1153
  stopse(e) {
1150
- e.stt = new k(e);
1154
+ e.stt = new P(e);
1151
1155
  }
1152
1156
  ws(e, t) {
1153
1157
  if (e.loop) return !1;
@@ -1156,30 +1160,31 @@ class G {
1156
1160
  if (s && U.isSkipping)
1157
1161
  return o ? e.stt.stopse(e) : e.stt.onPlayEnd = () => {
1158
1162
  }, !1;
1159
- const { buf: r = D } = t, i = () => {
1160
- W(e, r), e.onPlayEnd(), o ? e.stt.stopse(e) : e.stt.onPlayEnd = () => {
1163
+ const { buf: i = D } = t, r = () => {
1164
+ W(e, i), e.onPlayEnd(), o ? e.stt.stopse(e) : e.stt.onPlayEnd = () => {
1161
1165
  };
1162
1166
  };
1163
- return L.beginProc(e.procID + "ws", i, !0, s ? i : void 0), !0;
1167
+ return L.beginProc(e.procID + "ws", r, !0, s ? r : void 0), !0;
1164
1168
  }
1165
1169
  onPlayEnd() {
1170
+ this.si.stt = new P(this.si, !1);
1166
1171
  }
1167
1172
  // ok
1168
1173
  fade(e, t) {
1169
- const { buf: s = D } = t, r = "const.sn.sound." + s + "." + "volume", i = d.getVol(t, NaN);
1170
- c.setVal_Nochk("save", r, i);
1171
- const u = i * Number(c.getVal("sys:" + r, 1)), a = A(t, "stop", i === 0);
1174
+ const { buf: s = D } = t, i = "const.sn.sound." + s + "." + "volume", r = d.getVol(t, NaN);
1175
+ c.setVal_Nochk("save", i, r);
1176
+ const u = r * Number(c.getVal("sys:" + i, 1)), a = A(t, "stop", r === 0);
1172
1177
  a && d.delLoopPlay(s), c.flush();
1173
- const l = F(t, "time", NaN), h = F(t, "delay", 0);
1178
+ const l = j(t, "time", NaN), h = j(t, "delay", 0);
1174
1179
  if (l === 0 && h === 0 || U.isSkipping) {
1175
- e.setVol(u), e.stt = a ? new k(e) : new G(e);
1180
+ e.setVol(u), e.stt = a ? new P(e) : new G(e);
1176
1181
  return;
1177
1182
  }
1178
1183
  const y = e.tw();
1179
1184
  y && (ce.setTwProp(y, t).to({ volume: u }, l).onUpdate(() => {
1180
1185
  e.snd?.isPlaying || (y.stop(), y.onComplete());
1181
1186
  }).onComplete(() => {
1182
- he(y), e.stt.compFade(s), e.stt = a ? new k(e) : new G(e);
1187
+ he(y), e.stt.compFade(s), e.stt = a ? new P(e) : new G(e);
1183
1188
  }).start(), e.stt = new je(y, e));
1184
1189
  }
1185
1190
  wf = () => !1;
@@ -1200,12 +1205,12 @@ class Fe {
1200
1205
  }
1201
1206
  // ok
1202
1207
  stopse(e) {
1203
- e.stt = new k(e);
1208
+ e.stt = new P(e);
1204
1209
  }
1205
1210
  ws = () => !1;
1206
1211
  // ok
1207
1212
  onPlayEnd() {
1208
- L.notifyEndProc(this.si.procID + "ws");
1213
+ this.si.stt = new P(this.si, !1), L.notifyEndProc(this.si.procID + "ws");
1209
1214
  }
1210
1215
  fade() {
1211
1216
  }
@@ -1228,12 +1233,13 @@ class je {
1228
1233
  }
1229
1234
  // ok
1230
1235
  stopse(e) {
1231
- this.stopfadese(), e.stt = new k(e);
1236
+ this.stopfadese(), e.stt = new P(e);
1232
1237
  }
1233
1238
  // 順番厳守
1234
1239
  ws = () => !1;
1235
1240
  // ok ?
1236
1241
  onPlayEnd() {
1242
+ this.stopfadese(), this.si.stt = new P(this.si, !1);
1237
1243
  }
1238
1244
  // ok
1239
1245
  fade() {
@@ -1261,11 +1267,12 @@ class Se {
1261
1267
  }
1262
1268
  // ok
1263
1269
  stopse(e) {
1264
- this.stopfadese(), e.stt = new k(e);
1270
+ this.stopfadese(), e.stt = new P(e);
1265
1271
  }
1266
1272
  ws = () => !1;
1267
1273
  // ok
1268
1274
  onPlayEnd() {
1275
+ this.stopfadese(), this.si.stt = new P(this.si, !1);
1269
1276
  }
1270
1277
  // ok
1271
1278
  fade() {
@@ -1279,7 +1286,7 @@ class Se {
1279
1286
  stopfadese = () => this.si.stop();
1280
1287
  isDestroy = !1;
1281
1288
  }
1282
- class k {
1289
+ class P {
1283
1290
  constructor(e, t = !0) {
1284
1291
  this.si = e, this.stop = t, t && (e.stop(), e.loop && (e.destroy(), e.destroy = () => {
1285
1292
  }));